Kali Survivor Skills

Set the Target IP address to the $ip system variable:

export ip=192.168.17.131

Find the location of a file:

locate sbd.exe

Search through directories in the $PATH environment variable:

which sbd

Find/search for a file that contains a specific string in it’s name:

find / -name sbd\\*

Show active internet connections:

netstat -lntp

Change password:

passwd

Verify if a service is running and listening:

netstat -antp | grep apache

Start a service:

systemctl start ssh
systemctl start apache2

Have a service start at boot:

Stop a service:

Unzip a gz file:

Unzip a tar.gz file:

Search command history:

Download a webpage:

Open a webpage:

String manipulation

  • Count number of lines in a file:

  • Get the start or end of a file:

  • Extract all the lines that contain a string:

  • Cut a string by a delimiter, filter results then sort:

  • Using Grep and regular expressions and output to a file:

  • Use a bash loop to find the IP address behind each host:

  • Collect all the IP Addresses from a log file and sort by frequency:

Decoding using Kali

  • Decode Base64 Encoded Values:

  • Decode Hexidecimal Encoded Values:

Netcat - Read and write TCP and UDP Packets

  • Listen on TCP/UDP port:

  • Connect to a netcat port:

  • Send a file using netcat:

  • Receive a file using netcat:

  • Some OSs (OpenBSD) will use nc.traditional rather than nc so watch out for that...

  • Create a reverse shell with netcat using cmd.exe on Windows:

  • Create a reverse shell with netcat using bash on Linux:

  • Netcat for Banner Grabbing:

Ncat - Netcat for Nmap project which provides more security avoiding IDS

  • Reverse shell from windows using cmd.exe using ssl:

  • Listen on port 4444 using ssl:

Wireshark

  • Show only SMTP (port 25) and ICMP traffic:

  • Show only traffic in the LAN (192.168.x.x), between workstations and servers -- no Internet:

  • Filter by a protocol ( e.g. SIP ) and filter out unwanted IPs:

  • Some commands are equal:

Tcpdump

  • Display a pcap file:

  • Display ips and filter and sort:

  • Grab a packet capture on port 80:

  • Check for ACK or PSH flag set in a TCP packet:

IPTables

  • Deny traffic to ports except for Local Loopback:

  • Clear ALL IPTables firewall rules:

Last updated

Was this helpful?