[KEYGENME - EASY] Cracking Your First Program

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

echo tttttttttttttttt > keyfile.dat

1 Like

Nice warmup to get back into assembly

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

1 Like

what tool did you use here?

The screenshots reveal that he used BinaryNinja for the static analysis

1 Like

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 );
1 Like

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