Sitemap
Press enter or click to view image in full size

Member-only story

Hiding Data In Bases

5 min readMar 10, 2024

--

One way that a spear phisher or malware writer can get around detection is to hide data in a different encoding format, such as hexadecimal, octal, or binary. These can involve different character set, and using a different base. For example, Base-3 encoding uses a character set of “123”, and Base-5 uses “01234”. And, so, while Base64 is well known, there are many other bases we can use. Oh, and did you know that Satoshi Nakamoto selected Base58 for Bitcoin, as it removed those pesky printed characters of “I” and “O”.

Malware can use scrambled JavaScript to trick scanners. In this example we have an email with a ZIP attachment. The initial email tries to panic the user with the threat of a court appearance:

Press enter or click to view image in full size

So when we open the ZIP file, it’s a JavaScript file:

Press enter or click to view image in full size

Basically this a scrambled JavaScript file which hides the actual JavaScript code. It uses standard obfuscation methods, such as deleting newlines, splitting the JavaScript into small chunks, encoding the data in different formats, and randomising the order of the…

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.