malware-detection-ir-independent-phases-analysis-prototype
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:
/app/output/phase1_malware_report.json/app/output/phase2_detection_rule.yaml/app/output/phase2_rule_validation.json/app/output/phase3_incident_report.json
Also maintain /app/output/plan.md as a concise process artifact describing
the evidence reviewed, hypotheses considered, and validation performed.
All three phases come from the same selected variant. However, each phase is scored against 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: stringmalware_category: one ofransomware,rat,infostealer,loader,dropperrisk_level: one ofLOW,MEDIUM,HIGH,CRITICALmalicious_capabilities: array of objectsprimary_destination: objectnotable_iocs: objecttriage_decisions: array of objectscapability_evidence_matrix: array of objectssummary: string
Each capability entry must contain:
name: one ofsystem_fingerprinting,process_injection,browser_credential_access,persistence_scheduled_task,archive_staging,command_and_control_https,dns_beaconing,ransomware_encryption,lsass_memory_dump,service_installationattck_ids: array of MITRE ATT&CK technique IDsevidence_event_ids: array of exact event IDs from the case files
primary_destination must contain:
protocolhost
notable_iocs must contain:
domains: array of domain stringsdropped_files: array of file pathsscheduled_task: string
triage_decisions must contain explicit analyst decisions for suspicious
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 filesclassification: one ofmalicious,benign,decoy,unsupported_string_onlyreason: concise reason explaining why the evidence is included or excluded
capability_evidence_matrix must contain one entry for every reported
capability. Each entry must contain:
capability: exact capability name frommalicious_capabilitiesprimary_event_ids: array of exact event IDs that directly prove the capabilitycorroborating_event_ids: array of exact event IDs from a different artifact family that strengthen the conclusionexcluded_related_event_ids: array of exact event IDs that look related but should not be used as primary supportconfidence: one ofmedium,highrationale: concise reason tying the primary and corroborating evidence to the capability and explaining any excluded related events
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.
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 DLL name, 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. Do not assume your phase 1 answer was correct.
The rule should be behavioral and portable across equivalent telemetry. Do not depend on one-off identifiers such as event IDs or a single workstation name. Prefer chain-level logic such as downloader plus payload execution, execution plus C2, execution plus persistence, or service creation plus follow-on check-in. Near-miss benign controls may reuse one suspicious token, so the final condition must require a meaningful combination rather than a lone string match. A robust operational rule should handle equivalent malicious telemetry and benign near-misses that do not appear verbatim in the visible corpus. Avoid rules that only memorize one exact event value or that broaden to an entire vendor or domain family without the supporting behavior. Use stable behavior families from the telemetry, document the false-positive boundaries, and keep diagnostic, health-check, update, and control activity out of scope even when it reuses a suspicious token. When using substring operators, prefer stable tokens that tolerate small infrastructure naming variations, but only when paired with independent behavioral evidence.
phase2_rule_validation.json must contain exactly these top-level fields:
sample_id: stringrule_intent: stringcorpus_results: array of objectsgeneralization_notes: objectrule_evaluation_trace: array of objectssummary: string
Each corpus_results entry must contain:
bundle: exact corpus filename, such asmalicious-01.jsonlexpected_detection: booleanreason: 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 correlatesfalse_positive_boundaries: array of near-miss conditions that your rule intentionally avoids
rule_evaluation_trace must contain one entry for every visible corpus bundle.
Each entry must contain:
bundle: exact corpus filenamealert_decision: boolean result expected from your rulematched_behavior_families: array of behavior-family strings that are present in the bundle and relevant to your ruledecisive_absent_or_benign_families: array of behavior-family strings that explain why a benign or near-miss bundle should not alertrationale: 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: stringincident_id: stringaffected_host: stringaffected_user: stringinitial_vector: short normalized label such asmalicious_word_macroormalicious_excel_macrofirst_seen_event_id: stringattacker_sequence: array of exact event IDs in chronological attack orderconfirmed_iocs: objectexcluded_events: array of objectsevent_classification: array of objectscontainment_actions: array of action stringseradication_actions: array of action stringssummary: 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 pathsscheduled_task: stringservice_name: string ornull
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/evidencereason: 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/evidencesource: one ofauth,edr,email,proxyclassification: one ofattacker,benign,unrelated,contextreason: 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 that is useful to mention because it is close enough to the incident evidence that an analyst might otherwise 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, preferunrelated.benignis also acceptable for a different-host/user event only when your reason explicitly explains that it is a close lookalike or benign control considered and excluded from the attacker chain. In either case, these events must remain out ofattacker_sequence,confirmed_iocs, containment, and eradication actions.
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. If clearly
supported attacker-side follow-on steps are also present, they may be included,
but do not add benign background activity.
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
/testbedas scratch space for helper scripts or notes. - Python 3 is available in the container.
Constraints
- Base every answer only on the provided artifacts. Do not use the internet or external lookups.
- Use exact event IDs that appear in the current variant. Do not invent evidence.
- Only report capabilities, indicators, and attack steps actually supported by the artifacts; exclude routine benign background activity and unsupported string-only hints.
- Do not modify the case, corpus, evidence, or report source artifacts.
- When support spans more than one artifact type, cite evidence from more than one source instead of relying on a single weak clue.
- Keep summaries concise and analyst-facing.
- Re-derive each phase from its own artifact set. Later phases are scored independently, so do not let an earlier mistake poison later answers.