Skip to content
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

Feature idea: Base64 alphabet variations #647

Closed
da411d opened this issue Jun 29, 2020 · 6 comments
Closed

Feature idea: Base64 alphabet variations #647

da411d opened this issue Jun 29, 2020 · 6 comments

Comments

@da411d
Copy link
Contributor

da411d commented Jun 29, 2020

https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/src/custom-code-helpers/string-array/templates/string-array-calls-wrapper/AtobTemplate.ts#L9

To break base64 you can change base64 alphabets.
For example, original alphabet:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=

Variations:

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/=
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/=
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/+=
ABCDEFGHIJKLMN0PQRSTUVWXYZabcdefghijklmnopqrstuvwxyzO123456789/+= // swap o and zero
ABCDEFGHlJKLMNOPQRSTUVWXYZabcdefghijkImnopqrstuvwxyz0123456789/+= // swap L and i

You can even just shuffle alphabet, but it will be very eazy to notice.

@sanex3339
Copy link
Member

Really interesting idea. Will try it

@sanex3339
Copy link
Member

The finest thing is that it covers both base64 and rc4 encodings.

@sanex3339
Copy link
Member

#652

@sanex3339
Copy link
Member

First implementation - only a single static alphabet variant.
Future - random variant between few alphabets that you described above.

@sanex3339
Copy link
Member

Merged. Expect the new version soon

@sanex3339
Copy link
Member

Released as 1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants