question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RC4 Encoding Extremely Easy to Bypass with Cache

See original GitHub issue

The RC4 encoding is incredibly easy to bypass by finding the cache variable. From my testing it appears to always be in the second function, which is declared as

var decoder = function(cacheIndexStr, key)

The cache can be identified by going to the bottom in the last if statement and looking for the last line which should be similar to

decoder['cache'][index] = decodedValue

If you can identify that line you just have to obtain the first part

decoder['cache']

or

decoder.cache

and enter it into a debug console to get the decoded string cache, from there the index in the cache matches the first parameter of the decoder call. After that it is easy to match up all of the strings (and function names) in the code.

Identifying the cache is not at all affected by self defending. Debug protection also does not affect the ability to print the cache, the console will still function when the code has hit a breakpoint.

Environment

  • Obfuscator version used: 1.1.5
  • Node version used: 6.9.5

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sanex3339commented, Jun 17, 2021

I released 2.15.4 with some changes. Now you can’t access the cache through the console without debug tools.

0reactions
sanex3339commented, Jun 17, 2021

@da411d what do you think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bypassing PESieve and Moneta (The "easy" way....?)
This will RW our payload, encrypt our payload, sleep our payload, and offload to an APC to prevent crashes during execution and hopefully...
Read more >
Attacking Very Weak RC4-Like Ciphers the Hard Way
RC4 is broken in a variety of situations. If you just naively use it twice on two different plaintexts then that is it,...
Read more >
Kerberoast - HackTricks
Kerberoasting tools typically request RC4 encryption when performing the attack and initiating TGS-REQ requests. This is because RC4 is weaker and easier to ......
Read more >
Check Your Pulse: Suspected APT Actors Leverage ...
This command accepts a base64 encoded, RC4 encrypted commands via the name parameter.
Read more >
A blueprint for evading industry leading endpoint protection in ...
However, it still is a field of expertise that stays very close to ... I leverage a XOR or RC4 encryption algorithm, because...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found