GROUND
CUTTING, DEVOURING AND DIGESTING THE LEGS OFF A BROWSER
1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
1
GROUND CUTTING, DEVOURING AND DIGESTING THE LEGS OFF A BROWSER - - PowerPoint PPT Presentation
GROUND CUTTING, DEVOURING AND DIGESTING THE LEGS OFF A BROWSER MICHELE ANTISNATCHOR ORRU, 18 NOV 2011 1 1 WHO AM I? Penetration Tester @ The Royal Bank of Scotland BeEF core developer: Tunneling Proxy, XssRays integration,
1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
1
2 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
exploits, new Thin+Rack migration, lot of bug-fixing, testing and fun
Silvio bunga-bunga Berlusconi
2
3 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
exploits, new Thin+Rack migration, lot of bug-fixing, testing and fun
Silvio bunga-bunga Berlusconi
3
4 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
4
5 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
(11/09/2011 @totally_unknown) .... we could continue, but you get the idea....
5
6 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
and generally victim browser security-context abuse.
each context may provide a set of unique attack vectors.
modules (in real-time) to target each browser, and therefore each context.
6
7 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
7
8 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
and Tor
8
9 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
9
10 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
start to fingerprint the internal network via Javascript to find common servers and devices.
img onload=function() { if (image width/height/path == deviceImageMapEntry) deviceXYZ@IP has been successfully found }
10
11 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
by Juan Galiana and Javier Marcos (BeEF developers now:-)
http://www.appsecusa.org/p/pwn.pdf http://nebula.indocisc.co.id/~za/owasp/appseceu2011/ JM%20del%20Prado%20&%20JG%20Lara%20-%20 Intranet%20Footprinting.pdf http://www.youtube.com/watch?v=zOJ1LUfcv3k
11
12 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
you need to have direct access to the target (or use a host as a pivot)
http://www.youtube.com/user/TheBeefproject#p/a/u/2/0n7qfvo_CMM
12
13 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
is executed, we loose the browser :-(
13
14 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
the BeEF hook will remain active in the background. Javascript keylogging is native in BeEF, and we also have a second module to enable keylogging in the iFrame (attaching events to it)
Karlsson
something when the user wants to browse away by clicking on them.
target=”_blank” already -> no big deal)
14
15 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
want to autorun
in BeEF, the module will be automatically launched
in Metasploit autopwn module (another feature ported back)...
15
16 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
in the hooked browser
proxy
port Erlend Oftedal’s malaRIA to BeEF to extend the tunneling proxy to cross-domain resources using Flash liberal cross-domain policies <allow-access-from domain="*" /> ...how many WebServers whit liberal cross-domain policy do you have in your internal network...???
16
17 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
will see the following scenarios:
through the security context of the victim browser (cookies are automatically added to XHRs with jQuery);
victim browser;
(through the victim browser too :-) ).
http://www.youtube.com/user/TheBeefproject#p/a/u/1/Z4cHyC3lowk
17
18 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
XSS scanner
and URI paths of the page where the browser is hooked are vulnerable to XSS.
page where it is loaded and check for XSS on GET, POST parameters, and also in the URI path creating hidden iFrames.
18
19 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
location.hash fragment) in order to have a sort of callback between parent and child iFrames
19
20 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
successfully executed (thus, the XSS confirmed).
minimized adding more attack vectors that covers different scenarios)
contains the vector will point to a known BeEF resource. The following is an example value of that document.location.href: ✴http://192.168.84.1:3000/ui/xssrays/rays?
hbsess=ZdGQG32VvYmozDP3ia0mvNd5PwcjR9lXuzmTmxm1mAckrgjqA9bIfg41Si2eO fVpviNWYk9vi2q3kvZB&action=ray&raysid=3&p=http://192.168.84.128/dvwa/ vulnerabilities/xss_r/?name=%22%3E%3Cscript%3Ealert(1)%3C%2Fscript %3E&n=Standard%20script%20injection%20double&m=GET
20
21 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
21
22 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
22
23 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
23
24 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
24
25 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
25
26 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
26
27 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
27
28 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
28
29 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
29
1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
30
1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
31
32 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
already detecting BeEF with regex ;-)
32
33 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
33
34 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
(Please note: we’ll not pay you. You know we love OpenSource :-)
34
35 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
35
36 1
MICHELE “ANTISNATCHOR” ORRU’, 18 NOV 2011
36