Kali Linux Hands on

KALI LINUX Notes

DISCLAIMER:

  • This document contains unedited notes and has not been formally proofread.
  • The information provided in this document is intended to provide a basic understanding of certain technologies.
  • Please exercise caution when visiting or downloading from websites mentioned in this document and verify the safety of the website and software.
  • Some websites and software may be flagged as malware by antivirus programs.
  • The document is not intended to be a comprehensive guide and should not be relied upon as the sole source of information.
  • The document is not a substitute for professional advice or expert analysis and should not be used as such.
  • The document does not constitute an endorsement or recommendation of any particular technology, product, or service.
  • The reader assumes all responsibility for their use of the information contained in this document and any consequences that may arise.
  • The author disclaim any liability for any damages or losses that may result from the use of this document or the information contained therein.
  • The author reserve the right to update or change the information contained in this document at any time without prior notice.

  • Any attempts to perform penetration testing or ethical hacking on systems or networks should be done with the explicit permission of the system/network owner. Unauthorized access is illegal and can result in serious legal consequences.
  • It is important to fully understand the scope of the testing and to only test within that scope. Testing outside the agreed upon scope is considered unauthorized and may result in legal action.
  • Any findings or vulnerabilities discovered during testing should be reported to the system/network owner immediately and kept confidential until a fix can be implemented.
  • It is recommended to use a separate, dedicated testing environment rather than testing on a live production system to minimize the risk of accidentally causing damage or downtime.
  • It is important to take steps to protect your own identity and prevent accidental data leaks or exposure of sensitive information during testing.
  • It is also recommended to follow a standard code of ethics for ethical hacking and penetration testing.

REFERENCES:

  • https://www.kali.org/tools/
  • https://www.gnu.org/software/grub/manual/grub/html_node/Command_002dline-and-menu-entry-commands.html
  • https://developer-old.gnome.org/NetworkManager/stable/nmcli.html
  • https://forum.greenbone.net/

**************************************************************

##Update the kali with complete Distribution upgrade:

  • sudo apt update
  • sudo apt upgrade
  • sudo apt dist-upgrade -y

**************************************************************

DUAL Boot Kali Linux with Windows


When Windows option is missing from GRUB boot menu after installing Kali Linux as Dual boot, follow below steps

##Run update & upgrade command

Run os-prober

  • ┌──(kali㉿kali)-[~]
  • └─$ sudo os-prober  

    /dev/sda1:Windows

Run update-grub

  • ┌──(kali㉿kali)-[~]
  • └─$ sudo update-grub

Just uncomment the  below command

  • ┌──(kali㉿kali)-[~]
  • └─$ sudo nano /etc/default/grub

    #GRUB_DISABLE_OS_PROBER=false

Once again Run update-grub

  • ┌──(kali㉿kali)-[~]
  • └─$ sudo update-grub

    Generating grub configuration file ...
    done
    Found Windows

Now Just reboot.
┌──(kali㉿kali)-[~]
└─$ reboot


**************************************************************

GVM:

##Run update & upgrade command

  • ┌──(kali㉿kali)-[~]
  • └─$ sudo apt install gvm    

  • ┌──(kali㉿kali)-[~]
  • └─$ sudo gvm-setup

[+] Done

[*] Please note the password for the admin user

[*] User created with password '**********************.

[>] You can now run gvm-check-setup to make sure everything is correctly configured

  • ┌──(kali㉿kali)-[~]
  • └─$ sudo gvm-check-setup 

It seems like your GVM-22.4.1 installation is OK.

  • ┌──(kali㉿kali)-[~]
  • └─$ ss -lnt4 

  • └─$ sudo gvm-start      

[>] Please wait for the GVM services to start.
[>] You might need to refresh your browser once it opens.
[>]  Web UI (Greenbone Security Assistant): https://127.0.0.1:9392
ob for gvmd.service failed because a timeout was exceeded.
See "systemctl status gvmd.service" and "journalctl -xeu gvmd.service" for details.

  • sudo nano /etc/postgresql/15/main/postgresql.conf

How to Update GVM feed

┌──(kali㉿kali)-[~]
└─$ sudo gvm-feed-update 

Verify GVM certificates

┌──(kali㉿kali)-[~]
└─$ gvm-manage-certs -V

**************************************************************

Nessus


To access detailed information, refer to the topic "Scanning with Nessus" within the  Pentesting- Hands-on article.
  • ┌──(kali㉿kali)-[~]
  • └─$ sudo dpkg -i Nessus-10.5.1-debian10_amd64.deb
 - You can start Nessus Scanner by typing /bin/systemctl start nessusd.service
 - Then go to https://kali:8834/ to configure your scanner
Testing/ ***************
  • ┌──(kali㉿kali)-[~]
  • └─$ /bin/systemctl start nessusd.service

