So I hope you enjoyed learning how to hack into Windows, using to reboot to special commands and for
commands at the command line terminal, but I have something extra special as a bonus video a few students
have asked already, well, how do we hack into a Mac or wow, I'm really glad that I use a Mac because
the PC was so easy to hack.
Well, I've got bad news for Mac owners as well.
You've got just as easy a time, maybe even easier hacking into a Mac.
You only need one reboot, one special key combination and four commands to create a new admin user
account or to hack the route account and change the password and then log in and do anything you want
to do on a Macintosh computer.
So if you've got an old Mac sitting around or if you ever forget your password, it can be a little
scary.
But I can show you how to get back all of your files unless you've got things encrypted.
And we'll talk about that right at the end here.
So I've got Mac booted up here in the background.
I'm going to use one reboot, one special key combination, and then four commands at the terminal so
that we can get into this.
Mac Well, I don't remember the password on this Macintosh, so I'm going to have to do a restart.
And my first special KCM, or my one and only special key combination for Mac is going to be Command
S.
So as I restart.
All right, when we reboot, we have to press the command and eskies to boot up in a single user mode,
I've just run a simple, clear command to clear the screen on my MacBook so that you can see what we've
got here.
We're going to we've used our one reboot, our one special key combination with command s for single
user mode.
And now we're going to use these for.
Commands Espin, FSC K Neshev Why that is going to do a filesystem check so we say Espin.
And we can you'll notice I can do S.B and then tab the tab key will help me.
Autofill, if you've not used that before on a Mac and then F sc k, I can just hit the tab dash f y
so that's going to be my first command.
You hit that and let it run.
It will take just a little bit of time.
That I'm going to show you, the second command has been slash mount.
So we're going to mount the filesystem or mount the disk drive.
Space W and their spaces between these, because we're using some flags or arguments with our Mount
Command and you hit enter, that'll take just a little bit of time as well.
And this next command and command is a long one, so I'm going to split it up over two lines and is
launch.
Seitel space lowed.
Space and then this is a long line, so I'm going to span two lines by using the backslash here.
I'm going to type capital or slash capital s y hit tab, and it'll fill in system than a library.
So Capital L little capitalization matters on a Mac tab and then we need lunch.
So lay you in.
There's more than one lunch.
So we do a capital D lunch Damons and then come dot Apple and we can do AP tab open.
Open directory, Deadshot P list, if you want a really old Mac, there's a complete Apple dot directory
services, local dot p. list.
So if you don't get an O, P and Hattab, try Capital D, you know, directory services, local DOPs,
Capital D, I, R and tab, and it should fill in that last piece as well.
So we'll hit enter on that.
Then we just need to run the password command post, W.D..
And it'll ask us for a new password twice.
So I've tapped a new password and then all I have to do is type exit.
And the Mac will reboot, well, it'll finish booting all the way into Mac OS and we'll be able to log
in as root using our new username.
All right, now the Mac is back to back up into the regular Mac OS, but instead of the username and
password that I can't remember, I'm going in a root as my username and the new password that I just
created.
And it will ask if I want to update the key chain password, I don't want to do that because I don't
want to mess up anything on this, Mac, and I'm not going to create a new keychain.
I'm just going to continue my log in as the root user.
I'm a full administrator or super user on this Macintosh computer, so I'm going to be able to create
new user accounts.
I'll be able to see all the user's files just like I was able to on a PC computer.
And the first time you're on this, you may see some setting up your Mac, you may have to click through
a couple of things, but then you'll be logged in as a user on Windows.
If I go to my Macintosh computer, if I go to the finder and come to users, I can find my real user
account beeping And there are all my files.
So if I go into my documents and I see all my Udemy course files.
I go into downloads, I'll see everything that I've downloaded recently.
Not too bad.
So everything is there and I'm able to get to it, and if I want to create a new user account, all
I need to do is come to the system preferences.
And come to users and groups.
And if I went to, I could create a new user here.
And give that a new name.
You get the idea so we can create a whole new user account.
We can either have them as a standard user, which is smart.
You don't want to run around with a brute privileges turned on on your Mac.
Or we can if we need to have an administrative account, we can do that as well.
So even a Mac is not completely safe from this attack.
In fact, we only had to use one special combination after one reboot and then four commands at the
command line.
And now we've got access to all of our files again.
And we're able to to do some well, pretty cool things.
If you own the computer, make sure you only do this on a computer that you own or have explicit written
permission from the owner and controller to do this kind of hack.
So one more time, just some quick lessons learned, physical access is total access.
Never leave your laptop or desktop unattended if someone has physical access notice on the Mac, we
didn't even have to have a boot disk.
We just used one of the special key combinations to get in as a single user mode user so that we were
a route user on a Mac.
Ethical hacking is useful and practical.
You can get to files even when you forgot in your Mac password.
The only thing is to protect against this aquil on windows.
We saw that we could change the settings on a Mac.
Really, we need to use file vault or use some other encryption on your hard drive to encrypt the files
that are either sensitive or that you just want to keep other people out of and use a strong password.
If you're using a business laptop, you definitely need to have encryption turned on because if you
lose access to those files, it could have customer information or more.
If you're doing this is a home user, if you encrypt your files, the one thing you need to know is
that if you forget that password, you cannot recover those files.
So we have to mix our security with the usability.
But you can see that we've got a lot of really cool things we're going to be able to do in this course.
And we will see you in the next lesson.