diff --git a/Dockerfile-cve-2018-15473 b/Dockerfile-cve-2018-15473 new file mode 100644 index 0000000..813119e --- /dev/null +++ b/Dockerfile-cve-2018-15473 @@ -0,0 +1,22 @@ +# Use the official Python image from the Docker Hub +FROM python:3.9 + +# Install system dependencies +RUN apt-get update && apt-get install -y libffi-dev gcc + +# Set the working directory in the container +WORKDIR /app + +# Copy the requirements file into the container at /app +COPY requirements.txt . +COPY users.txt . + +# Install the dependencies +RUN pip install --no-cache-dir -r requirements.txt + +# Copy the script into the container at /app +COPY ssh-username-enum.py . + +# Run the script when the container launches +CMD ["python", "ssh-username-enum.py"] + diff --git a/Dockerfile-openssh b/Dockerfile-openssh new file mode 100644 index 0000000..f44c6de --- /dev/null +++ b/Dockerfile-openssh @@ -0,0 +1,43 @@ +# Use Debian Jessie as the base image +FROM debian:jessie + +# Disable GPG signature checking and update repositories to archived versions +RUN echo 'Acquire::Check-Valid-Until "false";' >> /etc/apt/apt.conf.d/10no-check-valid-until && \ + echo 'Acquire::AllowInsecureRepositories "true";' >> /etc/apt/apt.conf.d/10allow-insecure && \ + sed -i 's/http:\/\/deb.debian.org\/debian/http:\/\/archive.debian.org\/debian/g' /etc/apt/sources.list && \ + sed -i 's/http:\/\/security.debian.org\/debian-security/http:\/\/archive.debian.org\/debian-security/g' /etc/apt/sources.list && \ + sed -i '/jessie-updates/d' /etc/apt/sources.list + +# Update packages and install necessary dependencies +RUN apt-get update && \ + apt-get install -y --force-yes wget build-essential zlib1g-dev libssl-dev libpam0g-dev openssh-client + +# Download and compile OpenSSH version 7.7 +RUN wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.7p1.tar.gz && \ + tar xzf openssh-7.7p1.tar.gz && \ + cd openssh-7.7p1 && \ + ./configure --with-md5-passwords --with-privsep-path=/var/lib/sshd && \ + make && make install + +# Create a user and group for SSHD privilege separation +RUN groupadd sshd && \ + useradd -g sshd -c 'sshd privsep' -d /var/lib/sshd -s /bin/false sshd + +# Create the user 'cyberaguiar' +RUN useradd -m cyberaguiar + +# Generate a random password and set it for the user 'cyberaguiar' +RUN echo "cyberaguiar:$(tr -dc A-Za-z0-9