CloverSec-CTF-Build-Dockerizer
Audited by Socket on Mar 9, 2026
9 alerts found:
Obfuscated Filex6Securityx2AnomalyThe script is a legitimate smoke-test harness but embodies a significant supply-chain risk: it builds and runs untrusted example code inside Docker and executes example-provided shell scripts on the host. If examples are not fully trusted, this harness can lead to arbitrary code execution on the host (via smoke_assert.sh/check scripts) and arbitrary actions in containers (via Dockerfile and start.sh). Recommended: only run this against trusted example sets, add explicit warnings, avoid executing example-supplied host scripts without review or run them in a confined sandbox, and consider using user namespace remapping, buildkit rootless builds, or dedicated ephemeral test environments to reduce blast radius.
The script is not overtly malicious, but it contains insecure operational defaults and patterns that pose meaningful security risks: starting sshd inside the container, presence of hardcoded ttyd credentials (even if currently disabled), use of bash -lc to exec a command string, and critically launching Redis with --protected-mode no --bind 0.0.0.0 which enables unauthenticated remote access. These are configuration/operational vulnerabilities that could lead to compromise if deployed in a networked environment. Remediation: avoid running sshd in containers unless necessary and secure it; remove hardcoded credentials; enable Redis protected mode or bind to localhost and require authentication/firewalling; avoid shell interpolation of externally-controlled START_CMD (use exec with explicit argv when possible); restrict log access and consider log rotation.
No direct evidence of malware (no networking, no obfuscation, no credential exfiltration). However, the installer script is a potential supply-chain risk: it will copy and overwrite any files from patch/src into TARGET_DIR (default /app) and honors an environment variable to change TARGET_DIR. When executed with elevated privileges or in CI/build contexts where PATCH_SRC may be controlled by an untrusted party, this enables arbitrary file replacement and can be abused to introduce malicious files or backdoors. Recommended actions: restrict who can provide patch/src artifacts, require signed/verified patches, restrict or validate PATCH_TARGET_DIR (avoid allowing / or system dirs), run as an unprivileged user, add backups and logging, and consider atomic deployment patterns.
No explicit malware or covert exfiltration found. The primary security issues are operational: default-enabled network-accessible interactive shells (sshd and ttyd), hardcoded weak credentials (ctf:123456) exposed in cleartext and process arguments, and the creation/exposure of /flag (chmod 444). These factors create an easy path to full container compromise and data exposure. Remediation recommendations: remove or require explicit opt-in to start network shells; eliminate hardcoded credentials (use ephemeral secrets or platform-managed auth), avoid writing credentials to command-line arguments, restrict listeners to localhost or internal networks, do not set world-readable permissions on sensitive files, and log securely. Treat this image as high operational risk outside a controlled CTF environment.
The manifest itself is not obfuscated and does not contain code snippets that are directly malicious, but it enables high-risk functionality: password-authenticated SSH and a web terminal (ttyd) exposed via network ports, plus an obvious hardcoded weak password ("123456"). That combination allows remote interactive shell access and therefore a straightforward path to compromise if this image/config is used in an environment accessible to untrusted users. Treat this as a security risk requiring remediation (remove hardcoded credentials, disable password auth, limit or disable ttyd, restrict port exposure, inspect start.sh and check/check.sh).
This manifest config is not itself obfuscated or directly malicious code, but it configures the container to run multiple remote-access services with weak credentials (hardcoded ctf_password="123456") and a web terminal (ttyd) that spawns /bin/bash. Those settings create a high-risk runtime environment that can be trivially abused for unauthorized access and data exfiltration. If this package were distributed publicly or used in production, it would present a significant security risk. For a CTF/private environment these choices may be intentional, but they must be isolated from public networks. Review the startup scripts (/start.sh) and any runtime package installs to ensure no additional supply-chain downloads occur.
The script is a container entrypoint intended for CTF/SecOps deployment: it ensures a readable /flag and starts sshd and ttyd to provide remote shell access, then runs nginx. I find no obfuscated or directly malicious code (no backdoor/exfiltration routines), but it contains insecure defaults (hardcoded weak ttyd password) and intentionally exposes interactive shells which is a significant security risk if the container is network-accessible. Use only in controlled/trusted CTF environments; do not use in production without securing or removing sshd/ttyd and replacing hardcoded credentials.
This script is not an obfuscated downloader or typical malware payload, but it intentionally creates an insecure configuration: it exposes SSH and a web terminal with hardcoded credentials and executes the main service via a shell evaluation. In a supply-chain context this is dangerous because consumers of the image may receive an image with an easy-to-use backdoor-like access. Remediation: remove or disable sshd/ttyd in production images, avoid hardcoded credentials, bind helper services to localhost or use network policies, require keys and rotated secrets, and avoid eval-style exec of untrusted START_CMD. Treat this package as high operational risk until hardened.
This file is a legitimate CTF container startup script but contains multiple security risks if inputs are untrusted: deliberate exposure of /flag (copied and made world-readable), unsanitized use of ctf.xinetd fields to build commands (command injection risk), and writing user-provided xinetd config to /etc/xinetd.d (system config tampering). In a properly isolated CTF execution environment these are expected trade-offs; outside that threat model the script should not be used without hardening (sanitize parsed fields, avoid sh -lc, restrict writable/configurable paths, avoid world-readable secrets, and run service binaries with least privilege).