Kali Linux for newbies

Carder

Professional
Messages
2,619
Reputation
9
Reaction score
1,726
Points
113
This article is written for those who are just about to take their first steps.

Let's go!

Start​

The first thing you need to do is purchase an 8 gigabyte flash drive (minimum).

Download the program https://rufus.ie/, you will need it to write the image to a USB flash drive.

Then download the Kali Linux image https://cdimage.kali.org/kali-2020.4/kali-linux-2020.4-installer-amd64.iso

Format the USB stick completely before starting the installation.

After you have successfully completed the steps above:​

  • Feel free to open Rufus;
  • Click to choose an .iso image;
  • Choose the previously downloaded Kali image;
  • Press "Start";
  • After that a window will come out in which you need to click "Yes" and select an entry in the "DD image" mode;
  • You wait for the end of the recording and close Rufus.

You have coped with the creation of the installation flash drive. Move on:​

  • Reboot your PC;
  • Put your USB flash drive like an installation one in BIOS. Or just select it in the Boot Menu, it usually opens via f5 or f8 or by pressing the Delete key;
  • Choose INSTALL (don't mix it up with the instal graphics, we don't need this);
  • When installing, select disk encryption lvm (you will need to come up with a password for encrypting the hard disk by at least 40-50 characters and keep this password in your head).
You can install the system as the main one or next to another OS.

You installed the system. Congratulations, let's move on:​

After installation, create a root user with full access rights to the system:
  • Open the terminal (in the upper left corner there is a black square);
fc7f17f36cfedac1429e6.png

You can also open the terminal by pressing Ctrl + Alt + T (I advise you to open this way).
  • Write in it: sudo su
  • Further: passwd root
  • Come up with a new password and enter it 2 times. (the main thing is not to forget it, otherwise you will have to reinstall the system), the password is written, it just does not appear on the screen;
  • Next, restart your computer and log in as root and a new password .
Login as root? Fine!
  • Open a terminal and write: apt update
    With this command you will update application packages to the latest versions.
  • Then write: apt dist-upgrade
    With this command you will update the system itself.
If there are errors and the system is not updated, then do the following:

Go to /etc/apt/sources.list manually.

The file should contain the following lines:

Code:
deb http://http.kali.org/kali kali-rolling main non-free contrib

# deb http://http.kali.org/kali kali-rolling main non-free contrib

301110970b0c0bd32a5a3.png


If not, then register manually and save.

There should be no problems now.

What is Terminal in Kali Linux​

Many do not understand what a terminal is in Kali Linux and where it came from at all. A long time ago, in the 90s, to configure and administer the system, someone had to go to the terminal, log in and make the necessary changes.

He looked something like this.

3ba0ad795e09b9f15c15d.png


Try to imagine: you enter a room in which there is something that looks like a TV screen fixed on a huge computer, this TV screen was called a terminal. Basically, the terminal was a display that would display the actions and the result of any command executed.

The display itself did not understand what you were entering, it did not understand your actions, it was needed only in order to accept commands and show the result. Your actions were understood by the program running in the background. She understood what you were entering, what keys you pressed, processed the information received and produced the result that is displayed in the terminal.

At that time, 2 components were needed: the physical screen itself or the terminal + the program that worked in the background.

On Linux, this program is located in the directory /bin/bash

Let's go and look at this program and find it, this program, it understands what you enter in the terminal.

To see select the file system on the desktop and go further through the directories.

0ee05196467a330fb4153.png


Why am I telling all this? Because in Linux, work happens exclusively with the terminal, you must understand this.

The terminal symbolizes the computer screen from the 90s. If you open a terminal, then this program will already work in it. This is called a shell , and bash is already running in it .

Press ctrl + alt + f1 and you will see a clean linux-system without a graphical interface (it was invented much later), you can work from there, as it was before. To go back press ctrl + alt + f7.

Bash
runs in the terminal by default. Otherwise, the terminal would not be able to receive information for input and display the result. This shell processes commands in the background and sends the result back to the terminal for display.

It is much more efficient than the graphical user interface, as opposed to it is always available on servers. When you make hacks, you will often come across servers without a beautiful graphical interface, since it requires a lot of resources, it needs disk space and RAM. Such costs are unaffordable for servers and should not affect performance.

In fact: the terminal is always on the servers, but there is no graphical interface. Therefore, it is very important that you know how to navigate any Linux system using a terminal or shell. As a rule, when you hack something, your goal is to gain access to the shell on a remote machine, on your victim's machine. This is done, for example, by a warrior, botnet, stealer or rootkit.

File system​

Now let's deal with directories or, as they are also called, directories. Open the filesystem on your desktop and find these directories. Now I will explain what is needed and why.

2ba964557550a43b51d14.png


There are no C, D drives, and so on, familiar to Windows users. The Linux file system has a tree structure and is based on the root directory, which is denoted by the " / " symbol, followed by the rest of the directories.

81f9c01a42b203f4d7edd.png


Many people are stopped by the stereotype that Kali Linux is very difficult and you need to be a cool hacker. In fact, this is complete nonsense, there is nothing supernatural in this operating system, and after some time of use, you will feel 10 times more comfortable in it than in Windows.

Now let's run all your traffic through the TOR network​

  • Open the terminal and write: apt install tor(install the tor network itself). apt is the application that looks for what you need to install, the install command is to install, tor is the application that you need to install;
  • systemctl start tor (we give the services team permission to start traffic through tor);
  • git clone https://github.com/ruped24/toriptables2 (install the utility from github);
  • cd toriptables2 (go to the folder with our utility);
  • Fill in next: mv toriptables2.py /usr/local/bin/
Now you can route all traffic through Tor with the command:
Code:
toriptables2.py -l (include);
toriptables2.py -f (turn off).

Now let's make it so that every time the system boots, your mac address changes to a random one​

First you need to download the leafpad text editor:

Code:
apt install leafpad

After downloading, prescribe:

Code:
leafpad /etc/NetworkManager/NetworkManager.conf

A text document will open for you.

In this text document, you need to specify at the end of the line and save:

Code:
[connection]

wifi.cloned-mac-address=random

[connection]

ethernet.cloned-mac-address=random

1 this is for wifi, 2 is for wired connection.

After that, you need to restart Network Manager in the terminal:

Code:
service network-manager restart

Now your MAC address will change to a random one after every Kali boot.

Thank you all for your attention!
 

Carding 4 Carders

Professional
Messages
2,731
Reputation
13
Reaction score
1,375
Points
113

Kali Linux Commands from A to Z​

Kali Linux is a Debian-based Linux distribution designed for digital forensics and penetration testing.
It is supported and funded by Offensive Security Ltd. Mati Aharoni, Devon Kearns and Raphael Hertzog are the main developers.
Kali Linux has more than 600 penetration testing programs pre-installed, including nmap (port scanner), Wireshark (packet analyzer), John the Ripper (password cracker) , Aircrack-ng (a Suite of programs for testing wireless local area networks for penetration), Burp Suite, and OWASP ZAP (both web application security scanners).
Kali Linux can run in its original mode if it is installed on the computer's hard disk, it can be downloaded from a live CD or USB storage device, or it can run on a virtual machine.
It supports the Metasploit Framework Metasploit Project, a tool for developing and implementing security exploits.

All Kali Linux commands​

