All Projects → evdenis → cvehound

evdenis / cvehound

Licence: GPL-3.0 License
Check linux sources dump for known CVEs.

Programming Languages

SmPL
4 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to cvehound

Windowsexploitationresources
Resources for Windows exploit development
Stars: ✭ 631 (+752.7%)
Mutual labels:  kernel, cve
Cve Search
cve-search - a tool to perform local searches for known vulnerabilities
Stars: ✭ 1,765 (+2285.14%)
Mutual labels:  cve, cve-scanning
PatrowlHearsData
Open-Source Vulnerability Intelligence Center - Unified source of vulnerability, exploit and threat Intelligence feeds
Stars: ✭ 66 (-10.81%)
Mutual labels:  cve, cve-scanning
CVE-Stockpile
Master list of all my vulnerability discoveries. Mostly 3rd party kernel drivers.
Stars: ✭ 41 (-44.59%)
Mutual labels:  kernel, cve
web-cve-tests
A simple framework for sending test payloads for known web CVEs.
Stars: ✭ 120 (+62.16%)
Mutual labels:  cve, cve-scanning
oxdpus
A toy tool that leverages the super powers of XDP to bring in-kernel IP filtering
Stars: ✭ 59 (-20.27%)
Mutual labels:  kernel
Fukuro
Simple microkernel (early stage)
Stars: ✭ 18 (-75.68%)
Mutual labels:  kernel
Sigma
Abandoned overcomplicated Microkernel using modern x86_64 features
Stars: ✭ 36 (-51.35%)
Mutual labels:  kernel
linux kernel wiki
linux内核学习资料:200+经典内核文章,100+内核论文,50+内核项目,500+内核面试题,80+内核视频
Stars: ✭ 1,653 (+2133.78%)
Mutual labels:  kernel
Microdot
The Microdot Project guides you to create a fully functional but compact Linux system from scratch
Stars: ✭ 41 (-44.59%)
Mutual labels:  kernel
dependency-check-py
🔐 Shim to easily install OWASP dependency-check-cli into Python projects
Stars: ✭ 44 (-40.54%)
Mutual labels:  cve-scanning
srcinv
source code audit tool
Stars: ✭ 45 (-39.19%)
Mutual labels:  kernel
slabdbg
GDB plug-in that helps exploiting the Linux kernel's SLUB allocator
Stars: ✭ 55 (-25.68%)
Mutual labels:  kernel
terabit-network-stack-profiling
Tools for profiling the Linux network stack.
Stars: ✭ 68 (-8.11%)
Mutual labels:  kernel
pwru
Packet, where are you? -- Linux kernel networking debugger
Stars: ✭ 694 (+837.84%)
Mutual labels:  kernel
hermit-playground
A playground to build C/C++/Go/Fortran applications on top of RustyHermit
Stars: ✭ 13 (-82.43%)
Mutual labels:  kernel
imongo
A MongoDB kernel for Jupyter
Stars: ✭ 51 (-31.08%)
Mutual labels:  kernel
xbox kernel test suite
Xbox kernel APIs tester written using nxdk
Stars: ✭ 17 (-77.03%)
Mutual labels:  kernel
log4j2-rce-exploit
log4j2 remote code execution or IP leakage exploit (with examples)
Stars: ✭ 62 (-16.22%)
Mutual labels:  cve
btfhub
BTFHub, together with BTFHub Archive repository, provides BTF files for existing published kernels that don't support embedded BTF.
Stars: ✭ 100 (+35.14%)
Mutual labels:  kernel

GitHub Actions status Supported Versions of Python PyPI package version

CVEhound

CVEhound is a tool for checking linux sources for known CVEs. The tool is based on coccinelle rules and grep patterns. The tool checks sources for vulnerable code patterns of known CVEs and missing fixes for them.

  • What: The tool tries to find "unfixed" code of known CVEs;
  • How: The tool uses coccinelle/grep rules with patterns that helps to detect known CVE bugs or their fixes. Thus, sources are checked either for a presence of "unfixed" code pieces (e.g. CVE-2020-12912), or for an absence of a fix (e.g. CVE-2020-26088);
  • Why: If you have a git log then it's easier to check what CVEs are fixed based on a git history. However, many vendors (samsung, huawei, various iot, routers manufacturers) publish kernel sources as archives without a development log. In most cases their kernels are based on LTS kernels, but versions are far from upstream. Linux version string from Makefile will only give you an information about what CVEs were fixed by kernel developers upto this version. It will not help you to understand what fixes were backported by a vendor itself. In this case it's possible to apply the tool and check "missing" CVE fixes.

Prerequisites

  • Python 3 (>=3.5)
  • pip (Python package manager)
  • grep with pcre support (-P flag)
  • coccinelle (>= 1.0.4)

Install prerequisites:

# Ubuntu, coccinelle uses libpython2.7 internally
# Seems like some ppas mark libpython dependency as optional
$ sudo apt install python3-pip coccinelle libpython2.7

# Fedora
$ sudo dnf install python3-pip coccinelle

Installation

To install the latest stable version just run the following command:

$ python3 -m pip install --user cvehound

For development purposes you may install cvehound in "editable" mode directly from the repository (clone it on your computer beforehand):

$ pip install -e .

How to use

The simplest way to start using CVEhound is to run the following command:

$ cvehound --kernel ~/linux
Found: CVE-2020-27830
Found: CVE-2020-27152
Found: CVE-2020-29371
Found: CVE-2020-26088

where dir should point to linux kernel sources. CVEhound will check the sources for all cve patterns that you can find in cve dir. To check the sources for particular CVEs one can use:

$ cvehound --kernel ./linux --config --cve CVE-2020-27194 CVE-2020-29371
Checking: CVE-2020-27194
Found: CVE-2020-27194
MSG: bpf: Fix scalar32_min_max_or bounds tracking
CWE: Improper Restriction of Operations within the Bounds of a Memory Buffer
FIX DATE: 2020-10-08 09:02:53
https://www.linuxkernelcves.com/cves/CVE-2020-27194
Affected Files:
 - linux/kernel/bpf/verifier.c: CONFIG_BPF & CONFIG_BPF_SYSCALL
   linux/.config: affected
Config: ./linux/.config affected

Checking: CVE-2020-29371
Found: CVE-2020-29371
MSG: romfs: fix uninitialized memory leak in romfs_dev_read()
CWE: Use of Uninitialized Resource
FIX DATE: 2020-08-21 16:52:53
https://www.linuxkernelcves.com/cves/CVE-2020-29371
Affected Files:
 - linux/fs/romfs/storage.c: CONFIG_ROMFS_FS
   linux/.config: not affected
Config: ./linux/.config not affected

Other args:

  • --report - will produce json file with found CVEs Most of metainformation in generated report is taken from linuxkernelcves.com
  • --config or --config <file> - will infer the kernel configuration required to build the affected code (based on Kbuild/Makefiles, ifdefs are not checked) and check kernel .config file if there is one
  • --files, --cwe - will limit the scope of checked cves to the kernel files of interest or specific CWE classes
  • --exploit - check only for CVEs that are known to be exploitable (according to the FSTEC BDU database)

LICENSE

Python code is licensed under GPLv3. All rules in cvehound/cve folder are licensed under GPLv2.

Acknowledgements

I would like to thank the following projects and people behind them:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].