A large financial institution has recently discovered unauthorized database access where customer records were compromised. Analysis showed that an attacker executed malicious commands by manipulating input fields on the institution's website. What security measure would most effectively address this specific vulnerability?
The correct answer is implementing parameterized queries. The scenario describes a SQL injection attack, where an attacker was able to insert malicious SQL commands through a web application input field. Parameterized queries (also known as prepared statements) prevent SQL injection by separating SQL code from user-supplied data, treating the input as data rather than executable code. This approach forces developers to define all SQL code first and then pass in each parameter to the query later. Even if an attacker tries to inject malicious SQL commands, those commands will be treated as simple strings rather than executable code.
Encrypting database fields would protect data at rest but would not prevent SQL injection attacks since the application would still decrypt data for legitimate queries and the injection would still work. Implementing a Web Application Firewall (WAF) might help detect some SQL injection attempts but is not as effective as fixing the core problem in the code itself. Role-Based Access Control (RBAC) is important for limiting user privileges but doesn't address the fundamental SQL injection vulnerability in the application code.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is SQL injection?
Open an interactive chat with Bash
How do parameterized queries prevent SQL injection?
Open an interactive chat with Bash
Why is a Web Application Firewall (WAF) not the best solution for SQL injection?
Open an interactive chat with Bash
ISC2 CISSP
Security Architecture and Engineering
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .