Convert Figma logo to code with AI

AonCyberLabs logoWindows-Exploit-Suggester

This tool compares a targets patch levels against the Microsoft vulnerability database in order to detect potential missing patches on the target. It also notifies the user if there are public exploits and Metasploit modules available for the missing bulletins.

3,935
1,021
3,935
33

Top Related Projects

15,708

PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)

4,119

Windows Exploit Suggester - Next Generation

1,220

SharpUp is a C# port of various PowerUp functionality.

1,530

Enumerate missing KBs and suggest exploits for useful Privilege Escalation vulnerabilities

PowerSploit - A PowerShell Post-Exploitation Framework

windows-kernel-exploits Windows平台提权漏洞集合

Quick Overview

The Windows Exploit Suggester is a Python script that analyzes the output of the Microsoft Windows "systeminfo" command and provides a list of possible exploits and related information. It is a useful tool for security professionals and penetration testers to quickly identify potential vulnerabilities on Windows systems.

Pros

  • Automated Vulnerability Identification: The script automatically analyzes the system information and suggests relevant exploits, saving time and effort for security professionals.
  • Comprehensive Exploit Database: The script uses a comprehensive database of known Windows exploits, ensuring that it can identify a wide range of potential vulnerabilities.
  • Cross-Platform Compatibility: The script can be run on various platforms, including Windows, Linux, and macOS, making it accessible to a wide range of users.
  • Regularly Updated: The script is regularly updated to include the latest exploit information, ensuring that it remains relevant and effective.

Cons

  • Requires System Information: The script requires the output of the "systeminfo" command, which may not always be available or accessible on the target system.
  • Potential for False Positives: The script may suggest exploits that are not actually applicable to the target system, leading to false positives and wasted effort.
  • Requires Manual Verification: The suggested exploits still need to be manually verified and tested to ensure their effectiveness, which can be time-consuming.
  • Limited to Windows Systems: The script is specifically designed for Windows systems and may not be applicable to other operating systems.

Getting Started

To use the Windows Exploit Suggester, follow these steps:

  1. Clone the repository:
git clone https://github.com/AonCyberLabs/Windows-Exploit-Suggester.git
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Run the script with the output of the "systeminfo" command:
python windows-exploit-suggester.py --database <database_file> --systeminfo <systeminfo_file>

Replace <database_file> with the path to the exploit database file (e.g., 2023-03-01-mssb.xls) and <systeminfo_file> with the path to the "systeminfo" output file.

  1. The script will analyze the system information and provide a list of potential exploits, along with their descriptions and related information.

Competitor Comparisons

15,708

PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)

Pros of PEASS-ng

  • Multi-platform support (Windows, Linux, macOS)
  • Actively maintained with frequent updates
  • Comprehensive privilege escalation checks beyond just exploits

Cons of PEASS-ng

  • More complex to use due to its extensive feature set
  • May generate more false positives due to broader scope

Code Comparison

PEASS-ng (LinPEAS):

if [ "$MACPEAS" ]; then
    print_2title "System Info"
    system_profiler SPSoftwareDataType SPHardwareDataType
else
    print_2title "Operative system"
    (cat /proc/version || uname -a ) 2>/dev/null | sed -E "s,$kernelDCW_Ubuntu_Precise_1,${SED_RED_YELLOW}," | sed -E "s,$kernelDCW_Ubuntu_Trusty_1,${SED_RED_YELLOW}," | sed -E "s,$kernelDCW_Ubuntu_Xenial_1,${SED_RED_YELLOW},"
fi

Windows-Exploit-Suggester:

def main():
    args = parse_args()
    if args.update:
        update_databases()
    if args.database and args.systeminfo:
        (results, sysinfo) = parse_systeminfo(args.systeminfo, args.database)
        if results:
            display_results(results, args.batchfile)

The code snippets show that PEASS-ng focuses on gathering system information across multiple platforms, while Windows-Exploit-Suggester is more specialized in parsing Windows system information and suggesting exploits based on the collected data.

4,119

Windows Exploit Suggester - Next Generation

Pros of wesng

  • Actively maintained with regular updates
  • Written in Python 3, offering better performance and compatibility
  • Supports custom database files for vulnerability matching

Cons of wesng

  • Requires manual download of the Microsoft vulnerability database
  • May have a steeper learning curve for new users
  • Limited documentation compared to Windows-Exploit-Suggester

Code Comparison

Windows-Exploit-Suggester:

def main():
    args = parse_args()
    if args.update:
        update_databases()
    if args.systeminfo:
        parse_systeminfo(args.systeminfo)

wesng:

def main():
    args = parse_arguments()
    if args.update:
        update_definitions(args)
    if args.systeminfo:
        analyze_systeminfo(args)

Both tools use similar command-line argument parsing and main function structure. However, wesng's codebase is more modular and follows modern Python practices.

