Multi-Layer Network Penetration Methodology
⛔ Further Reading (Must Read)
- frp/chisel/Neo-reGeorg/SSH tunnel configuration commands, multi-hop proxy chains, proxychains usage → references/tunnel-tools.md
Phase 1: Perimeter Breach and Foothold
Once you have a shell on a DMZ host, collect network information immediately:
ip addr && ip route && arp -a && cat /etc/hosts # Linux
ipconfig /all && route print && arp -a # Windows
Key Decision:
- Dual NICs (eth0=external, eth1=10.x.x.x) → a natural pivot
- Internal IP only → set up a reverse tunnel
Target Network Mapping
for i in $(seq 1 254); do ping -c 1 -W 1 10.0.0.$i &>/dev/null && echo "10.0.0.$i alive"; done
fscan -h 10.0.0.0/24 -nopoc
Phase 2: Tunnel Selection Decision Tree
Can the target reach the Internet?
├─ Outbound access available (external network reachable)
│ ├─ SSH credentials available? → SSH -D 1080 (zero deployment, simplest)
│ ├─ Need long-term stability? → frp (auto-reconnect)
│ └─ Need rapid deployment? → chisel (single binary)
├─ HTTP-only outbound → Neo-reGeorg HTTP tunnel
└─ No outbound access at all → SSH reverse tunnel / relay through the pivot host
See → references/tunnel-tools.md for the detailed configuration commands of every tool
Tunnel Tool Selection Quick Reference
| Scenario |
Recommended Tool |
Rationale |
| SSH credentials available |
SSH tunnel |
Zero deployment, simplest |
| Outbound access + long-term use |
frp |
Most stable, supports auto-reconnect |
| Outbound access + rapid deployment |
chisel |
Single binary, no config file |
| HTTP-only outbound |
Neo-reGeorg |
HTTP tunnel crosses firewalls |
| High performance required |
ligolo-ng |
TUN interface, near-native performance |
Phase 3: Deep Penetration
Once you are inside the internal network through the proxy, proceed in priority order:
- Internal network reconnaissance
- Domain environment attacks
- Credential spraying
- Lateral movement
Notes
- proxychains only supports TCP, not ICMP (ping is unavailable, use
-Pn -sT with nmap)
- After the tunnel is established, test connectivity with
proxychains curl before running large-scale scans
- Tunnel processes break easily — use
autossh or frp auto-reconnect to keep them stable
- Record the credentials and tunnel command for every hop so the path can be rebuilt
Proxychains Limitations
- No UDP support: proxychains only proxies TCP, so UDP scans (-sU) will fail
1---2name: multi-layer-network3description: "Multi-layer network penetration and tunnel setup. Use when pivoting from a DMZ foothold into the internal network, penetrating across network segments, or when the target sits behind multiple firewalls and network zones. Covers proxy setup (frp/chisel/SSH), multi-hop tunnel chains, port forwarding, and SOCKS proxies. The complete multi-layer attack path from perimeter breach to domain controller"4zh-signals: "多层网络渗透与隧道搭建,从 DMZ 立足点穿透防火墙进入内网。信号:内网穿透,隧道,代理,frp,chisel,横向移动"5when-to-use: >-6 Use when pivoting from a DMZ foothold across network segments, or when the target sits7 behind multiple firewalls and requires tunnels, port forwarding, or SOCKS proxies.8metadata:9 source: https://skillmd.com/skills/dangeroussong/multi-layer-network10 tags: "pivot,proxy,tunnel,multi-layer,lateral,tunneling,proxy,port-forwarding,frp,chisel,ssh,socks,internal-network-pivoting,pivot-host,DMZ"11 category: "lateral"12---1314# Multi-Layer Network Penetration Methodology15- 攻击大类:C31 远程服务横向移动1617## ⛔ Further Reading (Must Read)1819- frp/chisel/Neo-reGeorg/SSH tunnel configuration commands, multi-hop proxy chains, proxychains usage → [references/tunnel-tools.md](references/tunnel-tools.md)2021---2223## Phase 1: Perimeter Breach and Foothold2425Once you have a shell on a DMZ host, collect network information immediately:26```bash27ip addr && ip route && arp -a && cat /etc/hosts # Linux28ipconfig /all && route print && arp -a # Windows29```3031**Key Decision**:32- Dual NICs (eth0=external, eth1=10.x.x.x) → a natural pivot33- Internal IP only → set up a reverse tunnel3435### Target Network Mapping36```bash37for i in $(seq 1 254); do ping -c 1 -W 1 10.0.0.$i &>/dev/null && echo "10.0.0.$i alive"; done38fscan -h 10.0.0.0/24 -nopoc39```4041## Phase 2: Tunnel Selection Decision Tree4243```44Can the target reach the Internet?45├─ Outbound access available (external network reachable)46│ ├─ SSH credentials available? → SSH -D 1080 (zero deployment, simplest)47│ ├─ Need long-term stability? → frp (auto-reconnect)48│ └─ Need rapid deployment? → chisel (single binary)49├─ HTTP-only outbound → Neo-reGeorg HTTP tunnel50└─ No outbound access at all → SSH reverse tunnel / relay through the pivot host51```5253See → [references/tunnel-tools.md](references/tunnel-tools.md) for the detailed configuration commands of every tool5455## Tunnel Tool Selection Quick Reference5657| Scenario | Recommended Tool | Rationale |58|------|----------|------|59| SSH credentials available | SSH tunnel | Zero deployment, simplest |60| Outbound access + long-term use | frp | Most stable, supports auto-reconnect |61| Outbound access + rapid deployment | chisel | Single binary, no config file |62| HTTP-only outbound | Neo-reGeorg | HTTP tunnel crosses firewalls |63| High performance required | ligolo-ng | TUN interface, near-native performance |6465## Phase 3: Deep Penetration6667Once you are inside the internal network through the proxy, proceed in priority order:681. **Internal network reconnaissance**692. **Domain environment attacks**703. **Credential spraying**714. **Lateral movement**7273## Notes74- **proxychains only supports TCP**, not ICMP (ping is unavailable, use `-Pn -sT` with nmap)75- After the tunnel is established, test connectivity with `proxychains curl` before running large-scale scans76- Tunnel processes break easily — use `autossh` or frp auto-reconnect to keep them stable77- Record the credentials and tunnel command for every hop so the path can be rebuilt7879## Proxychains Limitations80- No UDP support: proxychains only proxies TCP, so UDP scans (-sU) will fail