Rebuilding as DLL
parent
205df0236b
commit
5998868109
Binary file not shown.
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"ExpandedNodes": [
|
||||||
|
"",
|
||||||
|
"\\obj",
|
||||||
|
"\\obj\\Release",
|
||||||
|
"\\Properties"
|
||||||
|
],
|
||||||
|
"PreviewInSolutionExplorer": false
|
||||||
|
}
|
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
|
@ -24,7 +24,12 @@
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<StartupObject>BadPotato</StartupObject>
|
<StartupObject>
|
||||||
|
</StartupObject>
|
||||||
|
<ProjectGuid>{3B0F8EEB-1280-46EA-A0C5-591C488FE8B2}</ProjectGuid>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
|
|
@ -132,7 +132,7 @@ class BadPotato
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WindowsIdentity.Impersonate(hSystemTokenDup);
|
WindowsIdentity.Impersonate(hSystemTokenDup);
|
||||||
return new Dictionary<string, object>();
|
return new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
error();
|
error();
|
||||||
|
@ -175,6 +175,8 @@ class BadPotato
|
||||||
{
|
{
|
||||||
error();
|
error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
17
README.md
17
README.md
|
@ -1,16 +1,7 @@
|
||||||
# BadPotato
|
# BadPotato DLL to side-load into pwncat
|
||||||
|
|
||||||
Windows 2012-2019
|
Reference: https://github.com/BeichenDream/BadPotato
|
||||||
|
|
||||||
|
Modified code to retain the impersonated SYSTEM token within a method of a DLL.
|
||||||
|
|
||||||
Windows 8-10
|
Retains pwncat's C2 ProtocolError exceptions by reflection.
|
||||||
|
|
||||||
![](https://raw.githubusercontent.com/BeichenDream/BadPotato/master/screen.png)
|
|
||||||
|
|
||||||
## 引用
|
|
||||||
|
|
||||||
|
|
||||||
[https://github.com/vletoux/pingcastle](https://github.com/vletoux/pingcastle "pingcastle")
|
|
||||||
|
|
||||||
|
|
||||||
[https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/](https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/ "PrintSpoofer")
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
6dbecc83ff04be174d6b7897bd7534b144ddaba9
|
|
@ -0,0 +1,2 @@
|
||||||
|
C:\Users\johnh\source\repos\BadPotato\obj\Debug\BadPotato.csproj.AssemblyReference.cache
|
||||||
|
C:\Users\johnh\source\repos\BadPotato\obj\Debug\BadPotato.csproj.CoreCompileInputs.cache
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
C:\Users\johnh\Source\Repos\BadPotato\bin\Release\BadPotato.exe.config
|
|
||||||
C:\Users\johnh\Source\Repos\BadPotato\bin\Release\BadPotato.exe
|
|
||||||
C:\Users\johnh\Source\Repos\BadPotato\obj\Release\BadPotato.csproj.CoreCompileInputs.cache
|
C:\Users\johnh\Source\Repos\BadPotato\obj\Release\BadPotato.csproj.CoreCompileInputs.cache
|
||||||
C:\Users\johnh\Source\Repos\BadPotato\obj\Release\BadPotato.exe
|
|
||||||
C:\Users\johnh\Source\Repos\BadPotato\obj\Release\BadPotato.csproj.AssemblyReference.cache
|
C:\Users\johnh\Source\Repos\BadPotato\obj\Release\BadPotato.csproj.AssemblyReference.cache
|
||||||
|
C:\Users\johnh\source\repos\BadPotato\bin\Release\BadPotato.dll.config
|
||||||
|
C:\Users\johnh\source\repos\BadPotato\bin\Release\BadPotato.dll
|
||||||
|
C:\Users\johnh\source\repos\BadPotato\obj\Release\BadPotato.dll
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
screen.png
BIN
screen.png
Binary file not shown.
Before Width: | Height: | Size: 94 KiB |
Loading…
Reference in New Issue