Methods used to identify your anonymous browsing

Sorry for the bad news.  Anonymous browsing is not real, it is just a lie so you are honest at browsing and do online believing your identity is being protected.

In this post i will show some results from the project created by the Electronic Frontier Foundation called Panopticlick.

Screenshot from 2017-04-30 17:55:08

  1. Do not believe in what your eyes see.  This option creates a false sense of security, nothing worse.

Screenshot from 2017-04-30 18:00:02

When doing the test of your browser, you will most likely see a message like this:

Screenshot from 2017-04-30 18:03:16

2) Browser tracking goes even deeper and deeper.  Even you get the binaries from Firefox already compiled, you will be surprised that on different computers the Browser produces very different responses, that together create a unique fingerprint.

Unique numbers obtained for the same computer but different versions of Firefox.

Firefox 52.0.2

Screenshot from 2017-04-30 18:13:42

The identifiers that have more relevance are the Hashes of Canvas and WebGL.  For example, the identifier for WebGL says that one browser in 8320 has this ID but together with the other identifiers (not considering external data).


Firefox 53.0.0

Changing the version of Firefox keeps the same Canvas identifier (always on the same computer).

Screenshot from 2017-04-30 18:19:16

Is TOR Browser better protecting on this scenario ?

Yes, i said the magic word, oh yes, we are going to the deep web.  Before presenting the results i would like to say that Tor may not be the perfect solution.  But it is gaining popularity.  Be careful, because the only fact of using tor could create a fingerprint for your person:  for example, you are in a place full of people, and you are the only one wearing a mask, that would create a unique id for you.

This test looks better:

Screenshot from 2017-04-30 18:25:29

And the already known identifiers look better also.  I hope this is trustworthy.

Screenshot from 2017-04-30 22:06:33

Ok now we are at the end of this post.  I could not find one place that explains how those unique identifiers (or hashes) are created, at some places it says that it depends on the computer: memory, video driver and other things… true is that our team in Buenos Aires has tested different configurations: more or less RAM, more or less Video Memory, other video driver, but the hashes remained the same.

It would be interesting to test a different operating system: another kernel version, 32 bits instead of 64, redhat instead of debian.

Thanks to the Perl Mongers in Buenos Aires for helping in the analysis.


Protecting your data in the cloud

Hi, this time a post about privacy and some recommendations about protecting what is yours and nobody can take away: your privacy.  In a world where the technology has evolved in complexity that most do not understand how it works it is important to help people learn that they have civil rights and they should be protected.

One way to store private information is the cloud.  This is not the only way and this is probably not the best way, but i guess it is a good way.

We will create a storage to place there what ever you want, it could be passwords, receives, images.  We will use two methods to encrypt the data and one to obfuscate it, you can choose the steps, the order, the amount of passwords, that would make it unique and very hard for somebody to get it.

You will use LUKS, gpg and a perl oneliner.

LUKS is a specification of a ciphered disk.

GPG or GnuPG is a complete and free implementation of the OpenPGP standard as defined by RFC4880.

Protecting your data

  1. Create the LUKS disk.
fallocate -l 1G 4youreyesonly.disk
root@arsat:/home/walter# cryptsetup luksFormat 4youreyesonly.disk

This will overwrite data on 4youreyesonly.disk irrevocably.

Are you sure? (Type uppercase yes): YES
Enter passphrase:
Verify passphrase:

root@arsat:/home/walter# cryptsetup luksOpen 4youreyesonly.disk first
Enter passphrase for 4youreyesonly.disk:

root@arsat:/home/walter# mkfs.ext3 /dev/mapper/first
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 261632 4k blocks and 65408 inodes
Filesystem UUID: 6f1c79b7-f1d5-4e05-b821-ead9ad9afdd0
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

2) Store some data inside the disk

mount /dev/mapper/first /mnt/usb/
cd /mnt/usb
root@arsat:/mnt/usb# ls -ltr
total 20
drwx------ 2 root root 16384 Apr 30 00:28 lost+found
-rw-r--r-- 1 root root    47 Apr 30 00:29 notes

root@arsat:/mnt/usb# cat notes
Protect this data:

Cipher, backup, restore.


3) Now close the LUKS disk.  Unmount and close it.

umount /mnt/usb
cryptsetup luksClose first

4) In this step you will cipher the disk with gpg.  Look that after ciphering it you will have a new file with the “.gpg” extension.  Notice that it is smaller, that is because while ciphering it, given the CAST5 algorithm that gpg uses, it probably resumes the zeroes from the file.

