Description
Solve the Rockstar program to find the flag.
Setup
Download the Rockstar program file.
wget <url>/1_wanna_b3_a_r0ck5tarSolution
Want to try it yourself first?
The guided walkthrough reveals hints one step at a time.
Step 1
Understand the Rockstar programming languageObservationI 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.bashgit clone https://github.com/RockstarLang/rockstarbashnpm --prefix rockstar/satriani installbashnode rockstar/satriani/rockstar 1_wanna_b3_a_r0ck5tarExpected 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 installin the satriani subdirectory. Alternatively, the online interpreter atcodewithrockstar.com/onlineruns programs in the browser.Step 2
Analyze the program logicObservationI 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.
Step 3
Run and read the flagObservationI 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, enter10for the first prompt and170for 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.