Welcome to dyslexia in dyslexia will this continue with these same words say that is hag this cider
dawg.
And we have completed our six challenges in the previous couple of lectures but now we have the important
lecture which is obfuscation so first of all let me just click on this link which is saying take these
spellings.
So this is one of the moderate challenges saying that this is the serious obfuscation which is javascript
obfuscation.
So first of all let's see what this obfuscation means.
And we have the wikipedia link over here and it is saying this of prosecution is the deliberate act
of the creating source of a Muslim code that is difficult for human to understand that means you are
this wrapping or making the cord which is a javascript code that ought to be easy for the human to understand
that means it is not simple like when this mega alert.
So if you just write something like alert it would be converted into the form that would be very difficult
for a human to understand.
That wouldn't be something like alert.
It will be converted to hexadecimal code or something like I had one score that one to be easily understandable
by the humans.
Like a function in the natural language it may use are basically needlessly around about expression
to compose statements that mean it would be random and it would be created so that it only we understand
for the humans so that it would be difficult to do the reverse engineering that means it will be difficult
for humans to crack the code which is basically the way to just make your code much more efficient and
much more difficult for the hackers to understand.
So let's see some other tool which is available online.
So we have to obfuscate to that I use so let's see how this works.
So you are just getting your state.
The bicycle it's always good core which is just the funds and saying hey you can just customize this
funds and offer you one.
And it is thus giving us hello world.
It is spending the hello to our console.
So when is this accurate these lavish Corliss obfuscate the score.
So let's see how the obfuscate work.
So you have a couple of functions over here you can get the some of the ways to obfuscate and I'm just
making their heads that is emblazoned right over here.
So this priest is selling to obfuscate and you're getting these selling over here so you can see your
code which was simple javascript code saying hello world has been a first getting to something like
this which is very much difficult to understand for the hacker.
So what do you are doing here.
The screening the variable are basically what you have the script the functions since you won't be understanding
what is going over here.
You have the while why we need while is basically the way or basically it is making the hackers are
for ourselves to understand and basically it is very difficult you have the different funds on why this
is over here are basically the simple code which is simple this code has been transformed to something
the way that we want to be able for the hackers to be understandable.
So this can be the way for the developer to the scrap their code so that it won't be easily cracked
by the hackers.
So this stuff escaped.
That means you are making your code that is your transformation of the code that will be difficult for
human to understand.
So that means we can just expect something like the way that the simple function will be wrap something
like this are basically like this which was our output.
So we would expect that they will obfuscate their code to something like this.
So they will this wrapped a variable like this.
They will describe the functions of the Dom method will be dissimilar to something like this or that
it won't be easy for us to crack what they're doing.
So let's try.
First of all let's press control you control love.
Let's see password.
And we have find the password over here.
So let's see what is the.
This obfuscation or what they are doing over here.
This is that so if you see it we have all here that it should be something like this.
And as expected we have something like this over here.
So this is our Zabriskie school.
So let me just copy this.
All of this because you would expect that anything inside this script that would be your javascript
code.
So let me just run my sublime and paste it over here.
So what is this man.
So this is your obfuscate code so you are thus getting the score.
Where do you have the two statement.
Because as you know the javascript course are the one line code will just end with these semicolon.
That means you have the two statement first statement is this and the second one is over here.
So let's see how we can describe this scored.
So first of all let me just see what this variable is.
So let me just grab this control C and as usual with this.
Get this a console from here.
Will this inspect the element go to the console pasted right over here.
And as you see this is the array.
This Thursday that has from Cat code and the right.
That means let's go over here.
And this has the contained all this.
So this copy all of this is this is a.
Let me just go back and paste it over here.
So we have this give the variable which was this variable.
And if you see over here that this variable has something like this.
Let me just copy this and go back and see what this is all about.
So it is right.
That means what we are doing here.
Let me just go over here grab my pen real quick so let me describe this.
So we have this variable which is this random variable over here too as you can see over here.
And this bunch of code is just assessing that element of this array.
So basically this is same as saying this is one so.
This object is referring to this.
In others update starts with zero.
And the one so you are saying document and instead that you are just putting this right because this
is the way to is the element of data.
This is the one of the way we can also assess the element of the array with the dot.
And this is the another way to assess the element of the tree.
So what we have done here is we just get that right.
That means will this remove all of this and will this pass here is a right.
So it should be right.
And after that we have these strings so let me just grab all of these from here.
So the scrap of the this let me this copy let me just go back here.
Let me paste all of these.
That is your string.
Let me just set into.
OK.
So we are getting some of this always keep code over here.
So let me just grab this scored and let me copy the masses.
Go back to the sublime.
Let me pet store here.
So what we are doing is basically we had a quarter over here and let me just remove this bunch of a
thing.
We don't need.
So we have now cleans our skin.
Good.
So let me just remove this part too.
And now we're familiar with the button tag and this button tag is this single that SEC password which
was obfuscated with this bunch of accord.
So it was hidden with discord basically and you can also do this with the online tool.
So is this great.
Now our cleaned always skip Gordon.
So let's see what is going over here.
So we have the evening which is on click and it is sticking with these conditionals.
That is saying if the password is equal to this value then it will give us the alert masses saying that
you win.
Otherwise it will this give something that with the else part that it is wrong and you should just try
again.
That means we are having the clean code right here.
So in order to win the value sword be this.
So let me just copy this.
If the value of the password is this will just get a load of win.
Otherwise it is the same.
Wrong.
So let's go back to our Maggi Lalas click this site.
And this would be our password.
At best this down SEC password.
And it is saying you win.
So this is the way to do this.
See for the prosecution in its advance concept in this obvious killer why do you hide the core sway
the hackers own get your cause so easily.
But we have done online tools like this in order to this correct for this obfuscated code also.
And this is the way so that you can just try and we have just completed all of our challenges of the
mission so that the simple and the basics challenges which can be useful in upcoming Lexis ways to test
whether it's give this goes.
And in the upcoming election this is start using the birth suit and this tool just make use of that
birth so to speak for the excesses this attack on the Labor web site and see how Barb should work with
the javascript.
So see you in the next one.