前言
Nim编写Windows平台shellcode免杀加载器(Github)
下载项目
1 2
| wget https://github.com/aeverj/NimShellCodeLoader/releases/download/0.3.4/NimShellCodeLoader.zip unzip NimShellCodeLoader.zip
|
Windows通过GUI生成ShellCode加载器

Linux或MacOS通过命令行生成ShellCode加载器
编译可执行文件
- 编译
NimShellCodeLoader/encryption/Tdea.nim和NimShellCodeLoader/encryption/Caesar.nim为可执行文件
NimShellCodeLoader/1 2
| nim c -d:release --opt:size encryption/Tdea.nim nim c -d:release --opt:size encryption/Caesar.nim
|
生成ShellCode加载器
Caesar
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f OEP_Hiijack_Inject_Load.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Thread_Hiijack_Inject_Load.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f APC_Ijnect_Load.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Early_Bird_APC_Injetc_Load.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Direct_Load.nim
|
1
| nim c -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Thread_Pool_Wait.nim
|
1
| nim c -d:strip -d:Caesar -d:icoPath="<file>.bin" -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Fiber_Load.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CertEnumSystemStore.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CertEnumSystemStoreLocation.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CopyFile2.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CopyFileEx.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CreateTimerQueueTimer_Tech.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CryptEnumOIDInfo.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumChildWindows.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumDesktopW.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumDesktopWindows.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumDirTreeW.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumDisplayMonitors.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumFontFamiliesExW.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumFontFamiliesW.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumFontsW.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumLanguageGroupLocalesW.nim
|
1
| nim cpp -d:Caesar -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumObjects.nim
|
TDEA
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f OEP_Hiijack_Inject_Load.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Thread_Hiijack_Inject_Load.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f APC_Ijnect_Load.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Early_Bird_APC_Injetc_Load.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Direct_Load.nim
|
1
| nim c -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Thread_Pool_Wait.nim
|
1
| nim c -d:strip -d:TDEA -d:icoPath="<file>.bin" -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f Fiber_Load.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CertEnumSystemStore.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CertEnumSystemStoreLocation.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CopyFile2.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CopyFileEx.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CreateTimerQueueTimer_Tech.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f CryptEnumOIDInfo.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumChildWindows.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumDesktopW.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumDesktopWindows.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumDirTreeW.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumDisplayMonitors.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumFontFamiliesExW.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumFontFamiliesW.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumFontsW.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumLanguageGroupLocalesW.nim
|
1
| nim cpp -d:TDEA -d:icoPath="<file>.bin" -d:strip -d:release -d:source="<file>.bin" --app:gui --opt:size -o:.\bin\ -f EnumObjects.nim
|
完成
参考文献
微信公众号——NoteSec