All right.
So now we are finally getting ready to to start installing this freedom framework and therefore put
out your devices, start up your virtual machines.
And then we have look into this one and let's go.
Okay.
So here we are now with Ubuntu VM.
This is our client, but we need to install these free decline tools regarding to the server.
This needs to run on the device so you can use a real device like this one over here.
But this needs to be routed right now.
Later on we will figure out how we can run free dev without having root privileges.
But for now we need privileges to make this a little bit more easy at the beginning.
But if you do not have root device, absolutely no problem.
I have designed this course to work in this way.
Also, therefore, we can use our virtual machine which we have already running, right?
If not, then start it up right now.
So we will need this in a moment.
All right.
So now let's start installing Frida.
And we also have a look into the Frida typical sites because you can find a lot of useful information
in there.
All righty.
And let's go.
So we go into the world famous Internet and then under Frida Dot E, this is the the official page of
freedom.
And so within the docs we can find additional information to this one.
There's the app description and we also got some yeah.
Some stuff like for example this presentation link, if you open this one over here, then we've got
some nice presentations where the main author of this tool is talking about his amazing tool.
So also thanks to the our thought, this tool is really amazing and the author is also really amazing
tool.
He's very helpful, super nice guy.
And yeah, he tries as best to help you out if you have some problems.
All righty.
So here we can see 2015, but I guess there are also more up to date versions.
Yeah, from 2018 at least.
Okay.
So this page, this is really helpful within the tools.
Let's see here we can see some additional tools, free darktrace, discover and so on.
But what I was looking for is the AP reference and this one, the JavaScript IP, because we're using
JavaScript to interact with our free server and this is maybe the most important link for you right
now.
So if you open this one here, you can find the r.p.
And yeah, this is we will have a look into this one later on.
I just want to give you the site and yeah, some useful links over here.
All right.
If we go to the top, I guess there's also an installation.
There we go.
And here we can see free.
There can be simply installed by running pip install free to tools.
So this is the client part.
The server needs to be downloaded from the official GitHub and then placed on the smartphone.
But let's first set up the client.
If this one works, then we get to the server part.
Alrighty.
Okay.
So we open the new terminal and in my case I'm using Ubuntu 2004.
This means I do not have pip.
In my case it's pip three because python two has been now deprecated and it's not being installed anymore.
Therefore I have to use pip three.
Install free the dash tools.
All right.
There we have it.
And now we can see the version 14 to 18 has been now installed.
If everything works out fine, then we can simply run free there right now.
Let's see.
There we go.
We have freedom over here.
In case if you have some troubles, sometimes I get some errors regarding to free command or module
has not been found and then we have to go into the Python bin directory and include this into our path.
But I will show you how we can do this.
So here we are now in the home path and can do when we are in home app.
This is my home directory of this user and within CD local bin.
We have no refineries that's being installed with the PIP framework.
And for example, here we have freedom.
We also have freedom.
He's free to kill, free the LLS devices, trace and so on.
And now free to has not been found on your system.
All we need to do is adding this path into our path where we are able.
So what we need to do is we take this path over here and then we go into our in my case it's the set
is H RC and let's see, do I have it already here.
No.
And then we simply append this at the end here, and that's all we need to do.
Now, if you run freedom, the system is looking into this path variable for those binaries and you
have within this path, it can find it now and then.
We do not get this error any more.
Command not found.
Alrighty.
So that's the step we need to do.
You can also find some troubleshooting guide in the cheat sheet i have provided you at the beginning
of this of this course over here.
All right, in case of course, if you're using the patch RC, then you also need to do it over here.
So at the end.
Oops.
There we go.
We at this the spin directory into this one here and then we are going to go.
All right.
Let's see if the system is still working.
Yes, we didn't make it worse.
All right.
So now the free to tools has been installed on our client side.
Let's have a look at the server component.
And this is simply just the binary we can fetch from the official GitHub repository.
So if you are searching for free the GitHub.
And this one over here.
Okay.
Yes.
So this is the official GitHub repository of freedom and yet within freedom.
We have now releases and we can see I mean it's being constantly developed, so there are permanently
commits in there.
So this code is really actively maintained.
So within releases we can now find a lot of stuff.
So there are some yeah, some core features, some gadgets and stuff like this, but we are looking
for C server components so we simply hidden control F and then we are searching for server and now it's
important.
As already mentioned, free is available for many platforms out there.
So we can see this also over here.
We've got Android, we've got Android arm and x86.
We will get into this in a moment, but then we can also see free does available for Linux and for Mac
OS and also for Windows.
So which version or which server do we need to choose right now?
If you want to run Frida on our smartphone and device this one over here, then we have to choose the
ARM architecture, which is this one arm or this one?
I'm 64, so in case if you are running a 32 bit device, then you need to have this server component.
And in case if you are having a 64 bit device like a Google Pixel, for example, then we need to have
this server component.
But if you are unsure, it's absolutely no problem.
Simply download both and try them out.
One of them work and the other one not already.
Okay.
In case if you want to run Frida on your Android virtual machine, then we have to make the decision
between those two Android x86 or x86 64 and once again the 32 bit version, 64 bit version.
In my case, I simply go for the trial and error approach.
So I want to run this on a virtual machine and therefore I download both of them and I also show you
how you can apply this on a real smartphone.
Therefore, let's also download this one over here.
Okay?
I mean the server, it's not that big 25 and be at least 4064 bit version.
So it doesn't matter if you download three or one files over here.
So the files have now been downloaded.
Let's have a look within the downloads we've got now free the server.
This one here is I'm 60 for Android x86 64 and this one is just x86.
We start by installing this on our virtual machine and all we need to do is simply extracting this one
over here and then performing an ADB push to data logger temp.
So how can we extract this?
And the easiest way is simply double clicking it.
And then you say extract.
All right.
And I'm also doing this for the 64 bit version of this one, so we can have both free the server on
our virtual machine, and then we can simply figure out which one works.
Okay.
So now we have both extract that we need to make our connection via ADB to our virtual machine.
Let's see if this one works
unable to connect and therefore I need to restart this little machine really quick.
So now it should have been rebooted.
Let's see.
Yeah, there we go.
All right, now we simply push these files onto the directory data, local temp, because the data local
temp directory is the only directory that is able to run binaries.
Therefore, we cannot simply place our binaries on the SD card.
We need to place them in the data logger temp directory.
But don't worry, even after restart they are still there.
So this is not some kind of temp directory.
We know from our Linux system over here.
Okay, so we go into the downloads directory and then we perform ADB push, we copy, paste this one
and we want to push this onto data local temp and perform the same for this file adb push this file
to data local temp.
Okay.
So let's close this one over here.
Now we connect to this virtual machine and then we go into a data logger tab.
And here we have now our tool free the server files.
If you try to run this, it won't work, I guess.
Let's see.
Yes, the execute permission is denied.
Therefore, we have to make them executable.
We can do this with change mod plus x and then we can simply say free the server and asterisks.
So this should affect both files.
Let's see if we now can run this.
Sorry.
This was a little bit fast.
Let me abort this and control C.
Okay, so maybe let's do s again.
We cannot see a difference, but if you perform ls dash l I'm going to make this a little bit larger.
Okay.
So here we can now see we've got this these executable flags set.
All right?
Now we can run this free the server.
And now it says, unable to save as evidence policy, permission denied.
The reason for this is we are trying to run free the server as normal user, but free to needs to hook
into certain components.
And that's not possible by having just normal user rights.
All we need to do is simply getting root privileges and there we go and running free to server once
again.
So let's copy this.
What?
Oh, I have suddenly changed the directory and they the local temp.
Okay, now we can run this free.
The server is now running nice.
So put this on the right.
This is now our smartphone.
In our case, it's the Java virtual machine.
This one over here maybe that's also opening this.
This is now on on the right side.
We've got our Java virtual machine and our filter server running on this one.
Now we take our our client and we connect to this one.
We can perform if everything is working via free the dash.
PS And then we have to append the parameter dash capital you free that is using the ADB connection between
those two components between our client, the laptop and also the server.
So therefore by having or by providing the dash parameter, we tell free DE to use the ADB connection.
And this is how these two components can communicate, which is our D server and declined.
Let's see if this works right now.
There we go.
We can see it's working, but I guess that's also the case for the for the other architecture.
So until we are not hooking any function, we will not find out if we are running the 32 bit version
over here or the 64 bit version.
We will find this out later on when we perform our first hook.
But for now, let's keep it to the installation part.
All right.
So this is how we can install free down our return machine regarding to unreal device.
I mean, the approach is absolutely the same.
Let's close this one over here.
We disconnect from this one.
And now I connect this device and this one over here by ADB to my laptop, and then we perform this
once again.
Okay.
So now I have also connected my smartphone.
Let's see, ADB devices.
There we have it.
This is our virtual machine and this one is our smartphone right now.
And so first, let's extract the server for this device over here.
We have already downloaded it within downloads.
We have now free to server arm64.
We extract this over here.
Okay.
And now let's see.
ADB desh se we have now two devices.
Therefore we have to provide the serial number here.
Shell Yes, this one is working within data.
Local tem we can see.
Yes, it's not there.
Therefore, let's go into the downloads directory and perform an ADB push.
We provide the serial number.
I'm sorry.
ADB then serial number then push I guess this way
free dev server android arm 64 and this one into data and make this a little larger into data.
Local temp OC.
Now it's being uploaded.
ADB s oops.
That's not the command we want to perform.
We want to have an shell on our device.
We get root privileges.
And now we also run the server data logger temp free to server, permission denied.
If you take a look by our LS Dash L, we can see no executable flag.
Therefore we have to make it executable change mod plus x.
All right.
Now we can see we have this executable flag and now we can run this.
Yes.
Then we can perform this once again.
And this time we see we get different PS output over here because this is now real device.
We have some other bunch of stuff running over here.
All right, so this is how we can install Frida on our virtual machine and also on our client.
Maybe.
Let's do a really quick recap over here on the desktop, what we have done so far.
So which components have we now instead?
Because it might be a little bit confusing if I rush through this like this.
All righty.
Let's recap this real quick.
The first thing we did was installing the freedom tools on our client and so on our client.
We have installed the free tools and this has been done by a PIP.
In my case it was PIP three.
So the freedom tools consists of the freedom binary or the freedom is binary and things like this in
case if we get some trouble afterwards, for example, Freedom Command has not been found.
We need to add the local bin directory into our path very able.
So our path
needs to be extended with the home directory home app in my case and then dot local.
Sorry.
Not local, but this is the directory that contains all this these freed up binaries.
All right, after doing this, we do not have any troubles anymore.
And we can run the free command on our terminal over here.
We do not get any errors anymore.
Nice.
The next part was regarding to the free the server.
And so the client setup has been finished.
At this point we are done.
The next part is regarding to the server and therefore we have to go onto the GitHub repository and
fetch the corresponding server binary and this one over here.
So we have a lot of different types regarding to unreal device like this one over here.
We need to get the arm binary in case if we are running this on our virtual machine, we need to get
the x86 binary.
And in case if you do not know if it's a 32 or 64 bit architecture, we simply download both from this
architecture.
So in our case, we have downloaded both for the x86 platform.
All right.
And then we've got this free the server binary now on our client here, but it has the chipset extension,
so we need to extract this file first.
We have done this by simply opening it in a file browser, and then we've got this free de binary over
here.
This is now our free server.
Okay, then to get this binary, this free the server binary on our smartphone or virtual machine,
we have simply established an ADB connection.
So from this client.
To our smartphone or virtual machine.
This has been done via ADB.
Then we have simply used ADB.
Push ADB.
Push with this binary over here and we have stored them in data local temp.
This is the only directory that can run executables.
Therefore, we need to put this over here on the smartphone, within this directory, within data
local temp we have now this this free the binary.
All righty then.
We have tried to run this binary, but this didn't work because the executable flag has not been set.
We have done this by using change mod plus x for this binary over here and this has been also done in
an ADB shell.
After setting the executable flag, we can then run this, but in our case we need now root privileges
to run this Frieda Binary.
We will learn how we can do this on without having privileges.
But for now, it's easier doing this way.
All right then.
We free.
The server is now listening on the smartphone.
So here it's listening if you receive or send some commands over here.
In our case, we have simply tested this connection with the tool free data PS And what free data does
is the following free data appears in this one over here.
Free dot dash PS is now connecting via ADB.
Into our Frida server and tells them Please list all the processes in your smartphone in these processes
and send the results back to me.
So this has been sent back to our client over here and then we receive them over here.
These are many processes of the client.
All right.
So this was the set up in a nutshell, and I hope it's not more confusing right now.
But if I look at this picture, it might be.
But this is how the components work together.
So we are starting the Freedom Server on our smartphone and then with our client the laptop.
We can interact with this in the next video.
We finally start using this framework and we will do our first hook into an activity.
Therefore, I'm really looking forward to see you there.