Category Archives: Open Source

Come crearsi il proprio Cloud cifrato con Tomb e SSHFS

Questo HowTo va letto con la consapevolezza che il concetto di cloud (avere i propri file sparsi per la rete) va nella direzione opposta alla sicurezza. Nonostante questo HowTo renda i tentativi di “farsi gli affari nostri” molto difficili, evitare di spargere in giro i nostri dati è sicuramente la soluzione migliore.

Da un po di tempo ero alla ricerca di una soluzione che mi permettesse di avere a disposizione alcuni dei miei file tra diversi PC senza però dovermi affidare all’uso di servizi commmerciali come DropBox o UbuntuONE.

Innanzitutto per una limitazione tecnica di queste soluzioni:
entrambi i servizi si basano sulla sincronizzazione di una cartella locale del PC su un server remoto (senza gestione dei delta) e questo se si parla di un file “contenitore” cifrato si traduce in una sua completa ri-sincronizzazione ad ogni seppur minima modifica degli elementi contenuti al suo interno (potete immaginare quanto sia scomoda una soluzione del genere se il file “contenitore” cifrato è grande qualche GigaByte).
Di conseguenza utilizzare in maniera sicura questi servizi diventa molto scomdo e non resta quindi che scartare l’ipotesi di una cifratura controllata da noi ed affidarsi all’onestà dei gestori.
Come si dice: fidarsi è bene ma non fidarsi è molto meglio, soprattutto se ad essere in ballo sono i nostri dati personali, la nostra privacy o la nostra sicurezza.

A supporto di una soluzione cloud sicura “fatta in casa” (di cui abbiamo il completo controllo) possiamo utilizzare programmi completamente open-sources e free.
Oltre ad un server remoto da utilizzare come storage dei nostri dati, avremmo quindi bisogno di:

  1. Tomb
  2. openssh
  3. sshfs

Tomb permette di creare dei file contenitori cifrati con AES-256, inoltre contiene interessanti feature per la gestione della chiave segreta come:

  • la possibilità di salvarla in una pendrive usb,
  • la possibilità di proteggerla attraverso la tecnica della steganografia all’interno di un’immagine]

A queto punto, dopo aver installato sul nostro PC tomb e sshfs, passiamo alla creazione della tomba sul nostro PC.
NB: anche se “scomodo” (soprattuto per file di grandi dimensioni) è importate creare la tomba sul nostro PC e successivamente spostarla sul server (soprattutto se il server che pensiamo di utilizzare è condiviso e non ha la partizione swap cifrata).

Il comando per la creazione della tomba è il seguente:

$ tomb-open
Invalid number of options.
[*] Tomb – simple commandline tool for encrypted storage
. version 1.2 (Nov/2011) by Jaromil @ dyne.org

[*] Guided creation of a new Tomb

A Tomb is a special folder that keeps files safe using a password:
it makes use of strong encryption and helps you keep the keys on a
separate USB storage for safer transports.

Inside a Tomb you can store private informations without fear that
other people possessing it will discover your secrets, unless they
have your USB key and your password.

If you choose to proceed now, we’ll guide you through the creation
of a new Tomb.

If you will, I’ll be your Crypto Undertaker.

Do you want to proceed, Master? (y/n) y

[*] Please type in the name for your new tomb file:
> test

[*] How big you want the Tomb to be?
. Type a size number in Megabytes:
> 500

A questo punto inserire la propria password e successivamente scegliere la passphrase della tomba.
Terminata la creazione della tomba, la carichiamo sul server utilizzando scp in questo modo:

scp -P PORT /home/user/test.tomb user@IP.IP.IP.IP:/home/user/cloud

Al termine dell’operazione, montiamo la cartella remota attraverso sshfs in questo modo:

sshfs -o allow_root user@IP.IP.IP.IP:/home/user/cloud /home/user/cloud

Se non dovesse funzionare controllare che all’interno del file di confurazione /etc/fuse.conf sia decommentata la seguente entry:

# Allow non-root users to specify the ‘allow_other’ or ‘allow_root’
# mount options.
#
user_allow_other

L’utilizzo di sshfs ci garantisce il transito dei dati tra il nostro server e noi avvenga in maniera cifrata.

