-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed Glider and clean the compose [#54]
- Loading branch information
Showing
6 changed files
with
241 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
version: "3.8" | ||
|
||
services: | ||
|
||
# Tcpdump host that stores all the stuff that happens | ||
# in the network | ||
tcpdump: | ||
image: kaazing/tcpdump | ||
network_mode: "host" | ||
volumes: | ||
- ../tcpdump:/tcpdump | ||
# Run tcdump in autorotating mode, with gzip compression | ||
# The files will be rotated every 24h or 500MB and named | ||
# after the timestamp when the file is created. | ||
command: [ | ||
"-z", "gzip", # compress to gzip | ||
"-G", "86400", # 24h in seconds | ||
"-C", "500", # maximum file size | ||
"-W", "10", # ignored, only affects the name | ||
"-v", # verbose | ||
"-i", "any", # any interface | ||
"-w", "tcpdump/trace_%Y_%m_%d_%H_%M_%S.pcap" # trace_<timestamp>.pcap | ||
] | ||
|
||
# RIoTPot is the container for the central node | ||
riotpot: | ||
build: | ||
context: ../.. | ||
dockerfile: ./build/docker/Dockerfile | ||
image: riotpot:development | ||
#command: | ||
restart: always | ||
ports: | ||
# Ports under 60 might see errors when unquoted | ||
# https://stackoverflow.com/questions/58810789/quotes-on-docker-compose-yml-ports-make-any-difference | ||
- "7:7" | ||
- "22:22" | ||
- "23:23" | ||
#- "80:80" | ||
- "502:502" | ||
- "8080:8080" | ||
- "1883:1883" | ||
- "5683:5683" | ||
env_file: | ||
- ../build/env/.env | ||
|
||
postgres: | ||
image: postgres:latest | ||
environment: | ||
- POSTGRES_USER=user | ||
- POSTGRES_PASSWORD=password | ||
- POSTGRES_DB=db | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data/ | ||
|
||
volumes: | ||
postgres_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
# This Docker Compose file is meant to be used on a development environment for testing. | ||
# This environment includes a fake local network, a local database and | ||
# a volume mounted with the code to see changes on the go. | ||
|
||
# Base configuration for any protocol container | ||
# Use this on each protocol so share a similar configuration to riotpot | ||
x-protocol: | ||
&protocol | ||
profiles: | ||
- protocol | ||
depends_on: | ||
- riotpot | ||
networks: | ||
honeypot: | ||
|
||
services: | ||
|
||
########################################## | ||
# REQUIRED | ||
########################################## | ||
|
||
# Tcpdump host that stores all the stuff that happens | ||
# in the network | ||
tcpdump: | ||
image: kaazing/tcpdump | ||
network_mode: "host" | ||
volumes: | ||
- ../tcpdump:/tcpdump | ||
# Run tcdump in autorotating mode, with gzip compression | ||
# The files will be rotated every 24h or 500MB and named | ||
# after the timestamp when the file is created. | ||
command: [ | ||
"-z", "gzip", # compress to gzip | ||
"-G", "86400", # 24h in seconds | ||
"-C", "500", # maximum file size | ||
"-W", "10", # ignored, only affects the name | ||
"-v", # verbose | ||
"-i", "any", # any interface | ||
"-w", "tcpdump/trace_%Y_%m_%d_%H_%M_%S.pcap" # trace_<timestamp>.pcap | ||
] | ||
|
||
database: | ||
image: mongo | ||
container_name: database | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: ${DB_USER:-superuser} | ||
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASS:-password} | ||
MONGO_INITDB_DATABASE: ${DB_NAME:-db} | ||
ports: | ||
- "27017:27017" | ||
volumes: | ||
- riotpot_db:/data/db/ | ||
networks: | ||
honeypot: | ||
# Probe the db service before letting other services know of its status | ||
healthcheck: | ||
test: ["CMD","mongo", "--eval", "db.adminCommand('ping')"] | ||
interval: 10s | ||
timeout: 10s | ||
retries: 5 | ||
start_period: 20s | ||
|
||
# RIoTPot application | ||
riotpot: | ||
container_name: riotpot | ||
build: | ||
context: ../.. | ||
dockerfile: ./build/docker/Dockerfile | ||
restart: always # restart riotpot when it crashes | ||
depends_on: | ||
- database | ||
links: | ||
- database | ||
ports: | ||
# Ports under 60 might see errors when unquoted | ||
# https://stackoverflow.com/questions/58810789/quotes-on-docker-compose-yml-ports-make-any-difference | ||
- "7:7" | ||
# - "22:22" | ||
- "23:23" | ||
# - "80:80" | ||
- "502:502" | ||
- "8080:8080" | ||
- "1883:1883" | ||
- "5683:5683" | ||
- "27017:27017" | ||
env_file: | ||
- ../build/env/.env | ||
networks: | ||
honeypot: | ||
|
||
########################################## | ||
# PROTOCOLS | ||
########################################## | ||
# Use the profile `protocol` to mount the image but do not start it | ||
# riotpot will deetermine which containers to start at a later time | ||
|
||
mqtt: | ||
image: eclipse-mosquitto | ||
container_name: mqtt | ||
<<: *protocol | ||
|
||
http: | ||
image: httpd | ||
container_name: http | ||
<<: *protocol | ||
|
||
modbus: | ||
image: oitc/modbus-server | ||
container_name: modbus | ||
<<: *protocol | ||
|
||
ocpp: | ||
image: ldonini/ocpp1.6-central-system # v1.6 | ||
container_name: ocpp | ||
<<: *protocol | ||
|
||
|
||
########################################## | ||
# EXTRA | ||
########################################## | ||
# Profile: `extra` | ||
|
||
# Attacker container. | ||
# This container is meant to interact with the | ||
attacker: | ||
build: | ||
context: .. | ||
dockerfile: ./build/docker/Dockerfile.attacker | ||
stdin_open: true # docker -i | ||
tty: true # docker -t | ||
volumes: | ||
- ../test/pkg/services/mqtt:/riotpot/ | ||
networks: | ||
honeypot: | ||
profiles: | ||
- extra | ||
|
||
volumes: | ||
riotpot_db: |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,39 @@ | ||
AUTOD=false | ||
DB_HOST=mongodb | ||
DB_USER=superuser | ||
DB_PASS=password | ||
# +------------------+ | ||
# Place here the environment variables values with which you | ||
# want to run riotpot. | ||
# This variables will replace the configuration used on runtime, | ||
# and any previously stored configuration. | ||
# +------------------+ | ||
# +------------------+ | ||
|
||
# Boolean-like. This variable defines if you rather allow the honeypot | ||
# to load all the services available in both the configuration | ||
# file and installed plugins. | ||
AUTOD=true | ||
|
||
# Fill only if AUTOD is set to a falsy value. | ||
# Place a comma separated list of emulators that you want | ||
# riotpot to start when initialised. | ||
## NOTE: RIoTPot is *always* run in hybrid mode! | ||
## append a `-c` to the name when using a containerised version | ||
## Example: `http-c` | ||
START= | ||
|
||
# +------------------+ DB | ||
# Here you can find the list of variables related to the database | ||
# that will be used to store the data generated by riotpot | ||
# +------------------+ DB | ||
|
||
# Place here the name that will be used for the database | ||
# By default, riotpot will call it `default` | ||
DB_NAME=db | ||
|
||
# Username and password used to log the information | ||
DB_USER=user | ||
DB_PASS=password | ||
|
||
# Host and Port in where the database is located | ||
DB_HOST=database | ||
DB_PORT=27017 | ||
DB_ENGINE=mongodb | ||
|
||
# +------------------+ DB |
This file was deleted.
Oops, something went wrong.