What is PowerShell?

Microsoft's built-in administration language — and the most heavily used attack tool on Windows. It is signed, trusted, present everywhere, and can do essentially anything, so attackers rarely need to bring their own tools.

PowerShell is the Windows automation framework and, for the same reasons that make it useful to administrators, the most common execution technique in Windows intrusions. It can download and run code in memory without writing files to disk, interact with every part of the operating system and the directory, and reach cloud services, all through software Microsoft signs and every endpoint already has. Blocking it is rarely realistic because operations depends on it, so the practical posture is visibility and constraint rather than removal. Script block logging, module logging and transcription record what was actually executed, including obfuscated commands after deobfuscation; constrained language mode limits what PowerShell can do on machines that do not need the full capability; and application control policies restrict which scripts may run. For decision-makers this is the cleanest example of a general principle: the attacker's tooling is increasingly your tooling, so detection has to be about behaviour and intent, not about identifying foreign software.

Source: MITRE ATT&CK (T1059.001).

Practice it in a lab

Free, hands-on labs that teach PowerShell. 55 more labs also cover it.

Related terms

All glossary terms

Related