<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>htb &amp;mdash; drsh0&#39;s llog</title>
    <link>https://drsh0.writeas.com/tag:htb</link>
    <description>my learning log; notes on cybersec activities, ctfs, and ill-equipped cyber adventures. Consume responsibly.</description>
    <pubDate>Sun, 26 Apr 2026 16:49:39 +0000</pubDate>
    <image>
      <url>https://i.snap.as/v7Oo2ci6.png</url>
      <title>htb &amp;mdash; drsh0&#39;s llog</title>
      <link>https://drsh0.writeas.com/tag:htb</link>
    </image>
    <item>
      <title>HackTheBox - Traverxec - Writeup</title>
      <link>https://drsh0.writeas.com/hackthebox-traverxec-writeup?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[HackTheBox - Traverxec - Writeup&#xA;&#xA;User&#xA;port and version enumeration:&#xA;nmap -sV -sC -oA traverxec.htb 10.10.10.165&#xA;We see that the http server being used is nostromo 1.9.6. This is a vulnerable service as seen by https://www.exploit-db.com/exploits/47573&#xA;We can run the metasploit module as per rapid7. &#xA;This gives a shell with www-data.&#xA;Running LinEnum.sh provides some interesting data, namely that we have a .htpasswd hash available.&#xA;This hash is a md5crypt hash.  We will use john htpasswd --list=/usr/wordlist/rockyou.txt to crack this. &#xA;After cracking this hash, we need to find the http directory where we can use this password. &#xA;Browsing /home/david/publicwww we can find a protected area. The password cracked earlier works!&#xA;Download the tar.gz file and extract using gunzip.&#xA;10. We have some ssh key backups. The most important file here is idrsa. &#xA;11. Use ssh -i key file to try and connect to  david@traverxec.htb.&#xA;12. We need a passphrase. Let&#39;s try using ssh2john and pass it to john to brute force. We will use rockyou.txt once again. &#xA;13. Passphrase found! Use this to connect via ssh.&#xA;14. id = david&#xA;15. cat user.txt&#xA;&#xA;Root&#xA;Use the shell script in home directory and see the commands being issued. Namely the use of sudo with journalctl. &#xA;Copy the file elsewhere and execute. It still works. &#xA;Add a &amp;&amp; operator and issue /bin/sh at the end of the shell script.&#xA;Run the script and you should be able to use !/bin/sh to get a shell via less with uid=0&#xA;cat root.txt &#xA;&#xA;#hackthebox #htb]]&gt;</description>
      <content:encoded><![CDATA[<p>HackTheBox – Traverxec – Writeup</p>

<h2 id="user" id="user">User</h2>
<ol><li>port and version enumeration:
<code>nmap -sV -sC -oA traverxec.htb 10.10.10.165</code></li>
<li>We see that the http server being used is <code>nostromo 1.9.6</code>. This is a vulnerable service as seen by <a href="https://www.exploit-db.com/exploits/47573" rel="nofollow">https://www.exploit-db.com/exploits/47573</a></li>
<li>We can run the metasploit module as per <a href="https://www.rapid7.com/db/modules/exploit/multi/http/nostromo_code_exec" rel="nofollow">rapid7</a>.</li>
<li>This gives a shell with <code>www-data</code>.</li>
<li>Running <a href="https://github.com/rebootuser/LinEnum/blob/master/LinEnum.sh" rel="nofollow"><code>LinEnum.sh</code></a> provides some interesting data, namely that we have a <code>.htpasswd</code> hash available.</li>
<li>This hash is a <code>md5crypt</code> hash.  We will use john <code>htpasswd --list=/usr/wordlist/rockyou.txt</code> to crack this.</li>
<li>After cracking this hash, we need to find the http directory where we can use this password.</li>
<li>Browsing <code>/home/david/public_www</code> we can find a protected area. The password cracked earlier works!</li>
<li>Download the tar.gz file and extract using <code>gunzip</code>.</li>
<li>We have some ssh key backups. The most important file here is <code>id_rsa</code>.</li>
<li>Use <code>ssh -i &lt;key file&gt;</code> to try and connect to  david@traverxec.htb.</li>
<li>We need a passphrase. Let&#39;s try using <code>ssh2john</code> and pass it to <code>john</code> to brute force. We will use <code>rockyou.txt</code> once again.</li>
<li>Passphrase found! Use this to connect via ssh.</li>
<li>id = david</li>
<li><code>cat user.txt</code></li></ol>

<h2 id="root" id="root">Root</h2>
<ol><li>Use the shell script in home directory and see the commands being issued. Namely the use of <code>sudo</code> with <code>journalctl</code>.</li>
<li>Copy the file elsewhere and execute. It still works.</li>
<li>Add a <code>&amp;&amp;</code> operator and issue <code>/bin/sh</code> at the end of the shell script.</li>
<li>Run the script and you should be able to use <code>!/bin/sh</code> to get a shell via <code>less</code> with <code>uid=0</code></li>
<li>cat root.txt</li></ol>

<p><a href="https://drsh0.writeas.com/tag:hackthebox" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">hackthebox</span></a> <a href="https://drsh0.writeas.com/tag:htb" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">htb</span></a></p>
]]></content:encoded>
      <guid>https://drsh0.writeas.com/hackthebox-traverxec-writeup</guid>
      <pubDate>Sun, 15 Dec 2019 09:51:26 +0000</pubDate>
    </item>
  </channel>
</rss>