Welcome back.
In this lesson, I'm going to show you how to bypass the encryption.
We don't have to go and figure out how to decrypt it.
So let's restart this program.
And then now, let's put it here, and then we have a breakpoint, I believe.
So we run to our breakpoint. Press G to graph it.
Okay, so now we run to this point here, and then it asks for the password.
Right.
It's asking for password.
Let's step away until this comes—this becomes into a running state.
So let's move this step over.
Okay.
Now it's in the running state.
This is now in the running state.
We enter 123456789.
And we hit Enter.
Now let's go back to a pause state so we can step over.
So we are going to—every time we see a comparison, we are going to reverse it.
So in this case here, it is expecting this to be—all right, never mind.
Never mind.
This is just a loop.
So we don't need to reverse this.
We can break out the loop by jumping over the loop.
Select this part here.
Debug, run until selection.
We are out of the loop.
Here's another loop.
So we're going to bypass the loop.
Select this, and then debug, run to selection.
So we come out of the loop.
Here is where the encryption is happening.
So we're going to skip all the encryption until we come to our next compare.
So look for compare.
So there is no compare here.
There is a compare here, okay.
So this comparison will determine this move.
So what we do is we will now
run to this selection.
Debug.
Run to this selection.
And then here we are going to check the comparison is
comparing - with this memory address. Is zero equal to zero?
Yes, it's zero.
So it's a good thing.
So because it is true, it is—
these two are the same.
Therefore, it will perform
this. Is both.
So let it move.
It is okay.
Now this comparison, are these two the same?
No. One and 20.
They are not the same.
So the jump will happen.
So we don't want it to jump.
We toggle the flag so that it won't jump.
Whenever a comparison fails that causes a jump, it means it's bad.
So we don't want it to jump.
So in this case, the comparison fails because they are not the same.
So it's going to jump.
So we don't want it to jump.
We toggle the zero flag.
So it's going straight.
Again.
Comparison.
Comparison fails.
One is zero, one is one.
So that will cause this move to happen.
Because this is a move, not equal.
That means it's going to move this to this.
So that's bad.
So we toggle this to make it one so that it will not move.
Another comparison is comparing these two.
One is one, one is zero.
Again, it's not the same.
So it's bad.
It's going to move this again.
Toggle it again so it will move.
Comparison.
Comparison fails. It's going to jump.
We don't want it to jump.
So we are reversing the logic.
So it's going to go straight.
Comparison.
This is good.
See?
One and one.
So it's good.
So in this case, it's not going to jump.
It's going to go straight.
Let it jump straight.
Always stop at the comparisons.
Okay.
This comparison is good.
Zero is zero.
Therefore, this thing will not happen.
See, zero flag is set, so it will not move.
So that's good.
This comparison fails.
One is zero,
one is one, which is bad.
Therefore, this is going to happen.
So we don't want it to happen.
We toggle this so you go straight.
This comparison is good.
Zero,
zero.
Succeed.
Therefore, this thing will not happen.
Flag is set.
It's not going to move.
This comparison is good.
Zero and zero.
That means it's successful comparison.
Therefore, this will not happen because zero flag is set.
This comparison is good.
Zero and zero.
This is not going to happen because zero flag is set, which is good.
This comparison again is good.
Zero and zero.
So this is not going to happen, which is good.
So the flag is set.
This comparison is good again.
Zero and zero.
So it's not going to jump.
It's going to go straight.
This comparison is zero and one. It fails.
So that's bad.
So this is going to happen.
We don't want this to happen.
So we toggle the flag,
so it won't—it will not move this.
This comparison is—based on zero is not the same, so it's bad.
So this move is going to happen.
So we don't want it to happen.
We toggle this.
There you go straight.
Now this comparison with zero and zero is good.
This move will not happen because zero flag is set.
Now this comparison is bad.
One is zero, one is one, so it's bad.
So because of that, this is going to move.
This is going to happen.
So we don't want it to happen.
We the reverse to zero flag.
Now this comparison.
This comparison is good.
Zero and zero.
This will not happen.
So it's okay.
This comparison is bad.
So we have to reverse the logic here.
Don't let it happen.
Don't let it move.
This comparison is good.
Zero and zero.
So we can continue because this will not happen.
So we continue here.
Now this is bad.
One is zero,
one is one.
So we have to reverse this.
This comparison is bad.
One is zero,
one is one.
So we have to reverse this.
This comparison is good.
Nothing to do here.
This comparison is good.
So nothing to do here.
This comparison is bad.
So you have to reverse this.
This comparison is good.
So nothing to do here.
This comparison is good also.
So nothing to do here.
Nothing to do.
Leave it.
This comparison is bad.
So over here,
we have to reverse this.
Don't let it move.
This comparison is bad, so we have to reverse this.
This comparison is good.
So nothing to do here.
This comparison is good.
Nothing to do here.
This comparison is good.
This comparison is bad.
80 and zero.
So its difference is bad.
So we have to reverse this.
This comparison is good.
Nothing to do here.
This comparison is good.
Nothing to do here.
This comparison is bad.
You have to reverse this.
This comparison is bad.
So we have to reverse this.
This comparison is good.
You don't have to do anything.
This comparison is bad.
So we have to reverse this.
This comparison is bad.
So don't let this happen.
Reverse this.
This comparison is bad. One is zero, one is one, so it's bad.
So this we have to reverse it.
Now this comparison is good.
So here,
nothing to do.
This comparison is bad.
So we have to reverse this one.
This comparison is bad, so we have to reverse this one.
This comparison is good.
Nothing to do here.
This comparison is good.
Nothing to do here.
This comparison is good.
Nothing to do here.
This comparison is good.
So nothing to do here.
This comparison is good.
Nothing to do here.
This comparison is bad.
So we have to disable this move.
This comparison is good.
Nothing to do here.
This comparison is bad.
So we have to remove and do this.
This is the long way of bypassing the
bypassing the encryption.
Next lesson, I'll show you a shorter way.
Just by patching.
You can avoid doing all this.
But now I just want to show you the principle of how to—how to analyze, analyze the comparisons.
So in this case here, nothing to do.
We have already reversed that.
We already reversed it.
This comparison.
Make sure you click on the comparison to see the result here.
Now this comparison is bad.
So here we have to reverse the logic.
This comparison is bad.
So here if we reverse this.
And this comparison is bad.
So we have to reverse this.
And finally, this one.
This comparison is bad.
So we have to reverse this.
And next one.
This comparison is good.
Nothing to do.
So nothing to do here.
Finally, the last comparison.
And you find the last comparison automatically becomes good.
38 is 38, right?
So because it is 38,
therefore, this will not happen.
This will not happen.
So it will not move
the bad message into -.
See that they want to move this - because the comparison here failed.
It was not a date, but because we—we analyze all the compares and undo the logic,
now automatically it becomes 38.
So this is how you can bypass the decryption.
No need to do the encryption and decryption.
You just have to analyze the compares and reverse all the logic.
So this is a long way of bypassing the decryption.
Right.
Next lesson, I will show you a shorter way.
Okay.
So now it's not going to move, right, because the zero flag is set.
And so now when you step over this, watch the output.
Thanks.
Bobby is now cured, even though he entered the wrong password.
Okay, so that's how we can bypass encryption and decryption just by doing comparisons,
by analyzing the comparisons and reversing the logic.
Remember, every time there is a comparison, it means that it's expecting the two values to be the
same.
And anytime the two values are not the same, it will affect the subsequent instruction, which
depends on the comparison.
So you have to reverse that instruction.
That's what we are doing.
So this is how you can—you can bypass the encryption.
All right.
So that's all for this video. I'll see you in the next one.
Thank you for watching.