man sudoers
sudo cat /etc/sudoers
# Check "sudo" group
grep 'sudo' /etc/group
sudo -l - list user's privileges or check a specific command
sudo -l
sudo -ll
➡️ Network
ip / ifconfig- show/manipulate routing, network devices, interfaces and tunnels
ip a
ip -br -c a
ifconfig
iwconfig - show wireless network interface configuration and status
iwconfig
ip n - display the neighbor/ARP table
ip n
arp -a - display ARP cache, IP-to-MAC address mapping
arp -a
ip r - display the IP routing table (destination networks, gateway IP, net interfaces)
ip r
route - display/manipulate the IP routing table
route
ping - send ICMPECHO_REQUEST to network hosts, checking network connectivity
ping 8.8.8.8
# Stop with CTRL+C
netstat / ss - print network connections (e.g. for open ports)
netstat -tulpn
ss -tnl
➡️ Services
service - manipulate services
# Start Apache Web server service
sudo service apache2 start
# Stop Apache Web server service
sudo service apache2 stop
python
# Start a simple HTTP server using Python, in current directory
python3 -m http.server 80
systemctl
# Enable a service at system boot
sudo systemctl enable ssh
sudo systemctl enable ssh --now
# Disable a service at system boot
sudo systemctl disable ssh
➡️ Tools
apt update - update the packages list and upgrade installed packages using the APT package manager
# Clone a Github repository in the "/opt" dir
cd /opt
sudo rm -rf pimpmykali/
sudo git clone https://github.com/Dewalt-arch/pimpmykali
sudo /opt/pimpmykali/pimpmykali.sh
# For a new kali vm, run menu option N
# hit N for NO root login
reboot
#!/bin/bash
if [ "$1" == "" ]
then
echo "ERROR: Insert an IP address!"
echo "Syntax is: ./ipsweep.sh 192.168.1"
else
# For every IP in the subnet Ping and print the IP
# & = multiple loop instances at once
for ip in `seq 1 254`; do
ping -c 1 $1.$ip | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &
done
fi