Lộ trình học 30 ngày cho DevOps Engineer
Tổng quan
Lộ trình này được thiết kế cho DevOps/Cloud/Platform Engineer muốn bắt đầu từ con số không về web security và đạt được nền tảng đủ vững để:
- Hiểu và phòng chống các lỗ hổng phổ biến trong hệ thống mình quản lý
- Bắt đầu Bug Bounty ở mức cơ bản
- Tích hợp security vào workflow DevOps hàng ngày
Commit time: 1-2 giờ/ngày
Tuần 1: Nền tảng (Ngày 1-7)
Ngày 1: Setup môi trường
Mục tiêu: Sẵn sàng lab environment
Công việc:
□ Cài Burp Suite Community Edition
□ Cài FoxyProxy Firefox extension
□ Import Burp CA certificate
□ Tạo account PortSwigger Web Security Academy
□ Chạy DVWA hoặc Juice Shop bằng Docker:
docker run -d -p 3000:3000 bkimminich/juice-shop
□ Đọc lại Chương 1 (Giới thiệu) và Chương 2 (HTTP)
Lab:
- Dùng Burp để intercept traffic đến Juice Shop
- Xem HTTP history, thử Repeater với 1 request
Ngày 2-3: HTTP và Burp Suite
Đọc: Chương 2 (HTTP Fundamentals) + Chương 3 (Burp Suite)
Thực hành:
□ Intercept và inspect toàn bộ các loại HTTP requests từ Juice Shop
□ Thử Burp Decoder: decode base64, URL encode/decode
□ Thử Burp Repeater: modify headers, parameters
□ Inspect cookies: có HttpOnly/Secure/SameSite không?
□ Inspect response headers: có security headers không?
PortSwigger Labs (không cần): Đọc lý thuyết HTTP từ portswigger.net/web-security
Ngày 4-5: Authentication
Đọc: Chương 4 (Authentication)
PortSwigger Labs:
□ Lab: Username enumeration via different responses
□ Lab: Username enumeration via subtly different responses
□ Lab: Username enumeration via response timing
□ Lab: Broken brute-force protection (IP block)
□ Lab: 2FA bypass
Thực hành với Juice Shop:
□ Tìm username enumeration trong login flow
□ Thử brute force với Intruder
□ Tìm weak default credentials
Ngày 6-7: Session và Access Control
Đọc: Chương 5 (Session Management) + Chương 6 (Access Control)
PortSwigger Labs:
□ Lab: User role controlled by request parameter
□ Lab: URL-based access control can be circumvented
□ Lab: Method-based access control can be circumvented
□ Lab: User ID controlled by request parameter
□ Lab: Insecure direct object references
Thực hành với Juice Shop:
□ Inspect session cookie attributes
□ Tìm IDOR: truy cập order/profile của user khác
□ Tìm admin endpoint bằng ffuf/gobuster
ffuf -w /usr/share/wordlists/dirb/common.txt -u http://localhost:3000/FUZZ -mc 200
Tuần 2: Injection Attacks (Ngày 8-14)
Ngày 8-9: SQL Injection
Đọc: Chương 12 (SQL Injection)
PortSwigger Labs (theo thứ tự):
□ Lab: SQL injection vulnerability in WHERE clause
□ Lab: UNION attack, determining columns
□ Lab: UNION attack, finding a column with text
□ Lab: UNION attack, retrieving data
□ Lab: Blind SQL injection with conditional responses
□ Lab: Blind SQL injection with time delays
Công cụ:
□ Thực hành sqlmap với DVWA:
docker run -d -p 80:80 vulnerables/web-dvwa
sqlmap -u "http://localhost/vulnerabilities/sqli/?id=1&Submit=Submit" \
--cookie="PHPSESSID=xxx;security=low" --dbs
Ngày 10: NoSQL và Command Injection
Đọc: Chương 13 (NoSQL) + Chương 14 (Command Injection)
PortSwigger Labs:
□ Lab: OS command injection, simple case
□ Lab: Blind OS command injection with time delays
□ Lab: Blind OS command injection with out-of-band interaction
Thực hành:
□ Setup MongoDB locally và thử operator injection
□ Tìm command injection trong Juice Shop (có 1 challenge)
Ngày 11-12: XSS
Đọc: Chương 11 (XSS)
PortSwigger Labs:
□ Lab: Reflected XSS into HTML context with nothing encoded
□ Lab: Stored XSS into HTML context with nothing encoded
□ Lab: DOM XSS in document.write sink
□ Lab: DOM XSS in innerHTML sink
□ Lab: Reflected XSS into attribute with angle brackets HTML-encoded
Thực hành với Juice Shop:
□ Tìm và exploit reflected XSS
□ Tìm stored XSS trong comment/product review
□ Test CSP bypass
Ngày 13-14: SSRF và XXE
Đọc: Chương 15 (SSRF) + Chương 16 (XXE)
PortSwigger Labs:
□ Lab: Basic SSRF against the local server
□ Lab: Basic SSRF against another back-end system
□ Lab: SSRF with filter bypass via open redirection
□ Lab: Exploiting XXE using external entities
□ Lab: Blind XXE with out-of-band interaction
Thực hành:
□ Dùng Burp Collaborator (nếu có Pro) hoặc interactsh
docker run -it -p 80:80 ghcr.io/projectdiscovery/interactsh-server
□ Test SSRF đến localhost services
Tuần 3: Authentication Protocols & Advanced (Ngày 15-21)
Ngày 15-16: OAuth và JWT
Đọc: Chương 7 (OAuth) + Chương 8 (JWT)
PortSwigger Labs:
□ Lab: JWT authentication bypass via unverified signature
□ Lab: JWT authentication bypass via flawed signature verification (alg:none)
□ Lab: JWT authentication bypass via weak signing secret
□ Lab: Authentication bypass via OAuth implicit flow
Thực hành:
□ Setup Burp JWT Editor extension
□ Decode JWT từ Juice Shop, thử modify payload
□ Brute force JWT secret:
hashcat -a 0 -m 16500 <jwt> /usr/share/wordlists/rockyou.txt
Ngày 17-18: CORS và CSRF
Đọc: Chương 9 (CORS) + Chương 10 (CSRF)
PortSwigger Labs:
□ Lab: CORS vulnerability with basic origin reflection
□ Lab: CORS vulnerability with trusted null origin
□ Lab: CSRF vulnerability with no defenses
□ Lab: CSRF where token validation depends on request method
□ Lab: CSRF where Referer validation depends on header being present
Thực hành:
□ Test CORS mis-configuration bằng curl
□ Tạo CSRF PoC HTML page
Ngày 19-20: File Upload và Path Traversal
Đọc: Chương 17 (File Upload) + Chương 18 (Path Traversal)
PortSwigger Labs:
□ Lab: Remote code execution via web shell upload
□ Lab: Web shell upload via Content-Type restriction bypass
□ Lab: Web shell upload via path traversal
□ Lab: File path traversal, simple case
□ Lab: File path traversal, traversal sequences stripped non-recursively
Thực hành:
□ Upload web shell vào DVWA với security=low
□ Test path traversal trên local app
Ngày 21: Race Condition và Business Logic
Đọc: Chương 20 (Race Condition) + Chương 21 (Business Logic)
PortSwigger Labs:
□ Lab: Limit overrun race conditions
□ Lab: Bypassing rate limits via race conditions
Thực hành với Juice Shop:
□ Tìm business logic bugs (coupon reuse, negative quantity)
□ Thử race condition với Burp Turbo Intruder
Tuần 4: DevOps Security + Practice (Ngày 22-30)
Ngày 22-23: Advanced Web Attacks
Đọc: Chương 22 (Clickjacking) + Chương 23 (Cache Poisoning) + Chương 24 (Request Smuggling)
PortSwigger Labs (nếu có Pro):
□ Lab: Basic clickjacking with CSRF token protection
□ Lab: Exploiting HTTP request smuggling to bypass front-end security
Thực hành:
□ Implement X-Frame-Options và frame-ancestors CSP
□ Test cache headers trên Nginx config
Ngày 24-25: SSTI và Deserialization
Đọc: Chương 25 (SSTI) + Chương 26 (Deserialization)
PortSwigger Labs:
□ Lab: Basic server-side template injection (SSTI)
□ Lab: Server-side template injection using documentation
Thực hành:
□ Setup Flask app với vulnerable Jinja2 template
□ Test {{7*7}} injection
□ Thử sandbox escape trong Jinja2
Ngày 26-27: API và GraphQL Security
Đọc: Chương 27 (GraphQL) + Chương 28 (API Security)
PortSwigger Labs:
□ Lab: Accessing private GraphQL posts
□ Lab: Bypassing GraphQL brute force protections
Thực hành:
□ Setup GraphQL endpoint và test introspection
□ Implement rate limiting với Flask-Limiter
□ Test mass assignment vulnerability
Ngày 28-29: DevOps Security trong thực tế
Đọc: Chương 29-33 (K8s, CI/CD, Secrets, Cloud, Logging)
Thực hành:
□ Scan repo với gitleaks:
gitleaks detect --source . --verbose
□ SAST với Semgrep:
pip install semgrep
semgrep --config=p/owasp-top-ten src/
□ Scan Docker image với Trivy:
trivy image myapp:latest
□ Implement security headers trong Nginx:
add_header Strict-Transport-Security "max-age=31536000" always;
add_header X-Frame-Options "DENY" always;
add_header Content-Security-Policy "default-src 'self'" always;
□ Test IAM permissions:
aws iam simulate-principal-policy \
--policy-source-arn arn:aws:iam::123:role/my-role \
--action-names s3:GetObject \
--resource-arns arn:aws:s3:::my-bucket/*
Ngày 30: Review, CTF, và Bug Bounty Planning
Ngày cuối cùng:
1. Review toàn bộ
□ Làm lại câu hỏi ôn tập các chương đã học
□ Test Juice Shop: hoàn thành tất cả challenges có thể
2. CTF Practice
□ TryHackMe: OWASP Top 10 room (https://tryhackme.com)
□ HackTheBox Starting Point machines
3. Bug Bounty Planning
□ Tạo account HackerOne: https://hackerone.com
□ Tìm program phù hợp:
- Public programs với broad scope
- "Accepts all vulnerabilities" programs
- Programs với good response rate
4. Lập kế hoạch tiếp theo
□ Chọn 1 vulnerability type để deep-dive (SQLi, SSRF, etc.)
□ Join communities:
- Reddit: r/netsec, r/bugbounty
- Twitter: theo dõi security researchers
- Discord: Bug Bounty Hunter Community
Tài nguyên bổ sung
Platforms thực hành
| Platform | Mô tả | Miễn phí |
|---|---|---|
| PortSwigger Web Security Academy | Labs chính thức, tốt nhất | Có |
| TryHackMe | Học theo rooms, guided | Có (basic) |
| HackTheBox | Machines thực tế hơn | Có (basic) |
| DVWA | Vulnerable web app tự host | Có |
| Juice Shop | OWASP challenge app | Có |
| VulnHub | VMs cho download | Có |
Tools quan trọng
| Tool | Mục đích |
|---|---|
| Burp Suite Community | Intercepting proxy, main tool |
| Burp JWT Editor | JWT testing |
| ffuf | Directory/endpoint fuzzing |
| sqlmap | SQL injection automation |
| gitleaks | Secret scanning |
| semgrep | SAST |
| trivy | Container scanning |
| nmap | Port scanning |
| interactsh | Out-of-band testing (Burp Collaborator alternative) |
Tài liệu tiếp tục học
- PortSwigger Blog: https://portswigger.net/research — nghiên cứu mới nhất
- OWASP Cheat Sheet Series: Tổng hợp best practices
- HackerOne Hacktivity: Xem real bug bounty reports
- Intigriti Writeups: Bug bounty writeups
- The Web Application Hacker's Handbook (sách)
- Bug Bounty Bootcamp của Vickie Li (sách)
Certification (Nếu muốn)
| Cert | Level | Phù hợp |
|---|---|---|
| PortSwigger BSCP | Intermediate | Tốt nhất cho web pentester |
| CompTIA Security+ | Beginner | Foundational |
| OSCP (Offensive Security) | Advanced | Full pentester |
| eWPT (eLearnSecurity) | Intermediate | Web pentesting |
Mindset quan trọng
"Think like an attacker"
Khi nhìn vào bất kỳ feature nào của ứng dụng, hỏi:
- Tôi có thể cung cấp input không mong đợi không?
- Tôi có thể bỏ qua bước này không?
- Tôi có thể thay đổi parameter này không?
- App đang tin tưởng điều gì mà không nên tin?
"Defense in depth"
Không phụ thuộc vào 1 lớp bảo mật. Mỗi lớp phải assume các lớp khác đã bị bypass.
"Continuous learning"
Web security thay đổi liên tục. Theo dõi:
- New CVEs và vulnerabilities
- Writeups từ bug bounty hunters
- Research papers từ security conferences (Black Hat, DEF CON)
Tracking Progress
Tuần 1 - Foundation:
□ Môi trường setup hoàn chỉnh
□ Hoàn thành ít nhất 10 PortSwigger labs
□ Có thể dùng Burp để inspect và modify HTTP traffic
Tuần 2 - Injection:
□ Hoàn thành ít nhất 15 PortSwigger labs
□ Có thể manually detect và exploit SQLi, XSS cơ bản
□ Hiểu cách phòng chống từng loại
Tuần 3 - Auth & Advanced:
□ Hoàn thành 10 labs về JWT/OAuth/CSRF/CORS
□ Có thể decode và modify JWT
□ Có thể exploit SSRF đến internal services
Tuần 4 - DevOps Integration:
□ Implement security headers trong 1 real project
□ Setup gitleaks trong pre-commit hooks
□ Thêm Semgrep vào CI pipeline
□ Submit ít nhất 1 vulnerability report (dù Low severity)
Chúc mừng! Sau 30 ngày, bạn đã có foundation đủ vững để:
- Nhận ra và phòng chống các lỗ hổng phổ biến trong hệ thống của mình
- Bắt đầu Bug Bounty với confidence
- Nói chuyện security với developers và security teams như peers
- Tiếp tục tự học sâu hơn vào các chủ đề chuyên biệt
Con đường phía trước:
- 3 tháng: Chuyên sâu 2-3 vulnerability types
- 6 tháng: Active Bug Bounty hunter
- 1 năm: Có thể pass BSCP hoặc eWPT
- 2 năm: Pentest junior hoặc AppSec engineer
Security là journey, không phải destination. Bắt đầu từ hôm nay.