Decodex User Guide
Table of Contents
- Introduction
- Terminologies
- Symbols
- Quick Start
- List of Available Modules
-
Features
- Basic Commands
-
Recipe Commands:
recipe
- Create a New Recipe:
recipe new
- Select a Recipe for Editing:
recipe select
- Deselect the Current Editing Recipe:
recipe deselect
- List Modules in a Recipe:
recipe list
- Add a Module to a Recipe:
recipe push
- Remove a Module from a Recipe:
recipe pop
- Clear All Modules in a Recipe:
recipe reset
- Delete a Recipe:
recipe delete
- Create a New Recipe:
- Storage of Recipe Files
- Reading/Writing Data from/to File
coming soon in the future
- Command Summary
- FAQ
Introduction
Decodex is a Command Line Interface (CLI) application for Capture-The-Flag (CTF) players to perform encoding, decoding, encryption and decryption of data, which come in the form of modules that can be executed with ease and without any programming needed. Decodex also provides recipes which can also be used to link several of these modules together so that they could be executed in one go to speed up repetitive tasks. The intuitive interaction can thus help to speed up a player’s performance during CTFs and save time without having to manually code the tedious data transformations.
This guide serves to help you understand the usage of the program, which includes performing data transformations using basic commands as well as developing and managing recipes using recipe commands.
This user guide is tailor-made for CTF players who have some technical understanding of encoding schemes and cryptography.
Terminologies
This section serves to help you better understand the terminologies used in this user guide.
Terminology | Definition |
---|---|
Data transformation | The conversion of one data format to another. |
Application, Program | Refers to the Decodex program. These two terms are used interchangeably in this User Guide. |
Encoding | Converting a message into a coded form. |
Decoding | Converting a coded message into an intelligible form. |
Encryption | Converting a message into a form where only authorized parties are able to decipher it. |
Decryption | Converting an encrypted message back to its original form by deciphering it. |
Base64, Binary, Hexadecimal | Common types of data encoding standards. |
Console | This refers to your command prompt window. |
Argument | Additional information that you provide to the program’s command. |
Module | A self-contained set of instructions to process your data into another form. A full list of supported modules can be found here. |
Recipe | Acts as a container for you to link several modules together that will be executed back-to-back on your data. By default, the application does not have any default recipes installed. |
Symbols
Symbol | Definition |
---|---|
Represents a good tip for you. | |
Represents something important that you should take note of. | |
Represents additional information regarding commands/features for you to better understand how to use it. | |
Represents something optional that you can try out, mostly for exploring or fun. |
Quick Start
- Ensure you have Java version
11
or above installed on your computer.- If you haven’t, you may download it here.
You should download the installation relative to your Operating System.
- If you haven’t, you may download it here.
- Next, download the latest
decodex.jar
here.- Simply click on
decodex.jar
under “Assets” and the download should start.
- Simply click on
- After downloading, you can open up
command prompt
.To open command prompt, press
win + r
at the same time, then type and entercmd
. - Afterwards, you can run
decodex.jar
by typing injava -jar decodex.jar
and Decodex’s prompt should appear. Please also ensure that you are in the same directory as where you have downloadeddecodex.jar
.- In the screenshot below, you can see that
decodex.jar
is run in theDownloads
folder. To add on, it also shows you how to better understand the startup prompt of Decodex.
- In the screenshot below, you can see that
- Now, you are ready to try out some of the basic commands below:
-
input I am groot
: Inputs the text dataI am groot
into the program. -
list
: Lists all available modules and recipes that you can use. -
select module base64encode
: Selects and runs the base64-encoding module on the data. -
reset
: Resets the changes made to data - resetting to its original data. -
exit
: Exits the application.
-
- For more information on Decodex’s features, please refer to the Features Section.
To make things more interesting while learning how to use Decodex, you may try to find out what
NTEgMzEgNTIgNDcgNjUgMzAgNGUgNTQgNGQgNmEgNDUgNzggNGQgMzEgNTIgMzk=
using our application! If you are new here, you can continue reading this guide to understand how to unravel this mysterious text!
List of Available Modules
Below, you can see the list of available modules and what they do.
These are some of the more common encoding/decoding/cipher methods that can be found in CTF competitions.
Module | Description | moduleArgument |
---|---|---|
base64encode |
Encodes the data using base64 format. | N.A |
base64decode |
Decodes the data using base64 format. | N.A |
hexencode |
Converts the input string to hexadecimal bytes. | N.A |
hexdecode |
Converts a hexadecimal string back into its raw value. Note that this module does not accept any form of separators (space, commas, etc.) in the data. |
N.A |
binencode |
Encodes the data using binary format. | N.A |
bindecode |
Decodes the data using binary format. Note that this module does not accept any form of separators (space, commas, etc.) in the data. |
N.A |
rotencode |
Rotates alphabetical characters by a specified integer offset. E.g., select module rotencode 13 , recipe push rotencode 13
|
The rotation offset. Must be an integer between -2,147,483,648 (MIN_INT ) and 2,147,483,647 (MAX_INT ). |
Features
Notes about the commands and arguments:
- Arguments enclosed in
<>
are mandatory arguments while arguments enclosed in{}
are optional arguments. For example,select <moduleName> {moduleArgument}
would mean thatmoduleName
is mandatory whilemoduleArgument
is optional.- Arguments must be entered in the exact order and position as specified in the commands’ respective formats.
- All commands and arguments are case-sensitive.
- After the execution of a command, you may see a
[+]
, which means that it ran successfully or a[x]
, which denotes that an error has occurred.
Basic Commands
Help: help
Lists the syntax and descriptions of all available commands.
Format: help
Example:
Input of Data: input
Stores the data to be processed by modules.
Format: input <data>
data
will be treated as text.
Examples:
-
input HelloWorld!
Enters the plain-textHelloWorld!
as data. -
input SGVsbG9Xb3JsZA==
Enters the base64-encoded textSGVsbG9Xb3JsZA==
as data.
Behaviour of the
input
command:
- Note that the program will consider all characters as data following the first space character in the input command. You may observe leading and trailing whitespaces in the output.
- Non-printable characters (e.g. null characters) may not be correctly displayed and could potentially scramble the user interface.
List Available Modules or Recipes: list
Shows a list of all available modules or recipes.
Format: list {category}
Notes about the
list
command:
- The acceptable values of
category
aremodules
andrecipes
.- When
category
is not specified, both lists of modules and recipes are printed.
Examples:
-
list
Lists all available modules and recipes. -
list modules
Lists available modules only. -
list recipes
Lists available recipes only.
Select a Module or Recipe: select
Selects a module or recipe and processes the data accordingly. Subsequent selection of modules or recipes will process the transformed data output from the previous module or recipe.
Format: select module <moduleName> {moduleArgument}
, select recipe <recipeName>
Notes about the
select
command:
moduleName
is the name of an available module supported by Decodex.moduleArgument
is an argument that certain modules accept as input.recipeName
is the name of an available recipe that is loaded by the program.- You may also refer here for more details on our modules and its usage.
Examples:
-
select module base64decode
Runs thebase64decode
module on the current data. -
select module rotencode 13
Runs therotencode
module with argument13
on the current data. -
select recipe testRecipe1
Runs thetestRecipe1
recipe on the current data.
Show Current Data: show
Shows you the current data.
Format: show
Reset Data: reset
Resets the transformed data back to the original input.
Format: reset
Exit the Program: exit
Exits the program.
Format: exit
If you are trying out the side-quest from earlier and can’t seem to find the solution to it, you may refer to the solution in the picture at the start of the user guide!
Recipe Commands: recipe
During the execution of the application, it would display the name of the recipe that is “currently being edited” (if any) in
[]
of the application’s prompt. This currently edited recipe will be the target for somerecipe
commands such asrecipe push
,recipe pop
andrecipe reset
.
Create a New Recipe: recipe new
Creates a new recipe and sets it as currently being edited.
Format: recipe new <recipeName>
recipeName
can only contain alphabets, numbers and underscores.
Example:
-
recipe new testRecipe
Creates a new recipe with the nametestRecipe
.
Select a Recipe for Editing: recipe select
Sets a recipe as currently being edited.
Format: recipe select <recipeName>
Example:
-
recipe select testRecipe
SelectstestRecipe
as the recipe to be edited.
Deselect the Current Editing Recipe: recipe deselect
Deselects the recipe currently being edited.
Format: recipe deselect
Example:
List Modules in a Recipe: recipe list
Show all the modules in a recipe, in the order they were added.
Format: recipe list {recipeName}
When
recipeName
is not specified, modules from the recipe that is currently being edited will be listed instead.
Example:
-
recipe list testRecipe
Lists the modules in the recipe namedtestRecipe
.
Add a Module into a Recipe: recipe push
Adds a module into the recipe that is currently being edited.
Format: recipe push <moduleName> {moduleArgument}
Example:
-
recipe push base64encode
Adds thebase64encode
module into the current editing recipe. -
recipe push rotencode 13
Adds therotencode
module with a single argument13
into the current editing recipe.
Remove a Module from a Recipe: recipe pop
Removes the most recently added module from the recipe that is currently being edited.
Format: recipe pop
Clear All Modules in a Recipe: recipe reset
Removes all modules from the recipe that is currently being edited.
Format: recipe reset
Delete a Recipe: recipe delete
Deletes a recipe from the program.
Format: recipe delete <recipeName>
Example:
-
recipe delete testRecipe
Deletes the recipe with the nametestRecipe
.
Storage of Recipe Files
Notes about the recipe files
- A recipe will correspond to a recipe file which is a plaintext file with the name
<recipeName>.txt
whererecipeName
is the name of the recipe.- It is highly recommended that you only modify recipe files through the
recipe
commands in Decodex and not manually edit the recipe files.- If you choose to manually edit the recipe files, the correct format would be that each line in the respective recipe file should contain only one module, and they should be formatted in the following syntax of
<moduleName> {moduleArgument}
. You should also not be editing while Decodex is running as Decodex could accidentally overwrite your changes.- Incorrectly edited files will be considered as invalid and will not be loaded on program start up.
- The recipe files would also not be loaded successfully if Decodex does not have access rights to the files, or it is not in the valid filetype.
Load Recipe Files on Startup
Loads the recipes from the recipe files found in the recipe/
directory. This is done automatically for you on startup so that you do not have to manually add multiple recipe files into Decodex each time.
Save Recipe to File
Saves the recipe to a recipe file in the recipe/
directory. This is done automatically for you whenever a recipe is created or modified so that it is more convenient and less punishing for you (especially if you often forget to save your documents before exiting).
Delete Recipe File
Deletes the recipe file in the recipe/
directory. This is also done automatically for you (via the recipe delete
command), so that you do not have to manually find the corresponding recipe file to delete it.
Reading/Writing Data from/to File [coming soon in the future]
Coming soon to a cinema near you in the future…
Command Summary
Action | Command Format | Example Usage |
---|---|---|
View the syntax and description of commands | help |
help |
Enter input data | input <data> |
input HelloWorld! |
List available modules/recipe | list {category} |
list list modules list recipes
|
Select processing module/recipe |
select module <moduleName> {moduleArgument} OR select recipe <recipeName>
|
select module base64decode select module rotencode 13 select recipe testRecipe1
|
View current data | show |
show |
Reset to original data | reset |
reset |
Create new recipe | recipe new <recipeName> |
recipe new testRecipe |
Select recipe for editing | recipe select <recipeName> |
recipe select testRecipe |
Deselects the recipe currently being edited | recipe deselect |
recipe deselect |
List modules in recipe | recipe list {recipeName} |
recipe list testRecipe |
Add module to recipe | recipe push <moduleName> {moduleArgument} |
recipe push base64encode recipe push rotencode 13
|
Remove module from recipe | recipe pop |
recipe pop |
Clear all modules in recipe | recipe reset |
recipe reset |
Delete recipe | recipe delete <recipeName> |
recipe delete testRecipe |
Exit program | exit |
exit |
FAQ
Q: How do I transfer my recipes to another computer?
A: Install the app on the other computer and copy the recipe files from the computer that you are transferring from, into the recipe folder of the computer that you are transferring to.