Impair Defenses: Disable or Modify System Firewall

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.

ID: T1562.004
Sub-technique of:  T1562
Tactic: Defense Evasion
Platforms: Linux, Windows, macOS
Data Sources: File monitoring, Process command-line parameters, Windows Registry
Defense Bypassed: Firewall
Version: 1.0
Created: 21 February 2020
Last Modified: 29 March 2020

Procedure Examples

Name Description
BACKSPACE

The "ZR" variant of BACKSPACE will check to see if known host-based firewalls are installed on the infected systems. BACKSPACE will attempt to establish a C2 channel, then will examine open windows to identify a pop-up from the firewall software and will simulate a mouse-click to allow the connection to proceed.[3]

BADCALL

BADCALL disables the Windows firewall before binding to a port.[6]

Carbanak

Carbanak may use netsh to add local firewall rule exceptions.[20]

DarkComet

DarkComet can disable Security Center functions like the Windows Firewall.[12][13]

Dragonfly 2.0

Dragonfly 2.0 has disabled host-based firewalls. The group has also globally opened port 3389.[18][19]

H1N1

H1N1 kills and disables services for Windows Firewall.[14]

HARDRAIN

HARDRAIN opens the Windows Firewall to modify incoming connections.[5]

HOPLIGHT

HOPLIGHT has modified the firewall using netsh.[10]

InvisiMole

InvisiMole has a command to disable routing and the Firewall on the victim’s machine.[8]

Kasidet

Kasidet has the ability to change firewall settings to allow a plug-in to be downloaded.[4]

Kimsuky

Kimsuky has been observed disabling the system firewall.[21]

Lazarus Group

Various Lazarus Group malware modifies the Windows firewall to allow incoming connections or disable it entirely using netsh. [22][23][24]

NanoCore

NanoCore can modify the victim's firewall.[15][16]

netsh

netsh can be used to disable local firewall settings.[1][2]

njRAT

njRAT has modified the Windows firewall to allow itself to communicate through the firewall.[11]

Remsec

Remsec can add or remove applications or ports on the Windows firewall or disable it entirely.[9]

Rocke

Rocke used scripts which killed processes and added firewall rules to block traffic related to other cryptominers.[25]

TYPEFRAME

TYPEFRAME can open the Windows Firewall on the victim’s machine to allow incoming connections.[7]

ZxShell

ZxShell can disable the firewall by modifying the registry key HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile.[17]

Mitigations

Mitigation Description
Restrict File and Directory Permissions

Ensure proper process and file permissions are in place to prevent adversaries from disabling or modifying firewall settings.

Restrict Registry Permissions

Ensure proper Registry permissions are in place to prevent adversaries from disabling or modifying firewall settings.

User Account Management

Ensure proper user permissions are in place to prevent adversaries from disabling or modifying firewall settings.

Detection

Monitor processes and command-line arguments to see if firewalls are disabled or modified. Monitor Registry edits to keys that manage firewalls.

References

  1. Reynolds, J.. (2016, September 14). H1N1: Technical analysis reveals new capabilities – part 2. Retrieved September 26, 2016.
  2. The DigiTrust Group. (2017, January 01). NanoCore Is Not Your Average RAT. Retrieved November 9, 2018.
  3. Kasza, A., Halfpop, T. (2016, February 09). NanoCoreRAT Behind an Increase in Tax-Themed Phishing E-mails. Retrieved November 9, 2018.
  4. Allievi, A., et al. (2014, October 28). Threat Spotlight: Group 72, Opening the ZxShell. Retrieved September 24, 2019.
  5. US-CERT. (2018, March 16). Alert (TA18-074A): Russian Government Cyber Activity Targeting Energy and Other Critical Infrastructure Sectors. Retrieved June 6, 2018.
  6. US-CERT. (2017, October 20). Alert (TA17-293A): Advanced Persistent Threat Activity Targeting Energy and Other Critical Infrastructure Sectors. Retrieved November 2, 2017.
  7. Group-IB and Fox-IT. (2014, December). Anunak: APT against financial institutions. Retrieved April 20, 2016.
  8. Tarakanov , D.. (2013, September 11). The “Kimsuky” Operation: A North Korean APT?. Retrieved August 13, 2019.
  9. Novetta Threat Research Group. (2016, February 24). Operation Blockbuster: Unraveling the Long Thread of the Sony Attack. Retrieved February 25, 2016.
  10. Novetta Threat Research Group. (2016, February 24). Operation Blockbuster: Loaders, Installers and Uninstallers Report. Retrieved March 2, 2016.
  11. Novetta Threat Research Group. (2016, February 24). Operation Blockbuster: Tools Report. Retrieved March 10, 2016.
  12. Liebenberg, D.. (2018, August 30). Rocke: The Champion of Monero Miners. Retrieved May 26, 2020.