DMZ EGRESS
REVERSE SHELL
NON-STANDARD PORT
T1571
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting Unexpected Outbound Traffic from DMZ and Edge Hosts

A public web server almost never needs to start a connection to the internet. When one does, you are either looking at an update or at an intrusion, and the allow-list tells you which.

Scroll

Exploitation techniques vary, but a compromised edge host eventually has to talk out: to download a tool, to deliver a reverse shell or to beacon to a C2 server (T1571). DMZ and edge systems have a short, knowable list of legitimate destinations, which makes egress the best backstop when every other detection misses. Build the allow-list, log denials and alert on anything outside it.

Signals at a Glance

SignalWhereATT&CK
DMZ host connecting to an internet address that is not on its egress allow-listFirewall, flow, EDRT1071.001
Outbound connections on non-standard ports or non-HTTP protocol on a web portFirewall, Zeek, IDST1571
bash -i redirected to /dev/tcp, nc -e, or python/perl socket one-linersauditd, EDR process command linesT1059.004
curl or wget downloading files to /tmp or /dev/shm from a web accountauditd, EDRT1105
Regular, same-size connections from a server to a single external hostFlow, Zeek conn.logT1571
Edge appliance initiating connections to the internal networkFirewall, flowT1021

Egress Allow-Lists and Alerts

List what each DMZ system legitimately contacts: OS update mirrors, license servers, certificate revocation endpoints, NTP, DNS resolvers, and a handful of business partners. Everything else is denied by default and logged, and every denial from a DMZ host is a triage item. Start with a hunt over existing flow data to build the list:

// Sentinel (KQL) - DMZ hosts connecting to external addresses outside the allow-list
let dmz = dynamic(["192.0.2.0/24"]);          // tune/validate: replace with your DMZ ranges
let allowed = dynamic(["203.0.113.10", "203.0.113.20"]);   // tune/validate: approved destinations
CommonSecurityLog
| where DeviceVendor in~ ("Palo Alto Networks", "Fortinet", "Check Point", "Cisco")
| where ipv4_is_in_any_range(SourceIP, dmz)
| where not(ipv4_is_private(DestinationIP))
| where DestinationIP !in (allowed)
| summarize conns=count(), dports=make_set(DestinationPort, 10), bytes=sum(SentBytes)
    by SourceIP, DestinationIP, bin(TimeGenerated, 1h)
| order by conns desc

Reverse Shells and Tool Downloads

Process telemetry catches the commands that create the egress. Sigma includes rules for the common reverse-shell idioms, and they work well on web tier hosts where interactive shells are unusual:

title: Reverse Shell One-Liner on Web Tier Host
logsource:
  category: process_creation
  product: linux
detection:
  bash_tcp:
    CommandLine|contains|all:
      - 'bash'
      - '/dev/tcp/'
  netcat:
    CommandLine|contains:
      - 'nc -e '
      - 'ncat -e '
      - 'nc.traditional -e '
  script:
    CommandLine|contains|all:
      - 'socket'
      - 'connect'
      - 'subprocess'
  condition: bash_tcp or netcat or script
level: high
# Tune/validate: scope to web tier hosts to keep false positives near zero.
Vetted sources

Use SigmaHQ reverse-shell and download-tool rules, Elastic network and process rules for web server hosts, Splunk ESCU analytics for unusual outbound traffic, and CISA guidance on network segmentation and egress control. Baseline your own environment: patching, license checks and monitoring agents all create outbound traffic that must be allow-listed before alerts are useful.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026