-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
209 lines (197 loc) · 5.29 KB
/
Copy pathdocker-compose.yml
File metadata and controls
209 lines (197 loc) · 5.29 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
services:
# PostgreSQL Database
database:
image: postgres:15-alpine
container_name: exfil-database
environment:
POSTGRES_DB: exfilsentry
POSTGRES_USER: exfilsentry
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./containers/database/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- exfil-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U exfilsentry"]
interval: 10s
timeout: 5s
retries: 5
# Backend API (Control Server)
backend:
build:
context: ./containers/backend
dockerfile: Dockerfile
container_name: exfil-backend
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://exfilsentry:password@database:5432/exfilsentry
- DEBUG=true
- ATTACKER_URL=http://attacker:5000
- DOCKER_HOST=unix:///var/run/docker.sock
- SUPABASE_URL=${SUPABASE_URL:-}
- SUPABASE_JWT_SECRET=${SUPABASE_JWT_SECRET:-}
depends_on:
database:
condition: service_healthy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
- ./containers/backend:/app
- vnc_logs:/vnc_logs
cap_add:
- NET_ADMIN
networks:
- exfil-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 5
# Frontend React App (Dashboard)
frontend:
build:
context: ./containers/frontend
dockerfile: Dockerfile
container_name: exfil-frontend
ports:
- "3000:3000"
environment:
- REACT_APP_API_URL=
- CHOKIDAR_USEPOLLING=true
volumes:
- ./containers/frontend:/app
- /app/node_modules
networks:
- exfil-network
depends_on:
- backend
# Detector Container (Zeek Analysis + Signature Detection)
detector:
build:
context: ./containers/detector
dockerfile: Dockerfile
container_name: exfil-detector
environment:
- DATABASE_URL=postgresql://exfilsentry:password@database:5432/exfilsentry
- NETWORK_INTERFACE=any
- DEBUG=true
# Signature Detection Configuration
- DETECTION_MODE=both # Options: behavioral, signature, both
- ENABLE_ZEEK=true
- ENABLE_SCAPY=true
- MIN_SEVERITY=medium # Options: low, medium, high, critical
- CAPTURE_DIR=/app/captures
- SIGNATURE_OUTPUT_DIR=/app/signature_logs
depends_on:
database:
condition: service_healthy
volumes:
- ./containers/detector:/app
- capture_data:/app/captures
networks:
- exfil-network
cap_add:
- NET_ADMIN
- NET_RAW
privileged: true
# Packet Capture Sidecar for TigerVNC - shares network namespace with victim
capture-tigervnc:
image: nicolaka/netshoot:latest
container_name: capture-tigervnc
network_mode: "service:victim-tigervnc"
command: >
sh -c "tcpdump -i any -U -w /captures/tigervnc.pcap -C 10 -W 5 -s 0 'port 5900 or port 5901'"
volumes:
- capture_data:/captures
cap_add:
- NET_ADMIN
- NET_RAW
depends_on:
- victim-tigervnc
# Packet Capture Sidecar for RealVNC - shares network namespace with victim
capture-realvnc:
image: nicolaka/netshoot:latest
container_name: capture-realvnc
network_mode: "service:victim-realvnc"
command: >
sh -c "tcpdump -i any -U -w /captures/realvnc.pcap -C 10 -W 5 -s 0 'port 5900 or port 5901'"
volumes:
- capture_data:/captures
cap_add:
- NET_ADMIN
- NET_RAW
depends_on:
- victim-realvnc
# Attacker Container (VNC Attack Simulator)
attacker:
build:
context: ./containers/attacker
dockerfile: Dockerfile
container_name: exfil-attacker
ports:
- "8001:5000"
environment:
- VICTIM_TIGERVNC_HOST=victim-tigervnc
- VICTIM_REALVNC_HOST=victim-realvnc
- VNC_PASSWORD=vncpass
volumes:
- ./containers/attacker:/app
# Share Zeek logs with attacker so it can simulate/push notices for testing
- ./containers/detector/zeek_logs:/shared/zeek_logs:rw
networks:
- exfil-network
depends_on:
- victim-tigervnc
- victim-realvnc
# TigerVNC Victim Container
victim-tigervnc:
build:
context: ./containers/victim-tigervnc
dockerfile: Dockerfile
container_name: exfil-victim-tigervnc
ports:
- "5900:5900"
volumes:
- vnc_logs:/vnc_logs
networks:
- exfil-network
hostname: victim-tigervnc
tty: true
# RealVNC Victim Container
victim-realvnc:
build:
context: ./containers/victim-realvnc
dockerfile: Dockerfile
container_name: exfil-victim-realvnc
ports:
- "5901:5901"
volumes:
- vnc_logs:/vnc_logs
networks:
- exfil-network
hostname: victim-realvnc
#adminer, not neccessary, but you can view the database through the gui using this.
adminer:
image: adminer:latest
container_name: exfil-adminer
ports:
- "8080:8080"
networks:
- exfil-network
depends_on:
- database
# System: PostgreSQL
# Server: database
# Username: exfilsentry
# Password: password
# Database: exfilsentry
volumes:
postgres_data:
capture_data:
vnc_logs:
networks:
exfil-network:
driver: bridge