Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
Invoke-SocksProxy — 使用 PowerShell 实现的 SOCKS 代理和反向 SOCKS 服务器。 | Kitploit
工具/GitHubGitHub/p3nt4/invoke-socksproxy
横向移动网络安全渗透测试命令与控制红队
GitHubp3nt4/invoke-socksproxy

Invoke-SocksProxy

使用 PowerShell 实现的 SOCKS 代理和反向 SOCKS 服务器。

查看仓库
8101668个月前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Invoke-SocksProxy

使用 PowerShell 创建本地或“反向”Socks 代理。

本地代理是一个简单的 Socks 4/5 代理。

反向代理通过发起能够通过系统代理的出站 SSL 连接,创建一个 TCP 隧道。该隧道可在远程主机上用作 Socks 代理,以穿透进入本地主机的网络。

示例

本地

在 1080 端口上创建 Socks 4/5 代理:

root@kitploit:~
Import-Module .\Invoke-SocksProxy.psm1
Invoke-SocksProxy -bindPort 1080

将最大线程数从 200 增加到 400:

root@kitploit:~
Import-Module .\Invoke-SocksProxy.psm1
Invoke-SocksProxy -threads 400

反向

在远程主机的 1080 端口上创建“反向”Socks 4/5 代理:

root@kitploit:~
# On the remote host: 
# Generate a private key and self signed cert
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout private.key -out cert.pem

# Get the certificate fingerprint to verify it:
openssl x509 -in cert.pem -noout -sha1 -fingerprint | cut -d "=" -f 2 | tr -d ":"

# Start the handler
python3 ReverseSocksProxyHandler.py 443 1080 ./cert.pem ./private.key

# On the local host:
Import-Module .\Invoke-SocksProxy.psm1
Invoke-ReverseSocksProxy -remotePort 443 -remoteHost 192.168.49.130 

# Go through the system proxy:
Invoke-ReverseSocksProxy -remotePort 443 -remoteHost 192.168.49.130 -useSystemProxy

# Validate certificate
Invoke-ReverseSocksProxy -remotePort 443 -remoteHost 192.168.49.130 -certFingerprint '93061FDB30D69A435ACF96430744C5CC5473D44E'

# Give up after a number of failed connections to the handler:
Invoke-ReverseSocksProxy -remotePort 443 -remoteHost 192.168.49.130 -maxRetries 10

系统代理技巧的出处:https://github.com/Arno0x/PowerShellScripts/blob/master/proxyTunnel.ps1

限制

  • 仅实现 Socks 4 和 5 协议的子集:不支持身份验证,不支持 UDP 或绑定请求。
  • 当 Socks 代理的可用线程耗尽时,新连接需等待线程释放后才能建立。
  • 未来将实现新功能。欢迎提交 PR。

免责声明

本项目面向安全研究人员和渗透测试人员,使用时须获得系统所有者的批准。

下载工具