Add
This commit is contained in:
parent
e2f68cf376
commit
f5eab0badf
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user