Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Tony3-sec/28b3581f7a027b08393b73d066179299 to your computer and use it in GitHub Desktop.
Save Tony3-sec/28b3581f7a027b08393b73d066179299 to your computer and use it in GitHub Desktop.
Manually insert RIGHT-TO-LEFT OVERRIDE character into the filename
http://www.charbase.com/202e-unicode-right-to-left-override
When a RIGHT-TO-LEFT OVERRIDE character is inserted into the filename, the characters that follow are displayed in reverse order.
When named properly, an .exe file can appear to be a .pdf file (e.g. evil[RTL Unicode]fdp.exe will appear as evilexe.pdf).
This does not affect the file's execution.
## By Python
>>> f = open('evil\xE2\x80\xAEfdp.exe', 'w')
>>> f.close()
>>> f = open("evil\u202efdp.exe", "w")
>>> f.close()
@Tony3-sec
Copy link
Author

screen shot 2017-03-30 at 22 31 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment