返回排行榜

The-Z-Labs/linux-exploit-suggester

Shell

Linux privilege escalation auditing tool

exploitsprivilege-escalation-exploitskernel-exploitationapplicable-exploitssecurity-toolshacking-toollinux-exploitslinux-kernelpublished-exploitskernel-exploitslpe
Star 增长趋势
Star
6.6k
Forks
1.2k
周增长
Issues
16
2k4k6k
2023年1月2024年3月2025年5月2026年7月
README

LES: Linux privilege escalation auditing tool

Quick download:

wget https://raw.githubusercontent.com/mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh -O les.sh

Details about LES usage and inner workings:

https://blog.z-labs.eu/2019/05/10/les-paper.html

Additional resources for the LES:

https://github.com/mzet-/les-res

Purpose

LES tool is designed to assist in detecting security deficiencies for a given Linux kernel/Linux-based machine. It provides following functionality:

Assessing Linux system exposure on publicly known exploits

Tool assesses (using heuristics methods discussed in details here) exposure of the given Linux system to publicly known Linux privilege escalation exploits. Example of the tool output:

$ ./linux-exploit-suggester.sh
...
[+] [CVE-2017-16995] eBPF_verifier

   Details: https://ricklarabee.blogspot.com/2018/07/ebpf-and-analysis-of-get-rekt-linux.html
   Exposure: highly probable
   Tags: debian=9.0{kernel:4.9.0-3-amd64},fedora=25|26|27,[ ubuntu=14.04 ]{kernel:4.4.0-89-generic},ubuntu=(16.04|17.04){kernel:4.(8|10).0-(19|28|45)-generic}
   Download URL: https://www.exploit-db.com/download/45010
   Comments: CONFIG_BPF_SYSCALL needs to be set && kernel.unprivileged_bpf_disabled != 1

[+] [CVE-2017-1000112] NETIF_F_UFO

   Details: http://www.openwall.com/lists/oss-security/2017/08/13/1
   Exposure: probable
   Tags: [ ubuntu=14.04{kernel:4.4.0-*} ],ubuntu=16.04{kernel:4.8.0-*}
   Download URL: https://raw.githubusercontent.com/xairy/kernel-exploits/master/CVE-2017-1000112/poc.c
   ext-url: https://raw.githubusercontent.com/bcoles/kernel-exploits/cve-2017-1000112/CVE-2017-1000112/poc.c
   Comments: CAP_NET_ADMIN cap or CONFIG_USER_NS=y needed. SMEP/KASLR bypass included. Modified version at 'ext-url' adds support for additional distros/kernels

[+] [CVE-2016-8655] chocobo_root

   Details: http://www.openwall.com/lists/oss-security/2016/12/06/1
   Exposure: probable
   Tags: [ ubuntu=(14.04|16.04){kernel:4.4.0-(21|22|24|28|31|34|36|38|42|43|45|47|51)-generic} ]
   Download URL: https://www.exploit-db.com/download/40871
   Comments: CAP_NET_RAW capability is needed OR CONFIG_USER_NS=y needs to be enabled
...

