In this picture, we will be completing or Glenside software and we will be connecting to to our control
panel.
So let's start calling.
For the first task, we need to create new variables for storing other URLs first you will be registered
URL, which will be the registration page of our control panel, which is registered BHP.
So for you, it will be a setpiece slash IP address of the particular machine, let's check it again.
Or IP address is currently.
Let's check it again by using IP space, a command, here's the IP address of the machine.
We need to use this, so I need to change the last part of the IP address, which will be one hundred
and forty five, and use this IP address in every URL.
So or register your L will be registered at HP.
And also we need to create another variable for.
Get results page, which is here.
So let's do it, we just get I would call it.
Get results and the world will be a part of that machine slash get results that BHP.
So what's next for the first step, we need to register the control panel before getting into the wire
loop.
So just before the wire loop, we will send the post request to the registered page in order to register
or client machine to control panel.
To do so, we need to send the post request within some parameters and or parameters will be the hostname,
the IP address and the operating system.
So let's create a new variable for storing the parameters.
I will call it
register variables or register.
The parameters and it will be hostname will be cut or hostname, and we can get that information from
the general info class by using instance of general info class we can use.
Hostname variable of general info class to get hostname information and also we need to append the IP
address information and again we can use or general info class IP version four address variable of general
info class stores, the IP address of our client said machine.
And also we need to append the operating system version.
And to do so we will use the operating system variable of the general info class and our parameters.
Registrar parameters is already.
And so we need to create a content type header in order to send post requests properly.
If you are new to this concept, please don't worry about the content type header before keeping continue.
So in order to add a new header to our.
The requests we need to use.
Heather's the object that Heather's dad admitted and are headed to will be a content type and the value
of the content type will be application slash X dash w w w dash home, dash Eurail and call it.
And now we can send a poll request to all registered page in order to register control panel.
Let's do it.
Send the post request, we will be using applause to drink method of the planned class, it takes two
arguments.
The first argument will be registered URL and the second argument will be registered Parramatta's.
And let's test, but before testing, let's clean up our table victim's table by using truncate table
victim's comment and our victim's table now clean.
Let's see.
As you can see, no record exists on the victim's table.
So now let's run all court and see if the registration process is working or not.
Now switch back to your attacker machine and use that comment again, as you can see, our victim has
been registered to database.
So stop the program by using control keyword combination.
So what's next after the registration we need to send?
Requests to get comment from the control panel to do so, we will be using comment URL, but.
Let's check that get comment that we need to send the post requests and we need to set hostname IP address
and operating system parameters, these parameters are already existing, the registered parameters.
So we can use this variable for sending a post request to get comment.
Also get comment page also.
So.
We need to send the post request to the get comment that PSAP page with the same parameters with the
registered page, which will be hostname IP address and operating system.
So let's do it.
Before sending the post requests, we need to add this header again.
Get inside the wire loop and inside the tri blog.
And your content type header to your Web client object, and by using upload method of client class,
we will send the post request to the comment URL.
It upholstering matter takes two arguments, the first argument is the the the euro.
And second argument is the parameters which will be registered parameters and actually change its name
and just call it parameters.
It's better this way.
Just use parameters and parameters.
So when we take a comment, we need to send a comment to the common parser class comment, parts of
a function of operations class.
So.
We will save the comment by using a variable, let's call it string taking commands, and we need to
send this comment to the comment parts of a function of operations class, which is here.
So let's do it.
Use.
The instance of the operation operation's class.
And call command parts or function with the taking command as arguments.
Actually, we can do one improvement here, actually, let's make it if if the length of comment is
bigger than one, then send the comment to comment post or function if taking comment lines bigger than
one.
Then send the command, the command parser function.
And we need to send the result of the command parser function to control panel in order to receive results
of the commands, so hard to do so.
First thing first, we need to edit the comment, partial function, because it's return data type is
void.
Now we need to change the streambed and the command policy function will return the return values of
the functions, return value of the all of the functions inside the common person class comment parser
function.
So let's add the return keyword just before every function calls.
Let's do it now.
So.
And we are done and then we need to send the results of the command to the attacker machine to do so,
we need to send a post request to the get results page.
So.
Let's assign the result of the comment partial function to a variable, I would call it command result,
and it will be equal to the term value of the common function.
And people send these variable, this variable to a token machine.
Let's check the get results page.
It requires three parameters, the hostname IP address and resolve parameters.
So let's create the corresponding parameters on the client side.
Let's create a new variable, I will call it.
Result parameters, and it will be hostname, which will be equal because the name variable of Jianlin
for class and IP address and it will be equal to the IP version for address variable of the general
info class.
And lastly, we need to append result and the result will be equal to common result, variable command
result variable.
And then we need to create we need to add the header to all requests and then we can send the request
to the get results page by using.
Upload string method of the planned class or first parameter will be get resolved and our second parameter
will be resolved parameters and now it seems like we are pretty much ready.
So let's.
Let's clean our database again.
And open your browser and go to your panel.
As you can see, no board is exist now and let's run our program.
And refresh the page, as you can see, our hosts is here, and let's try to manage our board by sending
a simple IP complete command and let's see if the result has been shown here.
As you can see, we got the result from Declan Klein software.
And let's say let's wait for a few seconds.
And the new results.
There is resolved.
Hmmm, there may be a little error exists.
Let's try another comment, actually.
Yep, or else comment has returned after refreshing the page, and if I refer you to Page again, I
will see the ability comment.
It's because it's happening because.
When we return, the results from the show results show results page.
We need to remove the.
Result from the database, so let's do it and complete our program, we need after showing the result,
we need to remove it from the database so the new results can come.
Let's do it.
Updates victims said comment resolved to empty.
Up to.
I'm sorry, my keyboard layout has changed.
Let me fix it again.
Said common resolve to blank where hostname as it goes to questionmark and questionmark will be replaced
with the perimeter of the victim, said CAMAC results a. hostname.
OK, that seems good.
And then find Perram and then execute.
We do not need to use to result in bad result and fetch comments here.
Now we should be ready.
So.
Let's try it actually refresh the page again and try to send an IP config comment and let us see.
As you can see, the IP configuration is here.
And let's try let's try the last comment again.
And let's see what will happen, as you can see, the US government has worked so.
We have completed our program, we successfully connected to our control panel and or both machine can
be controlled from our control panel.
So that was it for this lecture.
See you in the next one.