Here below, we list the Kali Linux a-Z commands that will help you simplify your work.
Kali Linux commandsCommand functions
aproposSearch for Man pages (man-k)
apt-getSearch and install software packages (Debian)
aptitudeSearch and install software packages (Debian)
aspellSpell check
awkFind and replace text, sort / check / index the database
basenameBasic Strip directory and file name suffix
bashGNU Bourne-Again Shell
bcCalculator
bgSend to background
breakbreak out of the loop
builtinLaunching the built-in shell
bzip2Compress or decompress
calCalendar
caseConditionally execute the command
catOutput (display) of file contents
cdChanging the folder
cfdiskPartition table manipulator for Linux
chgrpChanging the owner's group
chmodd Change access rights
chownChange the file owner and group
chrootRun the command with a different root directory
chkconfigChkconfig system services (runlevel)
cksumPrint the CRC checksum and the number of bytes
clearClear the screen
cmpCompare two files
commComparing two sorted files line by line
commandRun command-ignores shell functions
continueResume the next iteration of the loop
cpCopying it
cronDaemon for executing scheduled commands
crontabSchedule the command to run at a later time
csplitSplit the file into context-specific parts
cutSplit the file into several parts
dateDisplaying or changing the date and time
dcDesktop calculator
ddConvert and copy a file, write disk headers, boot records
ddrescueddrescue data recovery tool
declareDeclare variables and assign attributes to them
dfShow free disk space
diffShow differences between two files
diff3Show differences between three files
digDNS lookup
dirBriefly list the contents of the catalog
dircolorsSetting the color for " ls”
dirnameConvert full path to just path
dirsShow list of remembered directories
dmesgPrint kernel and device messages
duFile space usage
echoShow message on screen
egrepFind files for strings that match an extended expression
ejectRemove removable media
enableEnable and disable shell built-in commands
envenvironment variables
ethtoolEthtool Ethernet card settings
evalEvaluate multiple commands / arguments
execRun the command
exitExiting the shell
expectAutomate custom applications available through the terminal
expandConvert tabs to spaces
exportSet the environment variable
exprEvaluate expressions
falseDo nothing, without success
fdformatLow-level floppy disk formatting
fdiskPartition table manipulator for Linux
fgSend your work to the foreground
fgrepSearch files for strings that match a fixed string
fileDetermine the file type
findSearch for files that match the specified criteria
fmtReformat the paragraph text
foldWrap the text to fit the specified width
forCyclic expression
formatFormat of disks or records
freeMemory usage
fsckChecking and correcting file system integrity
ftpftp file transfer Protocol
functionDefine function macros
fuserIdentify / kill the process that accesses the file
gawkFind and replace text in files
getoptsParsing positional parameters
grepSearch for files on strings that match a given pattern
groupaddAdd to group and user
groupdelDelete a group
groupmodChange a group
groupsOutput of group names
gzipCompress or decompress files
hashЗапомнить полный путь к имени аргумента
head Вывод первой части файлов
helpShow help for the built-in command
historyTeam history
hostnameOutput or set the system name
iconvConverting a file's character set
idDisplaying user and group IDs
ifPart of the cycle
ifconfigConfigure the network interface
ifdownStop the network interface
ifupLaunch the network interface
importCapture the X server screen and save the image to a file
installCopy files and set attributes
jobsList of tasks
joinConnect lines on a common field
killStop the process
killallKill processes by name
lessDisplays one screen at a time for scrolling
letperform arithmetic on shell variables
lnCreate a symbolic link to the file
localCreate variables
locateFind files
lognameDisplay the current username
logoutExiting the login shell
lookShow lines starting with this line
lpcmanaging the printer
lprOffline printing
lprintPrint the file
lprintdAbort a print job
lprintqPrint queue list
lprmRemove jobs from the print queue
lsShow information about files
lsoflist of open files
makeRecompile a group of programs
manReference guide
mkdirCreate new folders
mkfifoCreate FIFOs (named channels)
mkisofsCreate an ISO9660 / JOLIET / HFS hybrid file system
mknodCreate a block or special character files
moreDisplays one screen at a time for scrolling
mountMount the file system
mtoolsManipulates MS-DOS files
mtrMTR network diagnostics (traceroute / ping)
mvMove or rename files or directories
mmvMove or rename files EN masse
netstatNetwork information
niceSet the priority of a command or task
nlNumber of lines and file entries
nohupRun a command that is immune to freezes
notify-sendSend notifications to your desktop
nslookupRequest DNS server names interactively
openOpen a file in the default app
opAccess operator
passwdChange the user's password
pasteMerge file lines
pathchkCheck file name portability
pingChecking network connectivity
pkillStop processes
popdRestore the previous value of the current folder
prprepare files for printing
printcapPrinter capabilities database
printenvOutput of environment variables
printfData format
psProcess status
pushdSave and then change the current folder
pwdDisplay the current folder
quotaShow disk usage and restrictions
quotacheckChecking the file system for disk usage
quotactlSet disk quotas
ramRAM disk
rcpcopy files between two machines
readRead a string from standard input
readarrayReading from standard input to an array variable
readonlyMark variables / functions as " read-only”
rebootSystem restart
renameRename files
renicePriority of running processes
remsyncsyncs deleted files via email
returnExiting a shell function
revReverse file lines
rmDelete files
rmdirDelete folders
rsyncRemote file copying (Synchronization of file trees)
screenMultiplex terminal screen, launching remote shells via ssh
scpSecure copy (remote file copying)
sdiffmerge two files interactively
sedStream Editor
selectAccept keyboard input
seqOutput of numeric sequences
setManipulating shell variables and functions
sftpSecure file transfer program sftp
shiftShift of positional parameters
shoptShell options
shutdownShutting down or restarting Linux
sleepDelay for the specified time
slocatefind files
sortsort text files
sourceRunning a command from a file
splitSplit the file into fixed-size parts
sshSSH Secure Shell client (remote login program)
straceTrace system calls and signals
suReplace user identity
sudoRun command as another user
sumPrint the checksum of a file
suspendSuspend execution of this shell
symlinkCreate a new name for the file
syncSync data on disk
tailOutput the last part of the file
tarTar Archiver
teeRedirect output to multiple files
testEvaluate a conditional expression
timeTime measurement program
timesUser and system time
touchChange file timestamps
toplist of processes running on the system
traceroutetracing the route to the host
trapRun the command when the signal is set (born)
trTranslate, compress, and / or delete characters
trueDo nothing, successful execution, part of the loop
tsortTopological sorting
ttyy Print the terminal file name to standard input
typeDescribe the team
ulimitRestrict user resources
umaskMask for creating a file by the user
umountUnmount the device
unaliasDelete an alias
unameDisplay system information
unexpandConverting spaces to tables
uniqUnify files
unitsConverting units from one scale to another
unsetDelete variable or function names
unsharUnpack shell script archives
untilExecute commands (before error) part of the loop
uptimeShow opening hours
useraddCreate a new user account
usermodChange the user account
usersList of users who are currently logged in
uuencodeEncode a binary file
uudecodeDecrypt the file created by uuencode
vDetailed list of folder contents ('ls-l-b’)
vdirDetailed list of folder contents ('ls-l-b’)
viVi text editor
vmstatReport virtual memory statistics
waitWait for the process to complete part of the loop
watchPeriodically execute / display the program
wcOutput bytes, words, and the number of lines
whereisSearch for the program path, man pages, and source files for the user.
whichSearch for the program binary
whileCommand execution part of the loop
whoDisplays all the names of logged-in users
whoamiDisplays the current user ID and name (id-un ’)
wgetDownload web pages or files via HTTP, HTTPS, or FTP
writeSend a message to another user
xargsThe xargs Execute utility that passes constructed argument lists
xdg-openxdg-open Open a file or URL in the application selected by the user.
yesPrint a string until the command is interrupted
 
Last edited:

Carding

Professional
Messages
2,828
Reputation
17
Reaction score
2,100
Points
113

Kali Linux​


_l9n8TM_6sI.jpg


Kali Linux is one of the Linux distributions designed for hackers and information security professionals. Therefore, it is not surprising that this raises its popularity and many newbies and people who do not have any knowledge of information security are trying to use this distribution as the main system. But Kali Linux is not designed for this at all. In today's article, we will look at what Kali Linux is, why you need it, and give an overview of Kali Linux.

1. Development history
Kali Linux was developed by the security firm Offensive Security. It was created on the basis of Debian and contains the developments of the distribution kit for digital forensics and security testing BackTrack.
The first version of BackTrack was released in 2006, it combined several projects, the main purpose of which was penetration testing. The distribution was intended to be used as a LiveCD.
In 2012, a distribution such as BackTrack ceased to exist, and instead of it Kali Linux appeared, which took over all the advantages of the previous version and all the software. It was the result of the merger of two projects: WHAX and the Auditor Security Collection. Now the distribution kit is steadily developing and the efforts of the developers are aimed at fixing errors and expanding the set of tools.

2. Purpose
The official website has the following description of the distribution: "Penetration Testing and Ethical Hacking Linux Distribution" or, in our opinion, a distribution for penetration testing and ethical hacking. Simply put, this distribution contains many security and networking tools that are geared towards computer security experts.
A Linux distribution is nothing more than a kernel and a set of basic utilities, applications, and defaults. Kali Linux does not provide anything unique in this regard. Most programs can be easily installed on any other distribution, or even on Windows.
The difference with Kali Linux is that it is filled with tools and settings that are needed for security testing, and not to ensure the normal operation of the average user. If you want to use Kali instead of the main distribution, you are making a mistake. This is a specialized distribution kit for solving a certain range of tasks, which means that solving tasks for which it was not intended will be more difficult, for example, the same search for programs. Kali Linux's capabilities are focused on security testing.

3. Installation
You can download the installation image on the official website, you just need to choose the architecture. After booting, be sure to check the disk for damage by comparing the SHA256 checksum. Since this distribution is intended for security testing, I really don't want it to be broken in any way.

4. Features
Many will be surprised, but the default user in Kali Linux is root. This is necessary because many programs need superuser rights to run. This is one of the reasons why you shouldn't use Kali for everyday tasks like surfing the Internet or using office applications.
If we talk about software, then all the supplied programs are focused on security. There are graphical programs, and there are terminal commands, and several basic utilities are included in the system, such as an image viewer, a calculator, and a text editor. But here you will not find office programs, e-readers, email programs and organizers.

xjScidQIB-E.jpg


Kali Linux is based on Debian, and nothing prevents you from installing a program from the repositories, for example, thunderbird for collecting mail. But viewing mail as the superuser is not a good idea. Of course, no one bothers you to create an unprivileged user, but this is extra work.
On the Kali Linux login screen, you can see the motto "The quieter you become, the more you are able to hear" or "The quieter you are, the more you can hear." If you watch the packages sent to the network by the Debian system, you will notice that some packages are regularly posted to the network. Some of them are sent by user applications, others by background services.
For example, if you scan your Linux machine with Nmap, you might see several open ports. For example, it can be a never used VNC port and an HTTP server. Some of these programs come by default, some you installed and forgot.
Kali Linux strives to be as quiet as possible. This is necessary to hide your presence in the attacked network and to protect yourself from potential attacks. To accomplish this, many services are disabled in Kali that are enabled by default in Debian. Of course, you can install the service you want from the Debian repositories.

For example apache2:
IjFAVlMuBv4.jpg


However, after that, the utility will not start automatically and will not be added to startup. If you need it, you will have to start it manually. On each reboot, all unnecessary services are disabled. It is possible to go around and add the service to the /usr/sbin/update-rc.d whitelist, but this is not entirely secure since you are opening the system path. Nobody knows if there are any vulnerabilities.
Kali Linux is a specialized distribution, if only because it is designed to work in an aggressive environment. And if you installed a web server and a few other programs, added them to startup, you may have already broken Kali and reduced its security.

5. Programs
As stated above, the Kali Linux distribution contains only specific security testing software. But many of the programs needed for normal operation are not available. And there is no guarantee that you will find them in the repositories, even if they are available in Debian.
You may want to add third-party repositories and application sources to install what you need, or add a repository that contains the most recent version of the program. You can, but you shouldn't. Even for Debian it is not recommended to do this, the developers call this phenomenon FrankenDebian and say that it can break the stability of the system.
Kali Linux is even more complicated. You risk not only damaging the system, but also making it unsafe. Packages from the repositories have been checked and contain additional changes, for example, the same Apache is not added to startup. Third party packages will not have such precautions.
We will talk about the software part in a separate article, because it is impossible to describe hundreds of unique tools in one article and not get confused.

Findings
Our review of Kali Linux features is coming to an end. Whether you should choose this distribution kit or not depends on you and the tasks that you are trying to solve with the help of the system. If you only need a few tools, then it is better to choose some simpler distribution, for example, Ubuntu or Debian. You will be able to install all the necessary tools in it. The same option is better for new users.
But if you are already well versed in Linux and are ready to spend a lot of time to understand information security, this system may be for you. But do not rush to install it on your computer. Use a virtual machine, then install it as a secondary, second system.
 

Hacker

Professional
Messages
1,046
Reputation
9
Reaction score
752
Points
113
Linux security

Configuring Linux.
You can often find the opinion that Linux is safe. So far, this is really true, no one has made a particularly thorough effort to create attacking programs, which is why the illusion of security is created. However, let's try to pay attention in advance to those things in the Linux system that may be of interest to intruders in the future.
This article does not pretend to be a complete overview of the problems, I just want to outline the contours of a problem that already exists, but is not yet particularly solved. Some of the described security methods can be made to work right now, and some should be made to implement the authors of the system software.
Update For some reason, for some readers, the general idea of the article turned out to be incomprehensible, so I will write it explicitly: the idea is to show some specific examples of the use of known attacks (if you can call it an "attack", of course)in a Linux environment.
It makes no sense to talk about the methods of penetration, harmful software will still leak to any system.

Autoplay
So, a virus in the system, for example, through a hole in libflash launched the downloaded binary; to survive, it needs to register itself in autoload.
We don't even talk about such a small thing as masking the virus name in the process list. The virus can easily impersonate anything.
In addition to the DE tools, there are various startup scripts of the ~/type.xsession or ~/. profile, or.zshrc. If you really want to, you can probably even put some destructive stuff in ~/.fonts.conf.
How to fight? No way. While there are no reliable control tools, no one (from the software authors) really bothers with the mess in the scripts. A paranoid solution is to read hash sums from critical user config files and store them in a place inaccessible to user changes. Then, at startup, check all hash sums.

Disguise
In addition to registering itself in the autorun file, the virus can add a bunch of useful information to its configuration files. One of the most attractive targets can be the PATH environment variable. Let me remind you that this variable stores a list of paths that will be used to search for an executable program. Usually, the PATH variable looks something like this:/usr/bin:/bin, and the virus can modify it as ~/bin:/usr/bin:/bin. This is fraught with the fact that now a program typed without specifying the full path will first be searched in the user directory, and only then in the system ones.
The solution? Use only full paths when running programs. However, this is not guaranteed protection. A more reliable solution would be to restrict access to modification of critical environment variables.

Wrecking activity
Everything here is quite sad. As a rule, one command —rm-rf ~/ - is enough to cause maximum damage. After that, you can say goodbye to all the data.
Also, nothing prevents you from encrypting all data in the home directory, as some Windows viruses do.
It is also possible and more minor sabotage, for example, prescribing in the browser configs of all sorts of rubbish (spoofing the home page, for example). It is impossible to deal with this issue centrally, and app authors should understand it.
Undoubtedly, the standard location of app profiles will make life much easier for attackers. For example, the Opera profile will almost always be located in the ~/.opera directory. So you can partially save yourself by changing the standard profile paths.Many applications allow you to do this.

Conclusions
Decent security requires a fair amount of paranoia. A system for monitoring running applications (comparing the hash sums of executable files and scripts) can significantly complicate the virus's life. You can prevent "getting caught" on a disk by prohibiting writing to this very disk. At the same time, you still need to provide some way to modify the configuration files.
The described methods and options are just what comes to mind when you try to think about the problem. For sure, there will be some other particularly refined methods (such as using~/.fonts. conf), but that's enough to start with. But software manufacturers, including system ones, do not think much about such primitive household safety issues. I should have.
 

Mutt

Professional
Messages
1,057
Reputation
7
Reaction score
596
Points
113
Kali Linux is not Linux for beginners, but a powerful weapon of a hacker, or one who fights against these hackers. Kali Linux is a super penetration testing and security auditing distribution.

Kali Linux is a descendant of the famous BackTrack Linux, but it is already based on Debian and accordingly supports its packages in general and applications in particular.

What is Kali Linux?
Kali Linux, of course, has its own official website, and the best part is that there is documentation too, so you don't need to know English to understand all the intricacies of this OS. And since the functionality of Kali Linux is huge, you just have to read the manuals.

What does Kali Linux look like in general? Probably this is the first thing that every person pays attention to, because they are greeted by clothes, as they say ...

What is also very interesting and important is the fact that Kali Linux was ported to the ARM architecture, which means that it can be safely installed on a tablet. The site has detailed instructions on how to build your image for ARM. I have noticed for a long time that more and more Linuxes are porting their assemblies to ARM, since all mobile devices today use this particular architecture.

Here is such a Linux Kali, great and terrible, a favorite of hackers and system administrators!

How to hack WiFi using Kali Linux?
First, we'll check the available network interfaces. This can be done with the command:
Code:
iwconfig

In this case, you will see a similar picture:
scale_1200


In this case, there are 2 available network interfaces, wlan0mon (about the monitoring mode a little later) and wlan1 (wlan0).

After this step, there are several possible paths:
  • The way is simpler and for the lazy: use the wifite utility
  • Do everything with pens and yourself

In the first case, you only need:
- select the device from which to carry out the attack (network interface)
- select the attacked network
- then the utility will do everything by itself: it will either capture a handshake if you attack a WPA network without WPS, or it will attack using Pixie if WPS is enabled.
- in the case of WPA, Wifite can be launched by specifying the dictionary that it will use to crack the handshake (wifite –dict wordlist.txt).

When we made sure that the Wi-Fi adapter is connected and working, we need to find out the signal of which networks it catches, one of the options, turn on the wireless interface and scan.

To do this, we will use the following commands:
ifconfig wlan1 up - in this case wlan1 is the name of the network interface
iwlist wlan1 scanning - scanning using the wlan1 interface
and we get something like this:
scale_1200


We are interested in several parameters at once:
Network name, MAC address, channel.

Now let's try to capture a handshake, for this we need to put the network interface into monitoring mode and capture a handshake.

To switch to monitoring mode, use the command:
airmon-ng start wlan1 - in this case, the interface will change the name to wlan1mon and go into monitoring mode (you can check this using iwconfig), while you may be warned that some processes can interfere with this, do not pay attention, this is normal ...
scale_1200


For a more accurate capture of the handshake, we will use the information we received from the scan:
Code:
Airodump-ng wlan0mon –-bssid FC: 8B: 97: 57: 97: A9 –-channel 2 -–write handshake –-wps
wlan0mon - interface name
bssid FC: 8B: 97: 57: 97: A9 - MAC address of the router we are hacking
channel 2 - restriction on the channel for the router we hack
write handshake - this command allows us to write the captured information to files called handshake
wps - will display the availability of WPS at the point in case you missed it.
scale_1200


This is how the process of capturing a handshake looks like.
Considering that a handshake occurs when a client connects to an access point, then we need to either wait for the client to connect to the access point (for example, by coming home, to the office, or turning on a laptop / wifi) or help the client to reconnect to the access point using deauthentication and capture of the handshake on subsequent connection. An example of deauthentication.
Code:
aireplay-ng -0 10 –a FC: 8B: 97: 57: 97: A9 –c 68: 3E: 34: 15: 39: 9E wlan0mon
-0 - means deauthentication
10 - the number of deauthentication
-a FC: 8B: 97: 57: 97: A9 - MAC address of the access point
–C 68: 3E: 34: 15: 39: 9E - Client MAC address
wlan0mon - used interface

When you catch a handshake it will be displayed in the upper right corner.
scale_1200


Now that we have caught a handshake, it is advisable to check it, clean it up, remove all unnecessary and guess the password.

You can check in several ways:

1) using the cowpatty utility
Code:
cowpatty -r handshake-01.cap -c
-r specifies the file to check
-с indicates that we need to check the handshake and not hack it
scale_1200


As we can see in the screenshot, in the first file we did not have the correct handshake, but in the second we did.

2) Using Wireshark
To do this, you need to open the wireshark'om file, this can be done both from the terminal (wireshark handshake-01.cap) or manually. With this, you will see a large number of packages. Let's filter out the handshake packets using a filter:
Code:
eapol || wlan.fc.type_subtype == 0x04 || wlan.fc.type_subtype == 0x08
and click apply

