Linux Network Awareness and Interface Enumeration
Network enumeration from a shell maps the internal network the target lives on, identifies adjacent hosts, and exposes routing paths into otherwise unreachable segments. This is one of the first things to run after gaining access — the results directly feed lateral movement planning.
Network Interfaces
Look for interfaces beyond the one you connected through. Additional interfaces — eth1, ens192, tun0, virbr0, docker0 — indicate the host is multi-homed or connected to additional network segments you cannot reach directly from your attacker machine.
Static configuration files sometimes contain credentials or reveal the network architecture.
Routing Table
default via 10.10.10.1 dev eth0 10.10.20.0/24 via 10.10.10.254 dev eth0 172.16.0.0/16 dev eth1 proto kernel scope link
Additional routes reveal internal subnets the host can reach. A 172.16.0.0/16 or 192.168.x.x route that you cannot reach from outside means the target is your pivot point into that segment.
ARP Cache
The ARP cache shows hosts the target has recently communicated with — these are live, adjacent hosts. It is the fastest way to identify nearby targets without running a network scan.
Active Connections
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port tcp ESTAB 0 0 10.10.10.5:22 10.10.14.3:54132 tcp LISTEN 0 128 127.0.0.1:3306 0.0.0.0:* tcp LISTEN 0 128 0.0.0.0:80 0.0.0.0:*
LISTEN entries on 127.0.0.1 are services only reachable locally — these are covered separately in Locally Listening Services and Internal Ports. ESTABLISHED connections show active sessions, which may include admin connections from other hosts worth noting.
DNS Configuration
/etc/resolv.conf reveals the internal DNS server IP — often a domain controller in Active Directory environments. The search and domain entries give the internal domain name.
/etc/hosts may contain entries for internal hosts that are not in DNS, or may reveal hostnames of adjacent services.
Shows the resolver order. If files comes before dns, local /etc/hosts entries take priority — relevant for DNS-based lateral movement techniques.
Firewall Rules
Firewall rules show what outbound and inbound traffic is permitted. This determines which ports and protocols are viable for reverse shells, data exfiltration, and lateral movement. If outbound is restricted, you need to match an allowed port or protocol.
Network Scanning from the Host
When the host can reach internal subnets your attack machine cannot, use native tools to identify live hosts:
Replace the subnet with the one identified from routing. This is noisy but fast when no other tools are available.
If nmap is installed:
For port scanning a single internal host:
Wireless Interfaces
If wireless interfaces are present, the host may be on a separate wireless network. Wireless-specific techniques are covered in the Wireless platform section.
IPv6
IPv6 is often misconfigured or overlooked. Link-local addresses (fe80::) exist on most modern interfaces even when IPv4 is the primary network. Internal services are sometimes reachable over IPv6 even when IPv4 firewall rules block them.
Was this helpful?
Your feedback helps improve this page.