3

I have a rooted Android Samsung S23 that I use for penetration testing with mobile apps. Frequently, I have encountered issues with connecting it to WiFi networks. When I attempt to login to a WiFi network from this phone, it will return the message "connected without internet". This issue is not exclusive to a single network such as at the office or at home.

I can connect this phone to the internet using my laptop as a proxy. To do this, I enable USB debugging in developer settings. Then within the WiFi settings, I setup a proxy with hostname "localhost" and port number 8080. I then connect the phone to my laptop via USB cable, and entering the command adb reverse 8080 8080 in my laptop terminal. When doing this, I have BurpSuite open and listening for connections to localhost:8080. I am able to intercept requests to applications on the phone this way.

This is the workaround I have been using so far, but it is very frustrating that I cannot find a fix for the WiFi. I have tried researching this problem but have not found anything helpful online. Changing the DNS settings does not work. I have also tried setting a static IP address for the phone. This does not work. The phone does not seem to be blocked in my router settings. Although for some reason it is listed under 'cable connected devices'. This is the only substantial clue I have.Screencap Router Settings

Any help in resolving this issue would be greatly appreciated, as I am sure I am not the only person that has encountered this bug.

1 Answer 1

3

You set-up looks quite good, however your way of set-up TCP port forwarding from Android to the PC seems to be wrong:

> adb reverse 8080 8080
adb.exe: error: cannot bind listener: unknown socket specification:8080

The correct command is:

adb reverse tcp:8080 tcp:8080

Afterwards you should in Burp see at least the HTTP call that allows Android to detect if Internet is available and if a captive portal exists: http://connectivitycheck.gstatic.com/generate_204 or http://connectivitycheck.android.com/generate_204.

Note that this way your phone may recognize that "Internet" is available, however nearly all apps won't work unless you have installed the Burp root CA certificate as system certificate.

So you will need a Magisk module like MagiskTrustUserCerts that allows you to install the Burp root CA certificate as user certificate and the module will make it a system certificate on every boot.

If you already have installed Android 14 you may need a modified version of the module like ConscryptTrustUserCerts.

Edit: It seems like device with Android 14 (and may be 13 too) make a request to https://www.google.com for detecting if internet is available. Not sure if this connection uses certificate pinning (and thus ignores the installed Burp root CA certificate). If I bypass that domain in the proxy my device always detects that Internet is fully available.

1
  • The way I understand the OP, he has no trouble using the laptop as a proxie, including the adb command. He has trouble connecting to any WiFi. Feb 7 at 23:49

You must log in to answer this question.

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