SSRF
- SSRF란, Server-Side Request Forgery로 CSRF와는 다르게 서버에 요청을 보내는 공격을 말한다.
- 주로, 서버가 다른 서버로부터 요청을 보낼 때, 즉 api를 사용할 때 이러한 공격이 일어난다.
실습
https://portswigger.net/web-security/ssrf/lab-basic-ssrf-against-localhost

- 처음에 들어갔을 때 이렇게 일반적인 쇼핑몰처럼 웹페이지가 구성이 되어있다.

- 목록에 들어가면 위와 같이 제품에 대한 설명이 나오는데, 이때 재고가 얼마나 남아있는지 요청하는 기능이 존재한다.

- 이를 Burp suite로 확인해보면 stockAPi라고 적혀있고 다른 서버로 재고에 대한 정보를 요청하는 것을 알 수 있다.


stockApi = http://localhost/admin
- 위와 같이 요청을 보내자, admin 창에서만 볼 수 있는 창이 나온 것을 알 수 있다.
- delete 버튼을 보니 '<a = href = /admin/delete?username=carlos>' 라고 나와 있다.

stockApi = http://localhost/admin/delete?username=carlos

- 다시 아까처럼 admin창을 요청하자, carlos가 삭제된 것을 알 수 있다.
SSRF 대응 방안