
L'unico strumento open-source per analizzare vulnerabilità e problemi di configurazione di container Docker in esecuzione e reti Docker.
DockerENT è uno strumento attivo di scansione della sicurezza delle applicazioni in esecuzione (strumento RAST). È un framework modulare scritto in Python. Viene fornito con un'applicazione CLI e una interfaccia web pulita scritta utilizzando StreamLit.
DockerENT è stato progettato per rilevare configurazioni di sicurezza deboli negli ambienti di produzione che possono portare a gravi conseguenze. Questa applicazione si connette ai container in esecuzione nel sistema, recupera l'elenco delle configurazioni runtime deboli e vulnerabili e genera un report. Se invocata tramite interfaccia web, può visualizzare il report di scansione e audit direttamente nell'interfaccia utente.
Hai fretta di provarlo? Scarica l'ultima release stabile da PyPi ed esegui l'app Web, tutto il resto è intuitivo.
pip install DockerENT
Esegui l'applicazione così:
DockerENT -w
È tutto.
DockerENT è stato progettato tenendo a mente semplicità e usabilità. Attualmente devi solo clonare il repository e scaricare le dipendenze o costruire il Dockerfile. Una volta installate le dipendenze nel sistema locale, possiamo eseguire lo strumento e analizzare le configurazioni runtime dei container in esecuzione.
# Download and setup
git clone https://github.com/r0hi7/DockerENT.git
cd DockerENT
make venv
source venv/bin/activate
# Run
python -m DockerENT --help
usage: Find the vulnerabilities hidden in your running container(s).
[-h] [-d [DOCKER_CONTAINER]] [-p [DOCKER_PLUGINS]]
[-d-nw [DOCKER_NETWORK]] [-p-nw [DOCKER_NW_PLUGINS]] [-w]
[-n [PROCESS_COUNT]] [-a] [-o [OUTPUT]]
optional arguments:
-h, --help show this help message and exit
-w, --web-app Run DockerENT in WebApp mode. If this parameter is
enabled, other command line flags will be ignored.
-n [PROCESS_COUNT], --process [PROCESS_COUNT]
Run scans in parallel (Process pool count).
-a, --audit Flag to check weather to audit results or not.
-d [DOCKER_CONTAINER], --docker [DOCKER_CONTAINER]
Run scan against the running container.
-p [DOCKER_PLUGINS], --plugins [DOCKER_PLUGINS]
Run scan with only specified plugins.
-p-nw [DOCKER_NW_PLUGINS], --nw-plugins [DOCKER_NW_PLUGINS]
Run scan with only specified plugins.
-d-nw [DOCKER_NETWORK], --docker-network [DOCKER_NETWORK]
Run scan against running docker-network.
-o [OUTPUT], --output [OUTPUT]
Output plugin to write data to.
# or via the container
docker build . -t dockerent
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 8501:8501 --name dockerent dockerent
# Then just open your browser to http://localhost:8051
Guarda questo breve video per iniziare.
file e html.demo.cp DockerENT/docker_plugins/docker_sample_plugin.py DockerENT/docker_plugins/docker_demo_plugin.py
_plugin_name = 'demo_plugin'
def scan(container, output_queue, audit=False, audit_queue=None):
_log.info('Staring {} Plugin ...'.format(_plugin_name_))
res = {}
result = {
'test_class': {
'TEST_NAME': ['good']
}
}
res[container.short_id] = {
_plugin_name_: result
}
# Do something magical.
_log.info('Completed execution of {} Plugin.'.format(_plugin_name_))
'''Make Sure you put dict of following structure in Q.
{
'contiainer_id': {
'plugin_name': {
'test_name_demo1': {
resultss:[]
},
'test_name_demo2': {
results: []
}
}
}
}
'''
output_queue.put(res)
if audit:
_audit(container, res, audit_queue)
def _audit(container, results, audit_queue):
'''Make Sure to add dict of following structure to Audit Q
res = {
"container_id": [
"_plugin_name_, WARN/INFO/ERROR, details"
]
}
'''
# Magical logic to perform Audit.
audit_queue.put(res)
-n <count> per specificare il numero di processori in parallelo.JSON e HTML.JSON sono pesanti.| Nome Plugin | File Plugin | Funzionalità | Audit |
|---|
| CMD_HISTORY | File | Identifica la cronologia della shell | Cronologia root e cronologia utente |
| FILESYSTEM | File | Identifica file system RW | Se sono presenti file system RW. |
| NETWORK | File | Identifica lo stato della rete | Identifica tutte le porte mappate. |
| PLAINTEST_PASSWORD | File | Identifica password in diversi file | |
| SECURITY_PROFILES | File | Identifica profili di sicurezza deboli | Elenca profili di sicurezza deboli. |
| USER_INFO | File | Identifica informazioni utente | Elenca permessi in passwd e altri file sensibili |
| SYSTEM_INFO | File | Identifica informazioni sistema Docker | Nessun audit |
| FILES_INFO | File | Identifica directory e file scrivibili da tutti | Elenca tutti questi file. |
| PROC_INFO | File | Identifica l'elenco dei processi nel sistema Docker |