SlideShare une entreprise Scribd logo
1  sur  81
TOP TEN WEB HACKING
TECHNIQUES OF 2013
JOHNATHAN KUSKOS
Threat Research Center, Supervisor
Twitter: @JohnathanKuskos
Email: johnathan.kuskos@whitehatsec.com
MATT JOHANSEN
Threat Research Center, Manager
Twitter: @mattjay
Email: matt@whitehatsec.com
Matt Johansen
• Supervisor for WhiteHat’s Threat Research
Center
• Primarily interested in WAF evasion research
and business logic abuse
• Bug Bounty Hunter && BugCrowd Ninja
• Houston OWASP Chapter Leader
© 2013 WhiteHat Security, Inc. 2
ABOUT
Johnathan Kuskos
• Head of WhiteHat's Threat Research Center
• BlackHat, DEFCON, RSA, etc. Speaker
• Oversees assessment of 20,000+ websites
• Background in Penetration Testing
• Hacker turned Management
• I'm hiring… a lot…
About WhiteHat Security
 Headquartered in Santa Clara, California
 WhiteHat Sentinel: SaaS end-to-end website risk management
platform (static & dynamic vulnerability assessment)
 Employees: 340+
© 2013 WhiteHat Security, Inc. 3
ABOUT THE TOP TEN
© 2013 WhiteHat Security, Inc. 4
“Every year the security community produces a stunning
amount of new Web hacking techniques that are
published in various white papers, blog posts, magazine
articles, mailing list emails, conference presentations,
etc. Within the thousands of pages are the latest ways
to attack websites, Web browsers, Web proxies, and
their mobile platform equivalents. Beyond individual
vulnerabilities with CVE numbers or system
compromises, here we are solely focused on new and
creative methods of Web-based attack.”
© 2013 WhiteHat Security, Inc. 5
Past Years
© 2013 WhiteHat Security, Inc. 6
HISTORY
• CRIME
2012
(56 new techniques)
• BEAST
2011
(51 new techniques)
• 'Padding Oracle' Crypto Attack2010
(69 new techniques)
• Creating a rogue CA certificate2009
(80 new techniques)
• GIFAR (GIF + JAR)2008
(70 new techniques)
• XSS Vulnerabilities in Common Shockwave
Flash Files
2007
(83 new techniques)
• Web Browser Intranet Hacking / Port Scanning2006
(65 new techniques)
31 NEW Techniques
1. Mutation XSS
2. BREACH
3. Pixel Perfect Timing Attacks with HTML5
4. Lucky 13
5. Weaknesses in RC4
6. XML Out of Band Data Retrieval
7. Million Browser Botnet
8. Large Scale Detection of DOM based XSS
9. Tor Hidden Service Passive Decloaking
10.HTML5 Hard Disk Filler
© 2013 WhiteHat Security, Inc. 7
THE YEAR 2013
https://blog.whitehatsec.com/top-10-web-hacking-techniques-2013/
HTML5 Hard Disk Filler
© 2013 WhiteHat Security, Inc. 8
2013 TOP TEN
“The HTML5 Web Storage Standard was developed to allow sites to
store larger amounts of data(5-10 Megabytes) than was previously
allowed by cookies(4 Kilobytes). localStorage is awesome because it’s
supported in all modern browsers(Chrome, Firefox 3.5+, Safari 4+, IE 8+,
etc). It’s not a bug with HTML5, nor the Web Storage Standard, but
rather with how browsers have implemented the standard.”
Feross Aboukhadijeh
https://www.youtube.com/watch?v=XkScSMIr_00
http://feross.org/fill-disk/
http://www.filldisk.com/  Disclaimer: Exploit runs upon visiting this URL. Use at your own risk.
Tor Hidden-Service Passive
Decloaking
© 2013 WhiteHat Security, Inc. 9
2013 TOP TEN
“Someone recently asked me if I knew how to find where Tor-hidden
services were really hosted. I identified a few possible methods for
finding the origin servers, but none of them worked universally – or even
in most situations. Eventually, I did find one way to definitively locate an
origin server. However, that method is not trivial – and is still just
theoretical.”
Robert “RSnake” Hansen
https://blog.whitehatsec.com/tor-hidden-service-passive-de-cloaking/
Large-scale Detection of DOM-
based XSS
© 2013 WhiteHat Security, Inc. 10
2013 TOP TEN
“In recent years, the Web witnessed a move towards sophisticated client-
side functionality. This shift caused a significant increase in complexity of
deployed JavaScript code and thus, a proportional growth in potential
client-side vulnerabilities, with DOM-based Cross-site Scripting being a
high impact representative of such security issues. In this paper, we
present a fully automated system to detect and validate DOM-based XSS
vulnerabilities, consisting of a taint-aware JavaScript engine and
corresponding DOM implementation as well as a context-sensitive exploit
generation approach.”
Sebasitan Lekies, Ben Stock, and Martin Johns
http://ben-stock.de/wp-content/uploads/domxss.pdf
Million Browser Botnet
© 2013 WhiteHat Security, Inc. 11
2013 TOP TEN
“Online advertising networks can be a web hacker’s best friend. For mere
pennies per thousand impressions (that means browsers) there are
service providers who allow you to broadly distribute arbitrary javascript --
even malicious javascript! You are SUPPOSED to use this “feature” to
show ads, to track users, and get clicks, but that doesn’t mean you have
to abide. Absolutely nothing prevents spending $10, $100, or more to
create a massive javascript-driven browser botnet instantly. The real-
world power is spooky cool. We know, because we tested it… in-the-
wild.”
Jeremiah Grossman & Matt Johansen
https://www.youtube.com/watch?v=ERJmkLxGRC0
http://blackhat.com/us-13/briefings.html#Grossman
http://www.slideshare.net/jeremiahgrossman/million-browser-botnet
XML Out of Band Data Retrieval
© 2013 WhiteHat Security, Inc. 12
2013 TOP TEN
Timur Yunusov(Web Application Security Researcher) and
Alexey Osipov(Attack Prevention Mechanisms Researcher)
presented to the world a novel technique for accessing “out-
of-band” data. “It allows us to access files and resources
from victim’s machine and internal network, even when
normal output is possible from the vulnerable application that
handles XML data.”
Timur Yunusov and Alexey Osipov
https://media.blackhat.com/eu-13/briefings/Osipov/bh-eu-13-XML-data-osipov-slides.pdf
http://www.youtube.com/watch?v=eBm0YhBrT_c
Weaknesses in RC4
© 2013 WhiteHat Security, Inc. 13
2013 TOP TEN
“We have found new attacks against TLS that allows an attacker to recover a
limited amount of plaintext from a TLS connection when RC4 encryption is
used. The attacks arise from statistical flaws in the keystream generated by
the RC4 algorithm which become apparent in TLS ciphertexts when the same
plaintext is repeatedly encrypted.”
Nadhem AlFardan, Dan Bernstein, Kenny Paterson, Bertram Poettering and Jacob Schuldt
http://www.isg.rhul.ac.uk/tls/
SSL and TLS
• Used to encrypt web traffic between client and server.
• Implemented in popular Secure Protocols
• HTTPS, IMAP/TLS, POP/TLS, SMPT/TLS, WPA/TKIP etc.
• Can support multiple encryption algorithms including RC4,
CBC, etc.
• Each algorithm has a number of ciphersuites
© 2013 WhiteHat Security, Inc. 14
RC4
Source: http://www.isg.rhul.ac.uk/tls/usenix-presentation.pdf
What is RC4?
• RC4 is a fast stream cipher invented in 1987 by Ron Rivest.
• It does not require padding or IVs, which means it's immune to
recent TLS attacks like BEAST and Lucky13.
• RC4 takes a short (e.g., 128-bit) key and stretches it into a
long string of pseudo-random bytes. These bytes are XORed
with the message you want to encrypt, resulting in what should
be a pretty opaque (and random-looking) ciphertext.
• Research has proven this somewhat incorrect as the
“randomness” has shown some small biases based on large
data set statistical analysis.
• Take many encryptions of the same message and analyze the
small deviations to read the encrypted message.
© 2013 WhiteHat Security, Inc. 15
RC4
Source: http://blog.cryptographyengineering.com/2013/03/attack-of-week-rc4-is-kind-of-broken-in.html
Distribution of RC4
• Recent attacks on CBC based ciphersuites in TLS
• Last 3 years Top 10 & This Years #3 (BEAST, Lucky 13, etc.)
• Suggestions have been to move TO RC4
© 2013 WhiteHat Security, Inc. 16
RC4
First Attack
• Multi Session Attack
• Requires target plaintext to be repeatedly sent in multiple TLS
connections.
• Exploits single-byte biases in the initial 256 bytes of RC4
keystreams.
• Need 230 TLS connections to reliably recover 220 of the first
256 bytes of plaintext.
• Improved to 224 to recover certain bytes reliably.
© 2013 WhiteHat Security, Inc. 17
RC4
Real World Scenario
• Many encryptions of same plaintext are required.
• What is a real world example of encrypting the same plaintext
over and over again?
• Secure Session Cookies!
© 2013 WhiteHat Security, Inc. 18
RC4
Real World Scenario
• Math goes from our enemy to our friend.
• Reduce possibilities of outcome by optimizing analysis with
prior knowledge.
• Cookie example with Gmail (which uses RC4 enabled TLS)
• We know things about the plaintext! Base64 encoded cookies
would reduce possible character set, etc.
• With a bit of JavaScript in a victim’s browser, we can force
many HTTPS connections to Gmail and rack up enough for a
MiTM to analyze.
• Still slightly impractical due to number needed but that could
get better in the future.
© 2013 WhiteHat Security, Inc. 19
RC4
Second Attack
• Single connection/session attack
• Exploits double-byte biases in RC4 keystreams (the Fluhrer-
McGrew biases).
• 10 x 230 encryptions needed to recover a set of 16 consecutive
bytes of plaintext.
• 6 x 230 will achieve a 50% reliability.
• TLS handshake does not need to be rerun which makes this
more efficient than the single-byte bias attack
© 2013 WhiteHat Security, Inc. 20
RC4
Limitations
• Feasible but not practical
• 228 ~ 232 sessions for reliable recovery of initial bytes
• 233 ~ 234 encryptions for reliable recovery of 16 bytes
anywhere in plaintext
© 2013 WhiteHat Security, Inc. 21
RC4
Countermeasures
• Stop using RC4 and start using new (preferably authenticated)
encryption modes.
• If stuck on RC4, discard more initial keystream bytes.
Increases the limitations of the attack.
• Limit number of times cookies can be sent in a certain
timeframe to stop that attack scenario.
© 2013 WhiteHat Security, Inc. 22
RC4
Lucky13
© 2013 WhiteHat Security, Inc. 23
2013 TOP TEN
“The Transport Layer Security (TLS) protocol aims to provide
confidentiality and integrity of data in transit across untrusted networks
like the Internet. It is widely used to secure web traffic and e-commerce
transactions on the Internet. Datagram TLS (DTLS) is a variant of TLS
that is growing in importance. We have found new attacks against TLS
and DTLS that allow a Man-in-the-Middle attacker to recover plaintext
from a TLS/DTLS connection when CBC-mode encryption is used. The
attacks arise from a flaw in the TLS specification rather than as a bug in
specific implementations.”
Nadhem AlFardan and Kenny Paterson
http://www.isg.rhul.ac.uk/tls/Lucky13.html
The team behind the research
© 2013 WhiteHat Security, Inc. 24
LUCKY 13
• Kenny Paterson
• Professor of Information Security and an EPSRC Leadership Fellow in the
Information Security Group
• Nadhem AlFardan
• PhD student in the Information Security Group at Royal Holloway, University of
London
Versions in question
© 2013 WhiteHat Security, Inc. 25
LUCKY 13
• The Lucky Thirteen attack applied(now fixed) to all TLS and DTLS
implementations that are compliant with versions…
• TLS 1.1
• TLS 2.2
• DTLS 1.0
• DTLS 1.2
• SSL 3.0
• TLS 1.0
• Affected Ciphersuites:
• All TLS/DTLS ciphersuites that include CBC-mode
• Affected Implementations
• OpenSSL and GnuTLS
So how does it work?
© 2013 WhiteHat Security, Inc. 26
LUCKY 13
• It uses what’s known
as a padding oracle
attack.
• Data is processed into 16 byte
chunks using MEE, which runs data
through a Message Authentication
Code(MAC) algorithm, then encodes
and encrypts it.
• MEE adds padding to the ciphertext so
that it’s either in 8 or 16 byte boundaries.
• When TLS decrypts the ciphertext, the
padding is removed.
Hash-Based Message Authentication Code
© 2013 WhiteHat Security, Inc. 27
LUCKY 13
Real World Complexities
© 2013 WhiteHat Security, Inc. 28
LUCKY 13
• The attack is multisession
• “The target plaintext must
be repeatedly sent in the
same position in the
plaintext stream in multiple
TLS sessions”
• The attacker must be on
the same LAN as the
victim
Network Jitter!
© 2013 WhiteHat Security, Inc. 29
LUCKY 13
• Must be measured
• Probably not feasible over the internet
• Wifi noise is doubtful as well
• IF it is noisy, it must be “consistently” noisy
• The prize: 16 bytes of encrypted plaintext
DTLS=Practical’ish; TLS=Theoretical
© 2013 WhiteHat Security, Inc. 30
LUCKY 13
• When a record fails to decrypt the TLS server kills the session
• Padding error
• Bad MAC
• However, DTLS keeps the session open!
• Still takes millions of sessions to attack though
Should we be worried?
© 2013 WhiteHat Security, Inc. 31
LUCKY 13
• Responsible Disclosure was used and several vendors were
informed prior to the researches release, including:
• OpenSSL, NSS, gnuTLS, PolarSSL, CyaSSL, MatrixSSL, Opera, F5,
BouncyCastle, Oracle, Apple, Cisco, Microsoft, et al.
• “It is a truism that attacks only get better with time, and we
cannot anticipate what improvements to our attacks, or entirely
new attacks, may yet to be discovered.”
Pixel Perfect Timing Attacks
with HTML5
© 2013 WhiteHat Security, Inc. 32
2013 TOP TEN
“The new HTML5 requestAnimationFrame API can be used to time
browser rendering operations and infer sensitive data based on timing
data. Two techniques are demonstrated which use this API to exploit
timing attacks against Chrome, Internet Explorer and Firefox in order to
infer browsing history and read cross-origin data from other websites.
The first technique allows the browser history to be sniffed by detecting
redraw events. The second shows how SVG filters can be used to read
pixel values from a web page. This allows pixels from cross-origin iframes
to be read using an OCR-style technique to obtain sensitive data from
websites.”
Paul Stone
http://contextis.co.uk/research/white-papers/pixel-perfect-timing-attacks-html5/
Browser History Sniffing
• HTML5 Techniques
• Read Browser History Sniffing – Link Colors
• Read contents of framed contents with timing attacks
• Timing login detection with JavaScript
© 2013 WhiteHat Security, Inc. 33
PIXEL PERFECT TIMING
Not reliable over the internet.
Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
History of browser history sniffing
• Check the CSS! Create a link, check if its blue or purple.
• Ad networks and porn sites loved this and used it on their own
users
• This is fixed since 2010
© 2013 WhiteHat Security, Inc. 34
PIXEL PERFECT TIMING
What’s old is new again!
• Enter requestAnimationFrame()
• This is a function that is called just before each frame is
painted in the browser. (Think refresh rate on your display)
• Can be used in conjuncture with purposely slowing down
certain rendering in a timing attack
© 2013 WhiteHat Security, Inc. 35
PIXEL PERFECT TIMING
Frame by Frame
© 2013 WhiteHat Security, Inc. 36
PIXEL PERFECT TIMING
Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
Simma Down Now
• With normal repainting rates, everything is normal at 16ms per
frame. We want to slow down repainting to notice when its
happening.
• text-shadow: 5px 5px 10px red
© 2013 WhiteHat Security, Inc. 37
PIXEL PERFECT TIMING
Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
How it Works
• Load a frame with a ton of links to 1 URL with the slowing text
shadow
• Use requestAnimationFrame to time the next few frames
• If 1 slow frame (1 repaint) – Link must be blue and unvisited
• If 2 slow frames (2 repaints) – Link must be purple and visited
© 2013 WhiteHat Security, Inc. 38
PIXEL PERFECT TIMING
Demo Site
© 2013 WhiteHat Security, Inc. 39
PIXEL PERFECT TIMING
Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
Part 2 – Reading Pixels
• Enter SVG! – Scalable Vector Graphics (<circle>, <rect>,
<path>, etc.)
• Has a bunch of Filter Effects (blur, displacement maps, etc.)
• Use these filters to alter appearance of any HTML element
• <feMorphology> can either dialate or erode an image to make
it appear thicker or thinner
© 2013 WhiteHat Security, Inc. 40
PIXEL PERFECT TIMING
Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
<feMorphology> Problem
• Can potentially be slow if it has to read entire image
• Optimization code exists for to speed this up but only usable in
certain situations
© 2013 WhiteHat Security, Inc. 41
PIXEL PERFECT TIMING
Must use slow code Can use optimized code
Real World Usage
© 2013 WhiteHat Security, Inc. 42
PIXEL PERFECT TIMING
Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
Real World Usage
• Create a frame of the website you’d like to read out of
• Take a snapshot in time of said frame
• Apply an SVG ‘threshold’ filter to make every pixel either black
or white
• Multiply the image by the “noise” image and the result will be
different based on black or white
• Profit
© 2013 WhiteHat Security, Inc. 43
PIXEL PERFECT TIMING
Demo
© 2013 WhiteHat Security, Inc. 44
PIXEL PERFECT TIMING
Other Example
• That is a bit slow and is copying an image
• How about text? And faster?
• Source code! <iframe src=“view-source:http://…”>
• CSRF Tokens, Private information, etc.
• We know the font (how the pixels are aranged)
© 2013 WhiteHat Security, Inc. 45
PIXEL PERFECT TIMING
© 2013 WhiteHat Security, Inc. 46
PIXEL PERFECT TIMING
Demo
© 2013 WhiteHat Security, Inc. 47
PIXEL PERFECT TIMING
BREACH
© 2013 WhiteHat Security, Inc. 48
2013 TOP TEN
“In this hands-on talk, we will introduce new targeted techniques
and research that allows an attacker to reliably retrieve encrypted
secrets (session identifiers, CSRF tokens, OAuth tokens, email
addresses, ViewState hidden fields, etc.) from an HTTPS channel.
We will demonstrate this new browser vector is real and practical by
executing a PoC against a major enterprise product in under 30
seconds. We will describe the algorithm behind the attack, how the
usage of basic statistical analysis can be applied to extract data
from dynamic pages, as well as practical mitigations you can
implement today.”
Angelo Prado, Neal Harris, Yoel Gluck
https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
Backstory: CRIME
© 2013 WhiteHat Security, Inc. 49
BREACH
Decrypts HTTPS traffic to steal cookies and hijack sessions. Requirements to
become a victim:
1) Attacker can sniff your network traffic.
2) Victim visits evil.com
3) Both the browser and server support any
version of TLS compression or SPDY
Gmail, Twitter, Dropbox, GitHub, etc.
“42% of sites surveyed by his service support TLS compression.” Ivan Ristic
https://www.ssllabs.com/index.html
*Previously
Vulnerable
Never
Vulnerable
Compression Overview
• DEFLATE
• LZ77: reducing bits by reducing redundancy
• Googling the googles -> Googling the g(-13,4)s
• Huffman coding: reducing bits by employing an entropy
encoding algorithm
• AKA. Replace common bytes with shorter codes
© 2013 WhiteHat Security, Inc. 50
BREACH
Source: BlackHat - https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
supersecreX VS. supersecret
© 2013 WhiteHat Security, Inc. 51
BREACH
Source: BlackHat - https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
The Attack
© 2013 WhiteHat Security, Inc. 52
BREACH
Source: BlackHat - https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
What’s needed
• GZIP
• Very prevalent
• Highly impractical to turn off
• Any browser, any web server
• Fairly stable pages
• It only takes one
• Less than 30 seconds for simple
pages
• Minutes to hours for more
complicated dynamic bodies
• MITM / Traffic Visibility
• No tampering / SSL downgrade
© 2013 WhiteHat Security, Inc. 53
BREACH
• SSL / TLS [any version]
• Could be turned off
• A secret in the response body
• CSRF, SID, PII, ViewState
• and much more
• Attacker-supplied data
• Guess (response body reflection)
• Three-characters prefix
• To bootstrap compression
Architecture
© 2013 WhiteHat Security, Inc. 54
BREACH
Source: BlackHat - https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
Command & Control
© 2013 WhiteHat Security, Inc. 55
BREACH
Exploitation Tool
• Guessing byte-by-byte one character at a time
• Random amount of padding
• Collissions:
• Attempt recovery for multiple winners
• Detect & roll-back from wrong path
• Begin guessing the secret
• https://target-server.com/page.php?blah=blah2…
&secret=4bfb
© 2013 WhiteHat Security, Inc. 56
BREACH
Exploitation Tool
• Guessing byte-by-byte one character at a time
• Random amount of padding
• Collissions:
• Attempt recovery for multiple winners
• Detect & roll-back from wrong path
• Correct Guess
• https://target-server.com/page.php?blah=blah2…
&secret=4bfb
© 2013 WhiteHat Security, Inc. 57
BREACH
Successfully guessing the CSRF token
© 2013 WhiteHat Security, Inc. 58
BREACH
Mitigation
• Randomizing the length
• Variable padding
• Fighting against math
• Dynamic Secrets
• Dynamic CSRF tokens per
request
• Masking the Secret
• Random XOR: easy, dirty,
practical
© 2013 WhiteHat Security, Inc. 59
BREACH
• Separating Secrets
• Deliver secrets in input-less
servlets
• Chunked secret separation
• CSRF protect everything
• Unrealistic
• Throttling & Monitoring
• Disabling GZIP
• For dynamic pages
Mutation XSS
© 2013 WhiteHat Security, Inc. 60
2013 TOP TEN
“This attack labeled Mutation-XSS (mXSS) is capable of
bypassing high-end filter systems by utilizing the browser
and its often unknown capabilities - every single one of
them. We analyzed the type and number of websites that
are affected by this kind of attack. The presentation details
what mXSS is, why mXSS is possible and why it is of
importance for defenders as well as professional attackers
to be understood and researched even further.”
Mario Heiderich
https://www.hackinparis.com/talk-mario-heiderich
XSS Defense Assumptions
© 2013 WhiteHat Security, Inc. 61
MUTATION XSS
• 1) Reflected XSS from URL / Parameters
• Input can be filtered
• 2) Persistent XSS by saving something to the application
• Output can be filtered
• Determinations can be made to tell good HTML from bad HTML(sometimes)
• 3) DOMXSS via DOM Properties
• No unfiltered DOMXSS sources
• DOMXSS sinks must be carefully inspected
• Not as impossible to fix as some may make you believe
• With input validated across the board with a strict whitelist + CSP +
XSS protection headers we “SHOULD” be able to mitigate XSS
A little bit of history
© 2013 WhiteHat Security, Inc. 62
MUTATION XSS
• Microsoft added a particular DOM property for convenience
• In IE4
• Gave us access to manipulate the DOM
• Didn’t have to actually manipulate it yourself, you let the browser do it.
• Element.innerHTML
• Direct access to the elements HTML content
• Ammending it by reading or writing to it
• Much easier to use than the traditional way of modifying the DOM
One’s easily more convenient than the other
© 2013 WhiteHat Security, Inc. 63
MUTATION XSS
// The DOM way
var myId = “spanID”;
var myDiv = document.getElementById(“myDivId”);
var mySpan = document.createElement(‘span’);
var spanContent = document.createTextNode(‘Bla’);
mySpan.id = mySpanId;
mySpan.appendChild(spanContent);
mySpan.appendChild(spanContent);
myDiv.appendChild(mySpan);
// The innerHTML way
var myId = “spanID”;
var myDiv = document.getElementById(“myDivId”);
myDiv.innerHTML = ‘<span id=“’ + myId + ‘”>Bla</span>’;
Pros and Cons
© 2013 WhiteHat Security, Inc. 64
MUTATION XSS
• Yay
• It’s easy
• It’s fast
• It’s now a standard
• It just works
• Nay
• Not friendly with tables
• Slow on older browsers
• No XML
• Not as “true” as real DOM
manipulation
Usage in the wild
© 2013 WhiteHat Security, Inc. 65
MUTATION XSS
More assumptions
© 2013 WhiteHat Security, Inc. 66
MUTATION XSS
• It would make sense if we were to assume that:
• f(f(x) == f(x)
• Idempotency
• An elements innerHTML matches exactly what it is
• Sadly it doesn’t
• It’s non-idempotent and changes!
• Usually that’s fine
• Performance
• Fixes bad markup that interferes with proper structure
• Illegal markup in a true DOM tree
http://html5sec.org/innerhtml/
© 2013 WhiteHat Security, Inc. 67
MUTATION XSS
• Test-suite so that you can see the effects of innerHTML
• Screenshots to follow that recreate his live demo
© 2013 WhiteHat Security, Inc. 68
MUTATION XSS
© 2013 WhiteHat Security, Inc. 69
MUTATION XSS
© 2013 WhiteHat Security, Inc. 70
MUTATION XSS
© 2013 WhiteHat Security, Inc. 71
MUTATION XSS
© 2013 WhiteHat Security, Inc. 72
MUTATION XSS
http://html5sec.org/innerhtml/
© 2013 WhiteHat Security, Inc. 73
MUTATION XSS
• Test-suite so that you can see the effects of innerHTML
• Screenshots to follow that recreate his live demo
http://html5sec.org/innerhtml/
© 2013 WhiteHat Security, Inc. 74
MUTATION XSS
• Test-suite so that you can see the effects of innerHTML
• Screenshots to follow that recreate his live demo
http://html5sec.org/innerhtml/
© 2013 WhiteHat Security, Inc. 75
MUTATION XSS
• Test-suite so that you can see the effects of innerHTML
• Screenshots to follow that recreate his live demo
http://html5sec.org/innerhtml/
© 2013 WhiteHat Security, Inc. 76
MUTATION XSS
• Test-suite so that you can see the effects of innerHTML
• Screenshots to follow that recreate his live demo
http://html5sec.org/innerhtml/
© 2013 WhiteHat Security, Inc. 77
MUTATION XSS
• Test-suite so that you can see the effects of innerHTML
• Screenshots to follow that recreate his live demo
MXSS Credits
© 2013 WhiteHat Security, Inc. 78
MUTATION XSS
• Gareth Heyes
• Yosuke Hasegawa
• LeverOne
• Eduardo Vela
• Dave Ross
• Stefano Di Paola
WHAT WE’VE LEARNED
© 2013 WhiteHat Security, Inc. 79
© 2013 WhiteHat Security, Inc. 80
LESSONS
• What’s old is new and improved: Many Web attack techniques from
previous years, including those not appearing on the Top Ten, are
constantly being improved. Researchers leverage new technology
functionality and combine previously known techniques and produce
combinations.
• Encryption: : TLS related attack techniques, by Juliano Rizzo and Thai
Duong, took the #1 spot 3 years in a row (CRIME in 2012, BEAST in
2011 and Padding Oracle in 2010). 3 of the top 5 in 2013 are very
similar. Web security community respects deep technical research
• Creativity: In 2013 we saw attack techniques that ranged from simple
concepts adapted in a unique way to cause a problem, to deep
technical and theoretical research on encryption and TLS flaws. It just
goes to show us that taking something simple and looking at it in a new
light might be all it takes at times.
• All Web security researchers
• Panel of Judges: Peleus Uhely, Jeff Williams, Dan Kaminsky, Romain Gaucher,
Saumil Shah, Giorgio Maone, Troy Hunt, Ivan Ristic
• Everyone in the Web security community who assisted with voting
Thank you to…
JOHNATHAN KUSKOS
Threat Research Center, Supervisor
Twitter: @JohnathanKuskos
Email: johnathan.kuskos@whitehatsec.com
MATT JOHANSEN
Threat Research Center, Manager
Twitter: @mattjay
Email: matt@whitehatsec.com

