Reverse engineering the string mask / obfuscate function

I would like to expose or blur the part of the base64 encoded string containing some characters.

For example, I know what VovL5SaV_iSBx6oAFGypsTCOmatches 00000000. Is there a way to find out more data (input and output) to figure out an algorithm that obfuscates a string? I could not find anything.

Example:

  • The result f(A)will vary in length if Alonger f (A) is longer if A is shorter f(A)and shorter.
  • If we have A and B with a similar ending (for example, aaaaa@gmail.com and bbbbb@gmail.com ), then f (A) and f (B) will also have the same ending.
+4
source share
3 answers

based on what you mentioned, it looks like encryption uses a block cipher: One nive property about block ciphers is that the encryption of the block is independent of the previous one, this is not always true (and a very bad practice = very good for you, an attacker ), one of the cipher blocks that is: ECB: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29 , as you can see that the same key is used for each encryption, and block cipher can be equivalent to XOR, allowing decryopt to guess anything. To verify that try f (00000000000000), where the length is greater than one block and see if the pattern is repeated. If this is not the case, you can use something like CTR:https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29 " (i)" = - (, nonce (i)) XOR, f (000000000000) (1), (2)... , . , , , .

+2

, , , , , , [obfuscated/cleartext] .

, , (: 000000 000001). , , .

, , . .

, , , - , . ROT13 XOR, (?).

, _, , : as is , _ .

+2

I would like to help you with this, but it is illegal under Section 1201 of the United States Copyright Act . Perhaps someone in the country with more freedom will respond with a better answer.

1201. (1) A. No person shall circumvent a technological measure
that effectively controls access to a work protected under this title.
-1
source

Source: https://habr.com/ru/post/1680582/


All Articles