forked from adeyosemanputra/pygoat
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Section and Lab added for A04:2021-Insecure Design
- Loading branch information
1 parent
c2b2b9f
commit 4ffbdec
Showing
13 changed files
with
233 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.env/ | ||
*.pyc | ||
*.pyc | ||
env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"python.formatting.provider": "yapf" | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
from django.contrib import admin | ||
from .models import FAANG,info,login,comments,otp | ||
from .models import FAANG,info,login,comments,otp,tickits | ||
|
||
# Register your models here. | ||
admin.site.register(FAANG) | ||
admin.site.register(info) | ||
admin.site.register(login) | ||
admin.site.register(comments) | ||
admin.site.register(otp) | ||
admin.site.register(otp) | ||
admin.site.register(tickits) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 4.0.3 on 2022-03-19 11:21 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('introduction', '0010_authlogin'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='tickits', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('tickit', models.CharField(max_length=40, unique=True)), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='introduction.authlogin')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 4.0.3 on 2022-03-19 12:06 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('introduction', '0011_tickits'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='tickits', | ||
name='user', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{% extends 'introduction/base.html' %} {% block content %} {% block title %} | ||
<title>Insecure Design</title> | ||
{% endblock %} | ||
<div class="content"> | ||
<h3>Insecure Design</h3> | ||
<div class="box"> | ||
<h4>What is Insecure Design</h4> | ||
<p class="bp"> | ||
Insecure design is a broad category representing different weaknesses, | ||
expressed as “missing or ineffective control design.” Insecure design is | ||
not the source for all other Top 10 risk categories. There is a difference | ||
between insecure design and insecure implementation. We differentiate | ||
between design flaws and implementation defects for a reason, they have | ||
different root causes and remediation. A secure design can still have | ||
implementation defects leading to vulnerabilities that may be exploited. | ||
An insecure design cannot be fixed by a perfect implementation as by | ||
definition, needed security controls were never created to defend against | ||
specific attacks. One of the factors that contribute to insecure design is | ||
the lack of business risk profiling inherent in the software or system | ||
being developed, and thus the failure to determine what level of security | ||
design is required. | ||
</p> | ||
<button class="coll btn btn-info">Lab Details</button> | ||
<div class="lab"> | ||
<p class="bp"> | ||
This lab helps you to get an idea of how Insecure Design can result in major Security flaw. | ||
|
||
In the next page,user can get 5 free tickets for a Movie. But he/she have to wait untill all the tickets are sold out. | ||
For this particular situation, we can get advantage of the Insecure Design and somehow get all the tickets for the movie. | ||
|
||
<ul><code>Hint</code></ul> | ||
<ul> Logout and then think.</ul> | ||
|
||
<br> | ||
<div align="right"> <button class="btn btn-info" type="button" onclick="window.location.href='/insecure-design_lab'">Access | ||
Lab</button></div> | ||
</div> | ||
<div> | ||
<br> | ||
<h4>Mitigation</h4> | ||
<p class="bp"> | ||
<ul> | ||
<li>Establish and use a secure development lifecycle with AppSec professionals to help evaluate and design security and privacy-related controls</li> | ||
<li>Establish and use a library of secure design patterns or paved road ready to use components</li> | ||
<li>Use threat modeling for critical authentication, access control, business logic, and key flows</li> | ||
<li>Integrate security language and controls into user stories</li> | ||
<li>Integrate plausibility checks at each tier of your application (from frontend to backend)</li> | ||
<li>Write unit and integration tests to validate that all critical flows are resistant to the threat model. Compile use-cases and misuse-cases for each tier of your application.s</li> | ||
<li>Segregate tier layers on the system and network layers depending on the exposure and protection needs</li> | ||
<li>Segregate tenants robustly by design throughout all tiers</li> | ||
<li>Limit resource consumption by user or service</li> | ||
</ul> | ||
</p> | ||
</div> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{% extends "introduction/base.html" %} | ||
{% load static %} | ||
{% block content %} | ||
{% block title %} | ||
<title>Insecure Design Lab</title> | ||
{% endblock %} | ||
{% block header %} | ||
|
||
{% endblock %} | ||
<div style="display:flex; flex-direction: row-reverse; align-items:center; justify-content:space-evenly; align-content:center"> | ||
<div style="display:flex; flex-direction: column; align-items:center"> | ||
<div class="jumbotron"> | ||
<h4 style="text-align:center">My Tickets </h4> | ||
<div class="login" style="text-align:center"> | ||
{% for i in tickets %} | ||
<div> {{i}} </div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
<div style="display:flex; flex-direction: column; align-items:center"> | ||
<div class="btn btn-info" style="text-align:center ,"> | ||
{{error}} | ||
</div> | ||
<br> | ||
<div class="jumbotron"> | ||
<h4 style="text-align:center">Claim Upto 5 Free Tickits </h4> | ||
<div class="login" style="text-align:center"> | ||
<form method="post" action="/insecure-design_lab"> | ||
{% csrf_token %} | ||
<input id="input" type="number" name="count" placeholder="0"><br> | ||
<button style="margin-top:20px" class="btn btn-info" type="submit"> Claim </button> | ||
</form> | ||
</div> | ||
</div> | ||
<br> | ||
<div class="jumbotron"> | ||
<h4 style="text-align:center"> Watch Movie </h4> | ||
<div class="login" style="text-align:center"> | ||
<form method="post" action="/insecure-design_lab"> | ||
{% csrf_token %} | ||
<input id="input" type="text" name="ticket" placeholder="Tickit"><br> | ||
<button style="margin-top:20px" class="btn btn-info" type="submit"> Watch </button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div align="right"> <button class="btn btn-info" type="button" onclick="window.location.href='/insecure-design'">Back to Lab | ||
Details</button></div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters