Gus Khawaja - Kali Linux Penetration Testing Bible

Здесь есть возможность читать онлайн «Gus Khawaja - Kali Linux Penetration Testing Bible» — ознакомительный отрывок электронной книги совершенно бесплатно, а после прочтения отрывка купить полную версию. В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: unrecognised, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Kali Linux Penetration Testing Bible: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Kali Linux Penetration Testing Bible»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

A comprehensive how-to pentest book, using the popular Kali Linux tools  Kali is a popular Linux distribution used by security professionals and is becoming an important tool for daily use and for certifications. Penetration testers need to master Kali’s hundreds of tools for pentesting, digital forensics, and reverse engineering. 
 is a hands-on guide for getting the most from Kali Linux for pentesting. This book is for working cybersecurity professionals in offensive, hands-on roles, including red teamers, white hat hackers, and ethical hackers. Defensive specialists will also find this book valuable, as they need to be familiar with the tools used by attackers. 
This is the most comprehensive pentesting book on the market, covering every aspect of the art and science of penetration testing. It covers topics like building a modern Dockerized environment, the basics of bash language in Linux, finding vulnerabilities in different ways, identifying false positives, and practical penetration testing workflows. You’ll also learn to automate penetration testing with Python and dive into advanced subjects like buffer overflow, privilege escalation, and beyond. 
Gain a thorough understanding of the hundreds of penetration testing tools available in Kali Linux Master the entire range of techniques for ethical hacking, so you can be more effective in your job and gain coveted certifications Learn how penetration testing works in practice and fill the gaps in your knowledge to become a pentesting expert Discover the tools and techniques that hackers use, so you can boost your network’s defenses For established penetration testers, this book fills all the practical gaps, so you have one complete resource that will help you as your career progresses. For newcomers to the field, 
 is your best guide to how ethical hacking really works.

Kali Linux Penetration Testing Bible — читать онлайн ознакомительный отрывок

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Kali Linux Penetration Testing Bible», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Files and Folders Management in Kali Linux

Your next challenge in the Linux operating system is to learn how to manage files and folders. By the end of this section, you will start using the files and directories on Kali like the pros.

Displaying Files and Folders

To list the files and subfolders inside any directory, use the lscommand to get the job done (I use it a lot to get simpler output). But sometimes, the lscommand by itself is not enough, so you may need to add a couple of options to get better output clarity. The first option that you can use is the ‐acommand (all contents including hidden files), and the second option is the ‐lcommand (formatted list):

root@kali:~# ls Desktop Documents Downloads Music Pictures Public Templates Videos root@kali:~# ls -la total 144 drwx------ 14 root root 4096 Sep 22 10:24 . drwxr-xr-x 19 root root 36864 Jul 27 15:41 .. -rw------- 1 root root 155 Sep 22 10:23 .bash_history -rw-r--r-- 1 root root 570 Jul 18 17:08 .bashrc drwx------ 6 root root 4096 Sep 22 11:21 .cache drwxr-xr-x 8 root root 4096 Sep 22 10:22 .config drwxr-xr-x 2 root root 4096 Sep 22 10:21 Desktop -rw-r--r-- 1 root root 55 Sep 22 10:21 .dmrc drwxr-xr-x 2 root root 4096 Sep 22 10:21 Documents drwxr-xr-x 2 root root 4096 Sep 22 10:21 Downloads -rw-r--r-- 1 root root 11656 Jul 27 13:22 .face lrwxrwxrwx 1 root root 11 Jul 27 13:22 .face.icon -> /root/.face drwx------ 3 root root 4096 Sep 22 10:24 .gnupg -rw------- 1 root root 306 Sep 22 10:24 .ICEauthority drwxr-xr-x 3 root root 4096 Sep 22 10:21 .local drwxr-xr-x 2 root root 4096 Sep 22 10:21 Music drwxr-xr-x 2 root root 4096 Sep 22 10:21 Pictures -rw-r--r-- 1 root root 148 Jul 18 17:08 .profile drwxr-xr-x 2 root root 4096 Sep 22 10:21 Public drwxr-xr-x 2 root root 4096 Sep 22 10:21 Templates drwxr-xr-x 2 root root 4096 Sep 22 10:21 Videos -rw------- 1 root root 98 Sep 22 10:24 .Xauthority -rw------- 1 root root 5961 Sep 22 10:24 .xsession-errors -rw------- 1 root root 6590 Sep 22 10:23 .xsession-errors.old root@kali:~#

Take note that filenames that start with a dot character before their names mean that they are hidden (e.g., .bash_history). Also, at the far left before the permissions, the letter dmeans it's a directory and not a file. Finally, you can list another directory's contents differently than the current one by specifying the path of the destination folder:

