Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may disable or modify system firewalls in order to bypass controls limiting network usage.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 189% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 118% | 0% |
| case-17 | ✓→✓ | = Same ✓ | 43% | 0% |
> Sub-technique of: T1562
Adversaries may disable or modify system firewalls in order to bypass controls limiting network usage. Changes could be disabling the entire mechanism as well as adding, deleting, or modifying particular rules. This can be done numerous ways depending on the operating system, including via command-line, editing Windows Registry keys, and Windows Control Panel.
Modifying or disabling a system firewall may enable adversary C2 communications, lateral movement, and/or data exfiltration that would otherwise not be allowed. For example, adversaries may add a new firewall rule for a well-known protocol (such as RDP) using a non-traditional and potentially less securitized port (i.e. Non-Standard Port).
Adversaries may also modify host networking settings that indirectly manipulate system firewalls, such as interface bandwidth or network connection request thresholds. Settings related to enabling abuse of various Remote Services may also indirectly modify firewall rules.
In ESXi, firewall rules may be modified directly via the esxcli command line interface (e.g., via esxcli network firewall set) or via the vCenter user interface.
Platforms: ESXi, Linux, macOS, Network Devices, Windows
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Disables the Microsoft Defender Firewall for the current profile. Caution if you access remotely the host where the test runs! Especially with the cleanup command which will re-enable firewall for the current profile...
Supported Platforms: windows
cmdnetsh advfirewall set currentprofile state off
Disables the Microsoft Defender Firewall for the public profile via registry Caution if you access remotely the host where the test runs! Especially with the cleanup command which will re-enable firewall for the current profile...
Supported Platforms: windows
cmdreg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\PublicProfile" /v "EnableFirewall" /t REG_DWORD /d 0 /f
Allow all SMB and RDP rules on the Microsoft Defender Firewall for all profiles. Caution if you access remotely the host where the test runs! Especially with the cleanup command which will reset the firewall and risk disabling those services...
Supported Platforms: windows
cmdnetsh advfirewall firewall set rule group="remote desktop" new enable=Yes netsh advfirewall firewall set rule group="file and printer sharing" new enable=Yes
This test creates a listening interface on a victim device. This tactic was used by HARDRAIN for proxying.
reference: https://www.us-cert.gov/sites/default/files/publications/MAR-10135536-F.pdf
Supported Platforms: windows Elevation Required: Yes
cmdnetsh advfirewall firewall add rule name="atomic testing" action=allow dir=in protocol=TCP localport=450
This test will attempt to open a local port defined by input arguments to any profile
Supported Platforms: windows Elevation Required: Yes
powershellnetsh advfirewall firewall add rule name="Open Port to Any" dir=in protocol=tcp localport=#{local_port} action=allow profile=any
If Atomic Red Team tests are not applicable, manually verify the technique by:
Routinely check account role permissions to ensure only expected users and roles have permission to modify system firewalls.
Ensure proper user permissions are in place to prevent adversaries from disabling or modifying firewall settings.
Ensure proper Registry permissions are in place to prevent adversaries from disabling or modifying firewall settings.
Ensure proper process and file permissions are in place to prevent adversaries from disabling or modifying firewall settings.
| Finding | Severity | Impact | | ------------------------------------------------------ | -------- | --------------- | | Disable or Modify System Firewall technique applicable | Low | Defense Evasion |
| CWE ID | Title | | ------- | ---------------------------- | | CWE-693 | Protection Mechanism Failure |
Other measured skills in the registry, with their headline benchmark lift.