T4Tutorials .PK

NSCT – Web Security MCQs

1. . Web security refers to:

(A) Structuring HTML


(B) Styling web pages


(C) Protecting websites, web applications, and users from cyber threats and attacks


(D) Optimizing CPU only




2. . HTTPS is used to:

(A) Optimize CPU only


(B) Style HTML elements


(C) Secure data transmission using encryption (SSL/TLS)


(D) Structure CSS




3. . XSS (Cross-Site Scripting) attacks occur when:

(A) Users cannot access a page


(B) Malicious scripts are injected into a web page viewed by users


(C) CPU is overloaded


(D) CSS is modified




4. . SQL Injection attacks occur when:

(A) Malicious SQL queries are inserted into input fields to manipulate the database


(B) CSS grids fail


(C) JavaScript is blocked


(D) HTML tags are removed




5. . CSRF (Cross-Site Request Forgery) is:

(A) A JavaScript error


(B) A styling error


(C) An attack that tricks a user into executing unwanted actions on a web application


(D) A database error only




6. . Content Security Policy (CSP) helps to:

(A) Optimize CPU


(B) Style web pages


(C) Structure HTML only


(D) Prevent XSS and other code injection attacks




7. . Input validation is important because:

(A) Only styles CSS


(B) Only structures HTML


(C) It prevents malicious data from entering the system


(D) Optimizes CPU only




8. . Password hashing ensures:

(A) CPU optimization only


(B) Styling elements


(C) Optimizing CSS


(D) Passwords are stored in an encrypted form to prevent unauthorized access




9. . Two-factor authentication (2FA) adds:

(A) Only HTML validation


(B) Only styling


(C) An additional layer of security beyond username and password


(D) CPU optimization only




10. . HTTPS uses which protocol for encryption?

(A) SSL/TLS


(B) FTP


(C) HTTP only


(D) SMTP




11. . Session hijacking refers to:

(A) Styling errors


(B) An attacker taking over a user’s session to gain unauthorized access


(C) HTML structure errors


(D) CSS grid issues




12. . Secure cookies are:

(A) Optimized CPU scripts


(B) CSS classes


(C) HTML elements


(D) Cookies that can only be transmitted over HTTPS




13. . Security headers like X-Frame-Options help to:

(A) Optimize CPU


(B) Style web pages


(C) Structure HTML only


(D) Prevent clickjacking attacks




14. . Rate limiting is used to:

(A) Style elements


(B) Optimize CSS


(C) Prevent brute-force attacks by limiting request frequency


(D) Structure HTML only




15. . HTTPS protects against:

(A) CPU optimization only


(B) Styling issues only


(C) HTML errors


(D) Data interception, eavesdropping, and man-in-the-middle attacks




16. . Cross-Origin Resource Sharing (CORS) is used to:

(A) Structure CSS grids


(B) Style HTML elements


(C) Control which domains can access resources on a server


(D) Optimize CPU only




17. . Input sanitization helps to:

(A) Remove or escape harmful characters from user input


(B) Style web pages


(C) Structure HTML


(D) Optimize CPU only




18. . Web Application Firewalls (WAFs) are used to:

(A) Structure HTML


(B) Optimize CPU only


(C) Protect web applications from attacks like SQL injection, XSS, and CSRF


(D) Style web pages




19. . OWASP Top 10 refers to:

(A) HTML structure guidelines


(B) Popular CSS frameworks


(C) JavaScript libraries


(D) A list of the most critical web application security risks




20. . The ultimate goal of web security is:

(A) Structure HTML only


(B) Only style web pages


(C) Protect web applications, data, and users from cyber threats while ensuring privacy and integrity


(D) Optimize CPU only




Exit mobile version