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 - lab_net
restart: always 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: networks:
lab_net: lab_net:
driver: bridge driver: bridge

View File

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