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», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

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

Интервал:

Закладка:

Сделать

while [[ condition ]] do do something done

The best way to explain a loop is through a counter from 1 to 10. We'll develop a program that displays a progress bar:

#!/bin/bash #Progress bar with a while loop #Counter COUNTER=1 #Bar BAR='##########' while [[ $COUNTER -lt 11 ]] do #Print the bar progress starting from the zero index echo -ne "\r${BAR:0:COUNTER}" #Sleep for 1 second sleep 1 #Increment counter COUNTER=$(( $COUNTER +1 )) done

Note that the condition ( [[ $COUNTER ‐lt 11]]) in the whileloop follows the same rules as the ifcondition. Since we want the counter to stop at 10, we will use the following mathematical formula: counter<11. Each time the counter is incremented, it will display the progress. To make this program more interesting, let it sleep for one second before going into the next number.

On the other hand, the forloop will take the following pattern:

for … in [List of items] do something done

We will take the same example as before but use it with a forloop. You will realize that the forloop is more flexible to implement than the whileloop. (Honestly, I rarely use the whileloop.) Also, you won't need to increment your index counter; it's done automatically for you:

#!/bin/bash #Progress bar with a For Loop #Bar BAR='##########' for COUNTER in {1..10} do #Print the bar progress starting from the zero index echo -ne "\r${BAR:0:$COUNTER}" #Sleep for 1 second sleep 1 done

File Iteration

Here's what you should do to simply read a text file in Bash using the forloop:

for line in $(cat filename) do do something done

In the following example, we will save a list of IP addresses in a file called ips.txt. Then, we will reuse the Nmap ping program (that we created previously) to check whether every IP address is up or down. On top of that, we will check the DNS name of each IP address:

#!/bin/bash #Ping & get DNS name from a list of IPs saved in a file #Prompt the user to enter a file name and its path. read -p "Enter the IP addresses file name / path:" FILE_PATH_NAME function check_host(){ #if not the IP address value is empty if [[ -n $IP_ADDRESS ]] then ping_cmd=$(nmap -sn $IP_ADDRESS| grep 'Host is up' | cut -d '(' -f 1) echo '------------------------------------------------' if [[ -z $ping_cmd ]] then printf "$IP_ADDRESS is down\n" else printf "$IP_ADDRESS is up\n" dns_name fi fi } function dns_name(){ dns_name=$(host $IP_ADDRESS) printf "$dns_name\n" } #Iterate through the IP addresses inside the file for ip in $(cat $FILE_PATH_NAME) do IP_ADDRESS=$ip check_host done

If you have followed carefully through this chapter, you should be able to understand everything you see in the previous code. The only difference in this program is that I used Tab spacing to make the script look better. The previous example covers most of what we did so far, including the following:

User input

Declaring variables

Using functions

Using if conditions

Loop iterations

Printing to the screen

Summary

I hope you have practiced all the exercises in this chapter, especially if you're new to programming. A lot of the concepts mentioned will apply to many programming languages, so consider the exercises as an opportunity to learn the basics.

I personally use Bash scripting for small and quick scenarios. If you want to build more complex applications, then you can try doing that in Python instead. Don't worry! You will learn about Python at the end of this book so you can tackle any situation you want in your career as a penetration tester.

Finally, this chapter covered a lot of information about Bash scripting. However, there is a lot more information than what is in this chapter. In practice, I use internet search engines to quickly find Bash scripting references. In fact, you don't need memorize everything you learned in this chapter. Remember that this book is a reference on which you can always rely to remember the syntaxes used in each case.

Конец ознакомительного фрагмента.

Текст предоставлен ООО «ЛитРес».

Прочитайте эту книгу целиком, купив полную легальную версию на ЛитРес.

Безопасно оплатить книгу можно банковской картой Visa, MasterCard, Maestro, со счета мобильного телефона, с платежного терминала, в салоне МТС или Связной, через PayPal, WebMoney, Яндекс.Деньги, QIWI Кошелек, бонусными картами или другим удобным Вам способом.

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

Интервал:

Закладка:

Сделать

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

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


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

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

x