-
LOS - giant / level 14Web/SQLI 2024. 6. 29. 17:33
문제
풀이 과정
if(preg_match('/ |\n|\r|\t/i', $_GET[shit])) exit("HeHe");
$query = "select 1234 from{$_GET[shit]}prob_giant where 1";shit에 / / \n / \r / \t /가 필터링 됨을 알 수 있다
결국 shit에 공백 값을 넣어 select 1234 from prob_giant where 1를 만들어야 하기 때문에 공백 우회가 필요하다
\v : vertical tab
\f : form feed
둘 다 수직으로 탭을 사용하지만 차이점이 있다
\v는 수직으로 탭을 사용하지만 앞에 공백이 없고
\t는 앞에 공백을 채운다
# \v test print("Hello\vWorld") # Hello # World # \f test print("Hello\fWorld") # Hello # World => World 앞 부분에 공백 존재
해당 값의 16진수는 0x0b / 0x0c
정답
더보기?shit=%0b
?shit=%0c
'Web > SQLI' 카테고리의 다른 글
LOS - succubus / level 16 (0) 2024.07.01 LOS - assassin / level 15 (0) 2024.07.01 LOS - bugbear / level 13 (0) 2024.06.29 LOS - darknight / level 12 (0) 2024.06.24 LOS - golem / level 11 (0) 2024.06.24