An outbound connection is a network connection initiated from a local host toward a remote destination. During threat hunting, outbound traffic from a compromised web server can connect decoded attacker commands to external infrastructure. section 4.2.3
Investigate outbound connections by:
- Searching cloud firewall logs for TCP destinations on ports 80 and 443 within a narrow window around suspicious web access. section 4.2.3
- Grouping events by source IP, destination IP, and destination port to expose connection counts and affected hosts. section 4.2.3
- Expanding the time window and filtering known destination indicators to identify reconnects and later activity. section 4.2.3
Correlating web-shell commands
A web-server node connected to 34.125.53.119 on TCP/80 after downloading project-plan, then connected repeatedly to 34.152.29.228 while executing it with a shell and reconnect option. section 4.2.3
Listing 4.17 Searching cloud firewall logs for outbound connections on TCP/80 or 443
sourcetype=gcp:firewall | src_ip := rename(jsonPayload.connection.src_ip) | dest_ip := rename(jsonPayload.connection.dest_ip) | dest_port := rename(jsonPayload.connection.dest_port) | disposition := rename(jsonPayload.disposition) | src_ip=10.154.0.* AND (dest_port=80 OR dest_port=443) | groupby(field=[src_ip, dest_ip, dest_port], function=count()) | sort(field=_count, order=desc)
Use the Humio query to search cloud firewall logs for outbound TCP/80 and TCP/443 traffic from the Kubernetes nodes. section 4.2.3
