‫-: Hi!
‫Within this lecture
‫we are going to see a very good feature of the Virtual Box
‫which is called snapshots.
‫So we're going to see how to use snapshots
‫and what are snapshots in general
‫and how to leverage them when we use virtual machines.
‫So, snapshots are just like safe points in games.
‫So if you are in a state that you want to save it
‫or if you are in a state that you are very comfortable with
‫then, we are going to have a checkpoint over there.
‫Then after that, if we mess it up
‫or if we crash it or if we hack something
‫or if we broke something.
‫We can always go back to that save point, that checkpoint.
‫In order to do that,
‫you have to click on this little rectangle over here
‫and say snapshots.
‫So as you can see now we have the snapshots
‫and I can just say take.
‫So when I click on this button
‫it will take the current snapshots
‫and I can change the state whenever
‫and wherever I want, right?
‫So if I take a snapshot right now
‫it will just take the current state of the Kali Linux.
‫But, just don't confuse it with saving and closing it down.
‫I'm going to show you what I mean.
‫I'm just going to run this in a headless way
‫because the irregular way causes me some kind of bug.
‫If I minimize the window, it will just crash itself.
‫So it can happen.
‫I'm just going to run this with headless start.
‫It isn't something big, so it's kind of a bug.
‫I'm happy with it, okay.
‫And I'm going to say show
‫so that I can go to my Kali Linux.
‫And remember, the username is root
‫and the password is t o o r.
‫Okay!
‫And I'm in.
‫So if I do any change
‫if I make any change in the Kali Linux like
‫if I create a file or if I create a folder.
‫Then, when I close it down
‫it will save the state, okay?
‫It won't be fresh every time I open Kali Linux.
‫So just double click on this file manager over here
‫like file system.
‫So you will see the folders and files inside of Kali Linux.
‫If you cannot see file system
‫you can just click over here
‫and type something like file system, okay?
‫Like this, file system
‫and you will see the file manager
‫of which you can just click on and open it, okay?
‫And you can of course write something like file manager
‫in order to narrow it down as well.
‫So if you see the file system on your desktop
‫you don't need to do that.
‫And by accident, I believe
‫I have clicked on the properties of file system.
‫I'm going to say file manager
‫like file system.
‫And let me click on this one more time.
‫Here you go.
‫Now I see the file manager
‫and once you open it
‫as I said before, you will see the folders and files.
‫So if you click on the root
‫you can just go into documents or downloads or desktop
‫and everything.
‫So right click over here and say create folder.
‫For example I'm going to create something called test folder
‫inside of documents. Okay?
‫So that's it.
‫That's all what I wanna do. Okay?
‫But, what happens if I close the Kali down
‫and restart it?
‫So let me close this down.
‫I'm going to get this air.
‫I'm going to say okay.
‫And,
‫here I'm done.
‫Okay, I finished my work.
‫I closed it down, closed it down
‫and now I'm back.
‫I'm back for work and I'm going to open my Kali Linux.
‫So I didn't take any snapshot or anything, right?
‫But it saved itself.
‫So what happens when I go to the documents right now
‫will I see the test folder?
‫Of course.
‫Otherwise it will be a fresh Kali Linux
‫every time I open it.
‫It won't make sense.
‫So let me log in one more time
‫and you are going to see the test folder is over there.
‫That I'm going to show you
‫what you can do with snapshots as well.
‫Don't worry, I'm just going to show this works.
‫In order not to make you confused about saving the state.
‫So as you can see
‫without snapshots and everything, it's working fine.
‫I can just create whatever I want to create.
‫I can just put whatever I wanna put over here
‫and close it down and open it up anytime I want.
‫But let me take a screenshot.
‫Snapshots right now, not screenshots.
‫So I believe we have some kind of bug over here.
‫Let me just minimize this.
‫Yep, here you go.
‫Now I will, I will just click on this take
‫and I can give whatever snapshot name I want.
‫So it's auto completed it for me
‫and it said that snapshot one
‫so I'm fine with that name.
‫And as you can see, my snapshot one is actually saved
‫in the virtual box.
‫So this is the last state
‫that I have closed the Kali Linux down.
‫Okay,
‫So if I run the Kali Linux right now from here
‫like a regular way, like a regular headless start way.
‫If I open the Kali Linux right now
‫everything will seem perfectly okay.
‫I will see the test, one more time in documents.
‫If I go over there, everything is where we have left off.
‫So this is no biggie as well.
‫So we haven't done anything special yet
‫but this special thing will become, will arise
‫when I create another folder over here.
‫So let me come over here
‫and let me wait for my desktop icons to appear.
‫I'm going to double click on this file system.
‫I'm going to go into the documents like from here
‫like from root and documents.
‫Now I see the test
‫but this time I'm going to create something called test two.
‫So I'm going to hit create.
‫And now I have two folders.
‫So let me close this down.
‫So this is kind of getting boring, right?
‫So I'm creating folders
‫closing it down or putting it again.
‫But this is the perfect way to understand
‫what's it snapshots do.
‫So here now I have the snapshot one
‫but I have also this current state
‫and says that it has been changed
‫since you have taken the last snapshot.
‫So I'm going to take another snapshot called snapshot two.
‫Now in the snapshot one
‫I don't have test two folder.
‫But in the snapshot two,
‫I have the test two folder.
‫So for, for a reason suppose
‫that test two broke my system, okay?
‫I'm not very satisfied with test two.
‫I want to go back
‫and how can I do that?
‫Fortunately, I have the snapshot
‫and I can just restart the snapshot
‫whenever or wherever I want.
‫So if I say restore after clicking on the snapshot.
‫It'll restore the snapshot.
‫And here you go.
‫Now my current snapshot is here.
‫My current snapshot is snapshot one.
‫Now what will happen when I run this?
‫What do you think will happen
‫when I go to the documents folder?
‫Will I see test one?
‫Of course.
‫Will I see test two?
‫Nope, because test two wasn't even over there
‫when I had taken the snapshot one.
‫Right?
‫So let's test this and see if it works.
‫And this is very useful because
‫we are doing some kind of ethical hacking stuff, okay?
‫We are going to work with a lot of repositories
‫a lot of libraries, a lot of tools.
‫Something may go wrong.
‫And something will be broken at some point.
‫So take this seriously and try to take snapshots regularly.
‫Like maybe once a week or something
‫so that you can go back when you need it, okay.
‫So let me go to root and documents one more time.
‫Here you go.
‫And, as you can see I don't have test two folders
‫so this is working just fine.
‫So if I want to go back to snapshot two right now
‫I can do that as well.
‫I can just go to Virtual Box
‫and click on Restore on the snapshot two.
‫It will just bring me forward in time
‫and I can just revert back anytime I want.
‫So this is the power of the snapshots.
‫So we are gonna stop here
‫and we're going to continue
‫with the usage of Kali Linux and Linux in general
‫in the next section.