Linux komandu saraksts
Linux komandu saraksts ar argumentiem un kategoriju filtru.
| Komanda | Kategorija | Līmenis | Apraksts | Galvenie argumenti |
|---|---|---|---|---|
| ls | Faili | core | List directory contents with metadata | -l long format with permissions -a include hidden files -h human-readable sizes -R recursive listing -t sort by modification time -S sort by file size |
| find | Faili | core | Search files by name, type, size, or mtime | -name match by filename pattern -type f=file d=dir l=link -size +/-N[k/M/G] -mtime N days ago modified -exec run command on result -maxdepth limit recursion |
| cp | Faili | core | Copy files and directories | -r recursive copy -p preserve timestamps and mode -u copy only if newer -i prompt before overwrite -v verbose output |
| mv | Faili | core | Move or rename files and directories | -i prompt before overwrite -u move only if newer -f force without prompt -v verbose output |
| rm | Faili | core | Remove files or directories permanently | -r recursive removal -f force, ignore missing -i prompt before each removal -v verbose output |
| ln | Faili | core | Create hard or symbolic links | -s create symbolic link -f force overwrite existing -v verbose output -r make relative symlink |
| stat | Faili | core | Display detailed file and filesystem metadata | -f show filesystem status -c custom format string -t terse machine-readable output |
| file | Faili | core | Determine file type regardless of extension | -i output MIME type -z look inside compressed files -b brief output without filename |
| rsync | Faili | modern | Fast incremental file transfer - local or remote | -a archive mode (recursive + preserve) -v verbose output -z compress data during transfer -P show progress + keep partial files --delete remove files not in source --dry-run simulate without changes --exclude skip pattern |
| fzf | Faili | modern | Interactive fuzzy finder for files, history, and pipes | --preview pipe to preview command --multi allow multiple selections -q start with initial query --height use % of terminal height --bind customize key bindings |
| cat | Teksts | core | Concatenate and print file content to stdout | -n number all output lines -A show all non-printing chars -s suppress repeated blank lines |
| less | Teksts | core | Interactively page through file content | -N show line numbers -S disable line wrapping -i case-insensitive search -F exit if content fits one screen |
| head | Teksts | core | Output the first N lines of a file | -n number of lines (default 10) -c number of bytes -q suppress filename headers |
| tail | Teksts | core | Output the last N lines of a file | -n number of lines (default 10) -f follow file for new content -c number of bytes -q suppress filename headers |
| grep | Teksts | core | Search text using patterns and regular expressions | -i case-insensitive match -r recursive directory search -n prefix output with line number -v invert match (exclude pattern) -E use extended regex (ERE) -P use Perl-compatible regex -l print matching filenames only -c count matching lines -A/-B lines of context after/before |
| sed | Teksts | core | Stream editor - filter and transform text in-place or piped | -i edit files in-place -n suppress default output -e add script expression -r use extended regex s/old/new/g substitute pattern |
| awk | Teksts | core | Pattern scanning and structured text processing | -F set field separator -v assign variable before run -f read program from file NR current record number $1..$N access fields |
| sort | Teksts | core | Sort lines of text files | -n numeric sort -r reverse sort order -u output unique lines only -k sort by key/field column -t set field delimiter -h human-numeric sort (1K, 2M) |
| cut | Teksts | core | Remove sections from each line of input | -d set field delimiter -f select field numbers -c select character positions -b select byte positions |
| wc | Teksts | core | Count lines, words, and bytes in files | -l count lines only -w count words only -c count bytes -m count characters |
| diff | Teksts | core | Compare files line by line and show differences | -u unified diff format -r compare directories recursively -i ignore case differences -w ignore all whitespace |
| tr | Teksts | core | Translate or delete characters from input | -d delete specified characters -s squeeze repeated characters -c complement the character set |
| bat | Teksts | modern | cat replacement with syntax highlighting and git markers | --style header, grid, numbers, changes --language force syntax language -n show line numbers --diff show only changed lines --pager override pager (never to disable) |
| ripgrep (rg) | Teksts | modern | Extremely fast grep - respects .gitignore by default | -i case-insensitive -n show line numbers -l list matching files only --type filter by file type -A/-B lines of context --hidden include hidden files --no-ignore override .gitignore |
| jq | Teksts | modern | JSON processor - slice, filter, map, and transform | '.key' extract object field '.[]' iterate over array -r raw string output (no quotes) --arg pass shell variable into filter 'select()' conditional filter 'keys' list all keys of object |
| ps | Procesi | core | Report a snapshot of current running processes | -e show all processes -f full-format listing aux BSD-style all processes --forest show process tree -o custom output format |
| top | Procesi | core | Interactive real-time process and resource monitor | -d update delay in seconds -u filter by username -n number of iterations then exit -b batch (non-interactive) mode k kill process interactively |
| htop | Procesi | modern | Enhanced interactive process viewer with tree view and meters | -u filter by user -p watch specific PIDs -d delay in tenths of seconds --no-color force plain text F5 toggle tree view F9 send signal to process |
| kill | Procesi | core | Send a signal to a process by PID | -9 SIGKILL - force terminate immediately -15 SIGTERM - graceful shutdown (default) -1 SIGHUP - reload configuration -l list all available signals |
| killall | Procesi | core | Send a signal to all processes matching a name | -9 force kill -15 graceful terminate -i interactive confirm -u kill only processes of user -v verbose output |
| nice | Procesi | core | Launch a command with adjusted CPU scheduling priority | -n niceness value from -20 (highest) to 19 |
| renice | Procesi | core | Change the priority of a running process | -n new niceness value -p apply to PID -u apply to all processes of user -g apply to process group |
| nohup | Procesi | core | Run command immune to terminal hangup (SIGHUP) | nohup cmd & run in background output goes to nohup.out by default |
| strace | Procesi | modern | Trace system calls and signals made by a process | -p attach to running PID -e filter by syscall name or category -o write output to file -f follow child processes (forks) -c print summary statistics on exit -T show time spent per syscall |
| lsof | Procesi | modern | List open files, network sockets, and device handles | -p list files for PID -u list files for user -i network connections (optionally :port) -t output PIDs only for scripting lsof /path what has this file open |
| systemctl | Sistēma | core | Control and query the systemd service manager | start / stop / restart manage service status show unit current state enable / disable set boot behaviour list-units --type=service all services daemon-reload reload unit files is-active / is-enabled check state |
| journalctl | Sistēma | core | Query and display systemd journal logs | -u filter by unit name -f follow log in real time -n show last N lines --since / --until time range -p filter by priority level (err, warn…) -o json structured JSON output --disk-usage show journal size |
| uname | Sistēma | core | Print system kernel and OS information | -a print all information -r kernel release version -m machine hardware architecture -n network hostname -s kernel name |
| uptime | Sistēma | core | Show how long the system has been running | -p pretty human-readable format -s show since date and time |
| dmesg | Sistēma | core | Print or control the kernel ring buffer message log | -T human-readable timestamps -l filter by log level -f filter by facility --follow live stream new messages -H colorized human output |
| sysctl | Sistēma | modern | Read and modify kernel parameters at runtime | -a list all current parameters -w write param=value -p load settings from file (default /etc/sysctl.conf) net.ipv4.ip_forward=1 enable routing |
| timedatectl | Sistēma | modern | Query and change system clock, timezone, and NTP | status show current time settings set-timezone Region/City set-time 'YYYY-MM-DD HH:MM:SS' set-ntp true enable NTP sync |
| env / export | Sistēma | core | Display, set, or export environment variables | export VAR=value set and export env list all current variables printenv VAR print specific variable unset VAR remove variable env -i cmd run with empty environment |
| crontab | Sistēma | core | Schedule recurring tasks via the cron daemon | -e edit current user's crontab -l list current user's crontab -r remove current user's crontab -u user operate on another user's crontab format: min hr dom mon dow command |
| git | Sistēma | modern | Distributed version control - track and collaborate on code | status show working tree state log --oneline --graph compact history diff HEAD changes since last commit stash push/pop shelve and restore changes rebase -i interactive squash/reorder bisect start/good/bad find bug commit blame show line-by-line authorship |
| ansible | Sistēma | modern | Agentless IT automation and configuration management | -i inventory file path --check dry-run (no changes) -v / -vvv verbosity level --tags run only tagged tasks --limit restrict to host subset --vault-id decrypt vault secrets -m specify module for ad-hoc task |
| terraform | Sistēma | modern | Infrastructure as Code - provision cloud and on-prem resources | init initialize working directory plan preview changes apply apply changes to infra destroy tear down resources state list show tracked resources import bring existing resource under management |
| chmod | Tiesības | core | Change file mode bits and permission flags | -R apply recursively u/g/o/a user/group/other/all +/-/= add / remove / set exactly 755 rwxr-xr-x common executable 644 rw-r--r-- common file chmod +x make executable |
| chown | Tiesības | core | Change file owner and/or group ownership | -R recursive -v verbose, print each file user:group change both owner and group --from=user change only if current owner matches |
| chgrp | Tiesības | core | Change the group ownership of files | -R recursive -v verbose output -h change symlinks themselves |
| sudo | Tiesības | core | Execute a command as root or another user | -u user run as specified user -i start root login shell -l list allowed commands -s run shell as target user -v validate and extend timestamp -k invalidate cached credentials |
| umask | Tiesības | core | Set the default permission mask for new files | 022 files 644, dirs 755 (typical server) 027 files 640, dirs 750 (stricter) -S display in symbolic form -p print as umask command for reuse |
| getfacl / setfacl | Tiesības | modern | Get and set POSIX Access Control Lists on files | -m modify or add ACL entry -x remove specific ACL entry -R apply recursively -b remove all extended ACL entries -d set default ACL (for new files in dir) getfacl display all ACL entries |
| auditctl | Tiesības | modern | Configure the Linux Audit subsystem with watch rules | -w add filesystem watch on path -p permission filter: r w x a -l list all current rules -D delete all audit rules ausearch -f search logs by file aureport generate audit reports |
| passwd | Tiesības | core | Change user password and manage account locks | -l lock user account -u unlock user account -e force password expiry on next login -d delete password (enable passwordless login) --stdin read password from stdin (RHEL) |
| ip | Tīkls | core | Manage network interfaces, addresses, routes, and ARP | addr show display all IP addresses addr add/del add/remove address route show display routing table link set up/down bring interface up or down neigh show display ARP table rule list show policy routing rules |
| ss | Tīkls | core | Socket statistics - modern replacement for netstat | -t TCP sockets -u UDP sockets -l listening sockets only -n numeric (no hostname resolution) -p show process using socket -s print summary statistics -4/-6 IPv4 or IPv6 only |
| ping | Tīkls | core | Test network host reachability using ICMP echo | -c number of packets to send -i interval between packets -t set IP TTL value -s packet payload size -W timeout for reply in seconds |
| traceroute | Tīkls | core | Trace the network path packets take to a host | -n numeric output, skip DNS lookup -m set maximum TTL (hops) -w wait timeout per probe -I use ICMP echo requests -T use TCP SYN packets |
| dig | Tīkls | core | DNS query tool - lookup and troubleshoot records | +short terse answer only +trace follow full delegation chain @server query specific resolver ANY request all record types AAAA request IPv6 address record +noall +answer clean output |
| nslookup | Tīkls | core | Interactive and non-interactive DNS lookup | nslookup domain basic lookup nslookup domain server use specific resolver set type=MX change query type |
| ssh | Tīkls | core | Secure Shell - remote login, execution, and tunneling | -i identity (private key) file -p remote port number -L local port forwarding -R remote port forwarding -J jump through bastion host -N do not execute remote command -X enable X11 forwarding -v verbose debug output |
| nftables (nft) | Tīkls | modern | Modern kernel packet filtering - replaces iptables | list ruleset show all rules add table ip create table add chain add chain to table add rule append filtering rule flush ruleset delete all rules -f file load from rules file |
| iptables | Tīkls | core | Kernel IPv4 packet filtering and NAT firewall | -A append rule to chain -D delete specific rule -L list chain rules -F flush / clear chain -P set default chain policy -j jump to target: ACCEPT DROP REJECT |
| firewall-cmd | Tīkls | modern | Management tool for firewalld (used on RHEL/CentOS/Rocky) | --list-all show zone config --add-port=80/tcp open port --add-service=https allow service --remove-port close port --permanent persist across reboots --reload apply permanent rules |
| curl | Pārsūtīšana | core | Transfer data over HTTP, HTTPS, FTP, and many other protocols | -o write output to file -X specify HTTP method (GET POST PUT…) -H add custom request header -d send POST body data -L follow 3xx redirects -k skip TLS certificate verification --retry N retry on transient failure --compressed request and handle gzip --data-binary send raw binary data -u user:pass HTTP basic authentication --form send multipart/form-data -s silent mode (no progress bar) |
| wget | Pārsūtīšana | core | Non-interactive network file downloader | -r recursive download -O save to specified filename -q quiet mode -c continue interrupted download -P set local directory prefix --spider check URL without downloading --limit-rate throttle download speed --user / --password authentication |
| scp | Pārsūtīšana | core | Securely copy files between hosts over SSH | -r recursive copy of directories -P specify remote port -i identity (private key) file -p preserve timestamps and modes -v verbose debug output |
| sftp | Pārsūtīšana | core | Interactive secure file transfer over SSH | -P specify port -i identity file get / put download / upload file ls / lls list remote / local files mget / mput batch transfer |
| tcpdump | Uzraudzība | modern | Capture and analyze raw network traffic packets | -i specify interface -w write packets to pcap file -r read from pcap file -n no hostname/port resolution host X filter by IP address port N filter by port number -A print payload in ASCII -c N capture N packets then exit 'tcp and port 443' BPF filter example |
| nethogs | Uzraudzība | modern | Per-process real-time network bandwidth monitor | -d refresh delay in seconds -t run in trace (non-interactive) mode -p enable promiscuous mode device specify interface to monitor |
| iftop | Uzraudzība | modern | Display real-time bandwidth usage per network connection | -i network interface to listen on -n suppress DNS hostname lookups -P show port numbers in output -B display in bytes (not bits) |
| iostat | Uzraudzība | modern | Report CPU utilization and I/O statistics for devices | -x extended device statistics -d display device I/O only -c display CPU statistics only -k display stats in kilobytes -m display stats in megabytes interval count repeat sampling |
| vmstat | Uzraudzība | modern | Report virtual memory, CPU, and disk I/O statistics | -s display memory statistics table -d display disk statistics -w wide output format interval count periodic sampling |
| sar | Uzraudzība | modern | Collect, report, and save system activity data | -u CPU utilization -r memory statistics -n DEV network interface stats -d disk activity -f read from data file -s specify start time 1 5 sample every second, 5 times |
| glances | Uzraudzība | modern | Cross-platform curses system monitor with export plugins | -w start as web server --port web server port -1 per-CPU core display -t refresh interval --export csv/json output data --browser discover remote glances |
| netstat | Uzraudzība | core | Network statistics - legacy tool (use ss on modern systems) | -t TCP connections -u UDP sockets -l listening ports only -n numeric IPs and ports -p show program using socket -r show routing table |
| df | Diski | core | Report file system disk space usage | -h human-readable sizes -T show filesystem type -i show inode usage -a include all filesystems -x exclude filesystem type |
| du | Diski | core | Estimate file and directory space on disk | -h human-readable output -s display summary total only -a report for all files -d N limit depth to N levels --exclude skip matching pattern du -sh ./* size of each item in CWD |
| lsblk | Diski | core | List block devices and partitions in tree format | -a show all including empty devices -f show filesystem and UUID -o specify output columns -d do not show device children -p print full device path |
| fdisk | Diski | core | Manipulate MBR partition tables interactively | -l list all partition tables -u use sectors as units p print table n new d delete w write and exit q quit no save |
| parted | Diski | core | Partition manipulation - supports GPT and large disks | -l list all disks and partitions mkpart create new partition resizepart resize existing partition print show partition table rm N remove partition N |
| mount / umount | Diski | core | Attach or detach filesystems to the directory tree | -t specify filesystem type -o mount options (rw, ro, noexec…) -a mount all entries in /etc/fstab -r mount as read-only --bind bind-mount a directory umount -l lazy unmount |
| lvm (pvs/vgs/lvs) | Diski | modern | Logical Volume Manager - flexible disk abstraction layer | pvcreate initialize physical volume vgcreate create volume group lvcreate -L -n create logical volume lvextend -L +size grow LV lvreduce -L -size shrink LV vgdisplay / lvdisplay inspect |
| smartctl | Diski | modern | Monitor disk health using S.M.A.R.T. diagnostics | -a print all SMART information -H check health summary only -t short/long run self-test -l selftest view test results --scan find all SMART-capable drives |
| tar | core | Create and extract archives; compose with compressors | -c create new archive -x extract archive contents -z filter through gzip (.tar.gz) -j filter through bzip2 (.tar.bz2) --zstd filter through zstd (.tar.zst) -v verbose - list files processed -f specify archive filename -t list archive contents without extract --strip-components N strip N path levels |
|
| gzip / gunzip | core | Compress or decompress files in .gz format | -d decompress file -k keep original file -v verbose output -9 maximum compression level -1 fastest compression -l list compression statistics |
|
| zip / unzip | core | Create or extract ZIP archives | zip -r recursive add directory -e encrypt with password -9 maximum compression unzip -l list archive contents unzip -d dir extract to directory -v verbose listing |
|
| zstd | modern | Fast modern compression - high speed at good ratios | -d decompress file -k keep original -T0 use all CPU threads -19 high compression level --fast alias for level 1 --progress show progress during compress |
|
| nmap | Ielaušanās tests | security | Network scanner - host discovery, port scan, service detection | -sV detect service versions -sC run default NSE scripts -O enable OS fingerprinting -p specify port range (e.g. 1-65535) -A aggressive: OS+version+scripts+traceroute --script run specific NSE script name -oN / -oX output to file (normal/XML) -Pn skip host discovery (assume up) -sS TCP SYN stealth scan |
| netcat (nc) | Ielaušanās tests | security | TCP/UDP multipurpose tool - banner grab, file pipe, reverse shell | -l listen mode (server side) -v verbose output -z zero-I/O scan mode (port check) -u use UDP instead of TCP -e execute command on connect -p specify source port nc -lvnp 4444 listener for reverse shell |
| openssl | Ielaušanās tests | security | TLS/SSL toolkit - certificates, keys, encryption, and testing | s_client -connect host:443 test TLS x509 -in cert.pem -text inspect cert genrsa -out key.pem 4096 generate RSA key req -new generate CSR enc -aes-256-cbc encrypt/decrypt file verify -CAfile validate certificate chain speed benchmark cipher performance |
| ssh-keygen | Ielaušanās tests | security | Generate, manage, and convert SSH authentication keys | -t ed25519 modern key type (recommended) -b 4096 key bit length (for RSA) -C 'comment' add identifying comment -f output file path -p change or remove passphrase -l print key fingerprint -A generate all default host key types |
| gpg | Ielaušanās tests | security | GNU Privacy Guard - encrypt, decrypt, sign, and verify data | --gen-key generate new key pair -e -r recipient encrypt file --decrypt decrypt .gpg file -s create detached signature --verify verify signature file --armor output in ASCII armor format --export / --import key management |
| lynis | Ielaušanās tests | security | Security auditing tool - scan and harden Linux systems | audit system run full system audit --tests-from-group auth focus on group --quiet suppress informational output --no-colors plain text output --pentest pentest-oriented mode --report-file write report to file |
| fail2ban-client | Ielaušanās tests | security | Manage fail2ban - auto-ban IPs on repeated failures | status list all active jails status sshd show ssh jail details set sshd unbanip IP manually unban reload reload configuration start / stop control service banned list currently banned IPs |
| hashcat | Ielaušanās tests | security | GPU-accelerated password hash cracking tool | -m hash type (0=MD5, 1800=sha512crypt) -a attack mode (0=dict, 3=bruteforce) -w workload profile (1–4) -r apply rules file --show show already cracked hashes --status live progress update |
| john (JtR) | Ielaušanās tests | security | CPU-based password hash cracker with auto-detection | --wordlist dictionary file path --rules apply mangling rules --format specify hash type --show display cracked passwords --fork N run N parallel processes unshadow merge passwd and shadow |
| docker | Konteineri | modern | Build, ship, and run application containers | run -d run container detached run --rm auto-remove on exit exec -it open shell in running container logs -f follow container log stream inspect detailed JSON metadata ps -a list all containers (including stopped) build -t build image with tag network ls / inspect manage networks volume ls / inspect manage volumes system prune remove unused resources |
| kubectl | Konteineri | modern | CLI to manage Kubernetes clusters and workloads | get pods/svc/nodes list resources describe pod name detailed event log apply -f manifest.yaml deploy/update resource exec -it pod -- bash shell into pod logs -f pod follow pod log stream top node / top pod resource usage rollout status/undo deployment control port-forward forward local port to pod config use-context switch cluster |
| podman | Konteineri | modern | Rootless daemonless OCI container engine - docker-compatible | run --rm auto-remove after exit --user 1000 run as non-root UID --pod attach to pod group -v bind mount host volume generate kube export as Kubernetes YAML play kube run from Kubernetes YAML pod create / start / stop manage pods |
| helm | Konteineri | modern | Kubernetes package manager for templated chart deployments | install release chart deploy chart upgrade --install upsert deploy rollback release N revert to revision list show all deployed releases values chart show default values repo add / update manage chart repos template render manifests locally |
Sistēmas audits
Pārbaudes ir sagrupētas pēc auditora jautājumiem: kas notika, kam ir piekļuve, kas startē pats, kas ir atvērts tīklam, vai faili ir neskarti un vai konfigurācija atbilst ieteiktajai. Visas komandas tikai lasa, neko nemainot. Daļai vajag root tiesības (sudo). Saglabā rezultātu kā bāzlīniju - nākamajā auditā izmaiņas pret to ir redzamākas par pašām vērtībām.
Kā audits notiek no plānošanas līdz ziņojumam, skaidro drošības audita ceļvedis.
Žurnāli un pieteikšanās
-
Neveiksmīgas pieteikšanās pa SSH
sudo journalctl --since "24 hours ago" | grep -Ei "failed password|invalid user"sudo grep -Ei "failed password|invalid user" /var/log/auth.logUz ko skatīties: Daudz mēģinājumu no vienas adreses ir paroļu minēšana. Mēģinājumi ar īstiem lietotājvārdiem ir bīstamāki par nejaušiem, un sekmīga pieteikšanās tūlīt pēc neveiksmīgu virknes ir jāizmeklē. RHEL saimē žurnālfails ir /var/log/secure.
-
Kas, kad un no kurienes pieslēdzās
last -a | head -30sudo lastb -a | head -30Uz ko skatīties: Pieteikšanās neparastā laikā, no nezināmas adreses vai kontā, kam nav jāpieslēdzas. Otrā komanda rāda neveiksmīgos mēģinājumus. Debian 13 un jaunākās distribūcijās last vietā ir wtmpdb last.
-
Kas ko izpildīja ar root tiesībām
sudo journalctl _COMM=sudo --since "7 days ago"Uz ko skatīties: Rinda ar COMMAND= rāda, kurš lietotājs ko izpildīja. Aizdomīgi: sudo no konta, kam tas nav vajadzīgs, čaulas atvēršana (sudo -i, sudo su, sudo bash) un komandas no /tmp.
-
Kļūdas un pārstartēšanas
sudo journalctl -p err -bsudo journalctl --list-bootsUz ko skatīties: Atkārtotas servisu kļūdas un pārstartēšanas, ko neviens neplānoja. Negaidīta pārstartēšana var nozīmēt avāriju vai iejaukšanos.
-
Vai žurnāli nav dzēsti vai bojāti
sudo journalctl --verifysudo ls -la /var/logUz ko skatīties: Pirmā komanda ziņo par bojātiem žurnāla failiem. Tukši vai pēkšņi saīsināti žurnālfaili un robs laika rindā liecina, ka kāds slēpj pēdas.
-
Audita apakšsistēma (auditd)
sudo aureport --summarysudo ausearch -m USER_LOGIN -sv no -ts today -iUz ko skatīties: Kopsavilkums rāda notikumu skaitu pa veidiem, ausearch - šodienas neveiksmīgās pieteikšanās. Ja auditd nav instalēts, tas pats ir atradums: bez tā nav pēdas, kurš mainīja failus un tiesības. Novērošanas kārtulas iestata auditctl (komandu tabulā).
Konti un tiesības
-
Konti ar root tiesībām (UID 0)
awk -F: '$3 == 0 {print $1}' /etc/passwdUz ko skatīties: Jābūt tikai root. Jebkurš cits konts ar UID 0 ir pilntiesīgs administrators ar citu vārdu.
-
Konti, kas var pieteikties
awk -F: '$7 !~ /(nologin|false)$/ {print $1, $7}' /etc/passwdUz ko skatīties: Servisu kontiem (www-data, postgres u.c.) čaula nav vajadzīga. Katram saraksta kontam jāpieder kādam, kas šajā sistēmā tiešām strādā.
-
Konti bez paroles un paroļu termiņi
sudo awk -F: '$2 == "" {print $1}' /etc/shadowsudo chage -l <lietotājs>Uz ko skatīties: Tukšs paroles lauks nozīmē pieteikšanos bez paroles. Komanda chage rāda, kad parole mainīta un vai kontam ir derīguma termiņš.
-
Kam ir sudo tiesības
getent group sudo wheelsudo grep -rEv '^\s*(#|$)' /etc/sudoers /etc/sudoers.d/Uz ko skatīties: Meklē NOPASSWD un ALL=(ALL) ALL kontiem, kam pilnas tiesības nav vajadzīgas. Fails sudoers.d mapē, ko neviens neatceras pievienojis, ir aizdomīgs.
-
SSH atslēgas
sudo find /root /home -name authorized_keys -type f -exec ls -l {} +Uz ko skatīties: Katra atslēga ļauj pieteikties bez paroles. Nezināma atslēga vai nesen mainīts fails ir viena no biežākajām pastāvības metodēm (MITRE ATT&CK T1098.004). Apskati arī failu saturu.
Palaišana un plānotie uzdevumi
-
Servisi, kas startē automātiski
systemctl list-unit-files --type=service --state=enabledsystemctl cat <serviss>Uz ko skatīties: Katram servisam jābūt zināmam nolūkam. Nezināms nosaukums vai ExecStart ar failu no /tmp, /dev/shm vai lietotāja mapes ir jāizmeklē.
-
Nesen mainīti servisu faili
sudo find /etc/systemd /usr/lib/systemd -type f -mtime -30Uz ko skatīties: Faili, kas mainīti pēdējās 30 dienās un nesakrīt ne ar atjauninājumu, ne ar jūsu pašu izmaiņām.
-
Plānotie uzdevumi (cron un taimeri)
systemctl list-timers --allls -la /etc/cron.d /etc/cron.daily /etc/cron.hourlyfor u in $(cut -d: -f1 /etc/passwd); do sudo crontab -l -u "$u" 2>/dev/null | sed "s/^/$u: /"; doneUz ko skatīties: Uzdevumi, kas lejupielādē un palaiž kodu (curl, wget, base64), un lietotāju crontab ieraksti, ko neviens nav ieplānojis.
Servisi
-
Strādājošie servisi
systemctl list-units --type=service --state=running --no-pagerUz ko skatīties: Katram servisam jābūt zināmam nolūkam un īpašniekam. Serviss, ko neviens nevar izskaidrot, ir lieka uzbrukuma virsma - atzīmē to ziņojumā, un atspējošanu saskaņo ar sistēmas īpašnieku.
-
Servisi ar kļūdām
systemctl --failed --no-pagersystemctl is-system-runningUz ko skatīties: Atbilde degraded nozīmē, ka vismaz viens serviss nav startējis. Nostrādājis drošības serviss (ugunsmūris, žurnalēšana, rezerves kopijas) ir atradums, pat ja sistēma citādi strādā.
-
Viena servisa stāvoklis un žurnāls
systemctl status <serviss> --no-pagersudo journalctl -u <serviss> --since "24 hours ago" --no-pagerUz ko skatīties: Vai serviss ir enabled un active, cik reizes tas pārstartējies un kādas kļūdas tas raksta. Bieža pārstartēšanās slēpj avāriju, ko lietotāji vēl nav pamanījuši.
-
Kurš serviss tur portu
sudo ss -tlpn 'sport = :<ports>'systemctl status <PID> --no-pagerUz ko skatīties: Pirmā komanda dod procesa PID, otrā - servisu, kam tas pieder. Ports bez servisa (process palaists ar roku vai no cron) ir jāizskaidro.
-
Servisu izolācija
systemd-analyze security --no-pagersystemd-analyze security <serviss> --no-pagerUz ko skatīties: Vērtējums no 0 (izolēts) līdz 10 (bez ierobežojumiem). Tīkla servisam ar UNSAFE vērtējumu iesaki ierobežojumus, piemēram, NoNewPrivileges un ProtectSystem. Tas ir ieteikums, ne kļūda.
Tīkla virsma
-
Porti, kas gaida savienojumus
sudo ss -tulpnUz ko skatīties: Katram portam jābūt zināmam servisam. Adrese 0.0.0.0 vai [::] nozīmē, ka serviss ir pieejams no tīkla. Datubāzei un pārvaldības panelim parasti jāklausās tikai 127.0.0.1.
-
Aktīvie savienojumi
sudo ss -tnp state establishedUz ko skatīties: Savienojumi uz nezināmām ārējām adresēm, īpaši no procesiem, kam nav jāsazinās ar internetu.
-
Ugunsmūra kārtulas
sudo nft list rulesetsudo iptables -SUz ko skatīties: Ienākošās datplūsmas noklusējuma politikai jābūt drop vai deny. Kārtula, kas atļauj visu bez ierobežojuma, atceļ pārējās.
-
Ugunsmūris ufw un atvērtie porti
sudo ufw status verbosesudo ufw status numberedsudo ufw show listeningUz ko skatīties: Pirmā rinda saka, vai ufw vispār ir active, un noklusējumam ienākošajiem jābūt deny. show listening saliek gaidošos portus blakus kārtulām: ports bez atļaujošas kārtulas no tīkla nav sasniedzams, un kārtula bez servisa ir lieka.
-
Konteineru publicētie porti
docker ps --format 'table {{.Names}}\t{{.Ports}}'sudo iptables -S DOCKER-USERUz ko skatīties: Docker publicētos portus pārsūta pirms ufw kārtulām, tāpēc ufw status tos nerāda un nebloķē. 0.0.0.0:5432->5432 nozīmē, ka datubāze ir atvērta tīklam neatkarīgi no ufw. Ierobežojumi konteineriem pieder ķēdei DOCKER-USER.
Integritāte un atjauninājumi
-
SUID un SGID faili
sudo find / -xdev -type f \( -perm -4000 -o -perm -2000 \) 2>/dev/nullUz ko skatīties: Šie faili izpildās ar īpašnieka (bieži root) tiesībām. Salīdzini ar iepriekšējo sarakstu. Jauns fails vai fails /tmp, /home vai /dev/shm ir tiesību paaugstināšanas ceļš.
-
Faili, ko var mainīt ikviens
sudo find / -xdev -type f -perm -0002 2>/dev/nullUz ko skatīties: Sistēmas mapēs (/etc, /usr, /opt) tādu nedrīkst būt. Ja ikviens var mainīt skriptu, ko palaiž root, tas ir tiešs ceļš uz pilnām tiesībām.
-
Instalēto pakotņu integritāte
sudo dpkg --verifysudo rpm -VaUz ko skatīties: Cipars 5 trešajā pozīcijā (??5??????) nozīmē, ka faila saturs atšķiras no pakotnes. Konfigurācijas failiem (atzīme c) tas ir normāli, izpildāmiem failiem /usr/bin un /usr/sbin - nē. Pirmā komanda ir Debian un Ubuntu sistēmām, otrā - RHEL saimei.
-
Nesen mainīti sistēmas faili
sudo find /etc /usr/bin /usr/sbin -xdev -type f -mtime -2Uz ko skatīties: Izmaiņas pēdējās 2 dienās, kas nesakrīt ne ar atjauninājumu, ne ar jūsu pašu izmaiņām.
-
Gaidošie drošības atjauninājumi
apt list --upgradablesudo dnf updateinfo list --securityUz ko skatīties: Neuzlikts drošības labojums ir zināma ievainojamība ar publisku aprakstu. Paskaties arī, kad sistēma atjaunināta pēdējo reizi.
Konfigurācija
-
SSH servera faktiskie iestatījumi
sudo sshd -T | grep -Ei "^(permitrootlogin|passwordauthentication|pubkeyauthentication|maxauthtries|x11forwarding) "Uz ko skatīties: Komanda sshd -T rāda konfigurāciju, kas ir spēkā pēc visiem iekļautajiem failiem. Ieteicams permitrootlogin no (vai prohibit-password) un passwordauthentication no, ja pieslēdzas ar atslēgām.
-
Kodola drošības parametri
sysctl kernel.randomize_va_space kernel.kptr_restrict net.ipv4.ip_forward net.ipv4.conf.all.accept_redirectsUz ko skatīties: Vērtībai randomize_va_space jābūt 2 (pilna adrešu randomizācija), kptr_restrict 1 vai 2 slēpj kodola adreses, accept_redirects 0 aizsargā pret maršruta pārrakstīšanu. Parametrs ip_forward 1 der tikai maršrutētājam vai konteineru hostam.
-
Automatizēts drošības audits
sudo lynis audit systemUz ko skatīties: Lynis pārbauda simtiem iestatījumu un dod drošības indeksu (hardening index) ar konkrētiem ieteikumiem. Pilns pārskats ir /var/log/lynis-report.dat.
Problēmu novēršana
Sāc ar diviem jautājumiem: kas mainījās un vai problēma skar vienu lietotāju vai visus. Tad ej pa slāņiem no apakšas uz augšu - saskarne un adrese, maršruts, DNS un tikai tad serviss. Komandas tikai nolasa stāvokli, ko mainīt, pasaka piezīme.
Tīkls
-
Vai saskarne ir augšā un tai ir adrese
ip -br linkip -br addressnmcli device statusKo darīt: Statuss DOWN nozīmē, ka nav saites - kabelis, Wi-Fi vai komutatora ports. Tikai 169.254.x.x adrese vai IPv4 adreses trūkums nozīmē, ka DHCP neatbildēja.
-
Maršruts un vārteja
ip routeip route get <mērķa IP>ip neigh showKo darīt: Bez default rindas dators sasniedz tikai savu apakštīklu. ip route get parāda, pa kuru saskarni un vārteju iet konkrēts mērķis - VPN to bieži maina. Vārteja ar statusu FAILED vai INCOMPLETE neatbild uz ARP, tātad problēma ir lokālajā tīklā.
-
Kur ceļš pārtrūkst
ping -c 4 <vārteja>ping -c 4 1.1.1.1tracepath -n <mērķis>Ko darīt: Vārteja atbild, ārēja adrese nē - problēma ir aiz rūtera. Neatbildošs ping vēl nenozīmē, ka mērķis nedarbojas. Daudzi serveri ICMP bloķē, tāpēc pārbaudi pašu portu.
-
Vai ports ir sasniedzams
nc -zv -w 5 <mērķis> 443curl -sv -o /dev/null https://<mērķis>env | grep -i proxyKo darīt: Connection refused nozīmē, ka mērķis atbildēja, bet portā neviens neklausās vai ugunsmūris savienojumu noraida. Taimauts nozīmē, ka paketes kaut kur pa ceļam klusi nomet. curl parāda arī TLS kļūdas, un proxy mainīgie - vai komandrinda iet caur starpniekserveri. Tieši tur bieži atšķiras pārlūks un skripts.
-
Lielas paketes iestrēgst (MTU)
ping -c 3 -M do -s 1472 <mērķis>ip link show | grep -o 'mtu [0-9]*'Ko darīt: Klasisks simptoms - savienojums izveidojas un mazas lapas atveras, bet lielas lejupielādes vai TLS rokasspiediens iestrēgst, īpaši caur VPN vai PPPoE. Ja 1472 baitu pakete atgriež Message too long vai paliek bez atbildes, samazini -s, līdz atrodi ceļa MTU.
DNS
-
Kurš DNS serveris tiek lietots
resolvectl statuscat /etc/resolv.confKo darīt: Ja serveris ir nepareizs vai nesasniedzams, domēni netiek atrasti, kaut tīkls strādā. Ar systemd-resolved resolv.conf norāda uz 127.0.0.53, un īstie serveri - arī tie, ko pievieno VPN saskarne - redzami resolvectl izvadē.
-
Ko atbild DNS serveris
dig <domēns>dig @1.1.1.1 <domēns>resolvectl query <domēns>Ko darīt: Skaties rindu status: NXDOMAIN - domēns neeksistē, SERVFAIL - serveris nevarēja atbildēt (bieži DNSSEC vai augšupējā servera kļūme), NOERROR bez ANSWER sadaļas - šāda tipa ieraksta nav. Ja publiskais serveris atbild, bet vietējais nē, vaina ir vietējā DNS. Iekšējos domēnus publiskais serveris nezina, tur atšķirība ir normāla. dig ir pakotnē dnsutils vai bind-utils.
-
Ko redz programmas
getent hosts <domēns>grep -v '^#' /etc/hostsgrep '^hosts' /etc/nsswitch.confKo darīt: getent iet to pašu ceļu kā programmas - hosts failu un DNS secībā, ko nosaka nsswitch.conf. Ja dig atbild pareizi, bet getent nē, vaina ir hosts failā vai kešā. Novecojis ieraksts hosts failā ir bieža aizmirsta kļūda, kešu iztīra resolvectl flush-caches.
Servisi
-
Stāvoklis un izejas kods
systemctl status <serviss> --no-pagersystemctl --failed --no-pagerKo darīt: Rindā Main PID redzams izejas kods, zem tās - pēdējās žurnāla rindas. status=203/EXEC nozīmē, ka nav atrasts izpildāmais fails, 217/USER - ka nav norādītā lietotāja.
-
Žurnāls kopš sistēmas startēšanas
journalctl -u <serviss> -b --no-pagerjournalctl -u <serviss> -p err --since today --no-pagerKo darīt: Lasi pirmo kļūdu, ne pēdējo - pēdējās bieži ir sekas. Permission denied norāda uz tiesībām vai SELinux, Address already in use - uz aizņemtu portu.
-
Vai konfigurācija ir derīga
systemctl cat <serviss>systemd-analyze verify <serviss>.servicesudo sshd -tsudo nginx -tKo darīt: Lielākajai daļai servisu ir sava pārbaude, kas neko nemaina (sshd -t, nginx -t, apachectl configtest, named-checkconf). Palaid to pirms restarta, citādi kļūdaina konfigurācija aptur strādājošu servisu.
-
Kas jau aizņem portu
sudo ss -tlpn 'sport = :<ports>'Ko darīt: Ja portu tur cits process, viens no tiem jāpārkonfigurē vai jāaptur. Bieži tā ir paša servisa vecā instance vai cits tīmekļa serveris.
Disks un failu sistēma
-
Vai disks nav pilns
df -hdf -iKo darīt: Pilns disks aptur datubāzes un žurnālus. df -i rāda inode - kad tie beigušies, jaunus failus izveidot nevar arī ar brīvu vietu (miljoniem sīku failu, piemēram, sesijas vai kešs).
-
Kas aizņem vietu
sudo du -xh --max-depth=1 / 2>/dev/null | sort -h | tail -15journalctl --disk-usagedocker system dfKo darīt: Bieži vainīgie: žurnāli, vecas kopijas, Docker attēli. Tīri ar rīka paša komandu (journalctl --vacuum-time, docker image prune), ne ar rm.
-
df rāda pilnu, du vietu neatrod
sudo lsof +L1Ko darīt: Izdzēsts fails, ko process vēl tur atvērtu, aizņem vietu, līdz process to aizver - tipiski izdzēsts žurnāls. lsof +L1 nosauc procesu, un vieta atbrīvojas pēc tā restarta.
-
Vai disks un failu sistēma ir vesela
findmnt -no OPTIONS /findmnt --verifysudo dmesg -T | grep -iE 'i/o error|ext4-fs error|xfs.*error' | tailsudo smartctl -H /dev/<disks>Ko darīt: I/O kļūdas kodola žurnālā vai SMART rezultāts, kas nav PASSED, ir diska bojājuma pazīme - vispirms rezerves kopija, tad nomaiņa. Pēc kļūdām kodols var pārslēgt failu sistēmu tikai lasīšanai (ro opcijās). findmnt --verify atrod kļūdas fstab failā.
Veiktspēja
-
Kas noslogo procesoru
nprocuptimetop -b -n 1 | head -20Ko darīt: Load average, kas ilgstoši pārsniedz kodolu skaitu (nproc), nozīmē rindu. Linux tajā ieskaita arī procesus, kas gaida disku (stāvoklis D), tāpēc augsts load ar zemu CPU parasti ir diska, ne procesora problēma.
-
Vai atmiņa nav beigusies
free -hps aux --sort=-%mem | head -10sudo journalctl -k --no-pager | grep -i 'out of memory' | tailKo darīt: Svarīga ir kolonna available, ne free - Linux brīvo atmiņu izmanto kešam. Mazs available ar aktīvu swap padara sistēmu lēnu, un OOM killer žurnālā nosauc procesu, ko kodols apturēja.
-
Vai sistēma gaida disku
vmstat 1 5cat /proc/pressure/ioiostat -xz 1 3Ko darīt: Augsta wa kolonna vmstat izvadē nozīmē, ka procesors gaida disku. iostat (pakotne sysstat) parāda, kurš disks - %util ap 100 un augsts await norāda uz sastrēgumu. Kurš process raksta, parāda iotop.
Startēšana un atjauninājumi
-
Kļūdas iepriekšējā un šajā startēšanā
journalctl --list-boots --no-pager | tail -5journalctl -b -1 -p err --no-pagerjournalctl -b -p err --no-pagerKo darīt: Iepriekšējās startēšanas žurnāls (-b -1) parāda, kas notika pirms avārijas vai pārstartēšanas. Tam vajag pastāvīgu žurnālu - ja --list-boots rāda tikai vienu ierakstu, izveido mapi /var/log/journal.
-
Kodola un aparatūras kļūdas
sudo dmesg -T --level=err,warn | tail -30Ko darīt: Draiveru un aparatūras kļūdas parādās šeit agrāk nekā lietotņu žurnālos. Pēc kodola atjauninājuma var palīdzēt startēšana ar iepriekšējo kodolu no GRUB izvēlnes.
-
Kas palēnina startēšanu
systemd-analyze blame --no-pager | head -15systemd-analyze critical-chain --no-pagerKo darīt: Serviss, kas gaida tīklu vai neesošu disku, var aizturēt visu startu. Bieža vaina ir fstab ieraksts diskam, kura vairs nav - bez opcijas nofail sistēma gaida 90 sekundes un var nonākt avārijas režīmā.
-
Kas mainījās pēdējā atjauninājumā
grep -E ' (install|upgrade) ' /var/log/dpkg.log | tail -20dnf history list | headcat /var/run/reboot-requiredKo darīt: Ja problēma sākās pēc atjauninājuma, šis saraksts sašaurina vainīgo. Fails reboot-required nozīmē, ka jaunais kodols vai bibliotēkas vēl nav ielādētas. Atgriezt var ar pakotņu pārvaldnieku (dnf history undo, apt ar konkrētu vecāku versiju).
Piekļuve un laiks
-
Kāpēc Permission denied
namei -l <ceļš>id <lietotājs>Ko darīt: namei parāda tiesības katram ceļa posmam - bieži bloķē mape augstāk, ne pats fails. id parāda lietotāja grupas, un jauna grupa stājas spēkā tikai pēc atkārtotas pieteikšanās.
-
SELinux vai AppArmor liegums
getenforcesudo ausearch -m AVC -ts recentsudo aa-statussudo journalctl -k --no-pager | grep -i 'apparmor="denied"'Ko darīt: Ja tiesības izskatās pareizas, bet piekļuve liegta, to var darīt SELinux vai AppArmor - liegums redzams audita vai kodola žurnālā. Neizslēdz moduli - pielāgo politiku vai faila kontekstu (restorecon).
-
Kāpēc neizdodas SSH pieteikšanās
ssh -v <lietotājs>@<serveris>sudo journalctl -u ssh -u sshd --since '1 hour ago' --no-pagerls -ld ~ ~/.ssh ~/.ssh/authorized_keysKo darīt: Klienta -v izvade parāda, kurā solī serveris atteica - atslēga, parole vai algoritms. Servera žurnālā Authentication refused: bad ownership or modes nozīmē pārāk plašas tiesības - mājas mapē un .ssh citiem nedrīkst būt rakstīšanas tiesību, authorized_keys jābūt 600.
-
Vai laiks ir pareizs
timedatectlchronyc trackingKo darīt: Nepareizs laiks lauž TLS (sertifikāts vēl nav derīgs), Kerberos un 2FA kodus. Rindā System clock synchronized jābūt yes.
Ielaušanās tests
Ielaušanās tests pārbauda aizsardzību no uzbrucēja skatpunkta. Sadaļa seko posmiem: izlūkošana, tīmekļa virsma, TLS, paroles un pieejamības noturība. Katram ierakstam blakus ir aizsardzība - ielaušanās tests ir vērtīgs tikai tad, ja atradumi tiek novērsti. Rīki parasti nāk no testētāja mašīnas (bieži Kali Linux), tāpēc tie ir vieni abām sistēmām.
Uzbrukuma virsmu un tās samazināšanu skaidro uzbrukuma virsmas ceļvedis.
Šī sadaļa ir izglītojošiem nolūkiem. Lieto šīs metodes TIKAI pret sistēmām, kas tev pieder vai ko tev ir rakstiska atļauja testēt. Neatļauta skenēšana un testēšana ir sodāma (Krimināllikums 241.-243. pants). Mērķa vietā <mērķis> ieraksti savu testa sistēmu.
Izlūkošana un portu skenēšana
-
Hostu un atvērto portu atklāšana
nmap -sn 10.0.0.0/24nmap -sV -p- <mērķis>Aizsardzība: Katrs atvērts ports ir ieejas punkts. Aizver neizmantotos servisus, piesaisti pārvaldību un datubāzes 127.0.0.1 adresei un liec internetam pieejamos aiz ugunsmūra. Tas pats skatpunkts ir sistēmas audita tīkla sadaļā.
-
Pakalpojumu un versiju noteikšana
nmap -sV --script=banner <mērķis>whatweb <url>Aizsardzība: Versija pasaka uzbrucējam, kuru publisko ievainojamību meklēt. Noņem versiju atklājošās galvenes (Server, X-Powered-By) un turi servisus atjauninātus.
-
DNS un zonu pārsūtīšana
dig AXFR @<ns> <domēns>dnsrecon -d <domēns>Aizsardzība: Atvērta zonu pārsūtīšana atdod visu iekšējo vārdu sarakstu. Liedz AXFR nepilnvarotiem un nerādi iekšējos hostus publiskajā DNS.
Tīmekļa lietotnes
-
Zināmo ievainojamību skenēšana
nuclei -u <url>nikto -h <url>Aizsardzība: Skeneri meklē publiski zināmas ievainojamības un nepareizu konfigurāciju. Aizsardzība: tīmekļa lietotņu ugunsmūris (WAF) priekšā, ievades validācija serverī un regulāri ielāpi.
-
Slēpto failu un ceļu pārbaude
ffuf -w <wordlist> -u <url>/FUZZgobuster dir -u <url> -w <wordlist>Aizsardzība: Uzbrucējs mēģina atrast .env, .git un dublējumus. Nekad neliec noslēpumus zem webroot un noraidi šos ceļus jau tīmekļa servera malā, pirms tie sasniedz lietotni.
-
Starpnieka pārbaude (Burp, ZAP)
# Burp Suite / OWASP ZAP - manuāla pieprasījumu pārtveršanazap-baseline.py -t <url>Aizsardzība: Pārtverošs starpnieks rāda, ka klienta puses pārbaudes var apiet. Katru vārteju izpildi SERVERĪ, ne tikai pārlūkā, un lieto CSRF žetonus un piederības pārbaudes.
TLS un šifrēšana
-
TLS konfigurācijas pārbaude
testssl.sh <host>:443sslscan <host>Aizsardzība: Izslēdz protokolus zem TLS 1.2 un vājos šifrus, ieslēdz HSTS. Novecojis protokols ir lēns, bet drošs ceļš uz starpnieka uzbrukumu.
-
Sertifikāta pārbaude
openssl s_client -connect <host>:443 -servername <host>Aizsardzība: Pārbaudi, vai sertifikāts ir derīgs, neizbeidzies un atbilst domēnam. Automatizē atjaunošanu, lai termiņš klusi nebeidzas.
Paroļu un hašu audits
-
Hašu stipruma audits (uz saviem hašiem)
hashcat -m <režīms> hashes.txt <wordlist>john --wordlist=<wordlist> hashes.txtAizsardzība: Palaid pret SAVIEM izvilktajiem hašiem, lai redzētu, cik ātri vājas paroles krīt. Aizsardzība: stiprs, lēns jaucējalgoritms, pietiekami garas paroles un konta bloķēšana pēc neveiksmīgiem mēģinājumiem.
-
Pieteikšanās noturība pret minēšanu
# autorizēts tests pret SAVU pieteikšanās galapunktunmap -p 80,443 --script http-brute <mērķis>Aizsardzība: Ātruma ierobežošana un konta bloķēšana padara tiešu minēšanu nerentablu. Pret sadalītu minēšanu no daudzām adresēm vajag reputācijas slāni, kas bloķē adreses pēc to uzvedības citur.
Pieejamības noturība (DoS)
-
Lēnā HTTP noturība (Slowloris klase)
slowhttptest -c 500 -H -u <url>Aizsardzība: Slowloris tur savienojumus atvērtus ar lēni sūtītām galvenēm. Aizsardzība: pieprasījuma taimauti un vienlaicīgo savienojumu ierobežojums uz IP. Testē TIKAI savu testa vidi.
-
Slodzes noturība
ab -n 10000 -c 100 <url># vai slodzes ģenerators (wrk, Locust) - TIKAI pret savu vidiAizsardzība: Izmēri, cik pieprasījumu sekundē sistēma iztur. Aizsardzība: anonīmo lapu kešs un ātruma ierobežojumi; saglabā izmērīto bāzlīniju un salīdzini pēc katras izmaiņas.