diff --git a/docker/tanner/phpox/Dockerfile b/docker/tanner/phpox/Dockerfile index 5da405ff..f76abebf 100644 --- a/docker/tanner/phpox/Dockerfile +++ b/docker/tanner/phpox/Dockerfile @@ -1,8 +1,8 @@ FROM alpine - +# # Include dist ADD dist/ /root/dist/ - +# # Install packages RUN apk -U --no-cache add \ build-base \ @@ -15,7 +15,7 @@ RUN apk -U --no-cache add \ python3-dev \ re2c && \ pip3 install --no-cache-dir --upgrade pip && \ - +# # Install bfr sandbox from git git clone --depth=1 https://github.com/mushorg/BFR /opt/BFR && \ cd /opt/BFR && \ @@ -28,14 +28,14 @@ RUN apk -U --no-cache add \ cd / && \ rm -rf /opt/BFR /tmp/* /var/tmp/* && \ echo "zend_extension = "$(find /usr -name bfr.so) >> /etc/php7/php.ini && \ - +# # Install PHP Sandbox git clone --depth=1 https://github.com/mushorg/phpox /opt/phpox && \ cd /opt/phpox && \ cp /root/dist/sandbox.py . && \ pip3 install -r requirements.txt && \ make && \ - +# # Clean up apk del --purge build-base \ git \ @@ -43,7 +43,7 @@ RUN apk -U --no-cache add \ python3-dev && \ rm -rf /root/* && \ rm -rf /var/cache/apk/* - +# # Set workdir and start phpsandbox STOPSIGNAL SIGKILL USER nobody:nobody diff --git a/docker/tanner/redis/Dockerfile b/docker/tanner/redis/Dockerfile index 6eff2dff..9e3e98a9 100644 --- a/docker/tanner/redis/Dockerfile +++ b/docker/tanner/redis/Dockerfile @@ -1,18 +1,17 @@ FROM redis:alpine - +# # Include dist ADD dist/ /root/dist/ - +# # Setup apt RUN apk -U --no-cache add redis && \ - cp /root/dist/redis.conf /etc && \ - +# # Clean up rm -rf /root/* && \ rm -rf /tmp/* /var/tmp/* && \ rm -rf /var/cache/apk/* - +# # Start conpot STOPSIGNAL SIGKILL USER nobody:nobody diff --git a/docker/tanner/snare/Dockerfile b/docker/tanner/snare/Dockerfile index b1a579a1..ac9db11f 100644 --- a/docker/tanner/snare/Dockerfile +++ b/docker/tanner/snare/Dockerfile @@ -1,8 +1,8 @@ FROM alpine - +# # Include dist ADD dist/ /root/dist/ - +# # Setup apt RUN apk -U --no-cache add \ build-base \ @@ -10,7 +10,7 @@ RUN apk -U --no-cache add \ linux-headers \ python3 \ python3-dev && \ - +# # Setup Snare git clone --depth=1 https://github.com/mushorg/snare /opt/snare && \ cd /opt/snare/ && \ @@ -21,7 +21,7 @@ RUN apk -U --no-cache add \ rm -rf /opt/snare && \ clone --target http://example.com && \ mv /root/dist/pages/* /opt/snare/pages/ && \ - +# # Clean up apk del --purge \ build-base \ @@ -30,7 +30,7 @@ RUN apk -U --no-cache add \ rm -rf /root/* && \ rm -rf /tmp/* /var/tmp/* && \ rm -rf /var/cache/apk/* - +# # Start snare STOPSIGNAL SIGKILL CMD snare --tanner tanner --debug true --no-dorks true --auto-update false --host-ip 0.0.0.0 --port 80 --page-dir $(shuf -i 1-10 -n 1) diff --git a/docker/tanner/tanner/Dockerfile b/docker/tanner/tanner/Dockerfile index ce2b1d2d..d08886b3 100644 --- a/docker/tanner/tanner/Dockerfile +++ b/docker/tanner/tanner/Dockerfile @@ -1,8 +1,8 @@ FROM alpine - +# # Include dist ADD dist/ /root/dist/ - +# # Setup apt RUN apk -U --no-cache add \ build-base \ @@ -14,7 +14,7 @@ RUN apk -U --no-cache add \ py3-yarl \ python3 \ python3-dev && \ - +# # Setup Tanner git clone --depth=1 https://github.com/mushorg/tanner /opt/tanner && \ cp /root/dist/config.py /opt/tanner/tanner/ && \ @@ -35,13 +35,13 @@ RUN apk -U --no-cache add \ setup.py \ tanner/data && \ cd / && \ - +# # Setup configs, user, groups addgroup -g 2000 tanner && \ adduser -S -s /bin/ash -u 2000 -D -g 2000 tanner && \ mkdir /var/log/tanner && \ chown -R tanner:tanner /opt/tanner /var/log/tanner && \ - +# # Clean up apk del --purge \ build-base \ @@ -54,7 +54,7 @@ RUN apk -U --no-cache add \ rm -rf /root/* && \ rm -rf /tmp/* /var/tmp/* && \ rm -rf /var/cache/apk/* - +# # Start conpot STOPSIGNAL SIGKILL USER tanner:tanner diff --git a/docker/tanner/tanner/dist/config.py b/docker/tanner/tanner/dist/config.py index 37f64220..44db36e0 100644 --- a/docker/tanner/tanner/dist/config.py +++ b/docker/tanner/tanner/dist/config.py @@ -9,7 +9,9 @@ config_template = {'DATA': {'db_config': '/opt/tanner/db/db_config.json', 'dorks': '/opt/tanner/data/dorks.pickle', 'user_dorks': '/opt/tanner/data/user_dorks.pickle', 'crawler_stats': '/opt/tanner/data/crawler_user_agents.txt', - 'geo_db': '/opt/tanner/db/GeoLite2-City.mmdb' + 'geo_db': '/opt/tanner/db/GeoLite2-City.mmdb', + 'tornado': '/opt/tanner/data/tornado.py', + 'mako': '/opt/tanner/data/mako.py' }, 'TANNER': {'host': '0.0.0.0', 'port': 8090}, 'WEB': {'host': '0.0.0.0', 'port': 8091}, @@ -18,16 +20,20 @@ config_template = {'DATA': {'db_config': '/opt/tanner/db/db_config.json', 'REDIS': {'host': 'tanner_redis', 'port': 6379, 'poolsize': 80, 'timeout': 1}, 'EMULATORS': {'root_dir': '/opt/tanner'}, 'EMULATOR_ENABLED': {'sqli': True, 'rfi': True, 'lfi': False, 'xss': True, 'cmd_exec': False, - 'php_code_injection': True, "crlf": True}, + 'php_code_injection': True, 'php_object_injection': True, "crlf": True, + 'xxe_injection': True, 'template_injection': False}, 'SQLI': {'type': 'SQLITE', 'db_name': 'tanner_db', 'host': 'localhost', 'user': 'root', 'password': 'user_pass'}, + 'XXE_INJECTION': {'OUT_OF_BAND': False}, 'DOCKER': {'host_image': 'busybox:latest'}, 'LOGGER': {'log_debug': '/tmp/tanner/tanner.log', 'log_err': '/tmp/tanner/tanner.err'}, 'MONGO': {'enabled': False, 'URI': 'mongodb://localhost'}, 'HPFEEDS': {'enabled': False, 'HOST': 'localhost', 'PORT': 10000, 'IDENT': '', 'SECRET': '', 'CHANNEL': 'tanner.events'}, 'LOCALLOG': {'enabled': True, 'PATH': '/var/log/tanner/tanner_report.json'}, - 'CLEANLOG': {'enabled': False} + 'CLEANLOG': {'enabled': False}, + 'REMOTE_DOCKERFILE': {'GITHUB': "https://raw.githubusercontent.com/mushorg/tanner/master/docker/" + "tanner/template_injection/Dockerfile"} }