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

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

garak, LLM Vulnerability Scanner : The Comprehensive Tool For Assessing Language Model Security

garak checks if an LLM can be made to fail in a way we don't…

10 hours ago

Vermilion : Mastering Linux Post-Exploitation For Red Team Success

Vermilion is a simple and lightweight CLI tool designed for rapid collection, and optional exfiltration…

10 hours ago

AD-CS-Forest-Exploiter : Mastering Security Through PowerShell For AD CS Misconfiguration

ADCFFS is a PowerShell script that can be used to exploit the AD CS container…

10 hours ago

Usage Of Tartufo – A Comprehensive Guide To Securing Your Git Repositories

Tartufo will, by default, scan the entire history of a git repository for any text…

10 hours ago

Loco : A Rails-Inspired Framework For Rust Developers

Loco is strongly inspired by Rails. If you know Rails and Rust, you'll feel at…

1 day ago

Monolith : The Ultimate Tool For Storing Entire Web Pages As Single HTML Files

A data hoarder’s dream come true: bundle any web page into a single HTML file.…

1 day ago