[KEYGENME - EASY] Cracking Your First Program

challenge
reverseengineering

(0x65) #21

My solution (Didn’t look at other posts):

echo tttttttttttttttt > keyfile.dat


(Stuxnet) #22

Nice warmup to get back into assembly

python -c “for i in range(0,15): print(‘t’, end=’’);” >> keyfile.dat


#23

what tool did you use here?


#25

The screenshots reveal that he used BinaryNinja for the static analysis


#26

Cutter (radare2 gui) makes it really easy to visualize it as a graph and solve it.

keygen

Code

Which might roughly translate as:

for ( int i = 0; i <= 15; i++ ) {
    if ( keyfileString[ i ] != 't' ) {
        System.out.println( "Bad key." );
        System.exit( 1 );
    }
}
System.out.println( "Good key." );
System.exit( 0 );

(Leader & Offsec Engineer) #27

This topic was automatically closed after 4 days. New replies are no longer allowed.