3. Story-Traditional external pen testing tale of woe
4. Egg shell- Many environments have hardened exteriors but less protectedinteriorshttp://www.ﬂickr.com/photos/sidereal/2355999910/sizes/o/in/photostream/
5. Effectiveness Web(Server( • <html>( • SELECT(*( • <?php( Web(Browser( Database( OWASP 5- How effective can your penetration testing be if all your doing isassessing a single external system ...
6. without putting it in the context of the whole environment?http://forums.untangle.com/runkel/Logical-Network-Diagram.gif
7. Metasploit / SET Growth * 2011 2010 2009 2008 2007 *nb: not real statistics OWASP 7I call this the state of modern pen testing, you can’t just knock onthe perimeter, you have to pivot through clients
8. Shrinking attack surfaces - offsite SMTP - 3rd party (or different) location web hosting - VPNs - Proxies - Small to zero attack surface.. The attack surface is shrinking.
9. Where’s the data? OWASP 9- Internal systems are where the information is held, or via webportals to *aaS providers .. and- We cant gain access to these systems and their informationwithout pivoting through a client.
10. Patched? OWASP 10- Metasploit, in particular combined with SET, is effective atproviding this pivot point- What if the target environment is patched? Against knownMetasploit exploits.
11. Between full blown exploitation and pure social engineering OWASP 11- This is the advantage point the BeEF has, to happily sit in thebrowser.
12. Lots of HTTP OWASP 12- Lots of websites (@jeremiahg mentioned ~30mil new websites amonth)
13. Got BeEF?- So what is BeEF? For those who dont know, its the BrowserExploitation Framework
14. PHP BeEF OWASP 14- Originally announced on ha.ckers.org in 2006 based entirelyPHP by Wade Alcorn
15. Top 10 2010 - A2 - XSS OWASP 15- In its old incarnation BeEF was a great tool to demonstrate justhow nasty XSS ﬂaws could be (Instead of the typical alert(1);dialog)
16. Method of pivoting, method of penetration OWASP 16 - and trying to become an all-round go-to platform for client-sideexploitation development. - The framework allows a penetration tester to select speciﬁcmodules in real time to target against a hooked browser within itscurrent context (which will provide different, unique, attackvectors)
18. BeEF ArchitectureFramework (slide thanks to Michele @antisnatchor Orru)
19. http://blog.beefproject.comI like utilising Amazon’s EC2 instances. We have a blog poston how to quickly run up a fully blown BeEF instance in notime. .. BeEF Cloud
20. Ruby BeEF
21. Our dev team rely on modern agile developmenttechniques, including a Continuous Integration service viaJenkins, utilising Rake test unit, selenium, capybara etc etc
22. BeEF Trilogy (“Who is your father?”) OWASP 23Beef is currently made up of 3 main components:http://img4.cookinglight.com/i/2009/01/0901p40f-beef-patty-m.jpg?300:300
23. Firstly is the core..http://www.imdb.com/media/rm1627756544/tt0298814
26. Web UI XSSRays Console Proxy/Requester Extensions Demo pages Metasploit Event handling Browser initialisation OWASP 27! - Extensions! ! - Where you need to provide fairly tightly coupled functionalityinto the core, the extensions provide the developer with variousAPI ﬁring points, such as mounting new URL points. Currentlybeef has extensions for the admin web ui, the console, demopages, event handling, initialisation of hooked browsers,metasploit, proxy, requester and the xssrays functionality.
29. It always starts with Hooking OWASP 30The ﬁrst step in getting a browser into the framework is toget it to execute the BeEF payload, there’s a few methods ofachieving this:
30. Hooking BrowsersXSSSocial Engineering (i.e. tiny URL, or phishing via email)Embedding the payload (think drive-by- download)Maintaining persistence after already being hooked (think Tab BeEF Injection) OWASP 31
31. (Ab)use Cases OWASP 32
32. Credit to Michele @antisnatchor Orru and Gareth Hayes forcreating XSSRays
34. Hooking Mobile Devices http://www.youtube.com/watch?v=5SVu6VdLWgs OWASP 35http://www.youtube.com/watch?v=5SVu6VdLWgs
35. Teach a man to Fish BeEF...So lets look at how we can customise BeEF .. ﬁrst we’ll lookat a simple command module
36. RouterPwn.com Compilation of ready to run JS/HTML exploits against many consumer routers Designed to be run on smart phones Great candidate for a collection of BeEF Command Modules OWASP 37RouterPwn, from websec.ca’s Roberto Salgado
38. Each conﬁg ﬁle contains the category, the name, adescription, the authors and targeting conﬁguration (Thisallows you to specify things like Safari only, or “user notify”for iPhone and Safari etc)
39. The module’s ruby ﬁle, in it’s simplest form, is used toconﬁgure what options are conﬁgurable, via theself.options method - and what to do with returned results.
41. Here you can see what the user is presented with in the UI.
42. Introducing “Chipmunking” ..named, at least at themoment, in reference to movie posters, in particular, thismovie poster...so QR codes are .. everywhere..
43. I mean .. Everywhere .. and they’re only becoming moreubuiquitous
44. So lets put together a new extension for BeEF .. lets build acustom hook point (URL) that if you (or your victims) visit it,will be hooked into BeEF, and immediately presented with afull-screen iFrame of the target site .. we’ll then use thecurrent QRCode Extension into BeEF to generate this QRcode for us too..
45. Similar to command modules, extensions require a fewﬁles.The conﬁg ﬁle (again, a yaml ﬁle)and then the extension ruby ﬁle itself.