Top Banner
The Cynical Trust Model James Arlen - @myrcurial Lee Brotherston - @synackpse
108

The Cynical Trust Model

Jul 28, 2015

Download

Technology

Lee Brotherston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Cynical Trust Model

The Cynical Trust Model

James Arlen - @myrcurial Lee Brotherston - @synackpse

Page 2: The Cynical Trust Model

no disclaimer necessary (for a change)

Page 3: The Cynical Trust Model

TRUST

Page 4: The Cynical Trust Model
Page 5: The Cynical Trust Model
Page 6: The Cynical Trust Model
Page 7: The Cynical Trust Model

TRUST

Page 8: The Cynical Trust Model

IS

Page 9: The Cynical Trust Model

EASY

Page 10: The Cynical Trust Model
Page 11: The Cynical Trust Model
Page 12: The Cynical Trust Model
Page 13: The Cynical Trust Model
Page 14: The Cynical Trust Model
Page 15: The Cynical Trust Model
Page 16: The Cynical Trust Model
Page 17: The Cynical Trust Model
Page 18: The Cynical Trust Model
Page 19: The Cynical Trust Model

Networks

Page 20: The Cynical Trust Model

Providers

Page 21: The Cynical Trust Model

SaaS

Page 22: The Cynical Trust Model

IaaS

Page 23: The Cynical Trust Model

*aaS

Page 24: The Cynical Trust Model

Hardware

Page 25: The Cynical Trust Model

Software

Page 26: The Cynical Trust Model

Staff

Page 27: The Cynical Trust Model

Consultants

Page 28: The Cynical Trust Model

Regulators

Page 29: The Cynical Trust Model

Auditors

Page 30: The Cynical Trust Model
Page 31: The Cynical Trust Model

MITM

Page 32: The Cynical Trust Model

Detection

Page 33: The Cynical Trust Model
Page 34: The Cynical Trust Model
Page 35: The Cynical Trust Model
Page 36: The Cynical Trust Model

How, what, why, when?

Page 37: The Cynical Trust Model

Capture all the Packets

Page 38: The Cynical Trust Model

PCAP Toolstcpdump wireshark

tshark

mergecap tcpsplice tcptrace captcp

ntop pcapdiff tcpflow snort

Page 39: The Cynical Trust Model

SYN

ServerClient

SYN/ACK

ACK

HTTP Request

HTTP Response (Header & Data)

More Data……

Page 40: The Cynical Trust Model

SYN

ServerClient

SYN/ACK

ACK

RST/PSH/ACK

HTTP Response

HTTP Request

?

??

Page 41: The Cynical Trust Model

HTTP/1.1 200 OKContent-Type: text/html; charset=ISO-8859-1Content-Script-Type: text/javascriptConnection: closeCache-Control: no-store, no-cache, must-revalidate, max-age=0Expires: -1Pragma: no-cache

<html><head><noscript><meta http-equiv="refresh" content="0;URL=http://64.71.251.10/noscript.pl?policy=72&category=ByteCap-075&"></noscript><title></title><script type="text/javascript">var version=2; var webServer="http://64.71.251.10";</script><script type="text/javascript" src="http://64.71.251.10/ByteCap-075-EO-English/index.js"></script></head><noscript><frameset><frame src="http://64.71.251.10/noscript.pl?policy=72&category=ByteCap-075&"></frameset></noscript><body style="margin:0;"><script type="text/javascript">Bulletin("policy=72&category=ByteCap-075&");</script></body></html>

Page 42: The Cynical Trust Model

Packet Headers

Page 43: The Cynical Trust Model

TCPDUMPip[6] = 0 and tcp[14:2] = 1

Page 44: The Cynical Trust Model

Wire/TSharktcp.window_size_value eq 1

and ip.flags.df == 0

Page 45: The Cynical Trust Model

Snortalert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"INJECTION

