Metasploitとproxychainsとpostgresqlを組み合わせるには
とりあえず検索すると中国語と英語しか出てこなかったので日本語として残しておくことにする。
proxychais4(もしくはproxychains) msfconsole とコマンドを走らせると
以下のエラーが出てくる人対象の記事。
[*] Starting the Metasploit Framework console...|S-chain|-<>-127.0.0.1:9050-\<|<>-127.0.0.1:5432<--timeout
[-] Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
まず注意しておくことはpostgresqlがマシンに入っているかどうか確かめよう
service postgresql status
ないもしくはうごいていないなら入れて動かすこと。
デフォルトポートは5432になっている。ポートが違うならまた
proxychainsとはべつのはなしになってくるので自分でググって設定を買えること。
Metasploitとproxychainsとpostgresqlを組み合わせるにはproxychains.confを変えればいい。
vi /etc/proxychains.conf
dns_proxy
↓
#dns_proxy
そしてこれを加える
127.0.0.1/255.255.255.255#(proxychains-ngの場合のみ)
127.0.0.1 000 255.255.255.255 #(proxychainsのみ)
これだけでよい。
ひとつ注意としてdnsリークが発生すること。
これが発生してしまえばもはや匿名とは言えないだろう。
直接proxychainsとは別にdnsリーク対策が必要となる。