-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More algorithm for rahash2 -E and a dedicated r2 command #4254
Comments
Which command do u like for doing this from r2? Maybe like wo?
|
Can you find small and simple c implementations for all those algorithms?
|
Yeah wo family command would be ok Here is the pycrypto repo with C code https://github.com/dlitz/pycrypto/tree/master/src |
I'll work on implementing RC2. |
I am working on XOR |
cool guys :+1 |
This sounds fun! I'd like to work on Blowfish. Note: as per issues filed there, the pycrypto library is no longer actively maintained (see this). Apparently development and other projects have moved to pycryptodome, which has everything pycrypto has and more. |
for XOR encryption what can we do if the input contains null bytes. The rahash2.c will not pass the full string to the encryption plugin like for example : |
I would prefer the lowercase name here: xor
|
I plan to work on implementing DES. |
I have added in the issue: Ability for rahash2 -E to handle file like |
we allready have DES, but it is broken |
Should we consider the case of only one file provided, If not then please suggest suitable format to separate the output. Currently, I am printing newlines after every encrypted file. |
@PankajKataria What u mean? Like decrypting/encrypting several file like |
@Maijin Yup |
AES is not done/not working in fact feel free to do add support for that as well :) |
I'm going to fix aes algo |
Cool! Maybe @condret can point you to the issues he was having and the eay to integrated in esil. But for now just focus on implementing it for rahash2 Thanks
|
I've done with most of the work for implementation here but there is still critical bug(s) that I still cannot find. So I really will be glad to receive any help with it |
can you describe the bug? :P
|
use valgrind, this is a clear buffer overflow at radare2/libr/crypto/crypto.c:120
|
Modes should be written separately from the cipher algorithms so they can be reused easily. CBC is CBC is CBC. It doesn't matter whether it is AES-CBC or Blowfish-CBC. This way as new things get added, you automatically have all the modes for it. It's also just bad to write the same code 100x. You should be able to do something like (obviously with better naming and thinking of the arguments): do_cbc_encrypt(aes, iv, input, output, length) etc... |
Feel free to change the stuff :P But having all of those basics would be already cool prior doing fancy stuff... |
I haven't looked at the code to see how it was structured yet, but I just wanted to make a note of it since I see CBC listed. It's going to be harder to change later if you don't plan ahead for it. Especially if people start wanting ofb, cfb, xts, and whatever popular thing will spring up next month. And malware authors like to be all trendy and use the fancy new modes, right? |
RAT still used rot13, arc4, xor, aes-cbc a lot so definitely not fancy. |
I was trying to be funny... :( |
:? |
ping |
there is no 3DES yet. |
See hxxps://github.com/radare/radare2/issues/6946 |
Hey, I think could be cool to add more useful crypto within r2 especially for malware analysis, here are some common one that can be found in pycrypto. See 3f5aa46 to know where/how to implement them
It needs to be able to do that on file as well and Also a command to do that within r2 could be neat
rahash2 -S key -E rc4 file.exe
More related stuff here to do ! #4280
The text was updated successfully, but these errors were encountered: