-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
160 lines (151 loc) · 4.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
160 lines (151 loc) · 4.77 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
services:
# ===========================================================================
# DOMAIN CONTROLLER — Samba4 AD DS (HUMANIX.LAB)
# Sur le réseau INTERNE uniquement : pas d'accès Internet, isolation totale.
# ===========================================================================
dc01:
build:
context: .
dockerfile: dc/Dockerfile
container_name: humanix-dc01
hostname: dc01
privileged: true # requis par Samba pour certains caps (xattr, etc.)
environment:
CTF_SECRET: ${CTF_SECRET:?CTF_SECRET non défini. Copie .env.example en .env.}
networks:
lab_internal:
ipv4_address: 172.30.0.10
aliases:
- dc01.humanix.lab
- humanix.lab
volumes:
- dc_data:/var/lib/samba
dns:
- 127.0.0.1
restart: unless-stopped
# ===========================================================================
# INTRANET WEB — point d'entrée externe (fuite de creds — Acte I)
# ===========================================================================
web:
build:
context: .
dockerfile: web/Dockerfile
container_name: humanix-web
hostname: intranet
environment:
CTF_SECRET: ${CTF_SECRET:?CTF_SECRET non défini.}
networks:
lab_external:
ipv4_address: 172.31.0.20
restart: unless-stopped
# ===========================================================================
# WEBMAIL — Acte I (Flask + auth LDAP + IDOR)
# Sur les deux réseaux : externe (élève) + interne (LDAPS vers dc01).
# ===========================================================================
mail:
build:
context: .
dockerfile: mail/Dockerfile
container_name: humanix-mail
hostname: mail
environment:
CTF_SECRET: ${CTF_SECRET:?CTF_SECRET non défini.}
LDAP_SERVER: ldaps://dc01.humanix.lab:636
networks:
lab_external:
ipv4_address: 172.31.0.40
lab_internal:
ipv4_address: 172.30.0.40
aliases:
- mail.humanix.lab
dns:
- 172.30.0.10
depends_on:
- dc01
restart: unless-stopped
# ===========================================================================
# LAZARUS DATA REVIEW PORTAL — Acte III (Flask SSTI + privesc + escape)
# Sur lab_internal uniquement. Le docker.sock de l'hôte est monté pour
# permettre le container escape final (pédagogiquement explicite).
# ===========================================================================
lazarus-app:
build:
context: .
dockerfile: lazarus-app/Dockerfile
container_name: humanix-lazarus-app
hostname: lazarus
environment:
CTF_SECRET: ${CTF_SECRET:?CTF_SECRET non défini.}
DB_HOST: lazarus-db.humanix.lab
DB_PORT: "5432"
DB_USER: lazarus_app
DB_PASS: L4z4rusAppDb2024!
DB_NAME: lazarus
networks:
lab_internal:
ipv4_address: 172.30.0.50
aliases:
- lazarus.humanix.lab
dns:
- 172.30.0.10
volumes:
# docker.sock monté = vecteur de container escape (étape FINAL)
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- lazarus-db
restart: unless-stopped
# ===========================================================================
# LAZARUS DB — Postgres, table participants (Acte III)
# Joignable depuis lazarus-app uniquement (port 5432 sur lab_internal).
# ===========================================================================
lazarus-db:
build:
context: .
dockerfile: lazarus-db/Dockerfile
container_name: humanix-lazarus-db
hostname: lazarus-db
environment:
CTF_SECRET: ${CTF_SECRET:?CTF_SECRET non défini.}
POSTGRES_USER: lazarus_admin
POSTGRES_PASSWORD: L4zAdm1nP0stgr3s2024!
POSTGRES_DB: lazarus
networks:
lab_internal:
ipv4_address: 172.30.0.51
aliases:
- lazarus-db.humanix.lab
volumes:
- lazarus_db_data:/var/lib/postgresql/data
restart: unless-stopped
# ===========================================================================
# ATTAQUANT — poste de l'élève (les deux réseaux pour simuler le pivot)
# ===========================================================================
attacker:
build: ./attacker
container_name: humanix-attacker
hostname: kali-student
networks:
lab_external:
ipv4_address: 172.31.0.30
lab_internal:
ipv4_address: 172.30.0.30
dns:
- 172.30.0.10
cap_add:
- NET_RAW
restart: unless-stopped
networks:
lab_internal:
driver: bridge
internal: true
ipam:
config:
- subnet: 172.30.0.0/24
lab_external:
driver: bridge
ipam:
config:
- subnet: 172.31.0.0/24
volumes:
dc_data:
lazarus_db_data: