
BeaEngine เป็นห้องสมุด C ที่ออกแบบมาเพื่อถอดรหัสคำแนะนำจาก 16 บิต, 32 บิตและสถาปัตยกรรม Intel 64 บิต มันมีชุดคำแนะนำมาตรฐานและคำแนะนำที่ตั้งค่าจาก FPU, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, VMX, CLMUL, AES, MPX, AVX, AVX2, AVX512 ส่วนขยาย หากคุณต้องการวิเคราะห์รหัสที่เป็นอันตรายและรหัสที่สับสนโดยทั่วไปมากขึ้น BeaEngine จะส่งโครงสร้างที่ซับซ้อนซึ่งอธิบายคำแนะนำที่วิเคราะห์ได้อย่างแม่นยำ
คุณสามารถใช้ใน C/C ++ (ใช้งานได้และสามารถรวบรวมได้ด้วย Visual Studio, GCC, Mingw, DigitalMars, Borlandc, Watcomc, Sunforte, Pelles C, LCC) ในแอสเซมเบลอร์ คุณสามารถใช้ในโหมดผู้ใช้และโหมดเคอร์เนล
ก่อนอื่นคุณสามารถดึงความจำและตัวถูกดำเนินการตามไวยากรณ์ที่ระบุ: ไวยากรณ์ Intel สำหรับ NASM, MASM32 และ MASM64, GOASM32 และ GOASM64, FASM (ไม่มีไวยากรณ์ AT&T จริง) ถัดไปคุณสามารถตระหนักถึงการวิเคราะห์ที่ถูกต้องเกี่ยวกับการไหลของข้อมูลและการควบคุมการไหลเพื่อสร้างชิ้นหรือรูปแบบการทำให้งงงวย
ซอร์สโค้ดของมันอยู่ภายใต้ใบอนุญาต LGPL3 ที่มี "MakeFile Builder" และส่วนหัวสำหรับภาษาต่อไปนี้: C/C ++, C#, Python3, Delphi, Purebasic, Masm32, Masm64, Nasm (x86 และ x64), Fasm (x86 และ x64)
BeaEngine ถูกนำไปใช้โดยใช้ตาราง opcode จากเอกสาร Intel, ตารางจากเว็บไซต์ Christian Ludloff www.sandpile.org และโครงการ X86DOC จาก Felix Cloutier https://www.felixcloutier.com
ซอฟต์แวร์นี้มีการแจกจ่ายภายใต้ใบอนุญาต LGPL ดูไฟล์คัดลอกและคัดลอกสำหรับรายละเอียดเพิ่มเติม
#!/usr/bin/python3
from BeaEnginePython import *
instr = Disasm(bytes.fromhex('6202054000443322'))
instr.read()
print(instr.repr())
เอาต์พุตคือ:
vpshufb zmm24, zmm31, zmmword ptr [r11+r14+0880h]
rax register: #!/usr/bin/python3
from BeaEnginePython import *
buffer = bytes.fromhex('4831c04889fbffc04989c49031ed66586a005f80c40c')
instr = Disasm(buffer)
while instr.read() > 0:
if instr.modifies("rax"):
print(f"{instr.repr():20}rax register is modified")
else:
print(instr.repr())
เอาต์พุตคือ:
xor rax, rax rax register is modified
mov rbx, rdi
inc eax rax register is modified
mov r12, rax
nop
xor ebp, ebp
pop ax rax register is modified
push 00000000h
pop rdi
add ah, 0Ch rax register is modified
#!/usr/bin/python3
from BeaEnginePython import *
instr = Disasm(bytes.fromhex('e90000000090e901000000cc90'))
while instr.read() > 0:
print(instr.repr())
if instr.is_jump():
instr.follow()
มาแยกโครงสร้างคำสั่งที่สมบูรณ์:
#!/usr/bin/python3
from BeaEnginePython import *
instr = Disasm(bytes.fromhex('62017d8115443322'))
instr.read()
print(instr.json())
เอาต์พุตคือ:
{
"repr": "vunpckhpd xmm24, xmm16, xmmword ptr [r11+r14+0220h]",
"category": "AVX512_INSTRUCTION",
"mnemonic": "vunpckhpd ",
"bytes": "62 01 7d 81 15 44 33 22",
"error": 0,
"arch": 64,
"operands": {
"1": {
"repr": "xmm24",
"type": "register",
"size": 128,
"mode": "write",
"register": {
"type": "xmm",
"value": "REG24"
}
},
"2": {
"repr": "xmm16",
"type": "register",
"size": 128,
"mode": "read",
"register": {
"type": "xmm",
"value": "REG16"
}
},
"3": {
"repr": "r11+r14+0220h",
"type": "memory",
"size": 128,
"mode": "read",
"memory": {
"base": "REG11",
"index": "REG14",
"scale": 1,
"displacement": "0x22"
}
}
},
"registers": {
"modified": {
"type": 4,
"gpr": "",
"mmx": "",
"xmm": "REG24",
"ymm": "",
"zmm": "",
"special": "",
"cr": "",
"dr": "",
"mem_management": "",
"mpx": "",
"opmask": "",
"segment": "",
"fpu": "",
"tmm": ""
},
"read": {
"type": 5,
"gpr": "REG11+REG14",
"mmx": "",
"xmm": "REG16",
"ymm": "",
"zmm": "",
"special": "",
"cr": "",
"dr": "",
"mem_management": "",
"mpx": "",
"opmask": "",
"segment": "",
"fpu": "",
"tmm": ""
}
},
"rflags": {
"of": null,
"sf": null,
"zf": null,
"af": null,
"pf": null,
"cf": null,
"tf": null,
"if": null,
"df": null,
"nt": null,
"rf": null
}
}
https://github.com/beaEngine/beaEngine/Releases
apt install cmake
git clone https://github.com/BeaEngine/beaengine.git
cmake beaengine
make
cmake -DoptBUILD_DLL=ON beaengine
make
เอกสารปัจจุบันที่นี่อธิบายว่าโครงสร้างการทำงานจาก BeenEngine เป็นอย่างไร
เอกสารเก่าสามารถอ่านได้ที่นี่: http://beatrix2004.free.fr/beaEngine/index1.php
การเปิดตัว beenEngine แต่ละรายการจะมาพร้อมกับเอกสาร PDF:
sudo apt install pandoc texlive-latex-extra
cd doc
pandoc --highlight-style tango -V mainfont="Arial" -V geometry:margin=1cm --output=beaengine.pdf beaengine.md
pandoc --highlight-style tango -V mainfont="Arial" -V geometry:margin=1cm --output=examples.pdf examples.md
ตัวอย่างพื้นฐานบางอย่างเพื่อแสดงว่า BeaEngine ทำงานอย่างไรที่นี่
หากคุณต้องการปรับปรุง beengine หรือเพิ่มคุณสมบัติส่วนตัวบางอย่างนี่คือลิงค์บางส่วน: