write-up/XSS-game write-up

XSS game level 1 - Hello, world of XSS

정보보호학과 새내기 2021. 7. 18. 12:16
반응형
SMALL

Mission Description

This level demonstrates a common cause of cross-site scripting where user input is directly included in the page without proper escaping.

--> 이 레벨은 사용자 입력이 적절한 탈출 없이 페이지에 직접 포함되는 사이트 간 스크립팅의 일반적인 원인을 보여준다.


Interact with the vulnerable application window below and find a way to make it execute JavaScript of your choosing. You can take actions inside the vulnerable window or directly edit its URL bar.

--> 아래의 취약한 애플리케이션 창과 상호 작용하여 선택한 javascript를 실행할 수 있는 방법을 찾아라. 취약한 창 내에서 작업을 수행하거나 해당 URL 표시줄을 직접 편집할 수 있음

Mission Objective

Inject a script to pop up a JavaScript alert() in the frame below.
--> 스크립트를 주입하여 javascript alert()를 표시함.
Once you show the alert you will be able to advance to the next level.

--> alert를 보면 다음 레벨에 도전할 수 있음

 

Solve

아래 코드를 보니 입력창에 입력한 값을 html 코드에 넣는 것을 알 수 있다.

따라서 alert창을 띄우려면 <script>를 이용해 javascript를 이용한다는 것을 알리고 alert("Hello")를 이용하여 script 창을 띄울 수 있다.

<script>alert("Hello");</script>를 입력한다.

위처럼 입력하면 아래 결과가 나온다.

클리어 화면

반응형
LIST