이번엔 좀 특이한 쿼리문이 나왔다.
내 생각에는 만약 where절의 pw에 ' or id='admin'
를 삽입하여 select id from prob_skeleton where id=‘guest’ and pw=‘’ or id=‘admin’ and 1=0
와 같은 쿼리를 만들었을 때, id='admin' and 1=0
을 False (True and False)로 만들어줘서 작동이 안되겠끔하기 위해서 맨 뒤에 and 1=0
를 넣은 듯 하다.
하지만 우리에겐 주석처리라는 방법이 있다!
위와 같이 and 1=0
을 주석처리를 하면 True만 남게 됨으로 쿼리문의 결과는 admin을 반환하게 된다.
'워게임 > Lord of SQLInjection' 카테고리의 다른 글
[Lord of SQLInjection] Darkknight Write UP (0) | 2021.07.19 |
---|---|
[Lord of SQLInjection] Golem Write UP (0) | 2021.07.18 |
[Lord of SQLInjection] Vampire Write UP (0) | 2021.07.18 |
[Lord of SQLInjection]Troll Write UP (0) | 2021.07.16 |
[Lord of SQLInjection] Orge Write UP (0) | 2021.07.16 |