원클릭으로
aggregate-scores
Merge Stage 2 DNS analysis scores and calculate final exfiltration verdicts.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Merge Stage 2 DNS analysis scores and calculate final exfiltration verdicts.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | aggregate-scores |
| description | Merge Stage 2 DNS analysis scores and calculate final exfiltration verdicts. |
Merge the three parallel Stage-2 score outputs and calculate the final DNS
exfiltration verdict for each query. Used by orchestrator_agent in Stage 3.
aggregate_scores(entropy_path: str, dga_path: str, embed_path: str, output_path: str) -> dict
Use this skill after all three Stage-2 agents have finished:
entropy_agent writes entropy_scores.jsondga_classifier_agent writes dga_scores.jsonembedding_agent writes embed_scores.json| Parameter | Type | Required | Description |
|---|---|---|---|
entropy_path | str | yes | Path to entropy scores JSON |
dga_path | str | yes | Path to DGA scores JSON |
embed_path | str | yes | Path to embedding scores JSON |
output_path | str | yes | Path to write aggregated scores |
Each input record must contain query_id and its branch-specific score:
| File | Required score field |
|---|---|
entropy_scores.json | entropy_score |
dga_scores.json | dga_score |
embed_scores.json | embed_score |
Records should also include domain, label, and source when available.
Returns a dict with processing summary:
| Field | Type | Description |
|---|---|---|
total_processed | integer | Number of merged queries |
suspected_count | integer | Count where verdict is suspected |
output_file | string | Path where scores.json was written |
Also writes a JSON array to output_path.
| Field | Type | Description |
|---|---|---|
query_id | int | Query identifier from Stage 1 |
domain | str | Full DNS domain |
label | str | Ground-truth label if available |
source | str | Data source, such as pcap or csv |
entropy_score | float | Raw entropy score |
entropy_norm | float | Normalized entropy score |
dga_score | float | DGA probability |
embed_score | float | Embedding anomaly score |
combined_score | float | Final weighted score |
verdict | str | benign or suspected |
risk_reasons | list | Detection signals that triggered risk |
query_id.min(max(entropy_score / 5.17, 0.0), 1.0).combined_score = 0.3*entropy_norm + 0.4*dga_score + 0.3*embed_scoreverdict = "suspected" when any hybrid rule is true:
combined_score >= 0.6dga_score >= 0.75entropy_norm >= 0.65 and embed_score >= 0.85risk_reasons for the matched signals.combined_score descending.from tools.aggregate_scores import aggregate_scores
result = aggregate_scores(
entropy_path="outputs/<run_timestamp>/entropy_scores.json",
dga_path="outputs/<run_timestamp>/dga_scores.json",
embed_path="outputs/<run_timestamp>/embed_scores.json",
output_path="outputs/<run_timestamp>/scores.json",
)
print(f"Processed {result['total_processed']} records")
Capture live DNS queries with tcpdump for a configurable duration, save the traffic to a PCAP file, and process it through the existing PCAP reader. Use when a user explicitly requests timed live DNS capture from a network interface.
Compute DGA probabilities using a pre-trained RandomForest model.
Score DNS queries for anomalies using the trained embedding similarity model.
Calculate DNS subdomain entropy scores for exfiltration and DGA detection.
Generate a Markdown security report from aggregated DNS exfiltration scores.
Normalize DNS input from PCAP or CSV into one unified JSON dataset.