Git Product home page Git Product logo

cve_diff_checker's Introduction

CVE Diff Checker

diff checker主要思路是使用历史diff代码到二次开发的项目里面匹配对应的补丁是否被修改.

用法:

python ./main.py 你的项目代码路径

比如说项目组引入Qemu作为第三方库,然后要快速检测该版本的Qemu源码存在哪些漏洞:

python ./main.py  ./qemu-source-5.2.1

对于某些版本的linux,我们要快速检索1day.方法如下:

uname -a
>> linux 4.18.0
python ./main.py  ./linux-4.18.0
>>fix_result
['CVE-2015-0239', 'CVE-2015-1333', 'CVE-2015-1339', 'CVE-2015-1465', 'CVE-2015-2041', 'CVE-2015-2042', 'CVE-2015-2150', 'CVE-2015-2925', 'CVE-2015-3212', 'CVE-2015-3214', 'CVE-2015-3291', 'CVE-2015-4036', 'CVE-2015-4167', 'CVE-2015-4170', 'CVE-2015-4177', 'CVE-2015-4178', 'CVE-2015-5283', 'CVE-2015-5307', 'CVE-2015-5327', 'CVE-2015-5697', 'CVE-2015-7515', 'CVE-2015-7550', 'CVE-2015-7884', 'CVE-2015-8104', 'CVE-2015-8215', 'CVE-2015-8324', 'CVE-2015-8569', 'CVE-2015-8746', 'CVE-2015-8767', 'CVE-2015-8785', 'CVE-2015-8787', 'CVE-2015-8812', 'CVE-2015-8839', 'CVE-2015-8950', 'CVE-2015-8956', 'CVE-2015-8961', 'CVE-2015-8963', 'CVE-2015-8964', 'CVE-2015-8966', 'CVE-2015-8967', 'CVE-2015-9016', 'CVE-2015-9289', 'CVE-2016-0758', 'CVE-2016-0821', 'CVE-2016-10044', 'CVE-2016-10147', 'CVE-2016-10150', 'CVE-2016-10154', 'CVE-2016-10200', 'CVE-2016-10905', 'CVE-2016-10906', 'CVE-2016-10907', 'CVE-2016-1237', 'CVE-2016-1583', 'CVE-2016-2053', 'CVE-2016-2085', 'CVE-2016-2185', 'CVE-2016-2186', 'CVE-2016-2187', 'CVE-2016-2543', 'CVE-2016-2544', 'CVE-2016-2546', 'CVE-2016-2550', 'CVE-2016-3070', 'CVE-2016-3134', 'CVE-2016-3136', 'CVE-2016-3137', 'CVE-2016-3138', 'CVE-2016-3156', 'CVE-2016-3689', 'CVE-2016-3713', 'CVE-2016-3841', 'CVE-2016-3951', 'CVE-2016-3955', 'CVE-2016-4470', 'CVE-2016-4482', 'CVE-2016-4485', 'CVE-2016-4569', 'CVE-2016-4578', 'CVE-2016-4580', 'CVE-2016-4581', 'CVE-2016-4913', 'CVE-2016-4997', 'CVE-2016-5195', 'CVE-2016-5244', 'CVE-2016-5400', 'CVE-2016-5412', 'CVE-2016-5829', 'CVE-2016-6130', 'CVE-2016-6136', 'CVE-2016-6187', 'CVE-2016-6197', 'CVE-2016-6213', 'CVE-2016-6516', 'CVE-2016-6786', 'CVE-2016-6787', 'CVE-2016-7097', 'CVE-2016-7910', 'CVE-2016-7911', 'CVE-2016-7912', 'CVE-2016-7914', 'CVE-2016-7915', 'CVE-2016-7917', 'CVE-2016-8630', 'CVE-2016-8633', 'CVE-2016-8636', 'CVE-2016-8646', 'CVE-2016-8650', 'CVE-2016-8655', 'CVE-2016-8658', 'CVE-2016-9083', 'CVE-2016-9084', 'CVE-2016-9178', 'CVE-2016-9191', 'CVE-2016-9313', 'CVE-2016-9604', 'CVE-2016-9754', 'CVE-2016-9756', 'CVE-2016-9777', 'CVE-2016-9793', 'CVE-2016-9806', 'CVE-2018-1000200', 'CVE-2018-1000204', 'CVE-2018-10021', 'CVE-2018-10074', 'CVE-2018-10087', 'CVE-2018-10124', 'CVE-2018-1065', 'CVE-2018-1066', 'CVE-2018-10675', 'CVE-2018-1068', 'CVE-2018-10853', 'CVE-2018-10878', 'CVE-2018-10879', 'CVE-2018-10880', 'CVE-2018-10881', 'CVE-2018-10882', 'CVE-2018-10883', 'CVE-2018-10902', 'CVE-2018-1091', 'CVE-2018-1092', 'CVE-2018-1093', 'CVE-2018-10938', 'CVE-2018-1094', 'CVE-2018-10940', 'CVE-2018-1120', 'CVE-2018-11232', 'CVE-2018-1130', 'CVE-2018-11506', 'CVE-2018-11508', 'CVE-2018-12232', 'CVE-2018-12633', 'CVE-2018-12714', 'CVE-2018-13093', 'CVE-2018-13094', 'CVE-2018-13095', 'CVE-2018-13405', 'CVE-2018-13406', 'CVE-2018-14619', 'CVE-2018-14646', 'CVE-2018-14734', 'CVE-2018-16276', 'CVE-2018-18386', 'CVE-2018-18690', 'CVE-2018-20961', 'CVE-2018-20976', 'CVE-2018-21008', 'CVE-2018-25015', 'CVE-2018-5332', 'CVE-2018-5333', 'CVE-2018-5344', 'CVE-2018-5390', 'CVE-2018-5803', 'CVE-2018-5814', 'CVE-2018-5873', 'CVE-2018-6412', 'CVE-2018-6927', 'CVE-2018-7191', 'CVE-2018-7492', 'CVE-2018-7566', 'CVE-2018-7757', 'CVE-2018-7995', 'CVE-2018-8043', 'CVE-2018-8087', 'CVE-2018-8897', 'CVE-2019-12379', 'CVE-2019-14763', 'CVE-2019-15239', 'CVE-2019-18675', 'CVE-2020-8835', 'CVE-2021-20261', 'CVE-2021-20265']
no_fix_result
['CVE-2015-1573', 'CVE-2015-5257', 'CVE-2015-7837', 'CVE-2016-0723', 'CVE-2016-1583', 'CVE-2016-3140', 'CVE-2016-3695', 'CVE-2016-4578', 'CVE-2016-9555', 'CVE-2018-10878', 'CVE-2018-13053', 'CVE-2018-13096', 'CVE-2018-13097', 'CVE-2018-13098', 'CVE-2018-13099', 'CVE-2018-13100', 'CVE-2018-14633', 'CVE-2018-14641', 'CVE-2018-14656', 'CVE-2018-15572', 'CVE-2018-15594', 'CVE-2018-16658', 'CVE-2018-18021', 'CVE-2018-18281', 'CVE-2018-18397', 'CVE-2018-18445', 'CVE-2018-18710', 'CVE-2018-18955', 'CVE-2018-19824', 'CVE-2018-20169', 'CVE-2018-20511', 'CVE-2018-20784', 'CVE-2018-20836', 'CVE-2018-20855', 'CVE-2018-20856', 'CVE-2018-5391', 'CVE-2018-5953', 'CVE-2019-10638', 'CVE-2019-10639', 'CVE-2019-11477', 'CVE-2019-11478', 'CVE-2019-11479', 'CVE-2019-11486', 'CVE-2019-11487', 'CVE-2019-11599', 'CVE-2019-11810', 'CVE-2019-11811', 'CVE-2019-11815', 'CVE-2019-11833', 'CVE-2019-11884', 'CVE-2019-12378', 'CVE-2019-12379', 'CVE-2019-12380', 'CVE-2019-12381', 'CVE-2019-12382', 'CVE-2019-12456', 'CVE-2019-12614', 'CVE-2019-12615', 'CVE-2019-12817', 'CVE-2019-12818', 'CVE-2019-12819', 'CVE-2019-12984', 'CVE-2019-13233', 'CVE-2019-13272', 'CVE-2019-14284', 'CVE-2019-14763', 'CVE-2019-14814', 'CVE-2019-14815', 'CVE-2019-14816', 'CVE-2019-15030', 'CVE-2019-15031', 'CVE-2019-15090', 'CVE-2019-15117', 'CVE-2019-15118', 'CVE-2019-15211', 'CVE-2019-15212', 'CVE-2019-15213', 'CVE-2019-15214', 'CVE-2019-15215', 'CVE-2019-15216', 'CVE-2019-15218', 'CVE-2019-15219', 'CVE-2019-15220', 'CVE-2019-15221', 'CVE-2019-15292', 'CVE-2019-15505', 'CVE-2019-15538', 'CVE-2019-15666', 'CVE-2019-15807', 'CVE-2019-15916', 'CVE-2019-15919', 'CVE-2019-15920', 'CVE-2019-15921', 'CVE-2019-15922', 'CVE-2019-15923', 'CVE-2019-15924', 'CVE-2019-15925', 'CVE-2019-15926', 'CVE-2019-15927', 'CVE-2019-16413', 'CVE-2019-16994', 'CVE-2019-16995', 'CVE-2019-17052', 'CVE-2019-17053', 'CVE-2019-17054', 'CVE-2019-17055', 'CVE-2019-17056', 'CVE-2019-17351', 'CVE-2019-18198', 'CVE-2019-18282', 'CVE-2019-18805', 'CVE-2019-18806', 'CVE-2019-18808', 'CVE-2019-18809', 'CVE-2019-19045', 'CVE-2019-19046', 'CVE-2019-19048', 'CVE-2019-19049', 'CVE-2019-19052', 'CVE-2019-19054', 'CVE-2019-19056', 'CVE-2019-19057', 'CVE-2019-19058', 'CVE-2019-19060', 'CVE-2019-19063', 'CVE-2019-19065', 'CVE-2019-19066', 'CVE-2019-19067', 'CVE-2019-19068', 'CVE-2019-19071', 'CVE-2019-19072', 'CVE-2019-19073', 'CVE-2019-19074', 'CVE-2019-19075', 'CVE-2019-19077', 'CVE-2019-19078', 'CVE-2019-19079', 'CVE-2019-19080', 'CVE-2019-19081', 'CVE-2019-19082', 'CVE-2019-19227', 'CVE-2019-19252', 'CVE-2019-19319', 'CVE-2019-19523', 'CVE-2019-19524', 'CVE-2019-19525', 'CVE-2019-19526', 'CVE-2019-19527', 'CVE-2019-19528', 'CVE-2019-19529', 'CVE-2019-19530', 'CVE-2019-19531', 'CVE-2019-19532', 'CVE-2019-19533', 'CVE-2019-19534', 'CVE-2019-19535', 'CVE-2019-19536', 'CVE-2019-19537', 'CVE-2019-19543', 'CVE-2019-19602', 'CVE-2019-19815', 'CVE-2019-19922', 'CVE-2019-19927', 'CVE-2019-19965', 'CVE-2019-19966', 'CVE-2019-20054', 'CVE-2019-20095', 'CVE-2019-20096', 'CVE-2019-20636', 'CVE-2019-20806', 'CVE-2019-20810', 'CVE-2019-20811', 'CVE-2019-20812', 'CVE-2019-20908', 'CVE-2019-20934', 'CVE-2019-25045', 'CVE-2019-3701', 'CVE-2019-5489', 'CVE-2019-6974', 'CVE-2019-7222', 'CVE-2019-7308', 'CVE-2019-8956', 'CVE-2019-9003', 'CVE-2019-9162', 'CVE-2019-9213', 'CVE-2019-9857', 'CVE-2020-10720', 'CVE-2020-10757', 'CVE-2020-10773', 'CVE-2020-10781', 'CVE-2020-11494', 'CVE-2020-11565', 'CVE-2020-11608', 'CVE-2020-11609', 'CVE-2020-11668', 'CVE-2020-11884', 'CVE-2020-12464', 'CVE-2020-12465', 'CVE-2020-12652', 'CVE-2020-12653', 'CVE-2020-12654', 'CVE-2020-12655', 'CVE-2020-12657', 'CVE-2020-12768', 'CVE-2020-12769', 'CVE-2020-12826', 'CVE-2020-13143', 'CVE-2020-13974', 'CVE-2020-14314', 'CVE-2020-14381', 'CVE-2020-14385', 'CVE-2020-14386', 'CVE-2020-14416', 'CVE-2020-15393', 'CVE-2020-15780', 'CVE-2020-16119', 'CVE-2020-16166', 'CVE-2020-24394', 'CVE-2020-25284', 'CVE-2020-25285', 'CVE-2020-25641', 'CVE-2020-25643', 'CVE-2020-25668', 'CVE-2020-25669', 'CVE-2020-25704', 'CVE-2020-26088', 'CVE-2020-27673', 'CVE-2020-27675', 'CVE-2020-27777', 'CVE-2020-27786', 'CVE-2020-27815', 'CVE-2020-28097', 'CVE-2020-28374', 'CVE-2020-28915', 'CVE-2020-28974', 'CVE-2020-29368', 'CVE-2020-29369', 'CVE-2020-29370', 'CVE-2020-29371', 'CVE-2020-29372', 'CVE-2020-29374', 'CVE-2020-29660', 'CVE-2020-29661', 'CVE-2020-35508', 'CVE-2020-36158', 'CVE-2020-36310', 'CVE-2020-36312', 'CVE-2020-36322', 'CVE-2020-36385', 'CVE-2020-36386', 'CVE-2020-7053', 'CVE-2020-9383', 'CVE-2021-20317', 'CVE-2021-22555', 'CVE-2021-23133', 'CVE-2021-27363', 'CVE-2021-27364', 'CVE-2021-27365', 'CVE-2021-28964', 'CVE-2021-28971', 'CVE-2021-28972', 'CVE-2021-29264', 'CVE-2021-29265', 'CVE-2021-29650', 'CVE-2021-30002', 'CVE-2021-3178', 'CVE-2021-31916', 'CVE-2021-32399', 'CVE-2021-33033', 'CVE-2021-33034', 'CVE-2021-3347', 'CVE-2021-33909', 'CVE-2021-3493', 'CVE-2021-3573', 'CVE-2021-3679', 'CVE-2021-37576', 'CVE-2021-38160', 'CVE-2021-38199', 'CVE-2021-38204', 'CVE-2021-38206', 'CVE-2021-38300', 'CVE-2021-40490', 'CVE-2021-41864', 'CVE-2021-42008', 'CVE-2021-42739']

基本原理

diff checker核心逻辑是以下论证思路:

1.旧代码存在,新代码不存在,故漏洞存在

2.旧代码不存在,新代码存在,故漏洞不存在

3.旧代码存在,新代码存在,故漏洞不存在(代码演进/在原有的代码上引入判断)

4.旧代码不存在,新代码不存在,故漏洞不存在(代码演进,如有漏洞则为新CVE)

不足

对文件路径非常依赖,像qemu这样大版本修改之后,原有文件改了个目录,和diff记录中对应不上来,就会产生漏报,暂无比较好的解决方法.

cve_diff_checker's People

Contributors

lcatro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.