Which of the following is a method to prevent SQL injection attacks? MCQ with Answer and Explanation

Which of the following is a method to prevent SQL injection attacks?
A. Installing antivirus
B. Using strong passwords
C. Using parameterized queries
D. Using a firewall
Answer: Option C
Solution (By JKSSB Mock Tests)
Parameterized queries are a programming technique that prevents SQL injection by treating user input as data, not as part of the SQL command.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Cyber Security Questions

Question #1
What form of security exploit occurs when an application inputs more variable data into a memory block than it can hold, overwriting nearby execution instructions with malicious payloads?
A. SQL Injection
B. Buffer Overflow
C. Zero-Day Exploit
D. Cross-Site Scripting

Correct Answer: Option B


Explanation:
Buffer overflows occur when input variables exceed memory segment boundaries, allowing malicious payloads to alter memory instructions and execute arbitrary commands.

This question belongs to: Computer Cyber Security
Question #2
Which of the following is a best practice for email security?
A. Verifying the sender's email address before clicking on links
B. Disabling spam filters
C. Replying to all phishing emails
D. Opening attachments from unknown senders

Correct Answer: Option A


Explanation:
Verifying the sender's email address and being cautious with links and attachments are important steps to protect against phishing and malware.

This question belongs to: Computer Cyber Security
Question #3
What is the role of encryption in securing data at rest?
A. To delete data
B. To compress data
C. To protect data stored on devices from unauthorized access
D. To increase data speed

Correct Answer: Option C


Explanation:
Encryption of data at rest protects stored data, such as files on a hard drive, by making it unreadable to unauthorized users.

This question belongs to: Computer Cyber Security