ARES - authorized red-team engagement automation with dashboard, campaign scope, module orchestration, OPSEC controls, encrypted vault, and reporting.
Python active-directorycloud-securitydefensive-validationfastapigood-first-issuemitre-attackopsecreactred-teamreportingsecurity
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "ares-redteam"
version = "6.0.0"
description = "ARES - Automated Red Team Engagement System"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11,<3.13"
dependencies = [
# Core
"rich>=13.7",
"pydantic>=2.6",
"pydantic-settings>=2.2",
"pyyaml>=6.0",
"python-dotenv>=1.0",
# Structured logging
"structlog>=24.1",
# API + Auth
"fastapi>=0.110",
"uvicorn[standard]>=0.27",
"PyJWT[crypto]>=2.8",
"bcrypt>=4.0",
"python-multipart>=0.0.9",
"websockets>=12.0",
"authlib>=1.3",
"python3-saml>=1.16",
# HTTP client
"httpx>=0.27",
# Security / Crypto
"cryptography>=42.0",
# SSH lateral movement
"paramiko>=3.4",
# Attack graph
"networkx>=3.3",
# Reporting
"jinja2>=3.1",
# Database (async + sync SQLite + migrations)
"aiosqlite>=0.20",
"sqlalchemy[asyncio]>=2.0",
"greenlet>=3.0",
"alembic>=1.13", # DB migrations - required for revoked_access_tokens table
# CLI
"typer>=0.12",
# Network
"dnspython>=2.6",
]
[project.optional-dependencies]
postgres = [
"asyncpg>=0.29",
]
ad = [
"impacket>=0.11",
"pyasn1>=0.5",
"pyasn1-modules>=0.3",
"ldap3>=2.9",
"pywinrm>=0.4",
"asyncssh>=2.14",
"httpx-ntlm>=1.4", # ADCS ESC1 HTTP enrollment (ad.adcs exploit_esc1)
]
ad-support = [
"pyasn1>=0.5",
"pyasn1-modules>=0.3",
"ldap3>=2.9",
"httpx-ntlm>=1.4",
]
cloud = [
"boto3>=1.34",
"botocore>=1.34",
"azure-identity>=1.15",
"azure-mgmt-resource>=23.0",
"azure-mgmt-compute>=30.0",
"azure-mgmt-network>=25.0",
"google-cloud-resource-manager>=1.12",
"google-cloud-iam>=2.13",
"msal>=1.28", # Azure AD identity attacks (cloud.azure_ad)
]
container = [
"docker>=7.0",
"kubernetes>=29.0",
]
windows = [
"pypykatz>=0.6", # LSASS minidump parsing (windows.lsass_dump)
]
pdf = [
"weasyprint>=62.0",
]
full = [
"ares-redteam[ad,cloud,container,pdf,windows]",
]
all = [
"ares-redteam[full]",
]
dev = [
"pytest>=8.0",
"hypothesis>=6.100", # property-based testing
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
"pytest-mock>=3.14",
"pytest-timeout>=2.3",
"respx>=0.21",
"black>=24.0",
"ruff>=0.4",
"mypy>=2.4,<2.5",
"bandit>=1.7",
"safety>=3.0",
"types-pyyaml",
"types-PyJWT",
]
[project.urls]
Homepage = "https://github.com/Mafifrizi/ARES"
Issues = "https://github.com/Mafifrizi/ARES/issues"
[project.scripts]
ares = "ares.cli.main:cli"
ares-api = "ares.api.server:start"
ares-setup = "ares.cli.typer_main:setup_entrypoint"
[tool.setuptools.packages.find]
where = ["."]
include = ["ares*", "migrations"]
[tool.setuptools.package-data]
migrations = ["script.py.mako", "versions/*.py"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
# Correctness/bug-focused rule set. Security scanning is owned by bandit (a dedicated
# scanner with a justified baseline), not duplicated here: every current flake8-bandit
# ("S") finding was reviewed and is either intrinsic to this offensive security tool
# (subprocess, ssh-without-host-key, weak crypto, no-cert-verify, non-crypto random) or
# a verified false positive (status strings matched by the "password" heuristic, OAuth
# URL templates, parameterized SQL with whitelisted identifiers). Re-enabling "S" here
# would duplicate bandit and bury those justifications, so it is intentionally omitted.
select = ["E", "F", "W", "I", "N", "UP", "B", "A", "C4", "PT"]
ignore = [
# --- Cosmetic / stylistic (relaxed: readability choices, not correctness) ---
"E501", # line-too-long
"E701", # multiple-statements-on-one-line (colon)
"E702", # multiple-statements-on-one-line (semicolon)
"E741", # ambiguous variable name (l/I/O) — appears in math/crypto code
"UP037", # quoted-annotation — no runtime benefit (modules use `from __future__`)
"UP042", # enum.StrEnum style preference, not a bug
# --- Intentional patterns in this codebase ---
"E402", # module-import-not-at-top — deliberate lazy / optional-dep imports
"N806", # non-lowercase var in function — crypto/protocol naming (P, N, DN...)
"N803", # argument-name casing — mirrors external protocol field names
"N815", # mixedCase class var — mirrors wire/JSON field names
"N818", # exception-name suffix — renaming would break the public error API
"N802", # function name casing — a few protocol/compat method names
"N805", # first-arg-name — pydantic/classmethod validators use cls/other
"N814", "N817", # camelCase import aliases for external protocol constants
"A001", "A002", "A004", # builtin shadowing — intentional param/domain names (id, type, format, ModuleNotFoundError domain exc)
"B007", # unused loop var — cosmetic
"B027", # empty method in ABC w/o @abstractmethod — SDK interceptor optional-hook pattern
"B024", # ABC w/o abstract methods — interceptor base defines the contract via hooks
"B905", # zip() without strict= — opt-in rigor; deferred (DEBT: audit for length mismatch)
# --- Quality debt: accepted on existing code, still enforced for NEW code via `# noqa` ---
# F841 (unused var) and B904 (raise-without-from) are suppressed inline with `# noqa`
# at each existing site (NOT globally ignored), so new violations still fail CI.
]
[tool.ruff.lint.flake8-bugbear]
# FastAPI's dependency-injection markers (and Typer's CLI option/argument markers,
# and this project's own RBAC dependency factories) are the prescribed
# call-in-default pattern and are immutable, so B008 does not apply to them.
extend-immutable-calls = [
"fastapi.Depends", "fastapi.Query", "fastapi.Path", "fastapi.Header",
"fastapi.Body", "fastapi.Form", "fastapi.File", "fastapi.Cookie",
"fastapi.Security",
"typer.Option", "typer.Argument",
"ares.api.rbac.require_operator", "ares.api.rbac.require_live_operator",
"ares.api.rbac.require_team_lead", "ares.api.rbac.require_any_auth",
]
[tool.ruff.lint.per-file-ignores]
# Tests legitimately redefine fixtures, use framework call-in-defaults, and use
# pytest idioms (broad raises, composite asserts, assert-in-except, type compares)
# that are fine in test code.
"tests/**" = [
"F811", "B008", "B017", "E721",
"PT006", "PT007", "PT011", "PT012", "PT017", "PT018",
]
[tool.bandit]
# ARES is an offensive security tool. The categories below are intrinsic to its
# function or verified false positives (reviewed individually — see AUDIT_FINDINGS.md
# §D). They are skipped so bandit fails CI only on NEW, non-intrinsic findings.
exclude_dirs = ["tests", ".venv", "build", "dist"]
skips = [
"B101", # assert — used for internal invariants
"B104", # bind all interfaces — operator-controlled listeners
"B105", "B106", "B107", # hardcoded-password heuristic — FPs (status strings, OAuth URL templates, token file paths)
"B108", # hardcoded tmp path — reviewed
"B110", "B112", # try-except-pass/continue — defensive resilience in the orchestrator
"B303", "B324", # md5/sha1 — NTLM / fingerprint / compat hashing, not a security context
"B304", "B305", # DES/ECB — decrypting targets' own legacy crypto (e.g. VNC's fixed-key DES-ECB)
"B310", # urllib urlopen — fetching operator-specified URLs is the function
"B311", # non-crypto random — jitter/timing/IDs (vault uses os.urandom)
"B404", "B603", "B607", "B601", # subprocess — core to running external offensive tooling
"B501", # request without cert validation — targets self-signed / MITM scenarios
"B507", "B508", # ssh no host key / snmp v1-v2 — lateral movement to unknown hosts
"B608", # SQL string-build — reviewed: parameterized with whitelisted identifiers
"B406", # import xml — parsing offensive-tool output
]
[tool.mypy]
python_version = "3.11"
platform = "linux" # deterministic error set across hosts == the CI gate (ubuntu); keeps the mypy baseline portable
strict = true
ignore_missing_imports = true
plugins = ["pydantic.mypy"]
# Type-safety checks (None-safety, arg/return/attr compatibility, undefined names)
# stay strict — they catch real bugs. The annotation-completeness mandates below are
# relaxed: requiring an explicit annotation on every def/call/generic in a 130k-LOC
# codebase that predates typing is churn, not bug-finding. New code is still checked
# for correctness; it just isn't forced to annotate every parameter.
disallow_untyped_defs = false # no-untyped-def
disallow_incomplete_defs = false
disallow_untyped_calls = false # no-untyped-call
disallow_any_generics = false # type-arg (bare dict/list)
warn_return_any = false # no-any-return
[tool.pydantic-mypy]
init_forbid_extra = true
warn_required_dynamic_aliases = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
timeout = 15
testpaths = ["tests"]
addopts = "-v --tb=short"
markers = [
"live: marks tests that require real network access (deselect with '-m not live')",
"slow: marks tests that are slow (deselect with '-m not slow')",
]
# Coverage: pytest --cov=ares --cov-report=term-missing
[tool.coverage.run]
omit = ["tests/*", "*/migrations/*"]