Napper

command
v0.0.0-...-2c36ee9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 6 Imported by: 0

README

AES Decryption Tool for Napper Challenge

This repository contains a Go script developed to assist in decrypting data for the "Napper" challenge on Hack The Box. It's designed to decrypt data that was encrypted using AES-128 in CFB mode. The decryption process requires a seed to regenerate the encryption key and the encrypted data in base64 format.

Overview

The script leverages the AES cryptographic standard with a Cipher Feedback (CFB) mode of operation, providing secure decryption capabilities. It accepts a numerical seed and base64-encoded encrypted data as input, both of which are necessary to accurately reconstruct the original plaintext.

Prerequisites

To use this decryption tool, you will need:

  • Go (Golang) installed on your system (version 1.14 or newer recommended).

Usage

The script is executed from the command line, where you will pass the seed and encrypted data as arguments. Here's the basic syntax:

go run decrypt.go -seed=<seed> -data="<base64-encoded-data>"

Example

To decrypt data with a seed of 46385390 and encrypted data tbjZvSCUhZtSmOqEYO1TFmX-ibTWLnMJc6CQJHZ_aM6alBTptvEaiMEvjv_Jfx33T7spOEMKOXg=, run the following command:

go run decrypt.go -seed=46385390 -data="tbjZvSCUhZtSmOqEYO1TFmX-ibTWLnMJc6CQJHZ_aM6alBTptvEaiMEvjv_Jfx33T7spOEMKOXg="

Documentation

Overview

AES Decryption Tool for Napper Challenge

Author: Lukas Johannes Möller Date: 24.02.2024 License: MIT License

This Go script is designed to decrypt data encrypted with AES-128 in CFB mode. It is specifically tailored for use in the Hack The Box machine "Napper" challenge, providing a means to decrypt data using a seed-based key generation approach. The script accepts two crucial pieces of information via command-line arguments: a seed used for key generation and the base64-encoded encrypted data.

The decryption process involves the following steps: 1. Generating a 128-bit AES key from the provided seed. 2. Decoding the base64-encoded encrypted data to retrieve the ciphertext. 3. Using the AES key and Cipher Feedback (CFB) mode to decrypt the ciphertext and obtain the original plaintext.

Prerequisites: - Go (Golang) environment set up on the machine where the script will be run.

Usage: The script is executed from the command line, where the seed and encrypted data are passed as arguments:

go run decrypt.go -seed=<seed> -data="<base64-encoded-data>"

Example:

go run decrypt.go -seed=46385390 -data="tbjZvSCUhZtSmOqEYO1TFmX-ibTWLnMJc6CQJHZ_aM6alBTptvEaiMEvjv_Jfx33T7spOEMKOXg="

This script serves as an educational tool for understanding AES decryption and should be used in accordance with ethical guidelines and applicable laws.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL