MITM – Hacking With WiFi-Pumpkin

December 30, 2016 | Views: 32970

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

MITM – Hacking With WiFi-Pumpkin

Hi, welcome to “man in the middle” hacking with Wifi-Pumpkin tutorial:

This tutorial will show you how to get user credentials (social media credentials) using a tool called Wifi-Pumpkin on ParrotSec with a custom fake login page. Following hacks has been tested with ParrotSec (Linux operating system for pentesting) with Wifi-Pumpkin tool. You can also use Kali Os as the operating system for this hack to work.

Here are the links for Parrotsec and Wifi-Pumpkin

Besides the application, you also need to make sure that you have an external wifi card that supports AP (access point) mode. I would recommend TP-Link WN722N. This wifi card has been proven to work with all sorts of wifi attacks. So for example if you are performing this attack at a “Starbucks” your internal wifi card will be connected to their wifi and your external card will be used for attack as the Rogue AP.

What this tutorial will not cover is the installation process of ParrotSec Os or Kali Linux Os. Please find the installation documentation at their respective websites. Parrotsec can be installed as VMware or as the main operating system. The choice is entirely up to you. Please note that you must have some knowledge on VMware and Linux operating system.

I will assume you have either Kali or ParrotSec running, next, we need to install Wifi-Pumpkin. The installation for this tool is really straight forward. Type this command in your terminal:

 git clone https://github.com/P0cL4bs/WiFi-Pumpkin.git
 cd WiFi-Pumpkin
 ./installer.sh –install

If you do run into some errors while installing, please refer to their website for a solution. The reason for incomplete installation could just be that your Linux is missing some of its dependencies.
Once the installation process completes, run it at the terminal “sudo wifi-pumpkin“.  A beautiful Gui application pops-up. All your hacking is done right here. You don’t need to open any other terminal and run painstaking commands to make it work.

Wifi-Pumpkin comes withs loads of modules and plugins. For this specific tutorial, I will be concentrating on Rogue AP, Phishing Manager module and DNS Spoof module.
Before we start hacking with this awesome tool, there are few more things that we need to do. That is we need to download the custom fake-portal from fake-portal. Download and unzip the files to your web server folder, which is normally under /var/www or /var/www/html.

Next, we need to make sure our Mysql has the right database and tables to reflect the fake-portal. Mysql and Apache usually comes pre-installed in Kali and Parrotsec. If not you can follow the installation procedure on my fake-portal link.

Open terminal and type “mysql -u root” , now you will be in MySQL console. Next, we need to create a database so type “create database rogue_AP;” and enter. The name rogue_AP can be anything you want. Just make sure you write it down somewhere for later use. We need to change to the current database which we just created. So type “use rogue_AP;“. Next we need to create the correct tables, so type “create table social_login(socialn varchar(64), email varchar(64), userpassword varchar (64));
That’s it for MySQL setup just make sure you run the above commands without the “double quotes“. Next, we need to edit a file which we unzipped to var/www/html . Open up the file named “dbconnect.php” and edit this part:

$host=”localhost“;  (this is normally localhost)
$username=”your mysql username“;  (your MySQL username, default is root)
$password=”your mysql password“;  (your MySQL password)
$db_name=”rogue_AP“;  (the database name which you created)
$tbl_name=”social_login“;  (leave this as default)

Once done start MySQL with this command, “sudo /etc/init.d/mysql restart”

*Please note if you have not set your MySQL root password, please set it first. You can follow this guide to set it up.

https://ubuntu.flowconsult.at/en/mysql-set-change-reset-root-password/

A brief introduction on WiFi-Pumpkin

Wifi-Pumpkin is basically an MITM tool. The victim will connect to rogue ap and once connected, a victim will see a fake portal. In this fake-portal victim will be tricked in to logging in with their social media accounts in order to use so-called “free internet”.

Take note that this database does not in any way actually connects to the actual social media sites, hence there is no way verify whether their captured credentials are real or not. The only way to verify is to use the captured credentials and use it to login on the respective social media accounts.

Now that everything is setup and ready to go, launch wifi-pumpkin. In the “settings” menu set your “Gateway” ip address (your router ip) , set “SSID” name to whatever you like, for example, “starbucks“. Choose your available network adapter wlan0 or wlan1. Set class IP range address. If your current network uses a class C range, then make sure the range you select is not the same as your current network range. Save settings.

Under “plugins” menu untick enable proxy server. Start the access point by clicking Start. Next, go to “modules” and select “phishing manager“, under options select set directory. Set ip address to 10.0.0.1.
SetEnv Path” will be the fake portal files which you unzipped to /var/www/html and start server.

Next go to “modules” under “DNS::spoof” remove any URL in there by right clicking, clear all. Select redirect traffic from all users, and start the attack. Next under “view” select “monitor “NetCreds” and click capture logs.
When victim connects to the rogue ap, you will see the login credentials here, and also at the main panel under “activity-monitor“.

And that’s it! once down stop all servers. Use the captured credentials to try to login to a social media account like Facebook or others, depending on what the victim selected under the fake portal.

Wifi-Pumpkin is an excellent tool for MITM,well-maintained app compared to mana-toolkit or any other MITM app out there. Try out other plugins and modules in there and start learning and hacking!

Good Luck.


Like this article? Try this one, “Evil Twin Access Point | Wifi-Pumpkin

