Skip to content

Commit 1a5425e

Browse files
committed
First version: v0.1
0 parents  commit 1a5425e

46 files changed

Lines changed: 3820 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

JavaDeserializationScanner.png

63 KB
Loading

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Java Deserialization Scanner
2+
Java Deserialization Scanner is a Burp Suite plugin aimed at adding active and passive detection of Java deserialization issues. It was written by Federico Dotta, a Security Expert at @ Mediaservice.net.
3+
4+
Java Deserialization Scanner uses custom payloads generated with a modified version of "ysoserial", tool created by frohoff and gebl. The original tool (https://github.com/frohoff/ysoserial) generate payloads for the execution of commands on the system, using the Runtime.exec function. Usually, however, it is not possible to see the output of the command and consequently it is not simple to write a scanner based on this kind of function. The modified version (https://github.com/federicodotta/ysoserial) adds the generation of payloads that execute a syncronous sleep function, very useful to check for the presence of the Java deserialization issues in an automated way.
5+
6+
Currently, the passive checks of the Java Deserialiation Scanner reported the presence of serialized Java objects in the HTTP requests (in raw format or encoded in Base64) and the active checks actively scan for the presence of weak deserialization functions in conjuction with the presence of the following weak libraries:
7+
8+
1. Apache Commons Collections 3 (up to 3.2.1)
9+
2. Apache Commons Collections 4 (up to 4.4.0)
10+
3. Spring (up to 4.2.2)
11+
12+
In the test folder there are some simple Java server applications that can be used to test the plugin. Every application employ a different vulnerable Java library.
13+
14+
# Author
15+
- Federico Dotta, Security Expert at @ Mediaservice.net
16+
17+
# Screenshot
18+
![alt tag](https://raw.githubusercontent.com/federicodotta/Java-Deserialization-Scanner/JavaDeserializationScanner.png)
19+
20+
# Installation
21+
1. Download Burp Suite: http://portswigger.net/burp/download.html
22+
2. Install Java Deserialization Scanner from the BApp Store or follow these steps:
23+
3. Download the last release of Java Deserialization Scanner
24+
4. Open Burp -> Extender -> Extensions -> Add -> Choose JavaDeserializationScannerXX.jar file
25+
5. The plugin does not need any configuration
26+
27+
# User Guide
28+
1. After installation, the Java Deserialization Scanner active and passive checks will be added to the Burp Suite scanner
29+
2. Simply run the active or passive scanner in order to check also for weak Java deserialization
30+
31+
# Improving Java Deserialization Scanner
32+
In order to improve this extension, please report any issue founded in the plugin. Furthermore if you want report me any disclosed Java library usefull for the exploitation of this weakness and, if I have the time, I will add an active check for it in my plugin.

libs/commons-codec-1.10.jar

278 KB
Binary file not shown.

libs/commons-lang3-3.4.jar

424 KB
Binary file not shown.

src/burp/BurpExtender.java

Lines changed: 350 additions & 0 deletions
Large diffs are not rendered by default.

src/burp/CustomScanIssue.java

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
package burp;
2+
3+
import java.net.URL;
4+
5+
public class CustomScanIssue implements IScanIssue {
6+
7+
private IHttpService httpService;
8+
private URL url;
9+
private IHttpRequestResponse[] httpMessages;
10+
private String name;
11+
private String severity;
12+
private String confidence;
13+
private String issueDetail;
14+
private String remediationDetail;
15+
16+
public CustomScanIssue(
17+
IHttpService httpService,
18+
URL url,
19+
IHttpRequestResponse[] httpMessages,
20+
String name,
21+
String severity,
22+
String confidence,
23+
String issueDetail,
24+
String remediationDetail
25+
)
26+
{
27+
this.httpService = httpService;
28+
this.url = url;
29+
this.httpMessages = httpMessages;
30+
this.name = name;
31+
this.severity = severity;
32+
this.confidence = confidence;
33+
this.issueDetail = issueDetail;
34+
this.remediationDetail = remediationDetail;
35+
}
36+
37+
@Override
38+
public URL getUrl()
39+
{
40+
return url;
41+
}
42+
43+
@Override
44+
public String getIssueName()
45+
{
46+
return name;
47+
}
48+
49+
@Override
50+
public int getIssueType()
51+
{
52+
return 0;
53+
}
54+
55+
@Override
56+
public String getSeverity()
57+
{
58+
return severity;
59+
}
60+
61+
@Override
62+
public String getConfidence()
63+
{
64+
return confidence;
65+
}
66+
67+
@Override
68+
public String getIssueBackground()
69+
{
70+
return null;
71+
}
72+
73+
@Override
74+
public String getRemediationBackground()
75+
{
76+
return null;
77+
}
78+
79+
@Override
80+
public String getIssueDetail()
81+
{
82+
return issueDetail;
83+
}
84+
85+
@Override
86+
public String getRemediationDetail()
87+
{
88+
return remediationDetail;
89+
}
90+
91+
@Override
92+
public IHttpRequestResponse[] getHttpMessages()
93+
{
94+
return httpMessages;
95+
}
96+
97+
@Override
98+
public IHttpService getHttpService()
99+
{
100+
return httpService;
101+
}
102+
103+
}

src/burp/IBurpExtender.java

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package burp;
2+
3+
/*
4+
* @(#)IBurpExtender.java
5+
*
6+
* Copyright PortSwigger Ltd. All rights reserved.
7+
*
8+
* This code may be used to extend the functionality of Burp Suite Free Edition
9+
* and Burp Suite Professional, provided that this usage does not violate the
10+
* license terms for those products.
11+
*/
12+
/**
13+
* All extensions must implement this interface.
14+
*
15+
* Implementations must be called BurpExtender, in the package burp, must be
16+
* declared public, and must provide a default (public, no-argument)
17+
* constructor.
18+
*/
19+
public interface IBurpExtender
20+
{
21+
/**
22+
* This method is invoked when the extension is loaded. It registers an
23+
* instance of the
24+
* <code>IBurpExtenderCallbacks</code> interface, providing methods that may
25+
* be invoked by the extension to perform various actions.
26+
*
27+
* @param callbacks An
28+
* <code>IBurpExtenderCallbacks</code> object.
29+
*/
30+
void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks);
31+
}

0 commit comments

Comments
 (0)