반응형
Topic: nginx
분야: Web
난이도: Easy
Nginx works like magic
코드 분석
erver {
listen 80;
server_name admin.alpaca.secret;
root /usr/share/nginx/html;
location = / {
try_files /secret.html =404;
}
}
- 80 포트로 들어 오는 요청을 받음
- server_name이 admin.alpaca.secret 일 때 이 블록이 선택 되는거 같음
- 루트 파일 경로가 지정되어 있음
- /로 왔을 때 /secret.html 반환하는데 없으면 404
server {
listen 80;
server_name *.nip.io;
root /usr/share/nginx/html;
location = / {
try_files /hello.html =404;
}
}
- sever_name이 *.nip,io; 일때 선택
- /로 왔을 때 /hello.html 반환
server {
listen 80 default_server;
server_name _;
root /usr/share/nginx/html;
location = / {
try_files /index.html =404;
}
}
- 위 2개 다 선택 안되면 선택
- /로 왔을 때 /index.html 반환
익스플로잇
HTTP History에서 찾은 요청을 우클릭한 후 Send to Replay 에서 Default Collection 눌러줌

Host를 admin.alpaca.secret으로 변경 후 Send 누름

Burpsuite

그 외)
/secret.html로 가는 경로를 막지 않아서 그대로 URL에 적어줘도 플래그가 나옴

반응형
'Alpacahack' 카테고리의 다른 글
| Plz Login (0) | 2026.02.09 |
|---|---|
| Xmas Login (0) | 2026.02.06 |
| Alpacahack: No JS (0) | 2026.02.01 |
| Alpacahack: Stateless Auth (0) | 2026.01.25 |
| Alpacahack: Animal Viewer (0) | 2026.01.22 |