$ls -la [destination directory path]

Permissions

For the permissions, the same principle applies to a file or a directory. To simplify it, the permissions are divided into three categories:

Read ( r ): 4

Write ( w ): 2

Execute ( x ): 1

The permissions template applies the following pattern:

[User:r/w/x] [group:r/w/x] [everyone:r/w/x] Figure 16 Kali Linux Files and Folders Commands Lets look at a practical - фото 8

Figure 1.6 Kali Linux – Files and Folders Commands

Let's look at a practical example. Lat's say you created a simple shell script that prints “test” (using the echocommand) and that you wanted display its permissions (take note that this example uses the root user inside the terminal window):

root@kali:~# echo 'echo test'> test.sh root@kali:~# ls -la | grep 'test.sh' -rw-r--r-- 1 root root 10 Sep 22 11:25 test.sh root@kali:~#

From the previous output results, we can see the following:

For the root user, you can read and write because of rw at the beginning.

For the root group, they can only read this file.

For everyone else on the system, they can only read as well.

Let's say you want to execute this file, since you're the one who created it and you're the master root. Do you think you'll be able to do it (according to the previous permissions for the root user)?

root@kali:~# ./test.sh bash: ./test.sh: Permission denied

TIP

The dot in the previous example means the current directory.

Indeed, the root has no permission to execute it, right? To change the permissions of the previous file based on the formula ( r=4, w=2, and x=1), use this:

User:4+2+1=7; Group:4+2+1=7; Everyone:4

Then, use the chmodcommand to get the job done (this time, you should be able to execute the shell script):

$chmod [permissions numbers] [file name] root@kali:~# chmod 774 test.sh root@kali:~# ls -la | grep 'test.sh' -rwxrwxr-- 1 root root 10 Sep 22 11:25 test.sh root@kali:~# ./test.sh test root@kali:~#

There is another shortcut for this, which allows the execution of a file instead of calculating the numbers of each. We just need to add +xto the chmodcommand (but be careful because when you execute this one, you will be giving the execution permission to everyone as well):

$chmod +x [file name] root@kali:~# chmod +x test.sh root@kali:~# ls -la | grep 'test.sh' -rwxrwxr-x 1 root root 10 Sep 22 11:25 test.sh

Manipulating Files in Kali

To simply create an empty file in Linux, you can use the touchcommand:

$touch [new file]

To insert text quickly into a file, you can use the echocommand. Later in this chapter, you will learn how to edit text files with a text editor:

$echo 'text to add'> [file name]

To know a file type in a Linux system, you must use the filecommand:

$file [file name]

Let's assemble all the commands together in the terminal window:

root@kali:~# touch test.txt root@kali:~# echo test> test.txt root@kali:~# file test.txt test.txt: ASCII text

To copy a file in Kali, you must use the cpcommand to get the job done:

$ cp [source file path] [destination file path] root@kali:~# cp test.txt /home/kali root@kali:~# ls /home/kali Desktop Downloads Music Public test.sh Videos Documents ls_file.txt Pictures Templates test.txt

To move a file that is equivalent to cut in Windows OS, you must use the mvcommand:

$mv [source file path] [destination file path] root@kali:~# mv test.txt Documents/ root@kali:~# ls Documents/ test.txt

To delete the file that we just copied earlier in the kalihome directory, use the rmcommand:

$rm [file path – that you want to delete] root@kali:~# rm /home/kali/test.txt

To rename the previous file, we use the same mvcommand that we used to move a file:

$mv [original file name] [new file name] root@kali:~/Documents# mv test.txt hello.txt root@kali:~/Documents# ls hello.txt

Searching for Files

There are multiple ways to search for files in Kali; the three common ones are the locate, find, and whichcommands.

You can use the locatecommand to locate a file that you're looking for quickly. You need to know that the locatecommand stores its data in a database, so when you search, you will find your results faster.

First, you will need to update the database for the locatecommand using the updatedbcommand:

$updatedb

Now, we can start searching using the locatecommand:

$locate [file name] root@kali:/# locate test.sh /home/kali/test.sh /usr/share/doc/socat/examples/readline-test.sh /usr/share/doc/socat/examples/test.sh

You can use the ‐nswitch for the locatecommand to filter out the number of output results. This option is handy if you know that the results will be enormous:

$locate -n [i] [search file criteria] root@kali:/# locate *.conf -n 3 /etc/adduser.conf /etc/ca-certificates.conf /etc/debconf.conf

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Kali Linux Penetration Testing Bible»

Представляем Вашему вниманию похожие книги на «Kali Linux Penetration Testing Bible» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Kali Linux Penetration Testing Bible»

Обсуждение, отзывы о книге «Kali Linux Penetration Testing Bible» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x