Skip to content

Commit 46778bc

Browse files
committed
Added Native Loading injection method
1 parent 9c52fb4 commit 46778bc

File tree

9 files changed

+522
-3
lines changed

9 files changed

+522
-3
lines changed
Binary file not shown.
Binary file not shown.

.vs/TrueInjector/v18/.suo

87 KB
Binary file not shown.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"Version": 1,
3+
"WorkspaceRootPath": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\",
4+
"Documents": [
5+
{
6+
"AbsoluteMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|c:\\users\\nmjuk\\desktop\\computer\\github repositories\\trueinjector\\nativeloader.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
7+
"RelativeMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|solutionrelative:nativeloader.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
8+
},
9+
{
10+
"AbsoluteMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|c:\\users\\nmjuk\\desktop\\computer\\github repositories\\trueinjector\\mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
11+
"RelativeMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|solutionrelative:mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
12+
},
13+
{
14+
"AbsoluteMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
15+
"RelativeMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|solutionrelative:mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
16+
}
17+
],
18+
"DocumentGroupContainers": [
19+
{
20+
"Orientation": 0,
21+
"VerticalTabListWidth": 256,
22+
"DocumentGroups": [
23+
{
24+
"DockedWidth": 200,
25+
"SelectedChildIndex": 0,
26+
"Children": [
27+
{
28+
"$type": "Document",
29+
"DocumentIndex": 0,
30+
"Title": "NativeLoader.cs",
31+
"DocumentMoniker": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\NativeLoader.cs",
32+
"RelativeDocumentMoniker": "NativeLoader.cs",
33+
"ToolTip": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\NativeLoader.cs",
34+
"RelativeToolTip": "NativeLoader.cs",
35+
"ViewState": "AgIAAGYAAAAAAAAAAAAswIAAAAAvAAAAAAAAAA==",
36+
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
37+
"WhenOpened": "2025-12-13T12:21:24.265Z",
38+
"EditorCaption": ""
39+
},
40+
{
41+
"$type": "Document",
42+
"DocumentIndex": 1,
43+
"Title": "MainForm.cs",
44+
"DocumentMoniker": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\MainForm.cs",
45+
"RelativeDocumentMoniker": "MainForm.cs",
46+
"ToolTip": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\MainForm.cs",
47+
"RelativeToolTip": "MainForm.cs",
48+
"ViewState": "AgIAABcAAAAAAAAAAAAswCcAAAAlAQAAAAAAAA==",
49+
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
50+
"WhenOpened": "2025-12-12T20:35:06.078Z",
51+
"EditorCaption": ""
52+
},
53+
{
54+
"$type": "Document",
55+
"DocumentIndex": 2,
56+
"Title": "MainForm.cs [Progettazione]",
57+
"DocumentMoniker": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\MainForm.cs",
58+
"RelativeDocumentMoniker": "MainForm.cs",
59+
"ToolTip": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\MainForm.cs [Progettazione]",
60+
"RelativeToolTip": "MainForm.cs [Progettazione]",
61+
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
62+
"WhenOpened": "2025-12-12T20:34:53.315Z",
63+
"EditorCaption": " [Progettazione]"
64+
}
65+
]
66+
}
67+
]
68+
}
69+
]
70+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"Version": 1,
3+
"WorkspaceRootPath": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\",
4+
"Documents": [
5+
{
6+
"AbsoluteMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|c:\\users\\nmjuk\\desktop\\computer\\github repositories\\trueinjector\\nativeloader.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
7+
"RelativeMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|solutionrelative:nativeloader.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
8+
},
9+
{
10+
"AbsoluteMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|c:\\users\\nmjuk\\desktop\\computer\\github repositories\\trueinjector\\mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
11+
"RelativeMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|solutionrelative:mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
12+
},
13+
{
14+
"AbsoluteMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
15+
"RelativeMoniker": "D:0:0:{70170C8D-34C6-4F30-85A5-DABE0FC0199F}|TrueInjector.csproj|solutionrelative:mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
16+
}
17+
],
18+
"DocumentGroupContainers": [
19+
{
20+
"Orientation": 0,
21+
"VerticalTabListWidth": 256,
22+
"DocumentGroups": [
23+
{
24+
"DockedWidth": 200,
25+
"SelectedChildIndex": 0,
26+
"Children": [
27+
{
28+
"$type": "Document",
29+
"DocumentIndex": 0,
30+
"Title": "NativeLoader.cs",
31+
"DocumentMoniker": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\NativeLoader.cs",
32+
"RelativeDocumentMoniker": "NativeLoader.cs",
33+
"ToolTip": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\NativeLoader.cs",
34+
"RelativeToolTip": "NativeLoader.cs",
35+
"ViewState": "AgIAAGYAAAAAAAAAAAAswH0AAAAuAAAAAAAAAA==",
36+
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
37+
"WhenOpened": "2025-12-13T12:21:24.265Z",
38+
"EditorCaption": ""
39+
},
40+
{
41+
"$type": "Document",
42+
"DocumentIndex": 1,
43+
"Title": "MainForm.cs",
44+
"DocumentMoniker": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\MainForm.cs",
45+
"RelativeDocumentMoniker": "MainForm.cs",
46+
"ToolTip": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\MainForm.cs",
47+
"RelativeToolTip": "MainForm.cs",
48+
"ViewState": "AgIAABcAAAAAAAAAAAAswCcAAAAlAQAAAAAAAA==",
49+
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
50+
"WhenOpened": "2025-12-12T20:35:06.078Z",
51+
"EditorCaption": ""
52+
},
53+
{
54+
"$type": "Document",
55+
"DocumentIndex": 2,
56+
"Title": "MainForm.cs [Progettazione]",
57+
"DocumentMoniker": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\MainForm.cs",
58+
"RelativeDocumentMoniker": "MainForm.cs",
59+
"ToolTip": "C:\\Users\\nmjuk\\Desktop\\Computer\\GitHub Repositories\\TrueInjector\\MainForm.cs [Progettazione]",
60+
"RelativeToolTip": "MainForm.cs [Progettazione]",
61+
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
62+
"WhenOpened": "2025-12-12T20:34:53.315Z",
63+
"EditorCaption": " [Progettazione]"
64+
}
65+
]
66+
}
67+
]
68+
}
69+
]
70+
}

