Hacking Tools

NamedPipeMaster – A Comprehensive Toolkit For Named Pipe Analysis And Interaction

NamedPipeMaster is a versatile tool for analyzing and monitoring in named pipes.

It includes Ring3NamedPipeConsumer for direct server interaction, Ring3NamedPipeMonitor for DLL-based API hooking and data collection, and Ring0NamedPipeFilter for comprehensive system-wide monitoring.

The tool supports proactive and passive interactions, collects detailed communication data, and features a filter for specific event searches.

Features

  • Named Pipe Interaction:
    • Proactive Interaction: Actively interact with a named pipe server.
    • Passive Connection: Be passively connected by a named pipe client.
    • Proxy Interaction: Inject a DLL into a process to serve as a proxy for interacting with a named pipe server.
  • Information Collection via DLL Injection (Ring3 Hook):
    • Monitors and collects information on named pipe communication by hooking relevant APIs.
    • Dumps the call stack in detoured functions and checks the process’s impersonation capability.
    • Specific API hooks include:
      • NtCreateNamedPipeFile: Named pipe creation.
      • NtCreateFile: Named pipe connection.
      • NtFsControlFile: Named pipe connection completion.
      • NtReadFile: Reading data from a named pipe.
      • NtWriteFile: Writing data to a named pipe.
  • System-Wide Monitoring with Minifilter Driver:
    • Captures system-wide named pipe activities by monitoring key IRPs (I/O Request Packets):
      • IRP_MJ_CREATE_NAMED_PIPE: Named pipe creation.
      • IRP_MJ_CREATE: Named pipe connection.
      • IRP_MJ_FILE_SYSTEM_CONTROL: Named pipe connection completion.
      • IRP_MJ_READ: Reading data from a named pipe.
      • IRP_MJ_WRITE: Writing data to a named pipe.

Usage

Put Ring3NamedPipeConsumer.exe, Ring3NamedPipeMonitor.dll, and Ring0NamedPipeFilter.sys in the same directory and run Ring3NamedPipeConsumer.exe.

Watch the demo video to understand the detailed usage. Please ensure that code integrity is disabled to use the features of the minifilter driver.

> Ring3NamedPipeConsumer.exe
[1] dump database
[2] start monitor mode
[3] clear database
[4] get database info
[5] filter
[6] inject dll
[7] NamedPipePoker
[8] NamedPipeProxyPoker
[9] NamedPipePoked
[10] help
[11] exit and clean up

NPM-CLI> 10
[1] dump database: print all monitored events in the database
[2] start monitor mode: keep monitoring named pipe activities until enter is pressed
[3] clear database: clear the database
[4] get database info: get some statistics
[5] filter: get the specified named pipe events
[6] inject dll: inject Ring3NamedPipeMonitor.dll into a process
[7] NamedPipePoker: directly interact with a named pipe server
[8] NamedPipeProxyPoker: inject Ring3NamedPipeMonitor.dll into a process as a proxy to interact with the target named pipe server
[9] NamedPipePoked: act as a named pipe server to be connected by other clients
[10] help: print this detail usage
[11] exit and clean up: terminate this process and unload the driver

Build

  • Visual Studio 2017
  • C++17
  • vcpkg v1.2.2
    • nlohmann-json
    • minhook
    • spdlog
    • sqlite-orm
    • cli11
Varshini

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

8 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

8 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

2 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago