Skip to content
InfraHunter
All research
Threat ResearchTLP:CLEARTLP:CLEAR — Disclosure is not limited. This material may be shared publicly without restriction.

Inside a Staged Post-Exploitation Toolkit Targeting Pakistan's Cricket Board: Exchange Webshells, DCSync, and Active Directory Persistence

A forensic investigation into an exposed 37-file attack toolkit, its Exchange OWA command-relay architecture, credential-theft capabilities, Chisel tunneling, and multi-layer persistence mechanisms.

Published
Reading time
11 min
Analyst
@volrant136
Region
Pakistan / Asia
  • C2
  • webshell
cover

An operator staged a 37-file, 42.2 MB post-exploitation toolkit on a Latvia-based VPS (AS56971), revealing a collection of tools and scripts designed to support operations against the Pakistan Cricket Board network. The toolkit features a persistent Exchange OWA webshell at mail.pcb.com.pk, configured to serve as a command relay, alongside PowerShell reverse shells, DSInternals-based DCSync scripts for credential extraction, Chisel-based RDP tunneling, and Group Policy startup scripts targeting specifically named Azure AD Connect servers.

The IP address 109.248.163[.]36 (opens in a new tab), associated with CloudBackbone (AS56971) and hosted in Riga, Latvia, underpinned the entire operation.

Image
Figure 01: An overview of hunt.io intelligence overview for IP address 109.248.163[.]36 (CloudBackbone, AS56971), located in Riga, Latvia.

An AttackCapture record dated October 28, 2026, identified an exposed file manager hosted at 109.248.163[.]36:8888 (opens in a new tab). The open directory on port 8888 was served by a Python SimpleHTTP/0.6 server under Python 3.12.3. It exposed 37 files totaling 42.2 MB across four subdirectories.

Image
Figure 02: AttackCapture showing an exposed file manager on IP address 109.248.163[.]36.

The analysis shows multiple ports have been used in the scripts, as shown below:

PortProtocolRoleEvidence
8080HTTPChisel reverse tunnel server (SOCKS proxy + RDP forward relay)chtun.ps1: connects to http://109.248.163[.]36:8080 with --auth svc:[REDACTED]
8081HTTPExfiltration beacon collector (/x endpoint)All webshell scripts POST results to :8081/x?p=, ?d=, ?e=
8443TLSPrimary TLS reverse shell listeners.ps1 / r.ps1 primary connect target; skip-cert-validation
443TLSFallback TLS reverse shell listeners.ps1 / r.ps1 secondary target when port 8443 unreachable
9443TCPPlain-TCP agent listenerps_agent.b64 connects raw TCP; sends CONNECT <host> <user> pid=<PID>

The OWA Webshell: Command Relay Architecture

The most significant structural finding in this toolkit is the use of a Microsoft Exchange Outlook Web Access (OWA) endpoint as a command relay.

The toolkit uses a Microsoft Exchange OWA endpoint (/owa/auth/owafonts.aspx) as a command relay, with multiple scripts posting encoded payloads for server-side PowerShell execution. The commands are routed through the victim's mail infrastructure over HTTPS (port 443), using the Exchange server's legitimate TLS certificate and mail.pcb.com.pk SNI, masking C2 traffic as legitimate Exchange communications.

Image
Figure 03: Exchange webshell relay showing URL-encoded payload delivery and result retrieval via the operator's port 8081 beacon.

The analysis also confirms a second Exchange IP that uses Base64 to encode a user-creation command, wraps it in an Invoke-Expression payload, and posts it to /owa/auth/owafonts.aspx while bypassing TLS certificate validation. In this script, the server responses are saved to C:\ProgramData\svc\mk.out instead of being exfiltrated.

Image
Figure 04: A view of the second script targeting the Exchange Server IP without an exfiltration endpoint.

Reconstructing the Post-Exploitation Workflow

The toolkit maps a coherent kill chain progressing from an existing webshell foothold through credential harvesting, lateral movement, persistence deployment, and cleanup.

The stages are described below, each traced to specific files in the directory.

Dark UI Cybersecurity Flowchart
Figure 05: The operator's attack chain, from initial Exchange webshell access through DCSync credential harvesting, Chisel-based lateral movement, GPO persistence, and post-operation cleanup.