MainForm.Designer.cs

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MainForm.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public partial class MainForm : MetroForm
7272
[DllImport("kernel32.dll", SetLastError = true)]
7373
private static extern bool DuplicateHandle(IntPtr hSourceProcessHandle, IntPtr hSourceHandle, IntPtr hTargetProcessHandle, out IntPtr lpTargetHandle, uint dwDesiredAccess, bool bInheritHandle, uint dwOptions);
7474

75-
[DllImport("ntdll")]
75+
[DllImport("ntdll.dll")]
7676
private static extern uint NtUnmapViewOfSection(IntPtr hProc, IntPtr baseAddr);
7777

7878
[DllImport("kernelbase.dll", SetLastError = true)]
@@ -397,7 +397,7 @@ private void guna2Button3_Click(object sender, EventArgs e)
397397
else if (guna2ComboBox4.SelectedIndex == 4)
398398
{
399399
IntPtr hSection = CreateFileMapping(new IntPtr(-1), IntPtr.Zero, PAGE_READWRITE, 0, dllSize, null);
400-
IntPtr localView = MapViewOfFile( hSection, FILE_MAP_WRITE, 0, 0, (UIntPtr)dllSize );
400+
IntPtr localView = MapViewOfFile(hSection, FILE_MAP_WRITE, 0, 0, (UIntPtr)dllSize);
401401
Marshal.Copy(dllBytes, 0, localView, dllBytes.Length);
402402

403403
long offset = 0;
@@ -603,6 +603,11 @@ private void guna2Button3_Click(object sender, EventArgs e)
603603
uint processId = uint.Parse(listView1.SelectedItems[0].Text);
604604
new Thread(() => ThreadHijack(processId, guna2TextBox2.Text)).Start();
605605
}
606+
else if (guna2ComboBox3.SelectedIndex == 3)
607+
{
608+
uint processId = uint.Parse(listView1.SelectedItems[0].Text);
609+
new Thread(() => NativeLoader.InjectLdrLoadDll((int)processId, guna2TextBox2.Text)).Start();
610+
}
606611

607612
MessageBox.Show("Succesfully injected!", "TrueInjector", MessageBoxButtons.OK, MessageBoxIcon.Information);
608613
}

0 commit comments

Comments
 (0)