8000 GitHub - dievoom-png/CriticalProcessDetector
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dievoom-png/CriticalProcessDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Critical Process Detector (CPD)

Overview

CPD is a Python script that analyzes binary files to identify specific Windows API functions and libraries using the r2pipe library. This tool helps detect the presence of critical system functions and libraries that may indicate potential process manipulation or critical operations within a binary.

Prerequisites

To use CPD, ensure you have the following installed:

  1. Radare2 - A powerful open-source reverse engineering framework.
  2. r2pipe - A Python library for interacting with Radare2.

Install r2pipe using pip:

pip install r2pipe

Usage

Run the CPD script with the path to the binary you want to analyze. The script will analyze the binary and print out relevant information about the presence of specific functions and libraries.

Command

python CPD.py <path to binary>

Example

python CPD.py /path/to/your/binary.exe

Output

The script will produce output indicating whether the following components are found in the binary:

ntdll.dll: Indicates that the ntdll.dll library is present. NtSetInformationProcess: A function often used in process manipulation. RtlSetProcessIsCritical: A function used to mark a process as critical, affecting system behavior.

How It Works

  1. Open Binary: The script opens the specified binary file using r2pipe and Radare2.
  2. Analyze Imports: It performs a full analysis of symbols and imports using the command aaa;iij.
  3. Detect Components: The script parses the results to check for the presence of ntdll.dll, NtSetInformationProcess, and RtlSetProcessIsCritical.
  4. Print Results: It prints messages to the console if any of the specified components are found.

Example Output

The script will produce output indicating whether the following components are found in the binary:

[+] Found ntdll.dll
[+] Found NtSetInformationProcess
[+] Found RtlSetProcessIsCritical

Important Note

This is a POC & a fun project that helped me understand the r2pipe libray but this is by no way a effective way to detect those imports. Attackers can easily hide the imports from static analysis tools like this script, for example packing would be the easiest way to acheive that.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0