5

I was able to create an open wifi hotspot in Android 2.2 programmatically and to read out the ip and mac of the connected clients using the ARP-File: code here Now I would like to find a way to restrict the use of the wifi hotspot. I want to use an open network and not set up any key. Either it should be possible to block certain clients (maybe mac filtering) or disconnect already connected but unauthorized clients. The idea is to send messages to the hotspot through a wifi connection. Some clients should be allowed to access the hotspot others not. How can I develop something like that? I would appreciate your help or suggestion.

animuson
  • 53,861
  • 28
  • 137
  • 147
user574080
  • 146
  • 1
  • 3
  • 11

2 Answers2

0

Use mac filtering could be an option but the clients can always change his mac address, and with this method you only can block if the client is going to connected. If you like to disconnect clients you need use deauth packets.

There is an app in android call wifikill to send deauth packets.

http://forum.xda-developers.com/showthread.php?t=1282900

In this app you select the clients that you would like to disconnect and the android device will perform a deauth attack.

You could try to develop something but this app works successfully to me.

But if you use an open network will be very tricky to control access even thougth you deauth the clients they always can change theirs macs and try to look like a legitimate user. You will never have 100% control of the clients in an open network.

0

You can do it by mac address using the existing Android SoftApConfiguration.Builder#setBlockedClientList (link).

More info on this can be found on the official docs here.

Implementing allow and block lists

A typical carrier requirement is to provide the user with controls of the devices that are allowed to associate to the Soft AP. There are several mechanisms to do this:

...

Provide dynamic control using allow and block lists:

The default configuration of a Soft AP allows all devices to associate to the soft AP except for devices whose MAC addresses are added to SoftApConfiguration.Builder#setBlockedClientList. ...

Always Learning
  • 2,623
  • 3
  • 20
  • 39