Ultimatum
Ultimatum
Platform: HackTheBox | Type: SOC/DFIR | Difficulty: Easy | Author: D3v0o0Nu11 | Date: 2026-02-10
Scenario
One of the Forela WordPress servers was a target of notorious Threat Actors (TA). The website was running a blog dedicated to the Forela Social Club, where Forela employees can chat and discuss random topics. Unfortunately, it became a target of a threat group. The SOC team believe this was due to the blog running a vulnerable plugin. The IT admin already followed the acquisition playbook and triaged the server for the security team. Ultimately (no pun intended) it is your responsibility to investigate the incident. Step in and confirm the culprits behind the attack and restore this important service within the Forela environment.
Key Questions
- What indicators of compromise exist?
- What attack chain / MITRE techniques were used?
- What is the full timeline?
Investigation Timeline
| Time | Event | Evidence / Source |
|---|---|---|
| 09:01:04 | After reviewing it, indeed an error happened at timestamp 09:01:04 right after the file is edited at 09:00:51. |
Evidence Analysed
- Tools: wpscan, linpeas, linenum.
- Artifacts: MFT.
Detailed Investigation
- This time we're tasked to investigate an incident from Forela WordPress Servers. It is known that the server running a website with a vulnerable plugin. We're asked to hunt and confirm the culprits and restore the service.
- Based from the acquisition performed, it is clear that the IT admin team is using a Linux acquisition tool named CatScale.
1ST QUESTION --> ANS: REDACTED
-
To identify fingerprinting activity, we can review log at Logs directory.
-
Our interest should be log inside -->
ip-172-31-11-131-20230808-0937-var-log.tar.gz. -
Upon extracting it, found several Apache directory which indicates a web server log. Great!
-
Upon reviewing the log, found the scanning tool used by the attacker and it's version.
-
It's WPScan version 3.8.24.
2ND QUESTION --> ANS: REDACTED
-
It's not efficient to review the log using text editor. It's best to integrate it with ELK stack or other tools which help user in collect and visualize data.
-
Anyway, long story short found an agent named Secragon Offensive.
-
Search it on the internet, resulting to few CVEs POC.
-
Both POC states the same objective --> to be authorized for admin access.
-
Also noticed a plugin is used previously. This could be a hint to our CVE version guess.
-
Searching about CVE related to the plugin, resulting to same CVE version we found before.
-
Reviewing the first website, seems it matched our finding. Actually our finding itself is not enough to identify wheter we found the correct CVE.
-
For better analysis, another artifacts and further correlation is needed, but I am just too lazy to do it.
-
Reviewing another log file named --> access.log.1 found different plugin version used. But this match the CVE details we read before.
NOTES:
The plugin does not prevent visitors from creating user accounts with arbitrary capabilities, effectively allowing
attackers to create administrator accounts at will. This is actively being exploited in the wild.
-
Another outsource found WPScan documentation that shows convincing details.
-
Remembering the very first log we analyzed is identified using version 2.6.4. We can tell that we already find the correct CVE version!
-
As you can see afterwards the plugin is accessed, the threat actor can access the admin resource. The threat actor IP is 198.16.74.45.
-
Interesting it is a public cloud IP, this could indicates that the attacker manually explored the website after logging in.
3RD QUESTION --> ANS: REDACTED
-
Now to identify the real threat actor IP, we need to find the initial access OR the easiest way simply by check the IP used for the scanning activity.
-
Great! Now we know the real threat actor IP is 23.106.60.163.
4TH QUESTION --> ANS: REDACTED
-
To identify backdoor user, simply search the attempt to register account after the exploitation attempt.
-
Great! Now we know the backdoor user is secragon.
5TH QUESTION --> ANS: REDACTED
- Noticed after it gained access to admin resource, the attacker IP changed to the public cloud IP --> 198.16.74.45.
6TH QUESTION --> ANS: REDACTED
-
Long story short, found a suspicious file access inside the admin resource. It's a php file named hidden-comments.
-
It's because afterwards, a shell execution is attempted.
-
More interestingly, the plugin used is a plugin that can upload, edit, create, and remove theme files.
-
It's very straight forward that hidden-comments.php is a theme file that used for persistence.
-
Anyway let's correlate with error.log, remembering it's a source file which edited and it's human activity, hence an error could happen during the code writing.
-
After reviewing it, indeed an error happened at timestamp
09:01:04right after the file is edited at09:00:51.
error.log
access.log
- Remembering no other theme files opened, hence it's clear that hidden-comments.php is the backdoor file.
- For the full path can be seen at the error.log.
7TH QUESTION --> ANS: REDACTED
-
Now to review the code of it, we need to traverse to Misc -> ip-172-31-11-131-20230808-0937-pot-webshell-first-1000.txt.
-
Then search for --> hidden-comments.php.
-
$shellvariable containsuname -a; w; id; /bin/bash -i -
Shortly those commands are for gather system information and user details by printig the systems's kernel version and arch.
-
Also shows logged-in user and their activities, and displaying current user's UID, GID, and groups.
-
Lastly it launch an interactive shell.
8TH QUESTION --> ANS:
REDACTED 41. It looks like contain a master file table of the OS.
ip-172-31-11-131-20230808-0937-full-timeline.csv
- Great! Now we know the size is 2592.
9TH QUESTION --> ANS: REDACTED
- To identify the C2 IP and port, simply check the reverse shell payload and check the ip and port variable.
10TH QUESTION --> ANS: REDACTED
-
Next, to identify the process ID which enabled the threat actor to gain hands-on access to the server, we need to review the Process and Network logs.
-
Our interest should be the process of opening shell as interactive mode.
-
Great! Now we know the PID is 234521.
11TH QUESTION --> ANS: REDACTED
-
A common tool used to enumerate for privesc path at Linux should be
linpeasorlinenum. -
To identify the existence of those files, simply review the Misc logs.
-
Actually we can check the MFT and search for both file.
-
Searching it resulting to the existence of linenum.sh.
-
Great! Now we've investigated the case!
Findings
- Persistence mechanism — An autostart/persistence mechanism was established on the host (see timeline).
- Initial access — The threat actor established access via the vector described in the investigation steps.
- Impact — As documented in the investigation steps.
MITRE ATT&CK Mapping
| Tactic | Technique | ID |
|---|---|---|
| Lateral Movement | Remote Services | T1021 |
| Persistence | Boot or Logon Autostart Execution | T1547 |
| Privilege Escalation | Abuse Elevation Control Mechanism | T1548 |
Answers / Flags
- 1ST QUESTION --> ANS: REDACTED
- 2ND QUESTION --> ANS: REDACTED
- 3RD QUESTION --> ANS: REDACTED
- 4TH QUESTION --> ANS: REDACTED
- 5TH QUESTION --> ANS: REDACTED
- 6TH QUESTION --> ANS: REDACTED
- 7TH QUESTION --> ANS: REDACTED
- 8TH QUESTION --> ANS:REDACTED
- 9TH QUESTION --> ANS: REDACTED
- 10TH QUESTION --> ANS: REDACTED
- 11TH QUESTION --> ANS: REDACTED
Lessons Learned
- Reviewing catscale data acquisition.
- Identify CVE version related to ultimate-member plugin.
- Identify backdoor user and persistence activity.