Contenu connexe

Tendances

Real world blockchains
Real world blockchainsReal world blockchains
Real world blockchainsDmitry Meshkov
 
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...EC-Council
 
DDoS Attacks in 2017: Beyond Packet Filtering
DDoS Attacks in 2017: Beyond Packet FilteringDDoS Attacks in 2017: Beyond Packet Filtering
DDoS Attacks in 2017: Beyond Packet FilteringQrator Labs
 
WPNYC: Moving your site to HTTPS
WPNYC: Moving your site to HTTPSWPNYC: Moving your site to HTTPS
WPNYC: Moving your site to HTTPSPaul Schreiber
 
Pedro Fortuna - Protecting Crypto Exchanges From a New Wave of Man-in-the-Bro...
Pedro Fortuna - Protecting Crypto Exchanges From a New Wave of Man-in-the-Bro...Pedro Fortuna - Protecting Crypto Exchanges From a New Wave of Man-in-the-Bro...
Pedro Fortuna - Protecting Crypto Exchanges From a New Wave of Man-in-the-Bro...Hacken_Ecosystem
 
Your Money or Your Data: Ransomware, Cyber Security and Today’s Threat Landsc...
Your Money or Your Data: Ransomware, Cyber Security and Today’s Threat Landsc...Your Money or Your Data: Ransomware, Cyber Security and Today’s Threat Landsc...
Your Money or Your Data: Ransomware, Cyber Security and Today’s Threat Landsc...Roger Hagedorn
 
