Compare commits

..

No commits in common. "474a6d5cb9193955bfd3a3db879f5c4265ba6c1d" and "fe43dc0497f1c2d588de6bcd3efbe787559730c2" have entirely different histories.

19 changed files with 105 additions and 129 deletions

4
app.py
View File

@ -95,7 +95,7 @@ def fmetadata():
abort(404) abort(404)
return render_template('task1-metadata.html') return render_template('task1-metadata.html')
@app.route("/forensic/getimg") @app.route("/found-me/task1") #TODO
def forensic_task1(): def forensic_task1():
return send_file(f'/tmp/task1/{session['task1_id']}.jpg') return send_file(f'/tmp/task1/{session['task1_id']}.jpg')
@ -127,7 +127,7 @@ def osintgeoguessr():
def osintrht(): def osintrht():
return render_template('osint-hardtask.html') return render_template('osint-hardtask.html')
@app.route("/web/success_login-sqltask", methods=('GET', 'POST')) @app.route("/success_login-sqltask", methods=('GET', 'POST'))
def success_login(): def success_login():
flag = session.get('sql_flag') flag = session.get('sql_flag')
if request.method == 'POST': if request.method == 'POST':

View File

@ -162,7 +162,7 @@
.container { .container {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
height: 80%; height: 100%;
min-width: 40rem; min-width: 40rem;
justify-content: center; justify-content: center;
align-content: flex-start; align-content: flex-start;
@ -184,38 +184,16 @@
padding-top: 2rem; padding-top: 2rem;
} }
.sqlInpt { #sqlInpt {
position: relative;
margin: 3.5rem; margin: 3.5rem;
background-color: rgb(0 0 0 / 85%); background-color: rgb(0 0 0 / 85%);
padding: 0.1rem 1.5rem; padding: 0.5rem 1.5rem;
text-align: left; text-align: left;
width: auto;
height: 22rem; height: 22rem;
transition: 1s; transition: 1s;
display: flex;
} }
.meme {
width: 50rem;
height: auto;
max-height: 3rem;
background-color: rgb(0 0 0/ 90%);
padding: 0.4rem 1rem;
margin-left: 6.5rem;
margin-top: 3.5rem;
box-shadow: 0.4em 0.4em 0em 0px rgba(186, 65, 166, 0.6);
transform: translateX(-165%);
transition: 0.5s;
display: block;
position: sticky;
bottom: 20px;
right: 20px;
border-radius: 0.5rem;
}
.meme:hover {
box-shadow: 0.8em 0.8em 0em 0px rgba(186, 65, 166, 0.9);
}
.slideinInpt { .slideinInpt {
transition: 1s; transition: 1s;
transform: translateX(calc(65vw + .8em + 3.5rem)); transform: translateX(calc(65vw + .8em + 3.5rem));
@ -339,7 +317,7 @@
} }
.navigation{ .navigation{
width: 19.5rem; width: 18%;
height: clamp(27rem, 65%, 39rem); height: clamp(27rem, 65%, 39rem);
padding: 0; padding: 0;
top: 17.5%; top: 17.5%;
@ -445,10 +423,9 @@
width: 3rem; width: 3rem;
height: auto; height: auto;
margin: 2rem; margin: 2rem;
display: block; bottom: 0.2vw;
position: sticky; left: 0.2vw;
bottom: 20px; position: absolute;
right: 20px;
box-shadow: 0.4em 0.4em 0em 0px rgba(0, 0, 0, 0.8); box-shadow: 0.4em 0.4em 0em 0px rgba(0, 0, 0, 0.8);
transition: 0.5s; transition: 0.5s;
border-radius: 0.5rem; border-radius: 0.5rem;

View File

@ -1,7 +1,9 @@
function showPopup() { function showPopup() {
const popup = document.getElementById("popup"); const popup = document.getElementById("popup");
const sqlInpt = document.getElementById("sqlInpt");
popup.classList.remove('slideoutHelp'); popup.classList.remove('slideoutHelp');
sqlInpt.classList.remove('slideoutInpt');
popup.style.display = "block"; popup.style.display = "block";
setTimeout(() => { setTimeout(() => {
@ -12,11 +14,15 @@ function showPopup() {
function hidePopup() { function hidePopup() {
const popup = document.getElementById("popup"); const popup = document.getElementById("popup");
const sqlInpt = document.getElementById("sqlInpt");
sqlInpt.classList.remove('slideinInpt');
sqlInpt.classList.add('slideoutInpt')
popup.classList.remove('slideinHelp'); popup.classList.remove('slideinHelp');
popup.classList.add('slideoutHelp'); popup.classList.add('slideoutHelp');
setTimeout(() => { setTimeout(() => {
popup.style.display = "none" popup.style.display = "none"
popup.style.position = "absolute"
}, 1000); }, 1000);
} }

View File

@ -3,6 +3,8 @@
<script src="{{ url_for('static', filename='scripts/animation.js') }}"></script> <script src="{{ url_for('static', filename='scripts/animation.js') }}"></script>
<meta charset="UTF-8"> <meta charset="UTF-8">
{%- if request.path != url_for('index') %} {%- if request.path != url_for('index') %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/base16/ros-pine-moon.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/base16/ros-pine-moon.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>

17
templates/_task.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="ru">
{% block head %}
{%- include '_head.html' %}
{%- endblock %}
<body>
{% include '_header.html' -%}
{% block content -%}{% endblock -%}
<img id="help" onclick="showPopup()" src="{{ url_for('static', filename='imgs/icon.png') }}">
</body>
</html>

View File

@ -1,8 +1,8 @@
<html lang="ru"> <html lang="ru">
{% include 'utils/_head.html' %} {% include '_head.html' %}
<body> <body>
{% include 'utils/_header.html' %} {% include '_header.html' %}
{% include 'utils/_mainsidenav.html' %} {% include '_mainsidenav.html' %}
<div class="container"> <div class="container">
<div class="small info1 capsule-window"> <div class="small info1 capsule-window">
<p class="simpletext">< Задания категории Форензика ></p> <p class="simpletext">< Задания категории Форензика ></p>
@ -16,9 +16,7 @@
) %} ) %}
<a href="{{ url_for(name) }}" class="btn1">{{ descr }}</a> <a href="{{ url_for(name) }}" class="btn1">{{ descr }}</a>
{%- endfor %} {%- endfor %}
</nav>
</div> </div>
</div> <img id="help" src="{{ url_for('static', filename='imgs/icon.png') }}">
<img id="help" title="Да, именно тут будет подсказка" onclick="showPopup()" src="{{ url_for('static', filename='imgs/icon.png') }}">
</body> </body>
</html> </html>

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="ru"> <html lang="ru">
{% include 'utils/_head.html' %} {% include '_head.html' %}
<body> <body>
{% include 'utils/_header.html' %} {% include '_header.html' %}
<div class="container"> <div class="container">
<div class="small info1 capsule-window"> <div class="small info1 capsule-window">
@ -55,10 +55,7 @@
<p> Good luck, have fun =) </p> <p> Good luck, have fun =) </p>
</div> </div>
</div> </div>
<div id="popup" class="meme capsule-window">
<p class="simpletext" style="text-align:left; margin:0">Ха! Самое начало, а уже подсказки ищешь?) Глупыха!!!!</p> <img id="help" src="{{ url_for('static', filename='imgs/icon.png') }}">
<span class="close-btn usable-context" onclick="hidePopup()">скрыть</span>
</div>
<img id="help" title="Да, именно тут будет подсказка" onclick="showPopup()" src="{{ url_for('static', filename='imgs/icon.png') }}">
</body> </body>
</html> </html>

View File

@ -1,8 +1,8 @@
<html lang="ru"> <html lang="ru">
{% include 'utils/_head.html' %} {% include '_head.html' %}
<body> <body>
{% include 'utils/_header.html' %} {% include '_header.html' %}
{% include 'utils/_mainsidenav.html' %} {% include '_mainsidenav.html' %}
<div class="container"> <div class="container">
<div class="small info1 capsule-window"> <div class="small info1 capsule-window">
<p class="simpletext">< Задания категории OSINT ></p> <p class="simpletext">< Задания категории OSINT ></p>
@ -14,9 +14,7 @@
) %} ) %}
<a href="{{ url_for(name) }}" class="btn1">{{ descr }}</a> <a href="{{ url_for(name) }}" class="btn1">{{ descr }}</a>
{%- endfor %} {%- endfor %}
</nav>
</div> </div>
</div> <img id="help" src="{{ url_for('static', filename='imgs/icon.png') }}">
<img id="help" title="Да, именно тут будет подсказка" onclick="showPopup()" src="{{ url_for('static', filename='imgs/icon.png') }}">
</body> </body>
</html> </html>

