Linux Basics for Hacking and Hackers Latest Technics 1

Almost most professional hackers use Linux. Although it can be infiltrated with Windows and Mac OS, most hacking tools are specifically designed for Linux.

Some hacking tools, like Cain and Abel, Havij, Zenmap, Metasploit for Windows, are either port-based or generated.

When Linux tools turn into Windows, they often lose some of their capabilities. In addition, there are features on Linux that are not readily available in Windows. That’s why in most cases hacker tools are only developed for Linux.

As a real hacker and expert, you need to learn about Linux and use Linux distributions based on penetration testing like kali.

Step 1: Boot Linux

Once you have booted kali, sign in as the root user.

Step 2: Open the terminal

To become proficient in Linux, you must be the terminal professor. An expert hacker needs to know how to use the terminal to run hacking tools. So click on the terminal icon in the left pane and open it.

ترمینال لینوکس

The Linux terminal is similar to the Windows command line and has a higher power. Unlike the Windows command line, in Linux you can manage everything from the terminal.

The important thing to keep in mind is that, unlike Windows, Linux is sensitive to case-sensitive letters. This means that in Linux the phrase “desktop” differs from “Desktop” and “DeskTop”. New Linux users often find this problem so try to remember this.

Step 3: Directory structure

Let’s start with some basic Linux basics. Many beginners are faced with the structure of Linux system files. Unlike Windows, Linux system files are not connected to a physical drive. So Linux does not have c: / drive, but all Linux system files start with “/” slashes.

The “/” slash character represents the root root directory or the highest level of system files. All directories (folders) are no longer under this directory. Just like the c: / windows folder and subfolder.

To visualize the tree structure of Linux files, look at the graph below.

It’s important to know this file structure, because we often need to move through files through the terminal without using a graphical tool like Windows Explorer.

The / bin directory is where the binaries are stored. These are programs that run Linux.
The / etc directory is basically where the configuration files are stored. In Linux, almost everything is stored with a text configuration file in / etc.
The directory / dev is where the filesystem’s storage location resembles Windows driver drivers.
The / var directory is usually where log files are stored among other files.
Step 4: Use pwd
When we open a terminal in Kali Linux, the default directory we are in is our “home” directory. As you can see above, this directory is located at the bottom of the root directory. We can understand the directory where we are, by typing the following command:

pwd

MarkupCopy

pwd stands for “current directory” and as you can see, returns “/ root” meaning that we are in the root user directory (/ root do not mistake the highest level of the directory “/” which is the root user directory) .

pwd is a used command. We can use this command whenever we want to figure out where the tree directory is.

Step 5: Use the cd command

We can change the directory we are using using the cd (change directory) command. For example, let’s move in the directory structure up. Type the following command:

cd ..

MarkupCopy

The cd command, which runs along the dot (…), says, “I move a surface into a tree-top structure.” Note that our command line has changed, and when we type pwd, we find that Linux responds to “/” or the root directory.

Step 6: Use the Whoami command

The command whoami will show the username that has been logged in. Because we are a root user, we can log in to any user account and that username is displayed here.

whoami

Here’s how to change the directory, list the directories, create files and directories, and finally get help.

Let’s open Kali Linux and start learning.

Step 1: Change the directory (cd)

We can change the directories several times with the cd command. As I showed in previous tutorials, we can use a cd command to move a level in the tree structure of directories up. We can also directly move cd / to the root directory, or use cd / to your account’s home directory.

Often we use cd to move to a directory using the full path of the directory. This means we will write the entire path of the directory that we want to move after the cd.

We can also move the direct directory using the relative path of the directory. This means that we do not need to write the entire path, but just use the path we are currently in and add to it.

Let’s look at some of the following examples.

For example, we are in the root user’s directory in Kali and we want to go to the wireshark directory. We can easily type:

cd / usr / share / wireshark

This command takes us directly to the wireshark directory.

Now let’s say we want to go to the directory of the directory of the wireshark directory subfolder. We can type the full path of that directory, but the easier way is to type the relative path from where we are. We know that we are on the path to / usr / share / wireshark. So type:

cd diameter

And this takes us to the directory of the diameter of the directory wireshark subdirectory, or / usr / share / wireshark / diameter.

Once again, it’s important to emphasize that Linux is case-sensitive, so be careful when typing the directory names into the “no such file or directory” error message.

Step 2: Listing (ls)

One of the most commonly used commands in Linux is the list or ls. This command is used to list the contents of a directory or subdirectories of the directory so that we can see its contents. This is very similar to the dir command in Windows.
So let’s use this command to list the wireshark directory.

ls

We see that Linux lists all the wireshark files and directories. Linux allows us to change our commands using switches.

Switches are usually letters after the “-” character. In the ls command, the two -a and -l switches are very functional.

The -a switch means all or all, so when we want to list all the files and directories, even those that are hidden, we use it.

When we use the -l switch, we give us a long list of information about security permissions, size, owner, file group or directory, its creation date, and so on.

Let’s type:

We will check the security permissions or security updates in the following sections, but you need to know that run execute executable (x) is required for each file you want to run. So, if you download a new tool, you need to make sure that you have the license to run it.

Step 3: Create a file (touch)

Creating a file on Linux is slightly different than Windows. In Linux, we use the touch command. So, let’s create a new file with 1file:

touch 1file
MarkupCopy

Now by listing the directory, we can see that there is a new file:

ls -la

Step 4: Create a directory (mkdir)

Like Windows, we can create a directory using the directory make (mkdir) command. Now create a new directory.

Now type ls and you can see that a new directory has been created.

Step 5: Getting help (man)

Linux has a very useful tool called man. Man means manual or manual for almost every command.

If you forget the syntax, simply type man then type the name of the command to display all the information you need about that command, switches, and so on. For example:

me touch

In many commands, you can see the special instructions for that command using the -h switch or the -help switch next.

To view the “touch” guide, use the touch command with the -help switch.

touch –help

 

Leave a Reply

Your email address will not be published. Required fields are marked *