How beichendream/godpotato works
GodPotato is a Windows privilege-escalation command-line tool. Its documented workflow accepts a command, initializes a DCOM/RPC trigger and named-pipe context, attempts to obtain a SYSTEM impersonation token, then uses that token to launch the command. The graph separates CLI handling, DCOM activation, token handling, and Windows interop. Relationships are based on the shown excerpts, SOURCE INDEX references, and README; unsampled implementation details are not expanded.
Main entry points: Program.cs CLI workflow · GodPotatoContext.cs RPC context · GodPotatoUnmarshalTrigger.cs Unmarshal trigger · UnmarshalDCOM.cs DCOM unmarshal
Components 12
Command line
- CLI workflow
Program.cs - Argument parsing
ArgsParse.cs
DCOM activation
- RPC context
NativeAPI/GodPotatoContext.cs - Unmarshal trigger
NativeAPI/GodPotatoUnmarshalTrigger.cs - OBJREF codec
NativeAPI/ObjRef.cs - DCOM unmarshal
NativeAPI/UnmarshalDCOM.cs - COM stream adapter
NativeAPI/IStreamImpl.cs
Token handling
- Token utilities
SharpToken.cs
Windows interop
- Native API bindings
NativeAPI/NativeMethods.cs
Other components
- Service operator
- Windows RPCSS
- Requested command
Connections 16
- Service operator → CLI workflow: supplies command
README.md - CLI workflow → Argument parsing: parses arguments
Program.cs - CLI workflow → RPC context: initializes and starts
Program.cs - CLI workflow → Unmarshal trigger: invokes trigger
Program.cs - Unmarshal trigger → OBJREF codec: parses and builds
NativeAPI/GodPotatoUnmarshalTrigger.cs - Unmarshal trigger → DCOM unmarshal: unmarshals object
NativeAPI/GodPotatoUnmarshalTrigger.cs - DCOM unmarshal → COM stream adapter: wraps stream
NativeAPI/UnmarshalDCOM.cs - DCOM unmarshal → Native API bindings: calls COM unmarshal
NativeAPI/UnmarshalDCOM.cs - RPC context → Native API bindings: uses native bindings
NativeAPI/GodPotatoContext.cs - RPC context → Token utilities: checks process tokens
NativeAPI/GodPotatoContext.cs - CLI workflow → RPC context: requests token
Program.cs - RPC context → CLI workflow: returns identity
Program.cs - CLI workflow → Token utilities: launches command
Program.cs - Token utilities → Requested command: creates process
SharpToken.cs - Unmarshal trigger → Windows RPCSS: triggers DCOM/RPCSS
README.md - Native API bindings → Windows RPCSS: uses Windows COM APIs