Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

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.

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

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Understand how to go beyond effectively communicating new security strategies and recommendations.

Register

Join us for an in depth exploration of the critical nature of software and vendor supply chain security issues with a focus on understanding how attacks against identity infrastructure come with major cascading effects.

Register

Expert Insights

Related Content

Application Security

Cycode, a startup that provides solutions for protecting software source code, emerged from stealth mode on Tuesday with $4.6 million in seed funding.

Identity & Access

Zero trust is not a replacement for identity and access management (IAM), but is the extension of IAM principles from people to everyone and...

CISO Strategy

SecurityWeek spoke with more than 300 cybersecurity experts to see what is bubbling beneath the surface, and examine how those evolving threats will present...

CISO Conversations

Joanna Burkey, CISO at HP, and Kevin Cross, CISO at Dell, discuss how the role of a CISO is different for a multinational corporation...

CISO Conversations

In this issue of CISO Conversations we talk to two CISOs about solving the CISO/CIO conflict by combining the roles under one person.

CISO Strategy

Security professionals understand the need for resilience in their company’s security posture, but often fail to build their own psychological resilience to stress.