
A script is a PoC for CVE-2022-1257, a vulnerability in the McAfee Agent (Trellix Agent) when working with it's database. The vulnerability allows attackers to retrieve and decrypt credentials from the McAfee Agent database file (`ma.db`) due to improper encryption key handling.
Made by scottk817
This script is a PoC for CVE-2022-1257, a vulnerability in the McAfee Agent (Trellix Agent) when working with it's database. The vulnerability allows attackers to retrieve and decrypt credentials from the McAfee Agent database file (ma.db) due to improper encryption key handling.
This script is intended for educational purposes only. Do not use it on systems you do not own or have explicit permission to test. Unauthorized access to systems and data is illegal and unethical.
CVE-2022-1257 as described by NIST:
Insecure storage of sensitive information vulnerability in MA for Linux, macOS, and Windows prior to 5.7.6 allows a local user to gain access to sensitive information through storage in ma.db. The sensitive information has been moved to encrypted database files.
This script demonstrates how an attacker could exploit this vulnerability by:
ma.db file to a temporary location to avoid lock contention.winsqlite3.dll: This DLL file must be available for SQLite operations, comes natively in Windows 11.winsqlite3.dll is available on your system, it comes natively with Windows 11.ma.db). This is typically located at C:\ProgramData\McAfee\Agent\DB\ma.db.Run the script in PowerShell with the following command:
.\CVE-2022-1257.ps1
The script will output the usernames and decrypted passwords from the database in CSV format:
Username,Password
user1,password1
user2,password2
If you are using this in an assessment, it may be valuable to sanatize the script and obfuscate with Invoke-Obfuscate
This project is licensed under the MIT License - see the LICENSE file for details.