RTLO (right to left override) technique for file extension spoofing
This is one of the easiest exploits to implement in a Microsoft Windows systems. Yet, its impossible to detect This exploit can be used for domain names as well. :- http://unicode.org/reports/tr36/#Bidirectional_Text_Spoofing
Step-by-Step Guide
- Open Windows Character Map Tool (Start, Run, Charmap)
- Go to Unicode 202E: Right-To-Left Override
- Click Select and then Copy
- Edit a file name and just before the . Paste here. (Example, notepad.exe notepad[202E].exe
- Then type in the file extension your require.
- doc=cod
- pdf=fdp
- User Resource Hacker to change the ICON (http://www.angusj.com/resourcehacker/)
[youtube=https://www.youtube.com/watch?v=1J1dH49JEM8]
- http://www.fileformat.info/tip/microsoft/enter_unicode.htm
- Right Click File Name and Rename
- Select the Letters and then Right Click
- https://autohotkey.com/mpress/mpress_web.htm
Obfuscating Executables
- mpress – https://autohotkey.com/mpress/mpress_web.htm
- http://resources.infosecinstitute.com/encrypted-code-reverse-engineering-bypassing-obfuscation/#gref
- https://cyberarms.wordpress.com/2015/07/12/anti-virus-bypass-with-shellter-4-0-on-kali-linux/
- http://www.thesecurityblogger.com/using-metasploit-to-bypass-anti-virus-software-generating-and-obfuscating-payloads/
- https://null-byte.wonderhowto.com/how-to/hack-like-pro-evade-av-software-with-shellter-0168504/
- http://searchsecurity.techtarget.com/feature/Antivirus-evasion-techniques-show-ease-in-avoiding-antivirus-detection
- http://www.defenceindepth.net/2009/12/bypassing-anti-virus.html
- http://resources.infosecinstitute.com/encrypted-code-reverse-engineering-bypassing-obfuscation/#gref
Examples
- CORP_INVOICE_08.14.2011_Pr.phyldoc.exe, was made to display as CORP_INVOICE_08.14.2011_Pr.phylexe.doc by placing the unicode command for right to left override just before the “d” in “doc”.
- SexyAlexe.ppt – > SexyAl\xe2\x80\xaetpp.exe
- SexyAl\xe2\x80\xaetpp.exe
- SexyAl\u202Etpp.exe
- \xe2\x80\xaecod.yrammus_evituc\xe2\x80\xad2011.exe
- \u202Ecod.yrammus_evituc\u202D2011.exe
- \xe2\x80\xaetpp.stohsnee\xe2\x80\xadfunny.scr
- \u202Etpp.stohsnee\u202Dfunny.scr
Self Extracting and Executing archive SFX
- https://thehackernews.com/2012/01/self-extracting-archive-sfx-as-creative.html
- https://ax0nes.com/
- https://blog.comodo.com/malware/malware-detection-by-antivirus-scanners/
Software
- http://www.unikey.org/index.php
- http://www.adambaker.org/unicodeinput.php
- https://www.google.com/inputtools/windows/
- Lizard RTLO Generator – https://github.com/thelinuxchoice/lizard
Method
- Email encrypted self extracting SFX file that is a .SCR VbScript with file name that looks like a PDF using 202E which then executes DLL to download payload and executes in users admin area.
Essentially, the file’s actual name can be something like “Awesome Song uploaded by [U+202e]3pm.SCR”. The special character forces Windows to display the end of the file’s name in reverse, so the file’s name will appear as “Awesome Song uploaded by RCS.mp3”. However, it’s not an MP3 file – it’s an SCR file and it will be executed if you double-click it. (See below for more types of dangerous file extensions.)
http://www.howtogeek.com/wp-content/uploads/2012/10/image210.png
Method 1: Universal
This method works regardless of any of your language settings, but is the most cumbersome to type.
- Press and hold down the
Altkey.- Press the
+(plus) key on the numeric keypad.- Type the hexidecimal unicode value.
- Release the
Altkey.Alas, this appears to require a registry setting. It was already set on my computer, but some readers report that this method didn’t work for them, and this is probably why. If you don’t know what the registry is, please don’t try this. Under
HKEY_Current_User/Control Panel/Input Method, set EnableHexNumpad to “1”. If you have to add it, set the type to beREG_SZ.
Method 2: Input-language Specific
This method depends on the specific input language you are using.
- Press and hold down the
Altkey.- Type
0(zero) and the decimal unicode value on the numeric keypad.- Release the
Altkey.You can see which input language you are using (and which are installed) by:
- Start Menu
- Settings
- Control Panel
- Regional and Language Options
- Languages tab
- Detail button
The entries in the Unicode character information section are using the Windows Latin 1 input language.
Method 3: Code-page Specific
This method depends on the specific code page you have installed.
- Press and hold down the
Altkey.- Type the decimal codepage value on the numeric keypad. Do not type any leading zeros.
- Release the
Altkey.You can see which code page you have by typing
chcpat a command prompt. Check the grid for your code page from the list of known code pages to see what characters you can enter this way.The entries in the Unicode character information section are using code page 437.
Method 4: Application-specific
Applications can support their own methods. These are not standardized.
Several Microsoft applications, including WordPad and Microsoft Word:
press Alt-X after typing some hex digits. You see the digits as you type them, and they’re replaced by the Unicode equivalent. Pressing Alt-X again converts it back to numbers.
Method 5: Unicode IME
Microsoft has a Unicode Input Method ?Editor? that works the same way my UnicodeInput pop-up does, but with LeftAlt Shift as the trigger key.
Michael Kaplan, a Microsoft i18n guru, has the details on how the Unicode IME works. Some notes to fill in some details that he assumes:
- Go into Control Panel -> Regional Settings, on the languages tab, enable support for East Asian languages. This takes 230 MB of disk space and a restart.
- Go back into Control Panel -> Regional Settings, on the languages tab, press the Details button.
- Add
Chinese (Taiwan)(Others would probably work too) and chooseChinese (Traditional) - Unicode. - You will now have an extra do-hickey in the taskbar showing which language you’re in.
- Press
LeftAlt Shiftto switch into the IME (taskbar showsCH). - Type the hex digits of the Unicode character. As soon as you type the last one, it is sent to the application.
- Press
LeftAlt Shiftto switch out of the IME (taskbar shows your original language code).
Tips
- Fonts – you must have a font that contains the character. It seems obvious, but Windows can’t display characters it doesn’t know about. Often, you will need to select the font yourself, since only a few applications are smart enough to switch fonts automatically.
- WordPad – works, but you have to have it set to a font that contains the character. Method 4 ([hex][AltX]) seems to switch to an appropriate font automatically.
- Notepad – generally doesn’t work since its font doesn’t support many characters.
- Internet Explorer – in the URL bar, the universal method doesn’t work if it has A-F, since it opens the menu (i.e. Alt-F opens the File menu).
- Mozilla Firebird – works correctly (if you have a font that supports it). Note that if you type it on a page that is is using a charset that doesn’t support it, it will not be transmitted to the website correctly.
References
- The Alt+NumPad entry in Microsoft’s Global Windows Glossary
- Windows XP docs that inexcusably don’t mention the universal variation.
- Discussion on GeorgeHernandez.com (search for “2005-04-24”) – discussion of the various problems with someone who did some real work to figure out what works and doesn’t. He also has a Unicode shortcuts page that summarizes his findings (quite similar to this page, but with more detail).
- Wikipedia article Unicode_input with some Mac and Linux tips.