-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·139 lines (128 loc) · 3.61 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·139 lines (128 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: '3.8'
services:
webgoat-app:
build: .
container_name: webgoat-vulnerable-app
ports:
- "8080:80"
depends_on:
- database
- redis
environment:
- DB_HOST=database
- REDIS_HOST=redis
networks:
- webgoat-network
# Vulnerable database with default credentials
database:
image: mysql:5.7.20 # Old version with known CVEs (CVE-2018-2696, CVE-2018-2703, etc.)
container_name: webgoat-mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: webgoat
MYSQL_USER: webgoat
MYSQL_PASSWORD: password123
ports:
- "3306:3306"
volumes:
- ./db-init:/docker-entrypoint-initdb.d
networks:
- webgoat-network
# Vulnerable Redis instance (no auth, older version)
redis:
image: redis:4.0.14-alpine # Version with CVE-2019-10192, CVE-2019-10193
container_name: webgoat-redis
ports:
- "6379:6379"
command: redis-server --requirepass "" # No password - security vulnerability
networks:
- webgoat-network
# Vulnerable Elasticsearch (older version with multiple CVEs)
elasticsearch:
image: elasticsearch:6.4.0 # Version with CVE-2019-7619, CVE-2020-7009
container_name: webgoat-elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false # Security disabled - vulnerability
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "9200:9200"
- "9300:9300"
networks:
- webgoat-network
# Vulnerable MongoDB (no authentication)
mongodb:
image: mongo:3.6.23 # Older version with CVE-2020-7928
container_name: webgoat-mongo
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=password
command: --auth --bind_ip_all # Binding to all interfaces - potential security risk
networks:
- webgoat-network
# Vulnerable Apache HTTP Server
apache:
image: httpd:2.4.38-alpine # Version with CVE-2019-0220, CVE-2019-10081
container_name: webgoat-apache
ports:
- "8081:80"
volumes:
- ./apache-config:/usr/local/apache2/conf
networks:
- webgoat-network
# Vulnerable Nginx
nginx:
image: nginx:1.15.8 # Version with CVE-2019-9511, CVE-2019-9513
container_name: webgoat-nginx
ports:
- "8082:80"
volumes:
- ./nginx-config:/etc/nginx/conf.d
networks:
- webgoat-network
# Vulnerable Jenkins (for CI/CD demonstration)
jenkins:
image: jenkins/jenkins:2.150.3 # Old version with multiple CVEs
container_name: webgoat-jenkins
ports:
- "8083:8080"
environment:
- JENKINS_OPTS="--httpPort=8080"
- JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
volumes:
- jenkins_home:/var/jenkins_home
networks:
- webgoat-network
# Vulnerable Node.js application
nodejs-app:
image: node:10.24.0-alpine # Vulnerable Node.js version
container_name: webgoat-nodejs
working_dir: /app
command: >
sh -c "
echo 'const express = require(\"express\");
const app = express();
// Vulnerable: Using eval with user input
app.get(\"/eval/:code\", (req, res) => {
try {
const result = eval(req.params.code);
res.json({result: result});
} catch(e) {
res.json({error: e.message});
}
});
app.listen(3000, \"0.0.0.0\");' > app.js &&
npm init -y &&
npm install express@4.16.4 &&
node app.js"
ports:
- "3000:3000"
networks:
- webgoat-network
networks:
webgoat-network:
driver: bridge
volumes:
jenkins_home: