This commit is contained in:
mcoder 2026-04-14 16:44:08 +03:30
parent e2f68cf376
commit f5eab0badf
2 changed files with 21 additions and 16 deletions

View File

@ -38,6 +38,16 @@ services:
- lab_net
restart: always
# اپلیکیشن دوم: سرور هکر (یک سرور بسیار سبک برای میزبانی پی‌لودها)
hacker-app:
image: nginx:alpine
container_name: sec_lab_hacker
volumes:
- ./hacker_files:/usr/share/nginx/html:ro
networks:
- lab_net
restart: always
networks:
lab_net:
driver: bridge

View File

@ -1,27 +1,22 @@
# تنظیمات سایت قربانی (Laravel)
server {
listen 80;
# شناسایی همزمان هر دو دامنه شبیه‌سازی شده
server_name victim.lab attacker.lab localhost;
server_name victim.lab;
root /var/www/html/public;
index index.php index.html;
# لاگ‌های مجزا برای تحلیل حملات
access_log /var/log/nginx/sec-lab-access.log;
error_log /var/log/nginx/sec-lab-error.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
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;
}
}
location ~ /\.ht {
deny all;
# تنظیمات سایت مهاجم (Static/Hacker)
server {
listen 80;
server_name attacker.lab;
location / {
proxy_pass http://hacker-app:80;
}
}