**************************************************************

WiFi

Reference : https://developer-old.gnome.org/NetworkManager/stable/nmcli.html

┌──(kali㉿kali)-[~]
└─$ nmcli general                                                
STATE      CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN   

┌──(kali㉿kali)-[~]
└─$ nmcli connection show
NAME                UUID                                  TYPE      DEVICE  

┌──(kali㉿kali)-[~]
└─$ sudo systemctl restart NetworkManager

┌──(kali㉿kali)-[~]
└─$ nmcli radio wifi off  

┌──(kali㉿kali)-[~]
└─$ nmcli radio wifi on

┌──(kali㉿kali)-[~]

└─$ nmcli device wifi list

Connect to a password-protected wifi network

$ nmcli device wifi connect "$SSID" password "$PASSWORD"

**************************************************************

GREP command

Nmap : using Grep to filter IP addresses

Syntax : cat ip.txt | grep "text to search" | cut -d"" -f 2 | sort | uniq
  • -f is the field  like 2nd string or 11th string and 
  • -d is the delimiter 
  • sort function
  • unique strings only

┌──(kali㉿kali)-[~]
└─$ cat ip.txt | grep -e "Status: Up"                                
Host: 192.168.1.1 ()    Status: Up
Host: 192.168.1.4 ()    Status: Up
Host: 192.168.1.17 ()   Status: Up
Host: 192.168.1.20 ()   Status: Up
Host: 192.168.1.22 ()   Status: Up
Host: 192.168.1.250 ()  Status: Up

┌──(kali㉿kali)-[~]
└─$ nmap -T4 -A 192.168.1.0/24 -oG ip.txt 

┌──(kali㉿kali)-[~]
└─$ cat ip.txt | grep -e "Status: Up" | cut -d " " -f2
192.168.1.1
192.168.1.4
192.168.1.17
192.168.1.20
192.168.1.22
192.168.1.250

How to get URL list from www.website.com/sitemap.html


┌──(kali㉿kali)-[~]
└─$  grep -Po 'http(s?)://[^ \"()\<>]*' gouti1454URL.txt                            
http://www.sitemaps.org/schemas/sitemap/0.9
https://www.gouti1454.com/p/kali-linux-hands-on.html
grep_url_sitemap_01
grep_url_sitemap_01

┌──(kali㉿kali)-[~]
└─$ cat gouti1454URL.txt|  grep -Po 'http(s?)://[^ \"()\<>]*'
http://www.sitemaps.org/schemas/sitemap/0.9
https://www.gouti1454.com/p/kali-linux-hands-on.html
grep_url_sitemap_02
grep_url_sitemap_02


**************************************************************

Configuring VPN to remain anonymous while performing Pentesting:


SOCKS5 get more anonymous identity 

Sudo nano /etc/proxychains4.conf

Just delete the # from dynamic_chain 
Add # on strict_chain

Restarting the network service

┌──(kali㉿kali)-[~]
└─$ sudo nano /etc/NetworkManager/NetworkManager.conf
 manager=true

┌──(kali㉿kali)-[~]
└─$ sudo service NetworkManager restart

Adding open source vpn accounts to kali

┌──(kali㉿kali)-[~]
└─$ sudo apt install network-manager-openvpn -y
└─$ sudo apt install network-manager-pptp -y
sudo apt install network-manager-openvpn -y
sudo apt install network-manager-pptp -y
sudo apt install network-manager-pptp-gnome -y
sudo apt install network-manager-strongswan -y
sudo apt install network-manager-vpnc -y
sudo apt install network-manager-vpnc-gnome -y

Changing MAC address no to get banned, while performing pentest

┌──(kali㉿kali)-[~]
└─$ macchanger --help
┌──(kali㉿kali)-[~]
└─$ macchanger wlan0 -s
┌──(kali㉿kali)-[~]
└─$ sudo macchanger  -r wlan0

**************************************************************

Scanning networks on monitor mode

Placing your wifi network into monitor mode

ifconfig wlan0 down
iwconfig wlan0 mode monitor
ifconfig wlan0 up

sudo airmon-ng check

Killing the process which will interfere with monitor mode
sudo kill 555
sudo kill 699
sudo airmon-ng check
sudo service NetworkManager restart


Just to check what are the connected devices on the open wifi networks
┌──(kali㉿kali)-[~]
└─$ sudo airodump-ng wlan0 
**************************************************************

Comments

Popular Posts

Chennai :MTC complaint cell 044-23455858, 9445030516 and 9383337639

Marriage Registration Online steps [Tamil Nadu]

Enable additional Security layer for Logging into: Google, Facebook and Twitter

Fraud Practice by JBL India Harman India

How to get Canadian PR

Whatsapp privacy check-up May 2023