T1562.013 Google Chronicle · YARA-L

Detect Disable or Modify Network Device Firewall in Google Chronicle

Adversaries may disable network device-based firewall mechanisms entirely or add, delete, or modify particular rules in order to bypass controls limiting network usage. Modifying or disabling a network firewall may enable adversary C2 communications, lateral movement, and/or data exfiltration that would otherwise not be allowed. For example, adversaries may add new network firewall rules to allow access to all internal network subnets without restrictions. Adversaries may gain access to the firewall management console via Valid Accounts or by exploiting a vulnerability. In some cases, threat actors may target firewalls that have been exposed to the internet. This technique was used by APT38 to create firewall exemptions on specific ports, and by threat actors exploiting Fortinet FortiGate vulnerabilities (CVE-2024-55591) to modify firewall rules before deploying LockBit ransomware.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1562 Impair Defenses
Sub-technique
T1562.013 Disable or Modify Network Device Firewall
Canonical reference
https://attack.mitre.org/techniques/T1562/013/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule t1562_013_disable_modify_network_device_firewall {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects disabling or modification of host-based and network device firewalls via command-line utilities and network device policy changes. Covers T1562.013 including APT38 and FortiGate exploitation patterns."
    mitre_attack_tactic = "Defense Evasion"
    mitre_attack_technique = "T1562.013"
    severity = "HIGH"
    priority = "HIGH"

  events:
    (
      $e.metadata.event_type = "PROCESS_LAUNCH"
      and (
        re.regex($e.target.process.command_line, `(?i)netsh\s+(advfirewall|firewall)`) or
        re.regex($e.target.process.command_line, `(?i)(Set-NetFirewallProfile|New-NetFirewallRule|Remove-NetFirewallRule|Disable-NetFirewallRule|Set-NetFirewallRule)`) or
        re.regex($e.target.process.command_line, `(?i)iptables\s+(-F|-P\s+INPUT\s+ACCEPT|-P\s+FORWARD\s+ACCEPT|-D)`) or
        re.regex($e.target.process.command_line, `(?i)ufw\s+disable`) or
        re.regex($e.target.process.command_line, `(?i)nft\s+(flush\s+ruleset|delete)`) or
        re.regex($e.target.process.command_line, `(?i)firewall-cmd.*--permanent.*--add-port`)
      )
    )
    or
    (
      $e.metadata.event_type = "NETWORK_UNCATEGORIZED"
      and $e.metadata.vendor_name in nocase ("Fortinet", "Palo Alto Networks", "Cisco", "Check Point")
      and re.regex($e.metadata.description, `(?i)(policy|rule|access-list|security-policy|firewall)`)
      and re.regex($e.metadata.description, `(?i)(delete|disable|modify|create|permit\s+any|action\s+accept)`)
    )
    or
    (
      $e.metadata.event_type = "STATUS_UPDATE"
      and re.regex($e.metadata.description, `(?i)(firewall rule|config firewall policy|policy delete|rule delete|permit any any)`)
      and re.regex($e.metadata.description, `(?i)(delete|disable|modify|removed|modified)`)
    )

  condition:
    $e
}
high severity medium confidence

Chronicle YARA-L 2.0 rule detecting T1562.013 — Disable or Modify Network Device Firewall. Matches PROCESS_LAUNCH events for host-based firewall command manipulation (netsh, PowerShell cmdlets, iptables, ufw, nft) and NETWORK_UNCATEGORIZED/STATUS_UPDATE events from network security vendors for device-level policy changes. Used by APT38 and FortiGate ransomware pre-deployment activity.

Data Sources

Chronicle UDM process events from endpoint sensorsChronicle ingested network device syslogs (Fortinet, Palo Alto, Cisco, Check Point)Google Chronicle SecOps normalized log pipeline

Required Tables

UDM events with event_type = PROCESS_LAUNCHUDM events with event_type = NETWORK_UNCATEGORIZEDUDM events with event_type = STATUS_UPDATE

False Positives & Tuning

  • Authorized firewall rule deployments via GPO or endpoint management platforms — cross-reference with expected change management windows in Chronicle context
  • VPN or endpoint agent installations adding firewall rules via PowerShell as part of legitimate software deployment
  • Network operations team modifying ACLs on perimeter firewalls — expected to appear in Fortinet/Cisco/PAN logs with known source management IPs
Download portable Sigma rule (.yml)

Other platforms for T1562.013


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Disable Windows Firewall via netsh

    Expected signal: Sysmon Event ID 1: Process Create with Image=netsh.exe, CommandLine='advfirewall set allprofiles state off'. Windows Firewall Event ID 2003: Profile changed (all profiles disabled). Security Event ID 4688 with command line auditing. DeviceProcessEvents in MDE.

  2. Test 2Add Allow-Any Inbound Firewall Rule via netsh

    Expected signal: Sysmon Event ID 1: Process Create with CommandLine containing 'add rule' and 'action=allow'. Windows Firewall Event ID 2004: New rule added. DeviceProcessEvents in MDE with full command line details.

  3. Test 3Flush Linux iptables Rules

    Expected signal: Syslog and/or Sysmon for Linux process creation events for iptables with -F, -P INPUT ACCEPT, and -P FORWARD ACCEPT arguments. Linux audit events (SYSCALL) for the iptables binary execution. The network exposure is immediate.

  4. Test 4Disable UFW Firewall on Linux

    Expected signal: Syslog entry for 'ufw disable' command. Process creation event for the ufw binary. Systemd journal entry for the ufw service state change. Sysmon for Linux (if installed) Event ID 1 for process creation.

Unlock Pro Content

Get the full detection package for T1562.013 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections