1_wanna_b3_a_r0ck5tar picoCTF 2019 Solution

Published: April 2, 2026

Description

Solve the Rockstar program to find the flag.

Download the Rockstar program file.

bash
wget <url>/1_wanna_b3_a_r0ck5tar

Solution

Want to try it yourself first?

The guided walkthrough reveals hints one step at a time.

Walk me through it
  1. Step 1
    Understand the Rockstar programming language
    Observation
    I noticed the file was formatted as song lyrics with poetic variable names, natural-language operators like 'Put', 'Build', and 'Knock', and the challenge title itself spelled 'Rockstar' in leet, which strongly suggested the file was valid source code in the Rockstar esoteric programming language and needed a dedicated interpreter.
    The provided file is written in Rockstar, an esoteric programming language designed to look like rock ballad song lyrics. Variable names are poetic phrases and operations use words like 'Put', 'Let', 'Build', 'Knock'. Run it with a Rockstar interpreter.
    bash
    git clone https://github.com/RockstarLang/rockstar
    bash
    npm --prefix rockstar/satriani install
    bash
    node rockstar/satriani/rockstar 1_wanna_b3_a_r0ck5tar

    Expected output

    66
    79
    78
    74
    79
    86
    73
    What didn't work first

    Tried: Open the file in a text editor and try to run it as a Bash or Python script, assuming the song-lyric formatting is obfuscated shell or Python code.

    Bash and Python reject nearly every line with syntax errors because Rockstar keywords like 'Put', 'Build', and 'Knock' have no meaning in those runtimes. The file is valid Rockstar source but is not valid in any mainstream scripting language. The correct approach is to identify the esoteric language from its poetic variable names and word-count number encoding, then use a dedicated Rockstar interpreter.

    Tried: Install the Rockstar npm package globally with 'npm install -g rockstar' instead of cloning the satriani interpreter from the RockstarLang/rockstar repository.

    The npm package named 'rockstar' is an unrelated placeholder package and does not provide a Rockstar language interpreter. Running it against the file produces an error or no output. The correct interpreter is satriani, found in the official RockstarLang/rockstar GitHub repo, installed locally with 'npm --prefix rockstar/satriani install' and invoked via 'node rockstar/satriani/rockstar'.

    Learn more

    Rockstar is a language where numeric literals are encoded by the lengths of words in a phrase: each word contributes one digit equal to its letter count mod 10, read left to right. For example, 'my world' encodes the digits 2 then 5, giving the number 25. The language supports variables, arithmetic, conditionals, loops, and I/O - all through rock lyrics syntax.

    The official Rockstar interpreter (satriani) can be installed by cloning the RockstarLang/rockstar repository and running npm install in the satriani subdirectory. Alternatively, the online interpreter at codewithrockstar.com/online runs programs in the browser.

  2. Step 2
    Analyze the program logic
    Observation
    I noticed the interpreter output produced a sequence of decimal numbers (66, 79, 78, 74, 79, 86, 73) rather than a plaintext flag, which suggested the program was printing ASCII values that needed to be decoded, and reading the Rockstar source for input prompts and print statements would reveal what inputs were expected.
    If the interpreter output does not give the flag directly, read through the Rockstar code manually. Look for print/output statements and trace the values being output. The flag may require providing specific input.
    Learn more

    Key Rockstar syntax: Say X / Shout X = print X. Put X into Y = assignment. Build X up = increment. Knock X down = decrement. While X is Y = while loop. If X is Y = conditional.

    Number encoding: 'Nothing' = 0, 'the stars' = digits 3 then 5 = 35. Each word contributes its letter count modulo 10 as one digit of the number, read left-to-right.

  3. Step 3
    Run and read the flag
    Observation
    I noticed the Rockstar program contained input-reading statements and conditionals that gate the output path, and that the seven ASCII values printed (66, 79, 78, 74, 79, 86, 73) map directly to the letters B, O, N, J, O, V, I, which pointed to entering the correct inputs to trigger the output and then converting the ASCII codes to recover the flag.
    Execute the Rockstar program. When prompted for input, enter 10 for the first prompt and 170 for the second. The program then prints decimal ASCII values (66 79 78 74 79 86 73) which spell out BONJOVI, giving the flag.
    Learn more

    Esoteric programming languages (esolangs) like Rockstar, Brainfuck, Piet, and Whitespace are used in CTF challenges to test code-reading skills. The challenge is not the algorithm complexity but understanding an unfamiliar syntax. Reading the language specification is usually faster than trying to guess the behavior.

Interactive tools
  • Base64 & Base32 DecoderDecode Base64 and Base32 strings with auto-detection. Multi-layer mode unwraps nested encodings automatically.
  • Recipe ChainStack decoders into a pipeline: Base64, hex, ROT, XOR, Morse, URL, Atbash, Vigenère, and more. Magic mode auto-discovers the chain. Bookmark the URL to save it.
  • Number Base ConverterConvert numbers between binary, octal, decimal, and hexadecimal instantly. Enter any value and see all four bases update in real time.

Flag

Reveal flag

picoCTF{BONJOVI}

Run the Rockstar source file through a Rockstar interpreter to get the flag output.

Key takeaway

Esoteric programming languages encode computation in non-obvious syntax, requiring the solver to find and use the correct interpreter rather than read the logic directly. The skill being tested is identifying the language from its surface features (poetic variable names, natural-language operators) and locating tools for it. This same skill transfers to any CTF or malware analysis scenario where code is written in an unusual or obfuscated language like Brainfuck, Whitespace, or Piet.

Related reading

Want more picoCTF 2019 writeups?

Useful tools for General Skills

What to try next