So in this, you know, we'll be seeing how to inject the shark in the remote process using these three
functions.
So first one is virtual objects.
So we'll be creating memory regions using this function in the remote process.
And the second one is we'll be writing to the process, memory, our shared code.
And next one is we will be creating this remote thread to execute that function.
So let's see this function which looks so it's similar to what you write up, but we'll just bring the
handle to the process to create the virtual address space of memory region in this virtual space of
this process.
So I have already made this open process.
So let's go and create.
And the return type is the pointer to that memory with the.
And the first one is the process handle.
And second one needs the address.
Where we want to write to that.
You also point out and to any size so it should be integer and needs allocation.
This is similar to a on Iraq.
So we'll be using our memory card and memory reserve for this.
So that is also I can you that we do.
And the production that is going to be using the to group.
So we can we'll be writing and then executing so we can specify this one.
So this function has been defined.
Now let's go and define this function by process memory.
So to write the data to an area of memory in this process.
So what you can see there is there are some permissions are mandatory that run this process medium operation
to get this region write operation for the right placement you need to have this process medium rate
and process Veeam operation permissions and the remote trade in that process.
We need to have this process created quite information and training distribution.
So these are the constants you can see these constant values here.
You can see are this grid created by the information we are modulation grid, right.
So I have already copied we are into these variables, as you can see here.
So the return rate presumably is the bullion.
So let's see each and every parameter.
First one is the process.
And so which process?
We want to write the memory that is specified by this process handle.
And the second one is the best address within this virtual address, whether this process that is the
pointer to this address which you'll be getting from this function.
And a pragmatist buffer.
So this is the what you want to actually write into that review so we can declare this as bioterror.
And then actually say, so how much you want to send the contents of this buffer?
And our piece, the number of bytes written.
So this variable tells us how much of the words were written into this memory region from this buffer.
So we can say reference integer number of bytes written.
So this function has been completed and the last function is created.
So we'll be creating a remote thread for this process and that will execute our so-called other function.
So there are ten types that try to handle which are.
And let's see the first parameter that is actually the handle to the process.
And this one is the predator world.
So good that you can do this.
This will be inherited from the patent process.
And the stag says you're going to see the stag says you can see this red zero and the neutral uses the
deferred sales for the executable so we can specify zero here and the start address, the starting address,
and you can just pass the pointer which you got from this function.
Actually, this pointer is the, uh, pointing to the function of the type registered protein.
So if you search for this and here you can see, so we have a greater function in our application and
it should accept one parameter and the trend will start this function.
So dietary needs a pointer pointing to the function so that red goes and executes that function.
So we can just specify this lateral function, so existing to some previous material where we have space
for the delegate as a function pointer.
So this thread automatically takes as a function white.
So we now need to convert this into delegate.
And then a Chinese parameter.
This is a function.
If you want any parameters, you can pass this and the creation flex.
So we can do that, as you can see here.
Zero indicates that immediately after creation.
If you miss this great suspended, you need to guard this resume.
So please find zero.
In the last ministry data.
This is the output so we can put this that read daily.
So our functions are defined successfully.
Now you're going to see I already ordered these constants to get this process created.
Query information and VM Operation Redirect.
So that's going to pointer.
But I'll handle the course to open process.
And the first one is our desired axis.
This is a desert axis.
And in order to handle the force and the.
So we can make this command line argument.
Okay.
We need to convert this to convert the.
Going to 32 of the streets or.
So we got this process and now we need to allocate some memory using this material objects.
The first one is the.
Process.
And the second one is the.
Address, we can specify zero.
So this will tell the operating system to find the empty space region and allocate the sites from there.
So the size of.
The memory region that is so I have already got this category record.
You can see this is also same from the previous year and this year x86 architecture of categories are
called so.
So we can say.
Cheryl Cole.
So you see the calls to both freedom and.
So circle around the squad face the diesel side you want to create an altercation type is commit on
and what is that?
And the last one is production.
That is page rate and the return.
So how do you regret this more?
This one.
So the written type is the pointer to that starting address.
So it's starting here.
So now we got the pointer to the starting address to that memory region.
We need to fill that with the circle.
So we're going to write process memory.
And the first one is the process handle.
And second one is our base address, which is starting pointer.
And the next one is what we want the rate that is above.
And the size is shared called underscore size.
And the last one is the reference to this integer.
So we can create in bytes written is equal to zero.
So we can pass this as a reference reference bytes written.
So the output is a billion.
We can just ignore that one.
So we can also put into this.
Bytes written.
Now this will indicate that actually, if there are any bites, uh, if there are any, uh.
That is correct.
This would indicate the not.
So we should see the R and D as their output here so that our function will be using is created.
And the first one is.
But our handle.
And this one is not stag size zero.
And starting at the starting air.
And this one is also Juno and the creation for X.
Creation Praxis zero.
We want to discard the thread immediately.
And the last one is.
You can print out this one so we can set our priority course to.
Zero.
And now how?
Sorry.
This is not, uh, but this is the trade daily.
So here we are.
So now we should be good.
To what?
So we get the trade daily and the third quarter this got it done so we can print out this.
A.
So I think we are good to go.
So one thing you need to know this is we need to compile this for x86 and for x64.
So for right click on this properties below.
So you can see I have made this to x86 so because our shared code is in x86.
So if you for one you need to compile
like x86 one for like 36 and another for x64.
So care.
Let's open and then x86 PowerShell.
So we have seven, six, four, three, six.
So that's up another one.
And here you can see 8500.
So we'll be trying to inject into this one.
€5 zero.
And we should see that.
We can see that character has been popular.
So you can with the yourself as well.
And we need to make sure that our format is special.
So this is how you inject digital got into the process using the creator mode.
So this.
All of this objects to look at the region and then relating to that region and creating the trade with
the goods that.