You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-path/4/module-2.en.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -384,7 +384,7 @@ Explanation:
384
384
A) Incorrect. Failing to implement proper data validation typically does not lead to increased server performance.\
385
385
B) Incorrect. While proper data validation contributes to a better user experience by preventing errors, its absence does not enhance user experience.\
386
386
C) Correct. Without proper data validation, web applications are vulnerable to SQL injection attacks, where attackers can manipulate database queries by injecting malicious SQL code.\
387
-
D) Incorrect. Data validation helps maintain data integrity, but its absence does not improve data integrity*.
387
+
D) Incorrect. Data validation helps maintain data integrity, but its absence does not improve data integrity.
Copy file name to clipboardExpand all lines: content/learning-path/4/module-3.en.md
+45-12Lines changed: 45 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -389,81 +389,114 @@ B) An exploit that grants unauthorized access to restricted parts of a web appli
389
389
C) A weakness in the authentication mechanism of a web application, leading to compromised user credentials.\
390
390
D) A security flaw that enables attackers to intercept communication between the client and server.
391
391
392
-
Question 2. What are the potential risks associated with broken authentication vulnerabilities?
392
+
{{< question title="Answer" >}}
393
+
1. B) A weakness in the authentication mechanism of a web application, leading to compromised user credentials.
394
+
395
+
**Question 2**. What are the potential risks associated with broken authentication vulnerabilities?
393
396
394
397
A) Unauthorized access to sensitive data and user accounts.\
395
398
B) Exposure of session tokens, leading to session hijacking attacks.\
396
399
C) Compromise of user credentials, including passwords and authentication tokens.\
397
400
D) All of the above.
398
401
402
+
{{< question title="Answer" >}}
403
+
2. D) All of the above.
404
+
{{< /question >}}
405
+
399
406
**Question 3**. Which of the following is NOT an example of a mitigation mechanism for broken authentication vulnerabilities?
400
407
401
408
A) Implementing multi-factor authentication (MFA) for user accounts.\
402
409
B) Enforcing strong password policies, including regular password rotation.\
403
410
C) Disabling HTTPS to prevent interception of authentication credentials.\
404
411
D) Implementing account lockout mechanisms to prevent brute force attacks.
405
412
413
+
{{< question title="Answer" >}}
414
+
3. C) Disabling HTTPS to prevent interception of authentication credentials.
415
+
{{< /question >}}
416
+
406
417
**Question 4**. Which type of flaw may lead to compromised authentication mechanisms by allowing attackers to guess or crack user passwords?
407
418
408
419
A) Session Fixation\
409
420
B) Cross-Site Request Forgery (CSRF)\
410
421
C) Insufficient Password Complexity\
411
422
D) Cross-Site Scripting (XSS)
412
423
424
+
{{< question title="Answer" >}}
425
+
4. C) Insufficient Password Complexity
426
+
{{< /question >}}
427
+
413
428
**Question 5**. What is a specific example of a mitigation strategy for addressing the flaw of insufficient password complexity?
414
429
415
430
A) Implementing CAPTCHA challenges during the login process.\
416
431
B) Enforcing password length and complexity requirements.\
417
432
C) Encrypting authentication tokens to prevent interception.\
418
433
D) Whitelisting trusted IP addresses for accessing the login page.
419
434
435
+
{{< question title="Answer" >}}
436
+
5. B) Enforcing password length and complexity requirements.
437
+
{{< /question >}}
438
+
420
439
**Question 6**. Which mitigation strategy aims to prevent attackers from exploiting session fixation vulnerabilities?
421
440
422
441
A) Implementing session timeout mechanisms.\
423
442
B) Encrypting session cookies using HTTPS.\
424
443
C) Regenerating session identifiers after successful authentication.\
425
444
D) Enforcing strong password policies for user accounts.
426
445
446
+
{{< question title="Answer" >}}
447
+
6. C) Regenerating session identifiers after successful authentication.
448
+
{{< /question >}}
449
+
427
450
**Question 7**. What type of flaw may lead to compromised authentication mechanisms by allowing attackers to hijack active user sessions?
428
451
429
452
A) Insufficient Session Expiration\
430
453
B) Insecure Token Storage\
431
454
C) Cross-Site Scripting (XSS)\
432
455
D) Cross-Site Request Forgery (CSRF)
433
456
457
+
{{< question title="Answer" >}}
458
+
7. A) Insufficient Session Expiration
459
+
{{< /question >}}
460
+
434
461
**Question 8**. Which mitigation strategy addresses the flaw of insecure token storage by securely managing authentication tokens?
435
462
436
463
A) Storing tokens in plaintext within client-side cookies.\
437
464
B) Encrypting tokens using a symmetric encryption algorithm.\
438
465
C) Implementing secure password hashing algorithms.\
439
466
D) Using HTTP headers for transmitting authentication tokens.
440
467
468
+
{{< question title="Answer" >}}
469
+
8. B) Encrypting tokens using a symmetric encryption algorithm.
470
+
{{< /question >}}
471
+
441
472
**Question 9**. What is a specific example of a mitigation strategy for preventing session fixation attacks?
442
473
443
474
A) Rotating session identifiers after a successful login.\
444
475
B) Implementing multi-factor authentication (MFA).\
445
476
C) Using CAPTCHA challenges to verify user authenticity.\
446
477
D) Enforcing strict input validation on the login form.
447
478
479
+
{{< question title="Answer" >}}
480
+
9. A) Rotating session identifiers after a successful login.
481
+
{{< /question >}}
482
+
448
483
**Question 10**. What type of flaw may lead to compromised authentication mechanisms by allowing attackers to forge requests to the web application while authenticated as another user?
449
484
450
485
A) Insufficient Session Expiration\
451
486
B) Insufficient Transport Layer Protection\
452
487
C) Cross-Site Scripting (XSS)\
453
488
D) Cross-Site Request Forgery (CSRF)
454
489
455
-
#### Answer key
456
-
457
-
1. B) A weakness in the authentication mechanism of a web application, leading to compromised user credentials.
458
-
2. D) All of the above.
459
-
3. C) Disabling HTTPS to prevent interception of authentication credentials.
460
-
4. C) Insufficient Password Complexity
461
-
5. B) Enforcing password length and complexity requirements.
462
-
6. C) Regenerating session identifiers after successful authentication.
463
-
7. A) Insufficient Session Expiration
464
-
8. B) Encrypting tokens using a symmetric encryption algorithm.
465
-
9. A) Rotating session identifiers after a successful login.
Copy file name to clipboardExpand all lines: content/learning-path/4/module-4.en.md
+45-13Lines changed: 45 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,81 +90,112 @@ B) Ensuring data integrity\
90
90
C) Verifying user permissions\
91
91
D) Encrypting sensitive information
92
92
93
+
{{< question title="Answer" >}}
94
+
C) Verifying user permissions
95
+
{{< /question >}}
96
+
93
97
**Question 2**. Which category of vulnerability involves developers failing to check if a user is logged in on certain pages?
94
98
95
99
A) Vertical Privilege Escalation\
96
100
B) Horizontal Privilege Escalation\
97
101
C) Missing Authentication\
98
102
D) Forced Browsing
99
103
104
+
{{< question title="Answer" >}}
105
+
C) Missing Authentication
106
+
{{< /question >}}
107
+
100
108
**Question 3**. What is one common pattern of missing authentication vulnerability mentioned in the subtopic text?
101
109
102
110
A) Failing to check permissions on data-level actions\
103
111
B) Passing user IDs in URL parameters\
104
112
C) Allowing users to modify their own data\
105
113
D) Showing different links based on user login status
106
114
115
+
{{< question title="Answer" >}}
116
+
D) Showing different links based on user login status
117
+
{{< /question >}}
118
+
107
119
**Question 4**. What is the result of vertical privilege escalation vulnerability?
108
120
109
121
A) Users can access unauthorized data\
110
122
B) Less powerful users can perform powerful actions they were not authorized to do\
111
123
C) Users can edit other users' data without permission\
112
124
D) The entire site becomes vulnerable to attacks
113
125
126
+
{{< question title="Answer" >}}
127
+
B) Less powerful users can perform powerful actions
128
+
{{< /question >}}
129
+
130
+
114
131
**Question 5**. In the context of horizontal privilege escalation, what is a common cause of vulnerability according to the subtopic text?
115
132
116
133
A) Lack of developer awareness\
117
134
B) Inconsistent implementation of controls\
118
135
C) Passing user IDs in URL parameters\
119
136
D) Insufficient encryption protocols
120
137
138
+
{{< question title="Answer" >}}
139
+
B) Inconsistent implementation of controls
140
+
{{< /question >}}
141
+
142
+
121
143
**Question 6**. How can developers prevent authorization vulnerabilities according to the subtopic text?
122
144
123
145
A) Use complex logic for authorization checks\
124
146
B) Rely solely on framework support\
125
147
C) Implement their own controls consistently\
126
148
D) Ignore data-level permissions checks
127
149
150
+
{{< question title="Answer" >}}
151
+
C) Implement their own controls consistently
152
+
{{< /question >}}
153
+
128
154
**Question 7**. Which of the following is NOT a tip mentioned in the text for preventing authorization vulnerabilities?
129
155
130
156
A) Layer and simplify the process of checking user permissions\
131
157
B) Use separate websites for regular users and administrators\
132
158
C) Rely solely on framework functions for authorization\
133
159
D) Establish consistent developer guidelines for data access
134
160
161
+
{{< question title="Answer" >}}
162
+
C) Rely solely on framework functions for authorization
163
+
{{< /question >}}
164
+
135
165
**Question 8**. What is the significance of consistency in implementing authorization controls?
136
166
137
167
A) It increases the complexity of the system\
138
168
B) It reduces the likelihood of errors\
139
169
C) It limits access to certain users\
140
170
D) It makes authorization checks more difficult
141
171
172
+
{{< question title="Answer" >}}
173
+
B) It reduces the likelihood of errors
174
+
{{< /question >}}
175
+
142
176
**Question 9**. What is one example provided in the subtopic text for vertical privilege escalation vulnerability?
143
177
144
178
A) Modifying URL parameters to escalate privileges\
145
179
B) Allowing users to view other users' data\
146
180
C) Passing user IDs in hidden form fields\
147
181
D) Regular users gaining access to administrative features
148
182
183
+
{{< question title="Answer" >}}
184
+
D) Regular users gaining access to administrative features
185
+
{{< /question >}}
186
+
149
187
**Question 10**. Which vulnerability category involves users performing actions on other users' data with the same access level?
150
188
151
189
A) Missing Authentication\
152
190
B) Vertical Privilege Escalation\
153
191
C) Horizontal Privilege Escalation\
154
192
D) Forced Browsing\
155
193
156
-
#### Answer key
194
+
{{< question title="Answer" >}}
195
+
C) Horizontal Privilege Escalation
196
+
{{< /question >}}
197
+
157
198
158
-
Question 1: C) Verifying user permissions\
159
-
Question 2: C) Missing Authentication\
160
-
Question 3: D) Showing different links based on user login status\
161
-
Question 4: B) Less powerful users can perform powerful actions\
162
-
Question 5: B) Inconsistent implementation of controls\
163
-
Question 6: C) Implement their own controls consistently\
164
-
Question 7: C) Rely solely on framework functions for authorization\
165
-
Question 8: B) It reduces the likelihood of errors\
166
-
Question 9: D) Regular users gaining access to administrative features\
167
-
Question 10: C) Horizontal Privilege Escalation
168
199
169
200
### Exercise 3 (optional, only for those comfortable with basic python): code bug finding challenge
170
201
@@ -211,15 +242,16 @@ print(result)
211
242
212
243
**Find and fix the vulnerability in the `delete_profile` function.**
213
244
214
-
#### Answer key and explanation
215
-
245
+
{{< question title="Answer and explanation" >}}
216
246
The vulnerability lies in the fact that the `delete_profile` function only checks for the current user's write permission but does not verify that the current user is authorized to delete other users' profiles. This allows any user with write permission to delete any other user's profile, regardless of their own permissions.
217
247
218
248
**To fix the vulnerability, you could:**
219
249
220
250
1. Check if the current user has the "delete" permission specifically.
221
251
2. Implement role-based access control (RBAC) to restrict deletion based on user roles.
222
252
3. Add additional checks to verify the legitimacy of the deletion request.
0 commit comments