Cross Site Scripting(XSS)
Script injection(Scripting) that ruins(Croxx. X) the site(Site).
A vulnerability that occurs when Web pages do not properly convert special characters.
Cross Site Scripting(XSS)
사이트를(Site) 망치는(Cross. X) 스크립트 주입(Scripting).
웹 페이지에서 특수문자를 적절히 변환하지 않을 때 발생하는 취약점.
Why attacks are not easily identified?
The attack is successful just by clicking a link on the normal site.
공격이 쉽게 식별되지 않는 이유?
정상적인 사이트의 링크를 클릭하는 것만으로도 공격이 성공하기 때문.
Why this is possible.
By adding the malicious script to links to normal site(Reflected, DOM based type)
or by the malicious script is planted in a post of the normal site(Stored type).
이것이 가능한 이유.
정상적인 사이트의 링크에 악성 코드를 덧붙이거나(Reflected, DOM based 유형).
정상적인 사이트의 게시물에 악성 코드를 심기 때문(Stored 유형).
Example of attack code.
공격 코드 예시
The victim receives the following link from the attacker.
희생자는 공격자로부터 아래의 링크를 전송받는다.
http://www.server.com/search/?q=%3Cscript%3Ealert%28document.cookie%29%3C%2Fscript%3E&x=0&y=0
It is encoded to make it difficult to identify attack code.
The decoded URL is as follows.
이는 공격코드를 식별하기 어렵게 만들기 위해 인코딩 되어있다.
이를 디코딩하면 아래와 같다.
http://www.server.com/search/?q=<script>alert(document.cookie)</script>&x=0&y=0
The victim usually clicks without suspicion and accesses the page. If the page is vulnerable to XSS attacks, the attack code will automatically be embedded on the page and then run.
희생자는 보통 의심 없이 클릭하여 해당 페이지에 접속할 텐데, XSS 공격에 취약한 페이지라면, 자동으로 공격 코드가 페이지에 심어진 뒤 동작한다.
"document.cookie" usually has the login information(session) that can be logged into the victim's account without the password if the attacker obtains it.
"document.cookie"는 보통 로그인 정보(세션)가 담겨있는 부분으로, 공격자가 획득한다면 비밀번호 없이도 희생자의 계정으로 로그인할 수 있다.
"alert ()" is a simple function to display a string on the screen, but if it is replaced with a function that sends information, the login information can be leaked.
"alert()"는 단순히 문자열을 화면에 띄우는 간단한 함수일 뿐이지만, 공격자에게 정보를 전송하는 함수로 교체된다면 로그인 정보가 유출될 수 있다.
So, just clicking a link can leak your account.
결국, 링크를 클릭하는 것만으로도 계정이 유출될 수 있다.