Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
729bf2f
Race Condition
BerkayAtass Feb 3, 2024
e8f2e47
JWT Attack Lab Added
yavuzkuk Feb 5, 2024
f61887c
robots.txt and database UPDATE
BerkayAtass Feb 7, 2024
6a0a2ac
Clone Last Version UPDATE
BerkayAtass Feb 7, 2024
1b39e1c
Added
yavuzkuk Feb 7, 2024
e46254c
Update style.css
BerkayAtass Feb 7, 2024
be1ae29
Update style.css
BerkayAtass Feb 7, 2024
1db6c48
Broken-Authentication-2FA-upload
ozgur-karakus Feb 7, 2024
c18091a
race condation
ilaydamese2 Feb 7, 2024
d56df62
Captcha Bypass
yyusufnas Feb 7, 2024
390737e
Change France language text in main.json
mozlercelik Feb 8, 2024
28012c1
Change France language text in main.json
BerkayAtass Feb 8, 2024
8e2eb7e
Merge branch 'main' of https://github.com/BerkayAtass/VulnLab
BerkayAtass Feb 8, 2024
5554f6e
race-condition2
ilaydamese2 Feb 8, 2024
6688794
Update index.php
yavuzkuk Feb 8, 2024
d1ce91c
Delete app/lab/race-condition/race-condition2/lang/fr.ini
ilaydamese2 Feb 8, 2024
bb1f8fb
Delete app/lab/race-condition/race-condition2/tr.ini
ilaydamese2 Feb 8, 2024
3fc83f8
Delete app/lab/race-condition/race-condition2/lang/lang.php
ilaydamese2 Feb 8, 2024
0c16b1d
Delete app/lab/race-condition/race-condition2/lang/en.ini
ilaydamese2 Feb 8, 2024
c00d9a4
Delete app/lab/race-condition/race-condition2/lang/tr.ini
ilaydamese2 Feb 8, 2024
b4c5eec
Update index.php
ilaydamese2 Feb 8, 2024
708898e
Captcha Update
yyusufnas Feb 8, 2024
68c589b
Old version
yavuzkuk Feb 8, 2024
911a9e0
Lab Completed
yavuzkuk Feb 8, 2024
579f27b
Create tr.ini
ilaydamese2 Feb 8, 2024
090f928
Captcha update
yyusufnas Feb 8, 2024
abdb0e3
race-condition2
ilaydamese2 Feb 8, 2024
2841198
race-condition2
ilaydamese2 Feb 8, 2024
ef3a2ca
Create en.ini
ilaydamese2 Feb 8, 2024
cb1b80b
Delete app/lab/race-condition/race-condition2 directory
ilaydamese2 Feb 8, 2024
07dd0c0
race-condation2
ilaydamese2 Feb 8, 2024
488bc7a
Merge branch 'main' of https://github.com/ilaydamese2/VulnLab
ilaydamese2 Feb 8, 2024
2017e2a
Captcha update
yyusufnas Feb 8, 2024
fa94826
Captcha Update
yyusufnas Feb 8, 2024
b993965
Wordlist button added , .ini files edited
yavuzkuk Feb 9, 2024
5c81629
Race Contion --> IDOR
BerkayAtass Feb 9, 2024
4c76fb1
revise
ozgur-karakus Feb 10, 2024
abb61cc
IDOR UPDATE
BerkayAtass Feb 10, 2024
19b8a77
Merge pull request #37 from BerkayAtass/main
mozlercelik Feb 11, 2024
e48800e
Merge pull request #39 from ozgur-karakus/main
mozlercelik Feb 11, 2024
ece8d86
race-condition2
ilaydamese2 Feb 11, 2024
49e9c24
Credential added to front-end, .ini files updated
yavuzkuk Feb 11, 2024
51b3d8a
Merge pull request #51 from ilaydamese2/main
mozlercelik Feb 11, 2024
86e56c1
Merge pull request #38 from yavuzkuk/main
mozlercelik Feb 11, 2024
236cc10
Uptade race-condition2
ilaydamese2 Feb 13, 2024
e7e7bd1
Merge pull request #56 from ilaydamese2/main
mozlercelik Feb 13, 2024
175dfaf
Captcha Bypass Update
yyusufnas Feb 13, 2024
3cad42c
Captcha Bypass Update
yyusufnas Feb 13, 2024
a2fd78d
API_Hacking_Revised
sudebozkurt Feb 13, 2024
80e811f
API_Hacking_Revised_2
sudebozkurt Feb 13, 2024
ec879fb
API_Hacking_Revised_3
sudebozkurt Feb 14, 2024
0413074
Change lab id and a word
mozlercelik Feb 15, 2024
a4d81e2
Merge pull request #57 from sudebozkurt/main
mozlercelik Feb 15, 2024
adf1679
Update README.md
mozlercelik Feb 15, 2024
2d7417b
API_Hacking_Revised_4
sudebozkurt Feb 15, 2024
023e70f
API_Hacking_Revised_5
sudebozkurt Feb 16, 2024
843ec0d
Merge pull request #58 from sudebozkurt/main
mozlercelik Feb 18, 2024
fe24a2d
Captcha Bypass Revise
yyusufnas Feb 20, 2024
0f5d897
Merge branch 'main' into main
mozlercelik Feb 21, 2024
88b3b1d
Merge pull request #60 from yyusufnas/main
mozlercelik Feb 21, 2024
3af7431
Update race-condition2
ilaydamese2 Feb 24, 2024
0d71cfa
Merge pull request #61 from ilaydamese2/main
mozlercelik Feb 24, 2024
e3d7c5d
Race Condition Lang Update
yyusufnas Feb 25, 2024
cd5bc7f
Merge branch 'main' of https://github.com/yyusufnas/VulnLab
yyusufnas Feb 25, 2024
20667a1
Merge pull request #62 from yyusufnas/main
mozlercelik Feb 25, 2024
1062962
revise update 2
MetehanGulduren Feb 27, 2024
0502b85
Merge pull request #63 from MetehanGulduren/main
mozlercelik Mar 10, 2024
81a0b75
update
MetehanGulduren Mar 13, 2024
6aace85
Merge pull request #65 from MetehanGulduren/main
mozlercelik Mar 15, 2024
80d61e2
Update registers.php
mozlercelik Mar 20, 2024
7e1c77b
path traversal added.
muratbulut Mar 22, 2024
ebec98a
Path traversal errors have been fixed.
muratbulut Mar 27, 2024
6f8048b
path-traversal added
muratbulut Mar 28, 2024
0e26387
Merge pull request #68 from muratbulut/main
mozlercelik Mar 30, 2024
ad3ea8c
2 new categories have been added
mozlercelik Apr 9, 2024
14f93cb
Update messageYavuzlar.php
BerkayAtass May 8, 2024
72b571e
Update README.md
mozlercelik May 11, 2024
5deac59
Merge pull request #69 from BerkayAtass/main
mozlercelik May 12, 2024
a8d6952
Fix typo in README.md
kuba-orlik Feb 2, 2025
6f938f7
Merge pull request #71 from kuba-orlik/patch-1
mozlercelik Feb 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN apt-get install -y \
php-cgi \
php-cli \
php-common \
php-gd \
php-curl \
php-dev \
php-json \
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- PROJECT LOGO -->
<p align="center">
<a href="https://siberyavuzlar.com">
<a href="https://yavuzlar.org">
<img src="https://i.ibb.co/nDLHW7m/logomodern.png" alt="Logo" width="180" height="180">
</a>

Expand Down Expand Up @@ -30,6 +30,9 @@
* Broken Authentication
* Race Condition
* Server Side Template Injection (SSTI)
* API Hacking
* Captcha Bypass
* Path Traversal

<!-- Installation -->
## Installation
Expand All @@ -42,7 +45,7 @@
```
2. Go to http://localhost:1337

### Manuel Installation
### Manual Installation

1. Clone the repo
```sh
Expand Down
52 changes: 52 additions & 0 deletions app/lab/api-hacking/api-hacking1/all_wallpapers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php
require("../../../lang/lang.php");
$strings = tr();

$uploadDirectory = '../api-hacking1/api/uploads/';
$images = scandir($uploadDirectory);

$images = array_diff($images, array('..', '.'));

?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API Hacking</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<div class="container mt-5">
<button type="button" class="btn btn-primary mt-2" onclick="backToLoginPage()"><?php echo $strings['backtologin']; ?></button>
<p></p>
<div class="row">
<?php foreach ($images as $image) : ?>
<div class="col-md-4 mb-4">
<div class="card h-100">
<img src="<?= $uploadDirectory . $image ?>" class="card-img-top" alt="<?= $image ?>">
<div class="card-body text-center">
<h5 class="card-title"><?= $image ?></h5>
</div>
</div>
</div>
<?php endforeach; ?>
</div>

<div class="mt-3">
</div>
</div>

<!-- Bootstrap JS and Popper.js (required for Bootstrap JavaScript plugins) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script id="VLBar" title="<?= $strings['title'] ?>" category-id="13" src="/public/assets/js/vlnav.min.js"></script>
<script>
function backToLoginPage() {
window.location.href = 'index.php';
}
</script>
</body>
</html>
57 changes: 0 additions & 57 deletions app/lab/api-hacking/api-hacking1/api.php

This file was deleted.

43 changes: 43 additions & 0 deletions app/lab/api-hacking/api-hacking1/api/all_wallpapers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
$uploadDirectory = '../api/uploads/';
$images = scandir($uploadDirectory);

$images = array_diff($images, array('..', '.'));

?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API Hacking</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<div class="container mt-5">
<p></p>
<div class="row">
<?php foreach ($images as $image) : ?>
<div class="col-md-4 mb-4">
<div class="card h-100">
<img src="<?= $uploadDirectory . $image ?>" class="card-img-top" alt="<?= $image ?>">
<div class="card-body text-center">
<h5 class="card-title"><?= $image ?></h5>
</div>
</div>
</div>
<?php endforeach; ?>
</div>

