EvilZone

Hacking and Security => Tutorials => : parad0x January 16, 2013, 04:49:45 AM

: Hack any browser using BeEF
: parad0x January 16, 2013, 04:49:45 AM
 What is BeEF?

BeEF is short for The Browser Exploitation Framework. It is a penetration testing tool that focuses on the web browser.Amid growing concerns about web-borne attacks against clients, including mobile clients, BeEF allows the professional penetration tester to assess the actual security posture of a target environment by using client-side attack vectors. Unlike other security frameworks, BeEF looks past the hardened network perimeter and client system, and examines exploitability within the context of the one open door: the web browser. BeEF will hook one or more web browsers and use them as beachheads for launching directed command modules and further attacks against the system from within the browser context.


Step 1: Now.lets know how to use it. First we have to install it.So,in backtrack, navigate to Applications -> BackTrack -> Exploitation Tools -> Social Engineering Tools -> BEEF XSS Framework -> and select  BeEF Installer.
(http://2.bp.blogspot.com/-ZGBNa_WPgOg/UPYdgy7D78I/AAAAAAAAAE4/SaXtw_H9zug/s1600/beef.jpg)
Step 2: After you have successfully installed it.Navigate to Applications -> BackTrack -> Exploitation Tools -> Social Engineering Tools -> BEEF XSS Framework -> and select BeEF  to start the server.The username and password are beef.
Step 3: Copy the highlighted link and paste in into your browser's url bar.

(http://2.bp.blogspot.com/-fnC-krmLBfw/UPYd11BDXxI/AAAAAAAAAFA/NCk1u-IHPOc/s1600/beef1.jpg)

(http://3.bp.blogspot.com/-x-WC1k-si-M/UPYeO1Vav-I/AAAAAAAAAFI/FFn0K_G62yk/s1600/beef2.jpg)

Step 4: Now send the  link to your victim(don't forget to shorten this ;) ).
You'll find the link in the first para after signing in into the BeEF.


(http://1.bp.blogspot.com/-fIW5MkDG0dQ/UPYfpY6dfeI/AAAAAAAAAFY/0I8VAVHBOkk/s1600/beef3.jpg)

Once the user opens the link sent by us.We'll got his browser.
The compromised browser will be shown in the left hand pane.Like this one...(http://3.bp.blogspot.com/-_GGYIB0hktI/UPYgBSEQcfI/AAAAAAAAAFg/dyUayMxTEJE/s1600/beef5.jpg)Enjoy!! :) :)
: Re: Hack any browser using BeEF
: vezzy January 16, 2013, 05:19:44 AM
Thanks. I remember toying around with BeEF on Ubuntu a while ago. Tutorial could be more detailed, but decent job.
: Re: Hack any browser using BeEF
: parad0x January 16, 2013, 06:03:55 AM
Thanks. I remember toying around with BeEF on Ubuntu a while ago. Tutorial could be more detailed, but decent job.
Which part was left by me,vezzy?
Be more specific.
: Re: Hack any browser using BeEF
: kenjoe41 January 16, 2013, 10:38:40 PM
seeing the different levels of expertise and experience we all have here, he meant that the tut could be more verbose to cover us all. all in all it was a great tut. keep up the spirit.
: Re: Hack any browser using BeEF
: techb January 16, 2013, 11:33:34 PM
BeEF seems pretty local. Meaning, be on the same network for this to work. Unless you did some port forwarding. In which case I would deff change the default port and un/pass. Since BeEF is a pen tool, I doubt rigorous fuzzing or exploiting has been done against it, so it can be vulnerable especially for outside attacks with the port forwards.

I do, however, like the hooking. Being just browser does by-pass a lot of other security layers, like NAT, firewalls, AVs, etc... With the new Java zero-day and a module for BeEF would be pretty nice. And with Metasploit plug-in-ability and all it could be a decent tool.
: Re: Hack any browser using BeEF
: Axon January 17, 2013, 12:07:29 AM
I find your tutorial to be quite similar to this (http://rajhackingarticles.blogspot.com/2012/05/beef-browser-exploitation-framework.html).
: Re: Hack any browser using BeEF
: techb January 17, 2013, 02:20:40 AM
I find your tutorial to be quite similar to this (http://rajhackingarticles.blogspot.com/2012/05/beef-browser-exploitation-framework.html).

Most all tuts for this tool are extremely similar, there's not much more you can do with it.
: Re: Hack any browser using BeEF
: ca0s January 17, 2013, 04:08:52 PM
BeEF seems pretty local. Meaning, be on the same network for this to work. Unless you did some port forwarding. In which case I would deff change the default port and un/pass. Since BeEF is a pen tool, I doubt rigorous fuzzing or exploiting has been done against it, so it can be vulnerable especially for outside attacks with the port forwards.

You can inject its payload with an XSS vuln, for example. Or append it to a website instead of defacing it :D But I don't know if SOP would prevent you from doing certain things...
: Re: Hack any browser using BeEF
: Daemon January 17, 2013, 10:58:26 PM
I find your tutorial to be quite similar to this (http://rajhackingarticles.blogspot.com/2012/05/beef-browser-exploitation-framework.html).

All of the backtrack tutorials posted by him on here are like that, but then again it's like techb said, how else can you do it? At least he's trying to contribute i guess. Thank you for that Mr. Perfect
: Re: Hack any browser using BeEF
: parad0x January 18, 2013, 10:20:57 AM
I find your tutorial to be quite similar to this (http://rajhackingarticles.blogspot.com/2012/05/beef-browser-exploitation-framework.html).
Well,a good site for newbies to learn how to use metasploit.I'll be posting a tut on how to use metasploit. I know there's one but that is not interesting.
: Re: Hack any browser using BeEF
: Axon January 25, 2013, 05:08:40 PM
Here's is a good tutorial on how to install BeEF on Windows.

http://www.hackingarticles.in/how-to-install-beef-in-windows-pc/
: Re: Hack any browser using BeEF
: Griffon Bossi February 01, 2013, 06:03:09 AM
im trying to get BeEF on windows using the tutorial axon gave but when i get to the point where i have to extract the devkit cmd keeps saying the path is unspecified. can someone help. i put the devkit into the ruby file and tried it in the c: however nothing is working. please help.
: Re: Hack any browser using BeEF
: proxx February 01, 2013, 05:21:15 PM
And getting metasploit to work on windows....
Good luck with that.
Not trying to be negative but it saves a lot of time doing this in a nix env.
: Re: Hack any browser using BeEF
: Griffon Bossi February 01, 2013, 08:49:13 PM
whats nix env?
: Re: Hack any browser using BeEF
: techb February 01, 2013, 08:50:42 PM
whats nix env?

Linux environment.
: Re: Hack any browser using BeEF
: Griffon Bossi February 01, 2013, 11:01:56 PM
alright. thanks


i have ubuntu however, i cant find the backtrack in applications. can someone help me out. (And sorry for being so needy, im very new to a lot of this.)


Staff Edit
Please use the Edit/Modify button instead of double posting
: Re: Hack any browser using BeEF
: Why May 27, 2013, 09:22:59 PM
Thanks for the TUT!  8)
: Re: Hack any browser using BeEF
: parad0x May 28, 2013, 10:02:45 AM
Thanks for the TUT!  8)
Welcome, and post your intro.
: Re: Hack any browser using BeEF
: scuarplex June 05, 2013, 10:14:31 PM
I've used BeeF in a few Client Side attacks and my two cents are:

Change the default port to 443 or 80 so it doesn't get blocked by any Firewall (or upload it to a website).

When you get a new zombie make sure to use any of the persitence plug-in as a first measure.

Some AV's detect the js hook, so you might wanna touch it a little before deploying it.
: Re: Hack any browser using BeEF
: 0wn4g3 June 06, 2013, 03:31:25 PM
I really don't understand how can you infect someone by giving the link that contains localhost's address. There should be an advanced configuration I think. It's not that easy
.
: Re: Hack any browser using BeEF
: proxx June 06, 2013, 03:34:20 PM
I really don't understand how can you infect someone by giving the link that contains localhost's address. There should be an advanced configuration I think. It's not that easy
.
There is nothing to understand , you cant.
Nothing advanced about it.
: Re: Hack any browser using BeEF
: 0wn4g3 June 06, 2013, 03:44:51 PM
There is nothing to understand , you cant.
Nothing advanced about it.
So there's nothing we can do in order to hack a browser remotely ?
Sorry for being so noob :\
: Re: Hack any browser using BeEF
: Stackprotector June 06, 2013, 04:42:05 PM
So there's nothing we can do in order to hack a browser remotely ?
Sorry for being so noob :\
No, and these hacks are usually somewhat buggy and will raise flags quickly. I advise you to learn Web development and then continue on to web security and you won't ever need to get headaches of a tool like this and call yourself a pro ;)
: Re: Hack any browser using BeEF
: proxx June 06, 2013, 04:42:35 PM
Yes your being noob indeed, learn basic networking before starting to think about exploitation.
No offense intended but I believe that is the truth.
: Re: Hack any browser using BeEF
: scuarplex June 06, 2013, 09:24:00 PM
Common guys why is so hard to teach someone something new? This is the tutorial section and are ment to spread knowledge.

What's the point of having a tutorial section if we are going to criticize every one that makes a question?

I really don't understand how can you infect someone by giving the link that contains localhost's address. There should be an advanced configuration I think. It's not that easy
.


It's not that hard. When you start up BeeF directly connected to the internet, having an external IP associated to your network card (check it out with ifconfig and make sure to know what's the difference between an internal IP and a external IP), BeeF should give you URI with your external IP.

After you have this Script on the outside you could include it on a phishing, hack a site and put it into an iframe, create a domain with a fake site and spread it, or just raise an Apache in the same IP with a simple HTML with beef embedded and pass your IP with a http:// to a friend of yours to test this tool.

Of course you could learn a lot of Javascript, that would be pretty useful for you but this is a very complete suite for attacks and it saves a lot of time. There's no need to reinvent the wheel.

Perhaps the best would be that you spend hours, days, weeks, years reading and reading but this can be a fun way to learn asking yourself "Why this works like this?" "Why it isn't working?" and such.

Cheers
: Re: Hack any browser using BeEF
: Conex June 06, 2013, 09:45:07 PM
Very useful tool.

Thanks for the tutorial!
: Re: Hack any browser using BeEF
: proxx June 06, 2013, 10:24:45 PM
Common guys why is so hard to teach someone something new? This is the tutorial section and are ment to spread knowledge.

What's the point of having a tutorial section if we are going to criticize every one that makes a question?
 

It's not that hard. When you start up BeeF directly connected to the internet, having an external IP associated to your network card (check it out with ifconfig and make sure to know what's the difference between an internal IP and a external IP), BeeF should give you URI with your external IP.

After you have this Script on the outside you could include it on a phishing, hack a site and put it into an iframe, create a domain with a fake site and spread it, or just raise an Apache in the same IP with a simple HTML with beef embedded and pass your IP with a http:// to a friend of yours to test this tool.

Of course you could learn a lot of Javascript, that would be pretty useful for you but this is a very complete suite for attacks and it saves a lot of time. There's no need to reinvent the wheel.

Perhaps the best would be that you spend hours, days, weeks, years reading and reading but this can be a fun way to learn asking yourself "Why this works like this?" "Why it isn't working?" and such.

Cheers

I just gave the dude the best advice I could possibly give.
Learning about basic networking would make the awnsers more than obvious.
Walk before you run.
: Re: Hack any browser using BeEF
: RedBullAddicted June 07, 2013, 06:10:17 AM
BeEF seems pretty local. Meaning, be on the same network for this to work. Unless you did some port forwarding. In which case I would deff change the default port and un/pass. Since BeEF is a pen tool, I doubt rigorous fuzzing or exploiting has been done against it, so it can be vulnerable especially for outside attacks with the port forwards.

everything relevant to answer his question was already given by techb. Not sure if he did not read it or did not understand it. In the second case proxxs advice is the best one can give :)

Cheers,
RBA
: Re: Hack any browser using BeEF
: kenjoe41 June 09, 2013, 02:57:29 PM
According to the questions asked by this guy, i doubt he could understand a thing in techb's advice.
They should know most of us started like them but we followed the advice we were given. Hacking doesn't come in one day, it requires some intense reading and trying.
I advise them to visit the ebook section, build a few virtual labs and hack a little, then when things go awry, they can ask.
: Re: Hack any browser using BeEF
: parad0x June 09, 2013, 04:21:07 PM
Common guys why is so hard to teach someone something new? This is the tutorial section and are ment to spread knowledge.

What's the point of having a tutorial section if we are going to criticize every one that makes a question?

It's ok to ask questions but its NOT OK to ask questions about what you don't even know a bit about.


Hey man, how can he understand to exploit something until he knows how the things work and the advices are given yo learn how these things work.
: Re: Hack any browser using BeEF
: kenjoe41 June 09, 2013, 05:13:01 PM
The hacking we learn and help others with here is to understand the inner workings of everything you use and what you what to hack, including the end-point technology being used. Now tell if that noob question is going to help further your cause in this. Better follow the advice if wise men which is bended by years of experience. Period
: Re: Hack any browser using BeEF
: 0wn4g3 June 12, 2013, 04:03:29 PM
Sorry for replying so late (I had some exams).
Look, I accept everyone's advices & critics , they're good things.
I understand everyone and their objectives.


Also I need a good motivation to get better and thats why I joined EZ.
So don't "fight". Let's end this "war".


Regards,
: Re: Hack any browser using BeEF
: AnarchyAngel June 22, 2013, 04:31:03 AM
i have used this a few times in air ports and coffee shops. i set up beef, i also setup privoxy to inject the js hook into all pages, then use iptables to forward all port 80 traffic to privoxy, then enable forwarding, then use ettercap to arp spoof and redirect victims to my machine. This way ever page a victim views will hook them into beef :) its a fun way to troll and pass the time.
: Re: Hack any browser using BeEF
: mu9iw4r4 June 23, 2013, 03:42:01 PM
thank bro,...nice tut ,...   ;D
: Re: Hack any browser using BeEF
: parad0x June 23, 2013, 03:52:09 PM
thank bro,...nice tut ,...   ;D
Welcome but ,

We have an intro board out their, why don't you just post your intro?