<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>HTB Linux on Aditya Telange</title><link>https://adityatelange.in/tags/htb-linux/</link><description>Recent content in HTB Linux on Aditya Telange</description><image><title>Aditya Telange</title><url>https://adityatelange.in/assets/tn.jpg</url><link>https://adityatelange.in/assets/tn.jpg</link></image><generator>Hugo</generator><language>en</language><copyright>2026 Aditya Telange</copyright><lastBuildDate>Sat, 11 Feb 2023 21:40:09 +0530</lastBuildDate><atom:link href="https://adityatelange.in/tags/htb-linux/index.xml" rel="self" type="application/rss+xml"/><item><title>HackTheBox (HTB) - Photobomb</title><link>https://adityatelange.in/writeups/hackthebox/photobomb/</link><pubDate>Sat, 11 Feb 2023 21:40:09 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/photobomb/</guid><description>Photobomb is a fun box on Hackthebox where we initially get hardcoded credentials in a Javascript file, which we can use to authenticate with &lt;code&gt;basic auth&lt;/code&gt; to access the image resizing tool, which has command injection leading to us getting a reverse shell.
After getting initial access as user &lt;code&gt;wizard&lt;/code&gt;, we see a &lt;code&gt;cleanup.sh&lt;/code&gt; script which can be run as &lt;code&gt;root&lt;/code&gt;. We then abuse the redirection operator &lt;code&gt;&amp;gt;&lt;/code&gt; clobbering the &lt;code&gt;/etc/passwd&lt;/code&gt; file to escalate our privileges by adding user &lt;code&gt;wizard&lt;/code&gt; to group &lt;code&gt;root&lt;/code&gt;.</description></item><item><title>HackTheBox (HTB) - Lame</title><link>https://adityatelange.in/writeups/hackthebox/lame/</link><pubDate>Fri, 03 Jun 2022 19:27:57 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/lame/</guid><description>Lame is the 1st box on HackTheBox which requires only one exploit in Samba to obtain root access. We also explore other ways during we reach to superuser&amp;rsquo;s shell.</description></item><item><title>HackTheBox (HTB) - Horizontall</title><link>https://adityatelange.in/writeups/hackthebox/horizontall/</link><pubDate>Sat, 05 Feb 2022 22:27:57 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/horizontall/</guid><description>Horizontall is a fun box which has an API, vulnerable to Improper Access Control and RCE. The box is running a laravel service which is vulnerable to RCE which lets us run commanad as &lt;code&gt;root&lt;/code&gt;.</description></item><item><title>HackTheBox (HTB) - Forge</title><link>https://adityatelange.in/writeups/hackthebox/forge/</link><pubDate>Sat, 22 Jan 2022 21:27:29 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/forge/</guid><description>&lt;fieldset&gt;&lt;legend&gt;Box Info&lt;/legend&gt;&lt;ul&gt;
&lt;li&gt;Name: &lt;a href="https://www.hackthebox.com/machines/forge"&gt;&lt;code&gt;Forge&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;OS: &lt;code&gt;Linux&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Difficulty: &lt;code&gt;Medium&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;IP: &lt;code&gt;10.10.11.111&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Points: &lt;code&gt;30&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Machine Creator: &lt;a href="https://app.hackthebox.eu/users/393721"&gt;&lt;code&gt;NoobHacker9999&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/fieldset&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Forge is a fun box on Hackthebox that has a &lt;em&gt;File Upload functionality&lt;/em&gt; which is vulnerable to &lt;code&gt;SSRF&lt;/code&gt;.
This exposes the &lt;em&gt;internal Admin panel&lt;/em&gt; and lets us read files with &lt;em&gt;internal FTP service&lt;/em&gt;, which includes SSH key pair of the user.&lt;/p&gt;
&lt;p&gt;Listing the available commands we can run as a superuser, we have a &lt;em&gt;python script&lt;/em&gt; which opens a &lt;em&gt;socket connection&lt;/em&gt;.
This calls &lt;em&gt;PDB&lt;/em&gt; with an exception occurs, with which we get a shell as &lt;code&gt;root&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>HackTheBox (HTB) - Previse</title><link>https://adityatelange.in/writeups/hackthebox/previse/</link><pubDate>Sat, 08 Jan 2022 20:35:33 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/previse/</guid><description>Previse is a fun Linux box on HackTheBox that has &lt;em&gt;insecure redirect&lt;/em&gt; implementation which leaks information on the page. This can then be used to create a new user in the application and get access to &lt;code&gt;backup.zip&lt;/code&gt; of it. Backup revels that there is a &lt;code&gt;command injection&lt;/code&gt; vulnerability present in the &lt;code&gt;logs&lt;/code&gt; fetching feature, which gets us a basic shell.
We have a &lt;code&gt;MySQL&lt;/code&gt; server running inside the box which has reused credenrials from the &lt;code&gt;backup.zip&lt;/code&gt;. We get hashed/salted credentials inside this database and crack it by writing a &lt;em&gt;custom PHP script&lt;/em&gt;. We again have a &lt;em&gt;username and password reuse&lt;/em&gt; for a &lt;code&gt;SSH&lt;/code&gt; user, which gives us a user shell.
Listing sudo privilegs we get to know there is a script which we can run as &lt;code&gt;root&lt;/code&gt;, that does not mention absolute &lt;code&gt;$PATH&lt;/code&gt; for a command being used. Thus can be overriden by &lt;code&gt;$PATH&lt;/code&gt; variable set by current &lt;code&gt;USER&lt;/code&gt;.</description></item><item><title>HackTheBox (HTB) - BountyHunter</title><link>https://adityatelange.in/writeups/hackthebox/bountyhunter/</link><pubDate>Sat, 20 Nov 2021 20:55:26 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/bountyhunter/</guid><description>BountyHunter is a fun Linux box on HackTheBox that has XXE injection on a PHP form, which exposes DB credentials. This DB credential is reused as a password for a user on the box.
The box also has an internal python3 script which could be run as elevated privileges. This script uses &lt;code&gt;eval&lt;/code&gt; by which we get command injection, which leads to superuser access to this box.</description></item><item><title>HackTheBox (HTB) - Cap</title><link>https://adityatelange.in/writeups/hackthebox/cap/</link><pubDate>Sat, 02 Oct 2021 00:00:00 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/cap/</guid><description>Cap is a fun box where we find a &lt;code&gt;flask&lt;/code&gt; web app which lets us download network log, where we find &lt;code&gt;FTP&lt;/code&gt; and &lt;code&gt;SSH&lt;/code&gt; credentials for user &lt;code&gt;nathan&lt;/code&gt;. The box has &lt;code&gt;python&lt;/code&gt; which has capability to set &lt;code&gt;UIDs&lt;/code&gt;, which lets us access &lt;code&gt;root&lt;/code&gt;s shell, when &lt;code&gt;UID&lt;/code&gt; is set to &lt;code&gt;0&lt;/code&gt;.</description></item><item><title>HackTheBox (HTB) - Pit</title><link>https://adityatelange.in/writeups/hackthebox/pit/</link><pubDate>Sat, 25 Sep 2021 00:00:00 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/pit/</guid><description>Pit is a fun box where &lt;code&gt;SNMP&lt;/code&gt; Data reveals that &lt;code&gt;seeddms&lt;/code&gt; instance is running, which is vulnerable to RCE.
The box has CentOS’s Cockpit Web Console on port &lt;code&gt;9090&lt;/code&gt;, which uses reused password from DB credentials. This gives access to user shell.
LinPeas reveals there is a &lt;code&gt;monitoring&lt;/code&gt; service, which runs bash scripts in a particular directory. Chaining this with SNMPwalk gives us &lt;code&gt;root&lt;/code&gt;.</description></item><item><title>HackTheBox (HTB) - Knife</title><link>https://adityatelange.in/writeups/hackthebox/knife/</link><pubDate>Sat, 28 Aug 2021 00:00:00 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/knife/</guid><description>Knife is a fun box which uses a PHP version having backdoor, which leads to RCE. The box has a command named &lt;code&gt;knife&lt;/code&gt; which lets non-superusers run commanad as &lt;code&gt;root&lt;/code&gt;.</description></item><item><title>HackTheBox (HTB) - Tenet</title><link>https://adityatelange.in/writeups/hackthebox/tenet/</link><pubDate>Sat, 12 Jun 2021 00:00:00 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/tenet/</guid><description>Tenet is a fun box where we find a backup of a staging PHP file which loads external code via deserialization, which leads to code-execution and a reverse shell. This leads to access to a script which the non-sudoer user can run to add ssh-key for getting root shell.</description></item><item><title>HackTheBox (HTB) - Ready</title><link>https://adityatelange.in/writeups/hackthebox/ready/</link><pubDate>Sat, 15 May 2021 00:00:00 +0530</pubDate><guid>https://adityatelange.in/writeups/hackthebox/ready/</guid><description>Ready is a fun box which is using an outdated GitLab community version. Which apparently has an exploit which gives RCE to authenticated users.
This RCE gives access to docker container in which gitlab instance is running, and we have to breakout the container to escalate our privilages to get own root!</description></item></channel></rss>