Many thanks for your previous advice as those allowed me to make some little progress. I have tried the C++ code as well and I am facing the following challenge. Even when I am trying to put a breakpoint to debug the code. I have tried with the POC shellcode to spawn Calc and generated other examples with reverse shells in case that was the issue. Tested with the classic Windows calculator.
Many thanks,
Kind regards,
Federico
Microsoft Windows [Version 10.0.19045.3086]
C:\Users\federico\source\repos\test\x64\Release>test.exe
[+] Got process handle!
[+] Got function base!
[+] Changed protection to RW to write the shellcode.
[+] Successfuly stomped the function!
[+] Changed protection to WCX to run the shellcode!
[+] Shellcode successfuly injected!
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at FunctionStomping(UInt32 pid) in C:\Users\federico\source\repos\test\functionstomping.hpp:line 41
at mainCRTStartup()
Hello @Idov31
Many thanks for your previous advice as those allowed me to make some little progress. I have tried the C++ code as well and I am facing the following challenge. Even when I am trying to put a breakpoint to debug the code. I have tried with the POC shellcode to spawn Calc and generated other examples with reverse shells in case that was the issue. Tested with the classic Windows calculator.
Many thanks, Kind regards, Federico
Microsoft Windows [Version 10.0.19045.3086]
C:\Users\federico\source\repos\test\x64\Release>test.exe [+] Got process handle! [+] Got function base! [+] Changed protection to RW to write the shellcode. [+] Successfuly stomped the function! [+] Changed protection to WCX to run the shellcode! [+] Shellcode successfuly injected!
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at FunctionStomping(UInt32 pid) in C:\Users\federico\source\repos\test\functionstomping.hpp:line 41 at mainCRTStartup()