GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Fyyre/proxy_dll: Taking advantage of CRT initialization, to get away with hooking protected applications

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
Inc.h
Inc.h
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
d3d9.asm
d3d9.asm
 
 
d3d9.def
d3d9.def
 
 
dllmain.cpp
dllmain.cpp
 
 
hooker.c
hooker.c
 
 
hooker.h
hooker.h
 
 
hooker.hpp
hooker.hpp
 
 
proxy.sln
proxy.sln
 
 
proxy.vcxproj
proxy.vcxproj
 
 
proxy.vcxproj.filters
proxy.vcxproj.filters
 
 
proxy.vcxproj.user
proxy.vcxproj.user
 
 
sup.cpp
sup.cpp
 
 
sup.h
sup.h
 
 
targetver.h
targetver.h
 
 

Repository files navigation

proxy

A simple system for hooking protected applications. I have employed this method to make hooks for various MMORPG games, for the past two years.

void __security_init_cookie(void);	// dear friend!

Details

Most Windows binaries have a predictable pattern that can be used to our advantage.

To do this we take advantage of the fact that __security_init_cookie is called by the CRT when it's initialized. The initialization is the first call at the OEP:

__int64 start()
{
  __security_init_cookie();	// hello!
  return __scrt_common_main_seh();
}

GetSystemTimeAsFileTime is the first import called first in __security_init_cookie

GetSystemTimeAsFileTime is embarassingly easily to recreate within our own code. We only need only a few structures. And I do not wish to share my ntdll.h =x

We recreate the original GetSystemTimeAsFileTime function, and perform our hooking inside, having added a check to determine when our target is decrypted in memory, and unhooking our hook as our last step, not to add lag to the game.

CLIENT_ID KSYSTEM_TIME KUSER_SHARED_DATA (however we only need the first 5 entries of this structure)

For further elaboration on this idea, I suggest you look over the project code, which I have made compatible with Windows 11 24H2, ... (still works as of 2026/08/19)

In hopes someone finds purpose with it,

-Fyyre

About

Taking advantage of CRT initialization, to get away with hooking protected applications

Topics

crtdll-proxydllmainhookingthemidawindowswindows-internals

Resources

Readme
MIT license
Activity

Stars

63 stars

Watchers

6 watching

Forks

21 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.