InCTF Jr 2022
August - November, 2022
InCTF Jr

Swap

Easy Reversing

Author: Abhishek Barla

There are many tools that gives you source code(.java file) from java bytecode(.class file), JD-GUI,decompiler.com are few of them

This is what happens in the source code

the ascii array of the input string is shuffled and then the adjacent bits of each integer are swapped and finally the two hex digits of each integer in it's hex representation are swapped

Here’s what we have to do in the exploit:

  1. we swap the two hex digits of each integer in it’s hex representation
  2. we swap the adjacent bits of each integer(func function)
  3. finally we then unshuffle the array and convert each value to character and join them.