입력이 가능한 곳
ex) 로그인, SQL구문에 연결된 파라미터,데이터
예상 SQL문 select * from 테이블 where user='유저명'
▼xcvb 입력시
▼xcvb and '1'='1 입력시
▼xcvb and '1'='2 입력시
두번째 칸에 써있던 Nothing here... 메세지가 사라진 것을 볼 수 있다.
이걸 이용해서 Blind SQLi 하면 된다.
문제풀이는 >> https://velog.io/@dmkr9845/CTF-SQL-Injection-Point-1
예상 SQL문
select * from table where option_val like '%board_result%' order by ~~
뒤에 like 때문에 username and '1'='1' 이 아닌
'1'='1' and username이 들어가야함.
결과는 정상출력.
False로 만들기 위해 username and '1'='2' 입력
결과가 출력되지 않는다.
여기서 Blind SQLi
문제풀이 >> https://velog.io/@dmkr9845/CTF-SQL-Injection-Point-2
예상 SQL문 select * from table where option_val like '%board_result%' order by sort
case when 이용
case when
sql의 조건문.
case when (조건) then (조건이 참) else (조건이 거짓) end
조건이 참이면 test1 이 첫번째로 뜨고
조건이 거짓이면 GGGGGGGGG가 첫번째로 뜬다.
여기서 Blind SQLi