기본 콘텐츠로 건너뛰기

bWAPP Cross Site Scripting - Reflected [ JSON ]



bWAPP XSS - Reflected [ JSON ] Current : low


위 텍스트 입력란에 <script>alert(1)</script> 를 삽입하여 취약점을 진단 결과 아래와 같이 JSON 방식으로 응답메세지가 출력됩니다.


??? Sorry, we don't have that movie :("}]}';  

위와 같이 , "}]}';   Payload 를 사용하여 JSON 방식으로 XSS 를 재현시킬수있습니다.


"}]}';alert(1);</script>구문을 통해 JSON 방식으로 XSS 공격이 재현되는지 ,  취약점을 진단합니다.






댓글

이 블로그의 인기 게시물

HackerOne Vulnerability Analysis 1

이 문서는  HackerOne 에서  제출된 많은 보고서들을 토대로 핵심 Payload만 요약하여 직접 작성하였습니다. Link :  https://hackerone.com/ Vulnerabilities list 1. CRLF Injection 2. Open Redirection  3. Cross-Site-Scripting 4. SQL-Injection 5. Path Traversal  CRLF Injection PoC http://www.myshopify.com/xxcrlftest%0aSet-Cookie:test=test3;domain=.myshopify.com; https://www.blackfan.myshopify.com/xxx%0aSet-Cookie:test=test2;domain=.myshopify.com; HTTP Response: HTTP/1.1 302 Moved Temporarily ... Location: http://myshopify.com/xxcrlftest Set-Cookie:test=test;domain=.myshopify.com; PoC: https://engineeringblog.yelp.com/xxcrlftest%0d%0aSet-Cookie:%20test=test;domain=.yelp.com HTTP Response: HTTP/1.1 301 Moved Permanently ... Location: http://engineeringblog.yelp.com/xxcrlftest Set-Cookie: test=test;domain=.yelp.com PoC (Chrome, Internet Explorer) http://gratipay.com/%0dSet-Cookie:csrf_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; HTTP Resp...

bWAPP HTML Injection Reflected [ Current URL ]

HTML Injection Reflected (Current URL) Current : low 문제 페이지에선  Your current URL : http://192.168.56.107/bWAPP/htmli_current_url.php  페이지의 글을 출력해줍니다. 내  URL  끝 부분에  ?  를 붙여 임의의 문자열을 입력 시 위와 같이 문자열이 출력되지만 ,  HTML  태그에 대한 결과 값은  인코딩  되어 출력됩니다. 따라서  클라이언트  를 통해  Response  를 분석합니다. 분석시 , 메소드 옆  /bWAPP/htmli_current_url.php  주소가 붙습니다. 즉 처음에 주소 옆  ?  를 붙여 , 임의의 문자열을 입력 시 해당 문자열은 그대로 반환하였습니다. 하지만  HTML  태그에 대한 문자열은 반환하지 못하였습니다. 위를 통해  ?<h1>  를 클라이언트측에 삽입하여  HTML  태그를 삽입이 가능한지 진단합니다. ?<h1>test  를 통해 클라이언트측에  HTML  태그를 삽입 한 후  Forward  를 누릅니다. 위와 같이 성공적으로  HTML  태그가 삽입되어 출력된것 을 확인할 수 있습니다.

Juice Shop XSS [ Dom based XSS ]

Juice Shop XSS [ Dom based XSS ] Search 입력란에 악성 스크립트를 넣어 XSS 취약점을 진단합니다. Payload :  <iframe src="javascript:alert(`xss`)">   다음과 같이 이는 < , > 는 &lt; , &gt; 로 특수문자를 필터링하지 않기에 XSS 에 취약합니다.