Now we need to leave the broadcast of the access point, and the first 2 handshake packets, removing everything else. At the same time, it is necessary to ensure that the number of the first 2 packages does not differ too much, so that they are from the same handshake.
scale_1200


In this case, you can select the Broadcast and the first 2 packets and save them separately.

3) the easiest way is the WPAclean utility.
Code:
wpaclean handshake-01.cap wpacleaned.cap
handshake-01.cap - this is the source file from which the handshake will be taken
wpacleaned.cap is the file where the cleaned handshake will be written.
scale_1200


As we can see, the output of the program is somewhat different, this is due to the fact that the first file did not contain all the necessary information.

Now that we have the correct cleaned handshake, it remains for us to decipher it.

To get a password from Wi-Fi, we need to find a password, when using which hashes for 2 of our handshakes will match. To do this, you can use a dictionary or select by symbols. If you do not have a supercomputer, then this option is unlikely to suit you, since the number of options is the number of allowed characters to the power of the number of password characters (~ 130 ^ 8 for an 8-digit password). It makes sense to use character matching if you know a piece of the password that will reduce the number of options, or if the password is limited (for example, there are only numbers, or it matches a mobile phone in your area). Now we will brute-force a password using a dictionary.

We can decrypt the handshake using a CPU or GPU. Usually, if you have a powerful video card, then using the GPU is faster.

