From 4d991e361f722a555aae963a806562ded881e452 Mon Sep 17 00:00:00 2001 From: Ads Dawson <104169244+GangGreenTemperTatum@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:24:08 -0500 Subject: [PATCH] feature: example for reaper --- .../web-exploitation/reaper.Dockerfile | 34 +++++++++ .../offensive/web-exploitation/reaper.yml | 73 +++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 cybersecurity/offensive/web-exploitation/reaper.Dockerfile create mode 100644 cybersecurity/offensive/web-exploitation/reaper.yml diff --git a/cybersecurity/offensive/web-exploitation/reaper.Dockerfile b/cybersecurity/offensive/web-exploitation/reaper.Dockerfile new file mode 100644 index 0000000..25fb6f2 --- /dev/null +++ b/cybersecurity/offensive/web-exploitation/reaper.Dockerfile @@ -0,0 +1,34 @@ +# reaper.Dockerfile +# Git clone stage +FROM alpine:latest AS source +RUN apk add --no-cache git +WORKDIR /src +RUN git clone https://github.com/ghostsecurity/reaper.git . || exit 1 + +# Build stage +FROM golang:1.21-alpine AS builder +WORKDIR /build +COPY --from=source /src . + +# Set Go build flags +ENV CGO_ENABLED=0 \ + GOOS=linux \ + GOARCH=amd64 \ + GO111MODULE=on + +# Build optimized binary +RUN go mod download && \ + go build -ldflags="-w -s" -o reaper cmd/reaper/main.go + +# Final stage +FROM gcr.io/distroless/static-debian12:nonroot +WORKDIR /app + +# Copy binary and config +COPY --from=builder /build/reaper /app/ +COPY --from=builder /build/config /app/config + +USER nonroot:nonroot +EXPOSE 8080 + +ENTRYPOINT ["/app/reaper"] \ No newline at end of file diff --git a/cybersecurity/offensive/web-exploitation/reaper.yml b/cybersecurity/offensive/web-exploitation/reaper.yml new file mode 100644 index 0000000..e03b225 --- /dev/null +++ b/cybersecurity/offensive/web-exploitation/reaper.yml @@ -0,0 +1,73 @@ +# reaper.yml +description: > + Reaper is a high-performance network scanning tool designed for efficient service + discovery and asset management. It provides fast and accurate network reconnaissance + capabilities with modern architecture. + +functions: + reaper_default_scan: + description: Perform a default network scan + parameters: + target: + type: string + description: The target IP address or CIDR range to scan + examples: + - 192.168.1.1 + - 10.0.0.0/24 + - 127.0.0.1 + ports: + type: string + description: Port range to scan + default: "1-1000" + examples: + - "80,443" + - "1-65535" + + container: + build: + path: ${cwd}/reaper.Dockerfile + name: reaper_local + args: + - --net=host + volumes: + - ${cwd}:/data + + cmdline: + - /app/reaper + - scan + - ${target} + - -p + - ${ports} + + reaper_full_scan: + description: Perform comprehensive network scan + parameters: + target: + type: string + description: The target IP address or CIDR range + ports: + type: string + description: Port range to scan + default: "1-65535" + threads: + type: integer + description: Number of concurrent threads + default: 1000 + + container: + build: + path: ${cwd}/reaper.Dockerfile + name: reaper_local + args: + - --net=host + volumes: + - ${cwd}:/data + + cmdline: + - /app/reaper + - scan + - ${target} + - -p + - ${ports} + - -t + - ${threads}