Stage 1: Obfuscated Reverse Shells

The s.ps1 and r.ps1 implants use distinct mutexes (Global\503874f41b and Global\97b383117c) to avoid process collisions. Both apply XOR-based Base64 obfuscation using (k + i*7) % 251 (keys 120 and 52), then launch via powershell -EncodedCommand. They establish persistent TLS reverse connections to ports 8443 and 443, with exponential backoff capped at 60 seconds. On connection, each sends CONNECT <HOSTNAME> <USERNAME> pid=<PID> before entering an interactive loop for arbitrary PowerShell command execution.

Image
Figure 06: Decoded core of s.ps1.

Stage 2: AD Environment Fingerprinting

The operator has capability to use envcheck.ps1 through the OWA webshell to collect prerequisites for a Golden Ticket or DCSync operation. The decoded payload queries four specific values and exfiltrates them to 109.248.163[.]36:8081/x?e=:

  • Domain functional level (Get-ADDomain): determines which Kerberos encryption types are supported.
  • krbtgt encryption types (msDS-SupportedEncryptionTypes): required to forge a valid Golden Ticket.
  • Protected Users group membership count: assesses whether target accounts are shielded from credential attacks.
  • DC clock skew relative to the operator's machine: Kerberos authentication rejects tickets outside a 5-minute window, so this confirms attack feasibility.
Image
Figure 07: The decoded envcheck.ps1 payload.

Stage 3: DCSync via DSInternals

Two variants of the DCSync operation were staged, targeting the same account through different delivery mechanisms. Both scripts install the DSInternals (opens in a new tab) PowerShell module on demand using NuGet, then invoke Get-ADReplAccount to replicate a named account's NT hash directly from the domain controller, without touching LSASS.

dcsync_adc.ps1 delivers the payload via Invoke-Command over WinRM directly to the domain controller. dcsync_shell.ps1 delivers the same payload through the OWA webshell, providing a fallback path if direct WinRM access is unavailable. Both exfiltrate the extracted NT hash to 109.248.163[.]36:8081/x?d=.

Image
Figure 08: Decoded DCSync payload from dcsync_adc.ps1.

Stage 4: Chisel Tunnel for Lateral Movement

chtun.ps1 launches chiselw.exe from C:\ProgramData\svc\ with hardcoded authentication credentials and two reverse port forward rules, establishing a persistent tunnel back to the operator's server at port 8080:

  • R:1081:socks: a SOCKS5 proxy on the operator's server at port 1081, routable through the compromised host into the internal network.
  • R:23389:[TARGET-IP]:3389: a direct RDP tunnel from the operator's local port 23389 to an internal host's RDP service.

The script first checks for a running chiselw process to avoid duplicate tunnels, then launches the client as a hidden window process from ProgramData. The cw.zip file in the directory contains the Linux build of Chisel, intended for deployment from the operator's own Linux-based C2 infrastructure as the server endpoint.

Image
Figure 09: chtun.ps1 establishing a Chisel reverse tunnel.

Stage 5: GPO-Based Persistence

The most operationally significant persistence mechanism in the directory is a staged Group Policy Object deployment. The three files gpt.ini, scripts.ini, and k.cmd are structured precisely as a Windows GPO startup script bundle intended for placement in a [redacted] share, from which Active Directory distributes them to domain-joined machines.

gpt.ini declares a machine extension GUID ({42B5FAAE-6536-11D2-AE5A-0000F87571E3}), which corresponds to the Windows Startup/Shutdown Scripts extension. scripts.ini registers k.cmd as the startup command. k.cmd implements a targeted execution filter: it checks the host's COMPUTERNAME against a hardcoded list of four machine names before taking action.

Image
Figure 10: k.cmd targets four specific internal hostnames. On matching machines, it copies k.exe from the GPO share to C:\ProgramData\Microsoft\DeviceSync, masquerading as a Microsoft synchronization component, then launches it on each startup.

Stage 6: .NET Implant with Triple Persistence

The decompilation of svc.exe reveals a .NET C2 agent structured around four methods: Main, Beat, Exec, and Heal. On launch, Main acquires a machine-scoped mutex (Global\svc<MachineName hash>) to prevent duplicate instances, then immediately spawns a background thread running Heal before entering its C2 connection loop.

