![]() |
|
[TuT] Infamous - Exploiting systems over WAN [TuT] - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449) +---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4) +----- Forum: Hacking Tutorials (https://hackforums.net/forumdisplay.php?fid=47) +----- Thread: [TuT] Infamous - Exploiting systems over WAN [TuT] (/showthread.php?tid=3237786) |
[TuT] Infamous - Exploiting systems over WAN [TuT] - -๖ۣۜDivine- - Feb 6, 2013 ![]() A lot of people are wondering if it's possible to exploit systems that are not in your local network without the use of pivoting. Pivoting requires us to already have access to one of the machines that are in the target's network. I have already covered it in my lesson which can be found here. So, is it really possible to pentest machines that are over WAN with just their IP? The answer is yes and no. Yes because it is possible in theory and can be done and no because only specific systems can be targeted and the targets are random. Also, chances of success aren't that great either. Before you begin, I highly recommend you watch my lessons and read my tutorial. If you are interested in writing your own exploits, read: Theory If you didn't read the tutorials I provided above go ahead and do it. But just in case, I'll explain this one more time. Your victim is behind a router and you can't access his local network directly. He has external IP address and internal IP address. And so do you. Remember how reverse connection works? Request is sent from his local machine through his router to your router. There the request gets confused because it doesn't know where to go, there are multiple choices inside your local network. You had to forward all incoming connections on a certain port to local machine of your choosing to get the connection. When you try to trigger the exploit on a remote system over WAN, it would go through your local machine, then through your router to his and then it would stop. It would too get confused and it would need directions. Port forwarding on his router is required. But how could you possibly access someone else's router from the comfort of your home? There is a special feature in them that is called remote management. It was originally made so that your ISP doesn't need to come to your house to solve your problem. They could access it directly from their office and fix it from there. Remote management allows people from WAN to access your router. And a lot of ISPs even have that option set for default. So, upon accessing it, we will forward all connections of remote port that the exploit uses to target system on his local network and we will successfully penetrate it. We could also set up a DMZ host. Targeting Start up BackTrack Console and run a nmap scan on a lot of targets. You want to check if port 80 or 8080 is open as these two are the ones most commonly used for remote management. Let's scan everything between 92.154.24.0 and 92.154.24.255 for example. The IP I provided is random and I didn't use it for actual demonstration. In it, type: PHP Code Find ones that show up as opened in the scan, and attempt to access them from your browser. The scan returned me eleven exploitable ones but I will demonstrate this one. Also, please note that the IP address will change since it's dynamic. So in my browser, I went to: PHP Code I was greeted with this lovely message. ![]() When this happens (it always will) you need to try and guess the password. It most likely wasn't changed and is still default one. You should try: PHP Code That is the most common one. But your best bet is to google the router model and try to find the default password. The one in my example was: PHP Code We're in. ![]() Now you want to see the machines that are connected. Check the DHCP Clients list. ![]() Our target will be 192.168.0.100. Now before doing anything let's check how the map to the target looks (Image taken from router itself) ![]() ![]() Now we need to set up DMZ host. DMZ host is a host on local network which has all ports exposed to traffic from WAN except ports that are forwarded in other direction. However this is very important to remember. If you do decide to use DMZ host instead of port forwarding, you might lose access to the router itself. Why? Because the port that you are using for remote management is also being forwarded to the DMZ host itself. So make all modifications before doing so, just in case. ![]() Now do an Nmap scan of this IP. It should return you the list of open ports on local machine. PHP Code Yay. Let's run the good old netapi exploit. Type: PHP Code Let's see what options we need to set by doing: PHP Code We need to set RHost (Remote host). Port is by default set to 445(RPort). So let's input the IP of our target: PHP Code Now we need to choose payload. We will use meterpreter bind payload. Why bind? Because reverse payload will have troubles reaching you. But I'll show how to use that one as well in next example. PHP Code Type show options again. Now it says we need to set lport and lhost. Lhost is your IP address and LPort can be whatever port you want (It mustn't be used already). I will use 4444. PHP Code Now all we need to do is type exploit and new meterpreter session will open. PHP Code Reverse Payload It will require you to port forward on your router as well. Forward the lport to your local IP address. Remember [TuT] Antagonism | Buffer Overflow [TuT] that exploits MiniShare? Some members have asked me how to change the lport and lhost so I'll show how to use this exploit on this remote system. Open BackTrack console and type: PHP Code ![]() Take what it outputs and place it in the exploit itself: PHP Code Now start a new backtrack console and type: PHP Code Netcat will start listening and you will have your session. * - Marcus Aurelius - Feb 6, 2013 Great job, i am currently making a tutorial, do you mind if i use the font / type of using colors? Thanks man! * - Dyme - Feb 6, 2013 Another great tutorial Divine. Learned a bit from this, hopefully I will successful in trying it! * - -๖ۣۜDivine- - Feb 6, 2013 (Feb 6, 2013 03:46 PM)FuzZyModz Wrote: Great job, i am currently making a tutorial, do you mind if i use the font / type of using colors? I don't own any of them. Feel free to use it. Thanks Dyme. * - amus3d - Feb 6, 2013 Another nice tutorial, thanks for this. ;3 * - pashabiceps - Feb 6, 2013 Another great tutorial from Divine. Thanks for posting. * - Processor - Feb 7, 2013 This a great tutorial! HQ Spoiler (Click to View) * - -๖ۣۜDivine- - Feb 7, 2013 Glad you all liked it. Thanks for your feedback guys. * - dildilkk - Feb 7, 2013 great posting.. very excellent post. thanks for posting * - avlolm - Feb 7, 2013 nice tut we should espect the new one soon * - PoLoW - Feb 7, 2013 This is Amazing OP, is it possible to do this without installing Backtrack, or it's required ? Nice share for real * - -๖ۣۜDivine- - Feb 7, 2013 (Feb 7, 2013 11:51 AM)Polow Wrote: This is Amazing OP, is it possible to do this without installing Backtrack, or it's required ? You could install Metasploit on windows as well. * - ExclenKr - Feb 7, 2013 Man is this will also work for hacking win 7 systems * - 4RG0S - Feb 7, 2013 Amazing Tutorial, like all the others :) * - -๖ۣۜDivine- - Feb 8, 2013 Thank you, I am glad you liked it mate. |