Lucene search
+L

PHPShell 2.4 Session Fixation Vulnerability

🗓️ 21 Feb 2017 00:00:00Reported by hyp3rlinxType 
zdt
 zdt
🔗 0day.today👁 20 Views

PHPShell 2.4 Session Fixation Vulnerability in SourceForge phpshel

Code
[+] Credits: John Page AKA hyp3rlinx
[+] Website: hyp3rlinx.altervista.org


Vendor:
==================================
sourceforge.net/projects/phpshell/
phpshell.sourceforge.net/



Product:
==============
PHPShell v2.4



Vulnerability Type:
===================
Session Fixation



CVE Reference:
==============
N/A



Security Issue:
================
PHPShell does not regenerate the Session ID upon authentication, this can
potentially allow remote attackers to access parts of the application
using only a valid PHPSESSID if PHP.INI setting for
session.use_only_cookies=0.

Since an existing XSS vulnerability exists in PHPShell "
http://hyp3rlinx.altervista.org/advisories/PHPSHELL-v2.4-CROSS-SITE-SCRIPTING.txt"
the risk is
increased if an authenticated user clicks an attacker supplied link and the
attacker finds way to access or set the victims Cookie.

In 'phpshell.php' line 153 we see call to PHP function session_start();

After user authentication no call to "session_regenerate_id()" is made
leaving the authenticated session id same as pre-auth session id.
However, "session.use_only_cookies=1" is default since PHP 4.3.0, so to
exploit it would require that PHP.INI is set to session.use_only_cookies=0
on the victims system.

When accessing the application using the session fixation flaw and
attempting to run system command the application luckily redirects to login
form.
However, if a victim is actively changing directorys, reading files etc...
attackers may still be able to read current directory and files open
in the victims PHPShell console window.



Exploit/POC:
=============

1) Login to PHPShell run commands to CD to Windows directory and run DIR
command etc, then find and copy the PHPSESSID Cookie

2) Open a second browser (InternetExplorer) and access the application
cleanly for first time using the PHPSESSID in URL.

e.g.

http://VICTIM-IP/phpshell-2.4/phpshell.php?PHPSESSID=<STOLEN-SESSION-ID>

You should see what the authenticated victim now sees...

e.g.

Current Working Directory:
Change to subdirectory:

07/13/2009  08:51 PM            24,576 Microsoft.MediaCenter.iTv.Hosting.dll
11/20/2010  10:24 PM           147,968 Microsoft.MediaCenter.iTV.Media.dll
07/13/2009  08:52 PM            45,056 Microsoft.MediaCenter.ITVVM.dll
11/20/2010  10:24 PM            56,320 Microsoft.MediaCenter.Mheg.dll
11/20/2010  10:24 PM           114,688 Microsoft.MediaCenter.Playback.dll
11/20/2010  10:24 PM         1,572,864 Microsoft.MediaCenter.Shell.dll
11/20/2010  10:24 PM           241,664 Microsoft.MediaCenter.Sports.dll
11/20/2010  10:24 PM           327,168
Microsoft.MediaCenter.TV.Tuners.Interop.dll
11/20/2010  10:24 PM         2,596,864 Microsoft.MediaCenter.UI.dll
10/29/2011  12:23 AM           465,920 mstvcapn.dll
11/20/2010  10:24 PM            88,576 NetBridge.dll
07/13/2009  08:51 PM           106,496 RegisterMCEApp.exe
06/10/2009  04:04 PM           129,528 segmcr.ttf

etc...

#  0day.today [2018-01-05]  #

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

21 Feb 2017 00:00Current
7High risk
Vulners AI Score7
20