Skip to content

Windows API Hashing hides API names using hashes to evade detection—used by malware like REvil to obfuscate calls and bypass static analysis tools.

Notifications You must be signed in to change notification settings

mohe22/API-hashing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

API-hashing


🔒 Windows API Hashing – Dynamic Function Resolution

This project demonstrates how to resolve Windows API functions dynamically using custom hashing instead of storing API names in plain text. It helps avoid detection by AV and static analysis tools.

🧰 Features

  • Custom hash function to obfuscate API names
  • Manual parsing of PE headers to locate exports
  • Resolves LoadLibraryA without IAT
  • Generic function resolver via hashed names

🚀 Usage

  1. Include HashResolver.h in your project.
  2. Call CalculateHash("FunctionName") to get the hash.
  3. Use ResolveFunctionByHash("module.dll", HASH) to get the function pointer.

📎 Example

auto VirtualAllocPtr = (pVirtualAlloc)ResolveFunctionByHash("kernel32.dll", 0x123456);

📝 Replace 0x123456 with the hash of the desired API using CalculateHash.


🔗 Read the detailed breakdown here: API Hashing Blog


This technique is often used in malware for stealth and dynamic resolution—understand it to defend against it.

About

Windows API Hashing hides API names using hashes to evade detection—used by malware like REvil to obfuscate calls and bypass static analysis tools.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published