Script for generating Fake AP with Kama Functionality for MITM Attacks

the Script will launch depending on the options a valid routed AP in karma mode, it will capture all packets and will launch ettercap. You can choose if you use Airbase-ng or the Madwifi drivers with Digininja's Karma Patch and HD's additions, this is the default madwifi drivers in Backtrack3. Aircrack-ng must be upgraded to the latest development version for the script to work with the Airbase-ng functionality. I hope you guys like it.

/mitmap.tar.gz


bt ~ # ./mitmap.sh
Scritp for launching Fake AP to perform Man in The Middle Attack
By Carlos_Perez[at]darkoperator.com
Ver 0.1.1
Usage:
./mitmap.sh -m mode -i wireless interface -o internet interface

Modes:

ap :Access Point using Airbase-ng
apf :Access Point using Airbase-ng and MAC Filtering
apa :Access Point using Digininja patched Madwifi kernel modules
apaf :Access Point using Digininja patched Madwifi Kernel modules and MAC filtering

Options:

-s ssid :SSID to use for the Fake AP
-f text file :text file containing MAC addresses to use as filter one per line
-d dhcpd conf :Dhcpd configuration file
-h : This help message

bt ~ # ./mitmap.sh -m ap -s Danger -d ./dhcpd.conf -i ath0 -o eth0
Changing MAC Address
Current MAC: 00:40:96:af:47:65 [wireless] (Cisco AIR-PC4800, 350, AIR-PCM340, AIR-PCM352)
Faked MAC: 00:01:1e:b7:a7:1f (Precidia Technologies, Inc.)
starting fake ap
This will take 15 seconds ..............
Changing MTU Size for At0 to 1400
DHCPD started succesfully
Starting Packet capture to /root/apmitm-Jan-02-09-010919.cap

ettercap NG-0.7.3 copyright 2001-2004 ALoR & NaGA

Listening on at0... (Ethernet)

at0 -> 00:01:1E:B7:A7:1F 10.0.0.1 255.255.255.0

Privileges dropped to UID 0 GID 0...

28 plugins
39 protocol dissectors
53 ports monitored
7587 mac vendor fingerprint
1698 tcp OS fingerprint
2183 known services

Starting Unified sniffing...

Text only Interface activated...
Hit 'h' for inline help

Winenum Update

Josh Wright from Inguardians published a great paper called Vista Wireless Power Tools on the new features of Windows Vista wireless commands plus published several tools. I added the enumerations commands to Winenum plus it will now export the registry keys where the wireless configured networks of Windows XP and Windows Vista machines is stored, this files can be imported into the pentesters windows bos to gain access to the clients network or to get the wireless keys using other tools after importing.

DiGiNinga Karma Patch for Atheros Cards ROCKS!!!!

I have been playing with the karma patch that DiGiNinja coded for the Madwifi-ng kernel modules for Atheros wireless cards. This allows us to set our Atheros wireless card to respond to any request broadcast from wireless client as if we are the AP they are looking for, in addition we will broadcast the SSID as if we are the AP to see if any other client in the area is looking for the network. This patched kernel modules are in BT3 and in iPwn OS that HD Moore uses for his mobile laptops, and I have to say this patch is a must for any serius pentester. I decided to make an lzm for Backtrack 3 after being foolish enough to over write the modules with a clean install of madwifi.
The features that it adds are as follows:

  • Karma functionality
  • SSID Blacklist and Whitelist
  • MacAddress Blacklist and Whitelist
As a pentester this gives you the flexibility to target your attacks and be able to follow strict Rules of Engagement allowing you to only attack machines wich you are allowed to attack, the SSID's and MAC's can be added dynamically so you do not have to stop your attack. The commands that I found are as follows:
Enabling and Disabling Karma:
  • iwpriv atho karma 1 (Enable Karma)
  • iwpriv ath0 karma 0 (Disable Karma)
  • iwpriv ath0 get_karma (Get status of Karma)
MAC Address Whitelisting and Blacklisting:
  • iwpriv ath0 maccmd 1 (Sets the card in whitelist mode)
  • iwpriv ath0 maccmd 2 (Sets the card in Blacklist mode)
  • iwpriv ath0 maccmd 0 (Disable all MAC filtering modes)
  • iwpriv ath0 addmac (Adds mac address to the list)
  • iwpriv ath0 kickmac (Removes MAC Address form the list)
  • iwpriv ath0 maccmd 3 (Clears the entire MAC Address list)
SSID Whitelisting and Blacklisting:
  • iwpriv ath0 karma_bw 0 (Sets the card in Blacklist mode)
  • iwpriv ath0 karma_bw 1 (Sets the card in Whitelist mode)
  • iwpriv ath0 get_karma_bw (Get status of Blacklisting and Whitelisting Mode)
  • iwpriv ath0 addkarmassid (Adds SSID to the list)
  • iwpriv ath0 clrkarmalist 0 (Clears SSID List)

WPA ain't Dead

I have read many articles and many of them state that WPA is dead, well if you read carefully it ain't dead yet. The attack works on WPA networks where TKIP and QoS are used and only partial decryption happens. In fact if you have your AP logging errors to a centtralized server you can even create triggers for the attack for example a Cisco MARS. One has to start the process of securing the wireless networks and start the migration to AES, once Aircrack-ng is updated and further research is done on this attack I do belive that WPA with TKIP will be dead, so you have some time left but you better move it. I highly recommend you give a rear to the article Battered but not Broken in arstechnica.