For each exploit, exposure is calculated. Following 'Exposure' states are possible:

  • Highly probable - assessed kernel is most probably affected and there's a very good chance that PoC exploit will work out of the box without any major modifications.

  • Probable - it's possible that exploit will work but most likely customization of PoC exploit will be needed to suit your target.

  • Less probable - additional manual analysis is needed to verify if kernel is affected.

  • Unprobable - highly unlikely that kernel is affected (exploit is not displayed in the tool's output)

Verifying state of kernel hardening security measures

LES can check for most of security settings available by your Linux kernel. It verifies not only the kernel compile-time configurations (CONFIGs) but also verifies run-time settings (sysctl) giving more complete picture of a security posture for a running kernel. This functionality is meant to be a modern continuation of --kernel switch for checksec.sh tool by Tobias Klein. Example of tool output:

$ ./linux-exploit-suggester.sh --checksec

Mainline kernel protection mechanisms:

 [ Disabled ] GCC stack protector support (CONFIG_HAVE_STACKPROTECTOR)
              https://github.com/mzet-/les-res/blob/master/features/stackprotector-regular.md

 [ Disabled ] GCC stack protector STRONG support (CONFIG_STACKPROTECTOR_STRONG)
              https://github.com/mzet-/les-res/blob/master/features/stackprotector-strong.md

 [ Enabled  ] Low address space to protect from user allocation (CONFIG_DEFAULT_MMAP_MIN_ADDR)
              https://github.com/mzet-/les-res/blob/master/features/mmap_min_addr.md

 [ Disabled ] Restrict unprivileged access to kernel syslog (CONFIG_SECURITY_DMESG_RESTRICT)
              https://github.com/mzet-/les-res/blob/master/features/dmesg_restrict.md

 [ Enabled  ] Randomize the address of the kernel image (KASLR) (CONFIG_RANDOMIZE_BASE)
              https://github.com/mzet-/les-res/blob/master/features/kaslr.md

 [ Disabled ] Hardened user copy support (CONFIG_HARDENED_USERCOPY)
              https://github.com/mzet-/les-res/blob/master/features/hardened_usercopy.md

...

Usage

Assess exposure of the Linux box to publicly known exploits:

$ ./linux-exploit-suggester.sh

Show state of security features on the Linux box:

$ ./linux-exploit-suggester.sh --checksec

Assess exposure of Linux kernel on publicly known exploits based on the provided 'uname' string (i.e. output of uname -a command):

$ ./linux-exploit-suggester.sh --uname <uname-string>

For more usage examples, see here.

Getting involved

You hopefully now know what LES is and what it can do for you. Now see what you can do for LES:

  • Add newly published Linux privilege escalation exploits to it.
  • Test existing exploits on various Linux distributions with multiple kernel versions, then document your findings in a form of Tags in LES, e.g. of a tag: ubuntu=12.04{kernel:3.(2|5).0-(23|29)-generic} which states: tagged exploit was verifed to work correctly on Ubuntu 12.04 with kernels: 3.2.0-23-generic, 3.2.0-29-generic, 3.5.0-23-generic and 3.5.0-29-generic;. With this tag added LES will automatically highlight and bump dynamic Rank of the exploit when run on Ubuntu 12.04 with one of listed kernel versions. This will help you (and others) during pentests to rapidly identify critically vulnerable Linux machines.
  • Published exploits are often written only for PoC purposes only for one (or couple of) specific Linux distributions and/or kernel version(s). Pick sources of the exploit of choice and customize it to run on different kernel version(s). Then add your customized version of exploit as ext-url entry to LES and modify Tags to reflect newly added targets. See this article for an excellent example of adapting specific PoC exploit to different kernel versions.
  • Conduct source code analysis of chosen kernel hardening security measure then add it to the FEATURES array (if not already there) and publish your analysis at: https://github.com/mzet-/les-res/blob/master/features/<feature-name>.md.

Acknowledgments

bcoles for his excellent and frequent contributions to LES.

相关仓库
The-Art-of-Hacking/h4cker

This repository is maintained by Omar Santos (@santosomar) and includes thousands of resources related to ethical hacking, bug bounties, digital forensics and incident response (DFIR), AI security, vulnerability research, exploit development, reverse engineering, and more. 🔥 Also check: https://hackertraining.org

Jupyter NotebookMIT Licensehackingpenetration-testing
hackerrepo.org
28.6k5.3k
threat9/routersploit

Exploitation Framework for Embedded Devices

PythonPyPIOtherpythonsecurity
13.2k2.4k
projectdiscovery/nuclei-templates

Community curated list of templates for the nuclei engine to find security vulnerabilities.

JavaScriptnpmMIT Licensenuclei-templatesnuclei
github.com/projectdiscovery/nuclei
12.7k3.6k
cdk-team/CDK

📦 Make security testing of K8s, Docker, and Containerd easier.

GoGo ModulesApache License 2.0penetrationpenetration-testing-tools
github.com/cdk-team/CDK/wiki
4.7k605
x0rz/EQGRP

Decrypted content of eqgrp-auction-file.tar.xz

Perlexploitsshadowbrokers
4.2k2.1k
ysrc/xunfeng

巡风是一款适用于企业内网的漏洞快速应急,巡航扫描系统。

PythonPyPIGNU General Public License v3.0securitypentesting
3.6k1.3k
Ascotbe/Kernelhub

:palm_tree:Linux、macOS、Windows Kernel privilege escalation vulnerability collection, with compilation environment, demo GIF map, vulnerability details, executable file (提权漏洞合集)

CGNU Affero General Public License v3.0exploitscve
kernelhub.ascotbe.com
3.2k681
the-akira/Computer-Science-Resources

Collection of resources spanning key areas of Computer Science

awesome-listcomputer
2.8k320
TH3xACE/SUDO_KILLER

A tool designed to exploit a privilege escalation vulnerability in the sudo program on Unix-like systems. It takes advantage of a specific misconfiguration or flaw in sudo to gain elevated privileges on the system, essentially allowing a regular user to execute commands as the root user.

ShellMIT Licensesudo-exploitationabuse-sudo
2.5k262
AabyssZG/SpringBoot-Scan

针对SpringBoot的开源渗透框架,以及Spring相关高危漏洞利用工具

PythonPyPIMIT Licensespringspring-boot
blog.zgsec.cn/archives/129.html
2.3k177
anouarbensaad/vulnx

vulnx 🕷️ an intelligent Bot, Shell can achieve automatic injection, and help researchers detect security vulnerabilities CMS system. It can perform a quick CMS security detection, information collection (including sub-domain name, ip address, country information, organizational information and time zone, etc.) and vulnerability scanning.

PythonPyPIGNU General Public License v3.0crawlerinformation-gathering
2.1k366
adysec/nuclei_poc

Nuclei POC,每2小时更新 | 每日自动采集、验证、去重并发布 25 万+ 漏洞 PoC,保存已被删除的POC | 通过批量克隆Github项目,获取Nuclei POC,并将POC按类别分类存放,使用Github Action实现。

GNU General Public License v3.0dailyexploit
nuclei.adysec.com
2.1k468