kali

About & Basics

Kali Linux is a popular Linux distribution that is used for ethical hacking and penetration testing. It comes with a large number of tools and utilities for these purposes. The terminal is an important part of Kali Linux, as it allows you to access and use these tools. Here is a tutorial on how to use the Kali Linux terminal:

  1. Opening the terminal: To open the terminal in Kali Linux, click on the terminal icon in the taskbar or press Ctrl + Alt + T.

  2. Basic commands: Some basic commands that you can use in the terminal include:

  • ls: Lists the files and directories in the current directory.

  • cd: Changes the current directory. For example, cd /home/user/documents changes the current directory to the documents directory.

  • pwd: Shows the current directory.

  • mkdir: Makes a new directory. For example, mkdir myfolder creates a new directory called "myfolder".

  • rmdir: Removes an empty directory.

  • rm: Removes a file.

  1. Working with files: You can use the following commands to work with files in the terminal:

  • touch: Creates a new file. For example, touch myfile.txt creates a new file called "myfile.txt".

  • cp: Copies a file. For example, cp myfile.txt myfile2.txt copies the file "myfile.txt" to a new file called "myfile2.txt".

  • mv: Moves or renames a file. For example, mv myfile.txt myfolder moves the file "myfile.txt" to the "myfolder" directory.

  • cat: Shows the contents of a file.

  • nano: Opens a text editor in the terminal for editing a file.

  1. Installing software: To install software in Kali Linux, you can use the apt-get command. For example, apt-get install firefox installs the Firefox web browser.

  2. Running programs: To run a program in the terminal, you can simply type its name and press Enter. For example, to run the nmap network scanning tool, you can type nmap and press Enter.

These are just a few of the many things you can do with the Kali Linux terminal. There are many other commands and tools available, and you can learn more about them by reading the documentation or doing online research.