Main
Figure 13: Decompiled svc.exe code revealing the hardcoded C2 address (109.248.163[.]36), mutex-based single-instance execution, and background thread initialization.

The Heal method runs in an infinite loop on a 60-second interval and establishes three independent persistence mechanisms, any one of which survives removal of the others:

  • Scheduled task (on-start): schtasks /create /tn SvcHost /sc onstart /ru SYSTEM: executes the implant at every system boot under SYSTEM privileges.

  • Scheduled task (interval): schtasks /create /tn SvcKeep /sc minute /mo 5 /ru SYSTEM: re-launches the implant every five minutes if it is not running.

  • Registry run key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v KlUpd: registers the implant under a name (KlUpd) suggestive of Kaspersky Lab update tooling, a masquerade likely chosen to blend into environments running AV software.

Schedule
Figure 11: The Heal() method re-registers all three persistence mechanisms every 60 seconds.

The Exec method executes operator commands by spawning powershell.exe -nop -w hidden -ep bypass -c, capturing both stdout and stderr with a 120-second timeout.

Exec
Figure 12: Code analysis showing the Exec(string cmd) method, which launches hidden PowerShell processes, captures standard output and error streams, and returns the execution results.

The Beat method sends a newline keepalive to the C2 stream every 25 seconds. On write failure it calls Environment.Exit(0) to terminate cleanly. The C2 endpoint is hardcoded in a dedicated H() method returning 109.248.163[.]36, connecting to port 8443 over TLS 1.2 with certificate validation suppressed via an inline lambda callback.

Stage 7: Operational Cleanup

The two purge scripts reverse the account creation performed by mk.ps1 and post.ps1, both delivered through the OWA webshell.

purge_cim2.ps1 removes the user CIM profile (Win32_UserProfile) and reports which profiles remain whereas purge_shell.ps1 unloads two specific registry hive SIDs, then recursively deletes C:\Users\[redacted] and C:\Users\[redacted].PREXCH16 before listing remaining user directories.

Mitigation and Defensive Recommendations

  1. Audit the Exchange server's OWA file paths for unexpected ASPX files, particularly in /owa/auth/.

  2. Monitor for file writes to Exchange virtual directories and alert on any ASPX files created outside a known-good baseline.

  3. Block outbound connections to 109.248.163[.]36 on all ports.

  4. Implement egress filtering to detect anomalous HTTPS connections from Exchange server processes (w3wp.exe) to external IP addresses on non-standard ports (8443, 9443).

  5. Alert on HTTP POST requests from internal servers to external IPs, particularly to path patterns such as /x?p=, /x?d=, and /x?e=.

  6. Alert on schtasks /create with /ru SYSTEM arguments issued by non-administrative processes.

  7. Monitor HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run for new entries, especially those pointing to executables outside %SystemRoot% and %ProgramFiles%.

  8. Hunt for the mutex values Global\503874f41b and Global\97b383117c.

Conclusion

The staging server at 109.248.163[.]36 represents a mature, purpose-built post-exploitation environment for a targeted intrusion against the PCB.COM.PK Active Directory domain.

The svc.exe implant's triple-persistence Heal loop, the Kaspersky masquerade in the KlUpd registry key, the choice of DSInternals over LSASS dumping for credential access, and the systematic cleanup scripts all indicate a threat actor with hands-on Windows Active Directory experience and an awareness of common detection vectors.

Organizations should prioritize Exchange integrity monitoring, outbound traffic inspection, unauthorized directory replication detection, GPO auditing, and continuous monitoring of privileged identity infrastructure.

Indicators of Compromise