suspected TCP injection"; flow:stateless; window:1; fragbits:!D; sid:31337)

Page 46: The Cynical Trust Model

Fun with Firewalls

Page 47: The Cynical Trust Model

But wait, there’s more….

Page 48: The Cynical Trust Model

SYN

ServerClient

SYN/ACK

ACK

RST/PSH/ACK

HTTP Response

HTTP Request

Page 49: The Cynical Trust Model

SYN

ServerClient

SYN/ACK

ACK

HTTP Request

HTTP Response (Header & Data)

Data

Page 50: The Cynical Trust Model

HTTP/1.1 200 OKContent-Type: text/html; charset=ISO-8859-1Content-Script-Type: text/HTMLConnection: close

Page 51: The Cynical Trust Model

Tests

Page 52: The Cynical Trust Model

Retention Timerewrite ^(.*)$ /index.php;

Page 53: The Cynical Trust Model

OoB Indexingrewrite ^(.*)$ /index.php;

+/etc/hosts

+.htaccess

Page 54: The Cynical Trust Model

Document Format<html><head><title>Oh Hai</title></head>

Page 55: The Cynical Trust Model

Document Format<!doctype html><html><head><title>Oh Hai</title></head>

Page 56: The Cynical Trust Model

Mapping the Network

Page 57: The Cynical Trust Model

Traceroute 8bits of magic

Page 58: The Cynical Trust Model

ttl=1

ttl expiry

ttl=2

ttl expiry

ttl=1

reply

ttl=2 ttl=1ttl=3

Page 59: The Cynical Trust Model

2 7.40.72.1 3 209.148.241.61 4 66.185.81.221 5 69.63.251.242 6 69.63.249.26 7 *

2 7.40.72.1 3 209.148.241.61 4 * 5 * 6 69.63.249.26 7 *

tcptraceroute

Page 60: The Cynical Trust Model

Intercept Portscanningfor i in `jot 65535 1`do tcptraceroute -f4 -m5 host $idone >> $i.log

Page 61: The Cynical Trust Model

2 7.11.164.41 3 66.185.90.37 4 209.148.224.205 5 209.148.224.242

6 4.31.208.129

2 7.11.164.41 3 66.185.90.37 4 209.148.224.214 5 209.148.224.209 6 209.148.228.218 7 209.148.228.217 8 209.148.224.254 9 4.31.208.129

tcptraceroute redux

Page 62: The Cynical Trust Model

Intercept Portscanning Reduxnmap -sS —-ttl 64 host

Page 63: The Cynical Trust Model

Which Interface?

My Server

TargetMe

Page 64: The Cynical Trust Model

Scapysendp(Ether(dst="be:ef:11:11:11:11", src="31:33:7a:aa:aa:aa")/IP(src="11.11.11.11", dst="55.55.55.55",ttl=(1,30), options=IPOption('\x07'))/TCP(sport=3125, dport=80, flags="S"), iface="en1")

Page 65: The Cynical Trust Model

So, that network…

Internal Management LAN

extWebServer = "http://64.71.255.194";intWebServer = “http://172.19.11.72";

Page 66: The Cynical Trust Model

SYN

ServerClient

SYN/ACK

ACK

RST/PSH/ACK

TTL = 1

TTL = 2

TTL = 3

Page 67: The Cynical Trust Model

6 31.55.164.187 7 31.55.164.107 8 109.159.248.69 9 109.159.248.1010 62.172.103.187

6 31.55.164.187 7 31.55.164.107 8 109.159.248.104 9 109.159.248.14210 194.71.107.15

Great Firewall of Cameron

Page 68: The Cynical Trust Model

4 98.0.3.14 5 98.0.3.3 6 107.14.19.106 7 107.14.17.194 8 64.86.79.97 9 64.86.79.2

4 98.0.3.14 5 98.0.3.3 6 66.109.6.72 7 107.14.17.192 8 64.86.79.97 9 64.86.79.2