View File

@ -1,5 +1,5 @@
{% extends 'utils/_task.html' %} {% extends '_task.html' %}
{% include 'utils/_osintsidenav.html' %} {% include '_osintsidenav.html' %}
{% block content %} {% block content %}

View File

@ -1,8 +1,9 @@
{% extends 'utils/_task.html' %} {% extends '_task.html' %}
{% include 'utils/_websidenav.html' %} {% include '_websidenav.html' %}
{% block content %} {% block content %}
<div class="container">
<div id="popup" class="sql-guide capsule-window"> <div id="popup" class="sql-guide capsule-window">
<p class="simpletext" style="text-align: left"><a class="hltext" href="https://book.hacktricks.wiki/en/pentesting-web/sql-injection/index.html?highlight=sql%20inje#what-is-sql-injection">SQL-инъекция</a> - уязвимость системы, позволяющая пользователю ввести вредоносный код в SQL-запрос.<br /> <p class="simpletext"style="text-align: left"><a class="hltext" href="https://book.hacktricks.wiki/en/pentesting-web/sql-injection/index.html?highlight=sql%20inje#what-is-sql-injection">SQL-инъекция</a> - уязвимость системы, позволяющая пользователю ввести вредоносный код в SQL-запрос.<br />
<p class="simpletext" style="text-align: left">Как именно это работает? Все дело в том, что данные, которые ввёл пользователь, вставляются в запрос напрямую <span class="context" style="font-size: 0.9rem">(пример кода с сервера ниже)</span></p> <p class="simpletext" style="text-align: left">Как именно это работает? Все дело в том, что данные, которые ввёл пользователь, вставляются в запрос напрямую <span class="context" style="font-size: 0.9rem">(пример кода с сервера ниже)</span></p>
<pre><code class="codefont python">#Как же это работает на сервере?(не стоит так делать, иначе ваш код будет иметь ту же уязвимость) <pre><code class="codefont python">#Как же это работает на сервере?(не стоит так делать, иначе ваш код будет иметь ту же уязвимость)
login = request.form['login'] # Получаем данные из окна с логином, которые пользователь ввёл в форму login = request.form['login'] # Получаем данные из окна с логином, которые пользователь ввёл в форму
@ -16,8 +17,7 @@ cursor.execute(f'SELECT * FROM Users WHERE login == "{login}" AND password == "{
<p class="simpletext">Соответственно вся часть после знака комментария просто не учитывается. Вы успешно вошли под логином <span class="mono">admin</span>.</p> <p class="simpletext">Соответственно вся часть после знака комментария просто не учитывается. Вы успешно вошли под логином <span class="mono">admin</span>.</p>
<span class="close-btn usable-context" onclick="hidePopup()">скрыть</span> <span class="close-btn usable-context" onclick="hidePopup()">скрыть</span>
</div> </div>
<div class="container"> <div class="capsule-window" id="sqlInpt">
<div class="capsule-window sqlInpt" >
<form action="sql-injection" method="post" class="simpletext"> <form action="sql-injection" method="post" class="simpletext">
<p class="simpletext">Попробуй войти от имени админа,<br /> <p class="simpletext">Попробуй войти от имени админа,<br />
используя уязвимость<abbr class="hltext" title="Смотри подсказку(кнопка снизу слева)">SQL-инъекции</abbr>. Найдите флаг</p> используя уязвимость<abbr class="hltext" title="Смотри подсказку(кнопка снизу слева)">SQL-инъекции</abbr>. Найдите флаг</p>
@ -26,7 +26,8 @@ cursor.execute(f'SELECT * FROM Users WHERE login == "{login}" AND password == "{
<input type="submit" value="Submit" class="btn1" /> <input type="submit" value="Submit" class="btn1" />
</form> </form>
</div> </div>
</div> </div>
{% if error %} {% if error %}
<div id="error"> <p>{{ error }}</p> </div> <div id="error"> <p>{{ error }}</p> </div>
{% elif success %} {% elif success %}

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="ru"> <html lang="ru">
{% include 'utils/_head.html' %} {% include '_head.html' %}
<body> <body>
{% include 'utils/_header.html' %} {% include '_header.html' %}
<div class="container" style="max-width:70%; justify-content: space-between;min-width: 40rem; flex-wrap: nowrap"> <div class="container" style="max-width:70%; justify-content: space-between;min-width: 40rem; flex-wrap: nowrap">
<div class="profile"> <div class="profile">
<h2 class="header" style="text-align:left">Ваш Профиль:</h2> <h2 class="header" style="text-align:left">Ваш Профиль:</h2>
@ -13,12 +13,12 @@
</div> </div>
<div class="flag-input "> <div class="flag-input ">
<h3 class="header" style="text-align:left">Введите ответ:</h3> <h3 class="header" style="text-align:left">Введите ответ:</h3>
<form action="/web/success_login-sqltask" method="post" class="simpletext"> <form action="success_login" method="post" class="simpletext">
<input class="inpt" type="text" name="user_flag" style="width: 100%; height: 1.25rem; margin: 0"> <input class="inpt" type="text" name="user_flag" style="width: 100%; height: 1.25rem; margin: 0">
<input type="submit" value="Submit" class="btn1" style="margin-top: 1.25rem"> <input type="submit" value="Submit" class="btn1" style="margin-top: 1.25rem">
</div> </div>
</div> </div>
{% include 'utils/_websidenav.html' %} {% include '_sidenav.html' %}
{% if error %} {% if error %}
<div id="error"> <p>{{ error }}</p> </div> <div id="error"> <p>{{ error }}</p> </div>

View File

@ -1,5 +1,5 @@
{% extends 'utils/_task.html' %} {% extends '_task.html' %}
{% include 'utils/_forensicsidenav.html' %} {% include '_forensicsidenav.html' %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="capsule-window info1"> <div class="capsule-window info1">
@ -12,7 +12,6 @@
<input class="inpt" type="text" name="user_flag" style="width: 100%; height: 1.25rem; margin: 0"> <input class="inpt" type="text" name="user_flag" style="width: 100%; height: 1.25rem; margin: 0">
<input type="submit" value="Submit" class="btn1" style="margin-top: 1.25rem"> <input type="submit" value="Submit" class="btn1" style="margin-top: 1.25rem">
</div> </div>
<div id="popup" class="sql-guide capsule-window"> <div id="popup" class="sql-guide capsule-window">
<p class="simpletext"style="text-align: left"><a class="hltext" href="https://book.hacktricks.wiki/en/pentesting-web/sql-injection/index.html?highlight=sql%20inje#what-is-sql-injection">SQL-инъекция</a> - уязвимость системы, позволяющая пользователю ввести вредоносный код в SQL-запрос.<br /> <p class="simpletext"style="text-align: left"><a class="hltext" href="https://book.hacktricks.wiki/en/pentesting-web/sql-injection/index.html?highlight=sql%20inje#what-is-sql-injection">SQL-инъекция</a> - уязвимость системы, позволяющая пользователю ввести вредоносный код в SQL-запрос.<br />

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="ru">
{% block head %}
{%- include 'utils/_head.html' %}
{%- endblock %}
<body>
{% include 'utils/_header.html' -%}
{% block content -%}{% endblock -%}
<img id="help" title="" onclick="showPopup()" src="{{ url_for('static', filename='imgs/icon.png') }}">
</body>
</html>

View File

@ -1,8 +1,8 @@
<html lang="ru"> <html lang="ru">
{% include 'utils/_head.html' %} {% include '_head.html' %}
<body> <body>
{% include 'utils/_header.html' %} {% include '_header.html' %}
{% include 'utils/_mainsidenav.html' %} {% include '_mainsidenav.html' %}
<div class="container"> <div class="container">
<div class="small info1 capsule-window"> <div class="small info1 capsule-window">
<p class="simpletext">< Задания категории Web ></p> <p class="simpletext">< Задания категории Web ></p>
@ -16,9 +16,7 @@
) %} ) %}
<a href="{{ url_for(name) }}" class="btn1">{{ descr }}</a> <a href="{{ url_for(name) }}" class="btn1">{{ descr }}</a>
{%- endfor %} {%- endfor %}
</nav>
</div> </div>
</div> <img id="help" src="{{ url_for('static', filename='imgs/icon.png') }}">
<img id="help" title="Да, именно тут будет подсказка" onclick="showPopup()" src="{{ url_for('static', filename='imgs/icon.png') }}">
</body> </body>
</html> </html>