Github 上的 PocOrExp
## 使用说明
```
python3 exp.py -h
usage: exp.py [-h]
[-y {1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,all}]
[-i {y,n}] [-w {y,n}]
CVE Details and Collect PocOrExp in Github
optional arguments:
-h, --help show this help message and exit
-y {1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,all}, --year {1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,all}
get Poc or CVE of certain year or all years
-i {y,n}, --init {y,n}
init or not
-w {y,n}, --watch {y,n}
keep an eye on them or not
```
参数说明:
- -y 指定要处理的 CVE 年份
- -i 表示是否为首次初始化,y 代表初始化,将不处理已处理的 CVE;n 代表否,将处理已处理过的 CVE
- -w 监控 PoC 变化:当前策略是更新往年已知有 PoC 的 CVE,以及当年的所有 CVE
使用步骤:
- 步骤 1:安装依赖
```
pip3 install -r requirements.txt
```
- 步骤 2:申请 GitHub API token 并将其写入项目目录下的 TOKENS 文件中。格式如下,支持多个 token:
```
token:your_token
```
- 步骤 3:处理 CVE 信息
```
python3 exp.py -y 2021 -i y
python3 exp.py -y all -i y
```
- 如果您想加快处理速度,可以使用异步脚本 exp_async.py
## PocOrExps
- [PocOrExp 全部](https://github.com/ycdxsb/PocOrExp_in_Github/blob/main/PocOrExp.md)
- [2025](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2025/README.md)
- [2024](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2024/README.md)
- [2023](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2023/README.md)
- [2022](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2022/README.md)
- [2021](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2021/README.md)
- [2020](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2020/README.md)
- [2019](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2019/README.md)
- [2018](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2018/README.md)
- [2017](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2017/README.md)
- [2016](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2016/README.md)
- [2015](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2015/README.md)
- [2014](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2014/README.md)
- [2013](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2013/README.md)
- [2012](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2012/README.md)
- [2011](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2011/README.md)
- [2010](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2010/README.md)
- [2009](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2009/README.md)
- [2008](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2008/README.md)
- [2007](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2007/README.md)
- [2006](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2006/README.md)
- [2005](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2005/README.md)
- [2004](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2004/README.md)
- [2003](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2003/README.md)
- [2002](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2002/README.md)
- [2001](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2001/README.md)
- [2000](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/2000/README.md)
- [1999](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/1999/README.md)
## 日志
- 2021-04-12:修复了 GitHub 搜索在搜索 CVE-2020-3618 时返回 CVE-2020-36184 等结果的问题。
- 2021-04-13:由于 NVD 网站上缺少部分 CVE 编号,转而使用 CVE 官方数据,并发布了异步脚本。
- 2021-04-14:完成了第一轮 PocOrExp 爬取,目前使用 20 个 GitHub API token 在 12 小时内轮询所有 CVE 并进行更新。
- 2021-04-16:添加了 -w 参数。
- 2021-04-17:添加了每日更新脚本 today.py。更新内容可在 [今日更新](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/Today.md) 中查看。您可以对其进行修改,例如通过钉钉或 wxpusher 等服务将 `get_today_update` 的结果发送给自己。
- 2021-04-20:发现了一些非 PoC 仓库,通过添加黑名单将其移除,并将异步脚本更新至 v2 版本。
- 2021-04-23:发现今日更新中的部分结果并非最近更新的仓库,原因如下:
- 1. 仓库从私有转为公开。
- 2. 通过 API 查询时,脚本策略是按 star 数取前 30 个结果,因此当同一 CVE 的其他仓库数量增加时,它们进入了前 30 名列表,显示为今日新增。发现只有 CVE-2019-0708 的搜索结果超过 100 个,因此未使用分页进行全量爬取。改为每次按 star 数取前 100 个结果。
- 2021-04-30:[下载](https://github.com/ycdxsb/PocOrExp_in_Github/tree/main/download.py) 所有 PoC/Exp 以防发布者删除仓库。请将 git 更新到最新版本,以防止在 Windows 上克隆时遭受攻击 [CVE-2020-27955](https://github.com/yhsung/cve-2020-27955-poc)。
- 2021-05-19:发现 GitHub 上存在一些利用 CVE 的钓鱼行为,例如 [JamesGee](https://github.com/JamesGeee)。未做特殊处理,请务必小心。
- 2024-09-01:如果您在 GitHub 上找不到 POC/EXP,也可以在这里查看:https://pocorexps.nsa.im/
## Star 趋势
[](https://www.star-history.com/#ycdxsb/PocOrExp_in_Github&Date)
## 参考
- https://github.com/nomi-sec/PoC-in-GitHub