Giter VIP home page Giter VIP logo

mitmap's Introduction

           _ _              ___  ______
          (_) |            / _ \ | ___ \
 _ __ ___  _| |_ _ __ ___ / /_\ \| |_/ /
| '_ ` _ \| | __| '_ ` _ \|  _  ||  __/
| | | | | | | |_| | | | | | | | || |    
|_| |_| |_|_|\__|_| |_| |_\_| |_/\_| 2.2

⚠️ Warning! This project is no longer maintained and may not work as excepted.

A python program to create a fake AP and sniff data.

new in 2.0:

  • SSLstrip2 for HSTS bypass
  • Image capture with Driftnet
  • TShark for command line .pcap capture

features:

  • SSLstrip2
  • Driftnet
  • Tshark
  • Full featured access point, with configurable speed limit
  • mitmproxy
  • Wireshark
  • DNS Spoofing
  • Saving results to file

requirements:

Kali Linux / Raspbian with root privileges
A wireless card and an ethernet adapter / 2 wireless card
Python3 (mitmAP will install the dependenices, you don't have to do it)

downloading:

starting:

  • Kali Linux -> "sudo python3 mitmAP.py"
  • Raspberry PI -> "sudo python3 mitmAP_rpi.py"

Important: At the first run, choose 'y' on installing dependencies and on creating the config files!

disclaimer:

I'm not responsible for anything you do with this program, so please only use it for good and educational purposes.

mitmap's People

Contributors

kevinlmadison avatar linuxlizard avatar parasimpaticki avatar xdavidhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mitmap's Issues

Dnsmask : symbol 'nettle_hashes' had different size in shared object

Hi,

mitmAP is not working for me. I guess that's because dnsmask shows this warning when starting:

Dnsmask : symbol 'nettle_hashes' had different size in shared object, consider re-linking.

Once everything is started, I can connect to the AP but can't browse anything (error in clients : domain names can't be resolved).

There is nothing in mitmap-sslstrip.log, and I don't have more log files.
I noticed this dnsmask issue appeared in other distros but I have the latest kali packages so I wonder, if that's the problem, do you also have this warning ?

If this warning is not important, is there a way to have more logs ?

Thanks

NameError: name 'Y' is not defined

File "mitmAP.py", line 12, in <module>
update = input("[?] Install/Update dependencies? Y/n: ")
File` "<string>", line 1, in <module>
NameError: name 'Y' is not defined

Could u fix this issue pls ??

thanks

Problems on Raspberry Pi

I've got 2 problems. I've got fully up to date RPi 3 and when i try to laung WireShark with GUI, it gives me
Traceback (most recent call last): File "mitmAP_rpi.py", line 196, in <module> if tshark_if == "y" or tshark_if == "": NameError: name 'tshark_if' is not defined
which seems easy to fix and not that bad actually as i can use TShark.

Second problem is worse tho. When launching SSLStrip, i get :

tail: cannot open �/home/pi/mitmAP/logs/mitmap-sslstrip.log� for reading: No such file or directory
tail: no files remaining
[!] Stopping...
No screen session found.
No screen session found.
No screen session found.
[I] Stopping DNSMASQ server...
[I] Restoring old dnsmasq.cfg...
[I] Deleting old '/etc/dnsmasq.hosts' file...
[I] Removeing speed limit from wlan0...
[I] Flushing iptables rules...
[I] Traffic have been saved to the file '/home/pi/mitmAP/logs/mitmap-sslstrip.log' and to file '/home/pi/mitmAP/logs/mitmap-tshark.pcap'.
[I] Traffic have been saved to the file '/home/pi/mitmAP/logs/mitmap-tshark.pcap'.

[!] WARNING: If you want to use the AP interface normally, please reboot the PI!

[I] mitmAP stopped.

which is kinda bad as i can't unleash full potential of your tool. Anyway i am looking forward for fixes and updates! I always like those small "indie" tools.
Good Luck!:)

NetworkManagerSegmentation fault

hi, i get this error:

[I] Restoring old NetworkManager.cfg
[I] Restarting NetworkManager...
[ ok ] Stopping network connection manager: NetworkManager already stopped.
[....] Starting network connection manager: NetworkManagerSegmentation fault
failed!

AttributeError: 'module' object has no attribute 'DEVNULL'

`
[?] Install/Update dependencies? Y/n: n
[?] Please enter the name of your wireless interface (for the AP): wlan1
[?] Please enter the name of your internet connected interface: wlan1
[I] Backing up NetworkManager.cfg...
[I] Editing NetworkManager.cfg...
Traceback (most recent call last):
File "mitmAP.py", line 62, in
write_file("/etc/NetworkManager/NetworkManager.conf", network_manager_cfg )
File "mitmAP.py", line 29, in write_file
_run_cmd_write((sudo, tee, path), s)
File "mitmAP.py", line 22, in _run_cmd_write
stdout=subprocess.DEVNULL,
AttributeError: 'module' object has no attribute 'DEVNULL'

`
I'm getting this error after I input my interface's name, anyone know why?

/var/run/wpa_supplicant.wlan0.pid: No such file or directory Raspberry pi 3 b+

Hello, i have try a make a rogue AP with my rapsberry pi 3 b+ with kali linux the last version and with my
wireless adapter awus036neh Ralink Technology, Corp. RT2870/RT3070
But when i selected my 2 interface wireless i get a error

[?] Please enter the name of your wireless interface (for the AP): wlan0
[?] Please enter the name of your internet connected interface: eth0
[I] Killing wpa_supplicant on wlan0...
cat: /var/run/wpa_supplicant.wlan0.pid: No such file or directory

Usage:
kill [options] [...]

Options:
[...] send signal to every listed
-, -s, --signal
specify the to be sent
-l, --list=[] list all signal names, or convert one to a name
-L, --table list all signal names in a nice table

-h, --help display this help and exit
-V, --version output version information and exit

I have install all dependencies
sudo apt-get install driftnet -y
sudo apt-get install python-pcapy -y
sudo apt-get install python-pip -y
sudo apt-get install libpcap-dev -y
sudo python -m pip install dnspython
sudo python -m pip install pcapy
sudo python -m pip install twisted

If someone can be help me

Thank you, bye

Problem with SSLSTRIP

When SSLSTRIP option is enabled I can't connect any devices to the AP. It says that there isn't any mitmap-sslstrip.log for reading.

Mutiple client connections

Great tool! I did think that SSLstrip no longer worked, but I see this is still effective against android ;-) my question is will mitmAP accept multiple client connetions?? I did try but noticed that when I had a device connected to the SSID no other devices would connect?

mitmproxy parameters changed

At line 300 of mitmAP.py mitmproxy is being called:
os.system("sudo mitmproxy -T --host --follow -w " + script_path + "logs/mitmap-proxy.mitmproxy")

However, the parameters have changed:
`usage: mitmproxy [options]
mitmproxy: error: unrecognized arguments: -T --host --follow

-T is deprecated, please use --mode transparent instead
--follow is deprecated.
Please use --set console_focus_follow=value instead.
To show all options and their default values use --options`

Fix (With --host, I cannot find the 'new' parameter for this one):
os.system("sudo mitmproxy -m transparent --set console_focus_follow=true -w " + script_path + "logs/mitmap-proxy.mitmproxy")

Confirming with 'y' is not defined when installing dependencies

Thats a quick start and quick end lol, do I miss something?

Install/Update dependencies? Y/n: Y
Traceback (most recent call last):
File "mitmAP.py", line 48, in
update = input("[?] Install/Update dependencies? Y/n: ")
File "", line 1, in
NameError: name 'Y' is not defined

Logging mac-аddresses

How do I find the logs of the mac-addresses of the connected devices, when sslstrip is enabled?

Stopping with mitmproxy: error: unrecognized arguments: --follow

Hello, I have had a bug when setting up the AP :
Logs below :

raspberrypi ~/mitmAP ‹master*› » sudo python3 mitmAP_rpi.py
           _ _              ___  ______ 
          (_) |            / _ \ | ___ \
 _ __ ___  _| |_ _ __ ___ / /_\ \| |_/ /