Create A Bootable USB With Persistence

  1. Download and install Rufus from the official website (https://rufus.ie/).

  2. Download the Kali Linux ISO image from the official website (https://www.kali.org/downloads/).

  3. Insert the USB drive into your computer.

  4. Launch Rufus and select the USB drive from the Device dropdown menu.

  5. Under the Boot selection menu, select the option to "Create a bootable USB drive using an ISO image".

  6. Click the CD/DVD icon next to the dropdown menu and browse to the location of the downloaded Kali Linux ISO image.

  7. Select the ISO image and click Open.

  8. Under the Partition scheme and target system type dropdown menu, select "GPT partition scheme for UEFI" if you are using a UEFI-based system, or "MBR partition scheme for BIOS or UEFI" if you are using a BIOS-based system.

  9. Under the Volume label field, give the USB drive a name (e.g. "Kali Linux USB").

  10. Check the box for "Create a bootable disk using: Persistent storage" to create a bootable USB with persistence. This will allow you to save any changes made to the live system on the USB drive.

  11. Click the Start button to begin the process of creating the bootable USB with persistence.

  12. When prompted, click the Yes button to confirm that you want to write the ISO image to the USB drive.

  13. Wait for the process to complete. This may take a few minutes.

  14. Once the process is complete, click the Close button to close Rufus.

  15. Eject the USB drive from your computer and it is now ready to be used as a bootable USB with persistence for Kali Linux.

  16. To boot from the USB drive, restart your computer and enter the BIOS or UEFI settings. Depending on your system, you may need to press a key (e.g. F2, F12, Del) to enter the BIOS/UEFI settings.

  17. In the BIOS/UEFI settings, navigate to the boot menu and select the USB drive as the boot option. Save your changes and exit the BIOS/UEFI settings.

  18. Your computer should now boot from the USB drive and you should be able to use Kali Linux with persistence. Any changes made to the live system will be saved on the USB drive.

  19. *Note: You may need to disable "Safe Boot" in your system BIOS To boot.


First Steps: Update & Upgrade

To update and upgrade Kali Linux, follow these steps:

  1. Open a terminal window in Kali Linux.

  2. To update the package list and upgrade all packages to their latest versions, type the following command and press Enter:

sudo apt update && sudo apt upgrade -y


  1. You may be prompted to confirm the installation of packages and their dependencies. Press Y to continue.

  2. The package list and installed packages will be updated and upgraded. This process may take some time depending on the number and size of packages being installed.

  3. To update the Linux kernel to the latest version, type the following command and press Enter:

sudo apt install linux-image-$(uname -r)


  1. You may be prompted to confirm the installation of the Linux kernel. Press Y to continue.

  2. The Linux kernel will be updated to the latest version.

  3. To update the bootloader, type the following command and press Enter:

sudo update-grub

*Note: You may need to install grub & Dependencies:

Type the following command, Type "Y" for Yes & press Enter:

sudo apt-get install grub grub-emu mtools xorriso desktop-base grub-legacy-doc mdadm multiboot dracut-core floppyd xorriso-tcltk jigit cdck gnuplot gnuplot-doc

(After this operation, 80.7 MB of additional disk space will be used.)


  1. The bootloader will be updated to include the new Linux kernel.

  2. Reboot your system to complete the update process.

sudo reboot


Create New User With Permissions

  1. Open a terminal window in Kali Linux.

  2. To add a new user, type the following command and press Enter:

sudo adduser <username>


Replace <username> with the desired username for the new user.

  1. Follow the prompts to set the password, full name, and other information for the new user.

  2. To grant root permissions to the new user, type the following command and press Enter:

sudo usermod -aG sudo <username>


Replace <username> with the username of the new user.

  1. The new user should now have root permissions and be able to use the sudo command to run commands with elevated privileges.

  2. To verify that the new user has root permissions, switch to the new user by typing the following command and pressing Enter:

su - <username>


Replace <username> with the username of the new user.

  1. Once you are logged in as the new user, try running a command that requires root privileges, such as sudo apt-get update. If the command runs successfully, the new user has been granted root permissions.

  2. When you are finished, you can switch back to the original user by typing exit and pressing Enter.


Install & Use Sherlock

Sherlock is a Python-based tool that can be used for finding user names on various social media platforms. Here is a tutorial on how to install and use Sherlock on Kali Linux:

Python3 Dependencies:

  • python3

  • python3-certifi

  • python3-colorama

  • python3-openpyxl

  • python3-pandas

  • python3-requests

  • python3-requests-futures

  • python3-socks

  • python3-stem

  • python3-torrequest

You can use apt-get to install all of these at once by running the following command:

sudo apt-get install python3-certifi python3-colorama python3-openpyxl python3-pandas python3-requests python3-requests-futures python3-socks python3-stem python3-torrequest

(After this operation, 18.7 MB of additional disk space will be used.)

Suggested Packages:

Include "torbrowser-launcher apparmor-utils nyx obfs4proxy vim-addon-manager" To the command above.


...


  1. First, make sure that you have Python3 and pip3 installed on your Kali Linux system. You can check if Python3 is installed by running the following command:

python3 --version


If Python3 is not installed, you can install it by running the following command:

apt-get install python3


To check if pip3 is installed, run the following command:

pip3 --version


If pip3 is not installed, you can install it by running the following command:

apt-get install python3-pip


  1. Next, clone the Sherlock repository from GitHub using the following command:

git clone https://github.com/sherlock-project/sherlock.git


This will create a new directory called "sherlock" in the current directory.

  1. Change into the sherlock directory and install the required dependencies by running the following command:

pip3 install -r requirements.txt


  1. Now you are ready to use Sherlock. To find user names on various social media platforms, run the following command:

python3 sherlock <username>


Replace <username> with the user name you want to search for. Sherlock will search for the user name on multiple social media platforms and print the results.

  1. If you want to search for a specific social media platform, you can use the -p option followed by the platform name. For example, to search for the user name on Twitter, you can use the following command:

python3 sherlock <username> -p twitter


  1. You can also use the -v option to enable verbose mode, which will provide more detailed information about the search results.


...


ADDITIONAL COMMANDS:

usage: sherlock [-h] [--version] [--verbose] [--folderoutput FOLDEROUTPUT]

[--output OUTPUT] [--tor] [--unique-tor] [--csv] [--xlsx]

[--site SITE_NAME] [--proxy PROXY_URL] [--json JSON_FILE]

[--timeout TIMEOUT] [--print-all] [--print-found] [--no-color]

[--browse] [--local] [--nsfw]

USERNAMES [USERNAMES ...]


Example Usage:

sudo python3 sherlock --timeout 1 --nsfw UserName >> ~/Desktop/Test/Sherlock/UserName.txt && echo '1 Of 2 Completed!' && sudo python3 sherlock --timeout 1 --nsfw --print-all UserName >> ~/Desktop/Test/Sherlock/UserName.txt && echo '2 Of 2 Completed!' && echo 'DONE!'


Sherlock: Find Usernames Across Social Networks


positional arguments:

USERNAMES One or more usernames to check with social networks.

Check similar usernames using {%} (replace to '_',

'-', '.').


options:

-h, --help show this help message and exit

--version Display version information and dependencies.

--verbose, -v, -d, --debug

Display extra debugging information and metrics.

--folderoutput FOLDEROUTPUT, -fo FOLDEROUTPUT

If using multiple usernames, the output of the results

will be saved to this folder.

--output OUTPUT, -o OUTPUT

If using single username, the output of the result

will be saved to this file.

--tor, -t Make requests over Tor; increases runtime; requires

Tor to be installed and in system path.

--unique-tor, -u Make requests over Tor with new Tor circuit after each

request; increases runtime; requires Tor to be

installed and in system path.

--csv Create Comma-Separated Values (CSV) File.

--xlsx Create the standard file for the modern Microsoft

Excel spreadsheet (xslx).

--site SITE_NAME Limit analysis to just the listed sites. Add multiple

options to specify more than one site.

--proxy PROXY_URL, -p PROXY_URL

Make requests over a proxy. e.g.

socks5://127.0.0.1:1080

--json JSON_FILE, -j JSON_FILE

Load data from a JSON file or an online, valid, JSON

file.

--timeout TIMEOUT Time (in seconds) to wait for response to requests

(Default: 60)

--print-all Output sites where the username was not found.

--print-found Output sites where the username was found.

--no-color Don't color terminal output

--browse, -b Browse to all results on default browser.

--local, -l Force the use of the local data.json file.

--nsfw Include checking of NSFW sites from default list.


I hope this tutorial was helpful and that you are now able to install and use Sherlock on Kali Linux to find user names on social media platforms.


Create Your Own Private Search Engine

#!/usr/bin/bash

Make sure Python3 and pip3 are installed

python3 --version || apt-get install python3 pip3 --version || apt-get install python3-pip

Install required dependencies

sudo apt install python3-dev build-essential libxslt-dev libxml2-dev libffi-dev libssl-dev

Clone Searx repository from GitHub

git clone https://github.com/asciimoo/searx.git

Change into the searx directory

cd searx

Create and activate a virtual environment

python3 -m venv venv source venv/bin/activate

Install required Python packages

pip3 install -r requirements.txt

Copy the default configuration file to a new file called "settings.yml"

cp searx/settings.yml.example searx/settings.yml

Edit the "settings.yml" file as desired

You can find more information about the available configuration options in the Searx documentation (https://searx.readthedocs.io/en/latest/)

Run the Searx server

python3 searx/webapp.py

To stop the Searx server, press "Ctrl + C" in the terminal window

To deactivate the virtual environment, run the following command:

deactivate