0

I have a problem that when I try to open multi handler in msfconsole to exploit android, the sessions are not showing. But when I connect both PC and android to the same wifi, then the sessions are showing.

Can anyone help with it?

1
  • This isn't a security question. This is a basic networking question. Please review your basic TCP/IP routing and addressing subjects.
    – schroeder
    Commented Dec 24, 2021 at 14:40

1 Answer 1

0

The problem is routing.

There are basically 2 classes of IP addresses: public and private.

Public ones are, well, public. They can be reached by anyone, from any part of the world (unless a firewall is in the way). That's why someone in Italy can connect to a webserver in Canada. The downside is that IPv4 addresses are limited, so not everyone can get one. IPv6 are plentiful, but not everyone uses them yet.

Private ones are local to the network. They are great for local area networks because everyone can get an address. Downside: people from one network cannot directly talk to other network. You need NAT, port forwarding, and so on.

Now, your problem: when you use meterpreter on the Android phone without connecting to the same Wifi of the computer, they are on different networks. Your phone is on the private network of the ISP, and your phone is on your local network. There's no path between them. If you connect both to the same network, they can now talk.

1
  • 1
    We have dozens of these Q&As around basic networking. I know that I probably have more Sec.SE posts in my head than most other people, but for these really basic questions, assume we have a dupe somewhere.
    – schroeder
    Commented Dec 24, 2021 at 14:38

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