Skip to content

Small driver that uses alternative syscalls feature (the project is still under development).

License

WTFPL, Unknown licenses found

Licenses found

WTFPL
LICENSE
Unknown
LICENSE.md
Notifications You must be signed in to change notification settings

0x00Alchemist/PicoHook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PicoHook

PicoHook is a small driver that uses a system of alternative syscalls and their handlers. The project is still under development.

What are alternative syscalls?

Alternate syscalls are a mechanism for Pico processes that exist to support WSLs. The system initially has one registered handler for Pico processes. Alternate syscall handlers can receive all syscalls from a particular process.

How can it be useful?

Technically, we can intercept syscalls from a particular process. Or monitor a specific process and what syscalls it uses.

Are there any restrictions?

Yes, I do. First, we can only monitor one process. Secondly, Windows allows registering only one handler, if you try to register a third or more handler, the system will crash with bug 0x1E0 (INVALID_ALTERNATE_SYSTEM_CALL_HANDLER_REGISTRATION). All handlers (2) can be found in the PsAltSystemCallHandlers array. Also, the PsAltSystemCallHandlers array is monitored by Patchguard.

In order to work properly on a real system, we must initialize our own handler before Patchguard is initialized. The second option is the Patchguard initialization patch.

Compiling

MSVC v143 and VS2022 are used to build the project. You can also build the project on a compiler version older than v143.

Usage

regpico - registers Pico handler (only one per OS session)
unregpico - deletes Pico handler
picohelp - shows this message
picodel - terminates Pico service
exitpico - exits from PoC

TODO

  • Implement interceptions of certain syscalls.
  • Implement deactivation of alternate syscalls processing for a specific process.
  • Understand how to re-register handlers.

demo

Credits

0x00Alchemist (2024)

About

Small driver that uses alternative syscalls feature (the project is still under development).

Topics

Resources

License

WTFPL, Unknown licenses found

Licenses found

WTFPL
LICENSE
Unknown
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages