Official Simple Encryptor Discussion

This is expected, some other way is needed to find out how the binary works.

hi, i’ve figured out the mechanism and the rand seed, but my code just doesn’t work. Can i PM someone for help? thanks

I solved the challenge but I have a question about proper seeding, can I PM someone about it?

Solved.

Some tips:

  1. Make sure you are using the correct byte order when decoding the seed
  2. I found it easier to use the program to encrypt my own file to attempt to crack. This makes it easier to verify your method for decoding the seed is correct

Feel free to DM me if you need any further nudges.

Could anyone solve this challenge? This encryption code has destructive bitwise operators like and, or. So they can’t reverse as I understand. is anyone can help me go through with that?

Edited: Finally got the flag. Bit hard but interesting! Respect Leeky…

Hey, I think I’m done with the reversing part, I’m trying to decode the flag but can’t quite get it done, could somebody please help me ?

hi, any help with this?
I am stuck, and no have knowledge in crypto
I have try to run in docker and I have Segmentation fault in kali and ubuntu
Mac OS gave me
exec: Failed to execute process: ‘./encrypt’ the file could not be run by the operating system
and
encrypt: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=0bddc0a794eca6f6e2e9dac0b6190b62f07c4c75, for GNU/Linux 3.2.0, not stripped

would be appreciate any hint?

thanks

Keep in mind that macOS uses a different rand implementation (pre FreeBSD 12), so your solution won’t work since srand/rand will return different results than the Linux/glibc that the author used.

in order to reverse your encryptor i had to write a new dycreptor based on methods you used and that i see in decompile code
but anyway and sence i am using windows and the encrypted file already provided i decided to use windows to test my code to dycrept your file
i learned something about rand() that it will genrate same values always if it have the same srand value
and that is nice but the real problem is that rand() will not genrate the same values if it run in diffrent environment when i run in windows the ressult is wrong but if i run in linux x86-x64 vm it will ressult the right ressults
at first i thought my sulotion was wrong so i made the encryptor for windows and and tested both encrypting and dycrepting and it was right
so at the end this mean your encrypted file can only by dycrepted in the same environment in encrypted on

thank u.

1 Like

@evrohachik It segfaults because it doesn’t have any error checking. Open it with a disassembler and you should find what conditions it is expecting.

1 Like

What are the recommended tools for

  1. Disassembling and analysing the encrypt program, and
  2. Manipulating the encrypted file to perform the bit operations?

I used ghidra for #1 and ended up giving the variables in it my own names and then for #2 writing a C program which performs the same operations in reverse. But I wonder whether there aren’t better tools for both.

the info about executing the solution on a linux x86-x64 vm saved my life. Thank you.

I found cyberchef helpful for quick data manipulation. Particularly endianness-swap and timestamp :wink:

Hint for all: pay attention to exactly what data the original program writes to the file! Will save you a lot of time.