Attack Mitigations Flashcards
list Mitigations for the attacks
SQL Injection
1) Use Prepared statements (with Parameterised queries
2) Use properly constructed stored procedures
3) Allow-list input validation
4) Escape all user submitted input
Reflected XSS
Stored XSS
Directory Traversal Attack / Path Traversal Attack
1) Input Validation & Sanitisation
- White listing inputs
- Sanitising Input (remove/encode special characters)
2) Use secure APIs
3) Limit File Access
4) Configure Web Server
- Disable Directory Listing
- Block access to Sensitive files
5) Use a WAF (Web Application Firewall)
Local File Inclusion Attack
Remote File Inclusion Attack
1) Input validation & Sanitation
2) Disable remote URL file inclusion
3) Hardcoding file paths
4) Proper Error Handling to avoid leaking sensitive information to end-users
5) WAF to identify and block inclusion attempts
6)Use Security Headers to restrict the sources from which content can be loaded and to prevent browsers from interpreting files as different MIME types than what is declared.