diff --git a/pygoat/db.sqlite3 b/pygoat/db.sqlite3 index c6fc9d9bd..5104abc20 100644 Binary files a/pygoat/db.sqlite3 and b/pygoat/db.sqlite3 differ diff --git a/pygoat/introduction/mitre.py b/pygoat/introduction/mitre.py index 2f43bca40..dfc0d4821 100644 --- a/pygoat/introduction/mitre.py +++ b/pygoat/introduction/mitre.py @@ -6,9 +6,16 @@ import datetime from .models import CSRF_user_tbl from django.views.decorators.csrf import csrf_exempt +# import os ## Mitre top1 | CWE:787 +# target zone +FLAG = "NOT_SUPPOSED_TO_BE_ACCESSED" + +# target zone end + + @authentication_decorator def mitre_top1(request): if request.method == 'GET': @@ -198,7 +205,17 @@ def csrf_transfer_monei_api(request,recipent,amount): return redirect ('/mitre/9/lab/transaction') -@authentication_decorator +# @authentication_decorator @csrf_exempt def mitre_lab_25_api(request): - pass \ No newline at end of file + if request.method == "POST": + expression = request.POST.get('expression') + result = eval(expression) + return JsonResponse({'result': result}) + else: + return redirect('/mitre/25/lab/') + + +@authentication_decorator +def mitre_lab_25(request): + return render(request, 'mitre/mitre_lab_25.html') \ No newline at end of file diff --git a/pygoat/introduction/templates/mitre/mitre_lab_25.html b/pygoat/introduction/templates/mitre/mitre_lab_25.html new file mode 100644 index 000000000..de08fdd92 --- /dev/null +++ b/pygoat/introduction/templates/mitre/mitre_lab_25.html @@ -0,0 +1,47 @@ +{% extends "introduction/base.html" %} +{% load static %} +{% block content %} +{% block title %} +