.NET

Security & Best Practices

OWASP Top 10, SQL injection, XSS, CSRF, encryption, Data Protection API, rate limiting, User Secrets, Azure Key Vault

24 câu hỏi phỏng vấn·
Senior
1

What is SQL injection and how does this vulnerability affect web application security?

Câu trả lời

SQL injection is an attack where malicious SQL code is inserted into application inputs to manipulate database queries. It enables unauthorized access, modification, or deletion of data. In ASP.NET Core, using parameterized queries or Entity Framework protects against this critical OWASP Top 10 threat.

2

What is Cross-Site Scripting (XSS) and what are its main types?

Câu trả lời

XSS is a vulnerability allowing attackers to inject malicious JavaScript code into web pages. The three main types are: stored XSS (persistent data), reflected XSS (transient data), and DOM-based XSS (client-side manipulation). In ASP.NET Core, encoding output and using Content Security Policy prevent these attacks.

3

What is a CSRF (Cross-Site Request Forgery) attack and how to prevent it in ASP.NET Core?

Câu trả lời

CSRF is an attack where an authenticated user is tricked into performing unintended actions on a website. The attacker forces the browser to send authenticated requests to the target site. ASP.NET Core prevents CSRF with anti-forgery tokens (AntiForgeryToken), by validating origin and Referer headers, and using SameSite cookies.

4

What are the three main security controls in the OWASP Top 10?

5

What is the difference between authentication and authorization in .NET?

+21 câu hỏi phỏng vấn

Nắm vững .NET cho lần phỏng vấn tiếp theo

Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.

Bắt đầu miễn phí