Skip to the content.

Decodex User Guide

Table of Contents

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.

:information_source: This user guide is tailor-made for CTF players who have some technical understanding of encoding schemes and cryptography.

carbon(6).png

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
:bulb: Represents a good tip for you.
:exclamation: Represents something important that you should take note of.
:information_source: Represents additional information regarding commands/features for you to better understand how to use it.
:video_game: Represents something optional that you can try out, mostly for exploring or fun.

Quick Start

  1. Ensure you have Java version 11 or above installed on your computer.
    1. If you haven’t, you may download it here.

      :exclamation: You should download the installation relative to your Operating System.

  2. Next, download the latest decodex.jar here.
    1. Simply click on decodex.jar under “Assets” and the download should start.
  3. After downloading, you can open up command prompt.

    :bulb: To open command prompt, press win + r at the same time, then type and enter cmd.

  4. Afterwards, you can run decodex.jar by typing in java -jar decodex.jar and Decodex’s prompt should appear. Please also ensure that you are in the same directory as where you have downloaded decodex.jar.
    1. In the screenshot below, you can see that decodex.jar is run in the Downloads folder. To add on, it also shows you how to better understand the startup prompt of Decodex. quickStartPrompt
  5. Now, you are ready to try out some of the basic commands below:
    1. input I am groot: Inputs the text data I am groot into the program.
    2. list: Lists all available modules and recipes that you can use.
    3. select module base64encode: Selects and runs the base64-encoding module on the data.
    4. reset: Resets the changes made to data - resetting to its original data.
    5. exit: Exits the application.
  6. For more information on Decodex’s features, please refer to the Features Section.

:video_game: 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.

:information_source: 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

:exclamation: Notes about the commands and arguments:

Basic Commands

Help: help

Lists the syntax and descriptions of all available commands.

Format: help

Example:

help.png

Input of Data: input

Stores the data to be processed by modules.

Format: input <data>

:information_source: data will be treated as text.

Examples:

carbon(1).png

:exclamation: Behaviour of the input command:

List Available Modules or Recipes: list

Shows a list of all available modules or recipes.

Format: list {category}

:information_source: Notes about the list command:

Examples:

carbon(8).png

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>

:information_source: Notes about the select command:

Examples:

carbon(9).png

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

:video_game: 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

:information_source: 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 some recipe commands such as recipe push, recipe pop and recipe reset.

carbon(17).png

Create a New Recipe: recipe new

Creates a new recipe and sets it as currently being edited.

Format: recipe new <recipeName>

:information_source: recipeName can only contain alphabets, numbers and underscores.

Example:

recipeNew.png

Select a Recipe for Editing: recipe select

Sets a recipe as currently being edited.

Format: recipe select <recipeName>

Example:

recipeSelect.png

Deselect the Current Editing Recipe: recipe deselect

Deselects the recipe currently being edited.

Format: recipe deselect

Example:

recipeDeselect.png

List Modules in a Recipe: recipe list

Show all the modules in a recipe, in the order they were added.

Format: recipe list {recipeName}

:information_source: When recipeName is not specified, modules from the recipe that is currently being edited will be listed instead.

Example:

recipeList.png

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:

recipePush.png

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

recipePop.png

Clear All Modules in a Recipe: recipe reset

Removes all modules from the recipe that is currently being edited.

Format: recipe reset

recipeReset.png

Delete a Recipe: recipe delete

Deletes a recipe from the program.

Format: recipe delete <recipeName>

Example:

recipeDelete.png

Storage of Recipe Files

:exclamation: Notes about the recipe files

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.