{"id":471,"date":"2015-12-22T17:19:58","date_gmt":"2015-12-22T17:19:58","guid":{"rendered":"http:\/\/www.hackwhackandsmack.com\/?p=471"},"modified":"2015-12-22T17:19:58","modified_gmt":"2015-12-22T17:19:58","slug":"simple-egress-testing-via-a-vps","status":"publish","type":"post","link":"https:\/\/www.hackwhackandsmack.com\/?p=471","title":{"rendered":"Simple Egress Testing via a VPS"},"content":{"rendered":"<p>If you want to test the egress controls from a client environment the best way to do this is setup a VPS which simulates all ports open. This is rather easier to do especially if you have SSH enabled as you can forward all ports to TCP 22 using iptables as shown below:<\/p>\n<pre style=\"color: black;\">iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 1:65535 -j REDIRECT --to-port 22\r\n\r\nThen do an Nmap or Masscan against your host and see if any ports are open. If they are then you have weak egress controls that you can abuse in your client environment :) \r\n\r\n<a href=\"http:\/\/www.hackwhackandsmack.com\/wp-content\/uploads\/2015\/12\/Selection_001.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-473\" src=\"http:\/\/www.hackwhackandsmack.com\/wp-content\/uploads\/2015\/12\/Selection_001.png\" alt=\"Selection_001\" width=\"624\" height=\"297\" \/><\/a><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you want to test the egress controls from a client environment the best way to do this is setup a VPS which simulates all ports open. This is rather easier to do especially if you have SSH enabled as you can forward all ports to TCP 22 using iptables as shown below: iptables -A&hellip; <a class=\"more-link\" href=\"https:\/\/www.hackwhackandsmack.com\/?p=471\">Continue reading <span class=\"screen-reader-text\">Simple Egress Testing via a VPS<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=\/wp\/v2\/posts\/471"}],"collection":[{"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=471"}],"version-history":[{"count":1,"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=\/wp\/v2\/posts\/471\/revisions"}],"predecessor-version":[{"id":474,"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=\/wp\/v2\/posts\/471\/revisions\/474"}],"wp:attachment":[{"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hackwhackandsmack.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}