File Smuggling with HTML and JavaScript

File smuggling is a technique that allows bypassing proxy blocks for certain file types that the user is trying to download. For example if a corporate proxy blocks .exe files from being downloaded via the browser, this is the technique you can use to smuggle those files through.

Weaponization

First of, we get a base64 of the executable we want to smuggle past the proxy:

base64.exe C:\experiments\evil32.exe > .\evil.txt

Then we use this code and insert our base64 encoded payload into the variable file:

Execution

If we open the HTML file in Internet Explorer (or Chrome), we get the Run/Download prompt and once it's run - the shell popped as expected:

References

Last updated

Was this helpful?