StartRoutine | four different methods to execute shellcode | Hacking library
kandi X-RAY | StartRoutine Summary
kandi X-RAY | StartRoutine Summary
A library with four different methods to execute shellcode in a process. All methods support x86, x64 and wow64 shellcode execution. All methods will call GetLastError if the to be executed shellcode returns anything other than ERROR_SUCCESS. The methods will consider the shellcode execution failed if execution time is longer than SR_REMOTE_TIMEOUT (default 2000ms).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of StartRoutine
StartRoutine Key Features
StartRoutine Examples and Code Snippets
Community Discussions
Trending Discussions on StartRoutine
QUESTION
So after creating a remote thread in a 64-bit process, I'm mapping my shellcode:
...ANSWER
Answered 2021-Mar-22 at 16:55If you're asynchronously running this between any two arbitrary instructions in an existing program, you need to make sure you save/restore ALL the architectural state that isn't call-preserved, like an interrupt handler would.
You missed r10
, rflags
, and XMM0..5
1. https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-160
For safety, you also need to make sure you reserve the full 32 bytes of shadow space, so the DLL functions don't step on any of your saved register values. You say your testing shows that wasn't a problem now, but some future Windows version might have DLL functions that do take advantage of that shadow space.
Footnote 1: Also x87 st0..7 or MM0..7. And AVX YMM0..15, although Windows API functions are unlikely to be affecting their high halves by running vzeroupper or anything. Or touching AVX-512 ZMM0..31 or k0..7. So you can probably get away without doing an xsave
/ xrstor
, instead just saving XMM0..5.
QUESTION
I have difficulties with my rather simple (I'd say) code. My goal: I want to create an app that takes single lines of a .txt and adds them them each to a text box (TKinter), with a few seconds in between.
...ANSWER
Answered 2020-Nov-30 at 04:22after
does not pause the program like time.sleep
does, it just schedules something to be run later and keeps going. So all your lines are scheduled to run in 1000 milliseconds. To do what you want you can either use the i
variable to give each line a time 1000 ms apart:
QUESTION
I have a function which looks like below
I want to call lambda expression from pthread created threads.
...ANSWER
Answered 2019-Jan-10 at 19:05You can not cast std::function
to function pointer. But you can use std::thread
, which will work with any callbable, including std::function
.
If, for whatever reason, you can't use std::thread
, you can create a local class and a static member function there, to call the std::function
.
Something along following lines:
QUESTION
This code below working fine to create separated threads without pass any parameter of data types. Now i want know how i can pass parameters to method that executes when ZwCreateThreadEx
is called?
For example, how pass a HANDLE type and a type UNICODE_STRING?
My actual code:
...ANSWER
Answered 2018-Apr-20 at 17:52If you want to pass more than one value to your thread function you will need a struct to hold those values. And depending on code design the struct instance may need to be dynamically allocated (if it were local to the function calling ZwCreateThreadEx it may well no longer be valid by the time the thread actually runs).
And as Martin James says you would then pass a pointer to that struct instance as the Argument parameter.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install StartRoutine
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page