Before you start launching all your scans and tests, It would make alot more sense to be "nameless". If your like me then you wouldn't want some IDS picking up your internet protocol right? I haven't seen a tutorial about running our favorite scanners and information grabbing program through something like a proxy that really made alot of sense so I decided to write something down.
There are a few packages you will have to download and install unless your already running backtrack.
Tor & Privoxy
Firefox's Torbutton addon
proxychains
socat
A quick google search will provide you with plenty of download links and even instructions on how to install them.
Now lets skip a few beats and say we have already downloaded and installed tor.
Now lets shut it down and restart it to make sure everything is running smoothly.
Now with out any error messages or warnings lets start tor back up.
We should get the following:
No error ro warnings messages...GOOD, There are other ways to check this but It's always better to second check things then to second chance them.
Now with tor up and running lets take a look at our privoxy.conf file.
Now at the very top add this line:
Remember to add the period at the end.
Now with nano still up lets search for the words "logfile logfile"
You can do this my holding down the ctrl button and pressing the w key
It will find "logfile logfile" and will look like this:
Now we dont want tor logging anything to a logfile so let's add a # to the beginning of that like this:
Next search for the words "jarfile jarfile" and do the exact same as you did with "logfile logfile"
Now save and exit the file by holding the ctrl and pressing o and then ctrl+x.
We are going to restart privoxy now sent we made some changes:
Tor and privoxy are now complete, next step is adding the tor button to firefox:
Goto Tools>Add-ons>Get Add-ons and search for Torbutton and install it.
Now when you restart firefox your just click the Tor Disabled button and if it changes to Tor Enabled then go to www.whatismyip.com and see if its changed, if it has then your browser is now finished.
Now I'm going to show you how proxychains work, its really simple and for an example I'm going to use the network program nmap.
Open up your terminal and type:
I just did a pretty basic nmap on google.com:80 as just an example but what we did here was we using proxychains to tunnel our nmap scan through tor.
You can use this same feature through all your terminal scanners.
Lets look at another good scan using proxychains
Just a simple ping sweep.
Now on to socat, this package is a big one so I would higly recommend reading or learning all you can about this one before using it fully. But as an example situation let's say I did a nmap scan on someone and found out they was running a webserver. One super good way to find out what type of server they are running is simply connecting to it and requesting "HEAD / HTTP/1.0"
I open my terminal and type:
+TECH NOTE: A quick way to find out a website's Ip address is to use the tor-resolve function
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Now in a new terminal I type:
And send the command
"HEAD / HTTP/1.0"
voila!
If you liked this or enjoyed please let me know I'll be glad to help you with your own projects on my own time.
Thanks for reading.
There are a few packages you will have to download and install unless your already running backtrack.
Tor & Privoxy
Firefox's Torbutton addon
proxychains
socat
A quick google search will provide you with plenty of download links and even instructions on how to install them.
Now lets skip a few beats and say we have already downloaded and installed tor.
Now lets shut it down and restart it to make sure everything is running smoothly.
Code
serial@home:~# /etc/init.d/tor stop
Stopping tor daemon: tor.Now with out any error messages or warnings lets start tor back up.
We should get the following:
Code
serial@home:~# /etc/init.d/tor start
Raising maximum number of filedescriptors (ulimit -n) to 32768.
Starting tor daemon: tor...
Sep 25 03:48:42.110 [notice] Tor v0.2.1.26. This is experimental software. Do not rely on it for strong anonymity. (Running on Linux i686)
Sep 25 03:48:42.111 [notice] Initialized libevent version 1.3e using method epoll. Good.
Sep 25 03:48:42.112 [notice] Opening Socks listener on 127.0.0.1:9050
done.No error ro warnings messages...GOOD, There are other ways to check this but It's always better to second check things then to second chance them.
Now with tor up and running lets take a look at our privoxy.conf file.
Code
serial@home:~# nano /etc/privoxy/configNow at the very top add this line:
Code
forward-socks4a / 127.0.0.1:9050 .Now with nano still up lets search for the words "logfile logfile"
You can do this my holding down the ctrl button and pressing the w key
It will find "logfile logfile" and will look like this:
Code
#
# Your logfile will grow indefinitely, and you will probably
# want to periodically remove it. On Unix systems, you can do
# this with a cron job (see "man cron"). For Red Hat based Linux
# distributions, a logrotate script has been included.
#
# Any log files must be writable by whatever user Privoxy is
# being run as (on Unix, default user id is "privoxy").
#
logfile logfile
#
#Now we dont want tor logging anything to a logfile so let's add a # to the beginning of that like this:
Code
#
# Your logfile will grow indefinitely, and you will probably
# want to periodically remove it. On Unix systems, you can do
# this with a cron job (see "man cron"). For Red Hat based Linux
# distributions, a logrotate script has been included.
#
# Any log files must be writable by whatever user Privoxy is
# being run as (on Unix, default user id is "privoxy").
#
# logfile logfile
#
#Next search for the words "jarfile jarfile" and do the exact same as you did with "logfile logfile"
Now save and exit the file by holding the ctrl and pressing o and then ctrl+x.
We are going to restart privoxy now sent we made some changes:
Code
serial@home:~# /etc/init.d/privoxy restart
Restarting filtering proxy server: privoxy.Tor and privoxy are now complete, next step is adding the tor button to firefox:
Goto Tools>Add-ons>Get Add-ons and search for Torbutton and install it.
Now when you restart firefox your just click the Tor Disabled button and if it changes to Tor Enabled then go to www.whatismyip.com and see if its changed, if it has then your browser is now finished.
Now I'm going to show you how proxychains work, its really simple and for an example I'm going to use the network program nmap.
Open up your terminal and type:
Code
serial@home:~# proxychains nmap -sT -PN -n -p 80 google.com
ProxyChains-3.1 (http://proxychains.sf.net)
Starting Nmap 5.35DC1 ( http://nmap.org ) at 2010-09-25 04:09 EDT
|DNS-request| google.com
|S-chain|-<>-127.0.0.1:9050-<><>-4.2.2.2:53-<><>-OK
|DNS-response| google.com is 209.85.225.105
|S-chain|-<>-127.0.0.1:9050-<><>-209.85.225.105:80-<><>-OK
Nmap scan report for google.com (209.85.225.105)
Host is up (1.8s latency).
PORT STATE SERVICE
80/tcp open http
Nmap done: 1 IP address (1 host up) scanned in 6.14 secondsI just did a pretty basic nmap on google.com:80 as just an example but what we did here was we using proxychains to tunnel our nmap scan through tor.
You can use this same feature through all your terminal scanners.
Lets look at another good scan using proxychains
Code
serial@home:~# proxychains fping -a -g 192.168.1.0/24
ProxyChains-3.1 (http://proxychains.sf.net)
192.168.1.97
ICMP Host Unreachable from 192.168.1.97 for ICMP Echo sent to 192.168.1.2
ICMP Host Unreachable from 192.168.1.97 for ICMP Echo sent to 192.168.1.3
ICMP Host Unreachable from 192.168.1.97 for ICMP Echo sent to 192.168.1.4
ICMP Host Unreachable from 192.168.1.97 for ICMP Echo sent to 192.168.1.5
ICMP Host Unreachable from 192.168.1.97 for ICMP Echo sent to 192.168.1.6
ICMP Host Unreachable from 192.168.1.97 for ICMP Echo sent to 192.168.1.7Just a simple ping sweep.
Now on to socat, this package is a big one so I would higly recommend reading or learning all you can about this one before using it fully. But as an example situation let's say I did a nmap scan on someone and found out they was running a webserver. One super good way to find out what type of server they are running is simply connecting to it and requesting "HEAD / HTTP/1.0"
I open my terminal and type:
+TECH NOTE: A quick way to find out a website's Ip address is to use the tor-resolve function
Code
tor-resolve google.comCode
serial@home:~# socat TCP4-LISTEN:8080, fork
socks4a:127.0.0.1:<google's ip address>:80, socksport=9050 &Now in a new terminal I type:
Code
]nc 127.0.0.1 8080And send the command
"HEAD / HTTP/1.0"
voila!
If you liked this or enjoyed please let me know I'll be glad to help you with your own projects on my own time.
Thanks for reading.

