Skip to content

Conversation

dolphinau
Copy link

Hello CyberChef team πŸ‘¨β€πŸ³

I'm currently working on minusone, a Tree-Sitter based deobfuscation tool.
For now, only Powershell is supported, but we plan to work on several others like VBS and JavaScript.

Under the hood, minusone relies on different deobfuscation rules that are applied in a specific order to the tree-sitter tree.
See the Powershell rule set here.

When dealing with obfuscation, Cyberchef has always been a must have for me, because obfuscated scripts often involve data pre/post-processing, which is really easy to do/show/explain with Cyberchef.
On the other side, minusone adds a very powerful cleanup for Powershell obfuscation that is not available yet in Cyberchef.
Combining both tools would be very interesting to qualify easily obfuscated scripts.

image

Minusone is written in Rust. Thanks to WASM32-WASIP2, it's possible to compile a minusone WASM component, that I then included in CyberChef.
Hence, the module is very simple by itself in this PR has all the complexity is handled with the minusone library itself.

I put the Deobfuscation operation in the Forensics category.
I create a new module, named Obfuscation to load it, because I didn't know where to put it (Code maybe?). Hence, remember to npm run build this PR before npm start, as a new module was created.

There is just one bug remaining:
When loading the operation for the first time, I get an error and the output returns [Object object].
But as soon as I start writing in the input window, the operation loads correctly and it's working like a charm.

Here is a screenshot of the bug on Firefox:
image
Again, once I start writing in the input, the deobfuscation operation works as excepted.
I have trouble trying to debug this issue, so if you have any idea, please reach me.

I added also two tests to ensure the operation behaves normally.

- Add minusonejs dependency
- Add operation
- Add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant