Open dmknght opened 2 years ago
First successful signature using section has calculation :D And i found out PE is having imphash in API. Seems like this is a doable idea. However, the execution speed is kinda slow imo
Ideas seem great! I will take a look at ClamAV engine. I think it will be doable.
Ideas seem great! I will take a look at ClamAV engine. I think it will be doable.
Thank you :D I'm forking this project and try adding some minor changes for easier use. Is there any way to list all API functions (for scripting)? I think it'd be great for both learning die scripting and modifying the engine.
// Is there any way to list all API functions (for scripting)?
All "public slots" functions could use for scripting.
For example for "PE" it is all "public slots" in https://github.com/horsicq/die_script/blob/master/pe_script.h https://github.com/horsicq/die_script/blob/master/msdos_script.h https://github.com/horsicq/die_script/blob/master/binary_script.h
Because PE is subclass from MSDOS and MSDOS is subclass from Binary
Feel free to add new public slots if you need.
Thank you! I'm getting the basic idea. Seems like die_script.cpp
and die_scriptengine.cpp
are 2 script controller modules
. I think i'm going to write some "malware signatures" with die scripting engine to understand it more before actually modifying the forked module :D
During the research about Scripting Engine, I found this https://duktape.org/. Well I'm giving it a try. I think it could be faster than QTEngine
Nice! Thank you. If it is faster than qtengine we could use it.
If it is faster than qtengine we could use it.
Well i don't really know if it's faster but it's very small. I checked QTEngine and the page says QtEngine is going to be replaced by QJSEngine in the future so i think you have to replace the QtEngine anyway. I mean duktape could be a good move but since you are using qt for GUI, So use scripting engine from Qt Framework is not bad at all. To me I think if i'd go with duktape, i'll try Nim lang (https://nim-lang.org/) for the engine controller. So the structure is:
But if I use this structure, it'd be hard for you and me to do co-op on this engine :D p/s: this is very new to me. I'm starting from scratch so the research time will be long :D
// But if I use this structure, it'd be hard for you and me to do co-op on this engine :D p/s: this is very new to me. I'm starting from scratch so the research time will be long :D
No problem. If something interesting comes up, we'll find a way to use it. :) In extreme cases, it will be possible to make a completely new engine for scanning.
I found this project while googling about duktape alternative
. It seems like a very straight forward engine to do custom scripting language but the documentation is very poor
https://www.angelcode.com/angelscript/sdk/docs/manual/doc_hello_world.html
p/s: Also found this performance comparison about duktape and the other js engine. Seems like duktape is not the fastest engine. IDK should i give angelscript a try https://bellard.org/quickjs/bench.html p/s2: Found simple AngelScript benchmark test and it looks promissing https://discourse.urho3d.io/t/angelscript-vs-lua-benchmark/4310/6 p/s3: I tried samples of AngelScript and got segment fault. What a disappointment I have to say... Maybe duktape is the most stable solution for now
Thanks for the information! I will try to compile AngelScript too.
Oh sorry for the very long delay ;D I have to complete the other project. Finally I can go back to this research. I used duktape-nim
to generate latest binding for duktape 2.7.0. The example can be found here
https://github.com/manguluka/duktape-nim/blob/master/tests/basic_eval.nim
I don't really know if the duktape and qt_engine has similar structure to execute standalone script. I must dig deeper into this. p/s: I don't know where to start. Should I try convert all cpp modules to be compatible with duktape or I should try rewrite functions from scratch (with C?)
Thanks a lot! I will take a look.
i started to do something simular
I've researched on malware scanner engine a lot recently and I found out this engine could be expanded. There are some good points
die_script
have docx parser, we can write a simple script likedocx.hasMacro() and docx.findMacroStr("exec")
. Sounds cool, right?2 examples about malware signatures similar to my idea:
So that's my "little" idea. I can try fork this project, add some api and try standalone script engine. What do you think about my idea? Is it doable?