Security Experts:

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.

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

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.

Join this webinar to learn best practices that organizations can use to improve both their resilience to new threats and their response times to incidents.

Register

Join this live webinar as we explore the potential security threats that can arise when third parties are granted access to a sensitive data or systems.

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.

Management & Strategy

SecurityWeek examines how a layoff-induced influx of experienced professionals into the job seeker market is affecting or might affect, the skills gap and recruitment...

Application Security

PayPal is alerting roughly 35,000 individuals that their accounts have been targeted in a credential stuffing campaign.

Application Security

GitHub this week announced the revocation of three certificates used for the GitHub Desktop and Atom applications.

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...

Network Security

NSA publishes guidance to help system administrators identify and mitigate cyber risks associated with transitioning to IPv6.

Application Security

Drupal released updates that resolve four vulnerabilities in Drupal core and three plugins.

Application Security

While there are many routes to application security, bundles that allow security teams to quickly and easily secure applications and affect security posture in...