malware-detection-ir-cti-fusion-analysis-prototype

incident-responseanalysismalware-analysisdetection-engineeringincident-responseforensicswindowsartifact-groundedmulti-phasecti-fusion

Task

One synthetic campaign variant is staged across three linked phases:

  • /app/phase1/case: static malware detonation artifacts
  • /app/phase2/corpus: malicious and benign telemetry bundles for rule authoring
  • /app/phase3/evidence: incident-response and forensic evidence

Write all four outputs:

  1. /app/output/phase1_malware_report.json
  2. /app/output/phase2_detection_rule.yaml
  3. /app/output/phase2_rule_validation.json
  4. /app/output/phase3_incident_report.json

Also maintain /app/output/plan.md as a concise analyst worklog describing the evidence reviewed, hypotheses considered, and validation performed.

All phases come from the same selected campaign variant, but each phase must be derived from its own artifacts. Do not blindly carry an earlier conclusion forward if the current phase evidence points somewhere else.

Phase 1: Malware Analysis

Read /app/phase1/case and write /app/output/phase1_malware_report.json as a JSON object with these exact top-level fields:

  • sample_id: string
  • malware_category: one of ransomware, rat, infostealer, loader, dropper
  • risk_level: one of LOW, MEDIUM, HIGH, CRITICAL
  • malicious_capabilities: array of objects
  • primary_destination: object
  • notable_iocs: object
  • delivery_chain: array of objects
  • triage_decisions: array of objects
  • rejected_hypotheses: array of objects
  • capability_evidence_matrix: array of objects
  • summary: string

Each capability entry must contain:

  • name: one of system_fingerprinting, process_injection, browser_credential_access, persistence_scheduled_task, archive_staging, command_and_control_https, dns_beaconing, ransomware_encryption, lsass_memory_dump, service_installation
  • attck_ids: array of MITRE ATT&CK technique IDs
  • evidence_event_ids: array of exact event IDs from the case files

primary_destination must contain:

  • protocol
  • host

notable_iocs must contain:

  • domains: array of domain strings
  • dropped_files: array of file paths
  • scheduled_task: string

delivery_chain must reconstruct the delivery-to-payload path using exact Phase 1 event IDs. Include document open, script or macro-spawn behavior, downloader execution, payload network download, payload write, and payload start when those steps are present. Each entry must contain:

  • event_id: exact event ID from the Phase 1 case files
  • role: one of document_open, script_spawn, downloader_start, payload_download, payload_write, payload_start
  • reason: concise reason explaining why the event belongs to the delivery chain

triage_decisions must document suspicious or lookalike evidence that was reviewed but should not become a capability or IOC. Include string-only clues that lack supporting behavior, benign background activity, and lookalike/decoy events. Each entry must contain:

  • evidence_id: exact event ID from the Phase 1 case files
  • classification: one of malicious, benign, decoy, unsupported_string_only
  • reason: concise reason explaining why the evidence is included or excluded

rejected_hypotheses must document at least two plausible but rejected analyst hypotheses. Use this for cases where an artifact resembles another capability or malware family but the supporting event chain is missing. Each entry must contain:

  • hypothesis: short label such as ransomware_encryption, lsass_memory_dump, service_installation, browser_background_noise, or another concise analyst hypothesis
  • rejected_event_ids: array of exact event IDs from the Phase 1 case files that were considered for that hypothesis
  • reason: concise reason explaining why the hypothesis is rejected

capability_evidence_matrix must contain one entry for every reported capability. Each entry must contain:

  • capability: exact capability name from malicious_capabilities
  • primary_event_ids: array of exact event IDs that directly prove the capability
  • corroborating_event_ids: array of exact event IDs from a different artifact family that strengthen the conclusion
  • excluded_related_event_ids: array of exact event IDs that look related but should not be used as primary support
  • confidence: one of medium, high
  • rationale: concise reason tying evidence to the capability

For this task, dropped_files means attacker-created files written during the malicious chain, such as downloaded loaders, executable payloads, persistence binaries, and staged archives. Do not include the original delivery document, read-only browser data stores, benign background files, helper identifiers, logs, or decoys unless the current phase evidence shows they were created as attacker payloads or staging artifacts.

Browser credential access should be reported only when the browser store access is tied to the malware process or corroborated payload behavior. Ordinary browser background reads, public-IP checks, and updater traffic belong in triage/exclusions rather than in capabilities or IOCs.

Phase 2: Detection Engineering

Read /app/phase2/corpus and /app/phase2/rule_schema.md. Write a Sigma-like YAML rule to /app/output/phase2_detection_rule.yaml, then write an analyst validation report to /app/output/phase2_rule_validation.json.

The verifier supports a small subset:

  • direct equality: field: value
  • substring match: field|contains: value
  • all substrings present: field|contains|all: [a, b]
  • suffix match: field|endswith: value