wesng offers improved performance and compatibility due to its Python 3 implementation. It also provides more flexibility with custom database support. However, it requires manual database updates and may be less user-friendly for beginners.

Windows-Exploit-Suggester, while older, has more extensive documentation and may be easier for newcomers to use. However, it lacks some of the advanced features and performance improvements found in wesng.

1,220

SharpUp is a C# port of various PowerUp functionality.

Pros of SharpUp

  • Written in C#, allowing for easier integration with other .NET tools and frameworks
  • Designed specifically for Windows privilege escalation, providing more focused and tailored results
  • Can be run directly in memory, making it stealthier and potentially evading some antivirus detections

Cons of SharpUp

  • Limited to Windows environments, unlike Windows-Exploit-Suggester which can be run from non-Windows systems
  • May require more setup and dependencies compared to the Python-based Windows-Exploit-Suggester
  • Potentially less comprehensive in terms of exploit suggestions, as it focuses primarily on privilege escalation vectors

Code Comparison

Windows-Exploit-Suggester (Python):

def main():
    args = parse_args()
    if args.update:
        update_databases()
    else:
        run_scan(args)

SharpUp (C#):

static void Main(string[] args)
{
    Arguments arguments = ArgumentParser.Parse(args);
    if (arguments.Action == Action.CheckAll)
        CheckAll();
}

Both tools use command-line arguments to determine their actions, but SharpUp's C# implementation allows for more direct integration with Windows systems and .NET frameworks.

1,530

Enumerate missing KBs and suggest exploits for useful Privilege Escalation vulnerabilities

Pros of Watson

  • Written in C#, allowing for easier integration with other .NET tools and frameworks
  • Designed specifically for Windows 10 and Server 2016/2019, providing more accurate results for modern systems
  • Includes a graphical user interface (GUI) version for easier use by non-technical users

Cons of Watson

  • Limited to newer Windows versions, not suitable for older systems
  • Requires .NET Framework to be installed on the target system
  • May have a larger footprint and be more detectable compared to simpler Python scripts

Code Comparison

Windows-Exploit-Suggester (Python):

def main():
    args = parse_args()
    if args.update:
        update_databases()
    if args.systeminfo:
        parse_systeminfo(args.systeminfo)

Watson (C#):

static void Main(string[] args)
{
    var osVersion = Wmi.GetOSVersion();
    var hotfixes = Wmi.GetHotfixes();
    var exploits = ExploitCollection.GetExploits();
}

Both tools aim to identify potential vulnerabilities in Windows systems, but they approach the task differently. Windows-Exploit-Suggester is more versatile and can work with older systems, while Watson focuses on providing accurate results for modern Windows versions with a more user-friendly interface.

PowerSploit - A PowerShell Post-Exploitation Framework

Pros of PowerSploit

  • Comprehensive suite of PowerShell-based post-exploitation tools
  • Actively maintained with regular updates and contributions
  • Includes modules for various tasks like privilege escalation, persistence, and data exfiltration

Cons of PowerSploit

  • Requires PowerShell execution, which may be restricted in some environments
  • More complex to use compared to Windows-Exploit-Suggester's straightforward approach
  • Potentially more likely to trigger antivirus alerts due to its extensive functionality

Code Comparison

Windows-Exploit-Suggester:

def main():
    args = parse_args()
    if args.update:
        update_databases(args)
    else:
        run_wes(args)

PowerSploit:

function Invoke-Mimikatz
{
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)]
        [Alias('Module')]
        [ValidateSet('sekurlsa','kerberos','crypto','vault','lsadump','privilege','process','service','event','misc','ts','kernel')]
        [String[]]
        $Command = 'sekurlsa::logonpasswords'
    )

The code snippets highlight the different approaches: Windows-Exploit-Suggester uses Python for vulnerability scanning, while PowerSploit leverages PowerShell for post-exploitation tasks, as seen in the Invoke-Mimikatz function example.

windows-kernel-exploits Windows平台提权漏洞集合

Pros of windows-kernel-exploits

  • Provides a comprehensive collection of Windows kernel exploits
  • Includes pre-compiled executables for easy use
  • Offers detailed information about each exploit, including affected versions and CVE numbers

Cons of windows-kernel-exploits

  • Less frequently updated compared to Windows-Exploit-Suggester
  • Lacks automated vulnerability scanning capabilities
  • May require more manual effort to identify applicable exploits

Code Comparison

Windows-Exploit-Suggester:

def main():
    args = parse_args()
    if args.update:
        update_bulletin_db()
    if args.systeminfo:
        try:
            systeminfo = open(args.systeminfo, 'r').read()
        except IOError:
            print("[!] Could not open/read file: {}".format(args.systeminfo))
            sys.exit(1)

windows-kernel-exploits:

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    return TRUE;
}

The code comparison shows that Windows-Exploit-Suggester is primarily written in Python and focuses on parsing system information and updating vulnerability databases. In contrast, windows-kernel-exploits contains C code for individual exploit implementations.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

