


前回、Torをインストールしたので今回はproxychainsをインストールします。
- proxychainsをインストール
- 設定ファイル /etc/proxychains.conf
- テスト
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | root@penguin:~# apt info proxychains Package: proxychains Version: 3.1-8.1 Priority: optional Section: net Maintainer: Daniel Echeverry <epsilon77@gmail.com> Installed-Size: 27.6 kB Depends: libproxychains3 (>= 3.1-8.1) Homepage: http://proxychains.sourceforge.net Tag: implemented-in::c, interface::commandline, network::vpn, role::program,  use::proxying Download-Size: 8,932 B APT-Sources: https://deb.debian.org/debian buster/main arm64 Packages (snip) | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | root@penguin:~# apt install proxychains Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   libproxychains3 The following NEW packages will be installed:   libproxychains3 proxychains 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 23.8 kB of archives. After this operation, 71.7 kB of additional disk space will be used. Do you want to continue? [Y/n] Y (snip) | 
デフォルトでTorの設定がありますので、取り合えずそのままで。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | root@penguin:~# cat /etc/proxychains.conf  # proxychains.conf  VER 3.1 # #        HTTP, SOCKS4, SOCKS5 tunneling proxifier with DNS. #	 # The option below identifies how the ProxyList is treated. # only one option should be uncommented at time, # otherwise the last appearing option will be accepted # #dynamic_chain # # Dynamic - Each connection will be done via chained proxies # all proxies chained in the order as they appear in the list # at least one proxy must be online to play in chain # (dead proxies are skipped) # otherwise EINTR is returned to the app # strict_chain # # Strict - Each connection will be done via chained proxies # all proxies chained in the order as they appear in the list # all proxies must be online to play in chain # otherwise EINTR is returned to the app # #random_chain # # Random - Each connection will be done via random proxy # (or proxy chain, see  chain_len) from the list. # this option is good to test your IDS :) # Make sense only if random_chain #chain_len = 2 # Quiet mode (no output from library) #quiet_mode # Proxy DNS requests - no leak for DNS data proxy_dns  # Some timeouts in milliseconds tcp_read_time_out 15000 tcp_connect_time_out 8000 # ProxyList format #       type  host  port [user pass] #       (values separated by 'tab' or 'blank') # # #        Examples: # #            	socks5	192.168.67.78	1080	lamer	secret #		http	192.168.89.3	8080	justu	hidden #	 	socks4	192.168.1.49	1080 #	        http	192.168.39.93	8080	 #		 # #       proxy types: http, socks4, socks5 #        ( auth types supported: "basic"-http  "user/pass"-socks ) # [ProxyList] # add proxy here ... # meanwile # defaults set to "tor" socks4 	127.0.0.1 9050 | 
Tor経由になっています。
| 1 2 3 4 5 6 7 8 9 10 | root@penguin:~# proxychains curl https://check.torproject.org | grep Congra   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0|DNS-request| check.torproject.org    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0<><>-OK |DNS-response| check.torproject.org is 116.202.xxx.xxx |S-chain|-<>-127.0.0.1:9050-<><>-116.202.xxx.xxx:443-<><>-OK 100  5074    0  5074    0     0    759      0 --:--:--  0:00:06 --:--:--  1366       Congratulations. This browser is configured to use Tor.       Congratulations. This browser is configured to use Tor. | 
man proxychains
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | proxychains(1)							proxychains(1) NAME        ProxyChains - redirect connections through proxy servers SYNTAX        proxychains <program> DESCRIPTION        This  program forces any tcp connection made by any given tcp client to        follow through proxy (or proxy chain). It is a kind of proxifier.        It acts like sockscap / premeo / eborder driver (intercepts TCP calls).        This version (2.0) supports  SOCKS4,  SOCKS5  and  HTTP	CONNECT  proxy        servers.  Auth-types: socks - "user/pass" , http - "basic".        When to use it ?        1)  When  the  only way to get "outside" from your LAN is through proxy        server.        2) When you are behind restrictive firewall which filters outgoing con‐        nections to some ports.        3) When you want to use two (or more) proxies in chain:        like: your_host <--> proxy1 <--> proxy2 <--> target_host        4)  When  you  want  to	"proxify"  some programs with no proxy support        built-in (like telnet).        5) When you don't want to pay for eBorder / premeo socks driver :)        Some cool features:        * This program can mix different proxy types in the same chain        like: your_host <-->socks5 <--> http <--> socks4 <-->  http  <-->  tar‐        get_host        *  Different  chaining  options supported      like:  take random proxy        from the list.	    or :   chain proxies  in  exact  order	 or  :        chain proxies in dynamic order (smart exclude dead proxies from chain)        *You can use it with any TCP client application, even network scanners.        yes, yes - you can make portscan via proxy (or chained proxies) for ex‐        ample with Nmap scanner by fyodor (www.insecure.org/nmap).        proxychains  nmap  -sT  -PO  -p	80  -iR  (find some webservers through        proxy)        NOTE: to run suid/sgid programs(like ssh) through proxychains you  have        to be root FILES        proxychains looks for config file in following order: 	./proxychains.conf 	$(HOME)/.proxychains/proxychains.conf 	/etc/proxychains.conf        see more in /etc/proxychains.conf EXAMPLES        To run this program the standard way type:        proxychains telnet targethost.com        in  this  example  it will run telnet through proxy(or chained proxies)        specified by proxychains.conf COPYING        proxychains is distributed under the GNU General Public License.   (GPL        2.0 or greater). AUTHORS        Net Creature, Proxy Labs        <http://proxychains.sourceforge.net> <Net Creature>			      2.0			proxychains(1) |