diff --git a/cybersecurity/offensive/information-gathering/gowitness.Dockerfile b/cybersecurity/offensive/information-gathering/gowitness.Dockerfile new file mode 100644 index 0000000..c8c4cde --- /dev/null +++ b/cybersecurity/offensive/information-gathering/gowitness.Dockerfile @@ -0,0 +1,42 @@ +FROM golang:1-bookworm AS build + +# Install build dependencies +RUN apt-get update && apt-get install -y \ + git \ + npm \ + && rm -rf /var/lib/apt/lists/* + +# Clone and build gowitness +RUN git clone https://github.com/sensepost/gowitness.git /src +WORKDIR /src + +# Build frontend and backend +RUN cd web/ui && \ + npm install && \ + npm run build && \ + cd ../.. + +RUN go install github.com/swaggo/swag/cmd/swag@latest && \ + swag i --exclude ./web/ui --output web/docs && \ + CGO_ENABLED=0 go build -v -trimpath -ldflags="-s -w" -o gowitness + +FROM debian:bookworm-slim + +# Install Chromium and other dependencies +RUN apt-get update && apt-get install -y \ + ca-certificates \ + chromium \ + chromium-driver \ + dumb-init \ + && rm -rf /var/lib/apt/lists/* + +# Copy built binary from build stage +COPY --from=build /src/gowitness /usr/local/bin/gowitness + +# Set Chrome path for gowitness +ENV CHROME_PATH=/usr/bin/chromium + +VOLUME ["/screenshots"] +WORKDIR /screenshots + +ENTRYPOINT ["dumb-init", "--", "gowitness"] \ No newline at end of file diff --git a/cybersecurity/offensive/information-gathering/gowitness.yml b/cybersecurity/offensive/information-gathering/gowitness.yml new file mode 100644 index 0000000..956ecd2 --- /dev/null +++ b/cybersecurity/offensive/information-gathering/gowitness.yml @@ -0,0 +1,33 @@ +description: > + Gowitness is a website screenshot utility written in Go that uses Chrome's rendering engine to capture web interface screenshots during reconnaissance. + +functions: + gowitness_single: + description: Capture a screenshot of a single URL. + parameters: + target: + type: string + description: The URL to capture. + examples: + - https://example.com + + container: + platform: linux/amd64 + build: + path: ${cwd}/gowitness.Dockerfile + name: gowitness_local + args: + - --net=host + volumes: + - ${cwd}/screenshots:/screenshots + + cmdline: + - gowitness + - scan + - single + - --url + - ${target} + - --screenshot-path + - /screenshots + - --write-jsonl + - --write-screenshots