Master Hacking NOW: 4-Hour Expert Guide 🛠️

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to the first lesson of this course the color Linux the tool that we are going to use here uh in the setup so the very first part is to set up the colinux download the colinux and we will walk through all of the processes from this lesson so going to first one that is the k.org we can now see and download the every part every version of the K Linux K Linux is the most advanced penetration tasting platform distribution for nowadays many penetration tasters even the hackers malicious hackers also use the cinux but in order to master the cinux you need to know the basics of the cinux and hence this course is just for the beginners who is new for the cinux or aspiring hackers for bug bounty hunting or the penetration tasting simply hacking all right so now uh let's start downloading the C Linux and then we will move to download and install the virtual box in which it will be running so for this course I'm going to use the virtual box and the live version of the cinux that will not be installed on the disk so let's see and we will then explain what the most important part for the color Linux is either it is live or the install on the system both cases are simple and uh completely different but you can use according to your choice as this is the subjective part so moving to the first this is the download going to uh download here we can see uh the image name that is the ISO file that will be and uh most of you will be aware about that what is the ISO file and the installers so here the uh two words versions that you we you can download from like the uh torrent and the direct images so moving back to what we are going to use but let's uh first walk through of the all of the versions of the calux so we can see here uh this is the VMware virtual box and uh all these are the direct images you don't need to configure just put it out inside the virtual box and it will be turning without any much settings we can also use the uh and download the arm images that will be running on the uh some limited uh mobile devices like the uh iPads and uh uh not exactly the iPads but on some uh Nexus devices we can see here by going to but before going to see that let's download the uh 64bit installer or the live so in both of these version I'm going to choose for the live one because this is the uh important part to run the live operating system and then once you close it every settings will be erased every tracks will be erased so this is the best part for the hackers or newcomers who is uh going to be aspiring hackers first so I just recommend you to use the live version because any settings you mess up with inside the colinux you can just uh reverse that all of the processes by just simply turning and setting down the operating system and then just reart it so I don't recommend to install directly on your system because sometimes it is also critical for your system uh once you are not going to install it properly because it will completely erase the master boot record that is the MBR of your system so we can go to colx live here [Music] and it will be downloaded now let's see uh other images that you can do download from the arm images or install on some of the um details like we can see here we can see also the colinux Nate Hunter mostly it is called Nate hunter that will be installed on the devices mobile devices so we can see here next is mini Nexus 10 tablet and Nexus 5 mobile and most of these might be outdated platform you will find these devices nowhere uh but yeah sometimes you can find it refur conditions so I'm not going to explain that all because this is for using colinux net hunter or the on the mobile devices on the go so I don't think it will be uh useful too much while you are going for the pinest and taste tting or using in certain situations all right so this has been downloaded now and uh moving to the virtual box this is also the prefilled form that we can download and install the iso images over that virtual box so here is the latest version that is 6.1 and you can just download it and install inside your system for the platform I'm going to use this in the MacBook latest version so that might not create any uh critical situations where you will find yourself stuck if you are using uh in a Windows environment or using directly inside the Linux box but this is recommended to use over the windows or the Mac not over the Linux but if you are using the Linux just prefer for the uban to so that's all for the installation all this has been installed now coming to to the uh virtual box and how these settings will be uh taking effect once it is opened so as I have already downloaded here we can see uh this is up and running and uh some of the customizations have already been done here now uh we will also take you to that walk through and do customizations create some Shortcut commands so that use in super fast easy way uh like the hackers or the son in the movies so that customizations are easy part and that is B part that you can uh always find yourself useful while using in two super fast all right uh let it be uh now I am going to install one new virtual machine so once you install the virtual box you will find this interface this is the simple one create the new we can see here the new control N is a shortcut for that now we will uh start from here like putting up everything and once you put the Linux it will be it will automatically be selected like the type Linux and the version is that's for 64bit we do not need to add do anything in this case just continue after putting the name all right so there is something uh issues with that I have already installed so I'm going to use the other folder here so untitle will be there continue all right so now this is the memory size that you will required to allocate for the color Linux and this is recommended to assign the memory size as much as possible because this will going to uh create some of the bugs or some of the uh lagging inside the system and you will not uh going to like it once it is lagging your system while you are in the middle of the hacking or penet and tasting so this is recommended that you have the host system that is the windows or the Mac or the Linux for at least 8 GB of RAM and so that you can assign at least 3 GB 3 GB of RAM for the virtual box or the calux in this case because this is the guest operating system in this case all right so now I am assigning this uh particular K Linux image oping system for 3gb 3 GB of RAM so that it will not create any issues and click next you will find it the uh create a virtual hard disk now so this is the by default just create I do not need to do anything this is the virtual box disk image this is also the default will be default for that next this is the dynamically allocated for the fixed size of hard disk files and uh okay now this is the uh location and the size of the dis that it is allocated for so in this case it is automatically allocated for 8GB it is recommended to increase it to at least 20 GB for the ease of use and super fluent uh uses of the colinux so that once you download anything or if you are going to download any other applications and install it inside the colorx you will not find yourself that the system has the list disk and you can't install it exactly so the uh 20gb is the based here so adjust it to 20 GB around 20 GB it is no matter to exactly Bend 20gb now create this and it's all done now you will find the uh information inform about the cinux that you have selected for and created for the virtual machine here so this is the informations like the operating system system memory that you have allocated acceleration for the virtualization and all that informations but the most important part is that to is for setting that you are going to change that and this is the best part once it is done incorrectly you are going to find yourself that it is not going to work so this is the basics we do not need to change here you if you want you can change the name as per your choice here is the advanced we can share the clipboard by directional so that you can copy and paste from host to guest guest to host in the both of the directions that is why it is by directional moving to description there is nothing we can type here any description and save it for um future reference this encryption is not required in this case for cinux it is useful in some of other cases where the some sensitive informations are stored on the uh virtualization or the guest o all right so moving directly to the stories that is the location where you need to provide the color Linux downloaded images so this is the storage here and uh at the first this that is the controller ID and the second is the colinux vdi so this will be automatically created as this is created by the virtual box in this case here virtual box disk image that is the vdi we need to go to add optical drive so here is the optical drive we need to select the ISO file that we have downloaded from the c.org website and uh if this is not available here we can search it out from here and just choose it and we can create uh another uh links as well but before going to uh make it okay and then going to display settings this is also recommended for the video memories because that's that will be the graphically representing and uh providing the virtual machine for the uh based video experiences and the memory experiences of the virtual box so this is recommended to adjust as much as possible until your host system is not having any issues so that you are going to use the color inux that the best part we can also enable the 3D acceleration all these settings are according to my recommendations as I always use these and I don't find anything issues so that is why I recommend everyone to use the 3D acceleration for the uh Graphics controllers and so on remote display is nothing for recording is for enable recording on the Target system I mean to say the colinux here so we can enable and disable as well all right so everything done for the display now move to the uh system here we can see the motherboard processor that you are going to allocate in some of the cases you will find your uh system have the more course or the processor course that you are going to allocate for so we can see the green part here green color and the red color we can't go after the red color that will create uh some something uh messy or some of the issues we can adjust this till the green part all right so that is only for that we can also enable the extended features that is the pae and the nested VT that is the virtualization kind of advanced stuff so we can also enable both of this things moving to network adapters we can provide the network adapters so that the although using the natat that is the network address translation in full form is the Bas part so that no one can connect to the color but in some of the cases if you are going to use the meta exploit you are going to use the briis adapter that will be the best setting and this will use the host Wi-Fi adapter in this case this is the en Zer that is the ETS Z in Windows or something like that so this is the Wi-Fi that it will be using from the host system directly and we can communicate from the host to guest guest to host and from the guest that is the Kor Linux to the outside Network so this is the bestas part we can change you can also change the net adapter there will be no any conflict or no any issues we can also use host only adapter net Network generic driver but these are of no use and no values in this case of the CX only use the net adapter and the brid adapter there an adapter to as this will be connected to the host system so once you're going to use the external Wi-Fi or the wired Network like the lane cable RJ45 then there will be other adapters too we can select it for that custom settings going to Port there is nothing to do with that shed folder this is the shed folder that will be the uh all of the accessible folders from the host to guest will be Sav to in this share folder we can provide the any folder here like just get add and just done for the path just provide the path and there will be okay going to user interface there is nothing to do this user interface is shown on the lower part of the virtual machine that you are running on so there is nothing issues with that we can leave it out all right so every set have been done now as I have already using and running this I am going to remove this completely and that's so now we can see every settings as we have configured in here the right pin we can also click on this show and the running application running cinux on the virtualization will be opened all right so now we are on the C Linux this all have been installed and it's have been done so that's all for this lesson we will move to next lesson as this will lesson will be more longer if I'm going to explain something more about the color next here so for the separate lesson let's jump to the next lessons and just install it on your virtual box virtualization according to the shown as I uh installed here and then we will move to another lesson then that will be the best part see you in the next lessons thank you as we have already configured the color Linux inside the virtual box now let's start using the color Linux and let's see how it is actually starts and what the options are available once we are going to use the kalii on the boot menu so the first one is the live that will be the live mode and other options are also available that we can use for the forensic and the fail safe USB persistence that will be live USB running live USB encrypted persistent graphical install is also there so in that all of the cases we can use in different situations and different system different uh working capabilities of your system and what the desired subjective to you want the colinux to be running on so we can also see the advance options for the installations and running on but for this course I'm going to use the live mode as this is the best option so simply hit the enter and it will be starting up so we can see the now K Linux logo is there it is starting up loading up all of the services and uh creating a a virtual sandbox to run this col Linux and all of this system uh will be running in a virtual sandbox inside the virtual machine we can see all of the programs are uh running and now it is almost done to start up for the first screen that we can see here all right so it has been started up first screen is there and we can see the Kali live City and now moving to the switch user if I'm going to log it out as you see this is not asking for the password or the username but once you are going to uh log out or or something like that then it will be asking for the passwords and the username so username is the Cali and the password is also the same Cali so just hit enter by the username and the callux putting the same values and it will be started up this is all just for the starting of firing up the G Linux now we can do from uh this screen like the customizations that we will see in the next lessons for the power management and the display resolutions see you there thank you all right so we have already install the color Linux let's jump to the color Linux and see what are the uh tools locations and all of the walkth through have a short walk through of the color so this is just for the terminal this is terminal let me minimize this all there are two work spaces as of now by default we will also also customize this like here the workpace 2 and the work space one this is the workpace one having the only uh this terminal opened now if I'm moving back to and switching to the workpace 2 there will be nothing opened so this is also beneficial in uh most of the cases where you are going to use the multiple Tools in workpace one and some of the other tools in the workpace tool so that there will be nothing U mes up with the all of the tools and you don't need to minimize every time and of course there are settings for every work spaces to switch between and we will see in the next couple of lessons so moving back to the first workpace we can now see here the the terminal is opened so the first we can see on the top is the Kali tools here is the all of the tools settings and all of the almost every details of the cinux are available here we can search and type that will be displayed so the first thing first once you start the colorex in the live mode there will be a display mode that will be uh something like uh a small in size like this one as you can see this is the smaller in size so uh at this time you can stretch it out but this is already setting done to do so and perform the Aus desde and uh but once you start it you will find that this is the current size that you will find yourself once you start it so what we can do to make it resize for full just go to uh this application menu here and start menu you can say similar to the windows and search for the settings here we can see this setting here go to display and once the display is opened we can see the resolution and the refresh rate of the display so we do not need to change more more here we can only change the resolution of the screen or the display so according to my system display this is the perfect resolution that will be available and that will be working fine if you want you can change it to other resolutions as well you can see in the left pin here virtual one written that will be changing if I am moving to the other applications like this one and once you apply it the effect will be applied and and it will be changed we can see there are nothing here uh once we are going to switch back here that is not the perfect resolution for my system that is the reason it is not shown this was actually disappeared in other modes and you can see the left and right part of the screen have the sum of the screen left so that that is not the perfect for my screen so this one is the 1440 by 90 is the perfect for my system all right so this is all done for so once you do that it will be preserved and it will be uh for the live mode obviously we are using in the live mode so once the system is sh down you will find yourself that it is all lost there are another method that we can use too so moving to generator just let it close it and the next setting that you going to use for the color inux that will be useful because some of the cases are there to save the power of your system and the colinux is by default to 1 minute so 1 minute of inactivity on your system will be setting down to the system so moving back to and search for the power that is the power manager here we can go to uh display and here you can see the blank after or put to sleep and switch off after so these are the time in minutes that will be on battery and if it is on the plugged in or the charging estate you can either disable it or just enable it so blank one is also working on the once the power management is Switched Off but rest of the two like the sleep or switch off will not be working so just adjust it to at least 30 minutes for the recommended options you can see or according to your choice according to your subject as I realize that the 30 minutes is the best because most of the cases you are going to read something on the system or the read the results of any tools output and in that meanwhile the system will be going to sleep or it will be asking for the password that will be most irating part time so just adjust it to at least 30 minutes or 20 minutes too so this is for the power and the screen resolution that have been done now what you can do once you have started it on the live system suppose all of the settings and any downloaded tools will also be lost if you shut it down so if I am going to quit this window you will see that save the machine State send the shut down signal or the power of the machine so here is the window I'm going to just close it and you will see the save the state machine of uh state yet or the power of the machine so this is not recommended to power of the machine if you have installed any new tools just do one thing save the state of the machine and every settings will be preserved until you go to Power of the machine so what I'm going to do is we can see here uh let me show you this window is is open as the terminal so if I'm going to type something like the K Linux and let me show you once again here is the car WR or let me run some of the commands all right now let me uh close this and preserve the settings like the cfd machine State all of the settings all of the tools all the part of calux will be saved nothing will be lost and this is the state saving of the machine this is the virtualization uh technique or the Technologies you can say that save the state now you can see the machine State have been saved and you will see the preview but this is not the preview exactly because that was a screen flickering something at that time it has been saved now what we can do is that for next time starting just just double click over cinux or start this it will be starting from that state you can see this is the restoring virtual machine and every time you do this every tools will be there we can see that the terminal is intact as it was last time so that's all for the walk through of the colinux for the customizations like the screen resolution and the power management of the colinux moving back to the menu we can see all of the tools like the information gathering vulnerability analysis weave application analysis every menu have the submenu and the tools sub tools listed here like going to we application analysis we will find CMS content management system and the framework identifications web application proxies that will have the BB Suite wave crawlers and the directory Busters every Tools in a list categorized manner so that you will not find yourself that it is not easy to do that even more easy is the searching here so if I'm going to search for the bub seat it will find that if I'm going to search for the air crack that is a Wi-Fi cracker we will find that so similarly we can find that but but all of these are in a categorized manner that that makes it so super easy to find everything like going to password attacks all of the tools that belongs to password attacking techniques and the tools listed here and at last we can see the social engineering tools and the cinux links of other tools KX forums uh training net Hunter uh vulnerable messages that users submit from the user submit their V virtual vulnerable machines you can do so too all right so there are the tools that is uh available inside the single menu here we can see the uh reporting tools that will be uh helping you in all of the findings of the tools that you have used for pinest and tasting or hacking to report in uh some specific manner like you can see a record my desktop this will record the entire desktop like the screen recording that will be done farad is there multigo is also there uh pipal is there QT cap is there that all may be helping you to report some of the findings from your Penton tasting engagements or doing some of the stuff on the color here uh we can see uh the uh minimize button that will minimize everything in a one click single click here is the folders or the home screen you can say here is the terminal that will open the terminal uh this one all right now uh moving to the next this is the recording that will the uh record the uh screen of the system and here is the uh work spaces we can also increase that work spaces too according to our choice so these are the uh visually appearing now we can check for every tools installed there so moving to the folders uh open folder here going to file system let me increase the size of that all right so uh going to file system we can see this is the file that the colinux all of the systems have been installed in that going to USR this is the uh system like the USR uh share and here all of the tools are installed in uh all of the things so if I'm going to search for The Meta explor simply do nothing just type it from anywhere and it will be showing in the bottom right corner here and the results will be also highlighted according to that So Meta ISL is here if I'm searching for uh the air crack uh if if I'm going to USR share I'm searching for air crack all right so this application is not installed in here and we can so see the web server that is the Apache uh 2 this is the web server that is installed inside the uh cinux that is the by default and uh we will see uh some of the options like the default site that is the index.html this will be opening in the Firefox that is the default one and this is the uh HTML file that is the uh example of that it site is working so so once you set up the Apache it will be showing up this and in most of the cases you are going to say set your own WB server in order to Ser the file from the colinux to transfer to the Target machine and to uh set the payload from your system to the Target system so in that case you can deliver your own customized payload that will be malicious to in nature and uh transfer to the Target site once it is compromised because you can't send payload using the mail services like the Gmail or other that will all be scanned and it will be neutralized by the antiviruses so that is the best way you can serve your own uh web server and just download from that so this is also the Bas part we will also see how the Apache is configured here and we will configure that too in uh cases where it can be used to serve the files and the Ser the purposes so this is the Firefox that is the installed by default and moving back to the system going to home directory we can see this is the home directory and the K Linux uh name is here we will find the configurations desktop documents downloads and everything in uh all in all one folder one uh directory we can say so that's all for the walk through of the cinux in next lessons we will see how the uh customizations of the command lines and the shortcuts will be uh useful in many cases for a aspiring hacker so learning the command line prompt or the command line tools command line Basics will be too much useful in K Linux perspective because that is all commands mostly commands will be terminal based or the command line based and uh comile and based tools are super easy to use and uh super fast in nature so see you in the next lessons just try it customizing and exploring all of the uh locations of the kalux here so that you will find yourself and if you find anything stuck or anything uh difficulty in uh gathering for informations from the cinux you can just ask the question and I will be available for answering that too as this is the beginner course you are mostly going to use it for the first time and uh there is nothing to explore in here here so we will see other things in next couple of places see you ahead thank you since a long time K Linux was coming up with the root user and the root previlege but now it has been changed from the 2020 January and this is now coming up with the normal user having no root privileges so opening up the terminal we may find up here that this is the dollar sign that indicates this is not the root user and this is the kalii and the kalii that is the host name for that in order to make this callux root and uh like the root and the tool that was the password earlier before the January 2020 release now the kalux have or the uh creators of the cinux have uh made it nonroot user meaning that you will need to have a special permission from the root user before running some of the special commands or many commands in this case that requires the root privileges so if I am using the if config it is not opening the all of the interfaces for the configurations meaning that this requires the root privileges and if I am using some of the other cases like the ls this is the normal commands that list all of the files here so how we can make all of these in a root privileges in order to do that we need to run a command here provided by the KX that grants the normal user uh colx to root user so that you can switch between the normal user and the root user so if I am going to use that command so command is here that is the suru that is the uh surer in this case we can say to uh run this command from the root privileges suda is used for that that same purpose to Grant the root privileges for running this command because this will not install anything without the root privileges so this is the sudo app to install Kali Grand rout so this stuff will be installed and then it will be running in a single line so this ENT double amp perent is used for combining two commands and in a single line we can also do one by one or in one single line so this is the recommendation that you to do uh run this command on your terminal so the command is simple first is installing the K Grant rout and second one is installing the dpkg that is the package manager to reconfigure Kali Grant route once you hit enter it will be installed and it will ask for the configurations for the Kali Grant rout that the enable password L privilege escalation or disable the passwordless privilege escalation or no chance to current configurations so the first one is the you can use the arrow key here to move from 1 to three and just hit enter it will be all done now for using the root privileges either you can type Su it will ask for the password password will be t o o r that is the tour so once you put the tool password here it will be now in the root user you can see here this is the hash that indicates the user is now the super user or the root user you can type the exit here C it all now once it is all done what we can do is move to this log out button here just click it out we can switch the user from the Cali to root user so here is the we can type root and in the password tool that is the t o o r hit enter and now this is the root user opening up the terminal we can see this is the root user and now we can run that command and it will be just performing that in Exel this command is also available to the noout user but that requires the sudo command before doing that let me switch that to normal user first so the normal user uh name and the password is both Cali so the K AI is the username Ki is the password and now it's back to the normal to run that all of the special commands without using the passwords as we have already installed the Cali Grant route this one was the installation that we did uh recently so what we can do is now we can type this sudo and perform run any command as a root user so if I'm going to use the if config we can run without using the password so that's the best part without switching to the root user we can also use the sudo command that will be the same task performing as a root user despite of going to switch the user account we can also use this Pudo command here and that's all for this lesson so this is for the uh commands that we require to make it root user and the having the root es we can also type it and use the sudo command so do that for your system your cinux see you in the next lessons all right so as we have already navigating through the colinux terminal and we have already seen the pseudo command uh now let's have some of the other commands that is the terminal Basics or the terminal commands that will be uh beneficial and you will be finding useful and navigating throughout the the color Linux operating system so uh before going to uh we can uh also mention that this tollar sign uh indicates that this is the normal user and when it comes to hash then it is the uh uh root user or the super user and super user means that he can do anything on the system he can change delete other users create firewall rules uh create the proxy rules and do a lot more thing and anything depending on the Privileges assigned to that root user by the super user so basically super user is the root from the earliest days of the Linux systems all right coming back to the color Linux let's have some of the commands that uh you will find it useful all the time so before going to start we can see this is the PWD in the small letters that means the print working directory meaning that it will uh list or uh show you that it this is the uh working directory where you are currently working in so this is the home and the Cali and uh if I'm going to type the ls that is the list command and we can see this is the config desktop documents and all these uh Dior folders are there so moving back to uh visually we can see open folder and here we can also see uh home and Kali is listed here that says yes this is the uh print and current working directory where the current user is working on so this is the way we can change it to there is a command that is clear that we can type to uh clear all of these uh things that we have done in the terminal and it will be uh cleared so uh moving back to the commands we can uh change the working directory from the uh current working directory or the home directory uh at this time we are on to it to the Parent Directory or the root directory so CD is the command that can be used to change the directory CD is stand for uh change directory to desire directory you want to so if I'm using this front slash then it will be uh changed to that Parent Directory or uh in case you can say the root directory where all of the files are uh file system are placed and stored so now if I am using the command LS meaning that it will list all of the uh files and folders that is available inside the root directory so mostly file systems of the operating system are uh placed or stored inside the root directory and uh here we can see also the ETC that is the ETC here USR is there uh there will be many thing options that can be uh manipulated and changed by the user uh we can see now the uh prompt has been changed before the dollar sign it was earlier the uh til symbol uh that we can say this this is for the home directory and now if I am going to use the PWD it will say this is the uh parent or the root directory in this case if you are the Linux user or have ear used the Linux or OB two operating systems mostly uh you will find something is different in the color Linux this is not because the operating system is different this is because the kalux have been assigned and uh developed in such a situation that it can be used by even a nowise user uh who doesn't have or have the little bit knowledge about the uh command prompts or the terminals so now uh if if I am changing it to uh back to the uh current directory what you can do is simply type the CD and it will be back to the home directory uh or the current working directory will be backed from there or there are another options too so if I'm going to uh once again to CD and front slash I'm going to CD uh Etc if I'm going to CD Etc pass WD or if I am moving back to uh from the ETC let me list all of the files then we can go to that directory so oh there might be more files then we can see this is the uh enginex is there web server is there so if I'm going to use that uh CD ngx this is also the directory now if I'm going to use the list command it will show all of the files listed under that engine x uh folder or the directory in case you can say so now this is the listing commands now let me clear it first so that it will not show up as a garbage all right so now we have uh uh two directories we are up two directors like the ETC and the ngx now if I'm going to uh move back One Directory what I will do is type CD and do dot after the space so just figure out the space between the CD and the double dot if you are going to use the without spaces it is not going to war that so now it will move back to the One Directory and uh let me uh go to One Directory back uh I mean to say uh One Directory up and uh now let me show you with the doubles dot without spaces it is not going to work that command so uh the same kind I can do so is CD and if I want to move back to the home directory simply type the CD and hit the enter this will be completely back to the home directory where you are working now hitting the command PWD will say that this is the home directory and the where the normal user is going to work sudo command is used to uh use the uh uh switch the user and do the command perform the command that the full form is so SE is used for the uh sometimes it is referred to as the super user uh but the exact meaning is the switch user and do is for do the command so if I'm going to use the Pudo meaning that it will switch to the root directory I mean to say root user and it will do the perform the command on behalf of that user that is the root user in this case so in most of the cases you are going to use the pseudo command if you are not having the root AIS uh previously mentioned in the previous lessons so there is nothing to do with that so if I'm going to install some of the uh tools here if you also want to do what you can do is type the Pudo command and EPT get install and the path of the file where from you are going to download that and install that so suppose most of the tools will be installed like if I'm going to install the tree view of the uh tool of the command here uh I'm just going to use that uh all right so there is an invalid operation gate and this will be this way or simply remove that git and simply apt install tree and it will be doing in that way now it has been installed the tree view it actually lists all of the four folders files directories in a tree view let's see how it is working actually typing tree and hitting enter will show you and the same thing will be uh shown in this case if I'm going to see hit to the ETC if I'm going to change to the ETC we can see this is the ETC typing LS will list all of these things with the files and folders so in the blue color we can see this is the folders and uh uh this is the file so moving back with the tree command let's see how it actually works so this is the tree command that lists everything from folder to the files so we can see the auto start have uh these are the files like uh under that uh directory or the folder we can say so this is the view actually only and this is not by default installed you can install it in simple way like uh appt install and Tre so most of probably it is going to ask for the Pudo command so we need to type the Pudo before using that and here it will be done all right so this is for the moving back all right now uh we are back from the Pudo command now let's have the uh some other folders directories where uh the informations are uh stored temporarily so the temp temp folder is there so moving back to Temp uh this is the list these are all the temporary files that will be uh wiped up once the system is restarted uh but in this case this is the live system so once you're going to restart it without saving the state it will be wiped up all right now moving to the next command that is the VAR and the log file so going to V uh in this way and the log this is the log file that keeps all of the logs from the system we are doing here so these are the log files similar to the uh Windows operating system that gives every logs of the uh system that what it is actually doing in the background and also in the foreground by the user everything every services will be logged here and this is the directory where every hacker is uh supposed to wipe up after the post exploitation and getting all of the results from there so well this is not the part of this course so this is the log file where all of the systems generated files and the services are there for a sort of time we can also clear that log too moving back to the commands all right now uh these are for the commands and navigations for the folders files and uh in some of the cases you will find yourself that the navigating from One Directory to another is super easy uh using the commands only so that's all for this uh command and all of this terminal uh B that you may find it useful see you in the next lessons thank you all right so working with the color Linux and uh using what the command prompt or The Terminal in the Linux uh word you can say is uh becom uh becomes too much uh super useful and uh becomes so uh beneficial while you're going through the terminal and using the shortcuts commands to navigate and move through the windows in one single terminal so uh before going to start uh let's open it up uh the terminal and as you can see this is the customized terminal by me as I use it uh sometimes whenever I go to uh the use of the color uh that gives me the hacking and the pain testing feel that how uh we are going to use and also the same time the satisfaction of using the C Linux that is the hacking platform and uh you want to be involved in that platform so we need to uh modify some of the preferences in order to make it for our own and the as this is subjective part this depends on the user to user so what how I use uh is the preferences so going to uh terminal and file we will see the preferences here uh we can modify every part every aspect of here here like the uh font that how it will be looking like uh color schemes so going to green and black and apply it will be uh changed uh by here we can see this is uh if I'm typing something after uh closing this window uh it will be changed and it will be looking like the hacker uh system is in uh working so this is the best way so let me clear it first now every commands can be customized to use as a shortcuts so as we can see this is the sift fee I have already used so I am going to use the sift fee to open the preferences and uh everything can be customized from here we can also use the terminal margin and the start with the preset value of the terminal so there is nothing to change uh with here but what I have changed is the cursor shape so here is the underline cursor that I use we can also Al use the block and the ibam cursor you can change and try to see how it actually looks like a scroll bar position is also on the right side this is the scroll bar position of the uh terminal here uh widget uh style is system default so I'm not going to change the system default settings that also not makes uh anything great uh look and feel changes so the changes that I want to use is the shortcuts so here is the short short cuts that I always change on each settings each systems before I going to start it so uh we we can see the add tab is here that adds for the control shift T that will create a new tab here uh bottom subter also use for the alt down so all of these in a categorized way how it can be used uh we can also split this terminal horizontally vertically so all these settings have been used for for EAS of use by me like the shift H for horizontal and it will also be easy to remember and split terminal vertically is the shift V that's how it actually works zoom in zoom out and the reset zoom is also there so I have already say and only the hide window orders and the quit is not there so I'm going to uh change this references first so shift p I'm going to show shortcuts and all right so the appearance was actually uh not according to mine so I'm going to use the uh kid dark and that is the best settings I always use and prefer to like this now in most of the cases you are going to use multiple windows so how it is going to make you work faster and in a super easy way is this way so this is one t I'm going to use and split this same terminal into multiple so I'm going to use the H that is the horizontal split that is the shift H as I have said you can set it according to your own now I am on the first terminal here or the second just you can type it and it will be shown so once you split the window it will be moved to that window and uh uh we can also move back from there so let's see how is the uh what are the commands for the moving back to the terminal so uh we can also use the alt and up and down so uh we can use the alt and up uh Arrow key that is basically used for the up down left right so now uh here is the uh navigating so basically alt plus all four arrows can be used to navigate in all the directions from left to right up to down and basic Al there are only four directions in the command prompt that we can use to now let me uh uh collapse this subterminal actually it is called subterminal so I'm going to collapse this so collapsing the second one so I'm on the last one let me type something here I'm on the last second one so I'm going to use the shift plus C and the same terminal on which I was at that time will be collapsed and deleted uh there will be nothing results shown there so this is the way you can also use the tab that can be used in uh multiple uh terminals in a separate uh terminal you can say so terminal opening in a new tab will be control shift+ T so this is the new tab you can see here we can also navigate through the uh Terminal 1 by one using the commands and uh this is the uh we using more shift plus T will open many terminals but many times you are going to use the terminal with lots of applications opening and also you want to show up everything in a single screen so that is the best way to split up so splitting horizontally now I on the second terminal so here is this now I want to split it vertically so now I'm going to use this shift plus v the same second subterminal was split in the two part now moving to uh we can use the alt plus arrow key to navigate now I am on the uh first uh terminal and I'm going to split this two in the vertically this will be vertically now we have the four set of sub terminals even more you can also split the sub terminals into two part moving to the right one I am on the right side of the terminal like here it is and uh I'm going to use the shift plus uh H that is horizontally this will be splitted into horizontal now I am going to use the how it actually works so uh even some commands that can be used like the help file will have the garbage and have the garbage everything is listed it is not the garbage actually but it is not looking like the best way so I'm going to use something more in all of the things like this uh CD Etc and Lis everyone have uh different options so I'm going to use the ND here that is showing the directory of that uh current of directory and the folders or you can say current user now everything is here we can see this is all looking like this stuff now what you can do instead of typing clear you can also type the clear to only one window will be cleared in single time so what we can do to clear uh the windows too much fast like active Sub sub terminals so the command for it that I have used setup is the control shift plus X so I'm going to use the control shift X for the uh this window and I am at this last one I'm going to navigate using the alt plus upper arrow and I'm going to use the control shift plus X and it will be uh cleared so this is basically here I'm going to use the upper one and control shift X it is clear once again alt plus upper arrow and now control shift X alt plus left arrow and control shift and X once again the alt plus down arrow and control shift X it is all clear there is nothing to type more and again and again like the clear here so that's the best way to customize the terminal and use it now what happened if you have used multiple sub terminals like this on the screen and you want to collapse or delete some of the sub terminals what you can use is shift plus c that I have set for myself you can also set it for yourself and there is nothing to change for other shortcut commands so I'm going to use the shift plus C this is cleared and navigating through the right one so going first alt plus up going down uh going right and once again uh shift plus C it will be clear shift plus C shift plus C and there is only one terminal so this is the best way we can customize to and this is working actually faster so for the example if I am going to use a tool that is the end map and I'm going to scan for sin scan and the google.com all right so this requires actually root privilege so I'm going to use the sudo and the end map uh sinan and uh the user uh that I am going to use is the create uh this one all right so now as this is working in the background it is uh scanning for the Target I'm going to split the windows vertically and I'm going to use other tools like the ncto uh for uh attacking other uh host so that google.com and now it is also working at the same time now if I am going to use the uh other option like the uh splitting the windows terminal here in this case to horizontally so that there will be one another uh case so I'm going to also use that and I will use other tools as well like the netcat so this way we can use multiple Tools in a single terminal and all that will be visually uh available for on your screen so that you can see all of the EXs all of the scannings all of the attacks in one single window now we can see this is the uh menu that is the file accs edit view help we can go to by using that and do that split horizontally and do all of the steps for using that we can also use the find uh that is the most important part here so I'm going to use the control shift uh F here and here we can see this is the find button and uh that ask for the string that you want to search for so if I'm going to search for the teachable then it will be there highlighted uh all right so this way we can see it is highlighted now what if there will be many too many strings like the N map have the more strings so this way we can use this uh Arrow to navigate all of the uh found the strings or the search patterns terms we can also change this search patterns that how it will be finding on so regular expression search Match case or the Highlight all matches so this will be highlighting we can just simply close it out and anywhere you are using the tool you can cancel everything like using the controlc so as this is this was actually running now if I'm going to uh quit this as stop this tool to scan for the Target I'm going to use the control+ C that will be working and it will be stopped here it is also there so if I'm going to use control C for stop uh to stop the nict to scanning uh for the vulnerabilities for the google.com then it will be doing the same task once again going to the preferences uh set P we can see uh change some of the uh mod most things like show the tabs so here is it is hide tab bar with only one tab it will be hiding otherwise it will be showing many tabs even if it is there only one tab we can see now this is so this is the best way to hide the tab if it is only one terminal or the tab you can say control shift+ X it will clear it without typing the clear uh word command one thing that you would like to use and you will find it useful always inside the C Linux is the command to locate the tools installed or anything to find it inside the K Linux box so there is a command that is called locate that you can use it to find anything inside the K Linux p and testing box so if I'm searching for end map where the locations are for all of the end map is installed and it is there we can see all of these in the commands we can also use the command like the uh n map and using the pipe symbol to see the list so that it will show uh in a page style all right so now it is showing in the page style now if I will hit enter then it will show the next page we can see hit enter hit ENT enter and it will be showing up meaning that it will show Page by page one page and uh per line so hitting enter will show up everyone so again and again you need to hit the enter button in using this command and that is too useful while using too large list of anything so in to stop that you need to uh press the control Zed here to uh stop listing and now I'm just going to clear this so locate function is basically useful too much useful actually finding the tools or the any files directories or in order to know if the certain tool is there or not searching for meta as flow it will show you the location of that so searching for metaed actually the a spelling mistake all right so it will show up everything related to the term that I have used the meta exploit and all the path of the uh Tools location that it has been used to and installed inside the system so that way you can you simply select it and control shift C to copy this and put it inside any command you are going to run that and that's all for this one you can also use the find to find the information on the current terminal that is not used to find the other options that is fine to in a file in a uh uh output in know something like the uh terminal output so once again control shft X and this is clear so this is the way you can customize your command terminal your C Linux to use it according to how fast you want to switch from one window to another window using the uh shortcut commands and that is beneficial and also looks like that uh hacker is hacking or using the penetration tasting uh box like the KY Linux that favors the name of this distribution to hack like a professions to uh make the look like feeling uh you also want to hide this file X and set it view menu these menus so in order to uh hide these menus we can see there are the options so uh going to shortcuts we can see toggle menus that we can use control shift M and it will be hidden now if you want you can also use the preferences using the shortcut commands just you need need to remember the commands otherwise you will have some difficulty ulties in finding and reallocating it or sometimes you might restart the systems if you are using the live version of the colinux so this is the best way you can use and these commands are uh simply useful and simple to remember too because I always use the shift plus the other words short letters like the shift T shift V shift a and similarly so more commands can be found and uh we will use that in the next couple of lessons to uh work around the Cal Linux to find something useful informations that how it can be used actually and this lesson was just for the terminal shortcuts and the customizations of the terminal that I use so more commands that will be useful we will see in the next lessons one of the best features that have been added to the color Linux is the uh undercover mode that hides all of the actions and activities uh that will not show up that uh user or the hacker is using the color Linux because many people are now aware about the color Linux that this is the hacking platform and the operating system that can uh have these all of the tools and the the techniques that can be combined in all of the way to uh hack all of the systems and the web services and the websites so what happens in the uh undercover mode is change the look and feel of the K Linux to the Windows systems so let me first open it uh uh using the uh menu here so I'm going to use the undercover simply type under and K under cover mode now every uh look and feel will be changed to the uh Windows operating systems and this is the best feature I like it about the graphical user interface that anyone can use to fool any person that you are using the Windows operating systems this is mostly helpful for the hackers and the attack haers who is using in an organization and hiding their activities that they are using and thinking and believing other people that still you are using the Windows operating system and you are not using the hacking platform like the K Linux so in this case we can see these icons are uh similar to when looks like the uh Windows command prompts and uh this is also uh the simp similar to the command PR that we have uh in the uh Windows operating systems these all folders are looking like the windows and here we can see this is maximizing it will similar look we'll have the uh Windows operating systems even the systems drive and all that stuff even we can see the start menu is also looking like the window and the notifications are also similar to the exactly window Windows operating systems this is what called the undercover mode and uh this is the best uh valuable thing that uh anyone can hide their activities inside an organization or anywhere you are working on so this is basically for the hackers or you can say the mostly malicious hackers will use this to uh hide their activities from the on screen and believing other people that you are still using the Windows operating system so this is all for the Cali undercover mode so getting back to the Cali undercover mode simply search for again the undercover mode and just click okay and it will be visually back to the Kali operating system and it has been changed but still you can see this is not changed but what I will do is just simply close this and uh reopen this then it will be back to the cinux terminal otherwise it was actually the command prompt look alike so that's all for the Cali undercover mode this is useful you can also use that in case you are uh going to HDE your uh activities that you are what you are using on the system and someone can't tell and differentiate between the windows and the krux that you are using in the undercover mode see you in the next lessons thank you all right so in the previous customization lessons we have already seen how to customize the layout and the look and feel of the color Linux in order to uh make it uh look good and also uh to help in uh being more uh work through the K Linux in an easy way to find it everything in a consistent way so now let's start the uh workpace that we already discussed in the customizations and the the uh introduction of the cinx lense so as we can see here the current work space one and the current work space two that can be switched from using the uh Mouse wheel of the uh uh Mouse you can use that wheel to scroll from one uh space to Second space work space now let's customize it so just right click there we're coming to the workpace setting and here we can see this is one two we can also increase it according to ourselves so if I'm increasing it to five and or four we can say we can also rename it so the uh for only command so if I using the terminal name I can use any name here you can to and that's all for uh these two workpace renaming you can also rename everything from here we can also change the margin but this does doesn't makes any changes to the look and feel but that will help you to uh make a setting for the workpace margins from the uh corners and the side edges of the windows screens so moving back to General we can now see there are four work spaces now close it and we can see here this is for name the terminal this is the graphical user interface so if I want to use this workpace for only the terminal or the command line tools so I can use that in a different way using many terminals opening up here many one and you we can also switch to another one that will be the graphical user interface so if I'm using another tool like the uh anything so if I'm using the web browser suppose for this lesson I can be sure the first workpace is used for the terminal and the second is used for for the graphical user interface tools or whatever in the graphical user interface similarly you can also uh change the panel settings let me uh close some of the applications and the terminals here so that workspaces are visible actually that what what are the applications that are running on the on a particular workpace so as we can see here if I moving to this workpace there is nothing but moving back to this one we can see that the Firefox is running currently all right moving to the first one coming to the panel settings and the uh this is also the part of the customizations and the settings that will change for a user we can see here on the upper right corner that is the CPU and the memory and the swap memory that says everything about the how much CPU is consumed and the memory is consumed so that you can be aware that a particular application is taking a tool longer time to load and to longer time to uh face the data and and at the last we can also be sure that the system is not properly configured or doesn't have any sufficient Ram so that that application can be used accordingly so we can change that and going to properties after right click on the panel we can now see the transparent to style separator handle we can also change that accordingly according to your style all right so now coming to the uh panel here we can add new items directly from here or going to panel preferences so going to uh panel preferences we can uh change everything from here like the uh panel one we can also add a panel here but that will not make a difference here we can see this is the panel and if I'm putting this here and that will not make any sufficient changes but for your your informations you can keep it for that so I can remove it using the minus button and the one panel will be there we can also change the panel uh settings that where it will be appeared so uh here it is vertical and the disk bar but the default one is horizontal on the upper of the screen we can also log the panel so that there will be no application is moving around uh using the accidentally click of the mouse button and automatically hide the panel so if you automatically hide that always it will be hidden and once you move your mouse but this is not recommended for the cinux running on the virtual machine so use it neighor and uh now coming to the adding some of the informations over the panels so we can see here the style of of the uh panel that have the your system uh default or the solid color or the background images you can also add background images according to your choice using this selection coming to the items we can add as much uh items as possible and as per the spaces available over the panel that is here available coming to the what I have added is the system load monitor so I have added this that says the CPU memory and the swap memory we can also know the information about the what this uh particular application or the particular uh tool will be doing and actually working how we can see this by after clicking it and we can see what are the options CPU with the color blue memory monitor with the uh green and the swap memory with the uh yellow color we can also see the uptime monitor that will say here and uh here are the commands that we'll be working on system monitor we can add as much as so if I want to add some of the uh applications here so that will be uh from the add plus button here and moving to the we can see a lot more applications are there like the uh window buttons workpace switcher that is already there and disk performance monitor is as well free space Checker date and time CPU graph we can add it accordingly so that's all for this lessons to customize the work space and this is actually a fantastic options that is given to the color Delux that help assist a user who is going to work on so going to work on the first user space for the uh using the nmap command line tool and the second one for the meta explor so will you will not mess up with the all of the tools that is working on a single screen you don't need to switch it once again and again if you are using the mouse you can use the mouse wheel to control the workspace switcher is of use easily that is the best way but even if you are using a laptop it is not easier you simply click it out and that will be better we will see that workpace settings in a real world scenarios where I will be using one tool in the first uh work space and the second one uh like The Meta exploit third one is the uh W and the fourth one for the bub Suite tool that is the graphical user interface tool so that's all for this lesson just customize it for yourself and see how it actually works according to you see you in the next lessons all right so this lesson is all about the creating files and the folders inside the K Linux so all the these simple steps are always followed in all of the Linux operating systems and uh going throughout the color Linux you will always uh need for that to create a files create the folder create the text files and some redirections to other files like some outputs you want want to capture inside the notepad and save it for later use and for the future reference so now we are at the K Linux command prompt here that is the terminal and uh at first let's try to create the directories that is the folder inside the uh cinux so uh creating the folders is simple like uh using the command mkd that is uh stands for make directory and uh type the name so if I'm going to use the name that like the uh hackers in this case here so that may uh it will create the directories and using the ls command we can see uh that directory here it is that is the hackers and using the same command mkd we can use uh and make multiple folders at the same time in one line command so that how it actually works am KD and use the file name like the hacker one hacker 2 hacker 3 and so on so this way we can uh put multiple file names I mean to say the directory names in this case here that is not the file this is exactly the folder that we use all around the operating systems of the Windows or Mac so uh this is the the uh way we can create the directories now uh hitting enter and using the ls command we can see hacker one is here hacker 2 is here hacker 3 is here so all these directories have been created now what if I am going to use create the files inside that directories so creating the files actually is using the uh uh two methods in this case here so we can also use the redirectors and uh we can also use the Echo command so let's see how it actually works so now we have created one uh multiple actually uh directories here so I'm moving to the changing directory to hacker and uh one thing more that I want to discuss here is the using the command and typing some of the commands and if you know all two or three lers of the command then you don't need to use or type multiple all all of the word for exactly so there is the uh word completion simply using the tab button on your system it will complete that command exactly at as it is so I'm changing the directory to hacker and uh I'm just typing the HSC and hitting the tab it will complete that is called the autoc completion and uh this command is automatically typed so you don't need to do uh type again and again all of the vs so now uh I am going to move to that directory so actually it was the hacker one and now I am at that prompt that directory Now using the Lis command will not reveal anything because there is no such files inside that directory so in order to create the files inside that folder or the directory we can use the command so the first command is I'm going to to use is the uh redirector so uh say for example if I'm going to use the Alis command and uh its output will be redirected to a file and it will be saved in a noted style as there is no such or any file inside the hacker one I'm not going to use because there will be no any files there will be no any wordss listed and hence there is no file will be created so what we can do we need to uh run any command that will have some of the output so the output will be actually in this case uh if I'm going to use the uh nmap command that is the tool actually to uh scan the target Network we will see later in this course so using the nmap command and using some sort of switches and the target so in this case the google.com now what I will do is I'm trying to redirect all of the output from this scan to uh file so what I will use the uh angle bracket so the angle bracket will be this way and now uh type the file name so in this case I'm going to use the output of nmap and use the txt extension so that it will be recognized as the text file hit enter and all right so this actually requires the root previlage so we need to type the pseudo command here first as we have already discussed and as soon as the nmap scan will be completed it will be redirected to that output and that txt file Now using the ls command we can see there is one file created so this is one way in which we can create a file inside the uh any Dory or the any folder now if I want to uh use the second command that is the echo so what I can do is this Echo command is simple as that so using the Echo and type the word whatever you want to put inside the text file so uh this will be uh this course is for the and we can just redirect it to the name the the output that will be the output two in this case I can say output two here uh. txt and the same text all this this course is for beginner will be redirected to and created a file using the Eco command Now using the ls we'll have the output so later we will see how the uh files can be seen over the command prompt or The Terminal here but let's first create the files here as we have already created directories so the files have the options to create now the next option that you can use and create a file is using the uh text editor so in the K Linux there is a text editor that is the called mouse pad and simply using two word or three word and hitting tab word will be autoc completed and uh now you can simply hit the enter after typing the in the mouse pad and our text editor will be opened here now you can Tye anything and it will be saved so that's the way to create the files now to see the exact content of that files what we can do is use the concatenation command in short it is called cat so using cat command uh if I want to use the uh first file that was the output of the end map when there are multiple files of the similar name of first two uh two three or four or the lers then after hitting the tab it will show all of the files that have because there is no autoc completion in that case so it is showing that there are multiple files and you need to choose and select the exact file that you want to open up so uh the first one is the output of so I am going to use this and hit enter we can now see uh exact output of that nmap scan that completed and scanned the target host that is the google.com in this case and it found that uh Port 2180 443 and so on are opened so these services are exactly running on over the google.com and this is the way we can see the file contain using the cat command now uh as we have already created that all of these things in a simple manner now uh if I want to use and delete the directories and the files then what I can do simply use the RM command and uh type the file name like the in this case output so this will be deleted and we can see uh the first one has been deleted using the remove command that is the RM and uh if you want to delete the directories you need to hit something else so moving back to the home directory and using the ls command we can see there are total of four folders hacker 1 2 3 4 and I want to delete all of these in a single line so what I can do is rmd and type the hacker one hacker two hacker three hacker four and all of these will be deleted all right so we can see uh the first one that failed to remove the hacker 1 and 4 uh because there is no such files all right so there was only the hackers so I need to change the first one all right so there is no such files as it has been deleted already and we can see there is only one left that is the hacker one we can delete that too so rmd and the hacker one all right so this is also saying that and prompting for that this directory is not empty let's move to that uh directory first and let's see the files all right so there is one file and this is the reason why it is not deleting and this is also the functionalities of the Linux Terminals and the features you can say save to not mistakenly delete the files you want to uh actually you don't want to delete that so in order to do that we need to First remove that files and now moving back we can now use the same command that is the rmd and the directory name it will be deleted as we can see as simple as that uh all these commands are for creating directories and creating files in next couple of lessons we will also see some of the more commands that will be also valuable for uh manuvering through the terminal and using throughout the directories and going throughout the directories so some of the commands are already there that is available in the next lessons we will see that so that's all for this lessons see you in there searching for files and locating any items that are all already installed inside any K Linux or the any Linux operating system is the extended part of a user and his job role so in order to find the locations of a particular file or a folder or a directory uh you you can use the commands that are the find and the locate two commands that we will use in these lessons so let's start first with the find that is also the command so the command is simple F IND and it finds all of the locations uh the file name you will provide here with the directory name or the uh if you are not working in the home directory then you cannot uh provide that to but from any proms with any user you can provide the locations or the directories in order to search for any specific file names so let's start first with the find so the prompt for the find is syntax that will be used is the name find and the name and in case if I'm going to find something like the uh all payloads then it will find it with the path that it is belonging to so this is the all payloads as this is the inside the home folder or the home directory you can say and here it is so then there is no uh much path is required to type or provide with the find and the name just need to provide the location or the location file name that it will be searching for so finding the uh file name is easier with the find and the name command here that we provide with the syntax name and let me clear once again all right so uh let's start with finding some of the useful files that is inside the C and going up directory to create the details of that so the command will be simple find and now I will provide the directory so here is the directory uh one level up and now type the name that it will be searching for so the name I'm going to search for is the uh dictionary file that is already uh comes with the color Linux in order to crack the passwords so that's name is uh rocku and hit enter and it will find that everything all right so we can see this is the permission denied let me type the sudu all right let me clear it once again in order to show one more command so using the upper arrow keys we can use the previous commands and get the previous command that we have already executed and as you can see the uh cursor is at the last of this search a string or the commands that we have used so using the left and right arrow key we can move left and right but this is simple and short commands what will happen if you type the long commands in one to two to three lines you can simply go to uh first line where you need to edit so in this case I'm going to use the Pudo at first before the find command what I will use is the control a that will come to the first position of the command and if you want to go to the end use the control e that's way we can go to first and last of the commands we don't need to use the cursor and the pointer here using the arrow key to move from right to left all right so this is the file name now let me provide the sudo command first and at the last let me put the complete file name that is the txt and G Z now hitting enter will provide the location and find that file exactly where it is so we can see now the first one here it is using the file system and we can also see inside the word list this is the exact file location and here it is two so these are the three uh actually this is uh at the two or three positions and this is contained inside the col Linux but this is isolated in many ways so we can find that according to this find command using the uh directory that we have provided now let's move to the second command that is the locate that we have already seen so in order to locate a file or a directory we can use the locate command and searching for the same file rock. dxt Dogz it will find that exact location inside the word list we can also use the only some parts of a file name and it will locate that too so here we can see this is roou 1 2 7 and some other parts are also there but the main file that is the longer list of the word list is this one rock. xt. gjs we need to uncompress this so we will do that in the lat modules all right so this is for the finding informations and finding directories that is finding a files to that is available inside the Cal Linux because many times you are going to deal with the uh some specific files that will be sometimes hidden like say for example some tools also use uh hidden properties to hide the report file that you have generated using the tool in know to hide that so searching for manually will be hectic sometimes but using the commands like the find and locate we can quickly find it over the terminal all right so now uh let's have a look on the type command that is the type and using the command for which you want to know the category of that command so say for example the ls command we want to know the ls command type and the category it will say that the LS is the earliest to LS and this one so basically LS is consisting of these commands we can also similarly find more uh commands like the type and we can also use the if statement that we already use in the Shell scripting we will see in next modules and the next couple of places it will say that the if is a shell keyword s you can find a category of any command that you are going to use inside the color Linux moving to the next commands that is the free that will say all of the free stuff inside your system like the memory used sh memory used C memory and the available disk this way you can find out using that we can also use using the human reable so free using the H we can see inside the is the gigabyte coming to the next one that is the UN name let me clear it first so the UN name is the printing informations let me see some of the command first so the man you name we can see this is the printing informations system information we can use various switches but most of them are un name and a that will say the the KY Linux with the version and the system architecture with the dean and the date that on which it has been installed and it is running we can also see the system architecture here this is the genual Linux we can also see the kernel version and the kernel name as well so using the UN name uh the kernel name is used by the s switch we can see this is the Linux kernel so as I mentioned in the first couple of lons of this course the Linux is the kernel name of the operating system and this is the reason why it is widely used and coming to the next message and the next command you want to know the exact command that you want to uh use in any cases so using the main page you can find out many things like the kernel version machine and the hardware name processors as well so everything are there that depends on on the user and the administrator who you want to uh use it for and what the information you want to extract from our system or the Linux machine so using the name un name we can also use the P that is unknown we can also use the K all right so this is not available we can use the S that is for the Kel trying out other options that say is the G Linux all right so now uh let's have a message from the kernel so the Linux kernel that prints out all of the informations for a device drivers that are associated with your system and on which the Linux operating system in this case the C Linux is running on so that is the command uh suro suro is used for the uh super user privilege so sudo and the command is d m SG that prints every informations related to the device drivers that are associated with your system and K Linux so every informations will be related to the device drivers and the Linux gel just try out using the find and locate options there are many situations in which you can also use like the main page and the find you will find more options that can used to even create a sale scripting or some of the programs that you can use in Windows it is called batch file programming and in Linux it is called cell programming or the cell scripting so every command we use on the terminal is used using the bash cell bash stands for Born Again shell we will see that later but for now you can use the all the commands combined and that will be a program we will also see that in order to uh how we can take uh input from the user and that prints after taking input of a particular user or a particular commands we can also use the uh uh locate command so the main page and that find files by name using the patterns can also be used as we have already seen about the wild card so we can also use the wild card in order to find out see you in the next lessons there are multiple ways in which we can create and navigate through the creating folders files and directories as well so in the last lessons we have seen that the uh navigating through the directories and creating and removing is the only option now let's move it ahead and see some of the advanced features of the cat command and some of the other uh files and directories features so let's say for example I have already created there are three files hack one hack two hack three now what if I want to see all of the contents using the cat command in one line so what I will use is hack one hack two hack three it will show up every file contain at once using the single line command so uh the first content is from the hack one is the ls command that I have used and this is the first one uh the second one we can see is from the nmap scan from nmap scan report to here and the third one that is the hack three is this content this is the file content that is written there so let's see for first example like the hack 3 this is the content of that file hack 3 there are another options as well so let me clear that first we can also use instead of typing all of the file names we can also use the Sisk Mark that is called wild card so using the wild card I already know that there are the files that start with the hack one hack two hack three these are all in the sequence so what I can use is I can use the first letter that is the hack or that start from the h and I can use the EST risk Mark here and it will show up every file content that starts the file name with the H so hitting enter will show up the same results that we have seen in the previous command so this is also the ease of use case for the command and typing uh lot more command can sometimes be irating and using the shortcuts using the uh list command will be helpful while you are going to work in the multiple format so uh this is for the cat command now uh in order to view that all of the files and uh using the cat command there are another way that we can also put some of the contain of the file in the all of these files at the same time so as we already know there are three files so let's see first uh last one that is the hack 3 and this is the content of that file now if I want to add some of the files content inside the same file that is the hack 3 I can use the redirector two times so using the uh uh Echo command here like the e e and this is the file content or file content line two and I can use this time double angle bracket that will append that to that file and it will not replace that so I'm going to use the hack three here uh the name and this way it will not overwrite the hack three file and it will add that line like this one this is the file content line too to the same file at the last line let's see that cat and we can see this has been added we can also use multiple times like using the three and the same output will be available and that will be appended to that file and if you are not using the double angle bracket or or a director then what we'll do let's see that so simply I'm going to remove the first angle bracket here and I'm just sking with one now what it will do is it will replace all of the file contains with this line only so let's see that and everything has been over written with this so these are the some of the features that we can use to similar to using the uh asterisk Mark or the wild card we can use that to for deleting the files so if I'm going to delete the files like the hack 1 2 3 I'm going to use the RM and using the only H and the Sisk mark it will delete all of the files that start with h later we will do that in last let's see how we can combine all of the files in a single one so I'm going to use the uh uh redirector and the concatenation command like the cat command here and using the H asterisk and again I'm going to redirect that to all the uh hack uh four so I'm going to create the uh fourth file that is the hack four using all of the contents from the uh these files three files let's see that it will create a file from all of the latest that is start with h so there are only three that is start with h and it will create the another that is the four with all of the contents from these three files as simple as that so this is the way that we can do now for deleting what we can do is let me split that vertically uh we can do that uh using the cat or this was not only for the cat uh I'm going to remove that all of the files at once let me show up the ls command first we can see now there are four files having the name that it starts with the H what we can do is type the RM and H with the Sisk Mark now which will delete all of the files that starts with letter H LS command and there is nothing to show up that way navigating to the commands uh files and folders creating files making folders uh moving to another files another folders directories it will be e so much easier if you are going to work on the terminal and that that is super easy always there is there is one another uh command as well that is the MV that move command that move from one directory to another directory so we can also use that command too and that all is simple there are another command that is the CP so let me once again split that and there's a CP command that copy contents from one file to another file so if I'm going to copy that uh all so there is no other files available as I have already deleted let me create that so I'm going to create a file Echo hello world redirect it to hack one and there is a file now I'm going to copy this file to another so using the CP command we can copy that to another so copy is hack one to to the uh hack to LS we can see there are two files available so the simple copy from the hack one to hack two the file content will be similar in both cases like the cat hack two cat hack one so both files have the similar content it is exactly the copy and paste so uh this is for uh copy and paste and that's all for the copy and paste so these are all the basics features that you will always require while navigating through and using the cinux so let me clear that I'm going to use uh once again the another uh command that is basically the Bas feature I always want to know that and this is Handy tool as well that is called man page or the manual so manual for every command is available let me uh collapse this all right so the manual page is simple as that this is actually called Silver Bullet in case if you don't know any command uh syntax or if you uh want to learn more commands for one uh particular uh command like the CP cat LS so basically using the ls command have the multiple features multiple switches multiple syntax that we can use to uh extend that uses so uh similar to show you that how we can see is uh using the man pce so if you don't know the command that is the ls and you want to learn more deeply about that command so using the command that is the man and use the command type LS it will show everything related to that command and it actually explains everything that what the uh particular switch will do and perform the task so hit enter and it will be completing and navigating to uh scrolling to the page at the end and last of that or you can simply quit that we can see there are the 157 lines in the bottom of this terminal simply typing Q will quit now having the cat command there are many switches Syntax for the cat command so here it is we can see this is for show all number non blank so ends and so on there are many features every commands contains but that is all about the commands that you want to know deeply similarly we can also use the man manuals for our manual page for some of the commands or the tools that is already installed in the color Linux so the nmap command that have the H file and uh uh to be uh Frank all of the tools inside the cinux have the H file or the help uh switch or the syntax that we can use to like the simple Lis and using the H will not show anything but using the double uh minus and using the help will show up in detail that what this command will be actually performing the task so this way you can find all of the informations about a particular tool that how it actually works either you are going to use the minus H or minus minus help so moving back to the uh main page if I'm going to use the msf console that is the meta exploit framework tool for the pon tasting I'm going to use the main page for that msf console and see the m page that explains everything about all of the commands that available for meta exploit so this is actually beneficial for all of us who is uh not having the all of the commands known and have not used earlier so that way you can learn it at ited pasted quit it once again for the nmap we can also get the help like in this case using the N map also reveals the H file and shows everything but using the man page you will find the explanations and here it is so this is the network mapper open source tool for Network exploration and security auditing hitting enter continuously will go through the last page and the bottom of this page that explains everything from command to command and every line we can see this is the scenario that says sometimes you wish to scan a whole network of adjacent host that says everything so the man page is based for a new user or the beginner in most of the cases you will love this to use for a particular tool so that's all for this lesson see you in the next lessons all right so uh welcome to this lesson and in this lesson we are going to uh have a uh walk through and the Tex in some some of the examples like the hidden files and the file permissions of the Linux file so anytime you are working on the Linux operating system or k Linux as we are using in this course you will always require to deal with the file permissions and the hidden files sometimes so this lesson is basically for both of the the cases and at last we will also see some of the uh useful commands that will also be facing at all the time when you are going to work on the calux all right so uh going to start I'm going to download one file here so that you will also know that how to clone a file from the GitHub because most of the tools that you are going to download for this course or any course for the hacking or the penetration testing you will be going to uh mostly on the GitHub platform so here it is the tool that is the uh Harvester the Harvester meaning that this actually the tool that harvest the email addresses and open source intelligence tool that finds all the open source intelligence or informations available over the internet all right so uh this is the uh website github.com lames and the Harvester we don't need to do uh anything with the URL here we can see this is the code we can see this is https or GitHub CLI we can also use this command directly on the uh command line terminal or simply copy this URL here and move back to our terminal and here we can see uh what we need to do what the command we had required is here git clone and the same URL that we copied so here it is uh this is for the Harvester simply hit enter and it will be cloning directly from the GitHub uh repositories once it is done you will see that Lis and the Harvester so as of now this is installed I mean to say this is cloned from the uh GitHub repositories and it is now onto our system now we are required to deal with that so let's see the uh file content of that directory that is the Harvester so this way we can see all of the file contents and here we can see the setup that we are required to run before going to work on this tool as this tool might also be installed by default in the colinux let me check it out first all right so this tool is available and we can run that all right so let me get the help from there in order to get the all of the commands all right so this uh tool this command is actually duplicated and we need to use another later here in this case and as per the Assumption this might be installed yeah this is exactly installed pre-installed inside the C Linux we don't need to install but for this command all of the hidden files and the file permissions to show we are required to download any tool you can download any set of tools so you can also work on the already installed tools as well so for ease of use I am using this so now uh let's see the file permissions of the recently downloaded tool the Harvester so the command will be a and L with the directory name and now it will show up everything required for the every information every piece of information related to that directory and the files so uh here we can see now let's start from the first line as as we can see this is the first letter that is D meaning that this is the directory and uh at third line we can see this is minus meaning that this is a file and as simple we can see this is a file later we will talk about this dot that is the hidden file actually and you will also be dealing with because some of the tools like the ypt use the report file after generation to make it hidden I don't know why what is the reason behind the scene but this is the real scenario basically there are three types of permissions that is the read write and execute so the uh line we can see here is the read write and execute this is the uh all these three letter that uh says read write and executable permission is there for the uh this user on this host machine so this is actually the name we can see this one if this will be the root then there will be root here and one the host name available on which you are working right now so this is for uh the file permissions now uh how you can change the file permissions of a certain directory or the certain tool because most of the time you are going to install any tool you will require to change the mode of the file permissions to read from the uh read to write and execute so how this actually happens anything you are uh required you will be uh needed to know exactly what the file permissions and this is really a vast uh topic to uh mention here that you need to understand that uh Linux file permissions so at last we will see that what the Linux file permissions and how really vast this topic is all right so now let's start with changing the file permissions to permission denied and to full access so for say for example the command is uh we will use the minus here to permission denied and the file will be the same the Harvester and and now let's see the file content we can see this is permission denied because we have used all the three file permissions read write and execute that is the highest number in the segment that is the 777 meaning that it will be rewrite and execute for all these three options but as I have used the minus meaning that it have not granted Rite execute permissions for that d ELC now let's change it and remove the minus here we can also use the arrow key Upper Arrow key to navigate to the previously typed command so you don't need to type once once again and again now it has been changed now let's type it to C we can see now there is nothing to do with that now let's see the file permissions inside this Harvester so Al with ls command and here we can see all the redite executable redite executable and all these are for this content and this directory and this is just for the changing the file permissions to permission Deni to granting access for a user in most of the cases and sometimes as well you will also require the uh sudo command to get the root access before changing that and using that command but not always the case it is uh depending on the files and the permissions that it have previously granted so let's clear it first now this is for uh changing mode so what to do in simple uh nutshell CH mode Tri 7 you can also use 744 755 and so on because highest the number highest the uh permission that will be given to that particular file so I always use 777 and the file name so in in this case here file name and that's all hit enter now moving to the hidden files that is actually inside the Linux operating systems so using the lsal we will see this is the dot that says this file this directory is hidden as we can see this is a directory and uh let's create some of the files using the hidden command so we can see there is nothing file here uh so that it is saves but once we are going to use the lsal it will uh show everything uh from the hidden to available and all hidden files are marked with a single dot so whenever you you are going to create a file like if I am going to create a file in this case uh suppose if I am using the command uh once again like the Echo and the file name hello world and I'm redirecting it to a file with the name that starts with Dot and the file name is hello.txt it will be Default hidden using the ls command we can't see that but it is exactly available and it is hidden so going to LS L we can see that somewhere it will be here this is the hell of txt all right so this is just for the Heat and directories and files moving to the uh graphical user interface we can also find that using the URL bar here just just put the dot here and it will show everything that have the hidden properties and the hidden files and directories that way we can also find it out but using the command line is the easiest way and super easy to do that and Achieve that task let me clear it once again now moving to the uh some more commands that you will also require some of the times because uh using the once again the example of the Harvester tool here as if I want to delete this rmdir and the Harvester it will not be deleted because this directory is not empty and that that is the reason it says delete the content first and then delete the directory but we can also force it using the RM command and RF so let's see what is this one first using the help command so the f is used for the forcing ignore non-existent files and arguments never prompt before removal and R is used for recursive and remove directories and their file contents recursively so these two F and R is used for that we can also use the V that will show everything that is what happening iside deleting and at the time of deleting a delion that file and directories let's try it out once again so I'm going to use the uh Delete RM and using the RF and then use the directory name here remember that this is directory name not the file to remove as we are forcing it out to delete everything inside that directory and file contents and after that directories to it will be used RM and switch RF we can also use uh uh V that is the verus and it will show every removal of any files hit enter and we can see this is removed removed removed but before using the RM command it is recommended not to use before having a a look on the file diores and the files under that directory because it will not give you any prompt to stop that as you can see this is deleted and there is nothing to show up and it will not be a stop this can't be undone so just keep in mind now moving back to the file permissions and the resources to learn more deeply about the file permissions of a Linux machine so here it is Linux file permissions that says discuss tells you more bit deeply about the file systems in understanding and helping you out you can find it too much useful for understanding uh and file permissions and granting the uh ownership changing the owners she and this is uh basically a good uh document here we can say that is most valuable so it is recommended to read this first and understand the file permissions like the users groups and the uh all other other users in the same machine and the read WR executable such as owner uh group and user so in that case it will be much beneficial for you to understand file permissions and applying that for granting a file permissions in a positive way too see you in the next lessons thank you in this lesson we will explore for some of the process management and killing of the process with installation of some of the new tools that will also assist in uh vieing of the the interactive mode and the dynamic mode of the processes and all of the tasks that running beneath the Cal Linux so let's start at first the PS tool and then we will go to process ID and finding the all the processes that are running and having the process ID number for a particular process running under the K Linux so let's start for the first one that is the PS this is the process that says what are the processes running onto this system and inside this system in the background in order to kill some of the applications and some of the background jobs background tasks you need to know the process ID for killing and stopping that process so BS have the more extended commands so let's see first main page for the PS and here we can see that report a snapshot of the current processes that displays information about a selection of active processes and the extended way or you can say the dynamic view of the same processes can also be seen using the top command that is also the best way to view and find all of the informations such as process ID user and the path of the application that are running in the same format same interactive interpreter here so uh in short we can see uh this have the command that is the Au X or the axu in any order we can see here so uh this command we can use both of the commands can be used at once and uh not exactly at the once because both commands have the same output according to the Unix and uh it distincts from the Unix standards that is running over the other Linux kernels or the Unix kernels so in order to see every uh processes let's type the command let me quit it first so the PS and the aux now we can see every command here let me extend it to it and we can now see all of the processes here we can see the current user that is the Cali and here we can see the root user and all these are running with the root privilege and the current user that is the Cali Linux or the Cali username previlege and all that says who is the owner for that particular task that is running inside this system all right so this is for the process viewer we can see this is the process ID here and going to top we can see all of this in a interactive way using the other commands but not this one so this is the process ID here we can see this is user CPU management and the CPU consumed by that application here is the memory that is the ram inside the statistics and the start time with the time stamp as well and the command to run that command and uh execute that application exactly so this is for the process view were in an extended way but that process and uh command that is the PS and Au is not sufficient for viewing and having much more deep informations about the tasks and the uh background jobs running inside any Linux system and hence we have another command so the another command is the top command simply type the top and you will see the dynamic view of the same processes that are running inside this system here we can see the process ID user PR ni and many informations according to the system architecture as this is running on the virtual box it will have some of the uh informations that the system memory or the Linux kernel will provide the information in in an extended way as you can see this is dynamic view meaning that it is updating over time and we can also see at the same time the CPU consumed and the memory consumed now as we know uh the process ID here we can now kill any tasks or we can also find the process ID of any application that is running here let me find some of the informations like uh here it is and uh if you know uh the process ID of that particular application then you can kill it in simple way so let me quit this first and uh here is is the application that we want to find the process ID for that as we already know here is the process ID for that same but there is another command that we'll find in a simple way you don't need to use the top command or the PS command to know the exact ID process ID of a particular application and the user privilege command is B ID off meaning that the process ID of the application that is the net NS and as you can see this is the process ID 21 here we can also see the same process ID is 21 so this way if you know that the particular application is running inside the system you can find the process ID of that application and kill it using the kill command we will see that kill command later in this lesson all right let me clear this first this is for the top command that have the dynamic view of all the processes running on but there are more commands more tools interactive tools that says everything about the uh system informations running on and the kernel messages as well so from now I'm going to use the two command that is the a toop and the htop so in order to install that we need to type app install before doing so we need to type the pseudo command and apt that is the APD stall and the name of the application that we are going to install so first aop and this way it will be installed as I have already installed so this is saying that the already newest version available in this system now let's start with the aop so command is simple a toop and now we can see all of the informations almost every information is uh shown and displayed over the screen in in a much efficient and much uh re readable way so you can find almost every informations uh on the screen there are shortcuts as well that we need to find out using the help command so using the some of the informations we will see uh like using any Keys uh let me qu this first uh using any Keys you will see this the system and the process activities since Boot and pressing any uh key you will use and show uh informations that is uh different from that now uh coming to the informations that we are also interested in the CPU and the memory that will show with the size and the CPU that have been consumed by the particular applications this have also uh the another commands or the extended way commands so let me see see for the main page and here we can see there are many syntax that we can use along with the aop command that will extend the uh features or simply say extend the way uh user can view all of the processes and the programs running behind the scene so uh the main command is the uh aop with some of the switches we can see uh interactive uses and the uh going to on to the bottom we can see the examples and there are a lot more informations that it provides using the manual pages here all right so let's skip it and quit this first and start once again the atop and as we can see uh there are less informations once we use the aop command that that is the uh basically interactive monitor view or the load onto the Linux system so once the load will be lesser on the system there will be less applications running on as you can see there are uh many commands and the many options available here many uh information available actually and uh we can see the CPU uses and the commands as well and uh we can see the load on the CPU using here this is the CPU 1 and cpu2 cpu3 and the percentage wise we can also see the idle percentage here all right so the bottom line of this tool and this command we are using in an interactive way is to view the load onto the Linux system and the processes with the process ID with the extended user ID we can almost see every information such as memory swap memory CPU and the percentage and the free memory that is available here we can also see who is running this uh operating system and the uh shared memory as well with the ID percentage so in order to uh get that information almost every uh manner you need to have the understanding of the all of the switches and the syntax of this tool this command but uh this tool is used by the uh administrators who want to see the load on the system or or in another case you can also use this if you are having trouble onto your system let me create this first to uh move and jump to the next command that is the htop we can also install that using the same way as we installed the a toop so let me clear it all coming to the aop aop is the interactive process viewer let's type it it and here we are we can also see the memory and the swap memory with the CPU first two are the CPU having the percentage and the memory that is the ram inside here three uh almost 3 GB of RAM has been allocated for the calux into uh this calux running as uh on the virtual box and we can see the up time that is running load average tasks that are running and uh almost every informations that we already saw uh in the first two to three commands like the PS and the uh top we can also see everywhere we can kill that using the command here as we can see here uh on the bottom of this tool there are many options using the if that is the function command we can use the kill command as well so the F9 is to kill that so in order to kill if I want to kill some of the like the a stop so this is the tool that is running at the same time and displaying almost every informations that is uh mint for it so now suppose if I want to kill that what I will do is I will simply use the F9 function command as you can see this is asking for the confirmations like the enter to send and escape to cancel I will use enter and it is closed although this was for the a stop to kill that we can kill every applications every uh services that is running in the systems just click it here and use the F9 command and confirm that using the enter command this is actually the interactive process viewer and this is the best way that I like it about the most and you you will also like it because killing it the task and finding the process ID was sometimes be hectic but using the aop command we can quickly find it and quickly kill that so that's all for uh this process management and process viewer interactive way interactive monitor on the system load let's quit it and now move to the next one that is the kill command if you know the process ID of the any applications you can use the kill command this way let me let it and uh kill command with the process ID and it will be killed so let's see the process first and in case if I want to kill the top or some of the other let me find it first all right so let me open up the MOs pad all right so now it is opened we can see here Untitled mouse pad and let me resize it all right so here we are now uh let me split this horizontally otherwise it will tell that if I am just going to contrl C it will be killing the mouse pad and it will be killed so I'm going to use the process ID viewer so the P ID of mous pad we can now see the process ID of the mous pad so simply use the command kill [Music] 31509 and as soon as you hit the enter it will be killed and the process will be terminated still all of these commands have the extended syntax and the switches like using the man page or the help file we can see every informations so going to this way and clear this now extend it we can now see almost every switches are syntax are available and we can use in conjunction with other commands and the in some circumstances so that is the best way to use the uh aop command that says and represents everything in the interactive way to kill the command and see every informations that you are intended to get uh from the system and for your need so in order to learn every single command every single tool interactive tool here you need to have the knowledge of the switches or the syntax you can say in simple word and here are the syntax that is the kill and the L1 that sends the signal of the number 11 and uh actually translate the number number 11 not this sense and uh here we can see they kill all processes you can kill using this command we can kill that too all right so let me quit it first all right so now we are at the last command of the process viewer that is not the best but for the informations to display in a tree view we can also use the command that is the PS tree and the every processes that are listed here in a treeview something similar to the interactive way not the interactive but in order to isolate the branches and the sub branches we can see and use the PS3 command uh this PS3 command is not by default installed in the Kor Linux you need to install using the appkit or apt command use with the pseudo command so this tree view is also inside the windows that is simple tree and inside the Linux that is the PS tree that is the process Tree View so install it apt install using the sudo command first as we are with the nonroot user sudo appt install PS3 and hit enter that's all in this lesson we have covered almost every Process Management and the process viewer interactive and the uh static and the tree view with the interactive monitor load on the system and interactive View window system now we can know every processes in detail and kill that too because in some of the situations you will also required to kill a particular application in case of not responding and the system will be freezing at that time due to that application so in order to move ahead you need to kill that applications using the kill command because that may be putting load onto your system so we can see the load Lo using the aop command and kill using the kill command or the interactive process viewer aop command see you in the next lessons thank you now it's time to uh extend the features and the commands for the Ed Stop in the previous lesson we have already working on the a toop for the extended commands and we can use the uh various features and the various keyboards regular Expressions to extend the features and extend the capabilities of working on the screen and the uh working with the Linux kernels now it's time to uh go for extended commands for AO that is the interactive process viewer and we can also kill that process interactively and hence no requirement of using the uh kill command and the process finder all right so now uh according to the last lesson as we have mentioned that the uh green colors colors are used for the root user and the blue colors are used for the uh nonot root user we can now see here uh this root user as it says user has been uh colored in green and uh cinux user or the cinux that is the nonroad user has been uh actually no color but in the EV task pan we can see here task 74 that is running with the non root user that is the C Linux Cali and the 116 processes threads actually running with the uh root user that is the basically system Services we can say in technically Damons so for Linux we can say that Damons are running and in the windows you will find that the services are running so the services and The Damons both have the same uh meanings both have the same meanings but the uh different terms terminology used all right so now we can see uh load average and uh coming uh to the bottom of this uh screen we can now see the F1 and the function key can be used to uh search and filter uh Tree View sort so using the F5 let's start that F5 pressing F5 will uh reveal every processes and the uh subprocesses in the tree view as we have already seen in the previous lessons that is the PS3 so that basically says how this is a structure and which are the parent services and the parent directories that the particular process is associated with so that it says actually so using the A5 command uh button once again we can be back to the normal screen and this is updating with the uh processors that is running behind the scene we can also use the F9 to kill a particular process and we have we have already seen that we can also use the setup so using the F2 command we can now see the uh setup that displaying options colors and what the display will be shown like the shadow other users processes hide kernel threads we can also uh uncheck this and it will also uh show the kernel threads but I will leave that for the default we cannot now see here 57 kernel threads are there and 116 normal threads as a root user so we can check this hide user line process threads we can click this and it will be hiding display threads in a different color so the color basically is denoted from the display options there will be no colors that will differentiate between the root user and the other uh user so custom threade names as well we can also enable that and coming to count CPUs from zero instead of one instead and update process names on every refresh we can also use that that is beneficial for and coming to the colors we can also change the colors like the background and the monochromic and the black on white light terminal that will be light and I think so default is the best one we can also use me monochromic black and white and c and black and Knight broken gray but the default option is the best one I think so and we can also add the columns hide the columns and delete the columns and according to that all right so coming to Once Again F2 all right let me once again restart it now we can also filter out using the F4 commands so using the filter whatever you type will be there so if I'm going to type the only Cali Linux and there is nothing as of now let me do it once again so in case if I'm going to filter for only the root user uh using the A4 command simply type the uh root or the words matching like the regular Expressions will be masked and it will be shown so the root user is highlighted here and using the full command we can also use the uh root and that will be done so moving back to uh normal using the A4 commands and hit enter using the Escape command we can clear it out everything from the search screen we can also use the uh uh help file if you don't know something uh important that you want to add for yourself that you will use it continuously and on daily basis you can use these health files that will be beneficial in order to know that and how it actually works and that's all for uh this user and uh that's all for these htop commands that have the extended features we can customize it according to ourself and whatever you want to have output from that processes and the process viewers that is interactively showing up and updating over time over uh predefined time actually we can also set up that from there using the F2 uh button and the keys all right so that's all for uh this lense see you in the next lessons in the previous Lon we have already seen the a stop and the a toop that is the process viewer and the system load monitor on the Linux machine both of the tools are fantastic at they on but we will see both of the tools in separate lense so this L is basically for the atop and the uh that is the interactive monitor to view load on the Linux system and we will see the extended features that we can use to and any system administrators or the security guys can use it to Leverage The Power of the aop so let's start first a toop here and hit enter let me maximize it in the previous lessons we have already seen the uh informations that it saves and prints on the screen for the user to read and uh see how much load is on the target system uh I me to see on which the system you are working and uh the same system system the administrator or security guy can work but in this case that is the K Linux we can also use it to monitor that so uh very first thing is that you can uh hit the H key and it will print out the help for every shortcuts and the prints like this simply press the H key and you can see here that it says Health keys and every single keys on the keyboard you can p and get the different results like for example uh this one is the incaps U that we can use to uh switch from the user and filter out the user specific task so let's see first that let me press the Q and now we can see this is extended user ID that is the root Cali and root so basically we can see that the both both of the users root and the Cali is there and according to the process and the applications that is running on the privilege of root user and the C Linux user now what in case if you want to filter out only for the Cali or root user simply use the capital u and as you can see this is asking for the username as regular Expressions so for that I'm using the Cali for filtering out only for the Cali user and that's all we can see now only the processes that is running in the background with the Kali privilege is showing up everything from the CPU to the memory and this is CPU assigned for the particular process similarly we can also filter out for the uh user root in this way simply hit the capital u and type root and that's all we can now only see the root us user processes all right so let me filter out Mo it again using the capital u and hit enter without typing any keywords and the regular Expressions we can now see all of the users we can also use the a button that says every processes all of the processes from all of the threads will be shown so using the a key we can switch between all of the processes and the active processes now we can see this is only active processes hitting a all processes threads will be shown so every results are shown and that is Sav but to the user and it is actually represented on the screen that says user everything that what it is going on all right moving back to the help file once again we can also see the disk details memory details generic informations using these keywords GPU details but that requires the uh root pril so you need to run the aop from the root user then you can use the uh that keywords and that Keys as a regular expressions and press that key that will be sufficient for that moving back we can also use the pce down arrow down arrow up for the previous line in process list next so next page in the process list if it is a long page we can also see the presentation we can see there show individual threads we can toggle using the Y button and misil linous commands are also there that pause the all of the processes that is dynamically updating and uh interactively updating so using the uh Z button we can freeze that and this is say this is paused and it will not be updating and once I'm going to use once again the Z button it will be now updating so using the H button that is the help actually we can use all of the keywords all of the processes individual threads individual processes and that will be available for you we can use the X key that will show up no colors will be used like we can see this is colors will be used in green and uh basically all these are in K Linux root user have the green color and the non root user have the blue color in the C Linux but mostly in the uh Linux operating systems you will find out that the green color is used for the root user depending on the Linux kernels all right so hope this is clear for uh uh this lesson that using the H command H button here we can find out everything that what you are needed to do and what you are uh supposed to get results from the atop command and uh if you are managing the processes on the Linux systems so this is a extended way that you can use too see you in the next lessons thank you we have used several command line tools and the uh applications inside The Interpreter of the terminal or the shell uh in also the previous Lon of the uh best shell programming or the cell scripting uh that various commands can can be uh useful while using the B shell but for one line all of the commands Linux is full of command line tools and that is also by default installed meaning that once you master all of the commands inside the Linux operating system you will Master the best shell programming that is the based part that tells you and gives you everything to work around the Cal Linux and even the Linux operating system because the architectures are the same in many cases so in the same lesson that we are going to use uh uh some of the commands that are also useful like the head and tail that uh Stripes some of the informations from a file and uh also the word count command that is the WC so let's start from the head and tail so uh before going to that we can uh move to another uh directory so if I'm going to uh all payloads so CD all payloads and moving to uh the xss payloads or fuzzing xss uh. txt so I'm going to uh find the uh all of the contains of the fing xs. txt file so uh as soon as you find any file name that having no any uh uh name that is type like the uh there is the spaces between the fing and acces we can see here the space one space is left so once you type that using the uh fuzzing access.txt it will not be opened because that might be uh the Linux considered the separate two commands that is the first cat and the second is fuzing and you try to find the files and directories so in that case what we can do is we need to uh double quote that all of the uh just strings or the file names and then hit enter then it will be showing up everything so this is the file content of uh fing xs. txt now uh if I'm going to use the head and tail command so coming to the first one that is the first head so as the name suggest head command is the striping information from a file within the file contents and by default it fetches the information of 10 lines we can just put the syntax to even get the uh fewer lines and depending on the uh file contains you you want to face from that file so using the head we'll get only the first lines of that file and using the tail command as the name suggest it face the information from the last of the file so the same will be there I'm going to uh stripe this uh H and changing the command to tail this is the last file name and here is the file content that is the last one and using the cat command we can see that too so here is the last line all right now coming to the Head we can customize that too using the head with the number of lines that is the syntax and just provide the uh number of lines like the uh four and same file name that we are going to use just hit enter and the uh just declared like the number four four lines will be available using that same case is there with the tail command to it will stripe the last four or the defined by youth or the user depending on the number that you define here so if I'm going to define the number of or 10 it will be 10 but by default it just get the information lines te you can also get it to uh more lines and and it will be available so that's all for the head and tail this is as simple as that and at last we can get the main page of the head and tail so this is for the tail and quit this is for the head and all the informations and the syntax and the use cases are there that you can use in uh different situations and as per the requirement so that's all for the head and tail now uh let's jump to the home directory there and let's CLS uh we can see uh there are files like the AG Dosh demo Dosh and we can just GP that all of the informations from uh the file contents meaning that you want to search within the files so the command is the grape and that can also be used with the other commands as well so going to cat command and age Dosh will reveal all of the file contains but what if I'm going to uh find only the lines where the gender matches or the uh read matches or anything any string you want to match for and find that information from uh within that so with the same uh command line like let me clear it for the same command we can use the uh pipe symbol here and use the grip function that will uh grip the particular file name or the strings you provide so if I'm using the gender and here we can see this is all of the lines where the gender are there and it is highlighted automatically so the Syntax for the grape command is to highlight the colors automatically we can also use the uh colors like the in this way color is equal to uh neighor and there will be no colors available but this is not the best way this is uh by default to colorize the output string that you have searched for within the file to match that and just highlight that string so the grap function is uh based and it is used widely by the professionals having the Linux operating system or the C Linux even because some of the times you are going to edit a script or the uh batch file script or the shell script that we have already seen previously to uh make that tool according to your work or how you want to function that tool accordingly and according to the user requirement that is also the subjective part so in that case you are going to modify some of the scripts so finding the that script finding a particular line from the file or the script is better once you're going to GP because in most of the cases you can also grab the uh lines from the uh nmap uh scanning results that we will see later while we will be testing for the security and stress testing uh in different situations like the way applications penetration testing and local security assessments so any files can be uh uh just put it out using the cat command or any other command and use the pipe symbol to provide the same uh in in same line with the grape command to Grape the uh desired uh strings that you want to find from within the file so now let's have a look on the word count command that is the WC that counts the words from within the file so here is the uh Syntax for that let me open up the man page first as usual and here we can see print new line word and bite counts for each file we can use all of the syntax that it provides us like the uh switches C for bytes M for characters L for lines and similarly so quit it and uh coming to the uh directory where uh or we can use the a.sh so the word count for the uh this way we can see the lines AG Dosh we can see there are 24 lines and we can also by default the word count command finds more informations than the usual so these are the lines word counts and the bite counts so that's the bite counts and we can also use all of the switches along with uh other switches that will be uh this way okay so this will count the wordss only there are only 83 wordss we can also use the WC to bite counts and here it is oops there is an error that is the C character that can be used here for the bite counts and here we can see uh there is a 4 s six of the bytes we can also use uh other options like the character counts that will be so the characters and the bites are same as simple as that we can also use the word count with the w switch uh using this way and here we can see this is the edit three of the wordss so that's the uh best way to find out if there is the new lines available like if you want to find the lines of the uh files or the uh that you have created for yourself like the scripts Sal scripts or any programs that you want to search for what are the new lines and what are the number of lines with the characters count and and uh all of the details related to the word count we can find out here now using the CLS clear it there is one more command that is the history that takes all of the input by the user on the terminal and it stores in this session so history command will collect all of the data all of the history that you have typed over the terminal so in order to uh if you forget sometimes that what the command was actually that you used earlier you can use the uh history command to get the details of the commands that you have typed previously in the next couple of lessons we will see how we can use the uh Boolean Expressions within the terminal here to uh run multiple commands in one line using the matching either by or and the and operators see you in the next sense Linux operating system is a full of command line and the terminal tools available that is already available inside the color Linux but still Linux is the operating system that have the uh complete full of the Comm line tools and the commands as well that makes you walking ease of use with every tools every Services every Damas almost all of the services inside the operating system can be done and achieved using the command line tools all right so in this lesson we are going to talk about the aliases that will be uh solving our most of the issues using the command line options and the commands that we can't remember and hence we are going to use the shortcuts for a long commands using the alas so what are the alas let's use use and see this first using the ls command we can see these are the ls's once we type LS the ls is used once we Type L then the ls and CF option and the syntax is used basically alas is can be used to customize the command line tools like the you know that the clearing the screen is used for the clear and and then the screen is cleared now whatever you don't want to type such a long like the five character clear in order to clear the terminal you can use any custom words custom letters according to you so let's first start it typing alas is Alas and I want to use the CLS as we type in the Windows operating system so the CLS is equal to clear now we are instructing the terminal and The Bash shell to use the letter CLS as a clear so the command basically will be running is the clear but the word or the letter that we will type is the CLS hit the enter now use the ls to see if it is inserted is not we can now see the first line that says clear meaning that it has been inserted as the CLS word now let's type CLS and that's all now it's working so using the ls command using once again the CLS it is working we can also type the clear command as usual and there will be no any effect or any conflict between both of the commands all right so now I start let's start with the LS and as we can see the IP grape and the diff have already been inserted inside this but these are the S dependent once you close this terminal all of the inserted alas from the here command options command line tools on this terminal all of the aliases will be vanished meaning that there will be no meaning that this is session dependent and once the session is closed vanished it will also be vanished like let me show you so the CLS was the options so I'm going to use the alas CLS equals to klear and the alas have been added at the first line we can see and the command will also work like the CLS it is also working but what happens when I close this terminal and reopen it every aliases that I inserted here will be W as you can see the first line there is no CLS there is no CLS there is one another options that we can do too but before going to process to make a persistent alas throughout the sessions and anywhere you can use that using the bash RC that is the session persistent aliases that will remain throughout your all of the system even if you close the system turn off this and turn off the and close this terminal as well so let's see that how it can be done so the aliases that we can do is now uh let me use the LA command that will also show up the hidden files and directories so the best history uh best RC this this file actually consists of everything that will persist the sessions and the commands alas that will we will put onto that and it will be persistent throughout this operating system and through all of the systems it will not be S dependent so let's open it first we using the cat dop and here we can see uh this is the all of the definitions for the aliases and the some sort of scripting as well that will persist the session as you can see here alas are already inserted from the first line and here it is coming to the first line we can see throughout the best RC that if not running interactively do not do nothing and coming to the last line that is the best for our set that what we are going to do in this lesson is that you may want to put all your additions into a separate file like bass. alas instead of adding them directly here so we are not going to directly add onto this file add this is a scripted cell scripting it is not going to work properly if it is not configured because there are another two set of files that is also depended on the session persistent for the aliases to be working throughout all of the sessions so here we can see this is the condition that is the if b. Alis then this will track from that file and if we are using L command we are not having any files like the b. alas is so we need to create that if it is not created we need to create that so let's start creating and uh going to use the uh touch command here so touch command will be that bash it will create file we can also use another methods as well but this is the easiest way touch bash Al Asis and that's so we can now see here is the file that has been created but now this is empty we can use the mouse pad to open it up and here it is we can see this is empty and this is in the home directory with the Cali user and the balasis now we can put anything throughout the here and it will be persistent throughout the sessions as much as you close the terminal it will still be there so let me put that first Alas and uh now this time I'm going to use some set of another ping command like the Ping so I'm not going to put the Ping first so starting from we can use any later any shortcut commands that you can memorize it forever so I I'm using the Ping command for the Google so the Ping Google and uh uh using the PG command I want to just type the PG and not so uh long commands to Ping as the Ping Commander doesn't have a long command in general but still if you want to use so many syntax using the Ping command it is going to work so I'm going to use the uh uh PG for the Ping command sud sudo ping google.com and just quote it and now just save it just close it all right so let me see that first we can now see the cat command that is the content has been inserted into that balasis now let me clear it first using the CLS command all right so this is not actually persistent so I'm going to clear it now let use the L es and I don't think there will be because this has not been updated because once you start the terminal or the shell uh then it is going to update it so close it open it and once you type alas then there will be somewhere so we can see this is the Ping PG and it will be doing ping so I'm going to use the Ping command all right so there is something missing so the PG is the command PG and now this is pinging directly using the shortcut alas is created we can create a lot more options long commands even the half page or full page of a notepad command using a single short later or one or two Ls let me cancel this first clear it and once again now we can see the alas all right so now let's start for the in map for the real world examples that how it can be used in the real world examples this is also simple and uh uh efficient while you are going to work on so I'm going to use the Alas and this time I'm not going to make it persistent because this is the way that we can make persistent as we have already seen so I'm going to use it for temporary so Alas and the nmap command that I'm going to use so scan or the I'm going to use the TCP scan for the N map so TCP TCP for the Google so whatever I will type tcpg then it will be a scanning but still if I'm going to use the GT that is the Google and the TCP scan so what I will use sudo first because this is asking for the root privileges for the nmap tool running and Sudo is here nmap now the every command that we can use to so the DCP connect scan is there Target is google.com just close it and hit enter using alas command we can now see here it is GD equals to sudo and map and the all of the commands that I inserted so from now what what we can do is GT and no other commands let me clear the screen first you know to make it more viewable so using the GT command I can scan the google.com using the nmare tool and every syntax that I want to use for that particular tool to be working and just giving us output for the res results and that's all this is for the aliases this is the simple as that you need to have the commands that what you want to so for in a real world scenario what we can do is how we can access it how we we can make it useful suppose you are going for a penetration tasting engagement on the client side you can prepare it yourself for the uh aliases for all of the commands that you are going to use that we will also see in the next couple of lessons and the modules so suppose for the N map I want to use many advanced and the complex switch is for the N map to scan what I will put is use the aliases best aliases file here and put every command that I want to use and use a short letterer s commands for that we can only use the IP addresses put the IP addresses there if it is not in hurry and then just use the short simple commands to scan a large and run the large number of commands at once in single line in single word as well in single letter as well so that's the benefit of using the aliases for a long commands hope that is clear for it creating aliases that is temporary to and the permanent as well so using the alas command directly on the terminal it will be temporary once you close it it will not be there so as we inserted the GT command there is nothing it is now not available but this is still available because this is the persistent one using the bass. aliases bcore alas file that we have created so this way it is better to understand and better to make a large command to work in a shorter time and the Lesser time to save a time and also many tool are also there that consumes a lot more time that you can also use it to minimize the time work more and get a good results so that's all for the alas create alas understand it clearly and you can also customize your own commands that we will also see in the next couple of lessons see you in a thank you in this lesson we are going to have a look on the two command line based web browser that actually uh web downloader we can say that in other language so the first one is the W gate and the second one is C URL that also abbreviated as the curl so basically now I will say the curl and the W gate so the first command is the uh uh downloader that is the web gate uh W gate and the second one is the uh C URL that downloads the file from the command line or The Terminal from the target web servers and both have the some supported protocols and uh in both of them the C URL that is the curl is the bestas one because that have the some programming uh functionalities as well uh that supports the lipy URL library and it extends the features and gives the user a Hands-On approach that a user can uh extend the capabilities to use the C URL so coming to the first C URL that is the curl curl is widely used all over the world even in the some uh uh some car or the some uh printers and in many cases you can see there it is used in order to update and get the files download the files from the web server silently in the background as this is the command line tool it will not give you the graphical user interface so as usual let's have a look on the main page of the curl command so as part the uh description we can see the transfer a URL or simply download a web page we can see a lot more protocols have been supported by the curl tool and this is the reason why it is widely used some people also use use the curl tool to use send the email and receive the email download the files download everything and the best part of the Cur tool is you can integrate within the B shell or the shell scripting and that will also be performing its task inside the background of that task you are want going to create so that is the best thing over the Cur now let's see the W gate W gate is the simple one and have the fewer and The Limited protocol supports as the HTTP and the https and the last one the FTP but also supports the HTTP Proxes as well so in order to work around the C Linux the motive behind using the tool is simple so in most of the cases you are going to use uh URL or download that file using the W gate and Cur command so let's first go with the uh W gate so going to K Linux site here and going to download net Hunter as this is the smaller files so that is the reason I'm going to download that using the W gate so going to download G Nate Hunter and now coming to bottom we will see a lot more images as there so the uh Nokia so the Nokia 6.1 that I'm going to download so it is the 461 a megabyte I'm going to copy its link location moving back to and now just paste it here all right so he this way it will be downloading all of the things with the uh file size and the progress of the downloading and here we can see the percentage of the downloading and the speed at which it is downloading it so I'm going to cancel this first and here it will be available once you download it all right so now coming to the C URL that is a curl command in this way we can use the output as well hack and the same so always is us for the output and this is the file name and this is showing everything from the current time current spe to time time is paint and time left so that's all for these two browsers in most of the cases you are going to use that but curl tool is not limited to using the web browser you can integrate using the other tools other uh other kind of applications as well because mostly it is used all over the world to uh gate the updates and deliver the updates as well to the uh recipient at the uh back end side side or the in inside the background you can see for any applications like say for example uh inside a car it can be used to update the form using the call command call tool all right so there is something error with that and here we can see the hack is there that I uh named the output here but in that case it is failed so that's going to I'm remove that all right so now let's have a look on the uh normal use cases so WG and the google.com and all of the informations will be received index.html this is the file name that is by default saved and using the Lis command we can see index.html using the cat command we can also see index.html so this actually feates all of the informations from the google.com and all all of the HTML contents are there using the Cur command similarly it can be also be used and we can also provide the output so hacker. HTML and the w.com using the ls we can see there is a file that is the hacker. HTML using the cat command we can see uh the file content that is the 301 moved this actually the file has been moved and the uh site has been redirected as well something like that so using the WG command we can get all of the heads as well so using get and in any way you can also provide the switches all of the syntax as well to get all of the details from the tarer site so that's all for this one so uh using the Cur tool we can also get the headers only headers or with the headers using the same way so the curl and the head we can also use the i options in the capital letter head and the google.com and here we can see this is the content locations content type here and the all of these are the headers similarly we can get the details of other sites as well and this way let's see if there is something all right we can see there is a server that is the engx and all of the uh information like the content type and whatever informations are available uh from the uh uh server side then it is found there and it is available so that's the easy way to find the headers and uh quick informations from the target side using the curl command and that is not limited only to that you can do a lot more things using that uh specifications and all of the heal files because this tool is a vast tool and the curl tool is supported by the uh lipy URL that is the best way to reprogram it it go into yourself and uh even using that tool you can send and receive uh the informations modify the headers if you were sending to Target URL in that case you can also modify the headers and send your custom headers as well so that's the best part of this one uh one recommendation for the curl tool is to explore it as much as possible because this can be useful in many cases many situations you want to use as a penetration taster as a security uh analyst as a ethical hacker you are going to use to download the uh contents from the internet using the curl command and using the W gate command but the functionalities are not limited for the curl see you in the next lessons thank you welcome to this lesson this is the bash shell scripting or the cell scripting lesson in which we are going to have a look on Sal scripting and the programming on the terminal side this lesson is so much crucial for uh the beginner for the Linux user or the uh cinux user where you are going to use uh commands in a series and automate all of the processes so let's first understand what is the bash shell or the shell scripting both are the same shell and Bash are the interpretor here that is the terminal and it locates to the bin bash in the directory we will see that while we will be programming for that all right so the first understand the bash scripting or the shell scripting Bas scripts is a plain text file that contains series of commands as they had been typed of a terminal and there are the optionals extension that is the sh that we provide to each file having the Sal scripting or the series of command in order to let Linux operating system identify that this is the cell or the cell scripting file so let's start beginning for creating a cell script as we have already have some of the commands that we have used previously so I'm going to create a file uh let's check for uh some of the files if they are available or not all right so this one as you can see this is the shell scripting file that I have created for myself before this lesson in order to demonstrate because sometimes uh scripting file requires you to pay more attention in order to correct some of the errors and this also requires uh lot more time apart from all of the demonstrations so going to clear this first and I'm going to clear a file here using the touch command with the name uh demo Dosh file has been created we can already see now let me open it up or we can also use the uh Nano that is the command line text editor here Nano and the demo Dosh and as this file has been created this is vacant there is nothing inside that file now we can use all of the arrow keys on the keyboard to move up and down and left and right to type and move throughout the words and the strings so uh this is the Nano text editor uh command line text editor so let me quit this you know to demonstrate more clearer so that you will be getting understand so much easier easily so I'm going to uh quit this using the control o that is the write out hit enter control X that means exit all right so now let me open that file using the mouse pad that will be easier to understand for yourself demo and S that is the script file all right so here it is the mouse pad that has been opened so every B scripting file you will create will start start with the hash and this Mark that says this is the uh actually this is also called the C Bank this is named and now we need to provide the path of the uh absolute path of The Interpreter to run that all of the scripts inside this file so that will be absolute path uh Bin bash or only bin s both can be written there is nothing more important there we use has at the starting of any letters and the words to denote and uh tell interpreted that this is the comment line we can use type anything uh after the hash and that will not be uh used and that will not be considered by The Interpreter so in this case I can type it like the comment line uh this is the uh demo tool or a script so that will not be used as a interpretor or any commands so now coming to the commands that I will be using for uh these demonstrations so say for example as we are going to use the Kor Linux I'm going to take that examples in this script to so I'm going to use the echo here that will be printing over the screen whatever you type all of the strings will be reflected back on the terminal so the Echo and I'm going to use type here uh that which tool you want to use and with the question mark and we can also use the yes and no options like the yes and no and it will be asking you with the prompt that either you type y or n so that will be Y and N now coming to the next line we will use the command that is the read and it will read the answer so in this case answer will now be the variable that will take input from the user so read is the answer here and it will read for that and after reading that answer what we are supposed to do and what this script will be running after that it depends on the users and the subjective part whatever the tool you want to run at this time but for the demonstrations I'm going to use uh something another like the N map and the Ping options too so we can also Define here like the Ping or other options like uh this way uh ping or n map and we will also take the input from there so Echo will be that what we will be printing out all right here we go and this will be the answer that it will be Echo back to the screen now we will use the if and else statement that will evaluate that if the first string is equal to or correct as the answer provided by the user so I'm going to use the if statement here with the enclosed brackets and now dollar sign will be used for the variables that will be uh uh input by the user so in this case the input is answer so answer will be the uh input by the user so answer is here so if answer is equal to n map all right so spaces are actually there you need to provide the spaces otherwise there will be syntax eror so keep in mind at the last of this lesson we will also see the references that will also clear your uh doubts that where it can be used and where not all right so if the uh condition has been created if answer is equal equ Al to n map then command will be sudo n map C scan for google.com and all right now we will use the else command that will be else otherwise if answer is not equal to n map then it will use other commands so the ALS statement will do like the Echo and command not found something we can type any string here of any choice of the words you can type here that is the subjective part and once the if statement is closed we need to Define and see The Interpreter that it is now closed that is the FI that is something like the end of line or something end of uh the if statement so the straightforward it is the end of if a statement so uh at this place if a statement is starts and here it is ended all right so now uh what it will do this is the simple script if the answer will be end map this will do run the end map otherwise if there will be anything else then the command not found we can extend that all of the scripts features and add some more four lines too but first let's save it and then make it executable as a sell script so as of now you can see this is the uh note in green color meaning that this doesn't have the executable permissions as well so for that we need to type the uh CH mode change the modifications and uh use the executable synex that is the plus X and the demo Dosh now hit enter and and now using the ls we can see this is in the green color all right now we can use the uh Dot and the directory uh forward slash that says this is in the current directory and use the demo Dosh to run that tool so hitting the enter will ask you to which tool you want to use ping or end map so if I'm typing the uh n map as you can see this is started scanning the predefined syntax of the N map and the scena scan of the google.com and this will also uh reveals all of the results the scanning results that will be found now we can see the results are there now in the second case if there will be no match of the N map I'm using the Ping then what will happen so the second message that is the l l statement that says all right here we go and the command not found so the second command this is the the command not found is the LZ statement now let's open this using the mouse pad once again so the mouse pad demo. SH now let's modify it so in case uh what we can modify here to run either of the tool so uh the Els statement will be running like the uh command that we can use here for the Ping command lse the uh ping command let me type this Pudo otherwise it may ask you to enter or having this permission denied options so ping google.com and we can also put the interval of the 3 seconds save it and we can also add one line here currently scanning for currently pinging google.com just enclose it and save it now let's run it once again all right so uh I'm not going to type the N map so that it will uh start using the scanning for the google.com and I'm going to use some other words like the Ping as you can see this is pinging back as this can also be customized to uh be a specific on the words or the strings ping or n map we can also do that using the uh uh scripts there but there are the two options in map and the Ping so the statement that I used is the sybol let me open it up first uh if the answer is and map then run the tool and run this command to scan the google.com otherwise if there is no end map then the any string you type will be pinging this one let me show you once again so I'm not going to use the Ping I'm going to use the hack and it is still pinging because there is no word specific let's close it and now coming to the other uh options like that I have already created the age calculations so AG Dosh so open it using the mouse pad and here it is uh this is the simple script that actually asks the user what do you want to uh have the and evaluate if it is true or not so as we can see there are two uh factors that depends on the evaluation that is the first one uh age that must be um greater than 18 years and the uh gender must be male and here we can see uh there are something uh opposite of the uh statement that we can evaluate but this is also understandable uh this is not easily understandable but you need to think twice before uh running this script because this is the gender is if the gender is male then you are not eligible for this college meaning that the gender must be female or we can also use the female that means the male is the must for join this college so this is the Mal's College you can't do registrations once you are uh going to put the and input the female option let's try it uh executing the script and then we will see once again this script so the script is age Dosh so it is asking for the what's your age so I'm uh going to put the uh 20 years because I'm going to evaluate the uh female and male hitting enter what's your gender so uh putting the uh maale profession is we can also type anything here because only two parameters are evaluating for the uh if a statement and else a statement this can also be anything else so your inputs are as follows 20 mail hack and 12 so mail is the option for this entry you are eligible for the call as entry put the correct data once again if entered wrong so this is the optional things and opening up that file once again we can see this is the echo option that simply prints out the options this is the uh comment line we can put as much as we want to uh enter the information there and that will be uh available inside the script that will be uh nothing showing up there so in order to show that we can use something like this one this is just to modify this uh uh script so I'm going to use the echo uh call is entry program evaluation just use the brackets here and this way now save this once we uh execute it will be the same so this is the new line that I added so this is actually the echo program that we uh can use on the scripting our the uh shell scripting and even over the terminal all right so now uh let's have the uh age requirements if this is asking for the uh 12 years or not if this is less than 18 years so I'm going to use the 17 years I'm going to use the female I'm going to use any profession and we you can see this is you are not eligible for this call we can also Define and throw some of the error and some messages to the user who is filling this form uh that the what are the requirements and what are the evaluation purposes and the uh metrics so that's way for the uh B shell scripting that you can learn to now coming to the next part that is the basics one you need to understand if you are new for the the best shell is cutting because many times you are going to deal with the if else statement and uh for the informations just keep in mind that the shell scripting is the only series of commands running inside a notepad that evaluates using the interpretor we can also use a large list of commands all of the command can be there like the tools and Maps we will see that in last lessons if some of the applications can be generated and uh find the reports as well so that's the way to uh get the best seller scripting learning now coming to the gnu.org and here we can see uh that this is the documentation for the B sale that is the base one and going to the uh HTML version we can now see uh and learn everything from the uh original gnu.org and like going to add operators basic cell functions so everything that you learn from here will be uh useful in the real world scenarios you can create your own tool using the all set of commands that is available inside the Linux operating system even using the C Linux and uh obviously many people used and uh created a tool for the there and you will also find that inside the K Linux so this is the uh URL gnu.org software bash manual bash. HTML you can find that and learn it properly as this is the V topic and also the crucial at the same time so learning this will hopefully make you uh just mastering the cell and the command terminals of the uh Linux operating systems but for the K Linux if you are not going to uh go for uh the uh B shell scripting in detail for the C Linux all of the lessons that have been added in this course are sufficient for that but this is the recommendation to learn the best shallow scripting and this is really so much powerful all right so uh next see you in the upcoming lessons just try it using the uh some sort of commands that we have already uh previously covered and try using some of the uh creating some of the large like the uh 20 to 30 lines of applications or the any programs that you you just want to have for yourself to create for yourself customize it and see you in the next lessons welcome to this lesson as of now we have covered already some of the based Comm commands and the Bal scripting now it's time to have a look on the Boolean Expressions operator like the and and the or so the expressions are for the and is this one uh that is the ENT double ENT and for or this is the double pipe symbol that can be used to uh tast the conditions where each of them can be used to taste a conditions that match and find the results so let's start at first uh with the and operators that is the bullan operator so before going to start let's have a example of Echo and uh to find out the username of this machine that is currently running and using the scripts in this case me so let's use that so the echo uh user is this one like the uh we use that with the uh fixed parameters that is the user and let's enter uh it says this is the user is cell and uh now let me find out the uh options in which we are going to find out the uh username from the ETC passwd file that contains the user name there so uh before going to start let's see the ATC pass first that contains every details about user and the Machine with the all of the accounts so the path is there Etc pass WD and here we can see all of the details all of the accounts are there and here we can also see the root user is there Ki is also there so here it is the Ki as we can see Let Me Clear it first all right so now I'm going to uh grip the username that is the kalii from the ETC passwd and in this way and as you can see this is uh going to find out and highlighting the Kali that is the username here but before uh going to start with the username we are going to test the and operators and the or operators that is the Boolean Expressions so start with that I'm going to use the and operator and I'm going to also use the uh so simply I'm going to use the echo echo back the uh user found so what will happen in this case the end operator test the conditions from the first and second part of from this operator so this is the operator where that there are two parts the first part this one and the second part is EO user not found so what happens in this case how uh and operator actually works and how the test conditions can be used there so it will grap and find the Ki username from the ETC passwd and if that command this command from here to here succeeded then the next command will be executed otherwise not so you know to test the conditions First Command is the must to be executed and to be succeeded for a simple demonstrations First Command is the must to run and execute the second command that is the equo user font so what will happen in this case if the user call is found inside the ETC passw file then the next command EO user found will be Printing and executing so as we can see uh the First Command has been found using the grave and it has been highlighted too and uh the second command that is the echo user found is also executed but what happens if I make something mistake here in the first command so I'm going to use the other name like the mic in this case this is the fake name that is not available inside this C Linux box so what will happen in this case let's see that as we can see the first command is failed and it is unable to Grape and find the mic username or the user or the string in simple word the second command is also not executed this is the difference and the tast conditions with the and operator that is this one add double %c so in this case we can also use uh inside the B sell if the first command is succeeded then the second command will be used and this is used widely inside the B scripting now let's see with the other command that is the or Operator Let Me Clear this first all right so here are the and operator now I'm going to use the or operator in this case the First Command must be failed in order to execute the second command so if the First Command has been failed from here to here meaning that the second command will be executed let's see that we can see the First Command has been failed and it is found to be true for this or operator to be succeeded and the second command has been executed now let's try with the uh real username what happens in this case so the K and in the second case the first command is not failed then the first command is only printed second command is not printed there and it is not executed bottom line of the or operator and The Logical operator is that either of the commands must be executed in order to succeed the commands so either the first part or the second part or the either First Command or the second command will be executed if the first command is executed then it will results and succeed it and if the first command is failed then it will move to the next command in order to execute that so that's the benefit of using the m perent and the uh Boolean Expressions we can say that uh and and or operator so hopefully it is clear the and operator must be uh the both commands that includes to be executed and that is all supposed to be executed before uh the second command and hence the second command will be executed but if the First Command fails the second command will not be executed there are other expressions and the statements as well that makes this false but in the general purpose the ENT the end operator supposed to get the First Command succeeded then the next command will be succeeded otherwise not in the next example the or operator here we can see the First Command must be failed in order to run the second command in this way so this is the first command that is the failed with the username mic that is not available inside this box the second command executed in simple words this or operator requires either of the commands to be executed and for the end operator the both of the commands must be executed in order to succeed that logical operant and expressions let's have example on the script that we have created already so so the Nano text editor and the name was AG Dosh here we can see the text editor that is the Nano and uh here I have created only all operators in this line that is the if statement this is the or operator here as it is clearly mentioned here and uh there are the conditions it it tastes for the conditions if age is less than 18 meaning that the it will deny and the second command is if gender is equal to female then it is also denied and the echo command that will be you are not eligible for this colge will be executed and uh in this line what is there is the or operator that says either the first conditions or the second conditions must return to true and both of them are tested here in order to execute the next commands so as soon as you are going to use the uh Boolean expressions and or operators you are going to have this and get it more deeply and understand it easily so just try out using the and operator and the or operator and try to create an script here that according to that you will be also getting the some points that are deeper and how it can be used so try using with the many commands and see the results we have already used several tools and the command line tools uh that is native of the C Linux or the simple say the Linux operating system so in many cases we have uh used several command line tools that are so useful and getting finding informations locating files and directories and collecting data from the inside the system is too much easier using that command line tools now we are one step back back from the is starting the real one penetration tasting from the information gathering scanning and exploitations and so on so this is the uh last lesson in which we will be going to use the native tool that is the GP command that is so much useful when once we are going to use the uh nmap information gathering tool and the scanning tool or any uh output report of any tools that we are going to use in the next module next couple of lessons grap command will be so much useful in order to collect the details from a large report files so let's start I have already used uh file that is the end map here we can see this is the output file of the nmap scanning we will also see the end map how it actually performs a scanning and finds the useful informations from the target so let's see what is inside that nmap file so here it is the scanned report of the Local Host IP addresses in this case you can see this is 127.0.0.1 and this is the entire ranges of the IP addresses of Local Host so what I used is using the same command that is the n map and the simple scanning with the DCP connector scan and the IP address range that I provided with the cidr is in this way and the 24 that is the cidr range so in that way this actually scanned all of the ranges that falls in this IP address class we will see and talk about that later in upcoming lessons so no need to worry about the how it exactly works and how we can understand the IP addresses all right so uh this is the output file that is the uh of the a map command tool that I have used already so as you can see uh once I use the cat and the nmf there are several uh informations that is the nmf scan report for IP addresses host is up all thousand scan ports are closed and so on a lot more bunch of informations are there but in many cases you only want to have the IP addresses list so in this lesson we are going to collect only the IP addresses and fet the IP addresses from a particular report or any files so let's see how it actually works this is the helpful task once you're going to scan for a large number of IP addresses in an organization and then you are going to work on that IP addresses so in this way sorting out the IP addresses collected from the scan results is the really hectic task that you will not want it to be so the motive behind using the grape function in the command tools is to just narrow down the results and sort out every results in an easy way so let's start now so the command that I'm going to use is the cat with the file that I going to pass only the IP address from the file so the nmap is the file where the all of the IP addresses will be sorted out now I'm going to use the command that is the gra function that highlights all of the part that I'm going to and searching for so in this case I'm going to uh search for the uh port number and uh let's see how they actually uh the output are there so as we can see uh all of the findings are there with the highlighted word that I have used for the gra function to phase 4 but still there are the IP addresses and other wordss like the old thousand scan M scan and something like the garbages are there I just only need the IP addresses all of these IP addresses only so now what I will do is I will use the other functions like the cut command and I'm going to use the field alimor so let's first use that then we will talk about the water these syntax and the switches so in this case the field alimer that I'm going to use is the IP address that is the six part so we need to count from the first all this is the 1 2 3 3 4 5 and six so the sixth part of this all line is the IP address so we are going to define the FI delimeter in this case now let's hit enter all right so in Unix like operating systems or the Linux operating systems the tab completion is not actually defined and it is not actually getting the tab so even if you are going to hit the tab button there is nothing to do with that all right so we need to Define that the boundaries or the limit line are with the spaces so as you can see there are the spaces between all of these words and numbers so we need to Define that with the delimeter that there are the spaces so only spaces are denoted with the double quote with one space now hitting enter we are have all of the IP addresses passed from that file now let's talk about the field elemer that is the F6 here so this is the sixth part if I'm going to cut only the first part I will use the one and here we can see this is the all one if you're going to use the uh second part here we can see this is the second part and something like this there uh it is Port scans so something is not okay with that all right so this is not only the port this is the ports so we are missing only the S that's why the results are completely different so we need to change that all right so now talking about the grave function and the why I have used the ports here as we can see we can also used any word from here like the if I'm going to use the all and the results are similar to that we need to use the F6 that is the IP address on the sixth place and the delimeter we need to Define with the space and that's all we are with the results of only the IP addresses so in this way by using the gra functions combining with the cat and the cut commands with the SE several switches with the FI Dieter and the delimeter that is the spaces that denotes only the space here we can have the good results and as you can see this is the IP addresses only the IP addresses that I am interested in so this way you will be uh finding it useful once you are going to work with the large number of IP addresses scan results or the outputs of any of the files so this is the simple example of the finding and sorting out the the IP addresses only because most of the time you are going to have it and sorting the IP addresses sorting some of the data from the output or the scan results so that's all for this lesson there are several other commands too with the cut like in this case if I'm going to see the man page for the cut here we can see there are other switches too but most of the time you are going to use are the field damer and the delimeter here you can also use the bytes characters delimeter here that we have already used and the field diameter that we have used complement is also there and the only damed is there see you in the next lessons that we'll start with the scanning information gathering and attacking the target systems just try it out using the fail elemer and finding all of the information sorting it out all of the informations just practice it thank you
Info
Channel: LearnLadder
Views: 2,892
Rating: undefined out of 5
Keywords: hak5, hacker, ethical hacker, master hacker tools, Expert Guide, Power Management, Master Hacking, Linux User, Colinux, Bash Shell, Text File, Virtual Box, Shell Scripting, Penetration Testing, Virtualization, Mobile Devices, File System, System Settings, Terminal Commands, Kali Linux, Security, Virtual Machine, Command Line Tools, Interpreter Terminal, Linux Tool
Id: lXZ9LcRX0Ik
Channel Id: undefined
Length: 242min 42sec (14562 seconds)
Published: Thu Dec 28 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.