Written by
java-style
on
on
old-42
old-42
old-42
test.txt를 다운로드하면
딱히 도움이 될만한 것은 없는 듯하다.
flag.docx를 다운로드하면
접근할 수 없다.
페이지 소스 코드를 살펴보면
Challenge 42 nosubjectfile 2testtest.txt [download] 1read meflag.docx [download]
flag.docx의 href를 살펴보면, javascr1pt:alert("Access%20Denied")로 되어있다.
href는 hypertext reference의 약자로, 이동할 페이지의 링크를 적어둔다.
즉, 링크를 수정해서 flag.docx의 경로를 적으면 될 것 같다.
test.txt의 href를 살펴보면 "="으로 끝나는 것으로 보아 base64로 인코딩되어있음을 짐작할 수 있다.
base64로 인코딩 시, 패딩문자로 "="을 사용한다.
"dGVzdC50eHQ="를 base64 디코딩해보면 "test.txt"가 된다.
따라서, 파일 경로가 "?down={파일명 base64 인코딩}"임을 알 수 있다.
flag.docx를 base64 Encoding 해보면, "ZmxhZy5kb2N4"가 된다.
flag.docx의 href에 "?down=ZmxhZy5kb2N4"를 입력하면 flag.docx를 다운로드 받을 수 있다.
from http://woong971.tistory.com/263 by ccl(A) rewrite - 2021-12-30 12:02:07