אבטחת יישומים (AppSec) ו-OWASP Top 10
מהי אבטחת יישומים?
אבטחת יישומים (AppSec) כוללת את כל האמצעים להפיכת יישומים לבטוחים יותר מפני איומים. היא נעה מעיצוב מאובטח, פיתוח עם secure coding practices, בדיקות אבטחה ועד פריסה ותחזוקה מתמשכת.
OWASP Top 10 (2021)
A01 - Broken Access Control
סיכון: משתמשים ניגשים למשאבים לא מורשים
דוגמאות: IDOR, privilege escalation, forced browsing
הפחתה: יישום access control בכל השכבות, deny by default
A02 - Cryptographic Failures
סיכון: חשיפת מידע רגיש עקב הצפנה לא מספקת
דוגמאות: סיסמאות ב-plain text, weak algorithms, HTTP ללא TLS
הפחתה: TLS everywhere, bcrypt/Argon2 לסיסמאות, AES-256 לנתונים
A03 - Injection
סיכון: SQL, NoSQL, OS command injection, LDAP, XPath
דוגמאות: ' OR '1'='1, shell command injection
הפחתה: Prepared statements, ORMs, input validation, WAF
A04 - Insecure Design
סיכון: כשלים ארכיטקטוניים ובמידול איומים
דוגמאות: היעדר rate limiting, ללא threat modeling
הפחתה: Secure by design, threat modeling, secure design patterns
A05 - Security Misconfiguration
סיכון: תצורות לא מאובטחות או ברירת מחדל
דוגמאות: אישורי default, stack traces חשופים, CORS misconfiguration
הפחתה: Hardening guides, automated configuration scanning
A06 - Vulnerable and Outdated Components
סיכון: שימוש בספריות עם פגיעויות ידועות
דוגמאות: Log4Shell (CVE-2021-44228), Struts2 RCE
הפחתה: Dependabot, Snyk, OWASP Dependency-Check, SCA tools
A07 - Identification and Authentication Failures
סיכון: כשלים באימות ובניהול הפעלה
דוגמאות: Credential stuffing, session fixation, weak passwords
הפחתה: MFA, rate limiting, secure session management, breach detection
A08 - Software and Data Integrity Failures
סיכון: CI/CD ללא אימות שלמות, deserialization לא מאובטח
דוגמאות: Unsigned updates, insecure deserialization (Java, .NET)
הפחתה: Code signing, integrity checks, secure serialization libraries
A09 - Security Logging and Monitoring Failures
סיכון: היעדר נראות לגבי התקפות ופריצות
דוגמאות: לוגים לא מספקים, ללא התראות, לוגים לא מוגנים
הפחתה: Centralized logging, SIEM integration, real-time alerting
A10 - Server-Side Request Forgery (SSRF)
סיכון: השרת מבצע בקשות זדוניות למשאבים פנימיים
דוגמאות: Cloud metadata API access, internal port scanning
הפחתה: Whitelist של כתובות URL, network segmentation, disable unnecessary protocols
כלי AppSec
SAST (Static Application Security Testing)
- SonarQube: Code quality ו-security vulnerabilities
- Checkmarx: Enterprise SAST platform
- Semgrep: Lightweight static analysis, customizable rules
- Bandit (Python), Brakeman (Ruby): Language-specific scanners
DAST (Dynamic Application Security Testing)
- OWASP ZAP: Open-source web app scanner
- Burp Suite: Manual + automated testing
- Acunetix, Netsparker: Enterprise DAST solutions
- Black-box testing בסביבת runtime
IAST & RASP
- IAST: אינסטרומנטציה של הקוד לניתוח היברידי
- RASP: Runtime Application Self-Protection - זיהוי בייצור
- Contrast Security, Sqreen: IAST/RASP platforms
SCA (Software Composition Analysis)
- Snyk, WhiteSource, Mend: Dependency vulnerability scanning
- OWASP Dependency-Check: Open-source SCA
- מזהה פגיעויות ב-third-party libraries
Secure Coding Practices
- [OK] Input validation: whitelist על פני blacklist
- [OK] Output encoding: context-aware (HTML, JS, URL, CSS)
- [OK] Parametrized queries: תמיד להשתמש ב-prepared statements
- [OK] Least privilege: יישומים פועלים עם המינימום הנדרש
- [OK] Defense in depth: מספר שכבות הגנה
- [OK] Fail securely: שגיאות אינן אמורות לחשוף מידע רגיש
- [OK] Security by design: לשקול אבטחה כבר משלב הארכיטקטורה
- [OK] Keep it simple: מורכבות מגדילה את הסיכונים
Web Application Firewall (WAF)
- ModSecurity: Open-source WAF engine
- Cloudflare WAF: Cloud-based protection
- AWS WAF, Azure WAF: Cloud-native options
- Imperva, F5: Enterprise WAF appliances
- הגנה מפני OWASP Top 10, bot management, rate limiting
- Virtual patching לפגיעויות קריטיות
שילוב ב-SDLC
Shift-Left Security: לשלב אבטחה מוקדם ככל האפשר במחזור
- Design Phase: Threat modeling, secure architecture review
- Development: IDE plugins (Snyk Code, SonarLint), secure coding training
- CI/CD: SAST, SCA, container scanning, pre-commit hooks
- Testing: DAST, penetration testing, security regression tests
- Deployment: IAST, infrastructure scanning, compliance checks
- Production: RASP, WAF, monitoring, incident response
