SlideShare a Scribd company logo
1 of 33
Browser Hacker's Handbook
Chapter 5
Tutorial on
Browser Exploitation Framework (BeEF)
Laurel Marotta
Laurel.Marotta@IntentionalPrivacy.com
http://intentionalprivacy.com/
2
BeEF
Browser Exploitation Framework
Project: http://beefproject.com/
Wiki: https://github.com/beefproject/beef/wiki
FAQ: https://github.com/beefproject/beef/wiki/FAQ
Blog: http://blog.beefproject.com
YouTube: https://www.youtube.com/user/TheBeefproject
Authors:
Wade Alcorn – creator of BeEF
Christian Frichot – lead developer of BeEF
Michele Orrù – lead core developer of BeEF
3
BeEF
● Written in Ruby and JavaScript
https://github.com/beefproject/beef
4
Installation
● Installed by default on Kali
Directions for installing on other types of systems:
● https://github.com/beefproject/beef/wiki/Installation
● http://resources.infosecinstitute.com/beef-part-1/
[see section 2.1]
5
Update / Upgrade
apt-get update
apt-get upgrade
gem install bundler
6
Method: Beef.net.send()
https://github.com/beefproject/beef/blob/master/core/main/client/net.js#L110
https://github.com/beefproject/beef/blob/master/core/main/client/dom.js#L377
7
Password
● The default user name / password is beef
● To change the user name / password
cd /etc/beef-xss/
vi config.yaml
# Credentials to authenticate in BeEF. Used by both the
RESTful API and the Admin_UI extension credentials:
user: "beef"
passwd: "beef"
8
Starting BeEF
cd /usr/share/beef-xss
./beef
You will see ==>
● To stop the BeEF server,
press Control+C
● To start the BeEF console,
open a browser
and type one of the IPs
ending in /ui/panel:
http://192.168.15.129:3000/ui/panel
9
BeEF user interface
10
BeEF user interface
11
BeEF “hooks”
12
Restful API
https://github.com/beefproject/beef/wiki/BeEF-RESTful-API
From version 0.4.3.3, BeEF exposes a RESTful API allowing
scripting BeEF through HTTP/JSON requests.
You can find the necessary token (which changes each time
BeEF is loaded)
by looking for the
Restful API key
13
Adding the key
14
Command Line
If you want to write automated scripts that uses the RESTful API, you can issue a POST request to
/api/admin/login using the BeEF credentials you will find in the main config.yaml file, like this curl example:
curl -H "Content-Type: application/json" -X POST -d '{"username":"beefy", "password":"beefy"}'
http://127.0.0.1:3000/api/admin/login
Result shown below (notice token is returned)
15
Running a command
● In the Hooked Browser window, click on an online browser
● Then click on the Commands tab
● Choose a folder in the Module Tree pane, i.e., click the
folder Debug
● Click an action that has a green traffic light in front of it,
i.e., Return Ascii Chars
● In the right-hand pane, click Execute
● Click in the Module Results History pane—the results will
take a minute to show up in Command Results
16
Running a command
17
BeEF server
18
Altoromutual.com demo
19
Get Page HTML BeEF Module
20
Replace Content (Deface)
21
Chapter 5
Week 2
22
BeEF service
Starting BeEF service from the command line:
service beef-xss start
Stopping BeEF service manually:
service beef-xss stop
23
Configuring Metasploit
Configuration files:
/etc/beef-xss/config.yaml
/usr/share/beef-xss/extensions/metasploit/config.yaml
Host and callback_host parameters should have the host IP address
Change passwords if necessary
https://github.com/beefproject/beef/wiki/Configuration
https://github.com/beefproject/beef/wiki/Metasploit
24
Configuring Metasploit
Configuration files:
/etc/beef-xss/config.yaml
/usr/share/beef-xss/extensions/metasploit/config.yaml
Host and callback_host parameters should have the IP address of
your external interface
Change passwords if necessary
https://github.com/beefproject/beef/wiki/Configuration
https://github.com/beefproject/beef/wiki/Metasploit
25
beef.rc
load msgrpc ServerHost=192.168.15.129 Pass=abc123
26
Starting Metasploit
service postgresql start
ss -ant ==> what's running
service metasploit start
msfconsole -r /usr/share/beef-xss/beef.rc
==>Maps BeEF to Metasploit
db_status
27
Starting BeEF with Metasploit
● Start Metasploit first
● Open a new terminal window
cd /usr/share/beef-xss
./beef
28
BeEF not connected to Metasploit
correctly
29
BeEF connected to Metasploit
Notice password
30
Start beef
31
XssRays
BeEF's approach results in false-positive free findings
for cross-site scripting because BeEF must exploit the
XSS to discover the vulnerability.
32
BeEF exploits
http://resources.infosecinstitute.com/beef-part-2/
Shows some neat exploits
33
Resources
How to Enable Autorun Modules in BeEF
http://www.subliminalhacking.net/2013/01/03/how-to-autorun-modules-in-beef-
browser-exploitation-framework/
https://www.youtube.com/watch?v=qATHn_iKCas
However: not all modules will autorun

More Related Content

What's hot

DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
Magento Dev
 
Rock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment WorkflowsRock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment Workflows
AOE
 