gpg -c 4youreyesonly.disk
-rw-r--r--  1 root   root    1073741824 Apr 30 00:29 4youreyesonly.disk
-rw-r--r--  1 root   root      35226974 Apr 30 00:31 4youreyesonly.disk.gpg

5) Now you can flip the file to make it harder to be recognized.

perl -pe 'BEGIN{$/=\1} $_ = pack("C", unpack("C", $_) ^ 0xff)' < 4youreyesonly.disk.gpg > 4youreyesonly.disk.flipped

6) Validate that the files a different.

root@arsat:/home/walter# md5sum 4youreyesonly.disk.gpg
f1c2ae655f52b7f78b477a887847649a  4youreyesonly.disk.gpg

root@arsat:/home/walter# md5sum 4youreyesonly.disk.flipped
d4ce830d575094aa8e88f3409cb46c8d  4youreyesonly.disk.flipped

root@arsat:/home/walter# file 4youreyesonly.disk.gpg
4youreyesonly.disk.gpg: GPG symmetrically encrypted data (CAST5 cipher)
root@arsat:/home/walter# file 4youreyesonly.disk.flipped
4youreyesonly.disk.flipped: data

You can now probably upload the file “4youreyesonly.disk.flipped” to any public place that nobody will know nor the methods used,  the order and the passwords.

Recovering your data

Now the time has come to recover the data.

  1. Un flip the file
perl -pe 'BEGIN{$/=\1} $_ = pack("C", unpack("C", $_) ^ 0xff)' < 4youreyesonly.disk.flipped > 4youreyesonly.disk.original

2) Gpg decipher:

gpg -o 4youreyesonly.original -d 4youreyesonly.disk.original

3) Open it with LUKS:

cryptsetup luksOpen 4youreyesonly.original first

4) Finally open it.

mount /dev/mapper/first /mnt/usb
root@arsat:/home/walter# cat /mnt/usb/notes
Protect this data:

Cipher, backup, restore.

root@arsat:/home/walter# umount /mnt/usb
root@arsat:/home/walter# cryptsetup luksClose first

Ok and that should be all for now.  I hope you liked it and please keep spreading with your friends how to protect yourself from intrusion of anybody.




Some private browsing tips

In my previous post i recommended about two firefox plugins to truly surf through Internet whoes pages have social network embedded widgets that only report about our presense in those pages and if we are lucky, only that, but i also identifies us because the propagation of cookies.
In this post i will give some recommendations about how to stop Firefox from surfing the web without us knowing it.  The other day i was analyzing what happens in the background in the network with Firefox open, and i was worried for a minute or two because i saw connections going out of my computer but i was not surfing anything…  i had one page open, so i closed it incase that that page had some javascript with a loop doing some connections without me knowing…. but the connections kept being done.

Disclaimer: These steps may do produce undesiderable behavior in your browser, these are notes i have written for myself and am sharing to help anybody that could benefit from them.

How to stop Firefox from automatically making connections without my permission

1) Clean all the live bookmarks if any.
2) Disable auto update (Edit -> Preferences -> Update ->
Never check for updates (not recommended: security risk) 
and uncheck Update Search Engines)

3) Disable auto update for plugins (Tools -> AddOns -> Extensions
At the top of the tab, click the Tools for All Add-ons menu and uncheck Update Add-ons Automatically, then select Reset All Add-ons to Update Automatically.)

4) Anti-phishing list updating (Edit -> Preferences -> Security ->
Block reported web forgeries. and
Block reported attack sites)

5) Add-on blocklist updating, Add-on metadata updating, Link prefetching
In the location bar write: about:config and set:
extensions.blocklist.enabled -> false
extensions.getAddons.cache.enabled -> false
network.prefetch-next -> false

Hacking DHCP in a home network

For good or bad at home i do have a cable provided, it is the traditional service where a coaxial cable is connected to the TV.  Some days ago a technician from the TV cable company came and installed a decoder.  This decoder is a device that connects between the coaxial and the television enabling a better quality of images, it also includes a software with Youtube and applications to watch TV through Internet.

The problem: This decoded is connected to the home network (LAN) but it do not permits to set a static IP address, the only way is that the device obtains an IP/network mask/router ip and dhcp servers through DHCP.
The real problem is that i take very seriously what i enable and not in my home network, each new service is something i worry about.  I wanted to avoid a DHCP server.

