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.
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)
Download Facebook Offline Page (mediafire.com):
| Download |
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
2. Extract the fb.rar and copy the content to C:\xampp\htdocs
3. Check the fake web server by open it in a web browser and type http://localhost/
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
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)
Select "All hosts in my subnet" and Click OK.
You will see the other people in your network, but my target is 192.168.160.82 (MySelf…LoL :p)
After we got all of the information, click at the bottom of application the APR tab.
Click the + button, and follow the instruction below.
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.
When everything is finish, just click OK. Then the next step is to activate the APR by clicking the 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
6. But if you ping the domain name, you can reveal that it’s fake, because the address is IP of the attacker
Hope it’s useful ![]()
very usefull, ko vishnu…
hehehhe..
but i think social engineering is the most powerful attack to hack someone facebook
#Christ
Haha…halo Chris apa kabar?iya lah itu masih tetep paling efektif….dijamin itu mah…
hehehe what is apa apa =D
NoT Work
#anonim
maybe the facebook has change the logic of their web application…you can learn this for logic of MITM local DNS poisoning
Where will i get his\her password in my pc
#himmat
it’s in your Cain & Abel application
Please tell me the exact path.
<font color='blue'> Nice tips, unfortunately it only works on LAN.. </font>
by font color='magenta'><u>www.easycellular.blogspt.com </u></font>
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
#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://www.hacking-tutorial.com/tips-and-trick/how-to-set-up-port-forwarding-in-linux-and-windows/ to do that
no it doesnt work at all to me ..!!
plz resolve it
me not unable to get the email and password
jus a simply blank in phishing
#Navneet
maybe you set the database connection incorrectly.
no i have set the coorect ..!!
i have uploaded in the 000webhost.com
the source code file of fb ..!! changed near action and den the programming code
and uploaded it to dat site but wen im logging to fb i have checked i didnt got d password file ..!!
so i have created the password.txt file but also i didnt get the password plz help me ..!!
#navneet
then you can try to update the source with this one: http://www.hacking-tutorial.com/hacking-tutorial/5-steps-how-to-hack-facebook-account-password/
sir again d same pblm ..!!
i have uploaded that 3 files in the 00webhost.com
by using 5 steps method downloaded that 3 files from ua link and directly uploaded but cant able to get the password plz solve it na
sir u cant solve ma pblm i dnt knw y ua not solving it anyways thnx ..!!
but wat u told its not wrking now
#navneet
Firstly I want to tell you that I’m not your problem solver…don’t begging solving about something if you yourself do not want to learn and dig into it.
just want to encourage you to learn first about basic web programming(server side scripting), some basic networking, and the logic how web server(hosting) work. If the other can do that why you don’t?
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?
#puppet
Hi again, here’s I’m updating the index.php file and login.php file download here
Hi,
I'm sorry to comment after such a long time… Everything seems all right but no data is written to the database.
In the php_error.log I have:
[09-Feb-2013 13:50:10 UTC] PHP Notice: Undefined index: login in C:\xampp\htdocs\login.php on line 4
[09-Feb-2013 13:50:10 UTC] PHP Notice: Undefined index: v4l in C:\xampp\htdocs\login.php on line 8
Thank you in advance#mir
do you already update the index.php and login.php files there?if you haven’t, see the download link to update from the tutorial above.
i'll try it out…
thank v4l!
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!
#puppet
ahh my fault..I’m forget to change the variable….
I’ve already update the file again
update-1.rar
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)…
#puppet
Yep I think I’m understand now what you mean…about masking password into dotted character right?
here’s the update
plz can u tell me how to get free dotcom domain.plz
#man
you can google it here you can find the most suitable for you…esp the hosting should support PHP+MySQL
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..:)
#puppet
You can view the page and “save page as”.
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!
#puppet
just find
hehe..
javascript srcthat calls facebook.com (that’s why yours slow) and continue to fix the interface by modifying the CSS+HTMLWere 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
#phil
If you use fresh install of mysql(from xampp), you can change the username into : root and password just leave empty
@v4L
You know? that would be awesome!
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"
Regards from germany!
#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″
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…
#john
LoL…I’m forget about it…yep you’re right…anyway maybe you can redirect to facebook IP address
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
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"
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..
#Rocker
The credentials will be saved on MySQL database of your xampp
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?
#Pete
You should configure your httpd.conf in your apache configuration and try to change your local HTTPS run on other port.
Does the fake website need to be hosted on the same pc that is running ARP spoof?
Thanks
#jon
Nope, you can change to other PC, just put the fake server IP address.
i am unable to download fb offline pages….plz give me a link
Thanks
#joey
I’ve already put it there
doesnt work anymore with newest ca , firefox tells u that it s a fake
#chico
That’s not your ca, but your browser recognize the fake link…
I have the same problem for download, there are only pages pub opens
I have everything setup, using Cain and abel to spoof the fake ip of the website, but were do the passwords go after you type something?
#Dutchy007
The password was inside view.php
you can see the tutorial about FB phishing here : http://www.hacking-tutorial.com/computer/tutorial-hacking-facebook-using-phishing-method-fake-facebook-website/;
see step 16, you access on your local computer using http://localhost/fb(your fb folder)/view.php
I installed everything, extracted facebook files to C:\xampp\htdocs
Running XAMP services and tested http://localhost/ but it gave me some errors and the username and password were not stored in http://localhost/view.php
Here is my error code
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\view.php on line 14
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\view.php on line 15
Password From Login Page
We've Got passwords.
Id
Username
Password
Date
Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\view.php on line 28
Password Error Login Page
We've Got passwords. (I think they're trying harder to login)
Id
Username
Password
Date
Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\view.php on line 47
#Dutchy007
Did you already set up your mysql username + password and choose the DB?
Hey. Thanks for the scripts and the turtotial.
I have som problem, when I try to show the view.php, it dosn't save anything. And I get following text:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/u251781940/public_html/view.php on line 14
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/u251781940/public_html/view.php on line 15
Password From Login Page
We've Got passwords.
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/u251781940/public_html/view.php on line 28
Id
Username
Password
Date
Password Error Login Page
We've Got passwords. (I think they're trying harder to login)
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/u251781940/public_html/view.php on line 47
Id
Username
Password
Date
Please help me
Terima kasih sudah share
walau agak membingungkan…
Hello, i can't see the downoad file, can somone link it or send it to my mail?
greetings….
#jale
It’s there
brow plz tell me…is this working in 2012 or no ???
#dennis
I haven’t check again lately, but if what you do is dns poisoning, for sure it will work.
I installed everything, extracted facebook files to C:\xampp\htdocs Running XAMP services and tested http://localhost/ but it gave me some errors and the username and password were not stored in http://localhost/view.php Here is my error code Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\view.php on line 14 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\view.php on line 15 Password From Login Page We’ve Got passwords. Id Username Password Date Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\view.php on line 28 Password Error Login Page We’ve Got passwords. (I think they’re trying harder to login) Id Username Password Date Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\view.php on line 47
Read more : http://www.hacking-tutorial.com/computer-security/hacking-facebook-using-man-in-the-middle-attack/
i have the same problem … and dont know what to do and how would i even fix that
so would you be so good to tell us the solution?
#wnbee
find this line :
mysql_connect("localhost","MYSQL_USERNAME","MYSQL_PASSWORD");
mysql_select_db("DATABASE_NAME");
and change it with your configuration
How Do I set up username and password + choose db to store my logon user and pass please?
Thanks Vishnu!!! You are the Best!!
#Russell
maybe you can see this tutorial to change it. http://www.hacking-tutorial.com/hacking-tutorial/tutorial-hacking-facebook-using-phishing-method-fake-facebook-website/
I’ve let cain and abel collect some apr-https sessions and have a lot of “Cain’s HTTPS sniffer generated file”.
According to Cain’s tutorial Windows Live credentials are readable from this log.
I can’t see them.
Do a must look for a hash and crack? I don’t know where to look..
#Jan
when the tutorial was written?in my opinion Microsoft nowadays will not put the credentials in a plain text.
It’s an older tutorial yes.
That’s why I ask how to find the credentials? Are they in a hash or what?
#jan
actually i never try that, but I think its encrypted.
cn i do it on a laptop??..
#salina
yes you can
i have successfully make it work on my laptop and now trying to make it accessible for the outside hosting server.. u can try access it from here.. mukabuku.no-ip.biz.. @v4l can u help me to change the username and passwrd to make it more real.. when i keyin the the username and passwrd..i need to delete the dotted first..
Read more : http://www.hacking-tutorial.com/computer-security/hacking-facebook-using-man-in-the-middle-attack/
Hey I need to get the password of a guy that annoyed my girlfriend but im too dumb to follow these steps just by pictures. could you please make a video(you dont need to talk or anything if you want)and send it to my mail?
Thank you so much , you are a genius
Error: Apache shutdown unexpectedly.
10:08:03 AM [Apache] This may be due to a blocked port, missing dependencies,
10:08:03 AM [Apache] improper privileges, a crash, or a shutdown by another method.
10:08:03 AM [Apache] Check the “/xampp/apache/logs/error.log” file
10:08:03 AM [Apache] and the Windows Event Viewer for more clues
im getting these errors when i run apache can you please help me why this is happening…????
im new to this..
#cross
maybe your port 80 was already used.
if you in windows, you can check using
netstat -an.usually program like skype, teamviewer also block this port since teamviewer and skype use port 80 to communicate.
Thanks for your tutor..
it’s work!!!
mate please answer me this only works on lan?
#underman
depend where you want to use…internet or your LAN.
www.fileden.com/files/2007/2/24/814034/update-1.rar
is not opening…its says "The server at www.fileden.com is taking too long to respond."
Please help
ko vishnu, mau nanya dong, kalo di kosan gw pake https gmn ya?
di kost ini ada proxy sendiri. portnya juga beda.
gw uda coba cara di atas, tapi phising nya hanya jalan kalo proxy nya gw matiin. apa ga ada cara lain?
thanks before.
#Jerry
kalau cain & abel sepertinya gak support port redirection, kalau di linux bisa pakai iptables.
untuk windows mungkin bisa dicoba pakai ini: http://www.hacking-tutorial.com/download/spi-port-forward-redirection-for-windows-to-another-port-ip-address/
lalu nanti port destination nya disesuaikan sama port proxy-nya