6.2 Immunity Debugger: Fuzzing

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with

Already have an account? Sign In »

14 hours 43 minutes
Video Transcription
Hello, everybody. And welcome to the episode number 29 of the Buffer overflow. Siri's Immunity, The vulgar unfasten
My name is Alejandro Gonna and I'll be your instructor for today's session.
The learning objectivity of the session is to understand the concepts behind before awful attack and apply the techniques implemented before overflow attack.
So let's get down to business, shall we?
First, let me give you some background of the tools that will be using for this session and the rest of the sessions. The first one's the 1st 1 is immunity buggered, which the tool to help us, you know, right exploits analyze mile work. Basically reverse engineer binary files
built. You know it has. Ah,
I don't wanna say easy to use be user interface, but it has a cool user difference. Believe me, the bargain memory allocations are locations with easy, easy. It's ah nightmare. But, you know, this contains are really cool a graphic user interface,
uh, you know, to perform tasks like keep analysis or stock analogies.
So basically, is a Windows based reverse engineer. Binary files at Tool.
Um, you can install it by just following the instructions in the webpage. Look let me give you the Web page
so you can see what is located.
Ah is basically here. You know, immunity Inc
that come And you can just go here and read some background on the tool. But you can't just go here to done allowed it and it just enter your information and it will let you download and execute herbal. And you just need to know, Click next, next, next. And you know you can't actually find me. It isn't you to how to do that.
You don't have fighting style. This will start for you,
and you know that's it. There's nothing to show in here.
On the next tool it's in. It's in a python script kind of a plug in for for immunity, vulgar, which is called Mona Mona. That pipe, which, you know, as you can imagine, a python plugin for immunity vulgar on provides several options to actually
ah, boost your, um analysis a while easing immunity. But the vulgar
um, it will help you, you know, find out which modules are loaded. When you actually are executing your buffer overflow. It will help you fine memory addresses which contain specific of strings you're looking for. It will help you with your No, basically, it will help you with your, um,
thio at capabilities immunity, vulgar toe to create your own exploit.
And, you know, you can just download it from the coral on which is that the group of hackers that created this. Let me just give you the webpage.
You can download it from here, and you will be good to go.
you know, monitor pie instead. Really, really long Python Python script. And again, if I mean, you can just search for readers and YouTube and how to install it. And you know, there's no this is not a big deal. Just copy. Paste this in one location and that's it. That's it. No other thing to do.
And finally, let me give you some background on the technique will be using, which is called fasten. Fasten has several meanings for several people. But in this specific case is kind of a black box test or technique,
which is basically finding box in, you know, my foreign data injection
or data input fields. You can you can actually enter whatever number your thing, Whatever. Actually, whatever you think I mean zero. It could be a possibility. If you're self aware, it's actually dividing numbers to see you know how a number divided by Ciro, Uh, how did it behaves?
Um, a day that doesn't exist. For example. You know, it consists of entering several things.
Uh, that's the kind of testing your code
testing your input variables. And in this case, it represents for us. Uh, you know, testing our applications receive the risible nen ability percent,
which we know it is. So, for example, what will happen if I I enter now 200 characters in this in this field 303. I know you increase the number and see if it fails at some point. Which means that
you know, the boundary, the variable boundaries were not checked
or we're not Simon ties. And you can actually create a before overthrow exploit. So for this case will be using something called wound server. Bull server
is kind of off
server. Really? What's created? Actually just to ah to
actually be exploited.
Ah, purpose. So you can actually see that
exploit that vulnerability Among other vulnerabilities. For example, let me just drag this window. He will be using our Windows 10 machine. And let me just run the server, which is, you know, basically excusable file.
And I run in a poor 4444 But, you know, if you don't want to run it in that port, you can change the port or Deacon David a default without specifying any port,
and will be executed. Important. 9999 s. So if we check here, that's that.
And fine apps 44444
and sexually listening. If I kill that
Ah, it will. Not listening anymore.
So yeah, just a simple Zach Bone server. Doc executed. Well, you can actually download it again from Google. You can just type well, hope that Ext. And down lower something like that and well, delighted for you. And he had several functions will be exploiting the function that is called Tron
because that's the one that includes that before overflow with the nobility.
So let me just first show you Ah, the graphic user interface off immunity, brother, which is right here
groaning as administrator. Yeah, and this is it. I know it sounds, uh, ugly, and I know it seems scary,
but no Ah, you know, attached the program we want, which is born server attached. And this is basically the stock we saw in the previous video. As you can see, it's started as past, so we have to run it.
And, you know, this is the stock now, uh, how do we know? Remember the pointers that we talk about at the beginning? Hopes
she was a
just put it again. Here's the i p here, the VP here, the E S p you know, bottom of the stack top of the stock and pointed to the next instruction to be executed, which apparently, is this deal. So as you can see, everything seems in order. So let's change that.
Let me just create oh, are proof of concept
right now, um,
and let me just copy pays the Cody here, and I will spill into you. But you know, you guys are really smart, So
ah, first, just imprinting fall the library's I will need then just put I pee in the port. They Peter Windows machine support the buffer, which will be a bunch of A's letter ace. And you know, I will increase that by 200 every time and we'll appended to this buffer
and then forced for each string. In this buffer,
I will bring the fasten trun, which is the function that contained the buffer off overflow vulnerability with, you know, experts. Whatever number is, I create the circuit. I connect to the host import and I send the front and, you know, I closed the circuit and at the end,
hopes Let me just go back in here, go down. I added a time that sleep so you can actually see how the memory addresses are changing at this continues to execute, because if I don't put that will exploit women ability at one thing, we'll see yet it's running and it's not running anymore. But I want you to see, you know,
that is sexually
So let me execute it
and quickly drag this.
Okay, so you can see that is changing the adversaries in here.
You can see that no changing. It's changing. It's changing. Is not doing something like like
that we want, because at the end, uh,
I don't really care about it,
because all I want to know that is that it's actually vulnerable to buffer overflow. So as you can see, right now we have a bunch of ace inner E S P, which is the top of the stack. Ah, bunch of, uh,
a seat in the V p the bottom of the stack and a bunch of AIDS on the I P. Now, I remember you guys the tricky part. We're recreating their fresh or first exploit Congratulations we have or denial of service kind of exploit for discipline ability.
Because of the answer, the service is crashing mean, as you can see spots
and says, actually access violation when executing for one. I'm sorry, 41 41 for you, One for the one which is, you know, the letter a the hex of his mom for the letter A and, you know it crashed. That's the point. And if I close here the service open just
I love that if I go here, the service is not running anymore. But if you saw in the background it wasn't crashing with, uh, let me just drag this out.
It wasn't crashing with this this this kind of bites. I saw it crash before life around here, but you know it, you know, at the end.
We're not interested in the top at the end, having more at the top. It will, you know, maybe help us Thio execute whatever pale we want. So it doesn't matter of you. We use this number or this number. Uh,
because at the end will be using jumping.
If you leave, you allow me to use that word actually said these the corridor We're jumping to another location by controlling the e i p. We're jumping maybe to another e sp location. John ps, PS and instruction, for example. And we we went to actually see that.
See that? That's the point s. Oh, yeah.
So let's modify or initial approve concept.
Uh, let me just create. Remember, this is just
bring it in here so you can remember how it looks like.
so I don't want to use that anymore, because I already know that their samples relating there s so I don't want to its star Fossen things. So let me just
create an I'm sorry. Create a new which is called
Park Arrow
before all Focht pie.
And let me just coffee pays that in here
and you know, basically just same thing sending all this character's 2 to 2 or server and just replicating that close that one out,
replicating that
or or system. And let me just drag this out so you can get familiar with the process is starting to surface again, Uh, you know, running again. Immunity, the vulgar Assad administrator. Remember, you guys, this is kind of up
pain in you know where, um Because we have to do this every time. You would crash the service
every time. So, yeah, we'll be doing that a lot. So again, everything's function correctly.
let me just execute that.
And it crashed the system
again. Same behavior. Same. You know, let me just go here to the ESPN and going down following dump. And we have all the letter ace right now, remember,
they're 41. Is the representation for the letter a while we have it right here. So this is all of our stock to you guys.
We have fields.
Just act without a bunch of later. Ace. So cool. Coo coo coo coo coo Will, uh
how do you think we can proceed? That I mean, now that we know that this is not really a question that I ask all the students that I I have with me. Where do you think we go from here? We already know. Let me just drag this out again.
Well, really know that we're actually creating a buffer overflow attack. We already know that
there's there's something wrong with this program. We already know that we're overriding the which at the end, I remember you guys think is something we want Remember we talked about the treat main pointers will be seeing which was waas was the e s p e v p in the a p
Now that we can control now that we know the doors are both for overflow vulnerability
And now that we know that we can actually control the e I p. I mean, by controlling, I mean that we can operate it. How do we know the exact location in these, uh,
in these images? Cat this out.
How do we know the exact location of the A P in this? All of these characters mean 5000 cards for something almost 12,000 characters. How do we know the exact location could be 5000 4000 I mean, how can we possibly know that?
Uh, no. We cannot actually find out a fighter out immunity barker.
So there's a technique and a couple of scripts
Perla scripts that we can use their art bundle with the famous Our men display framework once again. So, yeah, we'll be doing that in the next video.
What is fasten or how do we How could you describe Fasten? Well, basically, it's a technique that you can use to start to
kind of start testing your application kind of quality of shootings technique to see how their application we react, the different inputs. I mean, it could go from any input like malformed data input like, for example, of yourself if divided
a number trying to enter a zero to see what happens.
Our reviewer somewhere is actually receiving date. Try to enter a day that is, that does not exist. Ah,
I know something. Right? And in this case, we enter several numbers, you know, for to see we increased each time. Oh, our input or where we were sending to the data to the program. Does he hard how would reacted and we saw that
it was crashing the system so
we can think that there's there's, ah, buffer off low with that ability percent in that. And what is Montana? That pie, which is this is a python script. Kind of a plug in for immunity. Vulgar. Um,
so we can't actually, uh, test more things or boost or ah, the bargain process. Well, using immunity, vulgar. And while Well, we are a team thing Point. What is immunity, Walker?
Well, immunity bugger is a tool. Help us to actually reverse engineer.
Ah, any day that we want, Um,
help us, Thio. You know, we're, ah, model work creation process. You help us to de bark whatever is in memory so we can actually see how the problem behaves and how we can actually create something to go to specific library. For example,
this is how the bugger memory, the bugger,
and this video will learn some concepts behind the book for overflow attack Going planets up today Techniques to execute the before overflow attack.
And you know, supplemental materials the hacker playbook. This book You will see it a lot in this course and before awful attack. These guys, this is a digital channel are I have recommended to go the channel. They have buffer overflow, among other attacks that you saw in these in these cars.
So I will have you recommend a good t check them out.
Looking forward. Ah, did X video. We'll see how to control the EVP, which is the bottom of the stack. The SP which the top of the stock and more importantly, the E I p, which is the court current pointer to the instruction to be executed.
Because at the end we control the day I pee. We can actually redirect
or execution to another stack or another, a memory location that we went and execute our own payload. Well, that's it for today, folks. I hope you enjoyed the video and talk to you soon.
Up Next
Offensive Penetration Testing

This is a deep course about penetration testing. In this course, you’ll learn from basic to the most advanced and modern techniques to find vulnerabilities through information gathering, create and/or use exploits and be able to escalate privileges in order to test your information systems defenses.

Instructed By