How to avoid having to install a DHCP server and make the decoder work ?
Not making it work is no an option.  Solution: Create a DHCP minimalistic server with less than 200 lines, a script if possible, simple to start and close, having control on each IP i assign to each MAC address.

The RFC describes how this protocol works, a picture will help understanding how the program works.

                Server          Client          Server
            (not selected)                    (selected)

                  v               v               v
                  |               |               |
                  |     Begins initialization     |
                  |               |               |
                  | _____________/|\____________  |
                  |/DHCPDISCOVER | DHCPDISCOVER  \|
                  |               |               |
              Determines          |          Determines
             configuration        |         configuration
                  |               |               |
                  |\             |  ____________/ |
                  | \________    | /DHCPOFFER     |
                  | DHCPOFFER\   |/               |
                  |           \  |                |
                  |       Collects replies        |
                  |             \|                |
                  |     Selects configuration     |
                  |               |               |
                  | _____________/|\____________  |
                  |/ DHCPREQUEST  |  DHCPREQUEST\ |
                  |               |               |
                  |               |     Commits configuration
                  |               |               |
                  |               | _____________/|
                  |               |/ DHCPACK      |
                  |               |               |
                  |    Initialization complete    |
                  |               |               |
                  .               .               .
                  .               .               .
                  |               |               |
                  |      Graceful shutdown        |
                  |               |               |
                  |               |\ ____________ |
                  |               | DHCPRELEASE  \|
                  |               |               |
                  |               |        Discards lease
                  |               |               |
                  v               v               v
     Figure 3: Timeline diagram of messages exchanged between DHCP
               client and servers when allocating a new network address

Para los más curiosos, recomiendo estos recursos para leer acerca de DHCP:
Esta es una imagen que armé mientras estudiaba el funcionamiento de este viejo protocolo:

Script server source here.


Compile keepass 2.0.3 on Linux

KeepassX webpage states: “KeePassX is an application for people with extremly high demands on secure personal data management. It has a light interface, is cross platform and published under the terms of the GNU General Public License.”

These steps have been executed on a Debian Linux 8.6.0 but for an experienced System Administrator/Hacker this should be trivial.

First you should have these packages installed:

apt-get install cmake g++ libqt4-core libqt4-dev libgcrypt-dev zlib1g zlib1g-dev

Now you can download the latest keepassX package and compile it:

tar zxvf keepassx-2.0.3.tar.gz
cd keepassx-2.0.3/
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..

As root:

make install

Now you could for example, add the access on a fluxbox window manager:
It works.


An additional LCD notebook monitor

Once i had a notebook, it was red, lenovo, z80… rest in peace.  But after some time something very bad started to happen with that notebook and finally it never started again. Of course i went to Lenovo here in Argentina, i do not know now, i suppose it is not much different, but the official technical service told me that the notebook was a rare model and they may not have the parts, in that case i would not have my money back anyway… (yes, lets cry together with a cold beer).

Whathever, i wanted to recover something from the notebook, i could reuse the hard disk, i can sell the memory, and i wanted to reuse the monitor (if possible).

Step 1: Obtain the monitor code

You will have to open the notebook, it is supposed to be broken anyway. Be carefull, you should extract the monitor, and take some pictures from the back. Write down the numbers, the seller will likelly ask you for them to confirm if he has the circuit for it. If you do not feel secure, ask a friend who may have more experience doing that.

Save the pictures, the selled will likelly ask you for them.

Step 2: Look for a selled of the circuit
I obtained it at ebay, the article at that time looked like this:

I bought it from a selled called xionchung2013
This may sound like publicity, honestly i am just happy because i got the article and i had good luck that it worked. But you wouldn’t believe the troubles i had. In Argentina we had a not so nice government from 2010 to 2015 and the possibility to import things, even they are not done here was arbitrary: only people with friends in the government could do that, and you can imagine that somebody like me is not the profile of somebody that makes friends with politicians. Resuming, the selled sent the product and it never arrived, luckyly it was returned to him, i had to pay him again for the delivery, and the second time i contacted the postal office and followed like a crazy the package.
Yes, lets cry together again with a cold beer in a bar.

Step 3: Connect it and use it!
I have to post some pictures about how it looks like. It is great!

Step 4: Enabling the secondary monitor in linux
I have this script to enable the monitor in the office or at home:

walter@arsat:~$ cat 

if [[ "$1" == "office" ]]; then
	xrandr --auto --output eDP1 --mode 1360x768 --left-of VGA1
	echo "En casa";
	xrandr --auto --output VGA1 --mode 1920x1200 --left-of eDP1