How to Use Beef to Hook a Browser
Welcome dorsum my fellow hackers! Today we're going to be introducing a new tool for hacking web browsers. Often times, nosotros will demand to exploit a multifariousness of vulnerabilities associated with spider web browsers. For this sort of exploitation, we can use a popular tool named BeEF (Browser e Exploitation Framework).
HowBeEF works is really adequately easy to understand. There is a JavaScript file provided by Beefiness, simply namedhook.js. Our job as the attacker is to notice a way to run this JavaScript on the victim's browser. Once it's been run, nosotros will have command over their browser in various aspects. At that place are multiple means we tin can execute this script. For example, we could set up a phishing page with the hook within of the HTML code, or nosotros could inject it into their traffic using a Man in the Middle attack. But today we're simply going to exist using the demo page provided by BeEF. So, allow's go started!
Pace 1: Start upwardly and Login to Beefiness
If we're going to utilise Beef, we demand to get-go it! If you're using Kali ii, y'all can find BeEF on the dock. If you lot are aren't using Kali 2, yous can launch BeEF by enter the following command:
service beef-xss outset
Now that we've started Beefiness, we need to login. If we bespeak our web browser at the localhost on port 3000 with the /ui/authentication URI, nosotros volition come across the BeEF login page (In short: 127.0.0.1:3000/ui/authentication). When we see this page, we need to enter the default credentials in order to use Beefiness. The default username and password are both "beefiness." Let's go ahead and log in at present:
Alright, now that we've entered our credentials and logged in, we can see the start page. Let'due south accept a expect at this page and then we'll break it down:
Now, to our immediate left we can see a section named "hooked browsers." This is where BeEF will list all the browsers nosotros currently have nether our control. There is only one victim hither at the moment, which is ourselves. Now that nosotros've logged in and seen the start page, let'south motion on to hooking our victim.
Footstep two: Hook the Victim
Now that we have BeEF upwardly and running, we need to hook the victim so that we tin control their browser. We volition be using the BeEF demo page to run the hook. Now we need to movement the victim and navigate to the demo page. The demo folio can be accessed in the browser past entering the accost of the attacking system on port 3000 under /demos/basic.html. And so, for our demonstration today, we demand to enter 10.0.0.xix:3000/demos/basic.html on our victims browser, permit's exercise that now:
At present that we've navigated our victim to the demo page containing the Beef claw, nosotros should run across them appear under the "hooked browsers" department nosotros saw earlier:
At that place we become! We've successfully hooked our victims browser. Now that we have some basic control over it, nosotros can do many things that will assist the states in compromising this victim.
Step 3: Wreak Havoc
At present that we can control our victims browser, we're going to demonstrate the kind of things we tin can do. Nosotros're simply going to utilize some JavaScript to observe out what plugins are installed on the browser. First, we demand to select our victim and navigate to the "commands" tab of Beefiness's GUI. Let'due south run into what this looks similar now:
Now that we've navigated to our commands tab, we can look through all of the possible commands we can execute on the victim's browser. Please note that not all of these volition work equally some of them are circumstance specific. The one nosotros're after in this case is theraw javascript module. We can detect this module under the "Misc" folder in the commands tab. Allow's select this module at present:
Nosotros can see that in this module nosotros take a box to enter some JavaScript. In club to see the plugins that the victim has, we're going to render some information out the the "navigator" object using our code. We're also going to make an warning box appear in the victim's browser, just for fun. Permit's accept a wait at this code now:
At present that nosotros have entered our code to execute, nosotros simply need to press the "execute" button on the bottom right of the BeEF page. Once we do this, we should encounter the JavaScript return an array containing the currently installed plugins. Let'southward execute our lawmaking and see the results now:
Here tin can run into a list of all the plugins that the victim has installed on their browser! Nosotros could look deeper and see if in that location any exploitable vulnerabilities in these plugins, just that's best discussed later. Now that nosotros have our results, let'southward move back to the victim and take a await at our alarm box!
By Hacking Loops
Full article:
Source: How to Hijack Spider web Browsers Using Beef
Source: https://linuxsecurityblog.com/2017/08/28/how-to-hijack-web-browsers-using-beef/
0 Response to "How to Use Beef to Hook a Browser"
Post a Comment