This is my implementation of the HellsGate algorithm for SSN lookup. It works as follows:
- I get the base address of the NTDLL in memory using the PBE.
- I get the address of the NTDLL export table.
- I look up the address of the corresponding function by its name.
- I extract the SSN using a simple Assembly routine.
This is the simplest way I could design. It should work perfectly for all versions of Windows.
nasm -f win64 .\Assembly.asm -o .\Assembly.obj
g++ -o malicious.exe main.cpp Assembly.obj