So I have been playing around with the aircrack-ng suite and beef a mitmf. Until now I have been able to host an Evil Twin with DHCP server and providing internet access to connected clients while capturing all their packets.

Now imagine there is an AP that uses WPA2 encryption, but I already know the password to it. I can run airbase-ng with the -W and -Z flags and copy the encryption methods used by the original (real) AP. The thing is that I cannot provide a password for, so when others get deauthenticated from the real one they are unable to access the internet via my Evil Twin.

To make it clear, I don't want the WPA2 password, I already have it, I just want to perfectly spoof the other AP even it's WPA2 password so devices are able to connect to me automatically. (Basically let airbase-ng complete the 4 way handshake)

Is that possible with the air-ng tools? I'm running kali linux by the way.

  • try wifiphisher it has a pre-shared key option Mar 27, 2019 at 2:18

1 Answer 1


From Airbase-ng site, yes you can.

You need the following command: airbase-ng -c 9 -e teddy -z 2 -W 1 rausb0 where:

  • -c 9 specifies the channel
  • -e teddy filters a single SSID
  • -z 2 specifies TKIP
  • -W 1 set WEP flag because some clients get confused without it.
  • rausb0 specifies the wireless interface to use

I tired to achieve what you're trying to do once, and the problem is within the encryption protocol. You need to make sure that you're using the correct one. TKIP or CCMP.

  • Yeah man I know about this, but there is no parameter specifying the password. I was actually able to do this today with hostapd, where I can specify the password as well as all the other configurations in a configuration file. This way devices automatically connect to my AP thinking it is a trusted one, tries the password and even that works.
    – Esser420
    Aug 28, 2016 at 17:47
  • have you tried -s force shared key authentication and -S set shared key challenge length (default: 128) along with WPA ?
    – Eibo
    Aug 29, 2016 at 6:15
  • yes but doesn't work, those options are not what I'm looking for. Seriously try it with hostapd, it's one hell of a way to man in the middle someone.
    – Esser420
    Sep 1, 2016 at 20:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .