An ninh mạng có cần lập trình không?
Không bắt buộc cho mọi vai trò. Nhiều vị trí (SOC Analyst Tier 1, GRC, Compliance, Security Sales, Policy Writer) làm tốt mà không code. Tuy nhiên, biết code tạo lợi thế lớn: tự động hóa, phân tích malware, pentest nâng cao, tooling, DevSecOps.
Top ngôn ngữ cho Cybersecurity
1. Python - Ngôn ngữ #1 cho SecOps
- Ưu điểm: Cú pháp đơn giản, thư viện khổng lồ (scapy, requests, BeautifulSoup, pwntools, volatility, yara, mitmproxy, django/flask cho tool web).
- Ứng dụng: Automation/Scripting, Malware Analysis, Penetration Testing (exploit dev), Threat Hunting, Log Analysis, SIEM Rule Writing, Cloud Security (boto3), Tool Development.
- Cert liên quan: eCPPT, OSCP, PNPT, SANS SEC573, GPEN.
2. C / C++ - Cốt lõi hệ thống & Malware
- Tại sao: Truy cập bộ nhớ thấp (RAM, pointer), hiểu stack/heap, calling convention, syscall. Malware, rootkit, exploit, shellcode thường viết bằng C/C++.
- Ứng dụng: Reverse Engineering, Exploit Development (ROP, Heap Spray), Kernel/Rootkit Analysis, Driver Development, High-performance Security Tools.
- Cần nắm: Pointer arithmetic, Memory layout, Assembly (x86/x64/ARM), Calling convention, Compiler optimization.
3. Assembly (x86, x64, ARM, MIPS)
- Bắt buộc cho Reverse Engineering, Malware Analysis, Exploit Dev. Đọc hiểu instruction không cần source code.
- Tool: IDA Pro, Ghidra, Binary Ninja, Radare2, x64dbg, WinDbg.
4. Go (Golang) - Đang trending mạnh
- Biên dịch tĩnh, single binary, concurrency tốt (goroutine), cross-compile dễ.
- Dùng viết: C2 Framework (Sliver, Mythic), Security Tools (Nuclei, Subfinder, Amass, Goby), Cloud-native Security, Malware (độ khó phân tích cao hơn).
5. Rust - An toàn bộ nhớ, hiệu năng cao
- Ownership model loại bỏ use-after-free, buffer overflow, data race tại compile-time.
- Dùng viết: Security-critical software, Crypto libraries, Browser components (Firefox), Tooling mới (RustScan, Oxide).
6. JavaScript / TypeScript - Web AppSec & Browser
- Bắt buộc cho: XSS, CSRF, Prototype Pollution, DOM Clobbering, Client-side Logic Flaws.
- Node.js cho backend security, tooling (Burp Suite extensions, Postman scripts).
- TypeScript giúp static analysis tốt hơn.
7. PowerShell / Bash - Automation & Post-Exploitation
- PowerShell: Native Windows, .NET integration, AMSI bypass, Empire, Nishang, PowerSploit. Blue team: KQL, Defender Hunting.
- Bash: Linux automation, container security, log parsing (awk, sed, grep, jq).
8. SQL - Database Security
- SQL Injection (Union, Blind, Time-based, Out-of-band).
- Query audit, permission review, data classification.
Lộ trình học theo vai trò
| Vai trò | Ngôn ngữ ưu tiên | Mức độ |
|---|---|---|
| SOC Analyst / Threat Hunter | Python, SQL, KQL/Splunk SPL, Bash | Scripting, Query, Automation |
| Penetration Tester / Red Teamer | Python, C/C++, Assembly, Go, PowerShell, Bash | Exploit Dev, Tooling, Post-Exploit |
| Malware Analyst / Reverse Engineer | C/C++, Assembly, Python, Rust (đọc) | Deep RE, Unpacking, Decompilation |
| AppSec / DevSecOps Engineer | Python, JavaScript/TS, Java, C#, Go, YAML (CI/CD) | SAST/DAST/SCA Integration, Secure Code Review |
| Cloud Security Engineer | Python, Go, Bash, Terraform/HCL, Rego (OPA) | Automation, Policy as Code, CSPM |
| GRC / Compliance / Policy | (Không bắt buộc) Python cơ bản cho automation báo cáo | Low/None |
Kết luận
- Bắt đầu: Python (dễ nhất, ROI cao nhất, cộng đồng lớn nhất).
- Đi sâu kỹ thuật (RE, Exploit, Malware): Bắt buộc C/C++ + Assembly.
- Modern Tooling/Cloud/Red Team: Học Go.
- Web/AppSec: JavaScript/TypeScript không thể thiếu.
- Không code cũng làm được: Nhiều role quản trị, chính sách, bán hàng, tuân thủ. Nhưng code = đòn bẩy nghề nghiệp.