All right, ladies and gentlemen, and welcome to
last video in covering tracks and password cracking. I'm in this video. We're gonna discover we're going to discuss a few topics among which are time stamps,
event, log clearing and password cracking.
First, we're gonna be discussing this time stamps, and we'll be discussing this primarily in Lennox as well as how to edit them.
Timestamps. Almost every operating system has time stamps. It's a metadata field which informs the system and users
When If I was created when it was edited, when last it was red moved is actually kind of in line with created.
But it tells you, you know, when a file got to where it is now,
they could be used to pinpoint, You know, when a militias user got on and changed them,
they could be used his comparison for backups. So if we have, you know, unknown good file from last Tuesday at 12.
And this Wednesday, it one,
everything's falling apart and we see that that's the file. With the timestamp change, we can pull from the last update and you're the last back up and we're good,
um, in Windows, the only real way to defeat time stamps is by obfuscation.
You can edit tons and tons of files writing script at it, as many files as possible. That looked like they might be important.
You can copy a file and, you know, open the copy if you're only opening for reading.
Um, depending on the Windows version, this mayor may not affect timestamps Windows seven and later. Don't bother with this method. It's primarily from X p and older systems.
harmlessly editing a bunch of files is kind of a useful way to do it,
if only because a script which opens a vial is very easy. You know, open the file. Close a file,
But if you do that with, you know, a couple 100 files from the system 32
then you're going to freak them out. They're gonna have no idea what you're actually doing.
So, you know, kind of giving them too much to look at
sort of the opposite of the way. A lot of times you would go, but by giving them too much information, you can actually prevent them from seeing what you really want them to see.
I mean, linens, however, there's a
there's a much better option,
and it's called touch.
So this is what touch commands look like. All touch really is is a file which affects timestamps. If you use touch on a file that doesn't exist, it will create a file. But in general, what you're gonna use touch with is to actually edit a time set.
Now the reasons for this are fuzzy.
I'm sure there was a great reason for it once upon a time,
but now there aren't really many good reasons to use touch. I mean degrees. In terms of our thinking,
you know, it's easy to hide the bad things we've done, but in terms of an actual you know, proper user, there's not much justification for it.
So what you'll do is you'll just type touch, and then you'll type the option,
which were only going to really look up to here,
Uh, which will be the tactic and attack? A.
You could also use taxi, but it's functionally identical, other than the only differences which time stamp it edits,
and then you type obviously the file name where the file names you can actually had it several files at once, which will look at it in just a second.
so, for example, the tack T says touch timestamp. Otherwise, if you do touch, it will try, and it'll basically just update it to the current time. Tak t Let's give it a specific time.
So, for example, you can type in
1 May 2005 at 10. 22
full of the file name and then basically all of that pile name that problem's access.
Um, And if its creation, I was later that its creation time and all the other long times will change back to this time right here,
Um, it's very handy if you want to. You know,
you broke into a system at
messed with all their stuff until 12. 30. And now you want to change it back to 12. 01 It's a really easy way to adjust the time Stamp it. No one's ever gonna catch it.
The other one that we're gonna look at his touch Tak es, which is slightly different. And it's sort of the example of all the other touches. Touch decays for access time. Um,
Aye aye, affects the access times the last time it was opened. So it is actually possible to do you know, the life last access was 2001 and the creation was 2004.
That's going to set some red flags, obviously,
but if you're feeling mean, it is totally doable. One thing I did want you to notice is that the file or the time stamp for the files it's clearly different.
The more granular and specific you can be the better,
because this 1st 1 right here
is going to edit it to be a 22 5 2001 May is very, very, very specific, and it'll blend much more easily. Where is the 2nd 1?
Whatever year it ISS will be the 14th of May,
Um, and it will be at
zero in the morning, just first thing,
which is sort of noticeable. It's actually midnight, but its accounts it for the morning. So first thing in the morning,
sort of noticeable if it's a file that gets messed with a lot.
So the more granular in the more specific you can be the better, Which is why it's always good to know what time it is when you pop onto a system.
I'm the one that I did want to include because it's one of my favorites to run
time period on every single file in the directory
on this can mess with certain source code. Monitor your certain source court management.
So if you're going in to do it, DOS and you change all of the time stamps back to, you know the same day. Ah, lot of simpler applications will do their updates and emerges based on
So if you add it that you can actually do damage to a lot of source good servers,
I'd recommend to get actually doing it because the company is going to get very upset with you. But you can show them that you could have done it and kind of drive your point
about really others for touch. It's a fairly straightforward demand.
is Event Lux. Now event logs like a road here. They're basically bash history On crack
were bash history stores, all of the commands you ran the event log store, everything about every one and every item.
Um, just any bit of information to be started in about log. Ah, when I actually ran the w w e v t you tell which we're gonna discuss in a moment on my own computer.
It sent me back nearly 78 kilobytes. And that was just
file names That wasn't the actual store of data stored in those logs.
Different applications. Almost all of
the windows applications will create their own logs and their own event logs a cz well, as their security system in all sorts of other logs,
they will look at it just a second. But they could be used to store information about just anything you can imagine.
They're created by the system in the cup for just any sort of obscure data reference they may want to make.
So we look here, Debbie evey t you till the two options. We're gonna look at it gonna be e l N c l e l is a numerator. See, Ellis, clear
a CZ. You see, there are a few of them right now. This is just a quick sample of the ones that came up because they're that
The ones closest to security really is why they got selected.
so you see the first option, the one that's most important to me right now is security.
This is security logs. So whatever they've got set as sort of a host I d s in its own way. Where they've got said is saying, This is something I want you to keep track up. This is something that either shouldn't happen or something we should know about when it happens. Whatever set up
is whatever certain can certain config things are changed.
It will register. Their system is when pretty much any major lake,
no windows configure windows, admin privilege. Basically,
any time you need to use admin privileges, system's going to see it in some way.
Um, those three were really the biggest ones.
Windows Power Shell does indicate
Yeah, that's one that's worth getting rid of two
because, you know, because it's storing, you know, logs from a different kind of show. But
it's still a command line utility. So if you find all the command line utilities that logs you clear those out,
you're not actually necessarily gonna get rid of all of the command you've run. But you're going to get rid of any security warnings or anything like that that may have come of it or whatever they're choosing to love is essentially what you'll get rid of, um, again, thing that is worth noting here
is that with Windows, you don't have the opportunity to
manually edit logs or, you know, carefully change each one. You basically just get tortured,
which is what really right here.
You just nuke it. It is very noticeable. It's very, very noticeable. When an entire security log goes missing, every sys admin worth his salt is going to see that you've done something wrong.
However, it's our only recourse at the low level that we're operating.
there exist, you know, hacks and applications. And you could write your own application, which could more properly sneak into the windows logs and edit things. That's not really the purview of, ah, a relatively basic course like this one.
so, barring all of the other options and stave in well, Bart forests,
we have no choice, particularly the law. So we're gonna hit security. We're gonna hit, you know,
system. We're gonna hit all the logs have mentioned a minute ago. We're gonna rip him out
again. They're going to know we did something. But the bright side is they're not going to know what we did.
in a ch class, I was in a while back, the instructor gave me a piece of advice, which is
it's not only illegal if you get caught, it's only illegal after you're convicted.
Which isn't necessarily advice, I would say is quite correct for the real world. Certainly not for penetration testing, because if you do something illegal, they're going to freak.
And by freak, I mean, they're going to arrest you.
if they have no evidence of the commands you've run, if you have no choice but to torture systems logs to hide your activities
better that than they know exactly what you did. So again, it's always a balancing act between effective and noticeable, and in this case, the pendulum swings pretty far
effective still works out.
And that's pretty much all there is for Windows in that logs are gonna move on to our final topic in this section,
Um, and really our final major topic in general, which is password cracking,
Ah, password cracking kind of falls under the covering tracks,
not because it's part of covering tracks with because it's actually the first step in the next portion
of hacking, which is sort of a cycle, really, Once you get to the exploit and the post exploit stage,
it kind of turns into this constant cycle you exploit into a system, you gather all the information, you do all the fun stuff.
Then you explode into the next system
and you do whatever you want to do to that system. Then you exploited server or the next system, or whatever,
the long story short being that
once you get to this point in the penetration, testing or whatever you're doing,
you've sort of stopped going in the strait progression and it's turned into, ah, thin, a short circle that's going to continually spend.
So we're gonna go ahead and prepare for maneuvering through the network and, you know, gaining for their access and all that by cracking passwords.
Password cracking is a very important element of this field. Everyone has had to crack the password at some point who is a security professional,
a za result of that. They're a bunch of tools for doing it John the Ripper is extremely popular.
they're just tons and tons of password baby password crackers, online hash crackers. It's actually possible because of how many
of the most popular MD five some things that have been cracked where you can actually use Ah, a Google based password cracker. You can write an application, and I know this from experience. You can actually write an application, which will send a Google query
click essentially the first return.
And in about seven out of 10 cases, you can actually just google the hash programmatically and break passwords that way.
not part of that is because MD five is very weak hashing out of them. You should never, ever use it.
We'll get into that in a little bit,
like so. They're just tons and tons of ways of breaking ashes and finding passwords. But pretty much all of them in one capacity or another, revert back to
just a few methods the two methods were going going to discuss. Here are the two basic methods There are, you know, very complicated math based algorithm, crackers and things that actually take advantage of the math behind these algorithms. But we're really not gonna worry about that.
Um, if you're interested in something like that, then by all means, it's a very cool field, but it's sort of outside the purview of this class.
A brute force password cracking consists of trying every single possible combination until you get it. Response.
It could be very, very slow, but it is in its own right, unbeatable. Eventually you're going to find the right combination because you're trying every combination.
The problem with that and
even those of you without a background in cryptography can probably identify it.
I mentioned incredibly slow,
I'm sure to attempt to have to crack every single shot 5 12 hash. It would take you in the hundreds of millions of years
the actual amount of time it would take. You would be longer than it's taken man to evolve from lizards,
so I would recommend against that. It's not going to work out.
Um, by the time you Kenbrell force a password, it's usually too late.
That's not in every case, but its usual. The big differences or the important thing, is really how good their password rules are and how could. Their hash is if they're using nd five,
you can probably bring your way through with, you know,
a normal desktop or a few GP use dedicated to the task.
If they're using shot 5 12 and serious password rules,
it's not gonna work out for you.
So here's a little pseudo code example of what brute force cracking looks like. Here we have a function name. It's not important we start out at zero. So we're starting out of the very first hash hash is don't go in any incremental order. They're completely or pseudo random.
Ah, but they increase progressively or they don't increase progressively. But is this number increases progressively, they'll change the way statistics working the way probability works. Once you've theoretically tried a number of inputs equal to the the maximum number of combinations,
you will have found every possible hash in reality, because collisions, it'll be both faster and slower than that
faster, most likely to find the hash. You want slower to actually find every hash. But then we do a while true, which is basically just spin forever.
And we checked the hash against you know, they calculate ash, so we calculate the hash of Justin incriminating value.
And if the ash is equal to the one we're given,
we returned that hash and say, Hey,
well, really Return that hash return I or that value. So hey, this is the value that will work as the password.
If we go back and no, then we're gonna incriminate value and try again.
So this is a very short snippet of code, and it can spin thousands and thousands of times per second on a good machine. It can spin incredibly fast. The problem with that, of course, is that as fast as it can spend, the numbers with which it's dealing are
hilariously large to to the 500. And 12 is a very,
very big number. So while brute force crackers are very good on short passwords and weak passwords,
they're not so great on the newer algorithms. They're not gonna do much good, which is where
dictionary attacks come in. Dictionary attacks were sort of the brain.
A dictionary is a list of words. A dictionary attack uses a list of words is that's all there is to. It comes from basic sort of fact, which is that 98% of all passwords. All systems are made up of the 10,000 most common passwords. Creating a new password is hard.
It is after you have to come up with some
strange, contrived series of letters and numbers and symbols,
and then you've gotta memorize it. And the longer and more difficult to pass word it is, the less likely you are to do that. So you know,
most people revert to one of 10,000 passwords because there are 10,000 possibilities.
And, you know, no one knows everyone else's password. You think you're being clever or you think you know Oh well, that master, it's so stupid no one would ever guess it. A. Crucially we would, and we do all the time
when I kind of drop here. And it's starting sort of a funny coincidence from something else that was also 78 kilobytes earlier.
But ah, 10,000 passwords at eight characters. Each
can crack that in seconds. Minutes is a stretch. If you don't have Salter, if you don't have something special toe kind of slow it down,
a dictionary attack is going to get roughly 98% of all passwords
in a few minutes at most.
And the more characters you add,
it doesn't really change the time very dramatically.
So the problem with dictionary attacks and what keeps people who you know, execute dictionary attacks from owning the world
is a combination of things. Now one of those things is putting. Rules on lockout are on attempts to log in before you get locked out. Essentially, you can't keep trying different passwords because the system will kick you all
that combined with assault, not to be confused with assault, which is, you know, hitting someone with a rubber hose until they tell you their password but assaulting your hashes. Essentially, all that does is it. It puts a random value
on passwords so that when they get hashed, it's not the same ash that password would normally be on another site, which uses a different hash, a different hash salt,
what that allows you to do essentially. What it means is that
when people crack a assault, people crack a hash on a weaker website.
They can't then use that to go get into a stronger website. It doesn't work out the thing with that, really, is that dictionary attacks are still very functional. Um, you can still break into a website without a whole lot of trouble simply by guessing passwords.
If you manage to get a copy of a shadow vial or any sort of password hash file,
the dictionary attack becomes relatively trivial to finish up,
so dictionary attacks are obviously extremely powerful. They're still among the most powerful and most efficient ways to break into a system.
Um, and again, with the top 98% pass routes
98% of all passwords being made up of the top 10,000 it'll be a while before dictionary attacks stopped being extremely effective. So this just for your edification is what a dictionary attack looks like. You got a function name,
you say for every word in my list for every word in my list,
hash it and see if it works.
And as soon as one does tell me
very simple, it spins up. Not
it spends up about as quickly as a brute force, but with a much smaller attack surface, so it's much easier.
Dictionary attacks, like they say, are very dangerous. They're very effective and they're based off of the most
incapable and the weakest part of any computer system, which is the user. And on that note, we're going to go ahead and finish up this video and therefore the covering tracks portion.
Now, other than the conclusion, you have
fairly well completed this course you deserve a pat on the back,
and, um, I'm sure that I'll be hearing from some of you any questions You might have any thoughts you might have on the subject or any information like to pass along. Always feel free to contact him.
Joseph Perry and I'm your residents. Me and you've been watching this video and all the other videos like it on cyber ery dot i t.