1N3 / Sn1per

Attack Surface Management Platform
https://sn1persecurity.com
Other
8.06k stars 1.85k forks source link

docker image missing packages #55

Closed pbullian closed 7 years ago

pbullian commented 7 years ago

I found that hexdump is missing in the docker image, I suggest to add bsdmainutils into the dockerfile. Also I added rm -rf /var/lib/apt/lists/* at the end of the install.

There is also an issue with files being written in /usr/share/sniper/loot/ , that should be mounted at runtime to a persistent local folder, if not the image will erase itself at the end. (--rm). And I think it would be better if the entrypoint is sniper itself. that way it could be called as:

docker run --rm -v $HOME/sniper/loot/:/usr/share/sniper/loot/ -ti menzo/sn1per-docker DOMAIN

(-v to mount a local directory)

and the dockerfile:

FROM ubuntu:16.04
MAINTAINER menzo@menzo.io

ENV LC_ALL C.UTF-8
ENV INSTALL_DIR /usr/share/sniper
ENV LOOT_DIR /usr/share/sniper/loot
ENV PLUGINS_DIR /usr/share/sniper/plugins

RUN echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" >> /etc/apt/sources.list.d/kali.sources.list && \
    gpg --keyserver pgpkeys.mit.edu --recv-key  ED444FF07D8D0BF6 && \
    gpg -a --export ED444FF07D8D0BF6 | apt-key add -
RUN apt-get update && apt-get install -y \
    ruby \
    rubygems \
    python \
    dos2unix \
    zenmap \
    sslyze \
    uniscan \
    xprobe2 \
    cutycapt \
    unicornscan \
    waffit \
    host \
    whois \
    dirb \
    dnsrecon \
    curl \
    nmap \
    php \
    php-curl \
    hydra \
    iceweasel \
    wpscan \
    sqlmap \
    nbtscan \
    enum4linux \
    cisco-torch \
    metasploit-framework \
    theharvester \
    dnsenum \
    nikto \
    smtp-user-enum \
    whatweb \
    dnsutils \
    sslscan \
    amap \
    arachni \
        bsdmainutils \
    && apt-get clean && \
        rm -rf /var/lib/apt/lists/* && \
    mv /usr/bin/python /usr/bin/python.unknown && \
    ln -s /usr/bin/python2.7 /usr/bin/python && \
    curl https://bootstrap.pypa.io/get-pip.py | python && \
    gem install  \
        mechanize \
        bcrypt \
        net-http-persistent \
        rake \
        ruby-nmap \
        text-table && \
    pip install  \
        colorama \
        dnspython \
        ipaddress \
        tldextract \
        urllib3 && \
    git clone https://github.com/1N3/Sn1per.git && \
    cd Sn1per && \
    /bin/bash ./install.sh && \
    echo Cleaning up package index && \
    apt-get clean && \
    echo Image creation complete

CMD /usr/bin/sniper

Great tool!

menzow commented 7 years ago

Hey @pbullian thanks for your contribution. A new build will be available from docker in a few hours.

Btw if you have another contribution, you can also create an issue or create a merge request directly at https://github.com/menzow/sn1per-docker/ .

1N3 commented 7 years ago

This should be fixed now but feel free to re-open if the issue still exists.