Skip to content
Tutorials Center
My learning

Topics

Lesson 31 of 31 ยท Practice, Interviews and Cheat Sheet

Kali and Security Tools Cheat Sheet

A compact Kali Linux and security tools cheat sheet: setup commands, scanning and log-reading concepts, hashing facts, a defensive checklist and a reading order.

This page is a compact reference for the whole track: the commands you meet most often, the numbers worth remembering, a defensive checklist and a suggested reading order. It is not a tutorial. Every section links to the lesson that explains the topic properly, so use it as a map when you come back after a break.

Almost everything here is read-only. The real tools (Kali itself, Nmap, Wireshark, a vulnerability scanner) need a full operating system, a network and, above all, written permission to test. The two examples on this page are runnable stand-ins written in Python: they show the ideas on made-up data and never touch a real machine. Use the tools only on systems you own or are authorized in writing to test, and only inside a safe lab.

The four habits

Authorize Written scope before any scan.
Isolate Test in a lab, never on production.
Observe Capture evidence as you go.
Fix A finding is done when it is retested.

Every lesson in this track comes back to these four.

1 / 2

Ethics and lab first

What Kali is, Law and authorization, Lab setup

Idea The short version
Authorization Written permission from the owner, naming targets, dates and methods.
Scope Only what the document lists is in scope; everything else is off limits.
Rules of engagement Hours, rate limits, who to call if something breaks.
Disclosure Report what you find to the owner privately and give them time to fix it.
Lab Virtual machines on a host-only network, with snapshots, away from production.

A sound lab has no route to your home or office network, one snapshot of a clean state per machine, and deliberately vulnerable training systems only. If you are unsure whether something is allowed, it is not: stop and ask.

Installing and updating Kali

Install and updates, Command line essentials

Terminal
sudo apt update                      # refresh the package lists
sudo apt full-upgrade                # upgrade, allowing packages to be added or removed
sudo apt install kali-linux-default  # the standard tool metapackage
apt list --installed | wc -l         # how many packages are installed
apt show nmap                        # description and version of a package
sudo apt autoremove                  # drop packages nothing needs any more

Kali is a rolling Debian-based distribution, so update before each session and take a snapshot first. The shell skills that matter most are the ones from the Linux tutorial: pipes, grep, awk, sort | uniq -c, redirection and file permissions.

Terminal
nmap -oN scan.txt 192.0.2.10         # save output to a file (read-only example)
grep -c "Failed password" auth.log   # count matching lines
awk '{print $1}' access.log | sort | uniq -c | sort -nr | head
sudo systemctl status ssh            # is a service running?

The address 192.0.2.10 belongs to a range reserved for documentation, which is why it is used throughout this track.

Reconnaissance and DNS

Passive vs active recon, DNS, WHOIS and certificates

Record Holds Why a defender cares
A / AAAA IPv4 / IPv6 address Shows what is exposed on the internet.
CNAME Alias to another name Dangling aliases can be taken over.
MX Mail servers Reveals mail providers and fallbacks.
TXT Free text (SPF, DKIM, verification) Leaks which services you use.
NS Authoritative name servers Who controls your zone.
Terminal
dig example.com A +short             # just the answer
dig example.com MX                   # mail records
whois example.com                    # registration data (often redacted)

Certificate transparency logs list every publicly issued certificate, so they reveal subdomains you may have forgotten. Passive recon reads public data; active recon sends traffic to the target and therefore needs authorization.

Scanning and enumeration

TCP/IP essentials, How port scanning works, Service enumeration, Packet analysis

Scan result What it means
open Something accepted the connection (SYN-ACK came back).
closed The host answered with a reset: reachable, nothing listening.
filtered No answer or an ICMP error: a firewall is probably dropping packets.
Terminal
nmap -sT -p 22,80,443 192.0.2.10     # TCP connect scan of three ports
nmap -sV 192.0.2.10                  # try to identify service versions
nmap -sU -p 53 192.0.2.10            # a UDP probe (slow, ambiguous results)
tcpdump -i eth0 -nn 'tcp port 80'    # capture filter: HTTP traffic only

TCP flags to know by heart: SYN starts a connection, ACK acknowledges, FIN ends politely, RST aborts. A normal handshake is SYN, SYN-ACK, ACK. Cleartext protocols (HTTP, FTP, Telnet) show passwords and content in a capture, which is the best argument for encrypting everything.

Vulnerability assessment

Assessment workflow, Scanners and reports

CVSS base score Rating
0.0 None
0.1 to 3.9 Low
4.0 to 6.9 Medium
7.0 to 8.9 High
9.0 to 10.0 Critical

