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

View File

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