목록웹 보안/XSS Challenges (12)
Study

•Stage 19 What you have to do: Inject the following JavaScript command: alert(document.domain); a태그의 href속성을 이용하므로 javascript: 를 이용하면 스크립트를 실행시키므로 위와 같이 코드를 바꿔주고 링크 클릭 시 스크립트가 실행되어 성공!

•Stage 15 What you have to do: Inject the following JavaScript command: alert(document.domain); 다음과 같이 특수문자가 필터링 된다 답) img태그 이용하고 를 \x3c, \x3e 이렇게 바꿔주면 된다 \x3cimg src=1 onerror=alert(document.domain)\x3e 하지만 위와 같이 입력하면 \이 제거되므로 최종 공격 코드는 다음과 같다 \\x3cimg src=1 onerror=alert(document.domain)\\x3e

•Stage 12 What you have to do: Inject the following JavaScript command: alert(document.domain); 다음과 같이 입력하면 이렇게 필터링 되어 나온다 “ 를 필터링하는 것을 알 수 있다 stage 6과 같이 풀면 풀리지만 다른 방법을 이용해 풀어봤다 답) 아래 공격은 IE에서만 동작한다 `` onmouseover=javascript:alert(document.domain) 을 삽입한 후 기다리면 새로고침이 되고 이때 input필드에 마우스를 올려놓으면 alert창이 뜬다

•Stage 10 What you have to do: Inject the following JavaScript command: alert(document.domain); 다음과 같이 입력하면 이렇게 domain을 필터링한다 답) 위와 같이 ddomainomain이렇게 입력해주면 필터링 될 때 ddomainmain 이렇게 필터링 되어 성공
•Stage 9 What you have to do: Inject the following JavaScript command: alert(document.domain); UTF-7인코딩을 이용해 푸는 문제 현재 크롬, IE, FireFox는 지원이 안되므로 못 푼다

What you have to do: Inject the following JavaScript command: alert(document.domain); 입력 값은 a태그의 href속성을 통해 링크가 된다 답) javascript: 로 시작하는 링크는 스크립트를 실행시키므로 다음과 같이 코드를 바꿔주고 링크 클릭 시 스크립트가 실행되어 성공

•Stage 6-7 What you have to do: Inject the following JavaScript command: alert(document.domain); script구문을 입력해보니 다음과 같이 특수문자가 HTML인코딩 되는 것을 알 수 있다. 답) HTML 태그 속성 이용한 우회기법을 사용 img태그를 사용해 onmouseover옵션을 사용한다. 특정 이미지 파일에 마우스를 올렸을 경우 다음과 같이 스크립트가 실행된다