This commit is contained in:
mcoder 2026-04-14 16:52:41 +03:30
parent f5eab0badf
commit 11b2af075a
2 changed files with 22 additions and 28 deletions

View File

@ -2,9 +2,9 @@ services:
# ----------------------------------------
# NGINX (Web Server)
# ----------------------------------------
nginx:
victim-nginx:
image: nginx:stable-alpine
container_name: sec_lab_nginx
container_name: sec_lab_victim_nginx
ports:
- "58690:80" # روی سرور پورت 80 باز باشد
volumes:
@ -39,14 +39,15 @@ services:
restart: always
# اپلیکیشن دوم: سرور هکر (یک سرور بسیار سبک برای میزبانی پی‌لودها)
hacker-app:
image: nginx:alpine
container_name: sec_lab_hacker
attacker-app:
image: nginx:stable-alpine
container_name: sec_lab_attacker_nginx
ports:
- "58691:80" # مپ کردن به پورت 8002 سرور
volumes:
- ./hacker_files:/usr/share/nginx/html:ro
- ./hacker_site:/usr/share/nginx/html:ro
networks:
- lab_net
restart: always
networks:
lab_net:

View File

@ -1,22 +1,15 @@
# تنظیمات سایت قربانی (Laravel)
server {
listen 80;
server_name victim.lab;
root /var/www/html/public;
index index.php;
location / { try_files $uri $uri/ /index.php?$query_string; }
location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
# تنظیم برای victim.lab
<VirtualHost *:80>
ServerName victim.lab
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8001/
ProxyPassReverse / http://127.0.0.1:8001/
</VirtualHost>
# تنظیمات سایت مهاجم (Static/Hacker)
server {
listen 80;
server_name attacker.lab;
location / {
proxy_pass http://hacker-app:80;
}
}
# تنظیم برای attacker.lab
<VirtualHost *:80>
ServerName attacker.lab
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8002/
ProxyPassReverse / http://127.0.0.1:8002/
</VirtualHost>