How secure and anonymous is the --tor
parameter in Sqlmap?
Does it really send every request over Tor and does it have any IP/DNS/STUN requests leak loopholes?
How secure and anonymous is the --tor
parameter in Sqlmap?
Does it really send every request over Tor and does it have any IP/DNS/STUN requests leak loopholes?
It appears to use Tor correctly, from what I can see in the source code. You have to be running a Tor daemon and correctly configure it. If you don't use SOCKS5 (or SOCKS4a), you're opening yourself up to DNS leaks. This is because regular SOCKS4 does not support DNS. Make sure your sqlmap configuration file contains torType = SOCKS5
. With that said, using --tor
should provide strong anonymity as long as the Tor daemon is configured correctly, and barring any OPSEC mistakes.
The --check-tor
option verifies that Tor is actually in use by going to a website run by Tor Project which returns whether or not Tor is in use. The code is a bit sloppy as it just checks for the words "Congratulations" in the page, which is supposed to only be the case if Tor is in use. This could be improved, perhaps by trying to resolve the official Tor Project onion domain.
As for how it works, sqlmap is written in Python, so it just uses Python's networking code and sets it to use a proxy, with that proxy being exposed (presumably) on localhost by Tor itself. If you want to be extra safe, run it as a user with a firewall configured to block all traffic from that user, with access to the local SOCKS proxy port whitelisted. Some distros do this by default, like Tails.