nightglass-edge-intrusion-defensive

incident-responsedefensivemalware-analysisdetection-engineeringincident-responsedfirartifact-groundedmulti-phaselinuxedge-appliancecstatic-analysis

Multi-Phase Defensive Analysis Task

One synthetic NIGHTGLASS campaign is represented across three independent artifact sets. Each phase is solvable from its own artifacts alone. The final outputs must describe the same campaign consistently: a complete submission needs all three phases to be correct independently AND the shared sample_id and campaign label to match across the phase outputs. Do not carry findings (classification, capabilities, IOCs, hosts, users, timeline, detection logic, remediation) from one phase to another; infer them from that phase's own artifacts.

Input artifacts are available at:

/app/phase1/case/             malware detonation telemetry (process, file, network, dns, modules, memory, static, config, persistence) + advisory_context.json
/app/phase1/sample/glassd.c   recovered implant source (C); Makefile builds it
/app/phase2/corpus/           detection-rule evaluation bundles
/app/phase2/rule_schema.md    allowed detection-rule schema
/app/phase3/evidence/         incident-response evidence (auth, endpoint, file, network, dns, idp, mail, host inventory, observed indicators, remediation catalog) + advisory_context.json

Write these output files (create /app/output/ if needed):

/app/output/phase1_malware_report.json
/app/output/phase2_detection_rule.yaml
/app/output/phase3_incident_report.json
/app/output/plan.md

All required evidence is local. Do not use internet lookups or long-running monitoring commands. Once the four files are written and the sample_id/campaign match across them, the task is complete.

Execution Guardrails

The only deliverables are the four files in /app/output/; chat text is not a deliverable. Keep commands finite and non-interactive, and write the output files as soon as you have enough evidence to make a best-effort determination. Avoid dumping entire directories or many large artifacts into the terminal at once; inspect files selectively with bounded commands such as sed, head, jq, or focused grep/rg queries so the working context stays small.

If the environment reports repeated response-format, JSON-format, or tool-format errors, do not retry the same response indefinitely. After three consecutive format failures, stop analysis, do not append or restate the prior error messages, and immediately create the best valid versions of all four required files using the evidence already collected. A partial but parseable submission is preferred to no submission.

Process Plan

plan.md must briefly describe, for each phase: which artifact sets you inspected, the behaviors you inferred, the detection-rule strategy and how it avoids benign lookalikes, the incident reconstruction and remediation strategy, how you checked sample_id/campaign consistency, and which candidates you rejected as decoys and why (plan only — do not list rejected items in the JSON outputs).

Phase 1 Output

phase1_malware_report.json must be valid JSON:

{
  "sample_id": "string",
  "campaign": "string",
  "malware_category": "infostealer|loader|rat|backdoor|ransomware|botnet|miner|wiper|proxy|dropper",
  "primary_objective": "credential_exfiltration|data_exfiltration|data_collection|access_establishment|infrastructure_monetization|ransomware_preparation|destruction|supply_chain_compromise",
  "primary_role": "exfiltration_implant|credential_access_implant|collection_implant|initial_access_implant|loader|dropper|interactive_backdoor|botnet_agent|proxy_node|banking_trojan|ransomware_preparation_implant|destruction_implant|persistence_implant",
  "capabilities": [
    { "name": "capability_name", "attck_ids": ["T9999.999"], "evidence_event_ids": ["event-id"] }
  ],
  "primary_destination": { "protocol": "https|dns|smb", "host": "example.invalid", "ip": "192.0.2.10" },
  "notable_iocs": {
    "domains": ["example.invalid"], "ipv4": ["192.0.2.10"],
    "files": ["/path/file"], "tasks": ["unit-or-task-name"], "hosts": ["HOST-01"]
  },
  "persistence_mechanisms": ["unit-or-task-name"],
  "related_cves": [
    { "cve_id": "CVE-YYYY-NNNN", "role": "privilege_escalation", "vulnerability_class": "short class", "evidence_event_ids": ["event-id"] }
  ]
}

