A virtual teacher who reveals to you the great secrets of Base64

What is "aaaaigz0...my4xmda="?

What is "aaaaigz0...my4xmda="?

Since I launched this website, I have received many requests to help decode or repair various Base64 values. So the idea came up to create the Repair Tool, which is able to fix malformed strings in automatic mode. Nevertheless, that tool is not a silver bullet and it cannot repair all strings. Therefore, it is not surprising that people still contact me to help them. Well, I am not an almighty magician, so I need the help of others. Maybe you can help me solve a new puzzle?

The Problem: We have an “almost valid” Base64 string in which all letters are lowercase. Because of this, we cannot decode the string to get the original data.

Known Details: It seems this string is a MP4 v1 video file, that have the header 00 00 00 20 66 74 79 70 69 73 6f 6d. Most likely this is a stub file used for tests and has a very small resolution (something like 2×2).

The objective: Find out the original string so that we can decode it using the Base64 Decode tool and play the obtained file using a regular video player. If you know any details about this string or have the original string, please submit a comment or contact me. Feel free to submit even the craziest ideas. Even the smallest clues can help me solve the puzzle. Thank you!

Malformed Base64: data:video/mp4;base64,aaaaigz0exbpc29taaacaglzb21pc28yyxzjmw1wndeaaaaiznjlzqaaas1tzgf0aaacrgyf//+q3expvebzslewlngg2spu73gynjqglsbjb3jlide0mibymjm4osa5ntzjogq4ic0gsc4ynjqvtvbfry00iefwqybjb2rlyyatienvchlszwz0idiwmdmtmjaxncatigh0dha6ly93d3cudmlkzw9syw4ub3jnl3gynjquahrtbcatig9wdglvbnm6ignhymfjptegcmvmptmgzgvibg9jaz0xoja6mcbhbmfsexnlptb4mzowedexmybtzt1ozxggc3vibwu9nybwc3k9msbwc3lfcmq9ms4wmdowljawig1pegvkx3jlzj0xig1lx3jhbmdlpte2ignocm9tyv9tzt0xihryzwxsaxm9msa4edhky3q9msbjcw09mcbkzwfkem9uzt0ymswxmsbmyxn0x3bza2lwptegy2hyb21hx3fwx29mznnldd0tmib0ahjlywrzptmgbg9va2fozwfkx3rocmvhzhm9msbzbgljzwrfdghyzwfkcz0wig5yptagzgvjaw1hdgu9msbpbnrlcmxhy2vkptagymx1cmf5x2nvbxbhdd0wignvbnn0cmfpbmvkx2ludhjhptagymzyyw1lcz0zigjfchlyyw1pzd0yigjfywrhchq9msbix2jpyxm9mcbkaxjly3q9msb3zwlnahriptegb3blbl9nb3a9mcb3zwlnahrwptiga2v5aw50pti1mcbrzxlpbnrfbwlupti0ihnjzw5ly3v0ptqwigludhjhx3jlznjlc2g9mcbyy19sb29rywhlywq9ndagcmm9y3jmig1idhjlzt0xignyzj0ymy4wihfjb21wptaunjagcxbtaw49mcbxcg1hed02osbxchn0zxa9ncbpcf9yyxrpbz0xljqwigfxpte6ms4wmacaaaaad2wihaar//72c3wka22xgqaaav5tb292aaaabg12agqaaaaaaaaaaaaaaaaaaapoaaaakgabaaabaaaaaaaaaaaaaaaaaqaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaackhryywsaaabcdgtozaaaaamaaaaaaaaaaaaaaaeaaaaaaaaakgaaaaaaaaaaaaaaaaaaaaaaaqaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaeaaaaaacaaaaagaaaaaacrlzhrzaaaahgvsc3qaaaaaaaaaaqaaacoaaaaaaaeaaaaaaabtzglhaaaaig1kagqaaaaaaaaaaaaaaaaaadaaaaacabxhaaaaaaatagrscgaaaaaaaaaadmlkzqaaaaaaaaaaaaaaafzpzgvvsgfuzgxlcgaaaaflbwluzgaaabr2bwhkaaaaaqaaaaaaaaaaaaaajgrpbmyaaaaczhjlzgaaaaaaaaabaaaadhvybcaaaaabaaabc3n0ymwaaacnc3rzzaaaaaaaaaabaaaal2f2yzeaaaaaaaaaaqaaaaaaaaaaaaaaaaaaaaaacaaiaegaaabiaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay//8aaaaxyxzjqwfkaar/4qayz2qacqzzx5zcbeaaaamaqaaadapeiwwaaqagaovjyylaaaaaehbhc3aaaaabaaaaaqaaabhzdhrzaaaaaaaaaaeaaaabaaacaaaaabxzdhnjaaaaaaaaaaeaaaabaaaaaqaaaaeaaaauc3rzegaaaaaaaalfaaaaaqaaabrzdgnvaaaaaaaaaaeaaaawaaaaynvkdgeaaababwv0yqaaaaaaaaahagrscgaaaaaaaaaabwrpcmfwcgwaaaaaaaaaaaaaaaatawxzdaaaacwpdg9vaaaahwrhdgeaaaabaaaaaexhdmy1ny44my4xmda=

