mitm

fr

Bon, fini de rire, place à de la technique pure. Aujourd’hui je vous propose de réaliser une attaque dite « Man in the Middle », l’homme du milieu, qui est aussi nommée ARP Spoofing.

L’ARP Spoofing, c’est sur le schéma, c’est facile, efficace. Le but est ici de récupérer l’information entre un ordinateur et le serveur/routeur distant. (d’où l’idée de « milieu »). Donc : s’intercaler entre 2 machines.
Pour cela, il faut être connecté au sein du même réseau local que la machine visée. Ainsi, on « placera » notre machine entre le routeur et la machine ciblée, afin de récuperer les données transitantes sur le réseau (dont les mots de passe que l’utilisateur utilise pour se connecter à des sites etc… Mais ça, c’est illégal bien sûr.)

Je vais ici aborder la technique la plus « user-friendly », en utilisant le logiciel Ettercap, en mode GUI. (bien qu’ARPSpoof soit un logiciel tout aussi efface, et rapide).

Pour installer Ettercap sous Fedora :

yum install ettercap

Une fois cela fait, on lance le logiciel, avec la GUI (en root) :

# ettercap -G

Voilà qui est fait. Maintenant, on lance l’attaque ^^ (Pour vous sentir tout puissant, je vous conseille de mettre Ride of the Valkyries de Richard Wagner en musique de fond ou encore l’Imperial March de John Williams ^^ ) :

Sniff -> Unified sniffing

Ici, choisissez votre interface réseau. Ensuite :

Hosts -> Scan for hostsHosts -> Hosts list

Ici, la liste des stations connectées apparaît. On va faire notre marché et choisir nos cibles ^^ .
Donc cliquez sur le routeur (généralement 192.168.1.1) pour le mettre en surbrillance, puis « Add to Target 1″. Si toutes les autres stations sont vos cibles, laissez comme cela, sinon choisissez votre cible et cliquez sur « Add to Target 2″.

Là on va rigoler. :D

Mitm -> Arp poisoning...

Cocher "Sniff remote connections"

Start -> Start sniffing

Plugins -> Manage the plugins -> Chk_poison (vérifie le bon déroulement de l'ARP Poisoning)

Normalement, le cache ARP devrait être empoisonné et tous les paquets devraient faire un tour par votre machine…c’est beau non ? o()o
Maintenant Ettercap devrait vous transmettre tout seul les noms d’utilisateurs et mot de passe d’un site internet par exemple. Mais ça ne suffit pas, on va démarrer Wireshark pour analyser le traffic comme il se doit. (en root) :

# wireshark

Là :

Capture -> Options -> Choisir l'interface, puis start

Maintenant ça devrait être le bazar…rassurez-vous, il suffit d’enter http.cookie dans le filtre. Alors Wireshark vous donnera les connexions http où un cookie est utilisé…cookie qui peut être volé et intégré à votre navigateur pour bénéficier des accès administrateurs d’un site ou d’un forum par exemple. Mais là, on entre un peu plus sur le terrain de l’illégalité, je m’arrête donc ici. Il me semble qu’avec tout cela vous aurez de quoi vous « amuser ».

frStop laughing, up to the pure technical ! Today I propose you to make an attack named « Man in the Middle », or ARP Spoofing.

ARP Spoofing is on the draw, is simple, effective. The aim is to recover informations (packets) between a computer and the distant server/router. (So, « in the Middle »).
It is necessary to be in the same Local Network that both computers. Then, we will place our computer between router and the target computer to retrieve information transmitted over the network (including passwords user uses to connect to websites etc…But this is illegal, of course.)

I will use the most « user-friendly » technical, using the Ettercap software, in GUI mode (although ARPSpoof is as quick and efficient software)
To install Ettercap on Fedora :

yum install ettercap

Then, we run the software, with GUI (with root) :

# ettercap -G

Now, we launch the attack ^^ (For a powerful attitude, you should put Ride of the Valkyries of Richard Wagner or the Imperial March of John Williams in background music ^^ ) :

Sniff -> Unified sniffing

Now, choose your network interface. Then :

Hosts -> Scan for hostsHosts -> Hosts list

Here, the list of stations online appears. We will choose our targets ^^ .
So, click on the router to put it in highlight, and click on « Add to Target 1″. If all others computers are targets too, it’s okay. Else, select your others targets and click on « Add to Target 2″.

We’ll laugh. :D

Mitm -> Arp poisoning...

Tick "Sniff remote connections"

Start -> Start sniffing

Plugins -> Manage the plugins -> Chk_poison (Check ARP Poisoning Process)

Normaly, ARP cache must be poisoned and all packages should take a tour through your machine…beautiful, isn’t it ? o()o
Now Ettercap must give you usernames and passwords of websites, for example. But it’s not enough. We will run Wireshark to analyze traffic as it should. (with root) :

# wireshark

And :

Capture -> Options -> Choose Network interface, and start

Now, enter http.cookie in Filter to clarify. Wireshark will give you http connections where a cookie is used…cookie which can be stolen and pasted in your Web Browser to benefit of access administrators from forum or websites for example.
But we enter a little more on the ground of illegality…So I’ll stop here.

Have fun 8-)