본문 바로가기
반응형

해킹/DVWA29

DVWA 실습 14. JavaScript (Medium) Objective Simply submit the phrase "success" to win the level. Obviously, it isn't quite that easy, each level implements different protection mechanisms, the JavaScript included in the pages has to be analysed and then manipulated to bypass the protections. 자바스크립트를 이해해서 결과가 success가 되도록 해보자. 토큰을 생성하는 자바스크립트 코드에 대한 패킷을 잡아서 분석해보면, function do_something(e){ for(var t="",n=e.length-1;n>=0;n--) t+=e.. 2022. 5. 29.
DVWA 실습 13. CSP Bypass (Medium) Objective Bypass Content Security Policy (CSP) and execute JavaScript in the page. CSP를 우회하고, 자바스크립트를 실행하자. include 버튼을 눌렀을 때, 응답 패킷을 보면 위와 같이 unsafe-inline 에 nonce로 이상한 값이 지정되어 있는 것을 확인할 수 있었다. https://simjaejin.tistory.com/31 그에 대한 설명은 위를 참고하자. 위 사이트의 말을 토대로, 스크립트에 nonce 값을 패킷에 있던 값과 동일하게 지정해주면 된다. 2022. 5. 29.
DVWA 실습 12. XSS (Stored) (Medium) Objective Redirect everyone to a web page of your choosing 내가 선택한 웹페이지로 리다이렉트 시켜보자. 소스코드를 보면 2022. 5. 29.
DVWA 실습 11. XSS (Reflected) (Medium) Objective One way or another, steal the cookie of a logged in user. 로그인한 사용자의 쿠키를 훔치자. 소스코드를 보면 를 공백으로 바꾸고 있다. 그래서 이중으로 입력을 해주니 아래와 같이 스크립트가 잘 동작하는 모습을 확인할 수 있었다. 2022. 5. 29.
반응형