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
Tamil S

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

ShadowDumper – Advanced Techniques For LSASS Memory Extraction

Shadow Dumper is a powerful tool used to dump LSASS (Local Security Authority Subsystem Service)…

3 hours ago

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

2 weeks ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

3 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

4 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

4 weeks ago