The detection block must define one or more named selections plus a condition. The condition may use only selection names with and, or, and parentheses. A telemetry bundle counts as detected when the bundle-level condition evaluates to true.

Your rule should match the malicious bundles for the selected variant and avoid matching the benign bundles. The rule must correlate at least two independent behaviors with and logic. A single-indicator rule such as only a C2 domain, only a payload filename, only a service name, or only a scheduled-task name is too broad for this task even if it happens to match the visible corpus.

Base the rule only on the telemetry available in Phase 2. The rule should be behavioral and portable across equivalent telemetry. Do not depend on event IDs, one exact workstation name, or one visible bundle. Near-miss benign controls may reuse one suspicious token, so the final condition must require a meaningful combination such as delivery download plus payload execution, payload execution plus C2, payload execution plus persistence, or service creation plus follow-on check-in. Do not alert on a payload-looking download, C2-looking request, task name, service name, or payload filename unless another independent malicious behavior is present in the same telemetry bundle.

phase2_rule_validation.json must contain exactly these top-level fields:

  • sample_id: string
  • rule_intent: string
  • corpus_results: array of objects
  • generalization_notes: object
  • rule_evaluation_trace: array of objects
  • summary: string

Each corpus_results entry must contain:

  • bundle: exact corpus filename, such as malicious-01.jsonl
  • expected_detection: boolean
  • reason: concise reason for why the rule should or should not alert

The validation report must cover every visible *.jsonl bundle in /app/phase2/corpus. generalization_notes must contain:

  • required_behavior_families: array of behavior-family strings that your rule intentionally correlates
  • false_positive_boundaries: array of near-miss conditions that your rule intentionally avoids

false_positive_boundaries should explicitly cover one-indicator or near-miss cases for payload/download-looking telemetry, payload execution-looking telemetry, and C2/network/domain/request-looking telemetry. Equivalent analyst wording is fine, but the boundary must explain why each class should not alert without another independent malicious behavior in the same bundle.

rule_evaluation_trace must contain one entry for every visible corpus bundle. Each entry must contain:

  • bundle: exact corpus filename
  • alert_decision: boolean result expected from your rule
  • matched_behavior_families: array of behavior-family strings that are present in the bundle and relevant to your rule
  • decisive_absent_or_benign_families: array of behavior-family strings that explain why a benign or near-miss bundle should not alert
  • rationale: concise explanation of the rule outcome for that bundle

Phase 3: Incident Response, Triage, and Forensics

Read /app/phase3/evidence and write /app/output/phase3_incident_report.json as a JSON object with these exact top-level fields:

  • sample_id: string
  • incident_id: string
  • affected_host: string
  • affected_user: string
  • initial_vector: short normalized label such as malicious_word_macro or malicious_excel_macro
  • first_seen_event_id: string
  • attacker_sequence: array of exact event IDs in chronological attack order
  • causal_edges: array of objects
  • timeline_summary: array of objects
  • evidence_pivots: array of objects
  • confirmed_iocs: object
  • excluded_events: array of objects
  • event_classification: array of objects
  • containment_actions: array of action strings
  • eradication_actions: array of action strings
  • summary: string

confirmed_iocs must contain:

  • domains: array of confirmed payload-delivery, command-and-control, or attacker follow-on infrastructure domains observed in Phase 3 network evidence. Do not include sender email domains unless Phase 3 network evidence also shows that domain hosted payload delivery, command-and-control, or follow-on attacker traffic.
  • dropped_files: array of file paths
  • scheduled_task: string
  • service_name: string or null

excluded_events must contain benign, unrelated, or background Phase 3 events that you considered and intentionally kept out of attacker_sequence, confirmed_iocs, and response actions. Each entry must contain:

  • event_id: exact event ID from /app/phase3/evidence
  • reason: concise reason explaining why this event is not part of the incident chain

event_classification must contain exactly one entry for every event in the Phase 3 JSONL evidence. Each entry must contain:

  • event_id: exact event ID from /app/phase3/evidence
  • source: one of auth, edr, email, proxy
  • classification: one of attacker, benign, unrelated, context
  • reason: concise reason explaining the classification

Use these Phase 3 classification meanings consistently:

  • attacker: event is part of the malicious delivery, execution, persistence, command-and-control, staging, or follow-on activity for the incident.
  • context: event is not malicious by itself, but establishes required incident context for the affected host/user, such as the relevant user logon before execution.
  • benign: event is non-malicious background, maintenance, telemetry, or lookalike activity close enough to the incident that an analyst might confuse it with the malicious chain.
  • unrelated: event is outside the incident scope by host, user, service account, or infrastructure and does not belong in the attack sequence, confirmed IOCs, containment, or eradication. If an event is both clearly non-malicious and for a different host/user/account, prefer unrelated.

Use the same dropped_files definition as Phase 1, but derive it only from Phase 3 evidence. Include confirmed attacker-created loaders and payloads from the incident record; do not include the original delivery attachment or routine read-only data stores.

Use exact action strings in these formats:

  • isolate_host:<hostname>
  • block_domain:<domain>
  • delete_file:<path>
  • delete_task:<task_name>
  • delete_service:<service_name>

Containment actions should stop spread or command-and-control quickly. Eradication actions should remove the malware foothold and dropped payloads that are actually confirmed by the evidence.

For attacker_sequence, include the core malicious chain in order and include clearly supported attacker-side follow-on steps that materially establish a capability, such as process injection, host discovery, service start, or post-persistence check-in. Do not add benign background activity.

causal_edges must explain why adjacent or important non-adjacent attacker events belong to the same incident chain. Each entry must contain:

  • from_event_id: exact event ID from /app/phase3/evidence
  • to_event_id: exact event ID from /app/phase3/evidence
  • relation: one of delivery_to_execution, download_to_payload, payload_to_persistence, payload_to_c2, persistence_to_follow_on, context_to_execution, payload_to_injection, payload_to_discovery
  • reason: concise evidence-based explanation for the link

If the Phase 3 auth evidence contains a successful logon for the affected user/host immediately before the first malicious execution event, include a context_to_execution causal edge from that auth event to the first execution or document-open event. This edge records incident context; it does not make the auth event malicious.

timeline_summary must group the incident into chronological analyst stages. Each entry must contain:

  • stage: one of delivery, execution, download, payload_start, injection, persistence, discovery, credential_access, c2
  • event_ids: array of exact Phase 3 event IDs that support that stage
  • summary: concise evidence-based explanation for the stage

Use timeline_summary to synthesize the incident, not just repeat attacker_sequence. Include only stages directly supported by Phase 3 evidence. Do not add a credential_access stage unless Phase 3 evidence directly shows credential access. If one stage happens more than once, such as task persistence and later service persistence, use separate chronological entries with the same stage value. Do not include unrelated, benign, or context-only events in timeline_summary.

Document-open events sit on the boundary between delivery and execution. You may group a document-open event with either delivery or execution as long as the summary explains that the delivered attachment was opened by the affected user.

evidence_pivots must explain the cross-source reasoning that links or rejects the incident evidence. Each entry must contain:

  • pivot_type: one of identity_scope, delivery_execution_link, download_corroboration, payload_behavior_link, persistence_link, c2_corroboration, scope_exclusion
  • supporting_event_ids: array of exact Phase 3 event IDs that support the pivot. These must be in-scope attacker or context events that anchor the incident reconstruction.
  • rejected_event_ids: array of exact Phase 3 event IDs reviewed and rejected for that pivot; use an empty array only when there were no relevant rejected events for that pivot. Put unrelated, benign, other-host, other-user, and other-account control events here, not in supporting_event_ids.
  • conclusion: concise explanation of how the supporting and rejected evidence affects the incident reconstruction

Include all seven pivot types. Use identity_scope for same user/host logon and other-account boundaries, delivery_execution_link for email attachment to document/macro execution, download_corroboration for EDR downloader plus proxy download evidence, payload_behavior_link for payload-driven injection or discovery, persistence_link for task/service persistence, c2_corroboration for payload-to-network command-and-control, and scope_exclusion for unrelated host/user or benign-control evidence kept out of the incident.

For scope_exclusion, supporting_event_ids must cite the in-scope anchor events that prove the affected user/host or attack path, such as the affected user logon and first execution event. The unrelated or benign evidence being excluded must be listed in rejected_event_ids. Do not list excluded control events as supporting evidence.

Base the incident report only on Phase 3 evidence. If your malware-analysis answer in Phase 1 may be wrong, do not repeat it here unless Phase 3 evidence also supports it.

Environment

  • Read-only artifacts live only under /app/phase1, /app/phase2, and /app/phase3.
  • Write final answers only under /app/output.
  • You may use /testbed as scratch space for helper scripts or notes.
  • Python 3 is available in the container.

Constraints

  1. Base every answer only on the provided artifacts. Do not use the internet or external lookups.
  2. Use exact event IDs that appear in the current variant. Do not invent evidence.
  3. Only report capabilities, indicators, and attack steps actually supported by the artifacts; exclude routine benign background activity and unsupported string-only hints.
  4. Do not modify the case, corpus, evidence, or report source artifacts.
  5. When support spans more than one artifact type, cite evidence from more than one source instead of relying on a single weak clue.
  6. Keep summaries concise and analyst-facing.
  7. Re-derive each phase from its own artifact set. Later phases are scored independently, so do not let an earlier mistake poison later answers.