Application Security

US, UK, New Zealand Issue PowerShell Security Guidance

The US Cybersecurity and Infrastructure Security Agency (CISA), the National Security Agency (NSA), and the National Cyber Security Centres in New Zealand (NZ NCSC) and the United Kingdom (NCSC-UK) have issued joint guidance on the proper configuration and monitoring of PowerShell to eliminate the risk of abuse.

<p><strong><span><span>The US Cybersecurity and Infrastructure Security Agency (CISA), the National Security Agency (NSA), and the National Cyber Security Centres in New Zealand (NZ NCSC) and the United Kingdom (NCSC-UK) have issued joint guidance on the proper configuration and monitoring of PowerShell to eliminate the risk of abuse.</span></span></strong></p>

The US Cybersecurity and Infrastructure Security Agency (CISA), the National Security Agency (NSA), and the National Cyber Security Centres in New Zealand (NZ NCSC) and the United Kingdom (NCSC-UK) have issued joint guidance on the proper configuration and monitoring of PowerShell to eliminate the risk of abuse.

A scripting language and command line utility in Windows, PowerShell is meant to extend user experience and help with the management of the operating system through the automation of repetitive tasks and by enabling forensics and improving incident response.

PowerShell is also deployed in Microsoft Azure, where administrators can use it for automating tools and security measures. The latest PowerShell release – version 7.2 – is managed and open sourced by Microsoft.

The broad availability of PowerShell, along with its ease of use and extensibility, have proven an opportunity for malicious actors during the post-exploitation phase of cyberattacks.

While some administrators and defenders would completely disable PowerShell to prevent abuse, the joint guidance provides a series of recommendations that can help mitigate risks without impeding PowerShell’s functionality.

“Blocking PowerShell hinders defensive capabilities that current versions of PowerShell can provide, and prevents components of the Windows operating system from running properly. Recent versions of PowerShell with improved capabilities and options can assist defenders in countering abuse of PowerShell,” the NSA, CISA, NZ NCSC, and NCSC-UK note in their Cybersecurity Information Sheet (CIS).

Courtesy of built-in Windows security features, PowerShell can also help reduce the abuse by threat actors, the document reads.

PowerShell remoting, for example, keeps credentials protected through the use of Windows Remote Management (WinRM), which leverages Kerberos or New Technology LAN Manager (NTLM) as the authentication protocol.

Advertisement. Scroll to continue reading.

Included in both client and server editions of Windows, PowerShell remoting requires administrative privileges at the destination and setting a firewall rule on private networks. Administrators can harden network defenses by customizing these settings to restrict connections to trusted endpoints only.

The guidance also explains that PowerShell and other built-in scripting languages also use the Antimalware Scan Interface feature to enable the scanning of scripts, and that properly configuring AppLocker or Windows Defender Application Control (WDAC) on Windows 10 or newer can “prevent a malicious actor from gaining full control over a PowerShell session and the host.”

Administrators are also advised to log PowerShell activities to identify cyberthreats that leverage the scripting language. For that, they can use Deep Script Block Logging – which logs all PowerShell commands in the Windows Event Log, malicious activity included – or Over-the-Shoulder (OTS) transcription, which records activities executed within PowerShell 5 on Windows 7 and later.

PowerShell 7 also includes support for remote connections over Secure Shell (SSH), in addition to WinRM, thus enabling secure remote management without requiring trusted hosts. This also enables cross-platform PowerShell remoting.

Given the new functionality and security capabilities included in newer versions of PowerShell, it is recommended to disable and uninstall deprecated PowerShell releases (iterations prior to 5.0 have been abused in malicious attacks) and to make sure that the latest versions are in use.

“PowerShell is essential to secure the Windows operating system, especially since newer versions have resolved previous limitations and concerns through updates and enhancements. Removing or improperly restricting PowerShell would prevent administrators and defenders from utilizing PowerShell to assist with system maintenance, forensics, automation, and security,” the CIS concludes.

Related: NSA Publishes Best Practices for Improving Network Defenses

Related: NIST Releases ICS Cybersecurity Guidance for Manufacturers

Related: US: Hackers Continue Aiding North Korea Generate Funds via Cryptocurrency Attacks

Related Content

Copyright © 2024 SecurityWeek ®, a Wired Business Media Publication. All Rights Reserved.

Exit mobile version