Score alone is not priority. Combine severity with whether the system is reachable from the internet, whether a fix exists, how valuable the asset is and whether the flaw is being exploited in the wild. Authenticated scans see more (installed package versions) and produce fewer false positives than unauthenticated ones; every finding still needs a human check.

Passwords and hashing

Hashing, Strength and entropy, Auditing a policy

  • Hashing is one way; encryption can be reversed with a key. Store password hashes, never passwords.
  • A unique random salt per password defeats precomputed tables and hides duplicates.
  • Use a deliberately slow, memory-hard algorithm: Argon2id, scrypt or bcrypt, or PBKDF2 with a high iteration count if that is all you have. Fast hashes such as plain SHA-256 or MD5 are the wrong tool.
  • Entropy in bits is length * log2(alphabet size) for random choices. Each extra bit doubles the work for a guesser. Length beats clever substitutions, and a long random passphrase beats a short complex password.
  • Turn on multi-factor authentication, rate-limit logins, check new passwords against breached lists and use a password manager.

Web security

Web basics, Injection defense, Web logs

Problem Core defense
SQL injection Parameterized queries; never build SQL by joining strings.
Cross-site scripting Encode output for its context; set a Content-Security-Policy.
Broken access control Check permissions on the server for every request.
Weak sessions Random IDs, Secure, HttpOnly and SameSite cookie flags.
Missing headers Send HSTS, CSP, X-Content-Type-Options and Referrer-Policy.

A web application firewall adds a layer but does not fix the bug. In access logs, look for bursts from one address, many 401 or 403 responses, requests for paths that do not exist, and odd characters in query strings.

Wireless, firewalls and detection

Wireless concepts, Firewalls and IDS

  • WPA3 is better than WPA2, and WPA2 with AES (CCMP) and a long passphrase is acceptable; WEP and open networks are not.
  • Disable WPS, separate guests from staff, and watch for rogue access points that copy your network name.
  • Default-deny firewalls: allow what you need, drop the rest, and log drops that matter.
  • An IDS (Snort, Suricata) matches traffic against rules; a SIEM collects logs from many sources so you can correlate them. Tune noisy rules instead of ignoring alerts.

Testing process and reporting

Exploitation concepts, Test lifecycle, Reporting

The usual phases are scoping, reconnaissance, assessment, validation, cleanup, reporting and retest. Defenders answer privilege escalation with least privilege, patching and monitoring. A good report opens with an executive summary in plain language, then lists each finding with severity, evidence, impact and a concrete remediation, in a calm and factual tone.

Two runnable stand-ins

The first example is a tiny "which tool for which job" lookup, the way you might keep notes. The second grades a made-up server against a defensive checklist.

Python Tool lookup table (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Python Defensive checklist grader (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Change a value in the dictionary and run it again to see the score move. In a real audit the facts would come from scans, configuration files and interviews rather than a hand-written dictionary.

Suggested reading order

  1. Start with what Kali is, authorization and the lab. Do not skip these.
  2. Learn the environment: installing Kali and shell essentials.
  3. Follow the data: recon, DNS, then TCP/IP, scanning and packets.
  4. Move to defense work: vulnerability assessment, passwords, web security and logs.
  5. Finish with the test lifecycle, reporting, the projects and practice exercises.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which scan result means a host answered with a reset because nothing is listening on the port?

    A reset shows the host is reachable but no service listens on that port. Filtered means no answer, usually because a firewall drops the packets.
  2. 2. Which choice is the best way to store user passwords?

    A slow, salted hash cannot be reversed and makes large-scale guessing expensive. Fast hashes and reversible encryption are both poor choices.
  3. 3. A scanner reports a CVSS score of 9.8 on a server that is only reachable from a closed test network. What is the sensible next step?

    The base score measures severity, not your risk. Exposure and context decide the order in which you fix things, but a critical flaw is still worth fixing.
  4. 4. What must be in place before you scan or test a system with Kali tools?

    Testing without authorization can be illegal even when your intentions are good. The scope document is also your protection.

Summary

  • Authorize, isolate, observe and fix: the four habits behind every lesson in this track.
  • Scan results are open, closed or filtered; TCP handshakes go SYN, SYN-ACK, ACK.
  • Prioritize findings by severity plus exposure, asset value and exploit activity, and retest after fixing.
  • Store passwords as salted, slow hashes, add multi-factor authentication and rate limits.
  • Use parameterized queries and output encoding against injection; read logs for bursts, errors and strange paths.
  • A good report is clear, evidenced and ends with concrete remediation.

That completes the track. To keep practising, return to the project log analyzer or practice exercises.