Allowed related_cves.role for verified active CVEs in this case: privilege_escalation. Do not include decoy, rejected, historical, or background CVEs in related_cves, and do not use any role containing decoy, reject, historical, or background.

Scoring notes:

  • Map each behavior to its most specific ATT&CK sub-technique. Parent-only IDs get partial credit.
  • Do not over-report. Techniques not supported by the evidence lower precision; a small set of clearly-unsupported techniques fails the phase.
  • The artifacts contain no benign, relevance, per-event technique/order labels, and no malicious/benign IOC split. Maliciousness, technique IDs, attack order, which infrastructure is active, which capabilities actually executed and completed, and which indicators are malicious must all be inferred from behavior. A capability that is implemented, gated off, or executed-but-failed is not a completed objective. Reporting a benign/dead indicator (configured-but-unused infrastructure, dormant/decoy persistence, a backup or monitoring file, an uninvolved host) fails the phase.

Phase 2 Output

phase2_detection_rule.yaml must follow /app/phase2/rule_schema.md: a small Sigma-like document with top-level title, id, status: experimental, detection (one or more selection_<name> maps plus one condition), fields, falsepositives, level. Only the behavioral selection fields listed in the schema are allowed; static indicator fields (domains, IPs, hashes, URIs) are forbidden. The rule must fire on the malicious bundles and avoid all benign bundles. Benign remote-management, monitoring, backup, packaging, and security-tool bundles each share part of the malicious chain, so a single selection or a short two/three-selection rule is insufficient.

Phase 3 Output

phase3_incident_report.json must be valid JSON:

{
  "sample_id": "string",
  "campaign": "string",
  "victim": { "host": "HOST-01", "user": "user" },
  "patient_zero_host": "HOST-01",
  "entry_vector": "T9999.999",
  "affected_hosts": ["HOST-01"],
  "attack_sequence": [
    { "order": 1, "technique": "T9999.999", "summary": "short grounded step", "evidence_event_ids": ["event-id"] }
  ],
  "confirmed_iocs": {
    "domains": ["example.invalid"], "ipv4": ["192.0.2.10"], "files": ["/path/file"],
    "tasks": ["unit-or-task-name"], "hosts": ["HOST-01"], "accounts": ["user-or-svc"]
  },
  "related_cves": [
    { "cve_id": "CVE-YYYY-NNNN", "role": "initial_access|privilege_escalation", "evidence_event_ids": ["event-id"] }
  ],
  "remediation_actions": [
    { "action": "allowed_action_name", "target": "exact target", "reason": "short reason" }
  ]
}

Allowed remediation_actions.action values: isolate_host, disable_service, delete_file, block_domain, block_ip, apply_patch, reset_account_password, revoke_token, disable_account, remove_persistence.

Phase 3 notes:

  • Host clocks have skew; reconstruct the attack order causally, not by raw timestamp.
  • Distinguish staging from exfiltration: only archives with evidence of a completed external transfer are confirmed exfiltrated. Distinguish active infrastructure from sinkholed/dead/historical/decoy infrastructure, public-facing-service exploitation from benign scanning, credential reuse from successful lateral movement, and attacker actions from benign admin/security/maintenance activity. Reporting a benign or dead indicator, host, account, or remediation target fails the phase.

Rules

  1. Include only behaviors and indicators supported by the artifacts.
  2. Do not include benign or routine administrative activity.
  3. Use exact event IDs from the artifacts when evidence is requested, including CVE evidence.
  4. Use the most specific ATT&CK technique ID supported by the evidence.
  5. Include only CVEs supported as active; document rejected advisories only in plan.md.
  6. Keep sample_id and campaign consistent across the three phase outputs.
  7. JSON/YAML output files must contain only the required JSON/YAML content, not Markdown.