Skip to content

carbonphyber/septem-attack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Septem Attack

Work on attacking the Septem cryptocurrency puzzle as described on this Reddit thread.

Puzzle Overview

Septem is a cryptocurrency puzzle described in /r/bitcoinpuzzles, but allegedly originally published on 4Chan. The PNG image uses steganography to hide the puzzle description and the ciphertext. In broad strokes, it is a 7-layer deep nesting doll of encryption (each layer is XOR then Vigenere), each layer with a different key.

Approach

Each nested layer has (English?) plaintext preceeding binary ciphertext. This plaintext is likely how one can reduce the search space for the XOR key + Vigenere key.

In general, the approach will be to find likely candidates for keys (look for patterns to guess the key period), limit our search space to BIP-39 wordlist matches, then try to parallelize the remaining search.

Run the Code

Step 1

Decode the image steganography:

stegify decode --carrier ./wh8hlbzrsfx61.png --result ./stegify-result.png

Step 2

Separate the description/hint from the ciphertext:

cat ./stegify-result.png | tail -c 7519 | head -c 6685

(these numbers were derived from guess-and-check to find the boundaries of the English text / ciphertext)

Step 3

Run the Python analysis script with chapter1 as STDIN:

cat ./chapters/1/ciphertext.data | python3 python/main.py --hint="****face****"

Note: --hint="****face***" tells the script that the XOR decryption key is 12 characters long with 4 unknown characters, 4 known characters (face) and 4 unknown characters. This is useful for restricting the search space.

Data Files

Chapter 1

chapter 1 ciphertext. This was obtained from "Step 2" of "Run the Code".

Initial Steganography results

stegify-result.png. This was obtained from "Step 1" of "Run the Code".

BIP-39 words

English BIP-39 words gathered from Bitcoin BIP-39

wh8hlbzrsfx61.png

Septem Image

ihKnTsY.png

Septem Image

Tools and Reference

Steganography

Decryption

  • XOR Brute Force
  • Vigenere Decryption

Statistical Analysis