Share with Friends
FacebookTwitterLinkedInEmail
Use Cybytes and
Tip the Author!
Join
Share with Friends
FacebookTwitterLinkedInEmail
Ready to share your knowledge and expertise?
34 Comments
  1. Good Afternoon and I wanted to say thank you posting this – I was able to install the application and it loads but before the application runs i get a series of messages. Could someone point me in the right direction about what i need to do to correct these messages that I get right before the application launches. The messages are below:

    Bad key “patch.force_edgecolor” on line 33 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “lines.dashed_pattern” on line 18 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “boxplot.meanprops.markeredgecolor” on line 369 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “date.autoformatter.second” on line 235 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “ytick.major.right” on line 271 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “date.autoformatter.month” on line 231 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “scatter.marker” on line 345 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “ytick.minor.right” on line 273 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “ytick.major.left” on line 270 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “ytick.left” on line 258 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “xtick.minor.bottom” on line 256 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “axes.autolimit_mode” on line 220 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “hatch.color” on line 37 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “boxplot.meanprops.marker” on line 367 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “date.autoformatter.minute” on line 234 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “xtick.major.top” on line 253 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “date.autoformatter.day” on line 232 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “ytick.right” on line 259 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “xtick.bottom” on line 242 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “date.autoformatter.microsecond” on line 236 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “hist.bins” on line 40 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “lines.scale_dashes” on line 21 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “axes.titlepad” on line 184 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “_internal.classic_mode” on line 526 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “date.autoformatter.hour” on line 233 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “boxplot.meanprops.markerfacecolor” on line 368 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “date.autoformatter.year” on line 230 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution
    /usr/lib/python2.7/dist-packages/matplotlib/__init__.py:1078: UserWarning: Bad val “auto” on line #360
    “boxplot.flierprops.markerfacecolor: auto

    in file “/usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle”
    Key boxplot.flierprops.markerfacecolor: auto does not look like a color arg
    (val, error_details, msg))

    Bad key “lines.dotted_pattern” on line 20 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “axes.formatter.offset_threshold” on line 207 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “xtick.minor.top” on line 255 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “ytick.minor.left” on line 272 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “lines.dashdot_pattern” on line 19 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “xtick.major.bottom” on line 254 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “boxplot.meanprops.markersize” on line 370 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “hatch.linewidth” on line 38 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution

    Bad key “xtick.top” on line 241 in
    /usr/share/matplotlib/mpl-data/stylelib/classic.mplstyle.
    You probably need to get an updated matplotlibrc file from
    http://github.com/matplotlib/matplotlib/blob/master/matplotlibrc.template
    or from the matplotlib source distribution
    Loading GUI…
    WiFi-Pumpkin Running!

  2. i am facing the same error
    error message.
    CONNECTION FAILED: Acess denied for user ‘root’@’localhost’ (using password: YES)

    if you have a time can you please make a video tutorial.
    thank you.

  3. Hi, Good Afternoon .
    I have installed WiFi pumpkin on Kali Linux. Installation is successful, but once m trying to open it gives me a lot of error messages, and same error messages on Ubuntu.

    sudo wifi-pumpkin
    Traceback (most recent call last):
    File “wifi-pumpkin.py”, line 45, in
    from core.main import Initialize
    File “/usr/share/WiFi-Pumpkin/core/main.py”, line 31, in
    from core.widgets.tabmodels import (
    File “/usr/share/WiFi-Pumpkin/core/widgets/tabmodels.py”, line 7, in
    from core.utility.threads import ThreadPopen
    File “/usr/share/WiFi-Pumpkin/core/utility/threads.py”, line 19, in
    from core.servers.proxy.controller.handler import MasterHandler
    File “/usr/share/WiFi-Pumpkin/core/servers/proxy/controller/handler.py”, line 4, in
    from mitmproxy import controller, proxy
    File “/usr/local/lib/python2.7/dist-packages/mitmproxy/proxy/__init__.py”, line 3, in
    from .server import ProxyServer, DummyServer
    File “/usr/local/lib/python2.7/dist-packages/mitmproxy/proxy/server.py”, line 12, in
    from ..protocol import Kill
    File “/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/__init__.py”, line 30, in
    from .tls import TlsLayer
    File “/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/tls.py”, line 6, in
    from construct import ConstructError
    ImportError: No module named construct

    • looks like you are missing some dependencies. try running this in your terminal :

      sudo pip install mitmproxy==0.17

      try starting wifi pumpkin again, if you still have issues go to wifi-pumpkin site and raise an issue there. they will try to solve your issue.

      • thank you very much, i just update my kali machine and now works fine.
        everything install successful, and create the table too. And when i open 127.0.0.1
        its show me phishing page, but once i put any email password its shows me error message.
        CONNECTION FAILED: Acess denied for user ‘root’@’localhost’ (using password: YES)

  4. Hello, first all thank you for your post.
    I have everything working but when trying to connect to the fake_AP from other device
    the Pumpkin throws errors like file or folder not found and Thus, I cannot see a proper website on the phone.

    I’ve had a look and that’s because the file we have to download from github does not include any image in the folders images or social.

    Am I right or perhaps I’m doing something wrong?

    Thank you

    • phamator,

      Yes you are right. Broken package. I have re-uploaded the files. Download and try it again and if you followed the steps in the tutorial it should work.

      good luck.

Page 2 of 4«1234»
Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Cybrary On The Go

Get the Cybrary app for Android for online and offline viewing of our lessons.

Get it on Google Play
 

Support Cybrary

Donate Here to Get This Month's Donor Badge

 
Skip to toolbar

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel