April 16, 2019

WebGoat write up(Cross-Site Scripting 7 Try It! Reflected XSS)

To comply with the rule, in this write up, some hints related to this challenge only will be mentioned.

룰을 준수하기 위해, 여기서는 챌린지와과 관련된 몇 가지 힌트만이 언급됩니다.

Try It! Reflected XSS
리플렉티드 XSS 공격 실습.

Identify which field is susceptible to XSS
어떤 필드가 XSS 공격에 취약한지 식별하라.

It is always a good practice to validate all input on the server side. XSS can occur when unvalidated user input is used in an HTTP response. In a reflected XSS attack, an attacker can craft a URL with the attack script and post it to another website, email it, or otherwise get a victim to click on it.

서버 측에서 모든 입력 값의 유효성을 검사하는 것(필터링)은 좋은 관행이다. XSS 공격은 검증되지 않은 사용자의 입력 값으로부터 유발될 수 있다. 리플렉티드 XSS 공격에서, 공격자는 URL을 조작하여 공격 코드를 심는데, 이를 특정 웹 사이트에 개시하거나 이메일로 전송하거나 혹은 다른 방법을 통해 클릭하도록 만든다.

Make sure to include in your attack payload "<script>alert('my javascript here')</script>".

공격 코드에 "<script>alert('my javascript here')</script>"를 포함시킨다.

This is a vulnerability that occurs because the server does not properly check whether it is number. It can be defended by checking it properly, or it can be solved by preventing displaying text from the user's input.

이는 서버 측에서 숫자만 들어가야 하는 부분인 것을 제대로 체크하지 않아 발생하는 취약점이다. 이를 제대로 확인하여 방어할 수도 있고, 사용자가 입력한 값을 화면에 보여주지 않도록 조치하여도 해결할 수 있다.

Cross-Site Scripting 7 Try It! Reflected XSS result