일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 웹개발
- file upload
- php
- 세션
- sql injection
- 로그인페이지
- 모의해킹
- JS
- CTF
- Python
- JWT
- css
- Cross Site Request Forgery
- 쿠키
- 로그인
- Reflected Xss
- cors
- MySQL
- csrf
- sql injection point
- 게시판 만들기
- Error based sql injection
- lord of sqli
- XSS
- blind sql injection
- Los
- 과제
- lord of sql injection
- cookie 탈취
- union sql injection
- Today
- Total
목록SQLi (2)
Almon Dev

LOS 풀이 orge 풀이1. 코드 분석GET 메서드의 pw와 쿼리 결과의 pw가 일치하면 문제가 풀립니다.그렇다면 admin 계정의 실제 비밀번호를 알아야 풀 수 있는것 같습니다.$_GET[pw] = addslashes($_GET[pw]); $query = "select pw from prob_orge where id='admin' and pw='{$_GET[pw]}'"; $result = @mysqli_fetch_array(mysqli_query($db,$query)); if(($result['pw']) && ($result['pw'] == $_GET['pw'])) solve("orge"); 이번에도 or 과 and를 필터링 하기 때문에 || 와 &&를 활용해야 합니다.if(preg_match('/..

LOS 풀이 goblin 풀이1. 코드 분석GET 메서드로 no 파라미터에 값이 쿼리에 삽입되고 쿼리의 결과중 id가 admin인 경우 문제가 풀립니다.$query = "select id from prob_goblin where id='guest' and no={$_GET[no]}"; $result = @mysqli_fetch_array(mysqli_query($db,$query)); if($result['id']) echo "Hello {$result[id]}";if($result['id'] == 'admin') solve("goblin"); prob _ . () 뿐만 아니라 ' " ` 까지 필터링이 됩니다.if(preg_match('/prob|_|\.|\(\)/i', $_GET[no])) exit(..