A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
Fixed to_ssl enricher to use httpX Docker Tool
z3rodaycvef79403d361fc
diff --git a/flowsint-api/Dockerfile b/flowsint-api/Dockerfileindex cdf8fd2f..c23f8b9b 100644--- a/flowsint-api/Dockerfile+++ b/flowsint-api/Dockerfile@@ -46,11 +46,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \curl \&& rm -rf /var/lib/apt/lists/*-# Install httpX for 'to_ssl' enricher-RUN apt-get update && apt-get install -y golang-go-RUN rm -f /app/.venv/bin/httpx || true-RUN go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest-WORKDIR /app# Copy virtual environment from builder@@ -94,11 +89,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \&& rm -rf /var/lib/apt/lists/* \&& apt-get clean-# Install httpX for 'to_ssl' enricher-RUN apt-get update && apt-get install -y golang-go-RUN rm -f /app/.venv/bin/httpx || true-RUN go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest-# Create non-root userRUN groupadd -g 1001 flowsint && \useradd -u 1001 -g flowsint -s /bin/bash -m flowsintdiff --git a/flowsint-enrichers/src/flowsint_enrichers/domain/to_ssl.py b/flowsint-enrichers/src/flowsint_enrichers/domain/to_ssl.pyindex 3dfd4713..d52d7e56 100644--- a/flowsint-enrichers/src/flowsint_enrichers/domain/to_ssl.py+++ b/flowsint-enrichers/src/flowsint_enrichers/domain/to_ssl.py@@ -1,7 +1,6 @@import jsonimport osimport requests-import subprocessfrom typing import Any, Dict, List, Optionalfrom flowsint_core.core.enricher_base import Enricher@@ -11,6 +10,9 @@ from flowsint_types.website import Websitefrom flowsint_core.core.logger import Loggerfrom flowsint_types.address import Location+from tools.network.httpx import HttpxTool++@flowsint_enricherclass DomainToTLS(Enricher):"""[httpX] Get TLS information from a domain."""@@ -38,31 +40,24 @@ class DomainToTLS(Enricher):async def scan(self, data: List[InputType]) -> List[OutputType]:results: List[OutputType] = []+ Logger.info(self.sketch_id, f"(DomainToTLS) Received {len(data)} inputs")for domain in data:- Logger.info(self.sketch_id, f"(DomainToTLS) Received {len(data)} inputs")try:- httpx_process = subprocess.Popen(- ["/root/go/bin/httpx", "-tls-grab", "-json", "-silent"],- stdin=subprocess.PIPE,- stdout=subprocess.PIPE,- stderr=subprocess.PIPE,- text=True+ tool = HttpxTool()+ httpx_results = tool.launch(+ target=domain.domain,+ args=["-tls-probe"])- stdout, stderr = httpx_process.communicate(f'{domain.domain}\n')-- if not stdout.strip():+ if not httpx_results :Logger.error(None, {"message": f"(DomainToTLS) No results for the domain '{domain.domain}'"})continueelse:- for line in stdout.splitlines():- if line.strip():- tlsdata = json.loads(line)-- web_url = tlsdata.get("url")- web_title = tlsdata.get("title")- web_content_type = tlsdata.get("content_type")- web_statuscode = tlsdata.get("status_code") # status_code is int+ for r_line in httpx_results :+ web_url = r_line.get("url")+ web_title = r_line.get("title")+ web_content_type = r_line.get("content_type")+ web_statuscode = r_line.get("status_code") # status_code is intresults.append(Website(