Skip to content

Commit

Permalink
First Update
Browse files Browse the repository at this point in the history
* Remove useless references
* Added loading with only delegates for both kernel32 and ntdll functions
  • Loading branch information
arsium committed Jul 14, 2021
1 parent ca0ef9a commit c3ecf26
Show file tree
Hide file tree
Showing 41 changed files with 238 additions and 61 deletions.
Binary file modified .vs/ShellCodeLoader/v16/.suo
Binary file not shown.
Binary file modified .vs/ShellCodeLoader/v16/Browse.VC.db
Binary file not shown.
Binary file modified .vs/ShellCodeLoader/v16/Browse.VC.db-shm
Binary file not shown.
Binary file added .vs/ShellCodeLoader/v16/Solution.VC.db
Binary file not shown.
Binary file added .vs/ShellCodeLoader/v16/Solution.VC.db-shm
Binary file not shown.
Binary file added .vs/ShellCodeLoader/v16/Solution.VC.db-wal
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ F:\Personal\ShellCodeLoader\PayloadCSharp\bin\x64\Release\PayloadCSharp.pdb
F:\Personal\ShellCodeLoader\PayloadCSharp\obj\x64\Release\PayloadCSharp.csproj.CoreCompileInputs.cache
F:\Personal\ShellCodeLoader\PayloadCSharp\obj\x64\Release\PayloadCSharp.exe
F:\Personal\ShellCodeLoader\PayloadCSharp\obj\x64\Release\PayloadCSharp.pdb
F:\Personal\ShellCodeLoader\PayloadCSharp\obj\x64\Release\PayloadCSharp.csproj.AssemblyReference.cache
4 changes: 2 additions & 2 deletions ShellCodeLoader.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Global
{B2A57A97-4D88-4942-A4B3-06AA466080F2}.Release|x86.Build.0 = Release|Any CPU
{9B489FF7-A0FB-4813-96AD-B6D604DA87FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B489FF7-A0FB-4813-96AD-B6D604DA87FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B489FF7-A0FB-4813-96AD-B6D604DA87FC}.Debug|x64.ActiveCfg = Debug|Any CPU
{9B489FF7-A0FB-4813-96AD-B6D604DA87FC}.Debug|x64.Build.0 = Debug|Any CPU
{9B489FF7-A0FB-4813-96AD-B6D604DA87FC}.Debug|x64.ActiveCfg = Debug|x64
{9B489FF7-A0FB-4813-96AD-B6D604DA87FC}.Debug|x64.Build.0 = Debug|x64
{9B489FF7-A0FB-4813-96AD-B6D604DA87FC}.Debug|x86.ActiveCfg = Debug|Any CPU
{9B489FF7-A0FB-4813-96AD-B6D604DA87FC}.Debug|x86.Build.0 = Debug|Any CPU
{9B489FF7-A0FB-4813-96AD-B6D604DA87FC}.Release|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down
193 changes: 144 additions & 49 deletions ShellCodeLoader/ShellCodeLoader.cs

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions ShellCodeLoader/ShellCodeLoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ShellCodeLoader.cs" />
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a8992992a2a1f857e94d2c190e6e2acb3d35d990
2f4efe2492a647ca473cd41a9e195057146d9428
Binary file modified ShellCodeLoader/obj/Debug/ShellCodeLoader.dll
Binary file not shown.
Binary file modified ShellCodeLoader/obj/Debug/ShellCodeLoader.pdb
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9fef0c49f4b5f7b005b68c57fc326668b2cc8ace
1c02f89cdd426da38f937db1d7ded7d8cbdc2708
Binary file modified ShellCodeLoader/obj/Release/ShellCodeLoader.dll
Binary file not shown.
Binary file modified ShellCodeLoader/obj/Release/ShellCodeLoader.pdb
Binary file not shown.
28 changes: 27 additions & 1 deletion Test/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions Test/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,52 @@ private void button2_Click(object sender, EventArgs e)
csharp.Dispose();
}
}

private void button3_Click(object sender, EventArgs e)
{
if (IntPtr.Size == 8)
{
ShellCodeLoader.ShellCodeLoader cpp = new ShellCodeLoader.ShellCodeLoader(PayloadCpp64.rawData);
cpp.LoadWithNTDelegates();
cpp.Dispose();
ShellCodeLoader.ShellCodeLoader csharp = new ShellCodeLoader.ShellCodeLoader(PayloadCSharp64.rawData);
csharp.LoadWithNTDelegates();
csharp.Dispose();
}
else
{
ShellCodeLoader.ShellCodeLoader cpp = new ShellCodeLoader.ShellCodeLoader(PayloadCpp32.rawData);
cpp.Asynchronous = true;
cpp.LoadWithNTDelegates();
cpp.Dispose();
ShellCodeLoader.ShellCodeLoader csharp = new ShellCodeLoader.ShellCodeLoader(PayloadCSharp32.rawData);
csharp.LoadWithNTDelegates();
csharp.Dispose();
}
}

private void button4_Click(object sender, EventArgs e)
{
if (IntPtr.Size == 8)
{
ShellCodeLoader.ShellCodeLoader cpp = new ShellCodeLoader.ShellCodeLoader(PayloadCpp64.rawData);
cpp.LoadWithKernel32Delegates();
cpp.Dispose();
ShellCodeLoader.ShellCodeLoader csharp = new ShellCodeLoader.ShellCodeLoader(PayloadCSharp64.rawData);
csharp.LoadWithKernel32Delegates();
csharp.Dispose();
}
else
{
ShellCodeLoader.ShellCodeLoader cpp = new ShellCodeLoader.ShellCodeLoader(PayloadCpp32.rawData);
cpp.Asynchronous = true;
cpp.LoadWithKernel32Delegates();
cpp.Dispose();
ShellCodeLoader.ShellCodeLoader csharp = new ShellCodeLoader.ShellCodeLoader(PayloadCSharp32.rawData);
csharp.LoadWithKernel32Delegates();
csharp.Dispose();
}

}
}
}
Binary file modified Test/obj/Debug/DesignTimeResolveAssemblyReferences.cache
Binary file not shown.
Binary file modified Test/obj/Debug/Test.csproj.AssemblyReference.cache
Binary file not shown.
Binary file modified Test/obj/Debug/Test.csproj.GenerateResource.cache
Binary file not shown.
Binary file modified Test/obj/Debug/Test.exe
Binary file not shown.
Binary file modified Test/obj/Debug/Test.pdb
Binary file not shown.
Binary file added Test/obj/Release/Test.Form1.resources
Binary file not shown.
Binary file added Test/obj/Release/Test.Properties.Resources.resources
Binary file not shown.
Binary file not shown.
Empty file.
1 change: 1 addition & 0 deletions Test/obj/Release/Test.csproj.CoreCompileInputs.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cc3bca52f731fc5b76c24ac730a2561f6c360edc
13 changes: 13 additions & 0 deletions Test/obj/Release/Test.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
F:\Personal\ShellCodeLoader\Test\bin\Release\Test.exe.config
F:\Personal\ShellCodeLoader\Test\bin\Release\Test.exe
F:\Personal\ShellCodeLoader\Test\bin\Release\Test.pdb
F:\Personal\ShellCodeLoader\Test\bin\Release\ShellCodeLoader.dll
F:\Personal\ShellCodeLoader\Test\bin\Release\ShellCodeLoader.pdb
F:\Personal\ShellCodeLoader\Test\obj\Release\Test.csproj.AssemblyReference.cache
F:\Personal\ShellCodeLoader\Test\obj\Release\Test.Form1.resources
F:\Personal\ShellCodeLoader\Test\obj\Release\Test.Properties.Resources.resources
F:\Personal\ShellCodeLoader\Test\obj\Release\Test.csproj.GenerateResource.cache
F:\Personal\ShellCodeLoader\Test\obj\Release\Test.csproj.CoreCompileInputs.cache
F:\Personal\ShellCodeLoader\Test\obj\Release\Test.csproj.CopyComplete
F:\Personal\ShellCodeLoader\Test\obj\Release\Test.exe
F:\Personal\ShellCodeLoader\Test\obj\Release\Test.pdb
Binary file added Test/obj/Release/Test.csproj.GenerateResource.cache
Binary file not shown.
Binary file added Test/obj/Release/Test.exe
Binary file not shown.
Binary file added Test/obj/Release/Test.pdb
Binary file not shown.
Binary file modified Test/obj/x64/Debug/Test.csproj.AssemblyReference.cache
Binary file not shown.
2 changes: 1 addition & 1 deletion Test/obj/x64/Debug/Test.csproj.CoreCompileInputs.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e611841c91334bbfdd54b06c6f65ffef0d5bc2a6
69ed1963c678b7433cfcad1463c463db4cb3db12
Binary file modified Test/obj/x64/Debug/Test.csproj.GenerateResource.cache
Binary file not shown.
Binary file modified Test/obj/x64/Debug/Test.exe
Binary file not shown.
Binary file modified Test/obj/x64/Debug/Test.pdb
Binary file not shown.

0 comments on commit c3ecf26

Please sign in to comment.