Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8a751f8
feat: add attestation registry submission in redmesh close flow
aledefra Mar 5, 2026
49ba492
fix: add execution_id to attestation
aledefra Mar 5, 2026
49470ba
Add RedMesh job-start attestation submission flow
aledefra Mar 5, 2026
cec6ccb
fix: set up private key in plugin config
Mar 6, 2026
df6d71e
fix: pass history read
Mar 6, 2026
3f21169
fix: add loggign for attestation
Mar 6, 2026
2c9a55f
feat: user can configure the count of scanning threads on UI
Mar 6, 2026
1538b87
feat: add data models package
Mar 7, 2026
3e95688
feat: keep jo config in r1fs
Mar 7, 2026
f7d913b
feat: single aggregation + consolidated pass report (phase 2)
Mar 7, 2026
22f6863
feat: job archive & UI Aggregate (phase 3-4)
Mar 7, 2026
baf3559
feat: fix backend endpoints to work with new cstore structure (phase 5)
Mar 7, 2026
296b498
fix: use constants everywhere in API (phase 11)
Mar 7, 2026
fd0601c
feat: live worker progress endpoints and methods (phase 1)
Mar 7, 2026
a97eb46
feat: job deletion & purge (phase 15)
Mar 8, 2026
051210f
fix: listing endpoint optimization (phase 15)
Mar 8, 2026
88e572c
feat: scan metrics collection (phase 16a)
Mar 8, 2026
c1647bd
feat: scan metrics aggregation at node level (phase 16b)
Mar 8, 2026
a808a4d
fix: metrics visualization improvements
Mar 8, 2026
a56cddd
fix: scan profile simplification
Mar 8, 2026
282c0c2
fix: redmesh test
Mar 8, 2026
c521243
fix: service tests
Mar 8, 2026
054d768
fix: improve web tests | add cms fingerprinting
Mar 8, 2026
c641cba
feat: add OWASP-10 identification
Mar 8, 2026
cd26957
feat: add erlang_ssh & dns bind to cve db
Mar 8, 2026
d14525c
fix: CVEs for databases
Mar 8, 2026
eb672df
fix: CVEs for CMS & Frameworks
Mar 8, 2026
9e4b256
fix: tests CVEs for CMS & Frameworks
Mar 8, 2026
8e529c8
fix: Java applications & servers
Mar 8, 2026
c4cb4ed
fix: detected services count calculation
Mar 8, 2026
0adc52d
fix: add jetty | fix CVE findings
Mar 9, 2026
ed2a87f
Merge remote-tracking branch 'origin/develop' into feat-pack-1
Mar 9, 2026
9805058
fix: use running env port for signaling plugin readiness
toderian Mar 9, 2026
2955d66
feat: job hard stop
Mar 9, 2026
d85f65b
fix: job stop
Mar 9, 2026
5322c5f
fix: PoT
Mar 9, 2026
e9b8323
feat: add scanner nodes ips to the report
Mar 9, 2026
de40765
feat: display thread-level ports info and stats
Mar 9, 2026
27e93a0
Merge remote-tracking branch 'origin/develop' into feat-pack-1
toderian Mar 10, 2026
1a17749
fix: increase job check timeout
Mar 10, 2026
6bb084b
feat: improve per-worker progress loader. Display per-thread status
Mar 10, 2026
fd0e08d
fix: tests classification
Mar 10, 2026
90a38a8
fix: move metrix collector to a separate file
Mar 10, 2026
ec70251
refactor: rename redmesh_utils to pentester_worker
Mar 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 85 additions & 8 deletions extensions/business/cybersec/red_mesh/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,24 @@
"_service_info_elasticsearch",
"_service_info_memcached",
"_service_info_mongodb",
"_service_info_modbus"
"_service_info_modbus",
"_service_info_couchdb",
"_service_info_influxdb"
]
},
{
"id": "web_discovery",
"label": "Discovery",
"description": "Enumerate exposed files, admin panels, homepage secrets, tech fingerprinting, and VPN endpoints (OWASP WSTG-INFO).",
"category": "web",
"methods": ["_web_test_common", "_web_test_homepage", "_web_test_tech_fingerprint", "_web_test_vpn_endpoints"]
"methods": ["_web_test_common", "_web_test_homepage", "_web_test_tech_fingerprint", "_web_test_vpn_endpoints", "_web_test_cms_fingerprint", "_web_test_verbose_errors", "_web_test_java_servers"]
},
{
"id": "web_hardening",
"label": "Hardening audit",
"description": "Audit cookie flags, security headers, CORS policy, redirect handling, and HTTP methods (OWASP WSTG-CONF).",
"description": "Audit cookie flags, security headers, CORS policy, CSRF tokens, and HTTP methods (OWASP WSTG-CONF).",
"category": "web",
"methods": ["_web_test_flags", "_web_test_security_headers", "_web_test_cors_misconfiguration", "_web_test_open_redirect", "_web_test_http_methods"]
"methods": ["_web_test_flags", "_web_test_security_headers", "_web_test_cors_misconfiguration", "_web_test_http_methods", "_web_test_csrf"]
},
{
"id": "web_api_exposure",
Expand All @@ -67,16 +69,30 @@
{
"id": "web_injection",
"label": "Injection probes",
"description": "Non-destructive probes for path traversal, reflected XSS, and SQL injection (OWASP WSTG-INPV).",
"description": "Non-destructive probes for path traversal, reflected XSS, SQL injection, SSRF, and open redirect (OWASP WSTG-INPV).",
"category": "web",
"methods": ["_web_test_path_traversal", "_web_test_xss", "_web_test_sql_injection"]
"methods": ["_web_test_path_traversal", "_web_test_xss", "_web_test_sql_injection", "_web_test_ssti", "_web_test_shellshock", "_web_test_php_cgi", "_web_test_ognl_injection", "_web_test_java_deserialization", "_web_test_spring_actuator", "_web_test_open_redirect", "_web_test_ssrf_basic"]
},
{
"id": "web_auth_design",
"label": "Authentication & design flaws",
"description": "Detect account enumeration, missing rate limiting, and IDOR indicators (OWASP A04).",
"category": "web",
"methods": ["_web_test_account_enumeration", "_web_test_rate_limiting", "_web_test_idor_indicators"]
},
{
"id": "web_integrity",
"label": "Software integrity",
"description": "Check subresource integrity, mixed content, and client-side library versions (OWASP A08).",
"category": "web",
"methods": ["_web_test_subresource_integrity", "_web_test_mixed_content", "_web_test_js_library_versions"]
},
{
"id": "active_auth",
"label": "Credential testing",
"description": "Test default/weak credentials on database and remote access services. May trigger account lockout.",
"category": "service",
"methods": ["_service_info_mysql_creds", "_service_info_postgresql_creds"]
"methods": ["_service_info_mysql_creds", "_service_info_postgresql_creds", "_service_info_http_basic_auth"]
},
{
"id": "post_scan_correlation",
Expand All @@ -89,6 +105,9 @@

# Job status constants
JOB_STATUS_RUNNING = "RUNNING"
JOB_STATUS_COLLECTING = "COLLECTING" # Launcher merging worker reports
JOB_STATUS_ANALYZING = "ANALYZING" # Running LLM analysis
JOB_STATUS_FINALIZING = "FINALIZING" # Computing risk, writing archive
JOB_STATUS_SCHEDULED_FOR_STOP = "SCHEDULED_FOR_STOP"
JOB_STATUS_STOPPED = "STOPPED"
JOB_STATUS_FINALIZED = "FINALIZED"
Expand Down Expand Up @@ -169,11 +188,47 @@
"_service_info_modbus": frozenset({"modbus"}),
"_service_info_wins": frozenset({"wins", "nbns"}),
"_service_info_rsync": frozenset({"rsync"}),
"_service_info_couchdb": frozenset({"http", "https"}),
"_service_info_influxdb": frozenset({"http", "https"}),
"_service_info_generic": frozenset({"unknown"}),
"_service_info_mysql_creds": frozenset({"mysql"}),
"_service_info_postgresql_creds": frozenset({"postgresql"}),
"_service_info_http_basic_auth": frozenset({"http", "https"}),
# OWASP full coverage probes
"_web_test_ssrf_basic": frozenset({"http", "https"}),
"_web_test_account_enumeration": frozenset({"http", "https"}),
"_web_test_rate_limiting": frozenset({"http", "https"}),
"_web_test_idor_indicators": frozenset({"http", "https"}),
"_web_test_subresource_integrity": frozenset({"http", "https"}),
"_web_test_mixed_content": frozenset({"http", "https"}),
"_web_test_js_library_versions": frozenset({"http", "https"}),
"_web_test_verbose_errors": frozenset({"http", "https"}),
"_web_test_java_servers": frozenset({"http", "https"}),
"_web_test_ognl_injection": frozenset({"http", "https"}),
"_web_test_java_deserialization": frozenset({"http", "https"}),
"_web_test_spring_actuator": frozenset({"http", "https"}),
}

# =====================================================================
# Local worker threads per node
# =====================================================================

LOCAL_WORKERS_MIN = 1
LOCAL_WORKERS_MAX = 16
LOCAL_WORKERS_DEFAULT = 2

# =====================================================================
# Port lists
# =====================================================================

COMMON_PORTS = [
21, 22, 23, 25, 53, 80, 110, 143, 161, 443, 445,
502, 1433, 1521, 27017, 3306, 3389, 5432, 5900,
8080, 8443, 9200, 11211
]

ALL_PORTS = list(range(1, 65536))

# =====================================================================
# Risk score computation
# =====================================================================
Expand All @@ -182,4 +237,26 @@
RISK_CONFIDENCE_MULTIPLIERS = {"certain": 1.0, "firm": 0.8, "tentative": 0.5}
RISK_SIGMOID_K = 0.02
RISK_CRED_PENALTY_PER = 15
RISK_CRED_PENALTY_CAP = 30
RISK_CRED_PENALTY_CAP = 30

# =====================================================================
# Job archive
# =====================================================================

JOB_ARCHIVE_VERSION = 1
MAX_CONTINUOUS_PASSES = 100

# =====================================================================
# Live progress publishing
# =====================================================================

PROGRESS_PUBLISH_INTERVAL = 10 # seconds between progress updates to CStore

# Scan phases in execution order (5 phases total)
PHASE_ORDER = ["port_scan", "fingerprint", "service_probes", "web_tests", "correlation"]
PHASE_MARKERS = {
"fingerprint": "fingerprint_completed",
"service_probes": "service_info_completed",
"web_tests": "web_tests_completed",
"correlation": "correlation_completed",
}
54 changes: 46 additions & 8 deletions extensions/business/cybersec/red_mesh/correlation_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,19 @@ class _CorrelationMixin:

def _post_scan_correlate(self):
"""Entry point: run all correlation checks and store findings."""
findings = []

# Scan-metadata-dependent correlations
meta = self.state.get("scan_metadata")
if not meta:
return
if meta:
findings += self._correlate_port_ratio()
findings += self._correlate_os_consistency()
findings += self._correlate_infrastructure_leak()
findings += self._correlate_tls_consistency()
findings += self._correlate_timezone_drift()

findings = []
findings += self._correlate_port_ratio()
findings += self._correlate_os_consistency()
findings += self._correlate_infrastructure_leak()
findings += self._correlate_tls_consistency()
findings += self._correlate_timezone_drift()
# Cross-probe correlations (don't require scan_metadata)
findings += self._correlate_redirect_ssrf()

if findings:
self.P(f"Correlation engine produced {len(findings)} findings.")
Expand Down Expand Up @@ -211,3 +214,38 @@ def _correlate_timezone_drift(self):
confidence="firm",
))
return findings

def _correlate_redirect_ssrf(self):
"""Flag SSRF chaining risk if open redirect + internal services detected."""
findings = []
web_info = self.state.get("web_tests_info", {})

has_open_redirect = False
has_metadata = False

for port_data in web_info.values():
for probe_name, result in port_data.items():
if not isinstance(result, dict):
continue
for f in result.get("findings", []):
title = f.get("title", "") if isinstance(f, dict) else ""
if "open redirect" in title.lower():
has_open_redirect = True
if "metadata" in title.lower() and "exposed" in title.lower():
has_metadata = True

if has_open_redirect and has_metadata:
findings.append(Finding(
severity=Severity.MEDIUM,
title="Open redirect may enable SSRF to cloud metadata",
description="An open redirect was found alongside accessible cloud metadata "
"endpoints. If internal services follow redirects, an attacker "
"can chain the redirect to access metadata credentials.",
evidence="Open redirect + cloud metadata endpoint both detected.",
remediation="Fix the open redirect; ensure internal HTTP clients do not follow "
"redirects to metadata IPs.",
owasp_id="A10:2021",
cwe_id="CWE-918",
confidence="tentative",
))
return findings
Loading