Javatask
XESXOR9/10/20261 min read
#reversing#custom#easy#jar_decompilation#keygen_implementation#xor_swap_analysis
Javatask
Platform: rev-kids20.forkbomb.ru | Category: Reversing | Type: Challenge | Difficulty: Easy | OS: NA | Author: XESXOR | Date: 2026-03-09 | Status: Solved Techniques: jar_decompilation, keygen_implementation, xor_swap_analysis
Summary
Flag is serial for SPbCTF_2020!. Download: spbctfjavatask.jar.
Javatask — Reverse Kids 2.0
Description
Flag is serial for SPbCTF_2020!. Download: spbctfjavatask.jar.
Analysis
The JAR file contains a Java class with a serial number generation function:
- A 12-byte name is split into 3 blocks of 4 bytes (big-endian integers)
- XOR swap is performed between array elements
- The result is formatted as hex with dashes
Solution
python read-only • copy allowedname = b'SPbCTF_2020!' vals = [ int.from_bytes(name[0:4], 'big'), # SPbC = 0x53506243 int.from_bytes(name[4:8], 'big'), # TF_2 = 0x54465f32 int.from_bytes(name[8:12], 'big') # 020! = 0x30323021 ] # XOR swap vals[0] and vals[1] vals[0] ^= vals[1]; vals[1] ^= vals[0]; vals[0] ^= vals[1] serial = f'{vals[0]:08x}-{vals[1]:08x}-{vals[2]:08x}'
Important: The flag is submitted without a wrapper — just the serial number.