본문 바로가기
강의 및 교육/Inflearn - Webgoat

Server-Side Request Forgery - 3, 4

by 이우정 2022. 3. 3.
728x90

[ 이론 ]

CSRF : Cross Site Request Forgery - 희생자를 공격한다!!!

SSRF : Server-Side Request Forgery - Server Side에서 이루어지는 요청을 변조해 해커가 의도한 서버로 요청을 가게 하거나 요청 자체를 변경하는 공격 (서버를 공격한다!!!!)

https://medium.com/naver-cloud-platform/ssrf-%EA%B3%B5%EA%B2%A9%EC%9D%98-%ED%94%BC%ED%95%B4-%EC%82%AC%EB%A1%80%EC%99%80-%EB%8C%80%EC%9D%91-1-d0be4b12d10a

정상적인 경우 : A서버가 B서버로 정보를 요청하고 결과를 반환받음 

비정상적인 경우 : B서버의 주소를 C서버로 변경하여 A가 B가 아닌 C에게 요청을 보내고 결과를 받음

기업 내부 시스템의 shell exploit 코드 일부

공격 방법

 

Concept

SSRF(Server-Side Request Forgery) 공격에서 공격자는 서버의 기능을 남용하여 내부 리소스를 일거나 업데이트 할 수 있다. 공격자는 서버에서 실행 중인 코드로 데이터를 읽거나 전송될 URL을 생성하거나 수정할 수 있다. URL을 신중하게 선택하여 공격자는 AWS Metadata와 같은 서버 구성을 읽거나 / HTTP 지원 데이터베이스와 같은 내부 서비스에 연결하거나 노출되지 않은 내부 서비스에 대한 게시 요청을 수행할 수 있다. 

 

Goals

서버로 보내거나 서버에서 가져오기 위해 요청을 조정하는 방법을 배운다. 

https://www.hackerone.com/application-security/how-server-side-request-forgery-ssrf

 

How To: Server-Side Request Forgery (SSRF)

Server-Side Request Forgery, SSRF for short, is a vulnerability class that describes the behavior of a server making a request that’s under the attacker’s control. This post will go over the impact, how to test for it, the potential pivots, defeating m

www.hackerone.com

 

[ 문제 ]

 

그냥 파라미터 변조,,,

 

[ 문제 ]

http://ifconfig.pro 는 PC에 대한 정보가 노출되는 사이트 

이미지가 url을 통해 화면에 출력되는데 그 자리에 PC에 대한 정보가 노출됨.

 

Prevent

웹 응용 프로그램의 SSRF 취약성 방지

1) 웹 서버에서 리소르르 가져올 수 있는 허용된 도메인, 리소스 및 프로토콜의 화이트리스트를 사용

2) 사용자의 입력이 예상과 다르면 유효성을 검사하고 거부

3) 웹 서버가 리소스를 가져올 수 있는 위치를 제어하는 함수에서 사용자 입력 금지

https://owasp.org/www-community/attacks/Server_Side_Request_Forgery

 

Server Side Request Forgery Software Attack | OWASP Foundation

Server Side Request Forgery on the main website for The OWASP Foundation. OWASP is a nonprofit foundation that works to improve the security of software.

owasp.org

 

728x90

'강의 및 교육 > Inflearn - Webgoat' 카테고리의 다른 글

SQL Injection (intro)  (0) 2022.03.06
Challenges  (0) 2022.03.05
Cross-Site Request Forgeries - 7, 8  (0) 2022.03.02
Cross-Site Request Forgeries - 3, 4  (0) 2022.03.02
Vulnerable Components  (0) 2022.02.25