Jump to content

Start DLL via Python?

Recommended Posts

  • Premium

You can do so: (like Fusion-Network // credits  to iSouli)

Run a batch via python, move the  dll to the client , and/or rename it to mix, then start the client exe. 

move "C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Networkcoreswitchbotv3.mix" "C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Networkswitchbotv3.mix"
taskkill /im Fusion-Network.exe
ping -n 2 > NUL
chdir C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Network
start Fusion-Network.exe
ping -n 2 > NUL
move "C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Networkswitchbotv3.mix" "C:UsersiSouliDesktopiSouli~1Dark-FusionFusion-Networkcoreswitchbotv3.mix"

You must just run the batch with a python command :)

  • Love 1
Link to comment
Share on other sites

use to ctype module.

from ctypes import *
import sys,ctypes
import dbg

VIRTUAL_MEM = 0x3000

kernel32 = windll.kernel32

def dllInject(PID,dllPath):
	if(PID == 0 or dllPath == ""):
		dbg.LogBox("PID or dll path not entered.")
	LEN_DLL = len(dllPath)
	hProcess = kernel32.OpenProcess(PROCESS_ALL_ACCESS,False,PID)
	if(hProcess == None):
		dbg.LogBox("Unable to get process handle.")
	DLL_PATH_ADDR = kernel32.VirtualAllocEx(hProcess,0,LEN_DLL,VIRTUAL_MEM,PAGE_RW_PRIV)
	bool_Written = c_int(0)
	kernel32DllHandler_addr = kernel32.GetModuleHandleA("kernel32")
	LoadLibraryA_func_addr = kernel32.GetProcAdress(kernel32DllHandler_addr,"LoadLibraryA")
	thread_id = c_ulong(0)
	if(not kernel32.CreateRemoteThread(hProcess,None,0,LoadLibraryA_func_addr,DLL_PATH_ADDR,0,byref(thread_id))):
		dbg.LogBox("Injection failed.")

Regards HaveBeen ;)

  • Love 1

Plain logic saves lives.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now


  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.