We'll use aircrack to decrypt with the CPU.
Code:
aircrack-ng wpacleaned.cap –w wordlist.txt
wpacleaned is our cleaned and tested handshake
-w wordlist.txt is our dictionary, by which we will guess the password

If the password is in the dictionary, then after a while you will see the corresponding message:
scale_1200


This will contain your password. Or a message that the dictionary has ended, but the password has not been found.

A utility for hacking through the GPU called pyrit has much more capabilities and fine-tuning, but sometime about them next time, now we will just try to guess the password for the handshake with our specific dictionary.
Code:
pyrit –r wpacleaned.cap –i wordlist.txt attack_passthrough
-r wpaclean.cap - handshake file
-I wordlist.txt - dictionary file
scale_1200


If that doesn't work:

You can try to apply a mixture of social engineering and attack on Wi-Fi, for this there are 2 utilities:
A) Linset
B) Wifiphisher

For wifiphisher we need 2 Wi-Fi adapters. In short, it happens like this:
  • With the help of 1 adapter, we jam target points
  • On the second adapter, we raise an open point with the same name
  • When the target cannot connect and use its point, it may connect to our
  • The target will have a "similar" to a truthful window where they will be asked to enter the password from the WiFi in order for the router to complete the update.

In this case, the correctness of the entered password for the update is not checked.
Linset works in a similar way. But the key feature of this utility is that it is in Spanish,
There is no English and even more so the Russian version, unfortunately it did not start for me.

Thanks for attention!
 
Top