Skip to content

meltedinhex/analyst-ai-pack / skills/hunting-unusual-outbound-connections

hunting-unusual-outbound-connections

Verified

Hunts for unusual outbound network connections by flagging direct-to-IP traffic, uncommon ports, rare destinations, high data-egress ratios, and connections from unexpected processes in network telemetry. Activates for requests to hunt unusual outbound traffic, detect suspicious egress, or find anomalous external connections.

FileKindSize
LICENSEother340 B
SKILL.mdskill md2.6 KB
references/api-reference.mdmarkdown1.4 KB
scripts/analyst.pyscript3.7 KB

references/api-reference.md

View on GitHub
# API Reference: Hunting Unusual Outbound Connections

## Overview

`scripts/analyst.py` parses outbound connection telemetry (CSV or JSON-lines) and scores connections
by direct-to-IP, non-standard port, high sent:received ratio, and egress from unexpected
processes, plus aggregates destination rarity. It parses telemetry only and executes nothing.

## Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | csv, json, ipaddress, Counter |

## Core functions

### `hunt(path, ratio_threshold=5.0)`
Returns scored findings (dest, port, process, reasons) and rare destinations (≤2 connections).

## Signals

- `direct_to_ip`: IP destination with no resolved domain.
- `uncommon_port`: not in the common-port set (80/443/53/22/...).
- `high_egress_ratio`: sent/received ≥ threshold and >10 KB sent.
- `unexpected_process`: egress from `notepad.exe`, `rundll32.exe`, Office, etc.

## Expected fields

`DestinationIp`/`DestinationPort`/`DestinationHostname`, `Image`, `BytesSent`/`BytesReceived`
(Sysmon EID 3) or Zeek `id.resp_h`/`id.resp_p`/`orig_bytes`/`resp_bytes`.

## Usage

```bash
python scripts/analyst.py hunt conns.csv --ratio 5
```

## Sources

- MITRE ATT&CK T1048 Exfiltration Over Alternative Protocol; T1571 Non-Standard Port — https://attack.mitre.org/
- Sysmon Event ID 3 and Zeek conn.log field names (official documentation)
- Egress-ratio / direct-IP hunting heuristics from public network-hunting practice
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall