PowerShell
Last updated
Last updated
Adversaries may abuse PowerShell commands and scripts for execution. PowerShell is a powerful interactive command-line interface and scripting environment included in the Windows operating system. Adversaries can use PowerShell to perform a number of actions, including discovery of information and execution of code. Examples included in the Start-Process cmdlet which can be used to run an executable and the Invoke-Command cmdlet which runs command locally or on a remote computer (though administrator permissions are required to use PowerShell to connect to remote systems).
Power Shell may be also used to download and run executables from the internet, which can be executed from disk or in memory without touching disk.
A number of PowerShell-based offensive testing tools are available, including Empire, PowerSploit, PoshC2, and PSAttack.
PowerShell commands/scripts can also be executed without directly invoke the powershell.exe binary through interfaces to PowerShell's underlying System.Management.Automation assembly DLL exposed through the .NET framework and Windows Common Language Interface (CLI).
Some Examples of the PowerShell Command-Line
Whoami, hostname, PWD (Current Directory)
ComputerInfo
What about grabbing a Remote Shell, well we will use the common IEX Command to achieve that.
Shell:
PowerShell is a powerful interface and there are many offensive tools that take advantage of its capabilities do challenge yourself to find them out in the offensive side of things.