-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathDockerfile
More file actions
108 lines (91 loc) · 3.71 KB
/
Dockerfile
File metadata and controls
108 lines (91 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# ============================================================
# EnumRust v2.3.0 - Multi-stage Docker Build
# All 19 external security tools pre-installed
# ============================================================
# Stage 1: Build Rust binaries
FROM rust:bookworm AS builder
WORKDIR /build
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy project files
COPY Cargo.toml Cargo.lock ./
COPY src/ src/
COPY dashboard-ui/ dashboard-ui/
# Build release binaries
RUN cargo build --release --bin enumrust --bin regen_report
# Install feroxbuster (Rust-based, build in builder stage)
RUN cargo install feroxbuster
# ============================================================
# Stage 2: Runtime with all security tools
# ============================================================
FROM debian:bookworm-slim AS runtime
LABEL maintainer="OFJAAAH <ofjaaah@users.noreply.github.com>"
LABEL description="EnumRust - Advanced Security Reconnaissance Tool"
LABEL version="2.3.0"
ENV DEBIAN_FRONTEND=noninteractive
ENV GOPATH=/root/go
ENV PATH="/root/go/bin:/usr/local/go/bin:${PATH}"
# Install system dependencies + apt-based tools
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
git \
masscan \
jq \
whois \
tmux \
wget \
curl \
libssl3 \
gcc \
libc6-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Go + all Go-based security tools + cleanup in single layer
RUN wget -q https://go.dev/dl/go1.24.4.linux-amd64.tar.gz -O /tmp/go.tar.gz \
&& tar -C /usr/local -xzf /tmp/go.tar.gz \
&& rm /tmp/go.tar.gz \
# Core tools
&& go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest \
&& go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@latest \
&& go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest \
# Discovery tools
&& go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest \
&& go install -v github.com/hakluke/haktrails@latest \
&& go install -v github.com/projectdiscovery/tlsx/cmd/tlsx@latest \
# Fuzzing
&& go install -v github.com/ffuf/ffuf/v2@latest \
# Utils
&& go install -v github.com/tomnomnom/anew@latest \
# Crawling tools
&& go install -v github.com/hakluke/hakrawler@latest \
&& go install -v github.com/projectdiscovery/urlfinder/cmd/urlfinder@latest \
&& go install -v github.com/projectdiscovery/katana/cmd/katana@latest \
&& go install -v github.com/lc/gau/v2/cmd/gau@latest \
&& go install -v github.com/tomnomnom/waybackurls@latest \
# Trufflehog (requires clone+build due to replace directives in go.mod)
&& git clone --depth 1 https://github.com/trufflesecurity/trufflehog.git /tmp/trufflehog \
&& cd /tmp/trufflehog \
&& go build -o /root/go/bin/trufflehog . \
&& rm -rf /tmp/trufflehog \
# Update nuclei templates
&& nuclei -ut || true \
# Clean up Go SDK, build cache, module cache, and gcc (only needed for katana CGO)
&& rm -rf /usr/local/go /root/go/pkg /root/go/src \
&& rm -rf /root/.cache/go-build \
&& apt-get purge -y gcc libc6-dev \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Copy binaries from builder
COPY --from=builder /build/target/release/enumrust /usr/local/bin/enumrust
COPY --from=builder /build/target/release/regen_report /usr/local/bin/regen_report
COPY --from=builder /usr/local/cargo/bin/feroxbuster /usr/local/bin/feroxbuster
# Copy wordlist
COPY src/words_and_files_top5000.txt /opt/enumrust/words_and_files_top5000.txt
# Copy dashboard UI
COPY dashboard-ui/ /opt/enumrust/dashboard-ui/
WORKDIR /results
# Dashboard port
EXPOSE 8080
ENTRYPOINT ["enumrust"]