Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import sys,ctypes
- kernel32 = windll.kernel32
- print """
- ______ _ _ _____ _ _
- | _ \ | | | |_ _| (_) | |
- | | | | | | | | | _ __ _ ___ ___| |_ ___ _ __
- | | | | | | | | || '_ \| |/ _ \/ __| __/ _ \| '__|
- | |/ /| |____| |____ _| || | | | | __/ (__| || (_) | |
- |___/ \_____/\_____/ \___/_| |_| |\___|\___|\__\___/|_|
- _/ |
- |__/
- Developed by : Muhammad Adeel | Founder UrduSec (c) 2014
- Mail - [email protected]
- """
- target_pr0cess = raw_input('Enter the Process ID: ')
- target_dll_path = raw_input('Path to DLL(C:\Windows\Somefolder\file.dll): ')
- print "[*] Opening Process...."
- procID = kernel32.OpenProcess(0x1F0FFF,False,target_pr0cess)
- print "[*] Allocation memory.."
- memaddrs = kernel32.VirtualAllocEx(procID, 0,len(target_dll_path),0x3000,0x04)
- print "[*] Writing into Process.."
- kernel32.WriteProcessMemory(procID,memaddrs,target_dll_path,len(target_dll_path),byref(c_int(0)))
- print "[*] Getting Module Handle.."
- k32dll = kernel32.GetModuleHandleA("kernel32")
- print "[*] Get Process Address"
- loadlib_func = kernel32.GetProcAddress(k32dll,"LoadLibraryA")
- print "[*] Remote Thread.."
- if not kernel32.CreateRemoteThread(procID,None,0,loadlib_func,memaddrs,0,byref(c_ulong(0))):
- print "[*] Injection Failed"
- sys.exit(0)
- else:
- print "[*] Injection Successfull"
- print """
- _ _ _ _____ _ _
- | | | | | | / ___| (_) |
- | | | |_ __ __| |_ _\ `--. ___ ___ _ _ _ __ _| |_ _ _
- | | | | '__/ _` | | | |`--. \/ _ \/ __| | | | '__| | __| | | |
- | |_| | | | (_| | |_| /\__/ / __/ (__| |_| | | | | |_| |_| |
- \___/|_| \__,_|\__,_\____/ \___|\___|\__,_|_| |_|\__|\__, |
- __/ |
- |___/
- """
Add Comment
Please, Sign In to add comment