karma9874 / AndroRAT

A Simple android remote administration tool using sockets. It uses java on the client side and python on the server side
MIT License
2.99k stars 978 forks source link

Error in androRAT.py #296

Closed LinuxAnonymus closed 9 months ago

LinuxAnonymus commented 10 months ago

I am starting python3 server using following command in Kali Linux terminal to host created .apk file:

sudo python3 androRAT.py --shell -i 0.0.0.0 -p 8000

When I am connecting to the server form android phone I get following message in terminal:

Got connection from ('192.x.x.x', 48852) -- IP address of android phone

GET /test.apk HTTP/1.1
Host: 192.x.x.x:8000 -- IP address of Linux machine.
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Mobile Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9

Interpreter:/>

And on phone page is stuck on loading.

After some time I am getting following error message:

Traceback (most recent call last):
  File "/home/Aldy/AndroRAT/androRAT.py", line 62, in <module>
    get_shell(args.ip,args.port) 
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/Aldy/AndroRAT/utils.py", line 342, in get_shell
    conn.send(message_to_send.encode("UTF-8"))
BrokenPipeError: [Errno 32] Broken pipe

Is there any solutions recommended to solve it?

vsaucing commented 10 months ago

Open the Port Forwarding on yoru modem's settings.

LinuxAnonymus commented 10 months ago

Open the Port Forwarding on yoru modem's settings.

I'll try that right away, any guide I can follow ? 😅

vsaucing commented 10 months ago

What is the brand of your modem

LinuxAnonymus commented 10 months ago

What is the brand of your modem

It's Tenda

vsaucing commented 10 months ago

https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.microcenter.com/tech_center/article/8323/how-to-forward-or-open-a-port-on-a-tenda-router&ved=2ahUKEwiDu7aUiJ6CAxXnQ_EDHTSgBUEQFnoECAwQBQ&usg=AOvVaw3kurj_auUSDspIuXPOCq6i

vsaucing commented 10 months ago

https://www.tendacn.com/in/faq/3273.html

LinuxAnonymus commented 10 months ago

https://www.tendacn.com/in/faq/3273.html

Thanks, first I am trying without touching the modem or adapter.

I am trying to achieve port forwarding using "localtunnel".

Any suggestions with it ?

vsaucing commented 10 months ago

It's a bad idea. May not work

github-actions[bot] commented 9 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 9 months ago

This issue was closed because it has been inactive for 7 days since being marked as stale.