
COFF and BOF Loader written in Nim
基本上,NiCOFF 是一个用 Nim 编写的 COFF 和 BOF 文件加载器。NiCOFF 读取 BOF 或 COFF 文件,在内存中解析并执行它。整个项目基于 Yasser 和 Kevin 的 COFF Loader 项目。这些项目中的加载器和 beacon 函数都用 Nim 重写了。
你可以直接使用以下命令编译源代码:
nim c -d:release -o:NiCOFF.exe Main.nim
如果你遇到 “cannot open file” 错误,你还应该安装所需的依赖项:
nimble install ptr_math winim
NiCOFF 最多可以接受三个参数:BOF 或 COFF 文件路径、起始函数入口(你可能想要更改函数指针),以及可选的 BOF 参数(你可以查看 Kevin 的脚本)。
PS C:\Users\test\Desktop\NiCOFF\bin> .\NiCOFF.exe .\ipconfig.x64.o go
______ _ ______ _____ _______ _______
| ___ \(_)/ _____) ___ \(_______|_______)
| | | |_| / | | | |_____ _____
| | | | | | | | | | ___) | ___)
| | | | | \____| |___| | | | |
|_| |_|_|\______)_____/|_| |_|
@R0h1rr1m
[+] File is read!
[+] Sections are copied!
[+] Relocations for section: .text
[+] Relocations for section: .data
[+] Relocations for section: .bss
[+] Relocations for section: .xdata
[+] Relocations for section: .pdata
[+] Relocations for section: .rdata
[+] Relocations for section: /4
[+] Relocations are done!
[+] Trying to find the entry: go
[+] go entry found!
[+] Executing...
[+] COFF File is Executed!
[+] Output Below:
仅用于授权安全测试。未经明确许可,将此工具用于系统是违法的。