-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
114 lines (106 loc) · 2.72 KB
/
docker-compose.yml
File metadata and controls
114 lines (106 loc) · 2.72 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
version: '3.8'
services:
http_server_b:
build:
context: ./docker/http_server_b
ports:
- "5000:5000"
volumes:
- ./docker/http_server_b:/app
hostname: http_server_b
networks:
- rsa_lab_net
http_server_b_patched:
build:
context: ./docker/http_server_b_patched
ports:
- "5001:5001" # host 5001 -> container 5001
volumes:
- ./docker/http_server_b_patched:/app
hostname: http_server_b_patched
networks:
- rsa_lab_net
# tls-like oracle (socket based) for Bleichenbacher PoC
tls_like_server:
build:
context: ./docker/tls_like_server
container_name: tls_like_server
ports:
- "1337:1337"
volumes:
- ./poc:/app/poc # public key visible here
environment:
- HOST=0.0.0.0
- PORT=1337
- PUB_DIR=/app/poc/Bleichenbacher
- PRIVATE_DIR=/app/keys
healthcheck:
test: ["CMD-SHELL", "sh -c 'nc -z localhost 1337 || exit 1'"]
interval: 2s
timeout: 2s
retries: 30
networks:
- rsa_lab_net
# tls-like oracle (socket based) - PATCHED (no padding oracle)
tls_like_server_patched:
build:
context: ./docker/tls_like_server_patched
container_name: tls_like_server_patched
ports:
- "1338:1338" # host 1338 -> container 1337
volumes:
- ./poc:/app/poc
environment:
- HOST=0.0.0.0
- PORT=1338
- PUB_DIR=/app/poc/Bleichenbacher
- PRIVATE_DIR=/app/keys
healthcheck:
test: ["CMD-SHELL", "sh -c 'nc -z localhost 1337 || exit 1'"]
interval: 2s
timeout: 2s
retries: 30
networks:
- rsa_lab_net
http_server_c:
build:
context: ./docker/http_server_c
ports:
- "8000:8000"
hostname: http_server_c
volumes:
- http_server_c_keys:/app/keys
networks:
- rsa_lab_net
attack:
build:
context: ./docker/attack
container_name: attack # giữ tên 'attack' để khớp attack.sh
volumes:
- ./poc:/app/poc
- ./logs:/app/logs
- ./poc/Bleichenbacher/attack.sh:/app/attackA.sh:ro # optional: mount script
depends_on:
- tls_like_server
- http_server_b
- http_server_b_patched
- http_server_c
- tls_like_server_patched
environment:
- ORACLE_HOST=tls_like_server
- ORACLE_HOST_PATCHED=tls_like_server_patched
- ORACLE_PORT=1337
- ORACLE_PORT_PATCHED=1338
- KEY_PATH=/app/poc/Bleichenbacher/public.pem
# keep container alive, do NOT auto-run attack
command: ["bash", "-lc", "sleep infinity"]
stdin_open: true
tty: true
networks:
- rsa_lab_net
volumes:
http_server_c_keys:
driver: local
networks:
rsa_lab_net:
driver: bridge