You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 21, 2021. It is now read-only.
Copy file name to clipboardexpand all lines: CodeExecution/Invoke-ReflectivePEInjection.ps1
+89-18
Original file line number
Diff line number
Diff line change
@@ -7,31 +7,54 @@ This script has two modes. It can reflectively load a DLL/EXE in to the PowerShe
7
7
or it can reflectively load a DLL in to a remote process. These modes have different parameters and constraints,
8
8
please lead the Notes section (GENERAL NOTES) for information on how to use them.
9
9
10
+
10
11
1.)Reflectively loads a DLL or EXE in to memory of the Powershell process.
11
12
Because the DLL/EXE is loaded reflectively, it is not displayed when tools are used to list the DLLs of a running process.
12
13
14
+
This tool can be run on remote servers by supplying a local Windows PE file (DLL/EXE) to load in to memory on the remote system,
15
+
this will load and execute the DLL/EXE in to memory without writing any files to disk.
16
+
17
+
13
18
2.) Reflectively load a DLL in to memory of a remote process.
14
19
As mentioned above, the DLL being reflectively loaded won't be displayed when tools are used to list DLLs of the running remote process.
15
20
16
21
This is probably most useful for injecting backdoors in SYSTEM processes in Session0. Currently, you cannot retrieve output
17
22
from the DLL. The script doesn't wait for the DLL to complete execution, and doesn't make any effort to cleanup memory in the
18
23
remote process.
19
24
25
+
26
+
While this script provides functionality to specify a file to load from disk a URL, or a byte array, these are more for demo purposes. The way I'd recommend using the script is to create a byte array
27
+
containing the file you'd like to reflectively load, and hardcode that byte array in to the script. One advantage of doing this is you can encrypt the byte array and decrypt it in memory, which will
28
+
bypass A/V. Another advantage is you won't be making web requests. The script can also load files from SQL Server and be used as a SQL Server backdoor. Please see the Casaba
0 commit comments