π‘ICMP Tunneling with ptunnel-ng
π Module Overview
1. Introduction to ICMP Tunneling
What is ICMP Tunneling?
How ICMP Tunneling Works
[Internal Host] β [Firewall] β [External Server]
ICMP Echo Req Allows Ping ptunnel-ng Server
Data in Payload No Deep Insp Extracts Data
SSH/TCP Traffic Passes Through Forwards to TargetICMP Tunneling Use Cases
ICMP vs Other Tunneling Protocols
2. ptunnel-ng Overview
What is ptunnel-ng?
ptunnel-ng Architecture
Key Features
3. Installation and Setup
Method 1: Git Clone and Build
Clone Repository
Install Build Dependencies
Compile Standard Binary
Compile Static Binary (Recommended)
Method 2: Cross-Compilation for x86_64
For ARM64 Host (M1/M2 Kali)
Architecture Compatibility Issues
4. Server Setup (Pivot Host)
Transfer Binary to Pivot Host
Method 1: SCP Transfer
Method 2: Compile on Target
Start ptunnel-ng Server
Basic Server Configuration
Server Parameters Explanation
Common Server Issues
5. Client Setup (Attack Host)
Connect to ptunnel-ng Server
Basic Client Connection
Client Parameters Explanation
Test ICMP Tunnel
SSH Through ICMP Tunnel
Verify Tunnel Statistics
6. Advanced Usage - Dynamic Port Forwarding
SSH Dynamic Port Forwarding
Setup SOCKS Proxy Through ICMP
Configure Proxychains
Network Scanning Through ICMP Tunnel
Proxychains + Nmap
Service Enumeration
7. HTB Academy Lab Exercise
Lab Challenge
Lab Environment
Complete Lab Solution
Step 1: Setup ptunnel-ng on Attack Host
Step 2: Transfer to Pivot Host
Step 3: Start Server on Pivot Host
Step 4: Connect Client from Attack Host
Step 5: Test ICMP Tunnel
Step 6: Setup Dynamic Port Forwarding
Step 7: Configure Proxychains
Step 8: Scan Internal Network
Step 9: RDP to Domain Controller
Step 10: Retrieve Flag
Lab Solution Summary
8. Network Traffic Analysis
Wireshark Analysis
Normal SSH Traffic
ICMP Tunneled SSH Traffic
Traffic Characteristics
Detection Signatures
9. Troubleshooting
Common Issues
Architecture Mismatch
Permission Issues
Connection Issues
Performance Issues
10. Operational Security (OPSEC)
Stealth Considerations
Detection Evasion
Network Monitoring Evasion
11. Integration with Other Techniques
Multi-hop ICMP Tunneling
ICMP + SSH Port Forwarding
ICMP + Metasploit
12. Alternative ICMP Tunneling Tools
Tool Comparison
When to Use ICMP Tunneling
Limitations
References
Last updated