Slashdot Mirror


Fingerprinting Port 80 Attacks

pg writes "I found an interesting article on www.cgisecurity.com that explains common fingerprints in web server, and web application attacks. It goes to describe how to detect most known, and unknown attacks. This may come in handy when trying to detect another internet worm."

147 comments

  1. It makes me angry by gmplague · · Score: 2, Interesting

    It makes me angry that everyone decides to beef up security and write analytical articles about how to maintain security AFTER THE FACT. The problem is, that although this seems like a good idea now, fingerprinting probably won't help for the next series of attacks, because they will be different in nature.

    --
    __________________________________________
    Take comfort in your ignorance.
    Grandmaster Plague
    1. Re:It makes me angry by gorillasoft · · Score: 2, Informative

      This isn't about improving security after the fact, it's about implementing IDS rules based on identifiable attack characteristics so you can build some useful filters, about checking your logs if you want to in order to determine what may have been an attack and what was really innocuous, and so on.

      It's not at all about the security of the server itself.

    2. Re:It makes me angry by 13013dobbs · · Score: 2, Interesting

      They will be different in nature, but will use the same commands to gain root access to the box. Read the part where he describes the common commands an attacker may execute, or common files the attacker will request. How the files or commands are accesses may change, but the files and commands will (for the most part) stay the same.

      --

      No replies made to AC posts. Please log in.

    3. Re:It makes me angry by gmplague · · Score: 1

      My point was, we're improving the IDS rules and filters after the fact, rendering it useless to most new worms. Improving IDS rules and building better filters DOES improve the security of the server (that's what Intrusion Detection Systems are for, most IDS's I know don't JUST detect an intrusion, but also kick out possible intruders) And although checking your logs is good to see if you were the intended target of the attack, if you're even a half-assed sysadmin, you should be able to tell if you've been infected with a worm. My point was that it does very little to help against new worms, because, contrary to popular belief the people who write these worms are pretty clever.

      --
      __________________________________________
      Take comfort in your ignorance.
      Grandmaster Plague
    4. Re:It makes me angry by gmplague · · Score: 1

      I completely disagree on this one, there are tons of ways to get root on any given system, and all different kinds of command sequences... and if you've ever heard of a polymorphic virus, it may utilise many of these different ways to obtain root on a system, and randomize the order in which they are used. That's just one of the many things that these worm writers can think of.

      --
      __________________________________________
      Take comfort in your ignorance.
      Grandmaster Plague
    5. Re:It makes me angry by 13013dobbs · · Score: 1

      The same base commands are used once a cracker has the system, that is what the paper is trying to tell you to look out for.

      --

      No replies made to AC posts. Please log in.

    6. Re:It makes me angry by Anonymous Coward · · Score: 0

      Well,

      maybe it won't help to defend against new kinds of attaks. But I hope it'll get some people to realize how insecure their systems are. (Though I doubt that they read /. ).

      In the best situation some admins will say "Hey these attacks work on my system, let's hire some professional and find out what else is wrong" and maybe a new attack will be discovered and prevented.

      Realisticly I think we'll keep on patching holes as they're discovered and abused.

      I think another side effect of this article will be that a lot of people will try these examples (I was tempted to try our intranet server).
      Hopefully they will report the vulnerabilies they found and not do too much damage.

    7. Re:It makes me angry by -brazil- · · Score: 1
      As far as I can tell, popular belief does say that worm and virus programmer are "fiendishly clever hackers", and it's dead wrong. Most of them are amateurs and know barely enough to glue some long-known exploit together with a bit of propagation code.


      And it's the same with "manual" intrusions: the biggest problem are not the very few competent black hats, it's the hordes of script kiddies, and those do use mostly older attacks and try out every exploit they know one after another.


      Besides, a main point of fingerprinting is attempting to find common elements that will be present even in currently unknown attack forms.

      --

      The illegal we do immediately. The unconstitutional takes a little longer.
      --Henry Kissinger

  2. What irony! by swordboy · · Score: 5, Funny

    I'm sure that the server that the article is posted on is getting a nice "attack" on port 80 right now!

    --

    Life is the leading cause of death in America.
    1. Re:What irony! by VA+Software · · Score: 2, Informative

      And with an easily detectable fingerprint too : referer = slashdot.org

      --

      ---
      http://slashdot.org/moderation.shtml
    2. Re:What irony! by Idimmu+Xul · · Score: 0
      I'm sure that the server that the article is posted on is getting a nice "attack" on port 80 right now!

      The article was also posted to SecurityFocus's 'vuln-dev' mailing list.. but I don't think it mentioned the notorious DDoS that is the Slashdot effect :)

      --
      The problem with slashdot is that most of its users were bullied and stuffed into lockers as kids!
    3. Re:What irony! by Anonymous Coward · · Score: 0

      These thinkgeek advertisements are really annoying. Is this slashdot's only source of income now, a failing hardware/sports drink/toys website?

      better dump your stock in "VA whatever-we-call-it-now" soon.

    4. Re:What irony! by Scoria · · Score: 0, Offtopic

      Or Slashdotted. Which is worse, anyway?

      --
      Do you like German cars?
    5. Re:What irony! by Anonymous Coward · · Score: 0

      It's being attacked by the drooling hordes of Slashdot retards!

    6. Re:What irony! by Anonymous Coward · · Score: 0

      Nah just let them do their typing with needles inserted under the fingernails.

  3. cgisecurity? by Anonymous Coward · · Score: 0

    isn't that an oxymoron?

  4. Hmmmm... by Krapangor · · Score: 1

    isn't the usual fingerprint of an attack that your web server is down, your traffic explodes and all people you know send your their documents to have your advice ?

    I don't see much more room for advanced technology there.

    --
    Owner of a Mensa membership card.
  5. Is it possible to protect the web? by kalleanka2 · · Score: 1

    Will it ever be able to stop DDOS attacks? You can ofcause write software that checks for packages that have some common pattern but then this software is going to take resources and what happens on a distributed site like amazon with huge load?

    1. Re:Is it possible to protect the web? by Ace+Rimmer · · Score: 1

      DDOS attacks are very hard to avoid becouse they're not "real attacks". It's a sort of vandalism - you can't hurt it like a hacker, so just

      while true; do press 'submit' button; done

      can they stand it? No, well ...i'm so mighty! YES!

      --

      :wq

    2. Re:Is it possible to protect the web? by Anonymous Coward · · Score: 0

      > Will it ever be able to stop DDOS attacks?

      Only dynamic configuring of firewalls (notice a pattern of attack packets from a given IP address, reconfig firewall to drop packets from that address) can _assist_ against this on a given system; the real sol'n is for the border routers to do this and prevent the attack packets from reaching their target(s).

    3. Re:Is it possible to protect the web? by Anonymous Coward · · Score: 0

      Cool. So I can forge the return IP in my packets and get domains all over the Net banned from your site.

      Sorry, the consensus model for the 'net is crumbling. It's gonna go away.

      Buh-bye, anonymnity.

  6. One thing missed by 13013dobbs · · Score: 5, Insightful

    formmail script exploits. Due to post 25 blocking, spammers are looking for exploitable formmail scripts to send their spam through. I guess the author just wanted to talk about root exploits, but there are other ways to abuse a web server.

    --

    No replies made to AC posts. Please log in.

    1. Re:One thing missed by ptomblin · · Score: 2

      Yeah, I was looking for that specifially because just this afternoon I saw a whole metric buttload of these:

      152.163.160.44 - - [05/Nov/2001:14:50:00 -0500] "GET /cgi-bin/FormMail.pl?email=&recipient=tester@aol.n et&subject=P80+24.161.81.172+7 HTTP/1.0" 404 279 "-" "-" 152.163.160.44 - - [05/Nov/2001:14:50:00 -0500] "GET /cgi-bin/formmail/FormMail.pl?email=&recipient=tes ter@aol.net&subject=P80+24.161.81.172+11 HTTP/1.0" 404 288 "-" "-"
      152.163.160.44 - - [05/Nov/2001:14:50:00 -0500] "GET /cgi/FormMail.pl?email=&recipient=tester@aol.net&s ubject=P80+24.161.81.172+19 HTTP/1.0" 404 275 "-" "-"
      152.163.160.44 - - [05/Nov/2001:14:50:00 -0500] "GET /cgi-bin/formmail.pl?email=&recipient=tester@aol.n et&subject=P80+24.161.81.172+35 HTTP/1.0" 404 279 "-" "-"152.163.160.44 - - [05/Nov/2001:14:50:00 -0500] "GET /cgi-sys/formmail.pl?email=&recipient=tester@aol.n et&subject=P80+24.161.81.172+67 HTTP/1.0" 404 279 "-" "-"152.163.160.44 - - [05/Nov/2001:14:50:00 -0500] "GET /cgi-sys/FormMail.pl?email=&recipient=tester@aol.n et&subject=P80+24.161.81.172+131 HTTP/1.0" 404 279 "-" "-

      --
      The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
    2. Re:One thing missed by Anonymous Coward · · Score: 0

      email opssec@aol.com and ask them what is up.

      Tell them John sent ya.

    3. Re:One thing missed by SCHecklerX · · Score: 2

      I get those all the time too. It is originating from AOL. WTF is this?

    4. Re:One thing missed by SCHecklerX · · Score: 2
      Oh yeah...

      Mine are from teh exact same address. Is this an AOL proxy used by AOL users, or can I safely firewall that address to deny access?

    5. Re:One thing missed by ptomblin · · Score: 3, Informative

      It's a spammer or a mail bomber looking for form-mail scripts that he can hijack to send his millions of email messages through and make it hard to catch him or block mail from him. They used to rely on finding open mail relays, but except for a few thousand in China and Korea, there aren't that many around any more (and anybody who doesn't want to get spam just blocks everything from sites in China or Korea). So they've altered their tactics.

      --
      The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
    6. Re:One thing missed by 13013dobbs · · Score: 1

      True. Another thing that is spurring this is the post 25 filters that most nationwide (and worldwide) ISPs have enabled. So, to get their psudo-anonymous mail out, they need to use services on other ports.

      --

      No replies made to AC posts. Please log in.

    7. Re:One thing missed by ptomblin · · Score: 2

      All legitimate traffic from AOL appears to come from address that reverse lookup to foo.proxy.aol.com. This guy doesn't.

      For instance in my current logs, the only legitimate traffic from AOL addresses comes from
      spider-mtc-tg014.proxy.aol.com and
      spider-mtc-tk043.proxy.aol.com and
      spider-mtc-tb054.proxy.aol.com.

      --
      The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
    8. Re:One thing missed by ptomblin · · Score: 2

      I take that partly back. Looking through my logs again, I see what appears to be legitimate traffic (ie to existing web pages) from AOL ips like:
      ACA19CF3.ipt.aol.com and
      AC8D6E32.ipt.aol.com

      I believe these are people who aren't using the default AOL browser, though.

      --
      The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
    9. Re:One thing missed by Anonymous Coward · · Score: 0

      i've had shitloads of trouble from aol addies.
      i've had sendmail(8.9.3) lock the input queue
      and die after an impolite disconnect from these guys.
      What gives?

    10. Re:One thing missed by Anonymous Coward · · Score: 0

      Formail is a specific example. This paper moreso covered attack signatures in general and didn't try to mention certain CGI vulns.

  7. incomplete document by Angry+Black+Man · · Score: 4, Informative

    That article doesn't cover too many port 80 exploits. It does cover the most common attacks, but, if you want some more information here is a more complete guide. There are also a lot of language translations of it at the top if you're not the most fluent in english.

    Remember, these documenst are written to help server administrators get an idea of what to look out for, not to solve every single port 80 problem out there.

    --
    the byproduct of years of oppression by the white man
    1. Re:incomplete document by mwalker · · Score: 3, Informative

      I hate to rain on your parade, but I believe that while the linked information is Informative, it is not quite On-Topic. The article in question talks about how to fingerprint different exploit strings launched at web servers at the application layer on port 80. The document you linked discusses how to fingerprint the TCP stacks of varying operating systems based on details gleaned from the top 3 layers of the network stack, including timing details, TCP sequence numbers, etc. Specifically it describes how Fyodor's excellent nmap utility fingerprints an Operating System by TCP stack. You may note that you must be "root" to use this capability because you must sniff the raw TCP stream in order to be able to do this. Fingerprinting port 80 exploit strings just requires you to read the http logs...

      While fingerprinting an OS is certainly a useful thing, we shouldn't confuse it with a fingerpinting and profiling effort aimed at categorizing and identifying buffer overrun and similar exploits aimed at web servers. Automated run-time detection of these attempts can lead to faster detection and elimination of threats. In addition, this is a passive measure, whereas nmap is an active measure.

    2. Re:incomplete document by Anonymous Coward · · Score: 0

      Maybe it would help to check out arachNIDS and
      read their snort defs to get a hint.

  8. Fingerprinting, CGI & Web Security by Slipped_Disk · · Score: 3, Interesting

    I think there is some value to this article for new admins - it highlights most of the common things you will see in your log files if someone is poking at your site.

    By the same token, most well-written CGIs will block these sorts of attacks (and hopefully if you are writing CGIs you will have enough knowledge (and common sense) to write them in a reasonably secure manner).

    At the least it's worth a quick five-minute scan.

    --
    /~mikeg
  9. Fingerprint Database by helleman · · Score: 5, Interesting

    I'd love to see a plugin for apache that allowed a central server fingerprint database for new exploits.

    Every hour or so, a web server could access a central fingerprint server and download what the latest exploits look like. If a exploit comes in, the server could deny that IP, or drop those accesses without needing to know what the particular exploit is. A self maintaining web server via the web.

    What do you think?

    1. Re:Fingerprint Database by Tenebrious1 · · Score: 5, Interesting

      And, unbeknownst to you and thousands of others, the site that maintains the list has been hacked, and you are downloading empty lists that allow every exploit.

      It's a good idea, but there's a problem when you create a central point of failure.

      --
      -- If god wanted me to have a sig, he'd have given me a sense of humor.
    2. Re:Fingerprint Database by Slipped_Disk · · Score: 1, Interesting

      This is a really cool idea, there would need to be some way of verifying the information the plugin was getting though, or someone could just feed your server an "attack" fingerprint that matches a normal hit and you would wind up denying legitemate users. This idea sounds a lot like the ORBS/RBL for sendmail.

      --
      /~mikeg
    3. Re:Fingerprint Database by Anonymous Coward · · Score: 0


      Woot! Must hack the fingerprint server so that http://*/*.html is considered an attack.


      (That's what the script kiddies would think.)

    4. Re:Fingerprint Database by MenTaLguY · · Score: 2

      If the worst-case scenario is no worse than not using the service at all, then it still sounds like a good deal to me. Of course, there is probably a "worse-case" scenario: the site that maintains the list is hacked, and everyone downloads lists that match and subsequently block ALL traffic, legitimate and otherwise. ...or possibly just the same thing happening as a result of incompetence.

      --

      DNA just wants to be free...
    5. Re:Fingerprint Database by b1t+r0t · · Score: 3, Insightful
      I'd love to see a plugin for apache that allowed a central server fingerprint database for new exploits.

      Then we could couple it with my favorite idea for an Apache module: mod_labrea. This way any 'undesirable' HTTP exploit could be given a reverse DoS by keeping the connections alive and stalled for as long as possible.

      --

      --
      "Open source is good." - Steve Jobs
      "Open source is evil." - Microsoft
    6. Re:Fingerprint Database by drinkypoo · · Score: 1
      List maintainer digitally signs fingerprints.

      Next?

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    7. Re:Fingerprint Database by LilGuy · · Score: 1

      That would be great. Until someone unveils their new exploit, or worm, and DDoS' the central fingerprint server. The problems that would be caused to that server everytime somebody came out with their newest attacks would be innumerable I'm afraid.

      I had the same idea a while back myself.. but I myself wouldn't dare hassle with it. Perhaps there is some brave soul out there with the time and resources to fend off the countless attacks.

      My $.02

      --

      You're nothing; like me.
    8. Re:Fingerprint Database by Anonymous Coward · · Score: 0

      good thing i use PHP ;-)

  10. portblocker by UUDDLRLRBASTRT · · Score: 2, Informative

    If your using windows (blech!) you can get a program for free that blocks your port 80, as well as tells you the IP number of somebody attempting to get in. The program is called Portblocker, and the company that makes it is analog X. I often bomb the person who tries to access my computer with telnet requests just to irritate them.

    1. Re:portblocker by UUDDLRLRBASTRT · · Score: 0

      Oh my god that was offensive.

    2. Re:portblocker by UUDDLRLRBASTRT · · Score: 1

      That wasn't me who put that link there, it was the guy replied to my post.

    3. Re:portblocker by radish · · Score: 2


      or you could just install ZoneAlarm (i.e. blocks all ports in & outbound), which is a proper firewall (and also free).

      PS. Yes I know there are better firewalls around (e.g. smoothwall) but ZA does the job for simple windows boxes, IMHO the best of the "personal" firewalls.

      --

      ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

    4. Re:portblocker by Anonymous Coward · · Score: 0

      Ever heard of forged IP#'s?

  11. Garbage requests by spankfish · · Score: 3, Redundant
    What I personally like to do is create a good set of rules for detecting this kind of garbage requests and storing them in log files which are separate to my normal access_log and error_log... that way I don't have to wade through acres of crap while looking at my real visitors.

    Yes, I know I could grep 'em out while viewing, but I think garbage should be kept in a separate place to the real visitors' log entries.

    --

    NO TOUCH MONKEY!
    1. Re:Garbage requests by Heem · · Score: 3, Informative

      I think garbage should be kept in a separate place to the real visitors' log entries.

      What i do, is setup virtual hosts on apache, with my domain name pointing at the real website, and my numeric IP pointed at just a blank page, and have them log to seperate files. Since MOST attacks come randomly via numeric IP, and MOST real users come in using the domain name.

      --
      Don't Tread on Me
    2. Re:Garbage requests by SethJohnson · · Score: 1

      This is a very good idea. I hadn't thought of this at all. Would liked to have done this before Time Warner (RoadRunner) disabled inbound port 80 due to nimdA. Now I don't have crap coming to my server. I switched it to run at port 81, which works, but how elegant is the URL http://myserver.dhs.org:81/ ? Not very.

    3. Re:Garbage requests by Heem · · Score: 2

      Got another one for ya then. surely you have a friend or a friend of a friend that has or has access to a 'real' server.. park your www.mydomain.org there with a simple html that redirects to www2.mydomain.org:81 OR opens a frame with www2.mydomain.org:81 inside of it.

      --
      Don't Tread on Me
  12. Re:VANILLA ICE by SolidCore · · Score: 0, Offtopic

    Dont Blame the brother... He's one of us. FearLinux.com

  13. Looks good and a TFTP/FTP Question. by Embedded+Geek · · Score: 3, Interesting
    On first glance, this looks like a really nice piece of work, especially given the caveat (paraphrased) "this is not completely inclusive..." for the author.

    I do have a question for my fellow slashdotters: Why does the author single out TFTP but not FTP? Does TFTP have inherrent weaknesses that would make it the file transfer protocol of choice for an attacker?

    --

    "Prepare for the worst - hope for the best."

    1. Re:Looks good and a TFTP/FTP Question. by Anonymous Coward · · Score: 0

      TFTP: no username/login protocol, not even in clear. Make a connection, get/put a file. Its simplicity is why it was used with bootp to load OSs into diskless network clients.

    2. Re:Looks good and a TFTP/FTP Question. by Styx · · Score: 1

      TFTP doesn't use passwords, so it's easier to use from a script.

      --
      /Styx
    3. Re:Looks good and a TFTP/FTP Question. by rodgerd · · Score: 3, Informative

      TFTP has no authentication in the protocol, so the only ACLs you've got are network level ones from TCP wrappers.

      All it requires is a misconfiguration on the TFTP server, and you'll be able to fetch and overwrite any file anywhere on the filesystem; I've seen this happen in the real world from time to time.

  14. Snort by Frums · · Score: 5, Informative

    Hmm, Snort has signatures written for all of these =)

  15. Not very interesting by brettbender · · Score: 4, Informative

    This paper includes very loose regex heuristics for requests that "might be" attacks. These may be interesting for anomaly detection, when coupled with an engine that records incidence rate (if you see an exponential surge in 'weird' requests, then maybe you're seeing a worm's infection growth curve ).

    But the result of deploying these (say, matching for "%20" in a URI) as intrusion detection system rules would be a high false positive rate.

    You would be better off looking at arachNIDS for rules that are more specific and less likely to drown you in alerts.
    1. Re:Not very interesting by jiheison · · Score: 2, Informative

      But the result of deploying these (say, matching for "%20" in a URI) as intrusion detection system rules would be a high false positive rate.

      From the article:

      ""%20" Requests

      This is the hex value of a blank space. While this doesn't mean youre being exploited, it is
      something you may want to look for in your logs. Some web applications you run may use these
      characters in valid requests, so check your logs carefully
      . On the other hand, this request
      is occasionally used to help execute commands."

      What's your beef?

    2. Re:Not very interesting by Anonymous Coward · · Score: 0

      Yeah, you need to prune these lists too..
      Do i want "suspicious" icmp_request messages
      from my dhcp client windies machines taking
      4mb of disk space?
      Other than this carping criticism the arachNIDS guys have done one hell of a job and given it
      to you on a silver platter.

      Also snort is easy enough when you get it but beforehand it can be a bear.

    3. Re:Not very interesting by arkanes · · Score: 1

      As a holdover from my DOS days, I have this aversion to spaces in my filenames, so nothing I write has them. Assuming even moderate control over they system you're administering, it should be easy to make SURE that anything with %20 in it is, if not an attack, anomalous.

    4. Re:Not very interesting by jiheison · · Score: 1

      I never use spaces in file names either. However, file names are not the only strings that will appear in your logs if you run web applications.

  16. Well, it's not like you did anything. by autopr0n · · Score: 0

    I didn't see any analytical papers from you detailing how to detect old and/or new attacks. Of course people are going to spend more time on a real problem then a theoretical, or minor one. I mean, duh.

    --
    autopr0n is like, down and stuff.
    1. Re:Well, it's not like you did anything. by gmplague · · Score: 1

      The fact that I don't specialise in intrusion detection doesn't mean that I didn't do anything. You should really do your research before making accusations that i didn't do anything. If you want to read something I've done, pick up the latest issue of 2600 and read my article entitled "Myths about TCP spoofing". Besides, I think an article specializing in how to write secure code might be better... or an article about how to patch your system as soon as a new vulnerability is announced. There's absolutely no reason to announce to 50,000+ slashdot readers "Let's all catalog the log entries of the same worm!" Especially when there are people who have set up boxes all over the internet to serve only this function.

      --
      __________________________________________
      Take comfort in your ignorance.
      Grandmaster Plague
  17. Great article for web server admins by shanek · · Score: 2

    The article comes right out and states that it doesn't cover everything, but it seems to get the most common exploits. Once an admin gets this paper and secures the server against everything in it, it becomes easier to block other kinds of traffic (such as file types ending in exe). I do like the idea one poster had about a central database of port 80 fingerprints.

    1. Re:Great article for web server admins by generic · · Score: 1

      It's actually a better article for cgi developers.

      --
      Microsoft aggravates my tourettes syndrome.
  18. So what do you do after.. by sh!va · · Score: 1

    Who are the correct people, if any to alert in case you see such attacks originating from certain IPs?

    1. Re:So what do you do after.. by Anonymous Coward · · Score: 0

      abuse@microsoft.com is the authority.

  19. 200 OK by DNS-and-BIND · · Score: 2

    GET /cgi-bin/phf?Jserver=a&Qalias=a%0Acat%20/etc/passw d HTTP/1.0

    --
    Shutting down free speech with violence isn't fighting fascism. It IS fascism!
  20. Securing webservers by Anonymous Coward · · Score: 0, Insightful

    One thing that I am surprised is in what ports the webserver can reach out with, and what ports the webserver can be accessed with. If you have access to a firewall.. then the ONLY port that anyone should be able to connect to the webserver is port 80 (or port 443, depending on if you use SSL). Also, you shouldn't let your webserver send any outgoing packets unless they are originating from port 80. This circumvents a lot of common attacks which involve any sort of remote 3rd party or involve any service other than HTTP.

    1. Re:Securing webservers by b1t+r0t · · Score: 3, Informative
      Also, you shouldn't let your webserver send any outgoing packets unless they are originating from port 80.

      If you're really paranoid, you also shouldn't let your web server send any outgoing SYN packets from port 80. This will help prevent web-exploit worms like Code Red and Nimda from spreading.

      --

      --
      "Open source is good." - Steve Jobs
      "Open source is evil." - Microsoft
    2. Re:Securing webservers by hardcode · · Score: 0, Offtopic

      *chuckle*

      You have the b*stard nature sir!

    3. Re:Securing webservers by merlin_jim · · Score: 1

      Problem is, there are times when you need more than that. But SYN packets out on 80 is probably a bad idea, too.

      The important part is to carefully decide what kinds of communications you'll allow in and out... regardless of port. For instance, you may want to be able to FTP out, but not in.

      --
      I am disrespectful to dirt! Can you see that I am serious?!
    4. Re:Securing webservers by b1t+r0t · · Score: 2
      You have the b*stard nature sir!

      Especially since I didn't mention the other effect of blocking outbound port 80 SYN packets. "No pr0n surfing from the web server console! Now get back to work!" (And yes, I do frequent The Monastery, how did you know?)

      --

      --
      "Open source is good." - Steve Jobs
      "Open source is evil." - Microsoft
  21. suffix mapping by graveyhead · · Score: 2

    It seems that a great deal of these attacks are based upon the fact that file names are passed as CGI arguments. This is dumb. First of all, it causes your URL's to be unnecessarily ugly. Second, if one uses suffix mapping (e.g. in Apache), the URL is checked by the web server before being sent to a CGI type process. The upshot is that only files that live in the htdocs "sandbox" can be accessed. For example, http://www.davesresume.net/resume.xml points to the "/resume.xml" file in my web root. Go ahead and try "http://www.davesresume.net/../resume.xml" and you get a 404. The .xml extension is mapped to Apache Cocoon, my xml processor of choice, and there is no exploit opportunity unless I explicitly open one up with some other CGI code. Since I don't need any other file context, this type of attack is not a problem.

    --
    std::disclaimer<std::legalese> sig=new std::disclaimer; sig->dump(); delete sig;
  22. I did a worm blocker by certsoft · · Score: 2, Interesting
    Must of have been a week or two ago. I was trying to debug some LAN activity that only occurs at midnight on a custom system here. I have a log of TCP activity but it was filled with worm activity by the time I looked at it in the mornings.

    Based on the activity I detected I set the software up to look for a GET using any of the following substrings: SCRIPTS MSADC WINNT ADMIN.DLL _VTI_BIN and _MEM_BIN. If found then the requestor's IP address got added to a list. Anytime the TCP stack saw a SYN request from one of these addresses it just ignored it instead of starting the handshake. So far it has blocked 75 IP addresses and my log files are now pretty pristine.

    1. Re:I did a worm blocker by Anonymous Coward · · Score: 0

      And now your TCP stack is going to bog down doing lookups like mad every time you get incoming connections.

    2. Re:I did a worm blocker by merlin_jim · · Score: 1

      If you're using a Windows server and you have a small operation where edits are done on your server, as opposed to in a seperate development environment, then it isn't as easy as that.

      _vti_bin is used by frontpage when it connects to the web server to edit. So is admin.dll.

      Scripts is used by Interdev; a lot of the code that the design time controls and scriplets depend on is in there

      _mem_bin is Site Server 3.0's membership files. If you've written your own login / error handling code for this, then you should DEFINITELY block access to it. Problem is, you can't just delete the folder; even when you write your own code, it still needs access to this folder.

      Argh. Don't you love Windows?

      --
      I am disrespectful to dirt! Can you see that I am serious?!
  23. Most are arguments for good sandboxes by doug_wyatt · · Score: 2

    Most of these attacks are aiming to get the web server to do something it shouldn't be doing in any case. This is a good argument for running it in a solid sandbox. There are many ways of doing this (VM's and chroot'ing are some simple mechanisms, there are numerous more robust mechanisms), so that even if the web server were exploited, it would be unable to perform malicious actions on behalf of the attacker. This is not to say that you shouldn't attempt to write robust server code, but to put all of your security eggs in the basket of your request parser is a dangerous idea.

  24. Forgot & by curunir · · Score: 1

    Just off the top of my head, they forgot exploits involving the '&' character (or its hex encoding). I've seen this one used in much the same way as the ';' (basically, to execute an extra command in UNIX).

    --
    "Don't blame me, I voted for Kodos!"
  25. Re:Garbage requests, me too by drDugan · · Score: 2

    I agree

    I would go one step further. I would like an apache module that can recognize requests for certain resources, like

    /scripts/root.exe?/c+dir
    /c/winnt/system32/cmd.exe?/c+dir
    /scripts/..%c0%af../winnt/system32/

    etc.

    and then just add that ip immediately to 127.0.0.1 without writing anything to access or error logs.

    ... as long as we're wishing...

  26. Thanks and (yet another) question by Embedded+Geek · · Score: 1
    Thanks for the response, everyone. I'm used to using TFTP in an embedded environment (no surprise, given my handle). I'd assumed the full standard supported accounts/passwords and we just ran it with 'em off - I should've thought it through. I guess the "Tivial" in TFTP is well earned.

    I was wondering if you could block the port on TFTP, thus locking it out entirely, so I dug out my copy of Stevens, Volume I and skimmed the chapter on TFTP. The thing is, I see no mention of a port at all in this chapter. Am I just missing it or are ports a TCP concept (while TFTP runs UDP/IP)? Regardless of that, though, how do you defend against the use of TFTP in this manner?

    Thanks again.

    --

    "Prepare for the worst - hope for the best."

    1. Re:Thanks and (yet another) question by Anonymous Coward · · Score: 0

      Your name is Embedded Geek and you're using TFTP in an embedded environment! HOLY FUCK THAT'S IRONY LADIES AND GENTLEMEN!!!! FUCK FUCK!!!!

    2. Re:Thanks and (yet another) question by Anonymous Coward · · Score: 0

      Simple: don't run a tftp server. By the way, tftp is on UDP port 69.

    3. Re:Thanks and (yet another) question by t0j0 · · Score: 1

      In NT DOS prompt you can find this by typing this command

      type C:\WINNT\system32\drivers\etc\services | find "tftp"

  27. URLSCAN by Dego · · Score: 2, Informative

    Microsoft has a free tool that uses a text config file that allows for the rejection of http requests based on fingerprints. Check here if you are interested. Works pretty well.

    --
    you can't ack before you balls.. you just .. can't preemptively ack a balls
    1. Re:URLSCAN by dbCooper0 · · Score: 1
      I downloaded your suggested M$ tool, and as it was opened, it said "Stopping IIS (yada yada)" and then "Starting IIS (yada yada)", but I have IIS turned off (ever since the inception of Code Red v.1) because I don't need a web server here on my cable box, although I turn it on (on an alternate port) when I have a need to test something.

      Good news is, it didn't start IIS despite the fact it was disabled in my services applet.

      kewl. Thanks for the link - I'll dabble about with it when I have time.

      --
      db
      Cig:
      ôô
      /`
    2. Re:URLSCAN by DecoDragon · · Score: 1

      There is a conversation on the NTBugtraq mailing list (http://www.ntbugtraq.com) in the last few days about modifying the config file for URLScan. Apparently, there is a problem when using the default settings and a deny posture, that if someone make a request to http://www.insertthennameofyourwebsitehere.com/ , the program will consider / to be the file extension and not allow the connection. A couple of people have posted sample ini files that will fix this problem and apparently some others they found in testing.

    3. Re:URLSCAN by Dego · · Score: 1

      i didna know that. I need to update my config I guess..... :P

      --
      you can't ack before you balls.. you just .. can't preemptively ack a balls
  28. AFTER THE FACT by ackthpt · · Score: 1
    AFTER THE FACT.

    Ok, sooooo, maybe we can enlist the aid of The Great Carnac? I'm not certain the writers of worms and perpetrators of DoS attacks are leaving their plans, hermetically sealed, on Funk and Wagnell's front porch.

    Part of fighting an attack is certainly building a more attack resistant mechanism, but keep in mind that the ingenuity of the perpetrators is eventually their undoing, as attacks will have to become more and more sophisticated (except where gaping holes like those in a certain monopolies products are left in througn lack of ordinary foresight) as many aspects of the internet, as well as operating systems and applications get stronger.

    --

    A feeling of having made the same mistake before: Deja Foobar
    1. Re:AFTER THE FACT by gmplague · · Score: 1

      Ok, first off, I really do think that we need to catalog these worms, but it doesn't seem useful to me to have 50,000+ slashdot readers cataloging the same vulnerability. Second, the best way to secure a system is to write secure code. Although many of these attacks are original and new, most of them could be avoided if programmers just learned some secure coding practices (eg. not using strcpy(), I swear, that must account for 90% of root compromises) Also, maybe sysadmins should pay a little more attention to keeping their system secure. Set up your system securely to begin with, and then it's not that hard to check securityfocus.com once a day to see if there are new vulnerabilities in the daemons that you run. If there are, install the patch. It's that simple, really.

      --
      __________________________________________
      Take comfort in your ignorance.
      Grandmaster Plague
    2. Re:AFTER THE FACT by kaimiike1970 · · Score: 0, Offtopic

      I think that saying 50,000 readers is being charitable. There are more like 12 readers, 20,000 skimmers, and 29,988 trolls.

      --


      Do a google search before posting.
    3. Re:AFTER THE FACT by ackthpt · · Score: 1

      The worst thing, IMHO, is that large projects create large vulnerabilities. For example, a.c is secure, b.c is secure, but a and b together are not secure. Spread that across any large project and you'll get more flaws than you can shake a 9/16" debugging tool at.

      --

      A feeling of having made the same mistake before: Deja Foobar
  29. Where are the non-stupid attacks? by Anonymous Coward · · Score: 0

    From the title, I had sort of expected it to be a list of ways to recognize the major worms. My server log is full of NNNNNNNNNNNN and XXXXXXXXXXX and similar; it would be sort of cool to be able to go through and say, 'Oh, yes, that's Code Red, this one's Nimda, there's a Code Red ]['. Instead, the document basically says, 'Well, if your Web server is incredibly badly implemented, it might randomly execute commands that people pass in as query strings, and that would be bad; and buffer overflows happen too but they're beyond the scope.' Snore. Tell me something I don't already know, and show me how to recognize the attacks I'm actually being hit with hundreds of times per day. The attacks in this document are neither common, nor plausibly threatening.

  30. Re: Port 80 scans by Clived · · Score: 1

    I have been getting a ton of port 80 scans on my Linux box ( I don't use a webserver like Apache), but it seems that half the infected boxes on the planet are probing mine. I run Portsentry for protection so all the port 80 scans are blocked by the script and logged in my syslog. I have even written a few of the ISP's where their clients with infected boxes were scanning. Some even responded politely *grin*

    My two bits

    --
    Clive DaSilva Email: clive.dasilva@gmail.com Ubuntu 18.10 Kernel 4.18
  31. Partial solution for log trash by wytcld · · Score: 5, Informative
    Here's how to get part way there (in this case for Nimda). In httpd.conf:

    SetEnvIf Request_URI "cmd\.exe" ATTACK
    SetEnvIf Request_URI "root\.exe" ATTACK
    CustomLog /www/logs/access_log common env=!ATTACK
    CustomLog /www/logs/attack_log common env=ATTACK

    <Location />
    Order Allow,Deny
    Allow from all
    Deny from env=ATTACK
    ErrorDocument 403 "
    </Location>

    And then optionally for individual bad directories:

    <Location /scripts/>
    Deny from all
    ErrorDocument 403 "
    </Location>

    At this point requests for cgi.exe are not being logged in access_log but only attack_log (leave out the attack_log line if you don't want even that much). They'll still show in error_log (but with a shorter error statement). The ErrorDocument line instructs Apache to send back nothing and just drop the connection - not as nasty as a tar pit, but at least you don't waste outgoing bandwidth, generally tighter than incoming for a Webserver. Also, Apache doesn't waste any time checking the file system on these requests, since the rules preclude that.

    --
    "with their freedom lost all virtue lose" - Milton
    1. Re:Partial solution for log trash by Tassach · · Score: 2
      You also need to add:

      CustomLog /www/logs/error_log common env=!ATTACK

      If you want to avoid a "client denied by server configuration" message in your error_log. I also added SetEnvIf rules for "WINNT" and "system32" for some extra paranoia.



      Other than those minor modifications, your config changes are supurb! I just added it to my web server and it took less than 30 seconds for the new rules to be triggered. Works like a charm. Thanks a lot :-)

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
    2. Re:Partial solution for log trash by Tassach · · Score: 1

      My modification for the error log does not appear to work... must consult the documentation again.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
  32. Freshmeat.net is a good resource. by GISboy · · Score: 3, Interesting

    Among the utilites mentioned like snort, no one has hit on the actual fingerprinting utilities out there like nmap, nbtscan and something like portsentry.

    I forget off the top of my head if portsentry has scriptable events, if it does then the possibility of having a "guarddog" type box would be interesting.

    For instance, if attack is detected portsentry and it does its thing by putting the offending adderss in /ect/hosts.deny and rereads hosts.deny and passes the address off to nmap or nbtscan to figure out what the box is running.

    Nothing beats calling up an ISP and saying "you have a windows/linux/whatever box probing for webservers/mailservers/(insert service) and is attempting to execute a vulnerability of that service".

    Nmap and Nbtscan are excellent utilities, but from using them and playing around, nmap is more of a discovery tool, nbtscan is more of a retalitory tool. Or, at the very least they both can be used as such.
    I know from personal experience that nbtscan's default setting (normal, aggressive, insane) is enough to knock a box off of a network.
    I scanned my cable modem...had to power down to get back up and knocked my boss off even with his knowledge...only a complete power down would bring the box back on the network.

    If you can have a "honeypot" why not a "watchdog" box for computer security?
    Has the "security/watchdog" been done before?

    --
    If it is not on fire, it is a software problem.
    1. Re:Freshmeat.net is a good resource. by aredubya74 · · Score: 1
      Nothing beats calling up an ISP and saying "you have a windows/linux/whatever box probing for webservers/mailservers/(insert service) and is attempting to execute a vulnerability of that service".

      Actually, one thing does beat that: when you call the ISP's tech support to report it, the person on the other end of the line asks you, "What's probing? What's a web server? What's Linux? These aren't on my script? Have you rebooted your cable modem?"

      Sorry, was channelling a little bit of tech support rage. I feel much better now :)

      --

      RW

    2. Re:Freshmeat.net is a good resource. by hardcode · · Score: 1

      Nothing beats calling up an ISP...

      Nothing beats finding a system like that and then "attacking" it by hitting it with spoofed packets pretending to be an attack, lets see how long it'd stand up to a) the load and b) the fact that it is blackholeing itself from all those fake IP addresses

    3. Re:Freshmeat.net is a good resource. by underpaidISPtech · · Score: 2

      up yours ;)

  33. Good article by tuxlove · · Score: 1

    This paper on general web server vulnerabilities is quite good for those of you who would like to know the basics of what to look for in an attack on your web server. Covers the fundamentals well enough to give anyone an idea of how to detect if someone's trying to compromise your web server. If you're just reading (or writing) comments here and you haven't read it yet, go back now and do so!!

  34. hax0r bait... by EccentricAnomaly · · Score: 1

    how about this... a 'virtual machine' as cracker bait...

    set up a cgi program that fakes being a vulnerable system just to see what sort of attacks you get... call it 'perl', 'sh', or something especially enticing... and set up a fake file system for the hacker to explore, fake log files for them to modify, etc

    this would be kind of like writing a text adventure game. you could put several fake encrypted files that are just random strings of characters..

    --
    There are 10 types of people in this world, those who can count in binary and those who can't.
  35. Informative? by jiheison · · Score: 1

    That article doesn't cover too many port 80 exploits.

    Nor does yours.

    This discussion is about fingerprinting exploits. The article you reference discusses fingerprinting servers. Big difference.

  36. port 80 - number 1 by Anonymous Coward · · Score: 0

    Its about time for something like this. Just check dshield.org... port 80 attacks are #1 ever since Code Red 1

  37. Answers. by mindstrm · · Score: 3, Informative

    TFTP is udp based. Yes there are ports.
    It runs on udp port 69.

    And, you hit the nail on the head.. embedded systems.
    tftp is 'trivial' so it can be used for bootstrapping systems. The protocol is as simple as it could possibly be (but not fast nor efficient network wise).
    It was designed so it could be implemented with very little code in order to bootstrap systems.

    Given that.. it really has no reason to be enabled at all in most modern systems.
    The only uses I've used it for recently are:
    booting diskless clients
    cisco router configuration files
    embeded systems work

  38. Realistically. by mindstrm · · Score: 2

    As an admin.. I often DONT CARE. I don't want a report every time someone tries some IIS exploit against my apache server. I dont' want to waste my own resources tracking and logging this.

    Sure, more information is better.. but.. I'm just not at risk.

    You make your servers secure, and then you forget about it. You keep on top of new vulnerabilities.... but seriously folks.

    Why should I care one bit whether some code-red worm tried to exploit apache thinking it was IIS? I'm immune, it's not relevant to me.

    Now.. knowing what goes on in a network in general, yes, that's important. Run snort or something.. keep an eye on traffic coming in/out of your net

    But get real. There are better, more productive things to spend time on.

    1. Re:Realistically. by Fizzlewhiff · · Score: 1

      Actually the majority of those exploits documented were for web servers running under *nix. Don't just assume that an article on web exploits would be aimed at IIS.

      --

      'Same speed C but faster'
    2. Re:Realistically. by Tassach · · Score: 2
      Why should I care one bit whether some code-red worm tried to exploit apache thinking it was IIS? I'm immune, it's not relevant to me.

      Even though you are immune to infection, it doesn't mean you don't have anything to worry about. If you are just admining a single home-based hobby server, you probably don't have anything else to worry about. But suppose you admin a unix machine in a big business; you run Samba so you can share files between your Unix box and all those M$ boxen that are somebody else's problem. If one of those M$ boxen gets compromised, now you DO have a problem, especially if you are using DOMAIN security and the PDC is the one that got hit. Even if the windoze boxen are not your responsibility, they can still impact you.


      Even if you only have one box hanging off a cable modem, IIS-specific attacks SHOULD worry you. Just because a potential attacker is being clueless now doesn't mean he won't develop a clue later. If you see a bunch of suspicious activity coming from an address, you should definately be paying more attention to anything else that comes from that address in the future. The fact that it's infected with a worm is an indication that it's not being administered properly. Some clueful hacker could take that infected system and use it as a jumping off point to do somthing that COULD hurt you.

      --
      Why is it that the proponents of "one nation under God" are so eager to get rid of "liberty and justice for all"?
  39. Snort by TV-SET · · Score: 2, Informative
    All these reminds me of a good old snort - http://www.snort.org

    --
    Leonid Mamtchenkov ...i don't need your civil war...
  40. fingerpritning by preventing by Anonymous Coward · · Score: 0

    like nomoreRed kind of does, to prevent access if they hit a particular fingerprint?

  41. What to do after attack? by Tazzy531 · · Score: 4, Informative

    A lot of people here have been asking what people should do after they are attacked. Here is an article/guideline for procedures on recovering after an attack. These steps include information on saving logs, documenting everything that you do after the attack, the type of evidence needed to prosecute, and who to contact (FBI, local police, etc) But as always..the best policy is to secure the system so that attacks don't happen.

    --


    _______________________________
    "I'm not Conceited...I'm just a realist..."
  42. Slight problem of Trust by dmearns · · Score: 1

    Pardon my cynicism, but can you really trust someone who thinks that
    cat access_log| grep -i ".."
    will find anything useful in the log? And why -i ???

  43. Nice, but... by Anonymous Coward · · Score: 1, Interesting

    The article does not take IIS into account, that shows because Unicode is missing, the article also miss another point: Error codes!

    Say user Foo runs cgi-scanner X against one system, without proper fingerprinting (as most lame script kiddies dont do), most scans will trigger an error because apache doesn't come with a /scripts/ directory and IIS wouldn't know what to do with an apache exploit. This will create tonnes of errors, making lame so called "cgi-scans" easy to spot.

    Apart from that, most network/security people should read the article; this is basic intrusion detection skills that should be mastered by you people, that include those apes (and that's an insult to primates!) who have those lame ass certifications.

    1. Re:Nice, but... by Anonymous Coward · · Score: 0

      apache > IIS.

      You'd have to be stupid to actually WANT to run IIS online. Look at attrition.org or defaced.alldas.de for statistics prooving my statements. Also IIS holes have some of the same characters in them. Also towards the bottom it mentions cmd.exe which most worms/people use to gain further access so your point about it not mentioning IIS is shotdown. tftp is also used in IIS worms to download copies of themselfs.

      Next time read the entire article

    2. Re:Nice, but... by Anonymous Coward · · Score: 0

      Did i say "i Want to run IIS"? Methinks not!