PHP Security
PHP Security - Important Points
6. | Which of the following is a method to prevent Session Hijacking attacks in PHP? |
---|
A. Using SSL encryption
B. Using a strong session ID generator
C. Storing session data in cookies
D. Disabling cookies in the browser
View Answer Discuss Work SpaceAnswer: option b
Explanation:
7. | What is Cross-Site Request Forgery (CSRF)? |
---|
A. A vulnerability that allows an attacker to execute SQL statements against a database
B. A type of Cross-Site Scripting attack
C. A vulnerability that allows an attacker to submit unauthorized requests on behalf of a user
D. A type of Denial-of-Service attack
View Answer Discuss Work SpaceAnswer: option c
Explanation:
8. | Which of the following is a method to prevent Cross-Site Request Forgery (CSRF) attacks in PHP? |
---|
A. Using SSL encryption
B. Verifying the HTTP referrer header
C. Storing session data in cookies
D. Using a CAPTCHA
View Answer Discuss Work SpaceAnswer: option b
Explanation:
9. | What is a file inclusion vulnerability? |
---|
A. A vulnerability that allows an attacker to execute arbitrary code on a system
B. A vulnerability that allows an attacker to include a file from a remote server
C. A vulnerability that allows an attacker to bypass authentication
D. A vulnerability that allows an attacker to delete files on a system
View Answer Discuss Work SpaceAnswer: option b
Explanation:
10. | Which of the following is a method to prevent file inclusion vulnerabilities in PHP? |
---|
A. Using SSL encryption
B. Restricting access to sensitive files
C. Using the extract() function
D. Using the $_REQUEST superglobal variable
View Answer Discuss Work SpaceAnswer: option b
Explanation: