mirror of
https://github.com/srothlisberger6361/ShellCodeLoader_Indirect_Syscalls
synced 2026-06-06 16:44:34 +00:00
33 lines
710 B
Python
33 lines
710 B
Python
#!/usr/bin/env python
|
|
# encoding: utf-8
|
|
|
|
dlls = [
|
|
'ntdll.dll',
|
|
'KERNEL32.DLL'
|
|
]
|
|
|
|
functions = [
|
|
'NtAllocateVirtualMemory',
|
|
'NtProtectVirtualMemory',
|
|
'NtCreateThreadEx',
|
|
'NtWaitForSingleObject'
|
|
]
|
|
|
|
def hash_djb2(s):
|
|
hash = 5381
|
|
for x in s:
|
|
hash = (( hash << 5) + hash) + ord(x)
|
|
return hash & 0xFFFFFFFF
|
|
|
|
def print_hash(s):
|
|
print("string: {}, hash: {}".format(s,hex(hash_djb2(s))))
|
|
|
|
def main():
|
|
for dll in dlls:
|
|
print_hash(dll)
|
|
|
|
for function in functions:
|
|
print_hash(function)
|
|
|
|
if __name__ == '__main__':
|
|
main() |