Post Exploitationpowershellpayloadsoffensivepenetration testingpost exploitation

Nishang

Nishang is a framework and collection of PowerShell scripts and payloads for offensive security and post-exploitation during penetration tests. The scripts were developed based on real-world penetration testing requirements.

Description

Nishang enables the use of PowerShell for offensive security and post-exploitation tasks in penetration tests. It provides a collection of scripts organized into directories covering various functionalities such as backdoors, escalation, execution, gathering, pivoting, and more. The framework includes a PowerShell module (nishang.psm1) and specialized tools like powerpreter.

The scripts are practical tools written by the author during actual penetration tests, making them directly applicable to real-world scenarios. Installed size is 6.41 MB and it depends on kali-defaults.

Directories include Antak-WebShell, Backdoors, Escalation, Execution, Gather, Misc, Pivot, powerpreter, Prasadhak, Scan, and Utility, with additional categories like ActiveDirectory, Bypass, Client, MITM, and Shells shown in the help output.

How It Works

Nishang operates as a PowerShell-based framework with scripts and payloads stored in /usr/share/nishang/. It includes a module file (nishang.psm1) for importing functionalities and organized directories for specific offensive techniques. The 'nishang -h' command displays the directory structure, enabling users to access categorized scripts for tasks like privilege escalation, information gathering, and pivoting via PowerShell execution on target systems.

Installation

bash
sudo apt install nishang

Flags

-hDisplays help information showing the directory structure of Nishang scripts and payloads

Examples

Lists the directories and files in the Nishang installation path, showing categories like Antak-WebShell, Backdoors, Escalation, and nishang.psm1
ls -l /usr/share/nishang/
Shows the help output listing all directories including ActiveDirectory, Bypass, Client, MITM, Shells, and others
nishang -h
Installs the Nishang package along with its dependencies
sudo apt install nishang
Explores the Backdoors directory for post-exploitation backdoor scripts
ls /usr/share/nishang/Backdoors
Lists privilege escalation scripts
ls /usr/share/nishang/Escalation
Shows execution-related PowerShell payloads
ls /usr/share/nishang/Execution
Accesses pivoting scripts for network movement
ls /usr/share/nishang/Pivot
Examines the powerpreter directory contents
ls /usr/share/nishang/powerpreter
Updated 2026-04-16kali.org ↗