Block: w00tw00t.at.ISC.SANS.DFind

Discussion in 'Security' started by ASTRAPI, Oct 30, 2011.

  1. #1
    Hello

    Any idea how can i block on my dedicated Centos server using csf firewall or iptables this old vulnerability scanner that i found on my logs?

    
    69.162.74.37 - - [18/Sep/2011:18:56:22 +0300] "GET /w00tw00t.at.ISC.SANS.test0:) HTTP/1.1" 400 166 "-" "-"
    62.141.46.141 - - [19/Sep/2011:06:18:21 +0300] "GET /w00tw00t.at.ISC.SANS.test0:) HTTP/1.1" 400 166 "-" "-"
    24.73.227.230 - - [19/Sep/2011:11:41:35 +0300] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 166 "-" "-"
    24.73.227.230 - - [19/Sep/2011:11:41:35 +0300] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 166 "-" "-"
    46.163.65.80 - - [19/Sep/2011:21:35:12 +0300] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 166 "-" "-"
    46.163.65.80 - - [19/Sep/2011:21:35:12 +0300] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 166 "-" "-"
    94.102.209.211 - - [20/Sep/2011:17:00:21 +0300] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 166 "-" "-"
    94.102.209.211 - - [20/Sep/2011:17:00:21 +0300] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 166 "-" "-"
    
    Code (markup):
    Thank you
     
    ASTRAPI, Oct 30, 2011 IP
  2. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #2
    Yes, you can block by URI

    <LocationMatch "/w00t.*">
    Deny from all
    </Location>

    This is a common scanner string.
     
    zacharooni, Oct 31, 2011 IP
  3. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #3
    You can use iptables to block the w00tw00t scanner. If you are using CSF, create a file /etc/csf/csfpost.sh and place the iptables rule mentioned in the post in it and restart the firewall. The iptable rule will be added along with CSF rules.
     
    madaboutlinux, Oct 31, 2011 IP
  4. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok so i will create a file /etc/csf/csfpost.sh and add just this line inside and restart csf?

    Thank you
     
    ASTRAPI, Oct 31, 2011 IP
  5. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #5
    Right but don't forget to restart the firewall

     
    madaboutlinux, Nov 1, 2011 IP
  6. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Getting some info from the net it seems that i am able to do it with two commands and i want to ask which one is better and what is the difference on them?

    
    iptables -I INPUT -d YOUR.SERVER.IP -p tcp --dport 80 -m string --to 70  --algo bm --string 'GET /w00tw00t.at.ISC.SANS.' -j DROP
    
    Code (markup):
    and

    
    iptables -I INPUT -p tcp --dport 80 -m string --algo bm --string 'GET /w00tw00t.at.ISC.SANS.' -j DROP
    
    Code (markup):
    ?
     
    Last edited: Nov 1, 2011
    ASTRAPI, Nov 1, 2011 IP
  7. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #7
    The text format in Wordpress caused the problem. The format has been corrected, you can copy the iptable rule again from the post and paste it as it is in the csfpost.sh file.
     
    madaboutlinux, Nov 1, 2011 IP
  8. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Ok i did and is working and i edit my previous post with some info if yo uknow to help me :)


    Getting some info from the net it seems that i am able to do it with two commands and i want to ask which one is better and what is the difference on them?

    
    iptables -I INPUT -d YOUR.SERVER.IP -p tcp --dport 80 -m string --to 70  --algo bm --string 'GET /w00tw00t.at.ISC.SANS.' -j DROP
    
    Code (markup):
    and

    
    iptables -I INPUT -p tcp --dport 80 -m string --algo bm --string 'GET /w00tw00t.at.ISC.SANS.' -j DROP
    
    Code (markup):
    ?
     
    ASTRAPI, Nov 1, 2011 IP
  9. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #9
    Both are almost the same:

    1) With "-d YOUR.SERVER.IP" the rule will only work for the connections to that specific IP.
    2) With "--to 70" it will pick up the first 70 bytes of the packet.

    Not going to make much different if it isn't mentioned.
     
    madaboutlinux, Nov 1, 2011 IP
  10. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    But how it blocks it as i use the second command that doesn't have the server ip or the --to 70 ?
     
    ASTRAPI, Nov 1, 2011 IP
  11. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #11
    The rule is placed in the INPUT chain, so all the rules in that chain are applicable to all the incoming connections to any of your server IP. "--to 70" is nothing but the first 70 bytes of the packets, if not mentioned it will read the complete packet.
     
    madaboutlinux, Nov 2, 2011 IP
  12. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Ok thanks :)

    Does that rule cause an overhead on Apache?
     
    ASTRAPI, Nov 2, 2011 IP