How do you get a meterpreter shell on a computer from a completely different network? – Digitalmunition




Home Forums How do you get a meterpreter shell on a computer from a completely different network?

This topic contains 1 reply, has 2 voices, and was last updated by  destro2323 1 month, 2 weeks ago.

  • Author
    Posts
  • #336487

    anonymous
    Participant

    I have just recently learned about how to use msfconsole for exploitation and msfvenom for payload generation. I was wondering how exactly you would get a meterpreter shell (using a payload) from another computer which was on a completely different network, being that there is NAT and public/private IP addresses to deal with. How would you set the LHOST parameter, for example? My ISP uses some type of proxy which makes all of my public IP addresses the same on different devices (verified by going to [ipchicken.com](https://ipchicken.com)).

    Metasploit aside, how would you just flat-out send packets from one WI-FI network to the next with something like a python program? All of the python network programming tutorials that I come across seem to deal with LAN IP communication exclusively without telling you how to deal with different networks on a WAN. How would this work? Am I just being stupid?

  • #336488

    destro2323

    Either that computer is visible to the world(they punched a hole in their firewall) or you tricked them to run code.

  • #336489

    ShiroiOk

    Port forwarding will allow you to set your port then public IP in the payload generation when this is ran it will connect to the computer which your specified in port forwarding on your router.

    Be careful with this anyone listening on the wire will see the connection and if there is a hole to punch through they will find it, when opening a port to WAN anyone can connect to it.

    This is one of the reasons DarkComet RAT stop being used a flurry of exploits came out allowing the “victim” to take over the attackers machine.

    https://www.exploit-db.com/exploits/39985

    https://samvartaka.github.io/exploitation/2016/06/03/dead-rats-exploiting-malware

  • #336490

    Just_me_again

    2 things.

    1. you could have your computer visible to the internet (Not recommended)
    2. You would have a server out in the world someplace that the callback is sent to, then connect to that server from your personal computer

  • #336491

    PapyrusGod

    Bruh, look up routing tables.

You must be logged in to reply to this topic.