PHP Security
PHP Security - Important Points
1. | What is SQL Injection? |
---|
A. A type of Cross-Site Scripting attack
B. A vulnerability that allows an attacker to execute SQL statements against a database
C. A method to bypass CAPTCHA
D. A type of Denial-of-Service attack
View Answer Discuss Work SpaceAnswer: option b
Explanation:
2. | What is Cross-Site Scripting (XSS)? |
---|
A. A type of SQL Injection attack
B. A vulnerability that allows an attacker to inject scripts into a website viewed by other users
C. A method to bypass firewalls
D. A type of Social Engineering attack
View Answer Discuss Work SpaceAnswer: option b
Explanation:
3. | Which of the following is a PHP function used to prevent SQL Injection? |
---|
A. mysql_query()
B. pg_query()
C. mysqli_real_escape_string()
D. sqlite_query()
View Answer Discuss Work SpaceAnswer: option c
Explanation:
4. | Which of the following is a method to prevent Cross-Site Scripting attacks in PHP? |
---|
A. Sanitizing user input
B. Using a CAPTCHA
C. Disabling JavaScript in the browser
D. Using SSL encryption
View Answer Discuss Work SpaceAnswer: option a
Explanation:
5. | What is a Session Hijacking attack? |
---|
A. A type of Cross-Site Scripting attack
B. A method to bypass firewalls
C. A vulnerability that allows an attacker to steal a user's session ID and take over their session
D. A type of Denial-of-Service attack
View Answer Discuss Work SpaceAnswer: option c
Explanation: