2011
04.24

A nice tutorial for SQLmap with TOR by 0entropy.blogspot.com

There is no better tool at the moment for blind SQL injection than sqlmap. If you don’t use it you should definitely have a look on it. With the latest additions sqlmap supports tor with a command line switch, –tor. Let’s proceed with an installation. My system is debian/ubuntu based but the installation is almost the same for any unix based distribution. Following the instructions, https://www.torproject.org/docs/debian.html.en#ubuntu ,

Add this line to your /etc/apt/sources.list file:

Select All Code:
deb     http://deb.torproject.org/torproject.org  main

where you put the codename of your distribution (i.e. lenny, sid, maverick or whatever it is) in place of <DISTRIBUTION>.

Then add the gpg key used to sign the packages by running the following commands at your command prompt:

Select All Code:
gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

Now refresh your sources and install Tor by running the following commands (as root) at your command prompt:

Select All Code:
apt-get update
apt-get install tor tor-geoipdb

Start tor, with /etc/init.d/tor start and grab a copy of polito config file from https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:/build-scripts/config/polipo.conf , rename or move the old file in /etc/polipo/config and use the configuration from the URL.Restart polipo with /etc/init.d/polipo restart.

Get sqlmap from the latest svn trunk using

Select All Code:
svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap

Now you can use sqlmap with –tor with the following command,

Select All Code:
~/sqlmap# ./sqlmap.py -u http://URL/index.php?cata_id=1 --dump-all –tor --user-agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

and your requests will appear like an anonymous google bot getting information from the website.

[source]

VN:F [1.9.17_1161]
Rating: 4.8/5 (4 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)
Stay invisible with SQLmap and TOR, 4.8 out of 5 based on 4 ratings

Related posts:

  1. Reverse ICMP backdoor

8 comments so far

Add Your Comment
  1. I installed Tor and Polipo in another Linux distro and I run the cmd and nothing happens;

    sqlmap -u http://URL/index.php?cata_id=1 –dump-all –tor –user-agent=”Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)”

    Here’s the output below, how can I fix this?

    [11:07:04] [WARNING] increasing default value for –time-sec to 10 because –tor switch was provided
    [11:07:04] [INFO] setting Tor proxy settings
    [11:07:04] [INFO] using ‘/opt/sqlmap/output/URL/session’ as session file
    [11:07:04] [INFO] testing connection to the target url
    [11:07:08] [INFO] heuristics detected web page charset ‘ascii’
    [11:07:08] [CRITICAL] unable to connect to the target url (504 – Gateway Timeout), sqlmap is going to retry the request
    [11:07:08] [WARNING] if the problem persists please check that the provided target url is valid. If it is, you can try to rerun with the –random-agent switch turned on and/or proxy switches (–ignore-proxy, –proxy,…)
    [11:07:11] [CRITICAL] unable to connect to the target url (504 – Gateway Timeout), sqlmap is going to retry the request
    [11:07:15] [CRITICAL] unable to connect to the target url (504 – Gateway Timeout), sqlmap is going to retry the request
    [11:07:21] [CRITICAL] unable to connect to the target url (504 – Gateway Timeout)
    [11:07:21] [WARNING] HTTP error codes detected during testing:
    504 (Gateway Timeout) – 4 times

    THANKS

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
  2. If I cd to the /path /opt/sqlmap and run the command

    I get this;

    ./sqlmap.py -u http://URL/index.php?cata_id=1 –dump-all -tor –user-agent=”Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)”

    [*] starting at 12:07:29

    [12:07:29] [INFO] using ‘/opt/sqlmap/output/URL/session’ as session file
    [12:07:30] [CRITICAL] host ‘URL’ does not exist

    Sorry I don’t understand, what is this sqlmap suppose to do? Is this suppose to be a better way to surf online with Tor?

    So how do I make this work?

    THANKS

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.17_1161]
    Rating: -1 (from 1 vote)
    • Sqlmap is a web hacking tool, if you just want to browse web pages anonymous simply install tor software to your computer.

      VN:F [1.9.17_1161]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.17_1161]
      Rating: 0 (from 0 votes)
  3. thanks a lot! good job)

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.17_1161]
    Rating: +1 (from 1 vote)
  4. Das…you are actually putting in a real URL aren’t you? If not that may be the issue…

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
  5. Please put up a video tutorial of what you just said.

    Thanks

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
    • Video tutorial about what?

      VN:F [1.9.17_1161]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.17_1161]
      Rating: 0 (from 0 votes)
  6. in v0.9 u dont have to do it :)

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)

Get Adobe Flash player