Ecco un altro articolo tradotto dal blog di Bruce Schneier:
Il sensazionale salvataggio della scorsa settimana di 15 ostaggi in mano all’organizzazione di guerriglieri FARC, fu il risultato di mesi d’intricati inganni da parte del governo columbiano. Al centro c’era un classico attacco man-in-the-middle.
In un attacco man-in-the-middle, l’attaccante si inserisce tra le due parti comunicanti. Entrambi pensano di parlar tra di loro e l’attaccante può cancellare o modificare le comunicazioni secondo il proprio volere.
Il Wall Street Journal lo definisce come il gambetto eseguito in Columbia:
“Il piano potè riuscire perché, per mesi, durante un’operazione, un ufficiale dell’esercito è stato equiparato ad un “telefono rotto”; l’intelligence militare è stata in grado di convincere il rapitore della signorina Betancourt, Gerardo Aguilar, un guerrigliero conosciuto come ‘Cesar,’ che stesse comunicando con i suoi capi supremi nel segretariato dei sette uomini della guerriglia. L’intelligence dell’esercito ha convinto i leader supremi della guerriglia che stessero parlando con Cesar. In realtà, entrambi parlavano con l’intelligence dell’esercito.”
Questo stratagemma funzionò perché, Cesar ed i suoi capi della guerriglia non si conoscevano bene. Non riconoscevano le voci uno dell’altro e non erano amici, o condividevano un passato che avrebbe potuto metterli in guardia dell’inganno. Il man-in-the-middle è sconfitto dal contesto e i guerriglieri FARC non ne avevano.
Ecco perché il man-in-the-middle, abbreviato MITM nella comunità della sicurezza informatica, è un tale problema online: la comunicazione Internet è spesso priva di qualsiasi contesto. Non c’è modo di riconoscere il viso di qualcuno. Non c’è modo di riconoscere la voce di qualcuno. Quando si riceve un’e-mail che si presume provenga da una persona o una organizzazione, non si sa chi l’abbia mandata realmente. Quando si visita un sito web, non si sa se si sta realmente visitando quel sito web. Tutti noi amiamo credere di sapere con chi stiamo comunicando – e la maggior parte delle volte, ovviamente, non ci sono hacker che si inseriscono nelle nostre comunicazioni – ma in realtà, non lo sappiamo. E ci sono molti strumenti hacker che sfruttano questa ingiustificata fiducia e implementano attacchi MITM .
Anche con il contesto, è ancora possibile per il MITM ingannare entrambe le parti – visto che le comunicazioni elettroniche sono spesso intermittenti. Immaginate che uno dei guerriglieri FARC fosse divenuto sospettoso nei riguardi di chi fosse il suo interlocutore. Avrebbe, quindi, fatto una domanda circa un passato condiviso, come test: “Cosa mangiammo per cena, quella volta, l’anno scorso?” o qualcosa di simile. Al telefono, l’hacker non sarebbe stato in grado di rispondere velocemente, quindi il suo inganno sarebbe stato scoperto velocemente. Ma le conversazioni via e-mail non sono sincrone. L’hacker avrebbe potuto semplicemente passare quella domanda all’altro capo della comunicazione e quando avesse avuto la risposta, sarebbe stato in grado di replicare.
Questo è il modo in cui gli attacchi MITM operano nei confronti di sistemi finanziari basati sul web. Una banca chiede l’autenticazione dall’utente: una password, un codice utilizzabile una sola volta da un token o qualsiasi altra cosa. L’hacker seduto nel mezzo riceve la richiesta dalla banca e la passa all’utente. L’utente risponde all’hacker, che passa quella risposta alla banca. Ora la banca presume di parlare con l’utente legittimo e l’hacker è libero d’inviare le transazioni direttamente alla banca. Questo tipo d’attacco bypassa completamente qualsiasi meccanismo d’autenticazione a due fattori e sta divenendo una tattica di furto d’identità sempre più popolare.
Ci sono soluzioni crittografiche agli attacchi MITM e ci sono protocolli web sicuri che li implementano. Molti di loro però, richiedono segreti condivisi, rendendoli utili solamente in situazioni dove le persone già si conoscano e si fidino l’una dell’altra.
I telefoni sicuri progettati dall’Nsa STU-III e STE , risolvono il problema del MITM integrando l’identità di ogni telefono insieme alla propria chiave. (L’Nsa crea tutte le chiavi ed è fidato, quindi funziona.) Quando due telefoni parlano tra loro in sicurezza, si scambiano chiavi e mostrano l’identità dell’altro telefono sullo schermo. Visto che il telefono è in un luogo sicuro, l’utente ora sa con chi sta parlando e se il telefono mostra un’altra organizzazione – come farebbe se ci fosse un attacco MITM in corso – egli dovrebbe attaccare.
Zfone, un sistema VoIP sicuro, protegge contro gli attacchi MITM con una stringa d’autenticazione breve. Dopo che due terminali Zfone si scambiano le chiavi, entrambi i computer mostrano una stringa di quattro caratteri. Gli utenti sono tenuti a verificare manualmente che entrambe le stringhe siano uguali – “il mio schermo dice 5C19; cosa dice il tuo?” – per assicurarsi che i telefoni stiano comunicando direttamente uno con l’altro e non con un MITM. L’ AT&T TSD-3600 lavorava in maniera simile.
Questo genere di protezione è integrato nel SSL, nonostante nessuno lo usi. Quando viene usato normalmente, SSL fornisce una connesione con comunicazioni cifrate a chiunque sia all’altro capo: in egual misura ad una banca e ad un sito di phishing. Ed i migliori siti di phishing creano connessioni SSL valide, in modo da ingannare in maniera ancora più efficace gli utenti. Ma se l’utente lo desidera, potrebbe controllare il certificato SSL manualmente per vedere se sia stato emesso alla ” Banca nazionale dell’attendibilità ” o “Due tizi con un computer in Nigeria.”
Nessuno lo fa, comunque, visto che ci si deve, sia ricordare, che aver voglia di fare fare il lavoro.
( I browser potrebbero rendere questa cosa più semplice, se volessero; ma pare non vogliano.) Nel mondo reale, potresti dirlo semplicemente ad una branca della tua banca, da un bancomat ad un angolo di strada. Ma su internet, un sito di phishing può essere facilmente reso simile al vero sito della tua banca. Qualsiasi metodo per separare le due cose necessita di lavoro. E questo è il primo passo per ingannarti con un attacco MITM .
Il man-in-the-middle non è nuovo e non dev’esser tecnologico. Ma internet rende gli attacchi più semplici e potenti e ciò non cambierà in breve tempo.
Questo articolo è stato pubblicato originariamente da Wired.com.
Another English-Italian translation of a post taken from Bruce Schneier ‘s blog: Schneier on Security
Here is the source text:
Last week’s dramatic rescue of 15 hostages held by the guerrilla organization FARC was the result of months of intricate deception on the part of the Colombian government. At the center was a classic man-in-the-middle attack.
In a man-in-the-middle attack, the attacker inserts himself between two communicating parties. Both believe they’re talking to each other, and the attacker can delete or modify the communications at will.
The Wall Street Journal reported how this gambit played out in Colombia:
“The plan had a chance of working because, for months, in an operation one army officer likened to a ‘broken telephone,’ military intelligence had been able to convince Ms. Betancourt’s captor, Gerardo Aguilar, a guerrilla known as ‘Cesar,’ that he was communicating with his top bosses in the guerrillas’ seven-man secretariat. Army intelligence convinced top guerrilla leaders that they were talking to Cesar. In reality, both were talking to army intelligence.”
This ploy worked because Cesar and his guerrilla bosses didn’t know one another well. They didn’t recognize one anothers’ voices, and didn’t have a friendship or shared history that could have tipped them off about the ruse. Man-in-the-middle is defeated by context, and the FARC guerrillas didn’t have any.
And that’s why man-in-the-middle, abbreviated MITM in the computer-security community, is such a problem online: Internet communication is often stripped of any context. There’s no way to recognize someone’s face. There’s no way to recognize someone’s voice. When you receive an e-mail purporting to come from a person or organization, you have no idea who actually sent it. When you visit a website, you have no idea if you’re really visiting that website. We all like to pretend that we know who we’re communicating with — and for the most part, of course, there isn’t any attacker inserting himself into our communications — but in reality, we don’t. And there are lots of hacker tools that exploit this unjustified trust, and implement MITM attacks.
Even with context, it’s still possible for MITM to fool both sides — because electronic communications are often intermittent. Imagine that one of the FARC guerrillas became suspicious about who he was talking to. So he asks a question about their shared history as a test: “What did we have for dinner that time last year?” or something like that. On the telephone, the attacker wouldn’t be able to answer quickly, so his ruse would be discovered. But e-mail conversation isn’t synchronous. The attacker could simply pass that question through to the other end of the communications, and when he got the answer back, he would be able to reply.
This is the way MITM attacks work against web-based financial systems. A bank demands authentication from the user: a password, a one-time code from a token or whatever. The attacker sitting in the middle receives the request from the bank and passes it to the user. The user responds to the attacker, who passes that response to the bank. Now the bank assumes it is talking to the legitimate user, and the attacker is free to send transactions directly to the bank. This kind of attack completely bypasses any two-factor authentication mechanisms, and is becoming a more popular identity-theft tactic.
There are cryptographic solutions to MITM attacks, and there are secure web protocols that implement them. Many of them require shared secrets, though, making them useful only in situations where people already know and trust one another.
The NSA-designed STU-III and STE secure telephones solve the MITM problem by embedding the identity of each phone together with its key. (The NSA creates all keys and is trusted by everyone, so this works.) When two phones talk to each other securely, they exchange keys and display the other phone’s identity on a screen. Because the phone is in a secure location, the user now knows who he is talking to, and if the phone displays another organization — as it would if there were a MITM attack in progress — he should hang up.
Zfone, a secure VoIP system, protects against MITM attacks with a short authentication string. After two Zfone terminals exchange keys, both computers display a four-character string. The users are supposed to manually verify that both strings are the same — “my screen says 5C19; what does yours say?” — to ensure that the phones are communicating directly with each other and not with an MITM. The AT&T TSD-3600 worked similarly.
This sort of protection is embedded in SSL, although no one uses it. As it is normally used, SSL provides an encrypted communications link to whoever is at the other end: bank and phishing site alike. And the better phishing sites create valid SSL connections, so as to more effectively fool users. But if the user wanted to, he could manually check the SSL certificate to see if it was issued to “National Bank of Trustworthiness” or “Two Guys With a Computer in Nigeria.”
No one does, though, because you have to both remember and be willing to do the work. (The browsers could make this easier if they wanted to, but they don’t seem to want to.) In the real world, you can easily tell a branch of your bank from a money changer on a street corner. But on the internet, a phishing site can be easily made to look like your bank’s legitimate website. Any method of telling the two apart takes work. And that’s the first step to fooling you with a MITM attack.
Man-in-the-middle isn’t new, and it doesn’t have to be technological. But the internet makes the attacks easier and more powerful, and that’s not going to change anytime soon.
This essay originally appeared on Wired.com.