Zws #MatchURL : No. 1 Premium URL Shortener

Zws #MatchURL : No. 1 Premium URL Shortener

04.Nov.2021

What kind of information could be hidden in a URL? There are two ways that have been proposed to hide data in URLs. The first way is to use invisible Unicode characters called Zero Width Space characters (U+200B) . This method has the disadvantage of being detectable by text-scanning software, because all non spacing marks will become visible at the end of the URL. There is also another way for hiding information in a URL. It uses spaces between words, so it looks very similar to normal URLs, but there are invisible "spaces" between each word. These spaces can contain any amount of data you want! More information about this technique can be found here . Now I'm going to tell how you can use these techniques yourself to hide information in a very short URL.

First thing you need to do is shorten your URL using any shortening service. I will use j.mp , because it has the shortest domain name of all shortening services, but also a very good example how URLs can be shortened without spaces!

So if we wanted to shorten this article's title "Zws" into a link that redirects to its real location at reddit.com/r/lesswrong . We would go to j.mp and type in these 3 characters: zws

And then click on the 'Shorten' button! As you can see each time you press the 'Shorten' button, a new link gets generated by j.mp . Each one contains the information, but they are all around 70-80 characters long, which is very long for a URL that only contains three words!

But what if we could fit more into that 70-80 character limit? Let's look at the first link j.mp generated: Zws - Pastebin.com

What do you see in this shortened URL? You can't really tell there are invisible spaces between each word now. But what you can easily tell by looking at it is that something has changed since the last time I clicked on 'Shorten'. This means that j.mp does not use the same short URL over and over again to generate its links! What happens is that j.mp replaces some characters with others, but still generates valid URLs pointing to real sites!

We can use this to hide information in a URL! To understand how it works, let's look at example. Let's pretend that this is the text we want to encrypt...

If you don't remember what you were doing when you

weren't paying attention, maybe it's time for some sleep.

So our goal is to convert this string of text into an unreadable form which can later be decoded with another algorithm so it can be read again. There are many ways to encode data, but the easiest way I found was using base64 encoding . With base64 encoding each character represents 6 bits of data (just like in UTF-8), so if we use only letters and numbers our original string without any spaces will be very short:

If you don't remember what you were doing when you

weren't paying attention, maybe it's time for some sleep.

Now we can begin encoding this string into a URL. Make sure that the amount of data is divisible by 4. Also make sure not to leave any spaces between words and only use letters and numbers! If we follow these rules, we will always know where one word ends and where another begins:

You should use sleep enough so you don't forget to eat healthy foods - Pastebin.com

The encoded string has 100 characters (divisible by 4). It only contains letters and numbers (no space between each word!) and each letter encodes 6 bits of data (so two characters encode 12 bits of data). If we divide this encoded string by 4 (which is the size of each 'word'), we will get an encoded URL with 25 characters.

To decode the resulting URL, just reverse the encoding algorithm! As you can see on any self-respecting shortening service, these invisble words are nothing special! They don't contain any link redirects or Javascript code that tries to steal your data. This means that they are safe to use on many websites which might otherwise filter out all invisible spaces from URLs!

Now go ahead and try it yourself! Just remember, if anyone ever asks what you were doing when you weren't paying attention, maybe it's time for some sleep...