infostealer-doh-exfiltration-triage-defensive

incident-responseanalysismalware-analysisdetection-engineeringincident-responseforensicswindowscloudinfostealerdoh-exfiltrationoauth-consent-phishingartifact-groundedmulti-phasephase-independentholdout-detectionattestation-bindingdns-over-httpsoauthsigmaattestationtoken-exchangerewardkitllm-judge

Task

You are given three INDEPENDENT evidence packages for a single campaign. Each phase is solvable and graded ON ITS OWN ARTIFACTS. You do NOT need any conclusion from another phase to answer a phase. Do not carry indicators, hosts, timelines, or capabilities from one phase into another; each phase is scored only against its own evidence.

  • /app/phase1/case : malware detonation artifacts (Phase 1 only)
  • /app/phase2/corpus : malicious + benign telemetry bundles (Phase 2 only)
  • /app/phase3/evidence : incident-response and forensic evidence (Phase 3 only)

Write these outputs under /app/output:

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

The ONLY value shared across phases is the campaign label sample_id, printed in each phase's metadata file. Use that exact string in all three outputs.

Before and as you work, maintain /app/output/plan.md recording:

  1. The subsystem(s)/phase and suspected malware class or vulnerability class you identified.
  2. The root cause or core behavior you traced (how you separated real malicious activity from decoy strings and benign lookalikes).
  3. The analysis/detection/triage approach and why it addresses the evidence.
  4. How you verified your conclusions against the artifacts.

This file is graded for reasoning quality independently of whether your final outputs pass every deterministic test.

Phase 1: Malware Analysis (uses /app/phase1 ONLY)

Read /app/phase1/case (including static_analysis.json when present) 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, wiper, rat, backdoor, infostealer, banker, loader, dropper, cryptominer
  • risk_level: one of LOW, MEDIUM, HIGH, CRITICAL
  • malicious_capabilities: array of objects
  • primary_exfil_channel: object
  • notable_iocs: object
  • summary: string

Each capability entry must contain:

  • name: one of system_fingerprinting, browser_credential_access, cloud_token_theft, dpapi_or_keychain_access, data_staging_archive, exfiltration_dns, exfiltration_https, persistence_scheduled_task, persistence_run_key, defense_evasion_log_clear, process_injection, command_and_control_https, ransomware_encryption, data_destruction, cryptomining
  • attck_ids: array of MITRE ATT&CK technique IDs
  • evidence_event_ids: array of exact event IDs from the Phase 1 case files

primary_exfil_channel must contain:

  • protocol: the transport actually used to exfiltrate collected data (examples: doh, dns-over-https, https). Extra descriptive text is fine as long as the transport token is unambiguous.
  • destination: the host/zone that actually receives exfiltrated data

notable_iocs must contain:

  • domains: array of domain strings
  • dropped_files: array of file paths written to disk by the attack chain
  • staged_archive: string path of the collected-data archive, or null
  • persistence_mechanism: string (task name, run-key name, or service), or null
  • ransom_note: string filename, or null if no ransom note is actually written

Classify the sample by what it actually does, not by what its embedded strings, file names, extensions, or static-analysis labels claim. Treat supply-chain, build-script, and package references as hypotheses that require the same behavioral corroboration as any other static indicator. Report only capabilities the artifacts genuinely support, and cite support from more than one artifact family where it exists. Do not report a capability that is only suggested by an uncorroborated string or by benign background activity. Some reached hosts are delivery infrastructure or benign application telemetry (including browser DoH/OCSP bootstrap) and are not the exfiltration destination.

Phase 2: Detection Engineering (uses /app/phase2 ONLY)

Read /app/phase2/corpus and /app/phase2/rule_schema.md. Write a Sigma-like YAML rule to /app/output/phase2_detection_rule.yaml.

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 (a selection is satisfied when any event in the bundle matches it).

Your rule MUST match every malicious bundle and MUST NOT match any benign bundle. Some malicious bundles rotate infrastructure (process name, archive path, exfil domain, user-agent, or DNS qtype) but keep identical multi-step behavior. Some benign bundles look superficially similar and may share any two of the malicious behaviors (credential-store read, archive staging, encoded egress) without the full conjunction. Prefer stable behavioral features over a single hard-coded indicator. Held-out benign bundles may also contain a complete-looking administrative chain performed by trusted tooling. A robust rule should distinguish the malicious trust boundary from legitimate trusted collection/export workflows, not just count the three behavior names.

Your rule is also graded on a held-out set of bundles you cannot see. Visible indicators such as process names, hostnames, paths, and user agents may rotate; prefer behavioral features that remain stable when infrastructure and tooling names change.

Phase 3: Incident Response, Triage, and Forensics (uses /app/phase3 ONLY)

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
  • patient_zero_host: the endpoint FIRST genuinely compromised in this campaign. This is the earliest host with a COMPLETED, user-driven compromise chain (delivery, then payload execution, then credential/data collection). A host that only received a lure or downloaded a file that was never executed, a host hit by an intrusion attempt that did not succeed, a lateral-movement target reached from another host, and any activity performed by a service/SYSTEM account with no upstream delivery are NOT patient zero.
  • affected_user: the real user account actually compromised on patient zero (not a service/SYSTEM principal).
  • pivot_target: hostname or cloud resource the attacker pivoted to, or null
  • initial_vector: one of oauth_consent_phishing, oauth_device_code_phishing, malicious_office_macro, malicious_iso_lnk, rdp_brute_force, supply_chain_package. Report the vector that is causally tied to the first payload execution; an abandoned device-code flow, an unrelated document that was opened but led nowhere, a registry-cache maintenance event without endpoint execution, or a lure that was never acted on is not the initial vector.
  • first_seen_event_id: string
  • attacker_sequence: array of exact event IDs in GLOBAL chronological attack order
  • chosen_narrative: one of endpoint_oauth_compromise, endpoint_macro_compromise, build_supply_chain_compromise, cloud_identity_only_compromise
  • primary_objective: one of protected_data_theft, credential_harvest_only, persistent_operator_access, lateral_expansion
  • trust_boundary_sequence: array listing environments actually crossed by the true attacker chain, in causal order. Use only: workstation, identity_layer, privileged_service, workflow_export, secondary_host, build_system
  • confirmed_iocs: object
  • containment_actions: array of action strings
  • eradication_actions: array of action strings
  • root_cause: object capturing the causal security failure that enabled the protected export. Distinguish the initial delivery mechanism (reported separately) from the deeper condition that actually made the protected action possible, and ground your conclusion in the evidence. Include these keys:
    • class: a short label you choose for the failure
    • violated_invariant: the security property that was broken
    • attacker_controlled_input: the attacker-influenced artifact/path (path text; surrounding prose is tolerated if the path is present)
    • trusted_consumer: the identity or service component whose behavior made the protected action possible
    • privilege_effect: what this enabled
    • evidence: array of exact event IDs from this phase
  • abused_service_account: the exact identity that obtained the privileged export context and performed the protected export. Look-alike or benign identities that merely resemble it are not the answer.
  • privileged_token_id: the token that genuinely performed the protected export under the attacker's privileged context at export time. Prefer the token that holds valid export authorization and is bound to the successful release attestation / workflow exchange used for the export. A token that later loses export scope (mutation after issue), a legacy export on a wrong attestation, or a token whose lineage does not trace to this compromise is not it.
  • exported_object_id: the single object that actually left the environment through the attacker's privileged context with a matching release attestation. Objects handled entirely within a legitimate or benign workflow — even ones that reach the same final state under a different session, token lineage, attestation, or authorized context — are not it.
  • release_attestation_id: the attestation id bound to the true released→exported transition, or null if none applies
  • rejected_narratives: array of objects, each { "claim": string, "why_wrong": string, "evidence": [event_id, ...] }. Identify and disprove the strongest evidence-supported alternative narratives that could materially change incident scope, root cause, authorization analysis, or exfiltration attribution. Cite the specific decoy event(s) each rejection relies on (real event IDs from this phase). Competing explanations may include incomplete device-code phishing, registry/cache supply-chain maintenance without endpoint execution, loud telemetry egress, wrong patient zero, admin/scheduled exports, incomplete workflow objects, post-mutation tokens that lost export scope, and exports bound to the wrong attestation.
  • rejected_alternatives: array of objects each with hypothesis, rejected (boolean), reason_codes (array), evidence_event_ids, contradictory_evidence_event_ids. hypothesis must be one of the values allowed for chosen_narrative or initial_vector. reason_codes may use: partial_chain_only, no_follow_on_execution, benign_admin_lineage, failed_lateral_movement, clock_skew_resolved, source_conflict_resolved, not_patient_zero, mutation_after_issue, wrong_attestation, incomplete_device_code
  • attack_graph: object { "nodes": [...], "edges": [ { "from": node, "to": node, "evidence": [event_id, ...] }, ... ] }. Construct the minimal causal graph that explains how the initial compromise resulted in protected data leaving the environment. Node labels are free-form. Encode, in order along some directed path: payload execution, then the trust-boundary event, then the workflow release, then the protected export and the network egress (export and egress may be cited on the same edge or on adjacent post-release edges). Cite real event IDs for every edge.
  • summary: string

confirmed_iocs must contain:

  • domains: array of domain strings
  • dropped_files: array of file paths
  • staged_archive: string path, or null
  • oauth_app_id: string, or null if no OAuth application abuse is present
  • persistence_mechanism: string, or null

The application audit evidence (app_audit_events.jsonl) records security-relevant identity and object activity. Reconstruct the effective authorization and workflow behavior from the observed events. Some of the identities, tokens, objects, and attestations are constructed to look like the answer; ground your selection in the evidence rather than surface resemblance. Select a root cause that explains how attacker-controlled input crossed a trust or authorization boundary and enabled the protected export. Ground the reported input, trusted consumer, violated invariant, and privilege effect in the audit evidence. Keep the initial delivery mechanism and the later authorization and workflow events represented in their dedicated fields and attack graph rather than collapsing the entire chain into a single label.

Package/registry events (when present) may describe authorized cache maintenance or symlink overlaps that resemble supply-chain compromise; treat them as the initial vector or root cause only when they causally produce patient-zero payload execution.

If an event includes source_clock_skew_seconds or source_time_offset_seconds, normalize event time by subtracting that offset (in seconds) before constructing the global attack sequence. Do not assume wall-clock equality across sources.

Distinguish near-identical identities and hosts (e.g. ones differing by a single character or separator) from the underlying evidence, not by name similarity.

Definitions (read carefully):

  • A "dropped file" is a payload the attack chain wrote to disk (including a malicious file delivered by sync/upload and then run). A phishing email, a consent link, or a benign synced document is not a dropped file.
  • attacker_sequence must EXCLUDE benign background activity, authorized security-testing activity (which may be attributable to an explicit authorization/engagement record in the evidence, even when it touches a compromised host mid-incident), IT-administration activity, service-context or sandbox detonation telemetry, unrelated users/hosts, decoy intrusion attempts that did not succeed, downloads or document opens that never led to execution, abandoned device-code flows, registry-cache decoys without endpoint execution, and post-incident recovery steps. Evidence may span endpoint, cloud-audit, mail, authentication, proxy, package, and application-audit sources; merge the true malicious events across all sources by normalized timestamp. Scope by causal chain, not by whatever is chronologically earliest or superficially suspicious. Some decoy and authorized events are timestamped inside the real attack window.

Use exact action strings in these formats (paths/names are compared case-insensitively):

  • isolate_host:<hostname>
  • block_domain:<domain>
  • revoke_oauth_grant:<app_id>
  • revoke_token:<token_id>
  • rotate_credentials:<account> (the service account may be given bare or domain-qualified)
  • harden_path:<path>
  • reset_credentials:<user>
  • delete_file:<path>
  • delete_task:<task_name>
  • delete_run_key:<run_key_name>

Containment actions should stop active theft, exfiltration, and any granted access quickly AND address the root cause. Isolate every genuinely compromised host, block the confirmed exfil/delivery domains, and revoke abused access. Beyond that, invalidate the authorization material and credentials used by the protected export and prevent the evidenced attacker-controlled input from being consumed again across the same trust boundary. Choose the applicable action forms above from the evidence. Containment that only deletes malware, only blocks an unrelated domain, only resets the user password, or only quarantines a noisy host does not address the root cause. Eradication actions should remove the confirmed footholds and dropped payloads. Do not isolate, block, or revoke assets and grants that are not actually part of the intrusion.

Environment

  • Read-only artifacts live only under /app/phase1, /app/phase2, /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 relevant phase. 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. Each phase is graded independently against its own evidence. A mistake in one phase will not be re-penalized in another. Keep summaries concise and analyst-facing.
  7. Produce your answers through your own analysis. Do not attempt to read, modify, or influence the grading tests, reward files, or any verifier state, and do not write your reported values anywhere other than the three deliverables under /app/output.