TypeValueContext
IP109.248.163[.]36Operator C2 and staging server (AS56971, Riga, Latvia)
URLhttp://109.248.163[.]36:8080Chisel server endpoint (chtun.ps1)
URLhttp://109.248.163[.]36:8081/xHTTP exfiltration beacon; params ?p=, ?d=, ?e=
URLhttp://109.248.163[.]36:8888/Open directory tool staging server (Python SimpleHTTP/0.6)
Port8443, 9443TLS and TCP reverse shell listener ports on operator server
Path/owa/auth/owafonts.aspxExchange OWA webshell path
PathC:\ProgramData\Microsoft\DeviceSync\Implant drop directory masquerading as Microsoft synchronization component
PathC:\ProgramData\svc\Secondary staging directory for chiselw.exe and svc.exe
PathC:\ProgramData\svc\mk.outOutput file written by mk.ps1 containing webshell response
MutexGlobal\503874f41bSingleton mutex for s.ps1 reverse shell instance
MutexGlobal\97b383117cSingleton mutex for r.ps1 reverse shell instance
MutexGlobal\px[ComputerName hash]ps_agent.b64 mutex pattern (computer-name-derived)
SHA-2568c4594d103c7b9f665d29e00713a3a2076e9445ea083c03515187467badebed8svc.exe .NET agent
GPO GUID{42B5FAAE-6536-11D2-AE5A-0000F87571E3}Machine Startup Scripts GPO extension declared in gpt.ini

MITRE ATT&CK Mapping

TacticIDTechniqueEvidence
Initial AccessT1190Exploit Public-Facing ApplicationOWA webshell at /owa/auth/owafonts.aspx (pre-existing)
ExecutionT1059.001PowerShellAll .ps1 scripts; chk.ps1, chtun.ps1, dcsync_.ps1, purge_.ps1
ExecutionT1059.003Windows Command Shellk.cmd GPO startup script; r.bat share recon launcher
ExecutionT1059.005Visual Basic / .NET Assemblysvc.exe .NET agent with Exec method
PersistenceT1053.005Scheduled Task / GPO Startup Scriptgpt.ini + scripts.ini + k.cmd deployed as SYSVOL GPO startup bundle
PersistenceT1547.001Registry Run Keys / Startup Foldersvc.exe Heal() sets HKLM...\Run\KlUpd on a 60-second loop
PersistenceT1053.005Scheduled Tasksvc.exe Heal() creates SvcHost (onstart) and SvcKeep (every 5 min) tasks
Defense EvasionT1027Obfuscated Files or InformationXOR+Base64 obfuscation in s.ps1, r.ps1, all webshell delivery scripts
Defense EvasionT1036.005Match Legitimate Name or LocationKlUpd registry key masquerades as Kaspersky updater; DeviceSync directory path
Credential AccessT1003.006DCSyncdcsync_adc.ps1 and dcsync_shell.ps1 use DSInternals Get-ADReplAccount
Lateral MovementT1021.006Windows Remote Managementdcsync_adc.ps1 delivers DCSync payload via Invoke-Command/WinRM
Command and ControlT1090.001Internal ProxyChisel SOCKS proxy on port 1081 provides internal network routing
Command and ControlT1071.001Web ProtocolsHTTP exfiltration beacon to :8081/x; webshell relay over HTTPS

Share

X(opens in a new tab)

Published by @volrant136


  • cover
    Threat Research

    Exposed Opendir Reveals APT DONOT Cyber Espionage Toolkit Targeting Pakistan's Nuclear and Energy Sectors

    An exposed APT Donot Open Directory revealed 48 files containing a collection of reverse shells, custom C2 implants, reconnaissance scripts, and credential-harvesting configurations. Analysis uncovered references to Pakistan's nuclear infrastructure, energy sector, SCADA environments, and OGDCL impersonation, raising questions about a potentially targeted cyber espionage operation.

    13 minutes to read
  • cover
    Threat Research

    Inside an Attacker's Toolkit Targeting Vietnam's Government Networks

    An exposed directory containing hundreds of files reveals a toolkit configured to target Vietnam's government systems. Recovered scripts and logs document activity involving Keycloak, Check Point management infrastructure, a separate insurance platform, and additional government services.

    22 minutes to read
  • cover
    Threat Research

    From JBRJ to JUCEC: Exposed Infrastructure Reveals a Broad Brazilian Government Intrusion Campaign

    Hunt.io Attack Capture identified three exposed directories on a Malaysian VPS containing tooling and evidence linked to multiple Brazilian public-sector targets. The recovered material reveals a confirmed compromise of Brazil's Jardim Botânico do Rio de Janeiro, an extensive intrusion toolkit targeting Ceará's state Board of Trade, credential and session harvesting, persistence mechanisms, and a staged Linux kernel privilege-escalation exploit.

    34 minutes to read