CTF 学习笔记 02--Web漏洞挖掘和利用

##基础部分

java web  ---->web漏洞挖掘 web服务器安全检测 web的代码审计 web常见漏洞 web的补丁方法

python    ----->漏洞利用脚本设计

c              ----->web服务器运维

##WEB AWD 漏洞挖掘技巧

*    调试环境搭建

        PHP 5&7    MySQL    Apache     Nginx    Python

        神器-->PhpStudy

                    

         PhpStudy + Xdebug + PHPstorm10

                    

*    常见题目类型

        Webshell            :通过特定URL触发

                    一句话木马

                    有混淆的webshell

                                         

        文件上传漏洞

                    上传检测方式:

                                客户端JavaScript检测

                                          

                                服务器MIME类型检测

                                          

                                          

                                服务端文件拓展名检测

                                           

                                           

                                           

                                服务端内容检测

                                           

        文件包含漏洞

                                            

                                            

                                            

                                            

        数据库攻击

                                                     

        反序列化漏洞

                                            

                                            

        XXE攻击

                                            

##正则表达式

                                                     

                              

                              

                                

##常见套路

*公布的RCE漏洞

             判断是否为一直的CMS或者框架

                                   

                收集更多信息

                                    

                                    

                google/baidu 已有漏洞

                                    

                验证找到的poc

                                    

*本地漏洞库备份

出名的漏洞库网站

国外
[https://www.exploit-db.com/](https://www.exploit-db.com/)
[http://seclists.org/](http://seclists.org/)
[https://cn.0day.today/](https://cn.0day.today/)
国内
乌云镜像站
Seebug (https://paper.seebug.org/)
http://0day5.com/

备份工具:

http://www.httrack.com/
wget -r -c- p www.example.com
kali 自带的 setoolkit 工具
                              

*常用的工具

                                    

##漏洞利用

             web漏洞一般通过特定的url,发送一个流量触发。   

*全场开火

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import time

from core.exploit.submit_flag import *
from core.exploit.get_flag import *

token = "DqSXgARhK0brh2im8plcH4EdvluS2KmW8MpJCb0oeWQJoSYBrnLLdDtqzAbd78nAbZP9wFBjFEb"

def exploit(host, port):
#此处填发送的漏洞url数据包
    flag = get_flag(host, port)
    submit_flag(flag, token)

def exploit_all():
    with open("targets") as f:
        for line in f:
            host = line.split(":")[0]                    #来源:文件,存放所有ip和端口,批量打击。
            port = int(line.split(":")[1])
            print "[+] Exploiting : %s:%d" % (host, port)
            exploit(host, port)

def main():
    print "[+] Starting attack framework..."
    round_time = 60 * 5
    print "[+] Round time : %s seconds..." % (round_time)
    wait_time = round_time / 2
    print "[+] Wait time : %s seconds..." % (wait_time)
    while True:
        exploit_all()
        print "[+] This round is finished , waiting for the next round..."
        for i in range(wait_time):
            print "[+] The next attack is %d seconds later..." % (wait_time - i)
            time.sleep(1)

if __name__ == "__main__":
    main()


猜你喜欢

转载自blog.csdn.net/qq_38055050/article/details/80715340