By the way, I think to develop a brute-force tool that will change each letter to uppercase until it will find the right file format, but this method may lead to a lot of errors. Anyway, I will update the post as soon as I find out or receive new details.

Comments (2)

I hope you enjoy this discussion. In any case, I ask you to join it.

  • ycam,


    Very interesting subject!

    I wanted to know if your work had been successful with this type of decoding?

    Indeed, I am interested in the "repair" of files encoded in base64, whose base64 would have been put in all upper case (or lowercase).

    My ultimate goal is to analyze compression rates (zlib / gzip) between a base64, a base64-capital or a base64-lowercase.

    Only the problem is: "how to find the initial case of base64 to be able to decode it?".

    Knowing that encoded files can be of any type, but initially only flat text files (which may contain alpha-numeric characters, symbols, spaces / line breaks and accented characters).

    Your help would be very precious to me!

    Thanking you for your interest and your work,

    Excellent day,
    • Administrator,
      I am very glad that I am not the only one who is interested in solving this. Unfortunately, brute-forcing gives a lot of false positives even if the original data has a strict format (something like XML) and contains only a limited character set.

      For example, the string phhtbd5cyxnlnjqur3vydtwveg1spg== is the lowered Base64 value of <xml>Base64.Guru</xml>. Trying to brute-force all “permutations” of the malformed string and filter results that contain valid XML and characters from [\x20-\x7E], it will find 8 suitable values:
      PHhtbD5CYXNLNjQuR3VYdTwveG1sPg== | <xml>BasK64.GuXu</xml>
      PHhtbD5CYXNLNjQuR3VydTwveG1sPg== | <xml>BasK64.Guru</xml>
      PHhtbD5CYXNlNjQuR3VYdTwveG1sPg== | <xml>Base64.GuXu</xml>
      PHhtbD5CYXNlNjQuR3VydTwveG1sPg== | <xml>Base64.Guru</xml>
      PHhtbD5cYXNLNjQuR3VYdTwveG1sPg== | <xml>\asK64.GuXu</xml>
      PHhtbD5cYXNLNjQuR3VydTwveG1sPg== | <xml>\asK64.Guru</xml>
      PHhtbD5cYXNlNjQuR3VYdTwveG1sPg== | <xml>\ase64.GuXu</xml>
      PHhtbD5cYXNlNjQuR3VydTwveG1sPg== | <xml>\ase64.Guru</xml>

      Now imagine a larger malformed string that contains binary values or a wider range of characters (e.g., XML supports UTF-8). For example, just by extending the charset to US-ASCII ([\x00-\x7F]) the same example will return 16 suitable values.

      So, I think that only a desperate person will try to restore the original data in a such way :)

      Best wishes,
Add new comment

If you have any questions, remarks, need help, or just like this page, please feel free to let me know by leaving a comment using the form bellow.
I will be happy to read every comment and, if necessary, I will do my best to respond as quickly as possible. Of course, spammers are welcome only as readers.