본문 바로가기

워게임/LOS

[워게임 LOS] 문제 13번, 버그베어(Bugbear)



Lord Of SQL injection, 문제 13번 버그베어입니다.


  if(preg_match('/\'/i'$_GET[pw])) exit("HeHe"); 

  if(preg_match('/\'|substr|ascii|=|or|and| |like|0x/i'$_GET[no])) exit("HeHe"); 



이전 다크나이트 문제에 더해서 or, and, 공백(%20), like, 0x 를 필터링하고있습니다.

하지만 구조상에서는 비슷하기 때문에 적절하게 치환하시면됩니다.


Single quote는 Double quote

or, and는 || 와 %26%26

공백은 %0a %0b %09

like는 IN(" ")을 사용해서 우회하고

substr은 left 또는 right 사용


prob13 bugbear - lato.py