Welcome to this new section.
We are going to use Zwi encryption to encrypt our bill.
And so encryption is is where you take the data and then you use that to our operation on that data.
So example here, if you have this form banks, and if you were to accelerate in the secret key, assuming
this is a key, you would get this.
So this is the SLR operation.
And then as our operation is where you use the original Beadie zero, and the key is one.
So you would get one.
It means either one or the other needs to be one.
You kind of have more as one.
So, for example, if the original Betis one and the Keys also one, can you get zero?
And then over here you are the biggest one.
But the key is, you know, you get over.
So there you are, which means exclusive operator.
Now, the good thing about Axler is that if you a story and you get ciphertext and you want to decrypt
this, everything's all you need to do is to Azahari again with the same key.
So, for example, the ciphertext here, which is coming from here, you are you the key the second
time in these keys, assuming key, you would get the original data.
This one here.
So as you are, it's easy simply to encrypt your data.
So go in, download this Puji zero four storing thing, Bill, and zip and put it in the mail f with
it on your desktop.
Inside it, you will find four files.
The compound, that script will take your source code, which is X and Y encrypt first hip and then
build the output X file.
So I could tell that EMC.
And then you have a Python script.
Now Python script will and create shell called the shell code.
Is not bad nor can be sinister on.
So if you opened by the script, we can see the code for the python, which is very simple imposture
the system library.
And then he creates a redeclared encryption key here called secret x alaki narrowly defined function
contextual R function two parameters, the Schuckert debris, one to encrypt and encryption.
He's coming from here.
And then inside this function, you will convert the encryption key to a string.
And so these variable called encryption key.
And then you calculate the length of the key and key to a high variable.
And then we declare you end up with string initially initialized to an empty string.
And then we use of falu to iterate through the data that we put in for each for each database, tracking
the element.
And then for each element, we are going to call it Xolani and then Banita upstream.
And then over here, the encryption keys also dateable for each time that you encrypt.
Also use sliding caching key.
So once you hit the end of the encryption key, then you go back to the beginning of the encryption
key.
So you think a sliding, rotating key.
So for every character, you being content with a different you have a different element of the encryption
key.
Finally, when you finish doing that, you are getting help with string.
And then you have another function to print up the ciphertext to help put it into a string which can
be ready for you to use in insert your source code, your C source code.
So the main entry point for these heightened scrutiny over here is one.
So here you need to specify a parameter for the script to use.
A parameter is a name on file that you want to encrypt.
So the naming of fun in this case would be not.
So this this line here, we just open the file for reading, and you will read by our Women's Week by
Sister Huckabee one barometer of the scrutiny, Sir Harvey zero will be the name of the screen.
And then you have a tri accent here in case.
Yeah.
User made a mistake by not supplying input far.
Now you bring an error message to Talisa, the proper usage of the script.
And then you actually Hiwa, if the user managed to supply the correct parameters, you were going to
see you wouldn't see that the name of the file to a variable Coplin text, and then you would proceed
to this line here that you will call the actual function, which you be fine up here.
Yes, we are functional.
Then take the first parameter as they're paying taxes, which they're put the name of the farm and also
take the encryption key, which is defined out here, and pass both parameters to the function.
So the function we then implement string and return stream and then finally we string will be safe to
another variable called ciphertext.
And then here is where you print the output of the ciphertext.
So to use this file, you need to open a command prompt.
Using how?
Issuing a a.
And then we hear you have our note sherkat, which is similar in a previous peasants'.
And over here is your C program.
Let's open it.
So, yes, he program here.
We have a function to decrypt.
And this is the P paid is defined so that you could function a.
One, two, three, four parameters, the encrypted data, the line of the computer, and then the encryption
key and allow the encryption key.
Initially, he find the key and then assign Nicaragua's key index of zero.
And then here is way available through the data, yet yanqui data.
And then you can go from element by element till he reaches the end of the string.
And then you will use the key encryption key character by character.
So starting in first element of the character.
And then here, if you reach the end of the encryption key, we ricchetti back to zero.
And over here, you see where you decrypted by Xolani.
If the key encryption key first element and the first data element, zero of the encrypted data and
then you write the three, you will write.
They cannot use anything.
Then you increase their key next.
So now you look you will now go into the second element of the encrypted data.
And you also have the second key second element of the key.
And then you repeat the whole process until the whole thing is decrypted.
So once it's finished, decrypting your original encrypted data that is sending will be overwritten,
either decrypted data.
You have the main function here.
And this is where you need to base your encrypted string.
So when you and you first start out this thing we blame, his team will be blame.
He will be just be like this.
So you need to supply the peel.
So then by running the encrypted Python script, if they're not bendin as a barometer.
And then you take the output and then we presume here you do that in a while.
And then here is value.
Copy the size of the payment from up here, sivi to a period length.
And here is very defined encryption secret.
So our key issue and as you you use Koczela to allocate memory and prisoner addresses and also the pillar
which is in phone and also get address how the allocated memory us for user to press enter.
And then it is a present.
He goes ahead and called the decryption function or here and passes the pillar a payroll line.
He comes home here.
And then the payroll is coming from here.
And then the encryption key, which is coming from here.
And then the site I encryption give his calculator.
And then here, copies after the decrypted, your payload will then be overwritten, meaning you to
decrypt it, and then you pass encrypted data into the memory function.
We should copy the data into the allocated memory.
He came from QEP, which I like after.
Then you use whatever attack you may get, which I'll make a logical memory executable as before.
And finally, here you present again.
You will again create a check and execute Elkington memory, which now contains the decrypted data.
So that's how it works.
Now we are going to you are going to use encrypted Python script to create our encrypted mail.
So let's open air coming up.
Angry here.
Clicking on excessive quantitative tools.
Then you copy the path of least for that, come here and change directly to it.
Now we are going to call this script if Python two point seven.
Not on my computer.
You should be synergize python two point seven, async CGI.
And then you scored on this is Python two point seven and Python iciest is one.
So we need to copy this path where the python is fun.
So we copy this part, print here, paste, put it best name, and then the name of the python.
You can use Python three point seven, because this is not this script here.
It's not compatible with Python 3.0.
And the next thing you need is to call a script.
So the new screenies and create the XOR.
Incorrect.
So our python know if you pretend to be tiny parameters, you will show the usage.
He says his name is in locationally a python EIC.
In memory of Python, screw the input far Ananya profile.
And here you have a redirect operator so that when you run this, you how could you do this far?
OK, so this is how easy.
So you repeat the command now you supply the input file input.
Far East been.
So we take what they mean.
If you press enter now, we start providing the redirect operator to the aquifer.
You enter now you output your screen.
That is not what we want.
You only output to a file.
So we repeat a command.
We put the right redirect.
Operator have you given up?
Will find the time note back.
Not so far as to ask you.
Remind ourselves that this is actually going encrypted far.
No, we can't.
And now we're new, far greater here.
So our next thing we are going to open this file opening is not bad pass plus.
And this is your very encrypted data properly formatted for you.
And I see.
Formatted.
So we copy everything correctly and copy.
And we are going to open our source code far.
We've looked at best place.
And then over here, we are going to paste our content file here.
Yeah.
I see.
Let's go to the right, Michou.
Everything good.
Everything.
So now remember to save this.
And then we are now ready to compile it.
So we will run the compiler script.
Press enter before I to campaign here, Cifas.
And here you see he is completa Yeti fans who are here.
Now you can run this Assefa.
So he brings the pillar in yellow memory address as it you press enter to decrypt.
Oh, so I built it.
So you present danger, you create, you present danger.
You may shellcode launch an attack.
So that's how it works.
So in the next video, I'm going to run it again and examine the NBG.
Thank you for watching.