29단계 : phantom
2020.01.27
LOS 29단계 시작! 이번 문제는 insert 문을 이용하여 해결해야 한다. 먼저 joinmail에 1이라는 값을 넣고 insert 하게 되면 다음과 같은 테이블이 생기게 된다. insert 문에서는 별도의 필터링이 없다면 여러 열을 삽입할 수 있는 취약점이 존재한다. 때문에 value(0,'ip','1'), (0,'ip',([select 문]) 과 같이 원하는 쿼리를 실행해 볼 수 있게 된다. no가 1인 email 을 조회하기 위한 select 문은 다음과 같다. select email from prob_phantom where no=1 이를 이용하여 쿼리를 작성하면 ?joinmail=1'), (0,'ip',(select email from prob_phantom where no=1)) %23 이 ..