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.

fix: classify kerberos clock skew as operator error

Mafifrizi5b1c1388eb19
diff --git a/ares/core/engine.py b/ares/core/engine.py
index 2ddfd65..82e7ba2 100644
--- a/ares/core/engine.py
+++ b/ares/core/engine.py
@@ -74,6 +74,11 @@ def normalize_module_outcome(
if findings:
return "confirmed_findings", f"{len(findings)} confirmed finding(s) returned."
+ if "krb_ap_err_skew" in str(error or "").lower() or "clock skew too great" in str(error or "").lower():
+ return (
+ "operator_error",
+ "Kerberos clock skew too great; sync the operator host and domain controller time, then rerun.",
+ )
if raw_outcome in MODULE_OUTCOMES:
if raw_message:
return raw_outcome, raw_message
@@ -171,6 +176,7 @@ class EngineModuleResult(BaseModel):
duration_ms: float = 0.0
outcome: str = ""
outcome_message: str = ""
+ operator_next_steps: list[str] = []
def model_post_init(self, __context: Any) -> None:
self.error = redact_error_message(self.error)
@@ -183,6 +189,10 @@ class EngineModuleResult(BaseModel):
)
self.outcome = self.outcome or outcome
self.outcome_message = self.outcome_message or message
+ if self.outcome == "operator_error" and "clock skew" in self.outcome_message.lower():
+ self.operator_next_steps = [
+ "Synchronize the operator host and domain controller clocks, then rerun the module."
+ ]
@property
def confirmed_findings(self) -> list[Finding]:
diff --git a/tests/unit/test_module_contracts.py b/tests/unit/test_module_contracts.py
index 30d32f7..934cbce 100644
--- a/tests/unit/test_module_contracts.py
+++ b/tests/unit/test_module_contracts.py
@@ -207,6 +207,11 @@ def test_engine_done_without_findings_has_explicit_outcome():
status=ModuleStatus.FAILED,
error="AD dependency 'impacket' is unavailable",
)
+ clock_skew = EngineModuleResult(
+ module_id="ad.kerberoast",
+ status=ModuleStatus.FAILED,
+ error="Kerberoast failed: Kerberos SessionError: KRB_AP_ERR_SKEW(Clock skew too great)",
+ )
secret_error = EngineModuleResult(
module_id="ad.kerberoast",
status=ModuleStatus.FAILED,
@@ -215,6 +220,11 @@ def test_engine_done_without_findings_has_explicit_outcome():
assert invalid.outcome == "operator_error"
assert timeout.outcome == "network_error"
assert dependency.outcome == "dependency_error"
+ assert clock_skew.outcome == "operator_error"
+ assert clock_skew.outcome_message == (
+ "Kerberos clock skew too great; sync the operator host and domain controller time, then rerun."
+ )
+ assert clock_skew.operator_next_steps
assert "Passw0rd!" not in (secret_error.error or "")
assert "secret-token" not in (secret_error.error or "")