# Title: System Information - Linux Exploit Suggester
# ID: SY_Linux_exploit_suggester
# Author: Carlos Polop
# Last Update: 07-03-2024
# Description: Execute Linux Exploit Suggester to identify potential kernel exploits:
#   - Automated kernel vulnerability detection
#   - Common vulnerable scenarios:
#     * Known kernel vulnerabilities
#     * Unpatched kernel versions
#     * Missing security patches
#   - Exploitation methods:
#     * Kernel exploit execution: Use suggested exploits
#     * Common attack vectors:
#       - Kernel memory corruption
#       - Race conditions
#       - Use-after-free
#       - Integer overflow
#     * Exploit techniques:
#       - Kernel memory manipulation
#       - Privilege escalation
#       - Root access acquisition
#       - System compromise
# License: GNU GPL
# Version: 1.0
# Functions Used: print_2title, print_info
# Global Variables: $MACPEAS
# Initial Functions:
# Generated Global Variables: $les_b64
# Fat linpeas: 0
# Small linpeas: 1


if [ "$(command -v bash 2>/dev/null || echo -n '')" ] && ! [ "$MACPEAS" ]; then
    print_2title "Executing Linux Exploit Suggester"
    print_info "https://github.com/mzet-/linux-exploit-suggester"
    les_b64="peass{https://raw.githubusercontent.com/mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh}"
    echo $les_b64 | base64 -d | bash | sed "s,$(printf '\033')\\[[0-9;]*[a-zA-Z],,g" | grep -i "\[CVE" -A 10 | grep -Ev "^\-\-$" | sed -${E} "s/\[(CVE-[0-9]+-[0-9]+,?)+\].*/${SED_RED}/g"
    echo ""
fi
