هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
$ مستخدم عادي# بصلاحية root (أو مع sudo)
المهارات في هذا الفصل
- أمان الخوادم والعناقيد — 8
Falco — runtime threat detection
falco watches system calls with eBPF and alerts on suspicious behavior: a shell in a container, reading /etc/shadow, writes below /etc, unexpected network connections. Part of the CKS exam.
kube-bench — CIS benchmark for Kubernetes
kube-bench checks API server flags, kubelet settings, etcd and file permissions against the CIS Kubernetes Benchmark, with fix texts.
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml
kube-bench run --targets master,node | grep "^\[FAIL\]"Nmap — what is open?
nmap finds hosts, open ports, services and TLS settings — to check that only expected ports are reachable.
Fail2ban — block brute force
fail2ban-client manages jails that read logs and ban IPs with too many failed logins (SSH, web logins, mail).
fail2ban-client status sshd
fail2ban-client set sshd unbanip 203.0.113.25Lynis — quick hardening audit
lynis runs hundreds of local checks and gives a hardening index and concrete suggestions.
OpenSCAP — compliance profiles
oscap checks RHEL hosts and images against CIS, STIG or PCI-DSS profiles and generates Bash or Ansible fixes — evidence for auditors.
oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cis_server_l1 --report report.html /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
oscap xccdf generate fix --fix-type ansible --profile xccdf_org.ssgproject.content_profile_cis_server_l1 --output cis-fix.yml /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xmlAIDE — file integrity monitoring
aide keeps a baseline of file hashes and permissions and reports every added, removed or changed file.
auditd — who did what
auditctl adds kernel audit rules (watch /etc/passwd, /etc/sudoers, log user commands); ausearch and aureport read them.
Combine them in layers
No single tool is enough. Use layers:
| Layer | Prevent | Detect | Prove |
|---|---|---|---|
| Host | Ansible/OpenSCAP hardening, fail2ban-client | aide, auditctl, falco | oscap reports, lynis index |
| Cluster | Pod Security, NetworkPolicies, RBAC | falco, audit logs | kube-bench reports |
| Network | Firewalls, VPN (wg) | nmap + ndiff weekly | scan history |
تذكّر
Send all of it to the central logging stack (Loki/Elastic/Sentinel); an attacker with root deletes local logs first.