kali使用tor网络进行socks5代理记录

Linux kali 4.19.0-kali5-amd64 #1 SMP Debian 4.19.37-2kali1 (2019-05-15) x86_64 GNU/Linux
 

试过下载linux版本的tor压缩包,但是安装不了

最后

apt-get install tor

root@kali:~# apt-get install tor
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
将会同时安装下列软件:
  tor-geoipdb torsocks
建议安装:
  mixmaster torbrowser-launcher tor-arm apparmor-utils obfs4proxy
下列【新】软件包将被安装:
  tor tor-geoipdb torsocks
...

正在设置 torsocks (2.3.0-2) ...
正在设置 tor-geoipdb (0.3.5.8-1) ...
正在处理用于 man-db (2.8.5-2) 的触发器 ...
正在处理用于 systemd (241-3) 的触发器 ...
Scanning processes...                                                           
Scanning linux images...                                                        

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

然后用代理启动:Shadowsocks-Qt5连接配置好1080socks5端口,

修改proxychains代理端口:

vim /etc/proxychains.conf

修改:socks5 127.0.0.1 1080

 

proxychains tor

root@kali:~# proxychains tor
ProxyChains-3.1 (http://proxychains.sf.net)
Jun 26 03:09:30.473 [notice] Tor 0.3.5.8 running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.1b, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.3.8.
Jun 26 03:09:30.473 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Jun 26 03:09:30.473 [notice] Read configuration file "/etc/tor/torrc".
Jun 26 03:09:30.477 [notice] Opening Socks listener on 127.0.0.1:9050
Jun 26 03:09:30.477 [notice] Opened Socks listener on 127.0.0.1:9050
Jun 26 03:09:30.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
Jun 26 03:09:30.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
Jun 26 03:09:30.000 [warn] You are running Tor as root. You don't need to, and you probably shouldn't.
Jun 26 03:09:30.000 [notice] Bootstrapped 0%: Starting
Jun 26 03:09:30.000 [notice] Starting with guard context "default"
Jun 26 03:09:31.000 [notice] Bootstrapped 5%: Connecting to directory server
|S-chain|-<>-127.0.0.1:10800-<><>-62.210.92.11:9101-<><>-OK
Jun 26 03:09:31.000 [notice] Bootstrapped 10%: Finishing handshake with directory server
|S-chain|-<>-127.0.0.1:10800-<><>-204.8.156.142:443-<><>-OK
...

启动tor,tor会使用9050端口

netstat -an|grep 9050

 

proxychains配置:

各配置项用法如下:

dynamic_chain:该配置项能够通过ProxyList中的每个代理运行流量,如果其中一个代理关闭或者没有响应,它能够自动选择ProxyList中的下一个代理;

#strict_chain:改配置为ProxyChains的默认配置,不同于dynamic_chain,也能够通过ProxyList中的每个代理运行流量,但是如果ProxyList中的代理出现故障,不会自动切换到下一个。

#random_chain:该配置项会从ProxyList中随机选择代理IP来运行流量,如果ProxyList中有多个代理IP,在使用proxychains的时候会使用不同的代理访问目标主机,从而使主机端探测流量更加困难。

 

再修改proxychains代理端口:

vim /etc/proxychains.conf

修改:

socks5 127.0.0.1 9050

socks5 127.0.0.1 1080

然后:

proxychains firefox
proxychains curl cip.cc

 

firefox也可以在设置代理配置里面把127.0.0.1 9050配置上去使用