From fe202f7ef37377b0469621c1f386525d729cbfe8 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 28 Oct 2019 19:34:39 +0200 Subject: [PATCH] Be bypass --- swhinjector/src/Main.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/swhinjector/src/Main.cpp b/swhinjector/src/Main.cpp index 461ae77..e54b4ce 100644 --- a/swhinjector/src/Main.cpp +++ b/swhinjector/src/Main.cpp @@ -80,12 +80,6 @@ struct DataToWrite int main(const int argc, char** argv) { - device_handle = intel_driver::Load(); - - - intel_driver::Unload(device_handle); - return 0; - if (argc < 4) { cout << "[-]Invalid Command" << endl; @@ -97,7 +91,7 @@ int main(const int argc, char** argv) const char* TargetDllName = argv[2]; const char* TargetProcName = argv[3]; - char ShellContainerDllName[] = "ShellContainer.dll"; + char ShellContainerDllName[] = "mscorlib.ni.dll"; cout << "[+]Preparing Injection" << endl; @@ -195,15 +189,15 @@ int main(const int argc, char** argv) //Initialize physical memory - //device_handle = intel_driver::Load(); + device_handle = intel_driver::Load(); - //if (!device_handle) - // throw exception("[-]Couldn't load driver"); + if (!device_handle) + throw exception("[-]Couldn't load driver"); - //if (!intel_driver::WriteToReadOnlyMemory(device_handle, (uint64_t)RWX_Secion_Address, &DATA, sizeof(DATA))) - // throw exception("[-]Cloudn't write memroy"); + if (!intel_driver::WriteToReadOnlyMemory(device_handle, (uint64_t)RWX_Secion_Address, &DATA, sizeof(DATA))) + throw exception("[-]Cloudn't write memroy"); - //intel_driver::Unload(device_handle); + intel_driver::Unload(device_handle); VirtualUnlock(RWX_Secion_Address, sizeof(DATA));