WithSecureLabs / drozer

The Leading Security Assessment Framework for Android.
https://labs.withsecure.com/tools/drozer
Other
3.93k stars 778 forks source link

TimeoutError connecting to Agent #425

Closed wardellcastles closed 7 months ago

wardellcastles commented 7 months ago

Hi, I have the drozer Agent installed on the virtual android device It's status is "On"

On Windows 11 host, I have docker pull withsecurelabs/drozer (It is successful) adb forward tcp:31415 tcp:31415 docker run --net host -it withsecurelabs/drozer console connect --server 192.168.41.101:5555 (This is the address of the device) However after about 30 seconds, I get this error.. TimeoutError <class 'RuntimeError'> yayerroryay you probably didn't specify a valid drozer server and that's why you're seeing this error message 'ConnectionError' object has no attribute 'message'

Please advise.

cyberMilosz commented 7 months ago

Hey!

It looks like in your drozer console connect command you've specified a port number of 5555 - is that what you've set within drozer-agent? If not, it will be using the default port of 31415, and you will not need to specify it when connecting.

Also, if you're specifying an IP address (and not using localhost/the adb tunnel), you probably don't need adb forward.

Try one of the following:

docker run --net host -it withsecurelabs/drozer console connect --server 192.168.41.101

(no port number)

or, if you want to use adb tunnelling on Windows:

adb forward tcp:31415 tcp:31415
docker run -it --add-host host.docker.internal:host-gateway withsecurelabs/drozer console connect --server host.docker.internal
wardellcastles commented 7 months ago

Second option using adb tunneling worked. By the way, thanks for supporting Drozer!