MCPcopy Create free account
hub / github.com/dobin/SuperMega / test_dll_code

Function test_dll_code

tester.py:191–224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189
190
191def test_dll_code():
192 print("Testing: DLLs code")
193 settings = Settings("unittest")
194 settings.injectable_base = "libbz2.dll"
195 settings.payload_base = "createfile.bin"
196 settings.verify = True
197 settings.try_start_final_infected_exe = False
198 settings.payload_location = PayloadLocation.CODE
199
200 print("Test DLL 1/4: libbz2.dll, peb-walk, overwrite-func dllMain (func=None)")
201 settings.carrier_name = "peb_walk"
202 settings.carrier_invoke_style = CarrierInvokeStyle.OverwriteFunc
203 if not start(settings):
204 return
205
206 print("Test DLL 2/4: libbz2.dll, peb-walk, hijack dllMain (func=None)")
207 settings.carrier_name = "peb_walk"
208 settings.carrier_invoke_style = CarrierInvokeStyle.BackdoorFunc
209 if not start(settings):
210 return
211
212 print("Test DLL 3/4: libbz2.dll, peb-walk, overwrite-func, func=BZ2_bzDecompress")
213 settings.dllfunc = "BZ2_bzDecompressInit"
214 settings.carrier_name = "peb_walk"
215 settings.carrier_invoke_style = CarrierInvokeStyle.OverwriteFunc
216 if not start(settings):
217 return
218
219 print("Test DLL 4/4: libbz2.dll, peb-walk, hijack main, func=BZ2_bzdopen")
220 settings.dllfunc = "BZ2_bzdopen"
221 settings.carrier_name = "peb_walk"
222 settings.carrier_invoke_style = CarrierInvokeStyle.BackdoorFunc
223 if not start(settings):
224 return
225
226
227def test_dll_data():

Callers 1

mainFunction · 0.85

Calls 2

SettingsClass · 0.90
startFunction · 0.90

Tested by

no test coverage detected