Ngôn ngữ nào "tốt nhất"? – Không có câu trả lời duy nhất
Bảo mật mạng & An ninh mạng (Cybersecurity) là lĩnh vực rộng. Ngôn ngữ phù hợp phụ thuộc vào vai trò (role) và mục tiêu cụ thể.
Phân loại theo vai trò (Role-based)
1. Penetration Testing / Red Team / Exploit Development
| Ngôn ngữ | Tại sao quan trọng | Use case |
|---|---|---|
| Python | Thư viện 풍부 (scapy, pwntools, requests, impacket), viết script nhanh, exploit PoC, automation. | Tooling, fuzzing, exploit dev, C2 framework, malware analysis scripting. |
| C / C++ | Quản lý bộ nhớ thủ công, hiểu stack/heap, viết shellcode, ROP chain, kernel exploit, rootkit. | Exploit development, malware, rootkit, binary patching, performance-critical tools. |
| Assembly (x86/x64, ARM, MIPS) | Reverse engineering, debug shellcode, hiểu instruction set, bypass mitigation (ASLR, DEP, CFG). | Reverse malware, exploit dev, firmware analysis. |
| Rust | Memory safety, performance như C, dùng viết tool bảo mật hiện đại (cargo-audit, rustsec). | Security tooling mới, replacement C/C++ an toàn hơn. |
| Go (Golang) | Compile static binary, concurrency tốt, network programming nhẹ, cross-compile dễ. | CLI tools, network scanners, C2 agents, proxy, fuzzer. |
2. Blue Team / SOC / Detection Engineering / Threat Hunting
| Ngôn ngữ | Vai trò |
|---|---|
| Python | Log parsing, SIEM rule writing (Sigma), API integration (VirusTotal, MISP, ATT&CK), automation (SOAR), data analysis (pandas). |
| SQL / KQL (Kusto) | Truy vấn log trong SIEM (Sentinel, Splunk, Elastic, Datadog). |
| PowerShell | Windows internals, WMI/CIM, AD, Defender API, incident response trên Windows. |
| Bash/Shell | Log processing, container/Linux forensics, automation Linux. |
3. Application Security / DevSecOps / Secure Code Review
- Java / C# / .NET / JavaScript/TypeScript / Go / Python / PHP / Ruby: Phải biết ngôn ngữ của codebase đang review. Hiểu framework (Spring, ASP.NET, React, Node, Django, Laravel), dependency management, SAST/DAST/IAST tools.
- YAML / JSON / HCL (Terraform) / Dockerfile: Infrastructure as Code security, Kubernetes manifests, CI/CD pipeline security.
4. Network Security Engineering / Cloud Security / Automation
- Python: King của automation (Netmiko, NAPALM, Ansible, Nornir, boto3, azure-sdk, google-cloud).
- Go: Kubernetes operators, CNI plugins, eBPF tools (Cilium), high-perf network services.
- Terraform / HCL: IaC security, policy as code (OPA/Rego).
5. Malware Analysis / Reverse Engineering
- C/C++ + Assembly (x86/x64/ARM) – Bắt buộc.
- Python: IDA Pro / Ghidra / Binary Ninja scripting, automation analysis.
- YARA: Pattern matching rule (domain-specific language).
Lộ trình học gợi ý (Roadmap)
- Bắt đầu: Python – dễ học, áp dụng ngay được mọi domain.
- Cơ sở hạ tầng: C (con trỏ, bộ nhớ, syscall) → Assembly (x64).
- Chuyên sâu: Chọn 1 trong: Go (tooling/cloud), Rust (safe systems), C++ (malware/exploit), PowerShell (Windows IR).
- Domain-specific: SQL/KQL (SOC), YARA (malware), Rego/OPA (policy), Terraform (IaC sec).
Chứng chỉ nào yêu cầu coding?
- OSCP / OSEP / OSWE: Yêu cầu Python scripting, exploit dev (C/Assembly).
- CISSP / CISM / Security+: Không yêu cầu code – tập trung quản trị, governance.
- GNFA / GNUC / GCFA: Scripting (Python/Bash/PowerShell) cho forensics/network.
Kết luận
Python là "lingua franca" của an ninh mạng – bắt buộc biết. C/Assembly bắt buộc cho reverse/exploit. Go/Rust xu hướng mới cho tooling hiệu năng. Hãy học ngôn ngữ phục vụ mục tiêu nghề nghiệp cụ thể của bạn, không học "cho đủ".