A questo punto apriamo la tomba in questo modo:

$ tomb –ignore-swap open /home/user/cloud/test.tomb -k /home/user/test.tomb.key

La tomba si monta automaticamente dentro /mount/test.tomb/.
Tenete presente che la tomba inizia a sincronizzare gli elementi al suo interno al momento della chiusura, ovvero quando si lancia il seguente comando:

$ tomb close

Considerate che l’esecuzione del comando non sarà immediata e dipenderà dalla dimensione dei file caricati e dalla velocità in upload della vostra connessione. Mettetevi comodi ed aspettate.

Twitter It!

TorChat: messenger application

Giusto per segnalare l’esistenza di questo progetto, anche se non ho ancora avuto modo di provarlo e testarlo.

TorChat è una chat msn-like basata su TOR, che garantisce la cifratura (il traffico tor viaggia cifrato end-to-end) e l’autenticazione della conversazione,  oltre che l’anonimato della propra posizione.

TorChat is a peer to peer instant messenger with a completely decentralized design, built on top of Tor’s location hidden services, giving you extremely strong anonymity while being very easy to use without the need to install or configure anything.

TorChat just runs from an USB drive on any Windows PC. (It can run on Linux and Mac too, in fact it was developed on Linux with cross platform usability in mind from the very first moment on, but the installation on other platforms than Windows is a bit more complicated at the moment)

Riporto qualche stralcio dal sito ufficiale del progetto:

Encryption

All TorChat traffic is encrypted end-to-end.

There are some misunderstandings floating around regarding Tor and encryption. Whenever I mention Tor and encryption in the same sentence the immediate reflex response of many people is: “But Tor provides no encryption!” This statement is true for most applications but not for all. The most commonly known usage of Tor is to use it as an anonymizer for traffic between the anonymous user and a publicly available service in the Internet and while the traffic will travel encrypted through the Tor network it MUST at some point leave the Tor network and enter the unencrypted internet to reach its final destination. This is the origin of the above mentioned “Tor provides no encryption” and it is undoubtedly true for this most widely known and practiced application of Tor and users should understand it.

However, there exists another and less commonly known mode of operation in which two Tor clients can initiate a fully encrypted peer-to-peer connection between each other that will not leave the Tor network at any point! This is what TorChat is using. Both clients build a normal 3 node circuit from each end to some random tor node in the middle to “meet” there and connect their circuits with each other. Upon connection another layer of encryption is established reaching through from one client to the other, building one uninterrupted encrypted tunnel through all 6 nodes between the two end points. This means all TorChat traffic is end2end encrypted. There are no exit nodes involved in this mode, at no point other than your and your buddies own computer will the traffic ever leave the Tor network.

This less known Tor mode is called Tor hidden services, you can read more about it on the above link. It effectively allows true hidden peer-to-peer networks, there are just not many softwares that make any use of its peer-to-peer capability, most use it more in a traditional client-server manner, TorChat is one of the few (and at the moment I don’t know of any other).

Authentication

TorChat buddies authenticate themselves by proving that they are reachable though their .onion address.

The Tor hidden service protocol by itself has no built-in authentication mechanism for incoming connections but it can guarantee that when you initiate an outgoing connection to a given .onion address you can never end up at the wrong counterpart, the one who answers the connection is the one who is in possession of the private key belonging to this address (the private_key file in the hidden_service folder).

Therefore TorChat will not trust any incoming connection and instead immediately try to open an outgoing connection to call back any incoming buddy on the address he pretends to be. A random cookie will then be sent out by both clients on their (trusted) outgoing connection that must be correctly answered on the incoming connection. Only after the answer is found to be correct the incoming connection can be trusted, the status of the buddy will be displayed as on-line and incoming messages from this buddy will be accepted.

It is essential that you don’t lose the private_key file belonging to your ID because the one who finds it will be able to pretend to be you. Using a tool like TrueCrypt is a good idea when you intend to use TorChat on a portable USB drive as these devices can easily be lost or stolen.

Twitter It!

Kriptonite – Ristampa dal basso

Kriptonite è uno di quei libri che non sono mai riuscito a tenere per mano. Forse già non si trovavano copie in vendita quando ho scoperto la sua esistenza.

Per chi come me ha letto la versione in PDF, ma continua comunque a preferire le versioni cartacee dei libri, c’è un’opportunità oggi grazie a Produzioni dal Basso.

E’ possibile finanziare “dal basso” la ristampa di questo libro prenotandone una copia:

Twitter It!

Torbutton 1.4.0 Released

La nuova versione di Tor Button è stata rilasciata

Torbutton 1.4.0 has been released at: https://www.torproject.org/torbutton/

The addon has been disabled on addons.mozilla.org. Our URL is now canonical.

This release features support for Firefox 5.0, and has been tested against the vanilla release for basic functionality. However, it has not been audited for Network Isolation, State Separation, Tor Undiscoverability or Interoperability issues due to toggling under Firefox 5.

If you desire Torbutton functionality with Firefox 4/5, we recommend you download the Tor Browser Bundle 2.2.x alphas from: https://www.torproject.org/dist/torbrowser/ or run Torbutton in its own separate Firefox profile.

The reasons for this shift are explained here: https://blog.torproject.org/blog/toggle-or-not-toggle-end-torbutton

If you find bugs specific to Firefox 5, toggling, and/or extension conflicts, file them under the component “Torbutton”: https://trac.torproject.org/projects/tor/report/14

Twitter It!

Stallman: il Guru dell’informatica

Articolo originale pubblicato su focus.it da Tibi:

La sala dell’Emerson, spazio sociale di Firenze dove si è tenuto Hackmeeting 2011, era zeppa di persone. Dopo due giorni di seminari e sperimentazioni, confronti e scambi peer to peer, vale a dire alla pari, era la volta di Richard Stallman, hacker (non cracker) e fondatore del Free software, attivista per la libertà della rete e dei computer, contro i monopoli. Un ispiratore, un anticipatore di tutto il movimento per il software fai da te, quello che spesso ha dimostrato una superiorità rispetto ad alcuni prodotti commerciali.

Stallman non è una persona qualsiasi: si esprime con toni perentori, che a volte sembrano comandamenti. Ma è anche grazie a lui se i computer non sono diventati, al pari di televisioni e lavatrici, un elettrodomestico qualsiasi, che usiamo solo per una funzione. Così come è grazie agli hackers, come quelli che hanno partecipato ad Hackmeeting, se le sue idee sono progredite e hanno reso i computer una delle macchine più polivalenti mai realizzate.
Stallman, americano, ha dato vita al progetto Gnu (general public license) e al concetto di copyleft, ed è il primo da cui è partita la sfida per creare un sistema operativo libero, vale a dire migliorabile da chiunque e non soggetto al rigido schema del mercato. Copyleft (contrapposto a copyright) è infatti un sistema di licenze che permette a tutti di utilizzare e modificare successivamente un’opera (per esempio un programma), purché il risultato del lavoro possa continuare la sua strada, ovvero essere condiviso, usato e ulteriormente modificato da altri. E’ questo procedimento che ha permesso la nascita di Linux, il sistema operativo che è diventato concorrenziale rispetto a Windows di Microsoft e a Mac Os di Apple. Ma da promotore dell’Enciclopedia universale libera, Nupedia, ha permesso anche l’evoluzione di Wikipedia. read more »

Twitter It!

TAILS 0.7.2

An update to the fully anonymous operating system, TAILS, is now available. Version 0.7.2 includes notable user-visible changes include:

Iceweasel
- Disable Torbutton’s external application launch warning. … which advises using Tails. Tails is running Tails.
- FoxyProxy: install from Debian instead of the older one we previously shipped.

Software
- Upgrade Linux kernel to Debian’s 2.6.32-34squeeze1: fixes tons of bugs, closes a few security holes at well.
- haveged: install an official Debian backport instead of a custom backport.
o unrar: install the version from Debian’s non-free repository. Users report unrar-free does not work well enough.

Plus the usual bunch of minor bug reports and improvements. It can be downloaded from here or via bittorrent to save everyone some bandwidth.

The fully detailed changelog can be found here

Twitter It!

TOR – Website History Movie

A visual history of Tor’s website through code commits

Twitter It!