Iriton's log

[Root.me] Challenge: Javascript - Authentication 본문

WebHacking/WarGame

[Root.me] Challenge: Javascript - Authentication

Iriton 2023. 9. 25. 19:44
 

Challenges/Web - Client : Javascript - Authentication [Root Me : Hacking and Information Security learning platform]

TCP - Back to school just blocks when i try to read the flag after i have sent the calculation. Not sure if my calculation is wrong or what is is?

www.root-me.org

얘는 문제 찾는 데도 어려움이 좀... 있었다.

아무튼 시작해 보자.

 

로그인을 해야 되는 문제다.

아무거나 입력하면 다음과 같은 경고창이 뜬다.

소스코드를 확인해 보자

 

다 생략하고 Sources 에서 login.js를 확인하면 될 거 같다.

우리는 로그인 성공하는 게 목표니까

/* <![CDATA[ */

function Login(){
	var pseudo=document.login.pseudo.value; //로그인 입력값에서 pseudo 값을 가져온다.
	var username=pseudo.toLowerCase();  //소문자로 변환
	var password=document.login.password.value; //입력값 password 값을 가져온다.
	password=password.toLowerCase(); //소문자로 변환
	if (pseudo=="4dm1n" && password=="sh.org") { 
	    alert("Password accepté, vous pouvez valider le challenge avec ce mot de passe.\nYou an validate the challenge using this password."); //일치하면 뜨는 경고창(근데 챌린지에서 이 비밀번호 값을 이용하란다.)
	} else { //일치하지 않으면 실행되는 조건문
	    alert("Mauvais mot de passe / wrong password"); 
	}
}
/* ]]> */

해당 자바스크립트 코드에 대한 주석을 달아봤다.

로그인 굳이 할 필요 없이, alert 내용을 미리 봤으니

말 그대로 챌린지 flag로 입력하자.

'WebHacking > WarGame' 카테고리의 다른 글

[Dreamhack] file-download-1  (0) 2023.09.27
[Webhacking.kr] old-12 write-up  (0) 2023.09.25
[Root.me] Challenge: Javascript - Webpack  (1) 2023.09.25
[RootMe] Challenge: HTTP - Cookies  (0) 2023.09.20
[Webhacking.kr] old-42 write-up  (0) 2023.09.18
Comments