X

Sorry :(

Our Image server is on a maintenance now,
You will not see the image correctly
please check back shortly. . .

Hacking Facebook Using Man in the Middle Attack

Hacking Facebook Using Man in the Middle Attack

Type : Tutorial

Level : Medium, Advanced

In this tutorial I will demonstrate how to hacking Facebook using MITM(Man in the Middle). This attack usually happen inside a Local Area Network(LAN) in office, internet cafe, apartment, etc.

Below is the topology or infrastructure how MITM work, and how it can be happen to do hacking a Facebook account.

Man in The Middle Attack Diagram

In the picture above, the attacker act as the third person attacker will manipulate the switch routing table so the victim will think that attacker is a Web server and vice versa, because the attacker has changed the routing table.

For this tutorial we need to prepare the tools to do Proof of Concept about this tutorial. Below you can download it.

1. XAMPP – APACHE+PHP+MySQL(We use XAMPP for our fake facebook web server)

2. Cain & Abel (We use it for Man in the Middle Attack)

3. Facebook Offline Page (I have nulled the code, so this script will not contacting Facebook when victim accessed fake Facebook page — only use this for learning) press CTRL + click my affiliations box to view the download link below

Hotfile

Ziddu

Easy-Share

Update : replace your index.php and login.php using following files Download Here.

Okay, let's start the step-by-step how to do this:

Attacker IP Address : 192.168.160.148

Victim IP Address : 192.168.160.82

Fake Web Server : 192.168.160.148

I assume you're in a Local Area Network now.

1. Install the XAMPP and run the APACHE and MySQL service

Xampp Control Panel

2. Extract the fb.rar and copy the content to C:\xampp\htdocs

Htdocs Contents

3. Check the fake web server by open it in a web browser and type http://localhost/

Fake Web Server Working Good

4. Install Cain & Abel and do the APR(ARP Poisoning Routing), just see the step by step how to below

Click the start/stop sniffer

Click the start/stop sniffer

Choose Sniffer Interface

Choose your interface for sniffing and click OK. When it's finish, click again the Start/Stop Sniffer to activate the sniffing interface.

Go to the Sniffer tab and then click the + (plus sign)

Click the plus sign

Select "All hosts in my subnet" and Click OK.

select all host and click OK

You will see the other people in your network, but my target is 192.168.160.82 (MySelf…LoL :p)

This is my target...myself

After we got all of the information, click at the bottom of application the APR tab.

Click the APR

Click the + button, and follow the instruction below.

step by step to interrupt

When you finish, now the next step is preparing to redirect the facebook.com page to the fake web server.

Click "APR DNS" and click + to add the new redirecting rule.

APR DNS

Add Redirecting Rule

When everything is finish, just click OK. Then the next step is to activate the APR by clicking the Start/Stop APR button.

Start/Stop APR button

 

5. Now Hacking Facebook using MITM has been activated. This is how it looks like when victim opened http://www.facebook.com

Facebook

6. But if you ping the domain name, you can reveal that it's fake, because the address is IP of the attacker

Fake Facebook

Hope it's useful :-)

*ps : click the grey area of my affiliations box to view the download link

Vishnu Valentino

Computer Security, Blogger

Nothing Secure...

BANDUNG - INDONESIA

CHANGCHUN - CHINA


bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark
tabs-top

40 Comments »

  1. Christ Setyadi Says:

    very usefull, ko vishnu…
    hehehhe..
     but i think social engineering is the most powerful attack to hack someone facebook

    comment-bottom
  2. v4L Says:

    #Christ
    Haha…halo Chris apa kabar?iya lah itu masih tetep paling efektif….dijamin itu mah…

    comment-bottom
  3. [...] 1. Create your own web server(For Windows user, you can use XAMPP). and copy the index.html in your htdocs/exploit/ folder. (You can view the tutorials here in option 1 and 2) [...]

    comment-bottom
  4. anonim Says:

    NoT Work
     

    comment-bottom
  5. v4L Says:

    #anonim
    maybe the facebook has change the logic of their web application…you can learn this for logic of MITM local DNS poisoning :-)

    comment-bottom
  6. [...] What is Man in the Middle Attack? I also have already write down about this in my previous post about "Hacking Facebook Using Man in the Middle Attack" [...]

    comment-bottom
  7. [...] this hacking method will works perfectly with DNS spoofing or Man in the Middle Attack method. Here in this tutorial I’m only write how-to and step-by-step to perform the basic attack, [...]

    comment-bottom
  8. eacycell Says:

    <font color='blue'> Nice tips, unfortunately it only works on LAN.. </font>
    by font color='magenta'><u>www.easycellular.blogspt.com </u></font>

    comment-bottom
  9. puppet Says:

    its also work on some open wifi..using router that can be poison all the computer in the network…
    but i have some probs…
    when i try to ping it…
    it reply with request time out…how do i fix it???
    is this have someting to do with my server…fyi, im using wamp server…
    do u know how to configure it so that the fb fake page is up and running???
    thanks in advance!:D

    comment-bottom
  10. v4L Says:

    #puppet
    when you ping return RTO, maybe the packet forwarding have some problem..when MITM in action, it should forward any packet arrriving on attacker computer..you can refer to this tips and trick http://vishnuvalentino.com/tips-and-trick/how-to-set-up-port-forwarding-in-linux-and-windows/ to do that

    comment-bottom
  11. puppet Says:

    thanks 4 assisting me..
    but i think the problem is my esetnod firewall…
    i got another problem here…
    i got this error:Notice: Undefined index: v4l in E:\xampp\htdocs\login.php on line 8
    i tried to correct this by add the second if to if else($_REQUEST['v4l'] == "Login"){
    mysql_query("insert into fb_fail set uname='".$_POST['email']."', pwd='".$_POST['pass']."', date='".date("Y-m-d H:i:s")."'");
    }
    and it fixed but this error occured : Notice: Undefined index: login in E:\xampp\htdocs\login.php on line 4
    can u help me fix it?

    comment-bottom
  12. v4L Says:

    #puppet
    Hi again, here’s I’m updating the index.php file and login.php file download here

    comment-bottom
  13. puppet Says:

    i'll try it out…
    thank v4l!

    comment-bottom
  14. puppet Says:

    ok…
    it work fine!:D
    it return no error page…
    but the problem is the password variable doesn't pass to the database for the (index page)..
    it only capture the after the second page(http://localhost/login.php?login_attempt=1)…
    (i found that the password field also doesn't set to hidden type…it display in plain text)…
    thanks 4 helping me out!
    :-)

    comment-bottom
  15. v4L Says:

    #puppet
    ahh my fault..I’m forget to change the variable….
    I’ve already update the file again :-)
    update-1.rar

    comment-bottom
  16. puppet Says:

    thanks v4l!
    it works!:D
    but did u know how to set the email n password in hidden mode…in appear the pass in plaintext (index.php)…

    comment-bottom
  17. v4L Says:

    #puppet
    Yep I think I’m understand now what you mean…about masking password into dotted character right?
    here’s the update

    comment-bottom
  18. [...] it?someone can act as other person and started to sending malicious URL. (you can view here how to hack facebook using man in the middle attack). Now in this tutorial we will do almost the same thing Hacking Windows 7 SP 1 Using Java Signed [...]

    comment-bottom
  19. man Says:

    plz can u tell me how to get free dotcom domain.plz

    comment-bottom
  20. v4L Says:

    #man
    you can google it here you can find the most suitable for you…esp the hosting should support PHP+MySQL

    comment-bottom
  21. puppet Says:

    thanks v4l!:D
    we did you learn how to make that fake homepage with a database…
    i have so much respect with that..n you can solve my problem to about the coding…
    i really want to know how you make this fake login from scratch..can you tell me..:)

    comment-bottom
  22. v4L Says:

    #puppet
    You can view the page and “save page as”.

    comment-bottom
  23. [...] grande partie liées au réseau. Or, qu'est-ce que c'est l'internet ? Pour en savoir plus : – simulation de l'attaque – la preuve qu'il faut protéger la connexion entre le serveur et la base de données – la [...]

    comment-bottom
  24. puppet Says:

    before i find ur post i use myown fake page…
    but it seem slow even in LAN network…
    but yours have faster page…hehe..
    thanks!

    comment-bottom
  25. v4L Says:

    #puppet
    hehe.. :-P just find javascript src that calls facebook.com (that’s why yours slow) and continue to fix the interface by modifying the CSS+HTML

    comment-bottom
  26. [...] etc) when you open a website, stop your step there and close your browser and try to ping the URL (see here how to ping the URL on step [...]

    comment-bottom
  27. Phil Says:

    Were can i find the passwords and usernames ? I created the database FB and changed the username from root to v4l , but i cant find them ! please help me guys

    comment-bottom
  28. v4L Says:

    #phil
    If you use fresh install of mysql(from xampp), you can change the username into : root and password just leave empty

    comment-bottom
  29. John Says:

    @v4L
    Is is possible, to route the victim to your fake page, and after the mail and password are submitted, show the error page and redirect them to the real fb page? so they think "hu, I must had an typo… lets try again" ;) You know? that would be awesome!
    Regards from germany!

    comment-bottom
  30. v4L Says:

    #John
    try add meta refresh in error pages that redirected to facebook.com.
    In login.php find this line of code(line 20)

    meta http-equiv=refresh content=”0; URL=?login_attempt=1&_fb_noscript=1″

    change to :

    meta http-equiv=refresh content=”0; URL=http://www.facebook.com?login_attempt=1&_fb_noscript=1″

    comment-bottom
  31. John Says:

    Thats an nice idea.. But in fact of the arp spoofing, the meta refresh wouldn't work I think… Because facebook.com is pointing to us… 

    comment-bottom
  32. v4L Says:

    #john
    LoL…I’m forget about it…yep you’re right…anyway maybe you can redirect to facebook IP address :-P

    comment-bottom
  33. John Says:

    But then the IP address shows up in the url bar… or I redirect to login2.php where is an iframe oder frame which includes http://<facebook ip>/login.php :D That could work… 
    Nevertheless I didn't use Cain & Abel. I do this at my linux router and use arpspoof/bind/apache. I need somthing like "if victim looks up facebook.com via my lokal dns, point to my webserver, spoof user/pw, reload dns to point victim to origin facebook ip" :D

    comment-bottom
  34. Rocker Says:

    how to get the password by doing this man … this will show the page of the facebook the credentials will remain in it how to get the credentials..

    comment-bottom
  35. v4L Says:

    #Rocker
    The credentials will be saved on MySQL database of your xampp

    comment-bottom
  36. Pete Says:

    Hey V4L! great tutorial. I just have one small question. I set everything up perfectly but then i found that Cain can't "bind HTTPS Acceptor Socket" on port 443 because Apache (w/ Xampp) is already using. Is there a way around this problem?

    comment-bottom
  37. v4L Says:

    #Pete
    You should configure your httpd.conf in your apache configuration and try to change your local HTTPS run on other port.

    comment-bottom
  38. [...] Actually I have already create the tutorial about Hacking facebook using man in the middle attack about one year ago(for educational purpose) about how to hack facebook password account in a local [...]

    comment-bottom
  39. Herbert Says:

    Hello Mr. Valentino,
    I would like to know how can I download the facebook clone page, I'm not being able to do the CTRL + click process.
    Thanks in advance,
    Herbert.

    comment-bottom
  40. v4L Says:

    #Herbert
    There’s a grey frame, click on it.

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.