0% found this document useful (0 votes)
17 views12 pages

Software reverse engineering

The document outlines a software reverse engineering challenge where a knight must solve three tasks related to Python, Java, and C code to find keys and save a princess. Each task involves analyzing executable code and restoring the original logic to obtain a secret key. Upon successfully completing all tasks, the knight opens all doors and saves the princess, leading to a celebratory ending.

Uploaded by

Dhananjay Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views12 pages

Software reverse engineering

The document outlines a software reverse engineering challenge where a knight must solve three tasks related to Python, Java, and C code to find keys and save a princess. Each task involves analyzing executable code and restoring the original logic to obtain a secret key. Upon successfully completing all tasks, the knight opens all doors and saves the princess, leading to a celebratory ending.

Uploaded by

Dhananjay Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

// Task solving algorithm

// Files .txt

Software reverse
engineering

*
Additional study
material
// Prologue

Introduction
You are a knight of the Kingdom of Transformation.

There are 3 doors and 3 challenges


waiting for you.

Find the keys to all the doors and


save the princess!

Software reverse engineering


// Prologue

Basic concepts of the field

Initial software
logic

A secret key is required!

Restored software
logic
This is the main purpose
of all test tasks.

Software reverse engineering


// Prologue

Basic concepts of the field

Initial software
logic Software engineering

A secret key is required!

Restored software
logic Reverse engineering
This is the main purpose
of all test tasks.

Software reverse engineering


// Prologue

Basic concepts of the field

PROGRAM CODE //
Initial software PROGRAM
Executable
logic Python code
machine or byte
Java code + Initial data of
code
C-code
test tasks
A secret key is required!

Restored software PROGRAM

TEST TASK
logic
TEST TASK
pseudo-code

This is the main purpose …


...
of all test tasks.

Software reverse engineering


// Performing tasks

Test task №1.


Python code
EXE- WRAPPER
The binary program code executed in the OS environment
Valid Key (created from a Python script using PyInstaller)
The password is
BYTE CODE correct! The first
The binary program code running on a door is OPEN!
Python virtual machine

PYTHON CODE
Invalid key *
Exe-wrapper The program’s text code It’s a pity! You were
runs in the
environment
OS :
understandable to the KILLED by a
programmer (with an
> Test_1.exe poisoned arrow!
encrypted secret key)

Software reverse engineering


// Tasks

Task solution №1.


Python code

Unpacking the
Exe-wrapper using 1 Obtaining the code
using the utility 2 Manual code
analysis and 3
the script “uncompyle6" (from search for the
“pyinstxtractor.py”. Test_1.*) secret key
* Details are in
EXE- WRAPPER readme_Task_1.txt
There is a key!
BYTE CODE BYTE CODE It remains to check
PYTHON CODE PYTHON CODE PYTHON CODE that the key fits.

Read more:
Software reverse engineering readme_Task_1.txt
binary
// Performing tasks

Test task №2.


Java code
BYTE CODE
Valid code The binary code of the program running on a Java virtual machine
The password is
JAVA CODE correct! The second
The program’s text code understandable door is OPEN!
to the programmer (with an encrypted
secret key)

Invalid code
* It runs It’s a pity! You were
through virtual CRUSHED by a huge
machine Java:
> java Test_2
boulder!

Software reverse engineering


// Tasks

Task solution №2.


Java code
Obtaining a
bytecode text 1 Bytecode analysis
and restoration of 2 Manual analysis
of the code logic 3
representation using the logic of the and search for
the javap source code the secret key in
disassembler (with it.
the "-c" key)
Hooray, another
BYTE CODE BYTE CODE key! It remains to
(binary) (text)
JAVA-CODE
logics
JAVA-CODE
check that the key
JAVA-CODE
fits.

Read more:
Software reverse engineering readme_Task_2.txt
// Performing tasks

Test task №3.


C-code
EXE CODE
Valid code The binary code of the program executed in the OS environment
The password is
correct! The third
C-CODE door is OPEN!
The program’s text code understandable
to the programmer (with an encrypted
secret key)
Invalid code
It’s a pity! You have
fallen into a trap of
* It runs in the environment OS: poisonous snakes!
> Test_3.exe

Software reverse engineering


// Tasks

Task solution №3.


C-code

1 2 3
Analyzing assembly code Manual analysis of the
Obtaining text assembly
by navigating through its code functioning
code using the “IDA Pro”
functions, examining block logic and search for
product (code -
diagrams, interpreting CPU the secret key in it.
”IDAView” window,
instructions, and
Spacebar - switch modes,
reconstructing the logic of
Mouse/Click + Arrow
the source code operation.
keys/Enter to navigate
through the code) *There is protection against
decompilation!
Hooray, the last
ASSEMBLY CODE
EXE- CODE
(text)
C-CODE's key! It remains
C-CODE
C-CODE logic
to check that
the key fits.

Read more:
Software reverse engineering readme_Task_3.txt
// Epilogue

Happy ending
Congratulations, all doors are open
to you!
The princess is saved, you are happy and the
kingdom is celebrating the arrival of a new
prince.

A prince like you can accomplish any task.


Good luck!

You might also like