Cyber security

PichichiH0ll0wer : Mastering Nim-Based Process Hollowing For Efficient Payload Management

PichichiH0ll0wer revolutionizes payload management with its Nim-based process hollowing capabilities.

This innovative tool offers configurable features, advanced injection methods, and robust protection mechanisms, making it a game-changer for Windows environments.

Explore how PichichiH0ll0wer streamlines the deployment of payloads while enhancing security and efficiency.

  • PichichiH0ll0wer
  • About
  • Features
  • Injection methods
  • Installation
  • Usage
  • Credits

About

–== Process hollowing loader written in Nim for PEs only ==–

I built PichichiH0ll0wer to learn and contribute, sure. but also because I’m quite tired of shellcodes everywhere.

Loading PEs might be less evasive, I know, but it’s still efficient and more convenient than fighting to turn your PE payload into a shellcode each time (which not always works smoothly).

Also, PichichiH0ll0wer has some features to protect your payload. I may add some more injection techniques and features in the future. Supports only x64 EXEs currently.

Features

  • Configurable builder
  • Payload encrypted and compressed (and optionally splitted) in the hollow loader
  • Supports splitted injection using multiple processes
  • Supports direct and indirect system calls
  • Hollower does not use the very suspicious call Nt/ZwUnmapViewOfSection
  • Can build EXE / DLL hollow loaders
  • Can block unsigned microsoft DLLs from being loaded to the hollowed process
  • Supports anti-debug techniques with the ability to die or to execute useless calculations (‘troll’ mode)
  • Obfuscated sleep using useless calculations
  • Supports execution within VEH
  • Supports command line Rc4 key to decrypt the payload

Injection Methods

  1. Simple hollowing: just the usual stuff: VirtualAlloc -> WriteProcessMemory -> GetThreadContext -> SetThreadContext -> ResumeThread.
  2. Direct syscalls hollowing: using the great NimlineWhispers2.
  3. Indirect syscalls hollowing: using the great NimlineWhispers3.
  4. Splitted hollowing: each step of method (1) is occurring in a separate process with inherited handles.
  5. Splitted hollowing: each step of method (2) is occurring in a separate process with inherited handles.
  6. Splitted hollowing: each step of method (3) is occurring in a separate process with inherited handles.

Example of splitted hollowing of cscript.exe with cmd.exe that spawns whoami.exe:

Installation

Built with Nim 1.6.12, should be run on Windows only.

nimble install winim ptr_math nimprotect supersnappy argparse

Usage

Usage:
   [options] exe_file injection_method

Arguments:
  exe_file         Exe file to load
  injection_method Injection method

        1 - Simple hollowing
        2 - Direct syscalls hollowing
        3 - Indirect syscalls hollowing
        4 - Splitted hollowing using multiple processes
        5 - Splitted hollowing using multiple processes and direct syscalls
        6 - Splitted hollowing using multiple processes and indirect syscalls

Options:
  -h, --help
  -s, --sponsor=SPONSOR      Sponsor path to hollow (default: self hollowing)
  -a, --args=ARGS            Command line arguments to append to the hollowed process
  -f, --format=FORMAT        PE hollower format Possible values: [exe, dll] (default: exe)
  -e, --export=EXPORT        DLL export name (relevant only for Dll format) (default: DllRegisterServer)
  -b, --block                Block unsigned Microsoft Dlls in the hollowed process
  -p, --split                Split and hide the payload blob in hollower (takes long to compile!)
  -t, --sleep=SLEEP          Number of seconds to sleep before hollowing (default: 0)
  -g, --anti-debug=ANTI_DEBUG
                             Action to perform upon debugger detection Possible values: [none, die, troll] (default: none)
  -k, --key=KEY              RC4 key to [en/de]crypt the payload (supplied as a command line argument to the hollower)
  -v, --veh                  Hollow will occur within VEH
  -d, --debug                Compile as debug instead of release (loader is verbose)

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

groupdel Command in Linux: Remove a Group and Audit Files

The groupdel command in Linux removes a group from the system. It deletes the group's entry from /etc/group and /etc/gshadow,…

10 hours ago

wc Command in Linux: Count Lines, Words, Characters, and Bytes

The wc command in Linux counts lines, words, characters, and bytes in files or standard input. It…

10 hours ago

top Command in Linux: Monitor Processes and Resource Usage

The top command in Linux provides a real-time view of running processes and system resource usage. From…

10 hours ago

usermod Command in Linux: Modify User Accounts and Groups

The usermod command in Linux modifies existing user account attributes. You can use it to manage group…

10 hours ago

sort Command in Linux: Sort Text, Numbers, Columns, and More

The sort command in Linux reads lines from files or standard input and writes them to standard…

1 day ago

wall Command in Linux: Broadcast Messages to Logged-In Users

The wall command in Linux sends a message to the terminals of all currently logged-in users. The…

1 day ago