Category Archives: hacktivism

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 esattamente nella direzione opposta alla sicurezza. Nonostante alcune tecniche rendano i tentativi di “farsi gli affari nostri” particolarmente 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:
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 GB).
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” (l’unica di cui abbiamo il pieno controllo) possiamo utilizzare programmi 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:

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 garantisce che il transito dei dati tra il nostro server e il nostro PC 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/.

L’opzione –ignore-swap permette di far ignorare a tomb l’esistenza della partizione swap. Di non è una buona pratica l’utilizzo di tomb su sistemi che fanno uso della partizione swap, esistono però delle eccezioni: se utilizziamo file system con Full Disk Encryption oppure mediante Ecryptfs oltre alla home cifriamo anche la swap (es. ecryptfs-setup-swap), possiamo ignorare questa precauzione.

Il comando:

$ tomb list

Mostra informazioni sullo stato della tomba (spazio disponibile, ultima apertura, etc)

Tenete presente che la tomba inizia a sincronizzare gli elementi copiati al suo interno non appena ce li spostiamo. Al momento della chiusura della tomba però si potrebbe essere costretti a dover attendere la fine della copia.

Per chiudere la tomba lanciate 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.

Se volete rendere più veloce tutta l’operazione d’apertura create sulla vostra home uno script in bash (es. cloud.sh) e incollateci dentro le seguenti righe:

##!/bash/bin
## mount remote directory with sshfs
sshfs -o allow_root user@IP.IP.IP.IP:/home/user/cloud/ -p PortSSH -C ~/home/user/cloud/
## open tomb
tomb –ignore-swap open /home/user/cloud/test.tomb -k /home/user/test.tomb.key
## print info about tomb
tomb list

rendetelo eseguibile con il seguente comando

$ sudo chmod +x cloud.sh

A questo punto aprite il vostro cloud semplicemente lanciando:

$ ./cloud.sh

Stessa cosa per gestire l’operazione di chiusura, create uno script con il seguente codice:

##!/bash/bin
## close tomb
tomb close cloud
## close remote fs
sudo fusermount -u /home/user/cloud

Altre info su:

http://www.dyne.org/software/tomb/  and https://github.com/dyne/Tomb

Twitter It!

Tor2Web 2.0

Avevo già parlato tempo fa di Tor2Web (qui) e di come questo servizio permetta di raggiungere i siti pubblicati all’interno della rete anonima del progetto Tor (hidden services), con dominio .onion, senza aver installato e configurato Tor.

Con questo progetto si mantiene anonima la locazione del server e se ne aumenta la visibilità permettendo a tutti gli utenti collegati ad internet di accedervi. Al tempo stesso però non garantisce in alcun modo l’anonimato di chi visita il sito.

Va fatta molta attenzione su questo punto ed è bene ricordarsi sempre che se si vuole “rimanere anonimi” è necessario installare e configurare tor.

Ieri è stata rilasciata la nuova versione di Tor2Web (wiki) che introduce alcune novità:

  • A clear disclaimer warning the user that the content is not being served directly from the server, but it comes from the Tor network
  • Contact forms for abuse complaints and to report broken websites
  • Transparent rewriting of URLs into the tor2web form (i.e. so4rmjdiwmqjosxz.onion become so4rmjdiwmqjosxz.tor2web.org)

Inoltre questa versione introduce delle blocklist utili per inibire l’accesso a determinati hidden services ritenuti “fuori policy” dai manteiner dei nodi tor2web. Questa ne è un esempio: http://wiki.tor2web.org/index.php/BlockList_for_tor2web.infosecurity.ch

Per il codice, questa è la pagina GitHub dedicata al progetto: https://github.com/globaleaks/tor2web-2.0

Twitter It!

EFF: Cisco sospenda il supporto alla repressione del governo cinese

Secondo la EFF Cisco systems avrebbe fornito al governo cinese un potente firewall utilizzato per il controllo della rete e la censura di particolari risorse.

Questo sistema denomitano “Great Firewall” permetterebbe al governo cinese di inibire l’accesso a specifiche risorse della rete, così ogni riferimento a Piazza Tiananmen e alla rivoluzione dei gelsomini sparisce dai risulati dei motori di ricerca ed anche l’accesso ai social network come Facebook viene inibito.

Chi come le scrittore dissidente cinese Du Daobin ha denunciato la situazione intentando una causa contro Cisco Systems si è visto arrivare una perquisizione a casa e la condanna a tre anni di reclusione per incitamento alla sovversione del potere statale.

L’EFF ha avviato una campagna per chiedere a Cisco di fermare il supporto alla repressione del governo cinese. E’ possibile partecipare a partire da questo link

l'immagine l'ho presa in prestito da qui
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!

EFF Campaign Increases the Number of Tor Relays by 13.4%

Articolo originale pubblicato sul sito della EFF
Watching the revolutions unfolding in the Arab world this springtime – and learning details first-hand from our friends on the ground – we at EFF struggled to find meaningful ways to support democratic activists and promote online freedom of expression. But we didn’t just want to lend a helping hand –we wanted to create a pathway so that anyone, anywhere in the world, could contribute to making the Internet more private and more resistant to censorship. From these discussions came our idea of launching the Tor Challenge.

We started the Tor Challenge with a simple goal: to launch 100 new Tor relays. Tor is software that individuals –including online activists in authoritarian regimes– can use to mask their IP addresses and proxy out to uncensored networks, helping them dodge network surveillance and elude online censorship. But Tor isn’t merely software – it’s also a network of volunteer computers, each donating bandwidth and acting as a router so that people can bounce their requests through the network, thereby obscuring their digital tracks.

We launched our campaign on May 31, 2011 –and within days surpassed our goal of 100 new relays. Today, we are closing the challenge after adding 549 new relays to the network. This includes:

Exit relays: 123
Middle relays: 299
Bridges: 127
Current bandwidth: 326,084 kb/s
Percentage of Tor network bandwidth: 5.77%

While some of the new relays were later taken offline, the majority of them stayed operational. The total number of public relays in the Tor network has increased by 13.4% during the course of our campaign.

There is an acute need for circumvention technologies in authoritarian regimes – and even activists in many would-be progressive societies may feel safer if they can avoid the electronic gaze of authorities. Jacob Appelbaum, a security researcher and advocate for the Tor Project, recently wrote:

The Tor Challenge is a phenomenal show of support for the Tor network and the network graphs show the results. The efforts expended by EFF supporters around the world have helped to continue the Tor network’s growth in a positive direction. Additionally, the educational efforts made by the EFF have similarly impacted the world; people everywhere understand the need for anonymity as well as how to use Tor to meet their needs in a practical manner.

While EFF’s Tor Challenge may have ended, individuals and organizations that want to create a more private Internet can still run Tor relays. And those who want to support Tor but aren’t tech-savvy can find an ally in TorServers.net, an organization based in Germany that provides technical assistance and support in running Tor relays.

Our gratitude goes out to the hundreds of individuals who set up relays and donated bandwidth to help strengthen the network. They are true defenders of online freedoms.

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!

Wikileaks – What Does it Cost to Change the World?

What do MasterCard, Visa, Bank of America, Paypal and Western Union all have in common? They help you pay for what you want? Well, yes… that is unless you want to help WikiLeaks make the world a better place. To see the shocking details, please go to http://www.wikileaks.org/Banking-Blockade.html

Twitter It!