<div class="mt-3">
</div>
</div>

<!-- Bootstrap JS and Popper.js (required for Bootstrap JavaScript plugins) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script id="VLBar" title="<?= $strings['title'] ?>" category-id="13" src="/public/assets/js/vlnav.min.js"></script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions app/lab/api-hacking/api-hacking1/api/delete_image.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

if (file_exists($targetFile) && unlink($targetFile)) {
$response['success'] = true;
$response['message'] = "Image deleted successfully.";
$response['message'] = $strings['success2'];
} else {
$response['success'] = false;
$response['message'] = "Error deleting the image.";
$response['message'] = $strings['deleteerr'];
}
} else {
$response['success'] = false;
$response['message'] = "Invalid request method.";
$response['message'] = $strings['requestmethod'];
}

echo json_encode($response);
Expand Down
16 changes: 14 additions & 2 deletions app/lab/api-hacking/api-hacking1/api/get_images.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
<?php
session_start();

$uploadDirectory = '../api/uploads/';

$images = array_diff(scandir($uploadDirectory), array('..', '.'));
if (isset($_SESSION['user_id'])) {
$userId = $_SESSION['user_id'];

$images = array_filter(scandir($uploadDirectory), function ($image) use ($userId) {
//Check if the number at the beginning of the file name matches the user ID.
preg_match('/^(\d+)_/', $image, $matches);
return isset($matches[1]) && $matches[1] == $userId;
});

echo json_encode(array_values($images));
echo json_encode(array_values($images));
} else {
echo json_encode([]);
}
?>
8 changes: 8 additions & 0 deletions app/lab/api-hacking/api-hacking1/api/logout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
session_start();

session_unset();
session_destroy();

$response = array('success' => true);
echo json_encode($response);
35 changes: 35 additions & 0 deletions app/lab/api-hacking/api-hacking1/api/reset_images.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

header("Content-Type: application/json");

$response = array();

$backupDirectory = __DIR__ . '/backup_images/';

if (!file_exists($backupDirectory)) {
$response['success'] = false;
echo json_encode($response);
exit;
}

$uploadDirectory = 'uploads/';

$files = glob($uploadDirectory . '*');
foreach ($files as $file) {
if (is_file($file)) {
unlink($file);
}
}

$backupFiles = glob($backupDirectory . '*');
foreach ($backupFiles as $backupFile) {
if (is_file($backupFile)) {
$targetFile = $uploadDirectory . basename($backupFile);
copy($backupFile, $targetFile);
}
}

$response['success'] = true;
$response['message'] = $strings['reset'];
echo json_encode($response);
?>
34 changes: 0 additions & 34 deletions app/lab/api-hacking/api-hacking1/api/top_secret/top_secret.txt

This file was deleted.

35 changes: 30 additions & 5 deletions app/lab/api-hacking/api-hacking1/api/upload.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,48 @@
<?php

session_start();
header("Content-Type: application/json");

$response = array();

$uploadDirectory = 'uploads/';

if (!is_dir($uploadDirectory)) {
mkdir($uploadDirectory, 0755, true);
// Check the user's identity.
if (!isset($_SESSION['user_id'])) {
$response['success'] = false;
$response['message'] = $strings['authenticate'];
echo json_encode($response);
exit;
}

$userId = $_SESSION['user_id'];

// Check the allowed file types.
$allowedTypes = ['image/jpeg', 'image/png', 'image/gif'];
if (!in_array($_FILES['image']['type'], $allowedTypes)) {
$response['success'] = false;
$response['message'] = $strings['invalidtype'] . implode(', ', $allowedTypes);
echo json_encode($response);
exit;
}

$targetFile = $uploadDirectory . basename($_FILES['image']['name']);
// Create the file name.
$targetFile = $uploadDirectory . $userId . '_' . basename($_FILES['image']['name']);

// Check if a file with the same name exists.
if (file_exists($targetFile)) {
$response['success'] = false;
$response['message'] = $strings['samename'];
echo json_encode($response);
exit;
}

if (move_uploaded_file($_FILES['image']['tmp_name'], $targetFile)) {
$response['success'] = true;
$response['message'] = "The upload process has been successfully completed.";
$response['message'] = $strings['success1'];
} else {
$response['success'] = false;
$response['message'] = "An error occurred while uploading the file.";
$response['message'] = $strings['uploaderr'];
}

echo json_encode($response);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
7 changes: 7 additions & 0 deletions app/lab/api-hacking/api-hacking1/api/users.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{"id":"1", "username":"admin", "password":"admin"},
{"id":"2","username":"user","password":"user"},
{"id":"3","username":"user2","password":"user2"},
{"id":"4","username":"user3","password":"user3"},
{"id":"5","username":"user4","password":"user4"}
]
Loading