본문 바로가기

Wargame/Lord of SQL injection

Lord of SQL injection 03

3번 goblin

 

1, 2 번처럼 했더니 저렇게 떴다.

 

우선 no= 값을 구해보자.

 

?no=0

 

?no=1

 

guest의 no 값은 1이다.

 

그런데 문제를 clear하려면 id에 guest가 아닌 admin이 필요하기에 no 값은 0를 사용하겠다.

 

그럼 입력해야할 값은 ?no=0 or id='admin'

엥?

쿼리문의 No Quotes ~_~ 부분을 잘 살펴보니 ' 과 '' 를 쓰면 안된다고 한다.

그렇다고 ?no=0 or id=admin 를 입력하면...

문자열 admin을 인식하지 못한다.

 

그럼 admin 을 16진수 (hex) 로 바꾸어서 넣는 수밖에 없다.

아래 사이트는 문자열을 16진수로 바꾸어주는 사이트이다.

 

swiss converter tool | percederberg.net

 

swiss converter tool | percederberg.net

Swiss Converter Tool ...the Victorinox® knife of encoding Quick online encoding, decoding, escaping or unescaping of text and data. The tool autodetects the format and encoding when data is pasted into the input field. Supported formats are base64, hexade

www.percederberg.net

php에서 hex 형태를 인식시키려면 0x를 붙여야 한다고 한다.

 

?no=0 or id=0x61646D696E

라고 입력하면...!

 

 

 

 

'Wargame > Lord of SQL injection' 카테고리의 다른 글

Lord of SQL injection 07  (0) 2022.11.12
Lord of SQL injection 04  (0) 2022.11.12
Lord of SQL injection 01, 02  (0) 2022.11.12