Closed JaanusR closed 6 years ago
Uops!
You're right: The README
file is wrong.
You have to build
and then run.
Please do the following:
git clone https://github.com/joanbono/Snorter
cd Snorter/src
docker build SnorterDock/
docker run SnorterDock -p 80:80 -e OINKCODE=<oinkcode> -e INTERFACE=<interface>
So, you pass the args with the run
option instead of the build
option.
Test it and let me know π
I still ending up in infinite loop. Wonder why is that happening? Shouldn't there be some kind of prompt or something?
And at least INTERFACe ENV variable should be passed on my command line otherwise build fail because of it runs Snorter.sh with this parameter and this is mandatory field.
I'll take an eye on this in few days.
Stay tuned π
Im getting the feeling that this shell script doesn't work on latest kali linux. Im getting a lot of "command not found" errors.
It's possible, maybe it's better to change the base distro to debian
instead ?
worth to try :)
I just paste all the command issues here:
./src/Snorter.sh: line 57: sudo: command not found
./src/Snorter.sh: line 58: sudo: command not found
./src/Snorter.sh: line 62: sudo: command not found
./src/Snorter.sh: line 63: sudo: command not found
./src/Snorter.sh: line 80: sudo: command not found
./src/Snorter.sh: line 83: sudo: command not found
./src/Snorter.sh: line 103: sudo: command not found
./src/Snorter.sh: line 107: sudo: command not found
./src/Snorter.sh: line 108: /etc/snort/rules/local.rules: No such file or directory
./src/Snorter.sh: line 111: sudo: command not found
./src/Snorter.sh: line 119: sudo: command not found
./src/Snorter.sh: line 148: sudo: command not found
./src/Snorter.sh: line 154: killall: command not found
./src/Snorter.sh: line 194: autoreconf: command not found
./src/Snorter.sh: line 201: ./configure: No such file or directory
./src/Snorter.sh: line 208: make: command not found
./src/Snorter.sh: line 209: sudo: command not found
./src/Snorter.sh: line 226: mysql: command not found
./src/Snorter.sh: line 227: mysql: command not found
./src/Snorter.sh: line 228: mysql: command not found
./src/Snorter.sh: line 230: /etc/snort/barnyard2.conf: No such file or directory
./src/Snorter.sh: line 231: sudo: command not found
./src/Snorter.sh: line 232: sudo: command not found
./src/Snorter.sh: line 234: barnyard2: command not found
./src/Snorter.sh: line 265: sudo: command not found
./src/Snorter.sh: line 279: sudo: command not found
./src/Snorter.sh: line 280: sudo: command not found
./src/Snorter.sh: line 281: sudo: command not found
./src/Snorter.sh: line 283: sudo: command not found
./src/Snorter.sh: line 299: sudo: command not found
./src/Snorter.sh: line 314: sudo: command not found
./src/Snorter.sh: line 315: sudo: command not found
./src/Snorter.sh: line 316: sudo: command not found
./src/Snorter.sh: line 317: sudo: command not found
./src/Snorter.sh: line 318: sudo: command not found
./src/Snorter.sh: line 319: sudo: command not found
./src/Snorter.sh: line 320: sudo: command not found
./src/Snorter.sh: line 322: sudo: command not found
./src/Snorter.sh: line 344: sudo: command not found
./src/Snorter.sh: line 413: sudo: command not found
./src/Snorter.sh: line 356: sudo: command not found
./src/Snorter.sh: line 454: sudo: command not found
./src/Snorter.sh: line 490: /etc/snort/snort.conf: No such file or directory
ls: cannot access '/etc/snort/rules/emerging-*.rules': No such file or directory
./src/Snorter.sh: line 494: /etc/snort/snort.conf: No such file or directory
./src/Snorter.sh: line 495: sudo: command not found
./src/Snorter.sh: line 516: sudo: command not found
I tried debian base image
Hi @JaanusR
Please, add this line to the DOCKERFILE (the RUN sed -i "s/sudo //g" /opt/Snorter/src/Snorter.sh
) as follows
#Kali docker with SNORT + BARNYARD2 + PULLEDPORK
#Version 0.1.0
From debian:latest:latest
MAINTAINER Joan Bono <@joan_bono>
ENV OINKCODE
ENV INTERFACE
RUN apt-get update && apt-get upgrade -y && apt-get install -y git curl wget
RUN git clone https://github.com/joanbono/Snorter.git /opt/Snorter
RUN sed -i "s/sudo //g" /opt/Snorter/src/Snorter.sh
RUN /opt/Snorter/src/Snorter.sh -o ${OINKCODE} -i ${INTERFACE}
USER root
WORKDIR /opt/Snorter
Well that doesn't work, couple of reasons:
I'm sure you know more about Docker than me, so, if you solve this, feel free to open a Pull Request.
I'll add you to the credits in the README. I use this far ago with Kali docker, but I have not tested it anymore...
Would you like to be the maintainer? I'll be really pleased :)
Cheers
If i have time for this then surely i would like to fix these issues :)
This is fixed in master branch
#Kali docker with SNORT + BARNYARD2 + PULLEDPORK
#Version 0.1.0
From debian:latest
MAINTAINER Joan Bono <@joan_bono>
ENV OINKCODE
ENV INTERFACE
RUN apt-get update && apt-get upgrade -y && apt-get install -y git curl wget
RUN git clone https://github.com/joanbono/Snorter.git /opt/Snorter
RUN sed -i "s/sudo //g" /opt/Snorter/src/Snorter.sh
RUN /opt/Snorter/src/Snorter.sh -o ${OINKCODE} -i ${INTERFACE}
USER root
WORKDIR /opt/Snorter
Hi! I try to use docker image but stuck with multiple problems:
ENV INTERFACE=
RUN chmod 755 /opt/Snorter/src/Snorter.sh
docker build SnorterDock -p 80:80 -e OINKCODE=<oinkcode> -e INTERFACE=<interface>
doesn't work because build command doesnt recognice -p and -e options. Build arguments should be given by using option --build-arg. So the correct build command for me is:docker build snorter --build-arg INTERFACE=eth0
These are my issues and findings. Maybe i configured it wrong to get this last issue, maybe you can help me :)