What's hot (18)

Browser exploit framework
Browser exploit frameworkBrowser exploit framework
Browser exploit framework
 
Multithreaded XML Import (San Francisco Magento Meetup)
Multithreaded XML Import (San Francisco Magento Meetup)Multithreaded XML Import (San Francisco Magento Meetup)
Multithreaded XML Import (San Francisco Magento Meetup)
 
How Vorlon.js helps you debug your web projects
How Vorlon.js helps you debug your web projectsHow Vorlon.js helps you debug your web projects
How Vorlon.js helps you debug your web projects
 
Fluentlenium Functional tests hang.pdf
Fluentlenium Functional tests hang.pdfFluentlenium Functional tests hang.pdf
Fluentlenium Functional tests hang.pdf
 
Defending Against Application DoS attacks
Defending Against Application DoS attacksDefending Against Application DoS attacks
Defending Against Application DoS attacks
 
Cross Context Scripting attacks & exploitation
Cross Context Scripting attacks & exploitationCross Context Scripting attacks & exploitation
Cross Context Scripting attacks & exploitation
 
Maven 3 New Features
Maven 3 New FeaturesMaven 3 New Features
Maven 3 New Features
 
Exploiting Firefox Extensions
Exploiting Firefox ExtensionsExploiting Firefox Extensions
Exploiting Firefox Extensions
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
 
Window Shopping Browser - Bug Hunting in 2012
Window Shopping Browser - Bug Hunting in 2012Window Shopping Browser - Bug Hunting in 2012
Window Shopping Browser - Bug Hunting in 2012
 
Running and Scaling Magento on AWS
Running and Scaling Magento on AWSRunning and Scaling Magento on AWS
Running and Scaling Magento on AWS
 
DevHub 3 - Composer plus Magento
DevHub 3 - Composer plus MagentoDevHub 3 - Composer plus Magento
DevHub 3 - Composer plus Magento
 
Dependency management in Magento with Composer
Dependency management in Magento with ComposerDependency management in Magento with Composer
Dependency management in Magento with Composer
 
Rock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment WorkflowsRock-solid Magento Development and Deployment Workflows
Rock-solid Magento Development and Deployment Workflows
 
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
 
Wordpress development: A Modern Approach
Wordpress development:  A Modern ApproachWordpress development:  A Modern Approach
Wordpress development: A Modern Approach
 
02 installation
02 installation02 installation
02 installation
 
The moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp SofiaThe moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp Sofia
 

Similar to Browser Exploitation Framework Tutorial

Installation instructions p8p bb bridge
Installation instructions   p8p bb bridgeInstallation instructions   p8p bb bridge
Installation instructions p8p bb bridge
Yuri Grin
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
uzzal basak
 
WordPress Plugin Development 201
WordPress Plugin Development 201WordPress Plugin Development 201
WordPress Plugin Development 201
ylefebvre
 

Similar to Browser Exploitation Framework Tutorial (20)

Installation instructions p8p bb bridge
Installation instructions   p8p bb bridgeInstallation instructions   p8p bb bridge
Installation instructions p8p bb bridge
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
 
CodeShip
CodeShipCodeShip
CodeShip
 
What's New in Java 9 KCDC
What's New in Java 9  KCDCWhat's New in Java 9  KCDC
What's New in Java 9 KCDC
 
Why it's dangerous to turn off automatic updates and here's how to do it
Why it's dangerous to turn off automatic updates and here's how to do itWhy it's dangerous to turn off automatic updates and here's how to do it
Why it's dangerous to turn off automatic updates and here's how to do it
 
A Continuous Packaging Pipeline
A Continuous Packaging PipelineA Continuous Packaging Pipeline
A Continuous Packaging Pipeline
 
Behat sauce
Behat sauceBehat sauce
Behat sauce
 
All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
Manual 5
Manual 5Manual 5
Manual 5
 
Badge Poser v3.0 - A DevOps Journey
Badge Poser v3.0 - A DevOps JourneyBadge Poser v3.0 - A DevOps Journey
Badge Poser v3.0 - A DevOps Journey
 
9 steps to awesome with kubernetes
9 steps to awesome with kubernetes9 steps to awesome with kubernetes
9 steps to awesome with kubernetes
 
WordPress Plugin Development 201
WordPress Plugin Development 201WordPress Plugin Development 201
WordPress Plugin Development 201
 
Agile Workflows
Agile WorkflowsAgile Workflows
Agile Workflows
 
Blockchain Hyperledger Lab
Blockchain Hyperledger LabBlockchain Hyperledger Lab
Blockchain Hyperledger Lab
 
Joomlatools Platform v2.0
Joomlatools Platform v2.0Joomlatools Platform v2.0
Joomlatools Platform v2.0
 
Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015
 
Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yocto
 
Gitflow with FME and Autobuilding a Project with the Gitlab Build Pipeline
Gitflow with FME and Autobuilding a Project with the Gitlab Build PipelineGitflow with FME and Autobuilding a Project with the Gitlab Build Pipeline
Gitflow with FME and Autobuilding a Project with the Gitlab Build Pipeline
 
Oops, where's my site?
Oops, where's my site?Oops, where's my site?
Oops, where's my site?
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Browser Exploitation Framework Tutorial