Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
micahvandeusen authored and Sonny committed Apr 2, 2021
1 parent ed21e11 commit 39aba95
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions PotatoAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal class PotatoAPI {
public enum Mode
{
HTTP,
SMB
NamedPipe
}

public IntPtr Token {
Expand All @@ -48,7 +48,7 @@ public PotatoAPI(ushort port, string host, Mode mode) {

switch (mode)
{
case Mode.SMB:
case Mode.NamedPipe:
listener = new Thread(NamedPipeListener);
listener.Start();
break;
Expand Down
4 changes: 2 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static void Main(string[] args) {
string program = @"c:\Windows\System32\cmd.exe";
string programArgs = null;
ExecutionMethod executionMethod = ExecutionMethod.Auto;
PotatoAPI.Mode mode = PotatoAPI.Mode.SMB;
PotatoAPI.Mode mode = PotatoAPI.Mode.NamedPipe;
bool showHelp = false;

Console.WriteLine(
Expand All @@ -32,7 +32,7 @@ static void Main(string[] args) {
.Add<ExecutionMethod>("m=|method=", "Auto,User,Thread (default Auto)", v => executionMethod = v)
.Add("p=|prog=", "Program to launch (default cmd.exe)", v => program = v)
.Add("a=|args=", "Arguments for program (default null)", v => programArgs = v)
.Add<PotatoAPI.Mode>("e=|exploit=", "Exploit mode [HTTP|SMB(default)] ", v => mode = v)
.Add<PotatoAPI.Mode>("e=|exploit=", "Exploit mode [HTTP|NamedPipe(default)] ", v => mode = v)
.Add<ushort>("l=|port=", "HTTP port to listen on (default 8888)", v => port = v)
.Add("i=|host=", "HTTP host to listen on (default 127.0.0.1)", v => host = v)
.Add("h|help", "Display this help", v => showHelp = v != null);
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GenericPotato
### A modified version of SweetPotato by @_EthicalChaos_ to support generic HTTP/SMB.
### Background and explanation to come soon.
### A modified version of SweetPotato by @_EthicalChaos_ to support impersonating authentication over HTTP and/or named pipes. This allows for local privilege escalation from SSRF and/or file writes.
### For background and explanation see https://micahvandeusen.com/the-power-of-seimpersonation/

```
GenericPotato by @micahvandeusen
Expand All @@ -9,7 +9,7 @@ GenericPotato by @micahvandeusen
-m, --method=VALUE Auto,User,Thread (default Auto)
-p, --prog=VALUE Program to launch (default cmd.exe)
-a, --args=VALUE Arguments for program (default null)
-e, --exploit=VALUE Exploit mode [HTTP|SMB(default)]
-e, --exploit=VALUE Exploit mode [HTTP|NamedPipe(default)]
-l, --port=VALUE HTTP port to listen on (default 8888)
-i, --host=VALUE HTTP host to listen on (default 127.0.0.1)
-h, --help Display this help
Expand Down

0 comments on commit 39aba95

Please sign in to comment.