I have been meaning for a while to get into the habit of writing something regularly. To tell you about my crazy ideas and experiments, which almost always come from a lack of sleep :)

So… let’s get started.

What this post is about

In this series I will talk about strange and, above all, odd places to hide information.

Today: hiding information in boolean.io

The other day, thanks to my workmates, I found this service:

Boolean.io

What is this?

It is a bit peculiar, because what they offer is “booleans as a service”. Odd, right?

What is boolean as a service?

What they call “boolean as a service” is nothing more than letting you store a “true” or a “false” and giving you a unique URL for it. That is:

If we wanted to store a “true”, they would give us a URL like this one:

http://boolean.io/heouwjfyosllndhw7gh628jdjf/

Every time we query it, it returns a “true”, serialised as JSON.

They also let you flip the true to false, as long as you know the ID the site gave you.

Worth noting: access is not authenticated.

It is all zeros and ones

As we all know, every piece of software ends up as a “0” (false) or a “1” (true), right?

What if we took a message, broke it down into each of its characters and turned each character into its binary value? And what if we took that binary string and stored it, value by value, in boolean.io?

What would happen is that boolean.io would give us an identifier for each stored value. We would only need to write down that ID and the order in which we inserted the information.

To get it back we would do the reverse: take each ID, in order, and recover value by value until the original hidden message is rebuilt.

A bit convoluted? Maybe, but you know how it goes: idle hands… :)

Let’s go!

After the theory, let’s see whether information can really be hidden the way I described.

The day my workmates told me about this we had a quick lunch, so I spent 10 minutes and wrote a small script. You can find it –> here <–

It is written in Python and very easy to use.

Installation

pip install -r requirements.txt

Generating the information to hide

Keep in mind that the amount of information we can hide is quite small. On top of that, the service is limited to 40 requests per minute.

So we will run the test with “a\n”. That is: the letter “a” and a line break.

We create the file with the information:

echo "a" > info_to_hide.txt

Usage: hiding information

Now all that is left is to run the hiding script:

# python hide.py -f info_to_hide.txt -o hidden.db
[i] Storing char: 'a'
	|- Storing bit '0'
	|- Storing bit '1'
	|- Storing bit '1'
	|- Storing bit '0'
	|- Storing bit '0'
	|- Storing bit '0'
	|- Storing bit '0'
	|- Storing bit '1'
[i] Storing char: '
'
	|- Storing bit '0'
	|- Storing bit '0'
	|- Storing bit '0'
	|- Storing bit '0'
	|- Storing bit '1'
	|- Storing bit '0'
	|- Storing bit '1'
	|- Storing bit '0'

The generated file, hidden.db, holds the references and the order the server returned, just as I said above, remember? If you open it you will see it is a very simple JSON file.

Usage: recovering hidden information

With the hidden.db file we can recover the hidden data (us, or anyone who has it):

# python unhide.py -f hidden.db
[i] Starting ...
	|- Reading: 'dc342f87-39dd-4f97-8188-32ab312bc0a8'
	|- Reading: '60375eb1-7f02-4398-a8b7-a2ea1eedccd8'
	|- Reading: 'aa0aada9-5ae5-46a3-b2f9-de269ebc986b'
	|- Reading: '4311b005-e958-422d-bb4c-f625d23924ca'
	|- Reading: 'd254560a-5351-4a48-a2c0-008faa1b1a9a'
	|- Reading: '6a31180e-1394-4b70-a305-599beb5114da'
	|- Reading: '7523af15-e7c8-45a4-81e6-f989570dac0d'
	|- Reading: 'b1fbdcfc-531c-47d5-9d9c-b97ab26927a5'
	|- Reading: 'a3f8f3a9-cab5-4e84-b83a-b5c758085f49'
	|- Reading: '13910781-907c-43c9-9fcd-66e255380628'
	|- Reading: '4606d74c-4b46-42f5-8ebc-846e5680b816'
	|- Reading: '80c13529-818e-4761-91c6-55dd0d427935'
	|- Reading: '2a02bcd0-0458-4d4f-b50c-c5a5d6647965'
	|- Reading: 'e81021ce-cd73-42dc-ae55-e520a5fd9fc7'
	|- Reading: '1dd260fc-7ad6-4046-b5ab-4386cce9957f'
	|- Reading: 'fc8d3490-a189-4ae9-9d29-dee8da2fe56d'

[i] Hidden message: 'a
'

Et voilà. Information recovered.

Conclusion

Yes, I know the example is very silly, but you cannot deny it is a fun one :)

See you in my next written whim.

Bye!