3 ตัวอย่างปัญหาความปลอดภัย Linux
- Backdoor/Botnet/Ransomware: มักเข้าผ่าน Service ที่ Expose (SSH, Web, DB) หรือ Supply Chain
- Ransomware บน Linux: เพิ่มขึ้น (ESXiArgs, LockBit Linux, BlackCat) เป้าหมาย Server/VM
- Physical Theft: ลaptop/Server ถูกขโมย → Disk Encryption (LUKS) จำเป็น
- Dual-boot Windows/Linux: Windows Malware อาจเข้าถึง Linux Partition (NTFS/ext4 Driver)
4 ประเภทความปลอดภัยเครือข่าย (Network Security Types)
- Access Control (NAC, PAM, sudo, SSH Keys)
- Antivirus/Anti-malware/EDR (ClamAV, Lynis, CrowdStrike, SentinelOne)
- Application Security (AppArmor, SELinux, Seccomp, Capabilities)
- Behavioral Analytics (Auditd, Sysmon for Linux, eBPF Tools)
- Data Loss Prevention (DLP)
- DDoS Prevention (iptables/nftables, Cloudflare, AWS Shield)
- Email Security (Postfix/Exim + SpamAssassin/Rspamd, DMARC)
- Firewall (iptables/nftables, firewalld, ufw, nftables)
3 ระดับสิทธิ์ใน Linux (File Permissions)
| Accessor | Read (r) | Write (w) | Execute (x) |
|---|---|---|---|
| User (Owner - u) | 4 | 2 | 1 |
| Group (g) | 4 | 2 | 1 |
| Others (o) | 4 | 2 | 1 |
Special Bits: Setuid (4), Setgid (2), Sticky (1) ใช้ chmod/octal (เช่น 755, 644, 1777 /tmp)
ต้องการ Linux สำหรับ Cyber Security ไหม
ใช่ แน่นอน Linux เป็น OS หลักของ Security Pros: SOC, Penetration Testing, Malware Analysis, Cloud Security, DevSecOps เครื่องมือส่วนใหญ่รันบน Linux (Nmap, Burp, Metasploit, Wireshark, Volatility, YARA, Sigma, Docker, Kubernetes) ควรเรียน Linux Basics for Hackers หรือ RHCSA/RHCE
Network Security ใน Linux คืออะไร
ประเมินและป้องกันในพื้นที่:
- Prevention: Firewall (nftables/ufw), Packet Filtering, Disable Unused Services (inetd/xinetd), TCP Wrappers (/etc/hosts.allow/deny), SSH Hardening (Key-only, Port Change, Fail2ban, MFA)
- Detection: Auditd, AIDE/Tripwire (FIM), Logrotate + Central Log (rsyslog/Elastic), Suricata/Zeek (NIDS)
- Response: Isolation, Forensics (Volatility, Autopsy), Backup/Restore
Linux ปลอดภัยแค่ไหน
- Design: Multi-user, Least Privilege, Open Source (Many Eyes), Modular, No Registry
- Market Share: 82% Smartphones (Android), 99% Supercomputers, >90% Cloud/Server, >70% Web Servers
- Vulnerabilities: ยังมี (CVE, Misconfig, Malware) แต่ Ecosystem แพทช์เร็ว และ Default Secure
- Admin/User ต้อง Hardening เอง (ไม่ได้ Secure โดยอัตโนมัติ 100%)
Linux มีปัญหาความปลอดภัยไหม
มี เช่นเดียวกับซอฟต์แวร์อื่น: Vulnerabilities (Dirty Pipe, Sudoheap, Polkit), Misconfig (World-writable, Weak SSH), Malware (Rootkits, Cryptominers, Ransomware) Supply Chain (SolarWinds, Log4j, xz Utils)
3 ภัยคุกคามข้อมูลหลัก
- Software Attacks (Malware, Exploit, Zero-day)
- Intellectual Property Theft / Identity Theft
- Equipment/Information Theft, Extortion, Sabotage
คุณสมบัติความปลอดภัย Linux (Security Features)
- Password Authentication (Shadow, PAM, FAIL_DELAY, PAM Modules)
- Discretionary Access Control (DAC): rwx, ACL (setfacl/getfacl)
- Mandatory Access Control (MAC): SELinux (RHEL/Fedora), AppArmor (Ubuntu/Suse) - Enforce Policy
- Security Auditing: Auditd (Kernel Audit), ausearch/aureport
- Capabilities: Fine-grained Privileges (CAP_NET_BIND_SERVICE, etc.)
- Namespaces & Cgroups: Container Isolation
- Seccomp: Syscall Filtering
- Kernel Hardening: KASLR, KPTI, Hardened Usercopy, Lockdown Mode
3 การปกป้องข้อมูลใน UNIX/Linux
- File Permissions (DAC) + ACL
- Data Verification (Checksums: sha256sum, GPG Sign, AIDE/Tripwire FIM)
- Encryption: LUKS (Disk), fscrypt/eCryptfs (File), GPG (File/Email), TLS (Network)
Linux Distro ใดดีที่สุดสำหรับ Cyber Security
- Kali Linux: Offensive Security, Penetration Testing, Pre-installed Tools (Nmap, Burp, Metasploit, BloodHound, etc.)
- Parrot Security OS: Security + Privacy + Development
- BlackArch: Arch-based, Tools มากที่สุด (>2500)
- Fedora Security Lab: Forensics, Defense
- RHEL/Fedora/Ubuntu LTS: Production Server Hardening (SELinux/AppArmor, FIPS, 10-yr Support)
แฮกเกอร์ส่วนใหญ่ใช้ Linux ไหม
ใช่ Open-source, Customizable, Tool-rich, Transparent, Scriptable, No Telemetry แต่ Advanced Attacks บน Windows ก็เยอะ (Living off the Land: PowerShell, WMI, COM, LOLBins)
ทำไม Linux จึงปลอดภัยกว่า Windows
- Permission Model: Root/User แยกชัดเจน ไม่รัน Admin ได้ง่าย (UAC vs sudo)
- Executable Bit: ต้อง +x ก่อนรัน (ไม่ใช่ .exe Double-click)
- Package Manager: Verified Repos, GPG Sign, Dependency Resolution
- No Registry: Config เป็น Text File (/etc) Auditable
- Root Owns System Files: User ไม่เขียน /bin, /sbin, /usr ได้
- Virus Removal: ง่ายกว่า (Process, File, Package Manager)
สิ่งที่ต้องมีสำหรับ Cyber Security Career
- Computer Science Fundamentals (OS, Network, Architecture)
- Programming: Python, Go, C, C++, Rust, Bash/PowerShell
- Mitre ATT&CK Framework
- Penetration Testing & Vulnerability Assessment Skills
- SIEM (Splunk, Elastic, Sentinel, QRadar) & Detection Engineering
- Cloud Security (AWS/Azure/GCP), Container/K8s Security
สรุป
Linux เป็นพื้นฐานของ Cyber Security จำเป็นต้องเรียนรู้: Permissions, MAC (SELinux/AppArmor), Firewall (nftables), SSH Hardening, Auditing, Containerization, Kernel Hardening และใช้ Distro ที่เหมาะกับบทบาท (Kali สำหรับ Offense, RHEL/Fedora/Ubuntu สำหรับ Defense/Production)