| '_ ` _ \| | __| '_ ` _ \|  _  ||  __/ 
| | | | | | | |_| | | | | | | | || |    
|_| |_| |_|_|\__|_| |_| |_\_| |_/\_| 2.0
      RaspberryPI version   by @xdavidhu

[?] Install/Update dependencies? Y/n: n
[?] Please enter the name of your wireless interface (for the AP): wlan0
[?] Please enter the name of your internet connected interface: eth0
[I] Killing wpa_supplicant on wlan0...
[?] Use SSLSTRIP 2.0? Y/n: n
[?] Capture unencrypted images with DRIFTNET? (ONLY WORKS WITH GUI) y/N: N
[I] Backing up /etc/dnsmasq.conf...
[I] Creating new /etc/dnsmasq.conf...
[I] Deleting old config file...
[I] Writing config file...
[?] Create new HOSTAPD config file at '/etc/hostapd/hostapd.conf' Y/n: Y
[?] Please enter the SSID for the AP: derp
[?] Please enter the channel for the AP: 13
[?] Enable WPA2 encryption? y/N: N
[I] Deleting old config file...
[I] Writing config file...
[I] Configuring AP interface...
[I] Applying iptables rules...
[?] Set speed limit for the clients? Y/n: n
[I] Skipping...
[?] Start WIRESHARK on wlan0? (ONLY WORKS WITH GUI) y/N: N
[?] Capture packets to .pcap with TSHARK? (no gui needed) Y/n: Y
[?] Spoof DNS? Y/n: Y
[?] How many domains do you want to spoof?: 3
[I] Backing up /etc/dnsmasq.conf...
[?] 1. domain to spoof (no need for 'www.'): facebook.com
[?] Fake IP for domain 'facebook.com': 192.168.0.68:8001
[?] 2. domain to spoof (no need for 'www.'): google.com
[?] Fake IP for domain 'google.com': 192.168.0.68:8002
[?] 3. domain to spoof (no need for 'www.'): reddit.com 
[?] Fake IP for domain 'reddit.com': 192.168.0.68:8003
[I] Starting DNSMASQ server...

dnsmasq: bad address at line 10 of /etc/dnsmasq.conf
[?] Capture traffic? Y/n: Y
[?] Capture HTTPS traffic too? (Need to install certificate on device) y/N: N
[I] Starting AP on wlan0 in screen terminal...
[I] Starting TSHARK...

Starting MITMPROXY in 5 seconds... (press q and y to exit)

usage: mitmproxy [options]
mitmproxy: error: unrecognized arguments: --follow

[!] Stopping...
No screen session found.
No screen session found.
[I] Stopping DNSMASQ server...
[I] Restoring old dnsmasq.cfg...
[I] Deleting old '/etc/dnsmasq.hosts' file...
[I] Removeing speed limit from wlan0...
[I] Flushing iptables rules...
[I] Traffic have been saved to the file '/home/pi/mitmAP/logs/mitmap-proxy.mitmproxy' and to file '/home/pi/mitmAP/logs/mitmap-tshark.pcap'. View the '.mitmap' file later by 'mitmproxy -r [file]'.
[I] Traffic have been saved to the file '/home/pi/mitmAP/logs/mitmap-tshark.pcap'.

[!] WARNING: If you want to use the AP interface normally, please reboot the PI!

[I] mitmAP stopped.

help

Where do I find saved results?
2 Can I change the saved location?
3 how do I deauthentication a user
3 Can I save captured images with drifnet?

Airbase-ng instead of Hostapd

Hello,

What about using Airbase-ng instead of Hostapd to create the AP?
The great thing about Airbase-ng is the -P option:
-P : respond to all probes, even when specifying ESSIDs
It can be combined with -C option.
Finally, it will perform channel hopping so that you do not have to fix a channel and all channels will be sprayed.

I do not think it is possible to do the same thing with Hostapd.

Also, just a small detail, Line 15:
os.system("sudo chmod 777 " + script_path + "logs")
755 permissions should work and be safer.

Regards,

Please we need this for Raspberry Pi Kali

I am shock of this new python script. I think its great because it combines sslstrip2 and dnsproxy and it makes it all automatically. I tried to run it on kali for Raspberry Pi, all two versions, but it doenst work. It would be great if you could fix it.

Congratulations for your work.

Deauth real AP?

Hey.

I'm not sure if this would work, but would it be possible to deauth the clients of the AP you're trying to clone, then run the fake one so people just connect to yours assuming it's the real AP?

If so, would it be possible to add that to this script?

Thanks.

Some sites don't load

Hello, once the access point is created, I connect with my phone (Android) but some sites do not load (for example teste.com or ldlc.com) but for exemple Facebook works.

What is the cause of this problem?

Thank you in advance

AP Issue

I have applied the earlier fix but still no AP is coming up. Below is the o/p I am getting from my Kali VM

[I] Writing config file...
[I] Configuring AP interface...
[I] Applying iptables rules...
[?] Set speed limit for the clients? Y/n: n
[I] Skipping...
[?] Start WIRESHARK on wlan0? Y/n: n
[?] Capture packets to .pcap with TSHARK? (no gui needed) Y/n: n
[?] Spoof DNS manually? y/N: N
[I] Starting DNSMASQ server...
[I] Starting AP on wlan0 in screen terminal...
[I] Starting DRIFTNET...

TAIL started on /root/mitmAP/logs/mitmap-sslstrip.log...
Wait for output... (press 'CTRL + C' 2 times to stop)
HOST-s, POST requests and COOKIES will be shown.

[I] Restarting tail in 1 sec... (press 'CTRL + C' again to stop)

Binary file (standard input) matches

Hi,

everytime i start an AP, i get the Output for the first few Hosts and after that the following Error: "Binary file (standard input) matches".
After this Error Message no further Output is given.

It seems to be an Error based on the way the Grep command is used for giving the Output.

Someone knows, how to fix this?

not able to pick up internet facing interface

there's seem to be an issue when I input interface connected to the internet, doesn't matter which interface I use. I've installed all needed dependencies while running the script for the first time

[?] Install/Update dependencies? Y/n: 'n'
[?] Please enter the name of your wireless interface (for the AP): 'test'
[?] Please enter the name of your internet connected interface: wlan0
Traceback (most recent call last):
File "mitmAP.py", line 70, in
net_iface = input("[?] Please enter the name of your internet connected interface: ")
File "", line 1, in
NameError: name 'wlan0' is not defined

when I try 'wlan0'

[?] Please enter the name of your internet connected interface: 'wlan0'
[I] Backing up NetworkManager.cfg...
[I] Editing NetworkManager.cfg...
Traceback (most recent call last):
File "mitmAP.py", line 76, in
write_file("/etc/NetworkManager/NetworkManager.conf", network_manager_cfg )
File "mitmAP.py", line 36, in write_file
_run_cmd_write((sudo, tee, path), s)
File "mitmAP.py", line 29, in _run_cmd_write
stdout=subprocess.DEVNULL,
AttributeError: 'module' object has no attribute 'DEVNULL'

Also it seems there's a problem with user input need to use single quotes, see the below:
[?] Install/Update dependencies? Y/n: 'n'

Installation freezing on RPi3

Hi,

I am running for the first time on an RPi3, choosing to install dependencies, but it then goes no further.

Is there a debug mode or anything else I can try in order to provide more details for you? Appreciate this isn't much to go on!

Thanks

README.md Snafu

Hey, just something that I noticed on your README.md that seemed to be incorrect. You state that, in order to run the python script, on Kali Linux, you have to use 'sudo,' well, that typically isn't the case. This is due to the fact that, by default, Kali boots into a user with 'root,' assuring that you never have to use 'sudo,' unless you are in another account. Just thought I should let you know, it's pretty minor...

not working?

I am unsure if this is doing anything. I set it up on my raspberry pi, and can use the new AP, but nothing appears in the log or in the console. Am I missing something?

Client can't conect

client connects only when i use the same interface(wlan0) for both fakeAP and internet ( if i use eth0 for internet client unable to connect) and while im only able to connect to fakeAP on wlan0 ( client dont have internet) What i'm missing? ( Kali on VirtualBox)

can i use this with raspberry pi 3 inbuilt wifi card with nexmon kali

i have a raspberry pi 3 and i have installed kali nexmon image for monitor mode on rpi3 i was somehow able to create a fake ap with rpi3 default wifi card using fluxion but it was not responding like no one was able to connect to it an etc i have another wifi external card which dows not support ap mode so cant create ap with that but it works well with monitor mode. help me

sslstrip v2 ?

Hey ;)
I didn't find in the doc (noexistent) but is the sslstrip shipped supposed to add a 'w' before all subdomains ? Because I don't see this behavior.
Also, when launching wireshark on the AP interface , when browsing https I don't see http connections, but SSL/TLS ones only.

using latest kali and packages are up to date

unrecognized

hello,
I need help : I am on virualbox, and when I start the fake AP, it write me that :

[I] Restarting tail in 1 sec... (press 'CTRL + C' again to stop)
tail: unrecognized file system type 0x794c7630 for ‘/root/Desktop/mitmAP/logs/mitmap-sslstrip.log’. please report this to [email protected]. reverting to polling

what can I do ? thank you already ;)

Connectivity Issue

I am using Kali Linux on-board wi-fi card as INTERNET facing card and external ALFA card as Access Point. MITMAP gives no error but simultaneously no AP is coming live.

Re route all traffic

I've tried to re-route all traffic but it won't work.
Aim to send all user to an Apache server on my pi.

Thanks in advance,
Wo

Block https

Tell me please.
I want to completely close the https access. For example, the sslstrip didn't work and the victim wasn't redirected to https. how to do it?
p.s.: sorry for my English

Created AP not visible

Trying on Kali linux on RPI3, 2 wireless adapter option, seems to be like AP is not created or something, still not visible in available networks from different computer

RPI crash at [I] Configuring AP interface...

When running "sudo python3 mitmAP_rpi.py" I can complete the steps fine until it wants to start the AP interface. After it's at configuring AP interface I have to physically remove the power from the RPI and reboot it to make it work again.

I can start the ap fine with "sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf". It shows up on my phone and I can connect.

Is there a way to debug this?
image

Apparently running: "sudo ifconfig "wlan0" up 10.0.0.1 netmask 255.255.255.0" crashes my PI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.