mingang.he
mingang.he
- [Does it support macOS?](https://github.com/hmgle/graftcp/#does-it-support-macos) - [支持 macOS 吗?](https://github.com/hmgle/graftcp/blob/master/README.zh-CN.md#%E6%94%AF%E6%8C%81-macos-%E5%90%97) 欢迎感兴趣的同学添加对 MacOS 的支持。
IP 这个可以实现,不过这个功能不太紧急,后面有空可以加下。 如果是 URL 的话无法实现,目前 graftcp 工作在 L4 层,获取不到流量的域名信息。
好主意。的确可以这么实现:动态维护黑白名单里面域名和 IP 的对应关系表,域名过滤时通过这个表来确定 IP 是否在域名的黑白名单中。缺点是域名 DNS 信息变化时可能这个关系表更新有延迟,不过这个影响不大。 这个功能暂时排期到低优先级,不保证短期内添加进来。
这个问题初步猜想是这样造成的:用 graftcp 将 nmap 的 TCP 流量重定向到代理后,只要和代理服务器的 TCP 三次握手成功连接建立后,nmap 的 connect 系统调用就成功返回了,于是 nmap 就认为是和扫描的目标主机目标端口成功建立了 TCP 连接,但实际上代理服务器和目标主机目标端口还不一定 connect 成功。 后面再研究下能否支持端口扫描这种场景。
nmap 扫描这种场景没有办法支持。 另外我试了下 proxychains-ng 4.14 和 nmap 7.91,发现返回结果和 graftcp 没有区别,也都全是 open 的: ``` $ ./proxychains4 /xxx/nmap-7.91/nmap -Pn -sT -top-ports 5 3.123.248.34 [proxychains] preloading ./libproxychains4.so [proxychains] DLL init: proxychains-ng 4.14-git-42-g931e0df Host...
> 首先可以确定nmap的-sT (TCP CONNECT)是支持通过socks代理扫描的 > > 针对3.123.248.34这个IP 我测试了几个开socks代理工具 目前只有ssh动态端口转发可以正常扫描 > > ``` > ssh -D 0.0.0.0:10808 [email protected] > ``` > > ``` > pc4 nmap -Pn -sT -top-ports 5 3.123.248.34...
@untoreh I can't reproduce it on my machine for the moment, maybe I should build a virtual machine of alpine linux 3.8. Thank you for the feedback.
`sudo graftcp sudo` will work.
By the way, if the `graftcp-local` is not started by the system, you should run `sudo ./graftcp-local` to use `sudo graftcp sudo`.
You can try this: ```console $ sudo graftcp bash # or zsh, fish... $ whoami root $ yay ``` As a root, do anything you wanna do :grin: