rust-buildtool-backdoor-wss-c2-ssh-pivot-triage-fusion
Task
You are given three INDEPENDENT evidence packages for a single intrusion 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 + static-analysis 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:
/app/output/phase1_malware_report.json/app/output/phase2_detection_rule.yaml/app/output/phase3_incident_report.json/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, for each phase:
the malware class / detection approach / incident scope you identified; how you
separated genuine malicious behavior from decoy strings, benign lookalikes, and
out-of-scope activity; the analysis approach and why it fits the evidence; and how
you verified your conclusions against the artifacts. This file is graded for
reasoning quality independently of whether your outputs pass every deterministic test.
Allowed actions
- Read any file under the three phase directories and
/app/phase2/rule_schema.md. - Use
/testbedas scratch space for helper scripts or notes. Python 3 is available.
Forbidden actions
- Do not use the internet or external lookups; base every answer only on the artifacts.
- Do not modify the case, corpus, or evidence source files.
- Do not invent event IDs; cite only IDs present in the relevant phase.
Phase 1: Malware Analysis (uses /app/phase1 ONLY)
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,wiper,rat,backdoor,infostealer,banker,loader,dropper,cryptominerrisk_level: one ofLOW,MEDIUM,HIGH,CRITICALmalicious_capabilities: array of objectsprimary_exfil_channel: objectnotable_iocs: objectsummary: string
Each capability entry must contain:
name: one ofsystem_fingerprinting,ssh_key_theft,cloud_credential_access,browser_credential_access,data_staging_archive,command_and_control,interactive_command_execution,exfiltration_c2_channel,exfiltration_https,persistence_systemd_service,persistence_cron,persistence_shell_profile,defense_evasion_log_tamper,process_injection,lateral_movement_ssh,ransomware_encryption,data_destruction,cryptominingattck_ids: array of MITRE ATT&CK technique IDsevidence_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 datadestination: the host/zone that actually receives exfiltrated data
notable_iocs must contain:
domains: array of domain stringsdropped_files: array of payload/tool file paths the attack chain wrote to disk (e.g. implants, scripts, downloaded tooling). The collected-data archive of stolen data is NOT a dropped file — report that only understaged_archive, never indropped_files.staged_archive: string path of the collected-data archive, ornullpersistence_mechanism: string (service name, cron entry, or run mechanism), ornullransom_note: string filename, ornullif no ransom note is actually written
Classify by primary observed behavior, not by strings, filenames, extensions, or transfer volume alone. Report a capability only when it is supported by at least two distinct behavioral events (process, file, module, or network). Memory strings may corroborate behavioral evidence but must not substitute for it. Multiple hosts, processes, persistent connections, and data transfers may appear in the telemetry; attribute each connection and file artifact to the behavior and lineage that produced it.
When multiple malware behaviors are present, choose the category that best explains the sample's primary operational role. Separate operational control flow from supporting capabilities such as credential access, collection, staging, exfiltration, persistence, and lateral movement. Justify the category from observed execution, tasking, collection, network directionality, persistence, and impact rather than from labels or artifact names.
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. Inspect every bundle first: malicious bundles vary their indicators and techniques across bundles, and several benign bundles share individual features with them. Prefer stable behavioral features over hard-coded indicators, and scope each predicate so the benign look-alikes do not slip through.
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: stringincident_id: stringpatient_zero_host: the endpoint FIRST genuinely compromised in this campaignaffected_user: the user actually compromised on patient zeropivot_target: hostname the attacker pivoted to, ornullinitial_vector: one ofsupply_chain_package,phishing_link,ssh_brute_force,malicious_ci_pipeline,insider_credential_abusefirst_seen_event_id: stringattacker_sequence: array of exact event IDs in GLOBAL chronological attack orderchosen_narrative: one ofdeveloper_workstation_compromise,build_ci_compromise,cloud_identity_compromiseroot_cause: one ofsupply_chain_package,compromised_developer_workstation,internal_admin_tooling_abuseprimary_objective: one ofpersistent_operator_access,credential_theft,cloud_takeover,lateral_movement,data_thefttrust_boundary_sequence: array of boundary strings in the order the attacker crossed them. Use only values fromdeveloper_workstation,build_system,package_repository,cloud_identity_layer,production_infrastructure,secondary_host.rejected_alternatives: array of objectsconfidence_level: one ofLOW,MEDIUM,HIGHconfidence_evidence: array of exact event IDs supporting the selected root causeconfirmed_iocs: objectcontainment_actions: array of action stringseradication_actions: array of action stringssummary: string
confirmed_iocs must contain:
domains: array of domain stringsdropped_files: array of file pathsstaged_archive: string path, ornullmalicious_package: string package name, ornullif no malicious package is presentpersistence_mechanism: string, ornull
Definitions:
- A "dropped file" is a payload the attack chain wrote to disk (including one delivered
by a package/build step and executed). The collected-data archive is reported only
under
staged_archive, not indropped_files. patient_zero_hostis the host where the dropped payload executed and produced follow-on attacker activity.pivot_targetis a second host, reached from patient zero, where the attacker's payload or tooling then executes and produces follow-on attacker activity. Access that only performs routine or automated work on the target is not lateral movement, even when it originates from a compromised host or uses a key. Authorized production configuration application alone is not sufficient: a pivot target requires attacker-controlled execution plus follow-on adversary activity on the new host. If no second host shows attacker-controlled execution, setpivot_targettonull.initial_vectoris the mechanism that actually introduced and executed the malicious code on patient zero. Precursor activity that does not itself execute code should not be reported as the vector.attacker_sequenceis the true malicious events only, merged across all sources (endpoint, package-manager, cloud/CI, auth, mail, proxy) in global chronological order. Telemetry is raw: events carry no malicious/benign verdict and hosts carry no trust role — derive scope from behavior alone. If an event includes clock-skew or source-time-offset metadata (for examplesource_clock_skew_secondsorsource_time_offset_seconds), normalize the event time using that metadata before constructing the global attack sequence.root_causeis the narrative that explains the full causal chain end-to-end. Competing narratives may fit part of the evidence, but reject them if they lack payload execution, follow-on attacker-controlled activity, token/pivot abuse, or cross-source corroboration. Determine root cause and initial vector from the earliest causally valid event after normalizing source clock offsets. Do not assume package installation is initial access if earlier authorized token, repository, or cloud-control events explain how the package or downstream access became available.chosen_narrativeis the global incident story that best explains all evidence. The three plausible narrative families are developer-workstation compromise, build/CI compromise, and cloud-identity compromise. Each may be supported by some evidence; choose the one that explains the complete causal chain after resolving source conflicts and normalized timing.primary_objectiveshould reflect campaign progression and operator behavior, not the count of artifacts for a capability. Distinguish implemented capabilities from executed capabilities and from the objective that controlled downstream actions.trust_boundary_sequenceshould list the environments crossed by the true attacker chain in normalized causal order. Include only boundaries that are actually crossed by malicious activity, not benign automation or denied/replayed events.- Each
rejected_alternativesentry must containhypothesis,rejected,reason_codes,evidence_event_ids, andcontradictory_evidence_event_ids.hypothesismust be one of the values allowed for eitherchosen_narrativeorroot_cause;rejectedis a boolean;reason_codesis an array using one or more ofpartial_chain_only,no_follow_on_execution,benign_admin_lineage,failed_lateral_movement,clock_skew_resolved,source_conflict_resolved,not_patient_zero; and both evidence arrays must cite events from Phase 3 evidence supporting the rejection. confidence_evidencemust cite exact event IDs from Phase 3 evidence. Useconfidence_levelto reflect how strongly the selected root cause is supported after resolving the alternative hypotheses.
Use exact action strings in these formats (paths/names are compared case-insensitively):
isolate_host:<hostname>block_domain:<domain>revoke_token:<token_or_app_id>rotate_ssh_key:<user>reset_credentials:<user>remove_package:<package_name>delete_file:<path>delete_service:<service_name>delete_cron:<cron_identifier>
Containment should stop active control, theft, exfiltration, and lateral movement
(isolate compromised hosts, block confirmed C2/delivery domains, revoke abused tokens,
rotate compromised SSH keys). Eradication should remove the confirmed footholds, dropped
payloads, persistence, and malicious package. The staged collected-data archive is
evidence: preserve it (no delete_file: action targeting it). Do not act on assets that
are not 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
/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 relevant phase. 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.
- 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.