RoadRunner

Page 69: The Cynical Trust Model

What?

Page 70: The Cynical Trust Model

HTTP/1.1 200 OKDate: Thu, 22 May 2014 14:29:09 GMTServer: PerfTechLast-Modified: Thu, 17 Apr 2014 14:42:01 GMTAccept-Ranges: bytesContent-Length: 2387Connection: closeCache-Control: no-store, no-cache, must-revalidate, max-age=0Expires: -1Pragma: no-cacheContent-Type: application/x-javascript

Page 71: The Cynical Trust Model

HTTP/1.0 404 Not FoundDate: Fri, 23 May 2014 14:00:05 GMTServer: PerfTechContent-Length: 25Connection: closeCache-Control: no-store, no-cache, must-revalidate, max-age=0Expires: -1Pragma: no-cacheContent-Type: text/html; charset=iso-8859-1

Page 72: The Cynical Trust Model

Hints in Scripts// Copyright 2005-2011 PerfTech, Inc., All Rights Reserved.

extWebServer = "http://64.71.255.194";intWebServer = “http://172.19.11.72";

displayUrl = "http://www.perftech.com/console/original.html";

Page 73: The Cynical Trust Model
Page 74: The Cynical Trust Model
Page 75: The Cynical Trust Model

Attribution: cat NULL planet - @skalnik

Page 76: The Cynical Trust Model
Page 77: The Cynical Trust Model

Why So Bothered?

Page 78: The Cynical Trust Model

Why Metadata Matters• They know you rang a phone sex service at 2:24 am and spoke

for 18 minutes. But they don't know what you talked about.

• They know you called the suicide prevention hotline from the Golden Gate Bridge. But the topic of the call remains a secret.

• They know you spoke with an HIV testing service, then your doctor, then your health insurance company in the same hour. But they don't know what was discussed.

Page 79: The Cynical Trust Model

GET / HTTP/1.1Host: squarelemon.comUser-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:25.0) Gecko/20100101 Firefox/25.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflateCookie: _pk_ses.4.9b83=*Connection: keep-aliveIf-Modified-Since: Fri, 18 Oct 2013 14:45:41 GMTCache-Control: max-age=0

Page 80: The Cynical Trust Model

What could possibly go

wrong?Photo Attribution: Tom - @tdawks

Page 81: The Cynical Trust Model
Page 82: The Cynical Trust Model
Page 83: The Cynical Trust Model

Demonstration

Page 84: The Cynical Trust Model

Which won’t work.

Page 85: The Cynical Trust Model

Not because we tempted

the demogods

Page 86: The Cynical Trust Model
Page 87: The Cynical Trust Model
Page 88: The Cynical Trust Model

But because MTCC doesn’t

networking

Page 89: The Cynical Trust Model

MTCC DEMO

Page 90: The Cynical Trust Model
Page 91: The Cynical Trust Model

ORIGINAL DEMO

Page 92: The Cynical Trust Model
Page 93: The Cynical Trust Model

Cynical Trust

Page 94: The Cynical Trust Model

Step 1:

Page 95: The Cynical Trust Model

Working Presumption

Page 96: The Cynical Trust Model

Step 2:

Page 97: The Cynical Trust Model

TANSTAAFL

Page 98: The Cynical Trust Model

Step 3:

Page 99: The Cynical Trust Model

Trust but Verify

Page 100: The Cynical Trust Model

Step 4:

Page 101: The Cynical Trust Model

Plan for Resilience

Page 102: The Cynical Trust Model

YOU

Page 103: The Cynical Trust Model

WILL

Page 104: The Cynical Trust Model

LOSE

Page 105: The Cynical Trust Model

DATA

Page 106: The Cynical Trust Model

What do you do about it…

Page 107: The Cynical Trust Model

Trust?

Page 108: The Cynical Trust Model

Thank you!James Arlen - @myrcurial

Lee Brotherston - @synackpse