DESCRIPTION

This tool compares a targets patch levels against the Microsoft vulnerability database in order to detect potential missing patches on the target. It also notifies the user if there are public exploits and Metasploit modules available for the missing bulletins.

It requires the 'systeminfo' command output from a Windows host in order to compare that the Microsoft security bulletin database and determine the patch level of the host.

It has the ability to automatically download the security bulletin database from Microsoft with the --update flag, and saves it as an Excel spreadsheet.

When looking at the command output, it is important to note that it assumes all vulnerabilities and then selectively removes them based upon the hotfix data. This can result in many false-positives, and it is key to know what software is actually running on the target host. For example, if there are known IIS exploits it will flag them even if IIS is not running on the target host.

The output shows either public exploits (E), or Metasploit modules (M) as indicated by the character value.

It was heavily inspired by Linux_Exploit_Suggester by Pentura.

Blog Post: "Introducing Windows Exploit Suggester", https://blog.gdssecurity.com/labs/2014/7/11/introducing-windows-exploit-suggester.html

USAGE

update the database

$ ./windows-exploit-suggester.py --update
[*] initiating...
[*] successfully requested base url
[*] scraped ms download url
[+] writing to file 2014-06-06-mssb.xlsx
[*] done

install dependencies

(install python-xlrd, $ pip install xlrd --upgrade)

feed it "systeminfo" input, and point it to the microsoft database

$ ./windows-exploit-suggester.py --database 2014-06-06-mssb.xlsx --systeminfo win7sp1-systeminfo.txt 
[*] initiating...
[*] database file detected as xls or xlsx based on extension
[*] reading from the systeminfo input file
[*] querying database file for potential vulnerabilities
[*] comparing the 15 hotfix(es) against the 173 potential bulletins(s)
[*] there are now 168 remaining vulns
[+] windows version identified as 'Windows 7 SP1 32-bit'
[*] 
[M] MS14-012: Cumulative Security Update for Internet Explorer (2925418) - Critical
[E] MS13-101: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (2880430) - Important
[M] MS13-090: Cumulative Security Update of ActiveX Kill Bits (2900986) - Critical
[M] MS13-080: Cumulative Security Update for Internet Explorer (2879017) - Critical
[M] MS13-069: Cumulative Security Update for Internet Explorer (2870699) - Critical
[M] MS13-059: Cumulative Security Update for Internet Explorer (2862772) - Critical
[M] MS13-055: Cumulative Security Update for Internet Explorer (2846071) - Critical
[M] MS13-053: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Remote Code Execution (2850851) - Critical
[M] MS13-009: Cumulative Security Update for Internet Explorer (2792100) - Critical
[M] MS13-005: Vulnerability in Windows Kernel-Mode Driver Could Allow Elevation of Privilege (2778930) - Important
[*] done

possible exploits for an operating system can be used without hotfix data

$ ./windows-exploit-suggester.py --database 2014-06-06-mssb.xlsx --ostext 'windows server 2008 r2' 
[*] initiating...
[*] database file detected as xls or xlsx based on extension
[*] getting OS information from command line text
[*] querying database file for potential vulnerabilities
[*] comparing the 0 hotfix(es) against the 196 potential bulletins(s)
[*] there are now 196 remaining vulns
[+] windows version identified as 'Windows 2008 R2 64-bit'
[*] 
[M] MS13-009: Cumulative Security Update for Internet Explorer (2792100) - Critical
[M] MS13-005: Vulnerability in Windows Kernel-Mode Driver Could Allow Elevation of Privilege (2778930) - Important
[E] MS11-011: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (2393802) - Important
[M] MS10-073: Vulnerabilities in Windows Kernel-Mode Drivers Could Allow Elevation of Privilege (981957) - Important
[M] MS10-061: Vulnerability in Print Spooler Service Could Allow Remote Code Execution (2347290) - Critical
[E] MS10-059: Vulnerabilities in the Tracing Feature for Services Could Allow Elevation of Privilege (982799) - Important
[E] MS10-047: Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (981852) - Important
[M] MS10-002: Cumulative Security Update for Internet Explorer (978207) - Critical
[M] MS09-072: Cumulative Security Update for Internet Explorer (976325) - Critical

LIMITATIONS

Currently, if the 'systeminfo' command reveals 'File 1' as the output for the hotfixes, it will not be able to determine which are installed on the target. If this occurs, the list of hotfixes will need to be retrieved from the target host and passed in using the --hotfixes flag

It currently does not seperate 'editions' of the Windows OS such as 'Tablet' or 'Media Center' for example, or different architectures, such as Itanium-based only

False positives also occur where it assumes EVERYTHING is installed on the target Windows operating system. If you receive the 'File 1' output, try executing 'wmic qfe list full' and feed that as input with the --hotfixes flag, along with the 'systeminfo'

LICENSE

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.