home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / unix / libcirce.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  1.8 KB  |  51 lines

  1. Mime-Version: 1.0
  2. Content-Type: text/plain; charset=US-ASCII
  3. Content-Transfer-Encoding: 7bit
  4. Content-Length: 1694      
  5. Sender: owner-linux-security@tarsier.cv.nrao.edu
  6. Precedence: list
  7. Status: RO
  8.  
  9. Several posts have been made concerning the libc bug being exploited
  10. through ircII clients. This is what I have been able to figure out
  11. so far:
  12.  
  13. The bug is *not* in the irc clients, but in libc's atoi() function,
  14. which lacks the correct bounds checking. As far as I know, this bug
  15. is present in all libc versions after 5.0.0, and was finally fixed
  16. in version 5.3.12.
  17.  
  18. The exploit script that has been circulated, screw.irc, was *never*
  19. able to provide a shell through the client as far as I can tell.
  20. I studied the code, and except for some initial pointers, it turns
  21. out to be exactly the same as what was used in egg.c, the exploit
  22. for the splitvt bug that most of you will remember. Someone probably
  23. put it in there to see if this caused the same kind of vulnerability.
  24.  
  25. *NOTE* None of this code has to be present to be able to crash the
  26. client! In fact, it is sufficient to send a DCC send or chat command
  27. with a second argument long enough to overflow atio()'s buffer. The
  28. limit appears to be 199 characters -- everything above that will
  29. cause a segmentation fault and exit the client. Thus,
  30.    /ctcp <nick> dcc send duh <200 0's> 0
  31. and
  32.    /ctcp <nick> dcc chat chat <200 0's> 0
  33. will both crash the client.
  34.  
  35. The second argument is only supposed to consist of no more than 10
  36. digits, so writing a script to prevent this hack is simple:
  37.  
  38. /on ^raw_irc "% PRIVMSG % *DCC % % ???????????* *" {
  39.    echo Possible libc bug exploit received in DCC $4 from $0
  40. }
  41.  
  42. This will prevent DCC requests with a second argument of 11 characters
  43. or more from being processed by ircII, and should do the trick if you
  44. happen to be too lazy to update libc.
  45.  
  46.  
  47. .../zarq
  48.  
  49. Runar Jensen  [zarquon@popalex1.linknet.net]
  50.  
  51.