Jump to: navigation, search

Dev/Leak Tests

< Dev

Random News:

Know iptables? Want to contribute? Check out possible iptables improvements. Say hello in development forum.

Introduction[edit]

In past Whonix documentation stated "in your own interest you should do the leak tests". That was from a time, where Whonix was only useful for very advanced end users, because only textual instructions existed; there were no scripts, no source code and the Whonix concept was brand new. It is unrealistic, that all download users do and understand the leak tests. That's why it was removed from the Readme.

You are still invited and encouraged to do the leak tests, in fact, at the moment, there are probably not many people auditing Whonix security.

Unfortunately, leak testing is as complicated as programming. You can not learn it overnight and you won't find someone online, willing to teach you for free. That's really something you have to do on your own. We continue to list and document all leak tests we are aware of, but we can not educate everyone in the depths of networking.

Knowledge assumed[edit]

Leak Testing Websites[edit]

There are too many websites for leak testing. (Some are offline.)

None of the Leak Testing Websites was able to find out the IP of Whonix-Workstation, no matter if plugins, flash and/or java was activated.

DNS Leak Tests[edit]

Online[edit]

Defunct host DNS[edit]

Rendering the DNS on your host defunct should result in your not being be able to nslookup anymore, but Whonix-Workstation's DNS should still be functional.

Defunct /etc/resolv.conf[edit]

On the Whonix-Gateway execute 'sudo nano /etc/resolv.conf' and comment out everything (# before every line so everything is ignored).

#nameserver 127.0.0.1

As a test's result the DNS requests in the Whonix-Workstation should still work while the DNS requests in the Whonix-Gateway no longer work.

Using dig[edit]

Another very poor manish leak test: Because Tor's DNS resolver does not handle AAAA records this will not return any google hostnames if run on Whonix-Workstation and DNS requests aren't leaking. Running.

dig AAAA check.torproject.org

Should reply.

; <<>> DiG 9.8.1-P1 <<>> AAAA check.torproject.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOTIMP, id: 42383
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;check.torproject.org.          IN      AAAA

;; Query time: 0 msec
;; SERVER: 10.152.152.10#53(10.152.152.10)
;; WHEN: [date]
;; MSG SIZE  rcvd: 38

Tor also does not support DNSSEC yet. Running.

dig +dnssec check.torproject.org @localhost

Should reply.

; <<>> DiG 9.8.1-P1 <<>> +dnssec check.torproject.org @localhost
;; global options: +cmd
;; connection timed out; no servers could be reached

Using nslookup[edit]

Running.

nslookup -type=mx check.torproject.org

Should reply.

Server:         10.152.152.10
Address:        10.152.152.10#53

** server can't find check.torproject.org: NOTIMP

Running

nslookup -type=AAAA check.torproject.org

Should reply.

Server:         10.152.152.10
Address:        10.152.152.10#53

** server can't find check.torproject.org: NOTIMP

Leaks through the host or VM[edit]

Shut down the Whonix-Gateway and start the Whonix-Workstation. The Whonix-Workstation shouldn't be able to exchange data with any outside target.

Ping Test[edit]

First, make sure both VMs are online. Since ICMP is not supported by Tor and filtered by Whonix firewall, you should not be able to ping any servers.

FIN ACK / RST ACK - Leak Test[edit]

Credit for FIN ACK / RST ACK - Leak Test (coined by Whonix): Originally written by Mike Perry on the tor-talk mailing list, he found a transparent proxy leak without references to Whonix. (source) The test has been adapted for Whonix.

Note, the following IP 74.125.28.104 points to www.google.com and should be seen as an example.

On the host.

Close your browser and cease all other non-Whonix online activity to avoid contaminating the following test.

Install tcpdump.

sudo apt-get update
sudo apt-get install tcpdump

Run tcpdump. Replace -i wlan0 with your network interface. If you use -i any, you will also see transproxied packets (which are not normally leaked).

sudo tcpdump -n -i wlan0 host 74.125.28.104 and tcp port 80

For testing/learning, connect to 74.125.28.104 (ping, open in a browser, use wget or similar) and see how it looks like when a connection to that IP is being made.

Close the connection. Stop tcpdump. Start tcpdump again.

In Whonix-Workstation.

Create a socket connection.

python

import socket

s = socket.create_connection(("74.125.28.104", 80))

On Whonix-Gateway.

Stop Tor.

sudo service tor stop

In Whonix-Workstation.

Close the socket connection.

s.close()

On the host.

Check, that you can not see any connections to 74.125.28.104 in tcpdump.

Variations of this test:

Forum discussion:

Integrated tshark leaktest[edit]

The necessary scripts for leak testing are now integrated into the Whonix machines.

On Whonix-Gateway start looking for leaks.

## Login as user, open a shell as user or su user.
## /usr/bin/leaktest
sudo leaktest

On Whonix-Workstation try to produce a leak.

## Login as user, open a shell as user or su user.
## /usr/bin/leaktest
sudo leaktest

If you are wondering, how this works and what that does, the old article, Dev/Leak Tests Old is still being kept.

  • Original article.
  • As copy and paste tutorial.
  • For better understanding with more comments.
  • Perhaps useful for similar projects.
  • Optional additional tests.

Integreated whonixcheck leaktest[edit]

Please also run whonixcheck on Whonix-Gateway and Whonix-Workstation. It's Tor SocksPort and Tor TransPort test (the latter only on Whonix-Workstation [1]) are also doing leak testing. If whonixcheck would report a big warning, if check.torproject.org couldn't detect Tor.

Other Leak Tests[edit]

A similar project published another leak test. Read How can I test if there is a leak in the setup respectively all traffic goes through Tor?. Has not been tested with Whonix yet. If you do it, please share your results.

See Also[edit]

Footnotes[edit]

  1. Because Whonix-Gateway does not have a TransPort by default.


Log in | OpenID | Contact | Impressum | Datenschutz | Haftungsausschluss | Investors | Donate

https | Mirror | Mirror | Share: Twitter | Facebook | Google+

This is a wiki. Want to improve this page? See Conditions for Contributions to Whonix, then Edit! IP addresses are scrubbed, but editing over Tor is recommended. Edits are held for moderation.

Whonix (g+) is a licensee of the Open Invention Network. Unless otherwise noted above, content of this page is copyrighted and licensed under the same Free (as in speech) license as Whonix itself.