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 parameterized queries
C. Using a firewall
D. Using strong passwords
Answer: Option B
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
Which software utility uses cryptographic hashing to verify that a downloaded application patch has not been tampered with or modified by an intermediary threat actor?
A. File Compression Engine
B. Firewall Packet Filter
C. Integrity Checker / Hash Verifier
D. Sandbox Controller

Correct Answer: Option C


Explanation:
Integrity checkers calculate cryptographic hashes (like SHA-256) of files, comparing them to known vendor benchmarks to verify the file hasn't been modified.

This question belongs to: Computer Cyber Security
Question #2
What is the primary role of a stateful inspection firewall in network security architectures?
A. To encrypt local data storage volumes automatically.
B. To resolve hardware MAC pointers to DNS records.
C. To dynamically isolate viruses inside file sandboxes.
D. To monitor and track the status of active network connections, allowing response packets only from established sessions.

Correct Answer: Option D


Explanation:
Stateful firewalls maintain connection tables tracking the state of active network interactions, blocking unexpected or unsolicited inbound traffic.

This question belongs to: Computer Cyber Security
Question #3
Which of the following is a method to secure data in transit?
A. Using antivirus software
B. Using a firewall
C. Using SSL/TLS encryption
D. Using strong passwords

Correct Answer: Option C


Explanation:
SSL/TLS encryption secures data as it travels across networks, protecting it from interception and tampering.

This question belongs to: Computer Cyber Security