Wireless Credential Dumping via Netsh
Adversaries use the Windows built-in utility Netsh to dump Wireless saved access keys in clear text, potentially leading to credential compromise.
Attackers often target wireless credentials to gain unauthorized network access. This involves using the legitimate Windows command-line tool netsh.exe to extract Wi-Fi passwords stored on a compromised system. By leveraging netsh, attackers can bypass traditional security measures and retrieve sensitive information without deploying custom malware. The technique involves specific command-line arguments that instruct netsh to display wireless keys in cleartext, exposing the network passwords. Defenders must monitor netsh command-line activity to identify potential credential access attempts. This activity can lead to lateral movement within the network.
Attack Chain
- The attacker gains initial access to a Windows system (e.g., via phishing or exploiting a software vulnerability).
- The attacker executes
netsh.exewith specific arguments to list available wireless profiles. - The attacker identifies a target wireless profile from the list.
- The attacker executes
netsh.exeagain, this time specifying the target profile and requesting the key to be displayed in cleartext using thekey=clearargument. Netsh.exeretrieves the Wi-Fi password from the Windows Wireless LAN service.- The password is displayed in the command output, which the attacker captures.
- The attacker uses the obtained Wi-Fi password to connect to the wireless network.
- The attacker can now perform lateral movement and access internal resources.
Impact
Successful credential dumping allows attackers to gain unauthorized access to wireless networks. This can lead to lateral movement within the organization’s network, access to sensitive data, and further compromise of systems and resources. The impact includes potential data breaches, financial losses, and reputational damage. This technique allows attackers to bypass traditional network access controls.
Recommendation
- Deploy the Sigma rule
Detect Wireless Credential Dumping via Netshto identify suspiciousnetsh.execommands in your environment. - Enable Sysmon process creation logging to capture the
netsh.execommand-line arguments. - Investigate any alerts triggered by the Sigma rule, focusing on the process lineage and user context as outlined in the “Triage and analysis” section of the source.
- Implement strong password policies for Wi-Fi networks, including the use of WPA2 or WPA3 encryption.
- Review and restrict the use of
netsh.exeon systems where it is not required, using application control solutions. - Monitor for related alerts indicating lateral movement, staging, remote access, or persistence, as mentioned in the “Triage and analysis” section of the source.
Detection coverage 2
Detect Wireless Credential Dumping via Netsh
highDetects attempts to dump wireless credentials using the netsh command with 'wlan' and 'key=clear' arguments.
Detect Netsh WLAN Profile Enumeration
mediumDetects the use of netsh to enumerate WLAN profiles, which is often a precursor to credential dumping.
Detection queries are kept inside the platform. Get full rules →