| Lĩnh vực An ninh mạng | Vai trò của Lập trình | Ví dụ công cụ/tự động hóa |
| Phân tích mã độc (Malware Analysis) | Hiểu assembly, C/C++, reverse engineering, unpack, deobfuscate | IDA Pro, Ghidra, x64dbg, script Python tự động unpack |
| Kiểm thử xâm nhập (Penetration Testing / Red Team) | Viết exploit, bypass AV/EDR, tự động hóa recon, post-exploitation | Metasploit module, Cobalt Strike BOF, C2 framework, Python/Go tooling |
| Bảo mật ứng dụng (AppSec / DevSecOps) | Code review (SAST), viết rule Semgrep/CodeQL, secure coding, CI/CD pipeline | GitHub Actions, GitLab CI, Semgrep, CodeQL, Checkmarx, Snyk |
| Bảo mật đám mây (Cloud Security) | IaC (Terraform, Pulumi), Policy as Code (OPA/Rego), Lambda/Cloud Function tự động remediate | Terraform, Pulumi, OPA, AWS Lambda, GCP Cloud Functions |
| Phát hiện & Đáp sự (Detection & Response / SOC) | Viết rule SIEM (Sigma, Splunk SPL, KQL, YARA), SOAR playbook, enrichment API | Splunk, Elastic, Microsoft Sentinel, Chronicle, Cortex XSOAR, Shuffle |
| Threat Intelligence | Thu thập, xử lý, tương quan dữ liệu lớn (Python, SQL, Elastic, Graph DB) | MISP, OpenCTI, script thu thập IOC, STIX/TAXII |
| Quản trị rủi ro / GRC | Tự động hóa thu thập bằng chứng, audit, compliance as code | Python script audit AWS/Azure/GCP, OSCAL, Compliance Masonry |
Ngôn ngữ lập trình nên học theo thứ tự ưu tiên
- Python – **#1 Bắt buộc**. Dễ học, thư viện khổng lồ (scapy, requests, pwntools, cryptography, pandas, elasticsearch, boto3, google-cloud...), dùng cho: scripting, automation, tooling, data analysis, malware analysis helper, exploit dev, web security.
- Bash / PowerShell – **#2 Bắt buộc**. Quản trị Linux/Windows, tự động hóa tác vụ hệ thống, log parsing, one-liner mạnh.
- C / C++ – Hiểu bộ nhớ, con trỏ, buffer overflow, binary exploitation, kernel/rootkit, reverse engineering. Cơ sở của bảo mật cấp thấp.
- Go (Golang) – Phổ biến cho tooling bảo mật hiện đại (Docker, Kubernetes, gRPC, proxy, scanner, C2 framework – Sliver, Mythic). Hiệu năng tốt, compile static binary, concurrency tốt.
- JavaScript / TypeScript – Web security (XSS, CSRF, prototype pollution), Node.js backend, browser extension, Electron app security.
- Rust – An toàn bộ nhớ, thay thế C/C++ cho tooling bảo mật mới, blockchain security, Solana smart contract audit.
- Assembly (x86-64, ARM64) – Reverse engineering, exploit development, shellcode, compiler output analysis.
- SQL – Truy vấn log, SIEM, database security, injection understanding.
Lộ trình học lập trình cho An ninh mạng (Tự học)
Giai đoạn 1: Cơ bản (1-2 tháng)
- Python cơ bản: biến, vòng lặp, hàm, file, exception, OOP cơ bản
- Bash: điều hướng, pipe, grep/awk/sed, script cơ bản, cron
- Git & GitHub: clone, commit, push, branch, PR
- Môi trường: Linux (Ubuntu/Kali/WSL2), VM, Docker cơ bản
Giai đoạn 2: Ứng dụng bảo mật (3-6 tháng)
- Python cho Security:
requests (web), scapy (packet), pwntools (exploit dev), cryptography (crypto), python-nmap, shodan, virustotal-api
- Viết script tự động: quét port, brute-force form, check SSL cert, enumerate subdomain, parse log
- Học SQL cơ bản: SELECT, JOIN, WHERE, injection concept
- Web security: HTTP, Burp Suite, OWASP Top 10, XSS, SQLi, SSRF lab (PortSwigger Web Security Academy – MIỄN PHÍ)
Giai đoạn 3: Chuyên sâu (6-12+ tháng)
- Chọn 1-2 hướng: AppSec (SAST/DAST, CodeQL, Semgrep, secure code review), Cloud Sec (Terraform, OPA, CSPM, serverless sec), Red Team (C/C++, Go, AV/EDR bypass, C2 dev), Malware Rev (Assembly, Ghidra, IDA, unpacking), Detection Eng (Sigma, KQL, Splunk, YARA, ATT&CK mapping)
- Đọc code open-source security tools (Nuclei, Trivy, Falco, Osquery, Velociraptor, Wazuh, Suricata)
- Đóng góp open-source (PR fix bug, thêm rule, cải tiến doc)
- Xây dựng portfolio: Tool trên GitHub, blog technical writeup, CTF writeup
Chứng chỉ có giá trị có lập trình
- OSCP / OSWE / OSEP / OSEE (OffSec) – Thực chiến, yêu cầu scripting/exploit dev
- GWAPT / GXPN / GDAT (GIAC) – Web app pen test, advanced exploit, data analysis
- eCPPT / eWPT / eMAPT (eLearnSecurity) – Có module lập trình
- Cloud Certs: AWS/GCP/Azure Security Specialty – cần IaC (Terraform/CloudFormation)
Kết luận
**Lập trình không phải điều kiện cần để BẮT ĐẦU an ninh mạng, nhưng là điều kiện ĐỂ TIẾN XA.** Bắt đầu với **Python + Bash** ngay hôm nay. Áp dụng vào tự động hóa công việc hàng ngày (parse log, check cert, enumerate asset). Xây dựng thói quen "Code every day 30 phút". Sau 6-12 tháng, bạn sẽ thấy sự khác biệt rõ rệt trong hiệu suất, tự tin và cơ hội việc làm.