Ransomware: Mitigation Through Preparation
Ransomware: Mitigation Through PreparationRansomware: Mitigation Through Preparation
Ransomware: Mitigation Through PreparationHostway|HOSTING
 
Tsc summit #2 - HTTP Header Security
Tsc summit #2  - HTTP Header SecurityTsc summit #2  - HTTP Header Security
Tsc summit #2 - HTTP Header SecurityMikal Villa
 
Symantec Webinar | How to Detect Targeted Ransomware with MITRE ATT&CK
Symantec Webinar | How to Detect Targeted Ransomware with MITRE ATT&CKSymantec Webinar | How to Detect Targeted Ransomware with MITRE ATT&CK
Symantec Webinar | How to Detect Targeted Ransomware with MITRE ATT&CKSymantec
 
[Wroclaw #8] TLS all the things!
[Wroclaw #8] TLS all the things![Wroclaw #8] TLS all the things!
[Wroclaw #8] TLS all the things!OWASP
 
Are your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
Are your cloud servers under attack?– Hacker Halted 2019 – Brian HilemanAre your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
Are your cloud servers under attack?– Hacker Halted 2019 – Brian HilemanEC-Council
 
Ransomware the clock is ticking
Ransomware the clock is tickingRansomware the clock is ticking
Ransomware the clock is tickingManoj Kumar Mishra
 
Ransomware - Impact, Evolution, Prevention
Ransomware - Impact, Evolution, PreventionRansomware - Impact, Evolution, Prevention
Ransomware - Impact, Evolution, PreventionMohammad Yahya
 
Microservices Security Landscape
Microservices Security LandscapeMicroservices Security Landscape
Microservices Security LandscapePrabath Siriwardena
 

Tendances (20)

Real world blockchains
Real world blockchainsReal world blockchains
Real world blockchains
 
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
DNS – Strategies for Reducing Data Leakage & Protecting Online Privacy – Hack...
 
Passwords
PasswordsPasswords
Passwords
 
DDoS Attacks in 2017: Beyond Packet Filtering
DDoS Attacks in 2017: Beyond Packet FilteringDDoS Attacks in 2017: Beyond Packet Filtering
DDoS Attacks in 2017: Beyond Packet Filtering
 
WPNYC: Moving your site to HTTPS
WPNYC: Moving your site to HTTPSWPNYC: Moving your site to HTTPS
WPNYC: Moving your site to HTTPS
 
Pedro Fortuna - Protecting Crypto Exchanges From a New Wave of Man-in-the-Bro...
Pedro Fortuna - Protecting Crypto Exchanges From a New Wave of Man-in-the-Bro...Pedro Fortuna - Protecting Crypto Exchanges From a New Wave of Man-in-the-Bro...
Pedro Fortuna - Protecting Crypto Exchanges From a New Wave of Man-in-the-Bro...
 
Your Money or Your Data: Ransomware, Cyber Security and Today’s Threat Landsc...
Your Money or Your Data: Ransomware, Cyber Security and Today’s Threat Landsc...Your Money or Your Data: Ransomware, Cyber Security and Today’s Threat Landsc...
Your Money or Your Data: Ransomware, Cyber Security and Today’s Threat Landsc...
 
HTTPS, Here and Now
HTTPS, Here and NowHTTPS, Here and Now
HTTPS, Here and Now
 
Ransomware: Mitigation Through Preparation
Ransomware: Mitigation Through PreparationRansomware: Mitigation Through Preparation
Ransomware: Mitigation Through Preparation
 
Tsc summit #2 - HTTP Header Security
Tsc summit #2  - HTTP Header SecurityTsc summit #2  - HTTP Header Security
Tsc summit #2 - HTTP Header Security
 
Symantec Webinar | How to Detect Targeted Ransomware with MITRE ATT&CK
Symantec Webinar | How to Detect Targeted Ransomware with MITRE ATT&CKSymantec Webinar | How to Detect Targeted Ransomware with MITRE ATT&CK
Symantec Webinar | How to Detect Targeted Ransomware with MITRE ATT&CK
 
[Wroclaw #8] TLS all the things!
[Wroclaw #8] TLS all the things![Wroclaw #8] TLS all the things!
[Wroclaw #8] TLS all the things!
 
Are your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
Are your cloud servers under attack?– Hacker Halted 2019 – Brian HilemanAre your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
Are your cloud servers under attack?– Hacker Halted 2019 – Brian Hileman
 
Ransomware the clock is ticking
Ransomware the clock is tickingRansomware the clock is ticking
Ransomware the clock is ticking
 
ToR - Deep Web
ToR -  Deep Web ToR -  Deep Web
ToR - Deep Web
 
Null hyderabad - October Newsbytes
Null hyderabad - October NewsbytesNull hyderabad - October Newsbytes
Null hyderabad - October Newsbytes
 
Ransomware - Impact, Evolution, Prevention
Ransomware - Impact, Evolution, PreventionRansomware - Impact, Evolution, Prevention
Ransomware - Impact, Evolution, Prevention
 
OWASP AppSecUSA Recap
OWASP AppSecUSA RecapOWASP AppSecUSA Recap
OWASP AppSecUSA Recap
 
HTTPS and YOU
HTTPS and YOUHTTPS and YOU
HTTPS and YOU
 
Microservices Security Landscape
Microservices Security LandscapeMicroservices Security Landscape
Microservices Security Landscape
 

Similaire à Top 10 Web Hacks 2013

Top 10 Web Hacks 2012
Top 10 Web Hacks 2012Top 10 Web Hacks 2012
Top 10 Web Hacks 2012Matt Johansen
 
Top Ten Web Hacking Techniques of 2012
Top Ten Web Hacking Techniques of 2012Top Ten Web Hacking Techniques of 2012
Top Ten Web Hacking Techniques of 2012Jeremiah Grossman
 
Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Jeremiah Grossman
 
Linux confau 2019: Web Security 2019
Linux confau 2019: Web Security 2019Linux confau 2019: Web Security 2019
Linux confau 2019: Web Security 2019James Bromberger
 
bh-usa-07-grossman-WP.pdf
bh-usa-07-grossman-WP.pdfbh-usa-07-grossman-WP.pdf
bh-usa-07-grossman-WP.pdfcyberhacker7
 
Why Traditional Web Security Technologies no Longer Suffice to Keep You Safe
Why Traditional Web Security Technologies no Longer Suffice to Keep You SafeWhy Traditional Web Security Technologies no Longer Suffice to Keep You Safe
Why Traditional Web Security Technologies no Longer Suffice to Keep You SafePhilippe De Ryck
 
HTTP cookie hijacking in the wild: security and privacy implications
HTTP cookie hijacking in the wild: security and privacy implicationsHTTP cookie hijacking in the wild: security and privacy implications
HTTP cookie hijacking in the wild: security and privacy implicationsPriyanka Aash
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Jay Nagar
 
How to Ensure You're Launching the Most Secure Website - Michael Tremante
How to Ensure You're Launching the Most Secure Website - Michael TremanteHow to Ensure You're Launching the Most Secure Website - Michael Tremante
How to Ensure You're Launching the Most Secure Website - Michael TremanteWP Engine
 
Afcea 4 internet networks
Afcea 4 internet networksAfcea 4 internet networks
Afcea 4 internet networksPaul Strassmann
 
White paper screen
White paper screenWhite paper screen
White paper screeneltincho89
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeJeremiah Grossman
 
Blockchain in cyber security
Blockchain in cyber securityBlockchain in cyber security
Blockchain in cyber securityPrateek Panda
 
Raúl Siles - Browser Exploitation for Fun and Profit Revolutions [RootedCON 2...
Raúl Siles - Browser Exploitation for Fun and Profit Revolutions [RootedCON 2...Raúl Siles - Browser Exploitation for Fun and Profit Revolutions [RootedCON 2...
Raúl Siles - Browser Exploitation for Fun and Profit Revolutions [RootedCON 2...RootedCON
 
Securing TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography APISecuring TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography APIKevin Hakanson
 
Attacks on the cyber world
Attacks on the cyber worldAttacks on the cyber world
Attacks on the cyber worldNikhil Tripathi
 
W3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesBrad Hill
 
Weaponizing Intelligence: Interdiction in Today’s Threat Landscape
Weaponizing Intelligence:  Interdiction in Today’s Threat LandscapeWeaponizing Intelligence:  Interdiction in Today’s Threat Landscape
Weaponizing Intelligence: Interdiction in Today’s Threat LandscapePriyanka Aash
 
Second line of defense for cybersecurity : Blockchain
Second line of defense for cybersecurity : BlockchainSecond line of defense for cybersecurity : Blockchain
Second line of defense for cybersecurity : BlockchainAhmed Banafa
 

Similaire à Top 10 Web Hacks 2013 (20)

Top 10 Web Hacks 2012
Top 10 Web Hacks 2012Top 10 Web Hacks 2012
Top 10 Web Hacks 2012
 
Top Ten Web Hacking Techniques of 2012
Top Ten Web Hacking Techniques of 2012Top Ten Web Hacking Techniques of 2012
Top Ten Web Hacking Techniques of 2012
 
Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)
 
Linux confau 2019: Web Security 2019
Linux confau 2019: Web Security 2019Linux confau 2019: Web Security 2019
Linux confau 2019: Web Security 2019
 
bh-usa-07-grossman-WP.pdf
bh-usa-07-grossman-WP.pdfbh-usa-07-grossman-WP.pdf
bh-usa-07-grossman-WP.pdf
 
Why Traditional Web Security Technologies no Longer Suffice to Keep You Safe
Why Traditional Web Security Technologies no Longer Suffice to Keep You SafeWhy Traditional Web Security Technologies no Longer Suffice to Keep You Safe
Why Traditional Web Security Technologies no Longer Suffice to Keep You Safe
 
HTTP cookie hijacking in the wild: security and privacy implications
HTTP cookie hijacking in the wild: security and privacy implicationsHTTP cookie hijacking in the wild: security and privacy implications
HTTP cookie hijacking in the wild: security and privacy implications
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )
 
IoT Security: Cases and Methods
IoT Security: Cases and MethodsIoT Security: Cases and Methods
IoT Security: Cases and Methods
 
How to Ensure You're Launching the Most Secure Website - Michael Tremante
How to Ensure You're Launching the Most Secure Website - Michael TremanteHow to Ensure You're Launching the Most Secure Website - Michael Tremante
How to Ensure You're Launching the Most Secure Website - Michael Tremante
 
Afcea 4 internet networks
Afcea 4 internet networksAfcea 4 internet networks
Afcea 4 internet networks
 
White paper screen
White paper screenWhite paper screen
White paper screen
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safe
 
Blockchain in cyber security
Blockchain in cyber securityBlockchain in cyber security
Blockchain in cyber security
 
Raúl Siles - Browser Exploitation for Fun and Profit Revolutions [RootedCON 2...
Raúl Siles - Browser Exploitation for Fun and Profit Revolutions [RootedCON 2...Raúl Siles - Browser Exploitation for Fun and Profit Revolutions [RootedCON 2...
Raúl Siles - Browser Exploitation for Fun and Profit Revolutions [RootedCON 2...
 
Securing TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography APISecuring TodoMVC Using the Web Cryptography API
Securing TodoMVC Using the Web Cryptography API
 
Attacks on the cyber world
Attacks on the cyber worldAttacks on the cyber world
Attacks on the cyber world
 
W3 conf hill-html5-security-realities
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realities
 
Weaponizing Intelligence: Interdiction in Today’s Threat Landscape
Weaponizing Intelligence:  Interdiction in Today’s Threat LandscapeWeaponizing Intelligence:  Interdiction in Today’s Threat Landscape
Weaponizing Intelligence: Interdiction in Today’s Threat Landscape
 
Second line of defense for cybersecurity : Blockchain
Second line of defense for cybersecurity : BlockchainSecond line of defense for cybersecurity : Blockchain
Second line of defense for cybersecurity : Blockchain
 

Dernier

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Dernier (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Top 10 Web Hacks 2013

  • 1. TOP TEN WEB HACKING TECHNIQUES OF 2013 JOHNATHAN KUSKOS Threat Research Center, Supervisor Twitter: @JohnathanKuskos Email: johnathan.kuskos@whitehatsec.com MATT JOHANSEN Threat Research Center, Manager Twitter: @mattjay Email: matt@whitehatsec.com
  • 2. Matt Johansen • Supervisor for WhiteHat’s Threat Research Center • Primarily interested in WAF evasion research and business logic abuse • Bug Bounty Hunter && BugCrowd Ninja • Houston OWASP Chapter Leader © 2013 WhiteHat Security, Inc. 2 ABOUT Johnathan Kuskos • Head of WhiteHat's Threat Research Center • BlackHat, DEFCON, RSA, etc. Speaker • Oversees assessment of 20,000+ websites • Background in Penetration Testing • Hacker turned Management • I'm hiring… a lot…
  • 3. About WhiteHat Security  Headquartered in Santa Clara, California  WhiteHat Sentinel: SaaS end-to-end website risk management platform (static & dynamic vulnerability assessment)  Employees: 340+ © 2013 WhiteHat Security, Inc. 3
  • 4. ABOUT THE TOP TEN © 2013 WhiteHat Security, Inc. 4
  • 5. “Every year the security community produces a stunning amount of new Web hacking techniques that are published in various white papers, blog posts, magazine articles, mailing list emails, conference presentations, etc. Within the thousands of pages are the latest ways to attack websites, Web browsers, Web proxies, and their mobile platform equivalents. Beyond individual vulnerabilities with CVE numbers or system compromises, here we are solely focused on new and creative methods of Web-based attack.” © 2013 WhiteHat Security, Inc. 5
  • 6. Past Years © 2013 WhiteHat Security, Inc. 6 HISTORY • CRIME 2012 (56 new techniques) • BEAST 2011 (51 new techniques) • 'Padding Oracle' Crypto Attack2010 (69 new techniques) • Creating a rogue CA certificate2009 (80 new techniques) • GIFAR (GIF + JAR)2008 (70 new techniques) • XSS Vulnerabilities in Common Shockwave Flash Files 2007 (83 new techniques) • Web Browser Intranet Hacking / Port Scanning2006 (65 new techniques)
  • 7. 31 NEW Techniques 1. Mutation XSS 2. BREACH 3. Pixel Perfect Timing Attacks with HTML5 4. Lucky 13 5. Weaknesses in RC4 6. XML Out of Band Data Retrieval 7. Million Browser Botnet 8. Large Scale Detection of DOM based XSS 9. Tor Hidden Service Passive Decloaking 10.HTML5 Hard Disk Filler © 2013 WhiteHat Security, Inc. 7 THE YEAR 2013 https://blog.whitehatsec.com/top-10-web-hacking-techniques-2013/
  • 8. HTML5 Hard Disk Filler © 2013 WhiteHat Security, Inc. 8 2013 TOP TEN “The HTML5 Web Storage Standard was developed to allow sites to store larger amounts of data(5-10 Megabytes) than was previously allowed by cookies(4 Kilobytes). localStorage is awesome because it’s supported in all modern browsers(Chrome, Firefox 3.5+, Safari 4+, IE 8+, etc). It’s not a bug with HTML5, nor the Web Storage Standard, but rather with how browsers have implemented the standard.” Feross Aboukhadijeh https://www.youtube.com/watch?v=XkScSMIr_00 http://feross.org/fill-disk/ http://www.filldisk.com/  Disclaimer: Exploit runs upon visiting this URL. Use at your own risk.
  • 9. Tor Hidden-Service Passive Decloaking © 2013 WhiteHat Security, Inc. 9 2013 TOP TEN “Someone recently asked me if I knew how to find where Tor-hidden services were really hosted. I identified a few possible methods for finding the origin servers, but none of them worked universally – or even in most situations. Eventually, I did find one way to definitively locate an origin server. However, that method is not trivial – and is still just theoretical.” Robert “RSnake” Hansen https://blog.whitehatsec.com/tor-hidden-service-passive-de-cloaking/
  • 10. Large-scale Detection of DOM- based XSS © 2013 WhiteHat Security, Inc. 10 2013 TOP TEN “In recent years, the Web witnessed a move towards sophisticated client- side functionality. This shift caused a significant increase in complexity of deployed JavaScript code and thus, a proportional growth in potential client-side vulnerabilities, with DOM-based Cross-site Scripting being a high impact representative of such security issues. In this paper, we present a fully automated system to detect and validate DOM-based XSS vulnerabilities, consisting of a taint-aware JavaScript engine and corresponding DOM implementation as well as a context-sensitive exploit generation approach.” Sebasitan Lekies, Ben Stock, and Martin Johns http://ben-stock.de/wp-content/uploads/domxss.pdf
  • 11. Million Browser Botnet © 2013 WhiteHat Security, Inc. 11 2013 TOP TEN “Online advertising networks can be a web hacker’s best friend. For mere pennies per thousand impressions (that means browsers) there are service providers who allow you to broadly distribute arbitrary javascript -- even malicious javascript! You are SUPPOSED to use this “feature” to show ads, to track users, and get clicks, but that doesn’t mean you have to abide. Absolutely nothing prevents spending $10, $100, or more to create a massive javascript-driven browser botnet instantly. The real- world power is spooky cool. We know, because we tested it… in-the- wild.” Jeremiah Grossman & Matt Johansen https://www.youtube.com/watch?v=ERJmkLxGRC0 http://blackhat.com/us-13/briefings.html#Grossman http://www.slideshare.net/jeremiahgrossman/million-browser-botnet
  • 12. XML Out of Band Data Retrieval © 2013 WhiteHat Security, Inc. 12 2013 TOP TEN Timur Yunusov(Web Application Security Researcher) and Alexey Osipov(Attack Prevention Mechanisms Researcher) presented to the world a novel technique for accessing “out- of-band” data. “It allows us to access files and resources from victim’s machine and internal network, even when normal output is possible from the vulnerable application that handles XML data.” Timur Yunusov and Alexey Osipov https://media.blackhat.com/eu-13/briefings/Osipov/bh-eu-13-XML-data-osipov-slides.pdf http://www.youtube.com/watch?v=eBm0YhBrT_c
  • 13. Weaknesses in RC4 © 2013 WhiteHat Security, Inc. 13 2013 TOP TEN “We have found new attacks against TLS that allows an attacker to recover a limited amount of plaintext from a TLS connection when RC4 encryption is used. The attacks arise from statistical flaws in the keystream generated by the RC4 algorithm which become apparent in TLS ciphertexts when the same plaintext is repeatedly encrypted.” Nadhem AlFardan, Dan Bernstein, Kenny Paterson, Bertram Poettering and Jacob Schuldt http://www.isg.rhul.ac.uk/tls/
  • 14. SSL and TLS • Used to encrypt web traffic between client and server. • Implemented in popular Secure Protocols • HTTPS, IMAP/TLS, POP/TLS, SMPT/TLS, WPA/TKIP etc. • Can support multiple encryption algorithms including RC4, CBC, etc. • Each algorithm has a number of ciphersuites © 2013 WhiteHat Security, Inc. 14 RC4 Source: http://www.isg.rhul.ac.uk/tls/usenix-presentation.pdf
  • 15. What is RC4? • RC4 is a fast stream cipher invented in 1987 by Ron Rivest. • It does not require padding or IVs, which means it's immune to recent TLS attacks like BEAST and Lucky13. • RC4 takes a short (e.g., 128-bit) key and stretches it into a long string of pseudo-random bytes. These bytes are XORed with the message you want to encrypt, resulting in what should be a pretty opaque (and random-looking) ciphertext. • Research has proven this somewhat incorrect as the “randomness” has shown some small biases based on large data set statistical analysis. • Take many encryptions of the same message and analyze the small deviations to read the encrypted message. © 2013 WhiteHat Security, Inc. 15 RC4 Source: http://blog.cryptographyengineering.com/2013/03/attack-of-week-rc4-is-kind-of-broken-in.html
  • 16. Distribution of RC4 • Recent attacks on CBC based ciphersuites in TLS • Last 3 years Top 10 & This Years #3 (BEAST, Lucky 13, etc.) • Suggestions have been to move TO RC4 © 2013 WhiteHat Security, Inc. 16 RC4
  • 17. First Attack • Multi Session Attack • Requires target plaintext to be repeatedly sent in multiple TLS connections. • Exploits single-byte biases in the initial 256 bytes of RC4 keystreams. • Need 230 TLS connections to reliably recover 220 of the first 256 bytes of plaintext. • Improved to 224 to recover certain bytes reliably. © 2013 WhiteHat Security, Inc. 17 RC4
  • 18. Real World Scenario • Many encryptions of same plaintext are required. • What is a real world example of encrypting the same plaintext over and over again? • Secure Session Cookies! © 2013 WhiteHat Security, Inc. 18 RC4
  • 19. Real World Scenario • Math goes from our enemy to our friend. • Reduce possibilities of outcome by optimizing analysis with prior knowledge. • Cookie example with Gmail (which uses RC4 enabled TLS) • We know things about the plaintext! Base64 encoded cookies would reduce possible character set, etc. • With a bit of JavaScript in a victim’s browser, we can force many HTTPS connections to Gmail and rack up enough for a MiTM to analyze. • Still slightly impractical due to number needed but that could get better in the future. © 2013 WhiteHat Security, Inc. 19 RC4
  • 20. Second Attack • Single connection/session attack • Exploits double-byte biases in RC4 keystreams (the Fluhrer- McGrew biases). • 10 x 230 encryptions needed to recover a set of 16 consecutive bytes of plaintext. • 6 x 230 will achieve a 50% reliability. • TLS handshake does not need to be rerun which makes this more efficient than the single-byte bias attack © 2013 WhiteHat Security, Inc. 20 RC4
  • 21. Limitations • Feasible but not practical • 228 ~ 232 sessions for reliable recovery of initial bytes • 233 ~ 234 encryptions for reliable recovery of 16 bytes anywhere in plaintext © 2013 WhiteHat Security, Inc. 21 RC4
  • 22. Countermeasures • Stop using RC4 and start using new (preferably authenticated) encryption modes. • If stuck on RC4, discard more initial keystream bytes. Increases the limitations of the attack. • Limit number of times cookies can be sent in a certain timeframe to stop that attack scenario. © 2013 WhiteHat Security, Inc. 22 RC4
  • 23. Lucky13 © 2013 WhiteHat Security, Inc. 23 2013 TOP TEN “The Transport Layer Security (TLS) protocol aims to provide confidentiality and integrity of data in transit across untrusted networks like the Internet. It is widely used to secure web traffic and e-commerce transactions on the Internet. Datagram TLS (DTLS) is a variant of TLS that is growing in importance. We have found new attacks against TLS and DTLS that allow a Man-in-the-Middle attacker to recover plaintext from a TLS/DTLS connection when CBC-mode encryption is used. The attacks arise from a flaw in the TLS specification rather than as a bug in specific implementations.” Nadhem AlFardan and Kenny Paterson http://www.isg.rhul.ac.uk/tls/Lucky13.html
  • 24. The team behind the research © 2013 WhiteHat Security, Inc. 24 LUCKY 13 • Kenny Paterson • Professor of Information Security and an EPSRC Leadership Fellow in the Information Security Group • Nadhem AlFardan • PhD student in the Information Security Group at Royal Holloway, University of London
  • 25. Versions in question © 2013 WhiteHat Security, Inc. 25 LUCKY 13 • The Lucky Thirteen attack applied(now fixed) to all TLS and DTLS implementations that are compliant with versions… • TLS 1.1 • TLS 2.2 • DTLS 1.0 • DTLS 1.2 • SSL 3.0 • TLS 1.0 • Affected Ciphersuites: • All TLS/DTLS ciphersuites that include CBC-mode • Affected Implementations • OpenSSL and GnuTLS
  • 26. So how does it work? © 2013 WhiteHat Security, Inc. 26 LUCKY 13 • It uses what’s known as a padding oracle attack. • Data is processed into 16 byte chunks using MEE, which runs data through a Message Authentication Code(MAC) algorithm, then encodes and encrypts it. • MEE adds padding to the ciphertext so that it’s either in 8 or 16 byte boundaries. • When TLS decrypts the ciphertext, the padding is removed.
  • 27. Hash-Based Message Authentication Code © 2013 WhiteHat Security, Inc. 27 LUCKY 13
  • 28. Real World Complexities © 2013 WhiteHat Security, Inc. 28 LUCKY 13 • The attack is multisession • “The target plaintext must be repeatedly sent in the same position in the plaintext stream in multiple TLS sessions” • The attacker must be on the same LAN as the victim
  • 29. Network Jitter! © 2013 WhiteHat Security, Inc. 29 LUCKY 13 • Must be measured • Probably not feasible over the internet • Wifi noise is doubtful as well • IF it is noisy, it must be “consistently” noisy • The prize: 16 bytes of encrypted plaintext
  • 30. DTLS=Practical’ish; TLS=Theoretical © 2013 WhiteHat Security, Inc. 30 LUCKY 13 • When a record fails to decrypt the TLS server kills the session • Padding error • Bad MAC • However, DTLS keeps the session open! • Still takes millions of sessions to attack though
  • 31. Should we be worried? © 2013 WhiteHat Security, Inc. 31 LUCKY 13 • Responsible Disclosure was used and several vendors were informed prior to the researches release, including: • OpenSSL, NSS, gnuTLS, PolarSSL, CyaSSL, MatrixSSL, Opera, F5, BouncyCastle, Oracle, Apple, Cisco, Microsoft, et al. • “It is a truism that attacks only get better with time, and we cannot anticipate what improvements to our attacks, or entirely new attacks, may yet to be discovered.”
  • 32. Pixel Perfect Timing Attacks with HTML5 © 2013 WhiteHat Security, Inc. 32 2013 TOP TEN “The new HTML5 requestAnimationFrame API can be used to time browser rendering operations and infer sensitive data based on timing data. Two techniques are demonstrated which use this API to exploit timing attacks against Chrome, Internet Explorer and Firefox in order to infer browsing history and read cross-origin data from other websites. The first technique allows the browser history to be sniffed by detecting redraw events. The second shows how SVG filters can be used to read pixel values from a web page. This allows pixels from cross-origin iframes to be read using an OCR-style technique to obtain sensitive data from websites.” Paul Stone http://contextis.co.uk/research/white-papers/pixel-perfect-timing-attacks-html5/
  • 33. Browser History Sniffing • HTML5 Techniques • Read Browser History Sniffing – Link Colors • Read contents of framed contents with timing attacks • Timing login detection with JavaScript © 2013 WhiteHat Security, Inc. 33 PIXEL PERFECT TIMING Not reliable over the internet. Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
  • 34. History of browser history sniffing • Check the CSS! Create a link, check if its blue or purple. • Ad networks and porn sites loved this and used it on their own users • This is fixed since 2010 © 2013 WhiteHat Security, Inc. 34 PIXEL PERFECT TIMING
  • 35. What’s old is new again! • Enter requestAnimationFrame() • This is a function that is called just before each frame is painted in the browser. (Think refresh rate on your display) • Can be used in conjuncture with purposely slowing down certain rendering in a timing attack © 2013 WhiteHat Security, Inc. 35 PIXEL PERFECT TIMING
  • 36. Frame by Frame © 2013 WhiteHat Security, Inc. 36 PIXEL PERFECT TIMING Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
  • 37. Simma Down Now • With normal repainting rates, everything is normal at 16ms per frame. We want to slow down repainting to notice when its happening. • text-shadow: 5px 5px 10px red © 2013 WhiteHat Security, Inc. 37 PIXEL PERFECT TIMING Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
  • 38. How it Works • Load a frame with a ton of links to 1 URL with the slowing text shadow • Use requestAnimationFrame to time the next few frames • If 1 slow frame (1 repaint) – Link must be blue and unvisited • If 2 slow frames (2 repaints) – Link must be purple and visited © 2013 WhiteHat Security, Inc. 38 PIXEL PERFECT TIMING
  • 39. Demo Site © 2013 WhiteHat Security, Inc. 39 PIXEL PERFECT TIMING Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
  • 40. Part 2 – Reading Pixels • Enter SVG! – Scalable Vector Graphics (<circle>, <rect>, <path>, etc.) • Has a bunch of Filter Effects (blur, displacement maps, etc.) • Use these filters to alter appearance of any HTML element • <feMorphology> can either dialate or erode an image to make it appear thicker or thinner © 2013 WhiteHat Security, Inc. 40 PIXEL PERFECT TIMING Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
  • 41. <feMorphology> Problem • Can potentially be slow if it has to read entire image • Optimization code exists for to speed this up but only usable in certain situations © 2013 WhiteHat Security, Inc. 41 PIXEL PERFECT TIMING Must use slow code Can use optimized code
  • 42. Real World Usage © 2013 WhiteHat Security, Inc. 42 PIXEL PERFECT TIMING Source: BlackHat – Paul Stone - https://www.youtube.com/watch?v=KcOQfYlyIqw
  • 43. Real World Usage • Create a frame of the website you’d like to read out of • Take a snapshot in time of said frame • Apply an SVG ‘threshold’ filter to make every pixel either black or white • Multiply the image by the “noise” image and the result will be different based on black or white • Profit © 2013 WhiteHat Security, Inc. 43 PIXEL PERFECT TIMING
  • 44. Demo © 2013 WhiteHat Security, Inc. 44 PIXEL PERFECT TIMING
  • 45. Other Example • That is a bit slow and is copying an image • How about text? And faster? • Source code! <iframe src=“view-source:http://…”> • CSRF Tokens, Private information, etc. • We know the font (how the pixels are aranged) © 2013 WhiteHat Security, Inc. 45 PIXEL PERFECT TIMING
  • 46. © 2013 WhiteHat Security, Inc. 46 PIXEL PERFECT TIMING
  • 47. Demo © 2013 WhiteHat Security, Inc. 47 PIXEL PERFECT TIMING
  • 48. BREACH © 2013 WhiteHat Security, Inc. 48 2013 TOP TEN “In this hands-on talk, we will introduce new targeted techniques and research that allows an attacker to reliably retrieve encrypted secrets (session identifiers, CSRF tokens, OAuth tokens, email addresses, ViewState hidden fields, etc.) from an HTTPS channel. We will demonstrate this new browser vector is real and practical by executing a PoC against a major enterprise product in under 30 seconds. We will describe the algorithm behind the attack, how the usage of basic statistical analysis can be applied to extract data from dynamic pages, as well as practical mitigations you can implement today.” Angelo Prado, Neal Harris, Yoel Gluck https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
  • 49. Backstory: CRIME © 2013 WhiteHat Security, Inc. 49 BREACH Decrypts HTTPS traffic to steal cookies and hijack sessions. Requirements to become a victim: 1) Attacker can sniff your network traffic. 2) Victim visits evil.com 3) Both the browser and server support any version of TLS compression or SPDY Gmail, Twitter, Dropbox, GitHub, etc. “42% of sites surveyed by his service support TLS compression.” Ivan Ristic https://www.ssllabs.com/index.html *Previously Vulnerable Never Vulnerable
  • 50. Compression Overview • DEFLATE • LZ77: reducing bits by reducing redundancy • Googling the googles -> Googling the g(-13,4)s • Huffman coding: reducing bits by employing an entropy encoding algorithm • AKA. Replace common bytes with shorter codes © 2013 WhiteHat Security, Inc. 50 BREACH Source: BlackHat - https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
  • 51. supersecreX VS. supersecret © 2013 WhiteHat Security, Inc. 51 BREACH Source: BlackHat - https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
  • 52. The Attack © 2013 WhiteHat Security, Inc. 52 BREACH Source: BlackHat - https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
  • 53. What’s needed • GZIP • Very prevalent • Highly impractical to turn off • Any browser, any web server • Fairly stable pages • It only takes one • Less than 30 seconds for simple pages • Minutes to hours for more complicated dynamic bodies • MITM / Traffic Visibility • No tampering / SSL downgrade © 2013 WhiteHat Security, Inc. 53 BREACH • SSL / TLS [any version] • Could be turned off • A secret in the response body • CSRF, SID, PII, ViewState • and much more • Attacker-supplied data • Guess (response body reflection) • Three-characters prefix • To bootstrap compression
  • 54. Architecture © 2013 WhiteHat Security, Inc. 54 BREACH Source: BlackHat - https://media.blackhat.com/us-13/US-13-Prado-SSL-Gone-in-30-seconds-A-BREACH-beyond-CRIME-Slides.pdf
  • 55. Command & Control © 2013 WhiteHat Security, Inc. 55 BREACH
  • 56. Exploitation Tool • Guessing byte-by-byte one character at a time • Random amount of padding • Collissions: • Attempt recovery for multiple winners • Detect & roll-back from wrong path • Begin guessing the secret • https://target-server.com/page.php?blah=blah2… &secret=4bfb © 2013 WhiteHat Security, Inc. 56 BREACH
  • 57. Exploitation Tool • Guessing byte-by-byte one character at a time • Random amount of padding • Collissions: • Attempt recovery for multiple winners • Detect & roll-back from wrong path • Correct Guess • https://target-server.com/page.php?blah=blah2… &secret=4bfb © 2013 WhiteHat Security, Inc. 57 BREACH
  • 58. Successfully guessing the CSRF token © 2013 WhiteHat Security, Inc. 58 BREACH
  • 59. Mitigation • Randomizing the length • Variable padding • Fighting against math • Dynamic Secrets • Dynamic CSRF tokens per request • Masking the Secret • Random XOR: easy, dirty, practical © 2013 WhiteHat Security, Inc. 59 BREACH • Separating Secrets • Deliver secrets in input-less servlets • Chunked secret separation • CSRF protect everything • Unrealistic • Throttling & Monitoring • Disabling GZIP • For dynamic pages
  • 60. Mutation XSS © 2013 WhiteHat Security, Inc. 60 2013 TOP TEN “This attack labeled Mutation-XSS (mXSS) is capable of bypassing high-end filter systems by utilizing the browser and its often unknown capabilities - every single one of them. We analyzed the type and number of websites that are affected by this kind of attack. The presentation details what mXSS is, why mXSS is possible and why it is of importance for defenders as well as professional attackers to be understood and researched even further.” Mario Heiderich https://www.hackinparis.com/talk-mario-heiderich
  • 61. XSS Defense Assumptions © 2013 WhiteHat Security, Inc. 61 MUTATION XSS • 1) Reflected XSS from URL / Parameters • Input can be filtered • 2) Persistent XSS by saving something to the application • Output can be filtered • Determinations can be made to tell good HTML from bad HTML(sometimes) • 3) DOMXSS via DOM Properties • No unfiltered DOMXSS sources • DOMXSS sinks must be carefully inspected • Not as impossible to fix as some may make you believe • With input validated across the board with a strict whitelist + CSP + XSS protection headers we “SHOULD” be able to mitigate XSS
  • 62. A little bit of history © 2013 WhiteHat Security, Inc. 62 MUTATION XSS • Microsoft added a particular DOM property for convenience • In IE4 • Gave us access to manipulate the DOM • Didn’t have to actually manipulate it yourself, you let the browser do it. • Element.innerHTML • Direct access to the elements HTML content • Ammending it by reading or writing to it • Much easier to use than the traditional way of modifying the DOM
  • 63. One’s easily more convenient than the other © 2013 WhiteHat Security, Inc. 63 MUTATION XSS // The DOM way var myId = “spanID”; var myDiv = document.getElementById(“myDivId”); var mySpan = document.createElement(‘span’); var spanContent = document.createTextNode(‘Bla’); mySpan.id = mySpanId; mySpan.appendChild(spanContent); mySpan.appendChild(spanContent); myDiv.appendChild(mySpan); // The innerHTML way var myId = “spanID”; var myDiv = document.getElementById(“myDivId”); myDiv.innerHTML = ‘<span id=“’ + myId + ‘”>Bla</span>’;
  • 64. Pros and Cons © 2013 WhiteHat Security, Inc. 64 MUTATION XSS • Yay • It’s easy • It’s fast • It’s now a standard • It just works • Nay • Not friendly with tables • Slow on older browsers • No XML • Not as “true” as real DOM manipulation
  • 65. Usage in the wild © 2013 WhiteHat Security, Inc. 65 MUTATION XSS
  • 66. More assumptions © 2013 WhiteHat Security, Inc. 66 MUTATION XSS • It would make sense if we were to assume that: • f(f(x) == f(x) • Idempotency • An elements innerHTML matches exactly what it is • Sadly it doesn’t • It’s non-idempotent and changes! • Usually that’s fine • Performance • Fixes bad markup that interferes with proper structure • Illegal markup in a true DOM tree
  • 67. http://html5sec.org/innerhtml/ © 2013 WhiteHat Security, Inc. 67 MUTATION XSS • Test-suite so that you can see the effects of innerHTML • Screenshots to follow that recreate his live demo
  • 68. © 2013 WhiteHat Security, Inc. 68 MUTATION XSS
  • 69. © 2013 WhiteHat Security, Inc. 69 MUTATION XSS
  • 70. © 2013 WhiteHat Security, Inc. 70 MUTATION XSS
  • 71. © 2013 WhiteHat Security, Inc. 71 MUTATION XSS
  • 72. © 2013 WhiteHat Security, Inc. 72 MUTATION XSS
  • 73. http://html5sec.org/innerhtml/ © 2013 WhiteHat Security, Inc. 73 MUTATION XSS • Test-suite so that you can see the effects of innerHTML • Screenshots to follow that recreate his live demo
  • 74. http://html5sec.org/innerhtml/ © 2013 WhiteHat Security, Inc. 74 MUTATION XSS • Test-suite so that you can see the effects of innerHTML • Screenshots to follow that recreate his live demo
  • 75. http://html5sec.org/innerhtml/ © 2013 WhiteHat Security, Inc. 75 MUTATION XSS • Test-suite so that you can see the effects of innerHTML • Screenshots to follow that recreate his live demo
  • 76. http://html5sec.org/innerhtml/ © 2013 WhiteHat Security, Inc. 76 MUTATION XSS • Test-suite so that you can see the effects of innerHTML • Screenshots to follow that recreate his live demo
  • 77. http://html5sec.org/innerhtml/ © 2013 WhiteHat Security, Inc. 77 MUTATION XSS • Test-suite so that you can see the effects of innerHTML • Screenshots to follow that recreate his live demo
  • 78. MXSS Credits © 2013 WhiteHat Security, Inc. 78 MUTATION XSS • Gareth Heyes • Yosuke Hasegawa • LeverOne • Eduardo Vela • Dave Ross • Stefano Di Paola
  • 79. WHAT WE’VE LEARNED © 2013 WhiteHat Security, Inc. 79
  • 80. © 2013 WhiteHat Security, Inc. 80 LESSONS • What’s old is new and improved: Many Web attack techniques from previous years, including those not appearing on the Top Ten, are constantly being improved. Researchers leverage new technology functionality and combine previously known techniques and produce combinations. • Encryption: : TLS related attack techniques, by Juliano Rizzo and Thai Duong, took the #1 spot 3 years in a row (CRIME in 2012, BEAST in 2011 and Padding Oracle in 2010). 3 of the top 5 in 2013 are very similar. Web security community respects deep technical research • Creativity: In 2013 we saw attack techniques that ranged from simple concepts adapted in a unique way to cause a problem, to deep technical and theoretical research on encryption and TLS flaws. It just goes to show us that taking something simple and looking at it in a new light might be all it takes at times.
  • 81. • All Web security researchers • Panel of Judges: Peleus Uhely, Jeff Williams, Dan Kaminsky, Romain Gaucher, Saumil Shah, Giorgio Maone, Troy Hunt, Ivan Ristic • Everyone in the Web security community who assisted with voting Thank you to… JOHNATHAN KUSKOS Threat Research Center, Supervisor Twitter: @JohnathanKuskos Email: johnathan.kuskos@whitehatsec.com MATT JOHANSEN Threat Research Center, Manager Twitter: @mattjay Email: matt@whitehatsec.com

Notes de l'éditeur

  1. matt
  2. Here you can see that when we supply some text within s tags the browser actually converts that to uppercase S tags. That makes sense because in HTML4 it was the standard that element names were uppercase. Nothing wrong here, moving on.