Categories
Computing Hacking & CTF

CTF – mus1c Challenge

This PicoCTF general skills challenge was a bit of a weird one. You’ll either know what to do straight away, or have very little to go on. I was the latter. If you’ve delt with esolangs before… you’re probaby one step ahead of me.

Valued at 300 points, you’re given a small lyrics txt file and told to simply enter the flag value.

AUTHOR: DANNY

Description

I wrote you a song. Put it in the picoCTF{} flag format.

Below is that file:

Pico's a CTFFFFFFF
my mind is waitin
It's waitin

Put my mind of Pico into This
my flag is not found
put This into my flag
put my flag into Pico


shout Pico
shout Pico
shout Pico

My song's something
put Pico into This

Knock This down, down, down
put This into CTF

shout CTF
my lyric is nothing
Put This without my song into my lyric
Knock my lyric down, down, down

shout my lyric

Put my lyric into This
Put my song with This into my lyric
Knock my lyric down

shout my lyric

Build my lyric up, up ,up

shout my lyric
shout Pico
shout It

Pico CTF is fun
security is important
Fun is fun
Put security with fun into Pico CTF
Build Fun up
shout fun times Pico CTF
put fun times Pico CTF into my song

build it up

shout it
shout it

build it up, up
shout it
shout Pico

Okay, lyrics that don’t flow naturally. So something is up with them.

I went down so many rabbit holes with this one. Things tried:

  • Words per line
  • Word length
  • Sorting lines by length or word count
  • Extracting just the capitalised words
  • Word count in each paragraph
  • CURL / WGET on the file using different parameters

Nothing.

The single challenge hint says:

Do you think you can master rockstar?

Is rockstar a thing?

Google searching for “rockstar lyrics encoding” brought back the following top two hits:

So Rockstar is a gimmicky programming language that uses rock lyrics as a way to encode logic. (Some people have far too much time on their hands).

Pasting in the lyrics to their online decoder, generates the following output:

114
114
114
111
99
107
110
114
110
48
49
49
51
114
Program completed in 260 ms

Those numbers all look similar to ASCII values to me. Dumping them in a decoder returns the flag.

Esolang Research

This hacking challenge hinges on whether you can establish that the lyrics belong to a known quirky little programming language. I didn’t and was completely stomped for ages.

Realising this type of thing may come up again and again in CTF events or challenges, I did a bit of research into them. These types of languages are apparently called esoteric programming languages,

Wikipedia entry:

An esoteric programming language (sometimes shortened to esolang) is a programming language designed to test the boundaries of computer programming language design, as a proof of concept, as software art, as a hacking interface to another language … or as a joke…

The creators of most esolangs do not intend them to be used for mainstream programming…

Such languages are often popular among hackers and hobbyists.

Similar esoteric programming languages of note, include:

Piet is a abstract art producing language designed by David Morgan-Mar. It produces digital art, however most aren’t as colourful or pleasing as the simple example below. If you see an image with crazy colours and regions of black, you may be dealing with some Piet code.

Piet encoding

Shakespeare Programming Language – produces play scripts suitable for all bards. If you find yourself reading about Romeo or his family members, you’re probably dealing with this esolang.

Do Not Adieu, a play in two acts.

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.


                    Act I: Hamlet's insults and flattery.

                    Scene I: The insulting of Romeo.

[Enter Hamlet and Romeo]

Hamlet:
 You lying stupid fatherless big smelly half-witted coward!
 You are as stupid as the difference between a handsome rich brave
 hero and thyself! Speak your mind!
...

Chef – a food and recipe esolang. This is one of my favrouties I came across. If you find yourself reading about eggs, baking, mixing bowls, sugars and temperatures… Chef is probably your jam (pun intended)

...
Ingredients.
33 g chocolate chips
100 g butter
54 ml double cream
2 pinches baking powder
114 g sugar
111 ml beaten eggs
119 g flour
32 g cocoa powder
0 g cake mixture

Cooking time: 25 minutes.

Pre-heat oven to 180 degrees Celsius.

Method.
Put chocolate chips into the mixing bowl.
Put butter into the mixing bowl.
Put sugar into the mixing bowl.
Put beaten eggs into the mixing bowl.
Put flour into the mixing bowl.
...

Brainf*** and JSF*** – both use tiny alphabets, just 8 and 6 characters respectively. If your file uses just characters like [, ], (, ), !, and +, you’re probably dealing with one of these two esolands. E.g. A “Hello World” programme:

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

2001: An Esolang Odyssey – produces conversational text between the 2001 film computer HAL and the astronaut Dave.

...
What are you doing, Dave?
I've picked up a fault in the AE-35 unit.
Dave, this conversation can serve no purpose anymore. Goodbye.
I've picked up a fault in the AE-35 unit.
I'm afraid. I'm afraid, Dave. Dave, my mind is going. I can feel it.
Dave, this conversation can serve no purpose anymore. Goodbye.
Well, he acts like he has genuine emotions.
Well, he acts like he has genuine emotions.
Close the pod bay doors, HAL.
Well, he acts like he has genuine emotions.
I'm afraid. I'm afraid, Dave. Dave, my mind is going. I can feel it. I can feel it. I can feel it.
Close the pod bay doors, HAL.
Hal? Hal! Hal! Hal! Hal! Hal! Hal! Hal!
...

So I guess we need to keep an eye out for these esolang files in the future.

Leave a Reply

Your email address will not be published.