Skip to main content

Proposal for “Out of Character: Use of Punycode and Homoglyph Attacks to Obfuscate URLs for Phishing” Adrian Crenshaw

Below is a project I'm doing for class. If you want to make suggestions and tell me about weird Unicode/Homoglyph security issues, please email me. If you want to play with making homographs, look at my Homoglyph Attack Generator.
Introduction
            One of the key components users leverage to tell if a URL is part of a phishing attack is to compare the host and domain name to their expectations for the legitimate site. For example, an email asking users to summit bank information to a website with the domain name adrianshouseofpwnage.com is not as likely to receive submissions as a website that was hosted under a more reasonable sounding name. There are many common techniques used currently and in the past to make links look more legitimate. One would be to have the link text say one thing, but to have to anchor actually point elsewhere, for example:
<a href=”http://irongeek.com”>http://www.microsoft.com</a>
The above is mitigated in many mail services by having the actual link printed out next to the linking text if they differ. Another technique is to confuse the users by modifying the URL to have a valid sounding name in the credentials part of the URL, but the actual host name in the trailing part:
http://www.microsoft.com@irongeek.com
Some modern browser mitigate this by either popping up a warning (Firefox) or just refusing to see this as a valid URL (Internet Explorer). There are many more techniques that can be used to obfuscate a URL however. The technique this paper will focus on is the use of Punycode and homoglyphs.
            Normally, DNS labels (the parts separated by dots) have to be in the ASCII subset of just letters, digits and the hyphen (sometimes called the LDH rule). Also, a label cannot start or end with a hyphen, and is case insensitive. This limited set of characters causes a problem if someone wants to use a character in a DNS label that is not part of the LDH set.
Punycode, or more formally the Internationalized Domain Names in Applications (IDNA) framework as it is used on the Internet, was designed as a way to map characters that would normally be invalid in DNS host names to valid characters. In this way, domain and host names can be created using characters from a user’s native language, but still have them translated into something the DNS system can use (assuming the application supports decoding IDNA). Examples can be as simple as characters with accents such as “café.com” (which browsers that support the IDNA specification will translate to “xn--caf-dma.com”) to more complex ones where even the top level domain name is not in ASCII, such as “http://北京大学.中國” (which converts to http://xn--1lq90ic7fzpc.xn--fiqz9s). Explaining the IDNA algorithm and how it maps to Unicode symbols is beyond the scope of this proposal paper, and all an attacker need do is use one of the many online generators to create a valid IDNA label. For more details on how the system works, see RFC 3492. CITATION ACo03 \l 1033  [1]
The second facet of this attack is homoglyphs. A homoglyphs is a symbol that appears to be the same or very similar to another symbol. An example most would be familiar with is the letter O and the number 0. Depending on the font used they may be hard to distinguish from each other. The letters l (lower case L) and I (uppercase i) are another common example. Where it becomes even more interesting are the places in Unicode where very similar characters exist from different languages. Languages that use characters which look similar to the normal Latin alphabet with diacritic accents, letter-like symbols and other useable homoglyphs pop up with great regularity, some seeming to be almost exact duplicates of the same symbol. Cyrillic script is a common example, possessing very close homoglyphs for a, c, e, o, p, x and y. Even the Latin alphabet appears twice in Unicode. The characters:
!"$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
are represented in both the 0021-007E (Basic Latin) and the FF01-FF5E (Full width Latin) ranges of Unicode. This means changing from one encoding for a given Latin character to the other is as easy as adding the decimal values 65248 to the lower range versions. Depending on the font used mixing character families this way may cause a “Ransom Note” like visual effect.
While the intended purpose of IDNA is to allow for internationalized DNS labels it can also be used to make a URL or host name appear more legitimate than it really is. Because the Unicode representation may cause visual confusion for a user, it could cause trust where there should be none. For example:
http://www.microsoft.com⁄index.html.irongeek.com
may look like a legitimate Microsoft URL, but on closer inspection it redirects to a site that the author controls. This is because the third slash symbol is not really a slash symbol at all. The real DNS entry is:
microsoft.xn--comindex-g03d.html.irongeek.com
More obfuscated DNS names could be created by choosing something less obvious than Irongeek.com, or my having the Punycode be in the domain name itself. How could an attacker leverage this? It should be noted that two resources in the bibliography helped greatly to inspire this project.  CITATION Jon10 \l 1033 [2] CITATION Mic11 \l 1033  [3]
Approach
            The approach we plan to take is fairly simple. The plan will be to generate many potential attack URLs and then test the following:
1.    How different browsers show the Punycode in the URL bar.
2.    How different mail systems show the URL when email is displayed.
3.    How social networks render the URL.
Some of these IDNA DNS names will be tested using a domain we control (irongeek.com), while others will be tested using the local hosts file in lieu of making real DNS entries. Buying many domain names could become expensive, and the local hosts file services most of the proposed tests adequately (other than testing the policies of registrars). We intend to cover mitigations that are already in use to quell these sorts of attacks as well as what mitigations might be possible. Tools may also be developed to help generate the attack URLs and released to the pen-test community. These features could be a usefully addition to the Social-Engineering Toolkit (SET) and other projects. CITATION Dav \l 1033  [4]
Schedule
Weeks 1-2: Work on understanding Unicode, IDNA and Punycode.
Weeks 3-4: Look at other research on the topic of using this attack vector.
Weeks 5-6: Hands on tests of using IDNA to generate potential attack URLs.
Weeks 7-8: Test how different browsers, mail systems and social networks render the attack URLs.
Week 9: Finish paper and presentation.

References:
 BIBLIOGRAPHY  \l 1033
[1]
A. Costello. (2003, March) IETF RFC 3492. [Online]. http://www.ietf.org/rfc/rfc3492.txt
Jonathan Abolins. (2010, December) When Domain Names Look Like Spaghetti (or Whatever) Internationalized Domain Names & Investigations in the Networked World. [Online].http://www.irongeek.com/i.php?page=videos/dojocon-2010-videos#Internationalized%20Domain%20Names%20&%20Investigations%20in%20the%20Networked%20World
Michal Zalewski, The Tangled Web: A Guide to Securing Modern Web Applications, 1st ed.: No Starch Press, 2011.
Amazon link: The Tangled Web: A Guide to Securing Modern Web Applications
Dave Kennedy. Social-Engineering Toolkit. [Online]. http://www.secmaniac.com/download/

Comments

Popular posts from this blog

Почему инженеры электросвязи становятся продажниками

Давно предупреждал инженеров электросвязи - если вы не развиваетесь, то рано или поздно превратитесь либо в дворника, либо в ассенизатора. О чем не предупреждал, каюсь, - так это о том, что локальный апокалипсис наступит прямо сейчас. Взять, например, сетевых инженеров  Ростелекома, которые бодро так искали, кого ещё подключить к интернету последние пару недель в Сочи и в Адлере. Скажете, инженеров заставляют работать продажниками - произвол и несправедливость? Лично я в этом совершенно не уверен. Чтобы было сразу понятно, о чем речь, готов проиллюстрировать свою мысль как работодатель. Мы ведь имеем здесь потенциальный конфликт в отношениях между работником и Ростелекомом , верно? И пока возмущенная общественность твердо стоит на стороне работника, предлагаю посмотреть чуть шире — не со стороны работодателя даже, а так, сбоку. Давайте возьмем, например, меня — типичного работодателя. Так случилось, что на меня работает некоторое количество весьма лояльных и толковых людей, ч

Как работает банк со своими корреспондентами по SWIFT

Итак, наш банк имеет открытые корреспондентские счета в США (CITIBANK N.A. NEW YORK), в Европе (VTB BANK DEUTSCHLAND AG), в России (Промсвязьбанк Москва и Собинбанк Москва). Соответственно, все расследования по платежам происходят через эти банки согласно  установленным корреспондентским отношениям с использованием соответствующих форматов SWIFT MT-195/295, MT-196/296, MT-199/299 и MT-192/292 Кроме прямых корреспондентских отношений с банками, нашим банком установлены отношения и с другими финансовыми организациями через процедуру обмена ключами, что даёт возможность использовать SWIFT-форматы МТ-195, МТ-196 и МТ-199 для проведения процедуры расследования по стандартным платежам и платежам с покрытием: - DEUTSCHE BANK TRUST COMPANY AMERICAS USA - COMMERZBANK AG Germany - CITIBANK N.A. London - CITIBANK N.A. Brussels - BANQUE DE COMMERCE ET DE PLACEMENTS S.A. Geneva - NORVIK BANKA JSC  LV - ABLV BANK AS  LV В среднем процедура расследования занимает от 3 до 14 дней (е

Как найти реального заливщика

Своего первого реального заливщика, который показал мне как можно скачать деньги в интернет с банковских счетов, я нашел случайно, когда еще трудился в Укртелекоме сменным инженером немного подрабатывая продавая трафик налево , но потом этот человек отошел от дел в связи со слишком уж скользкой ситуацией в данной сфере, и я решил поискать партнера на форумах, разместив рекламу на трёх электронных досках объявлений. Честно говоря поначалу даже был готов сразу закинуть 500 000 гривен в Гарант, но потом призадумался, а стоит ли? Ко мне начал обращаться народ обращается разных категорий 1. Дебильная школота, которая что-то любит повтирать про свою серьезность и просит закинуть 10 000 USD им на Вебмани в качестве аванса  2. Реальные мэны, которые  льют сразу большую сумму по SWIFT  без разговоров про гарантии и прочую шнягу, но после того, как им отдаёшь нал, они сразу пропадают, суть данных действий я так и не понял. зачем пропадать, если всё прошло гладко? 3. Мутные личност

М9 - точка обмена трафиком • Московский INTERNET EXCHANGE • MSK-XI

Вот так всё начиналось Изначально был всего один провайдер - Релком. Не было конкурентов - не было проблем. Рунет еще делал свои первые шаги, и все русскоязычные ресурсы были сосредоточены в одном месте. Позже Релком развалился на Релком и Демос, стали появляться другие провайдеры. Рунет тем временем подрос и... распался на множество отдельных сетей-сегментов, контролируемых разными провайдерами. Разумеется, конечные пользователи имели доступ ко всем ресурсам рунета, но прямого взаимодействия между провайдерами не было. Поэтому трафик шел с сервера одного провайдера по огромной петле через Америку, потом Германию, и только потом возвращался на сервер другого провайдера. Имела место неоправданная потеря и в скорости, и в деньгах. Пока трафик был незначительным, это мало кого волновало, но интернет бурно развивался, трафик по рунету стремительно увеличивался, и в один прекрасный день крупные провайдеры Москвы (по сути, Демос и Релком) сели друг напротив друга и решили, что им надо нал

Чем рискуют дропы и нальщики принимая заливы на свои карты

Зам.начальника управления Следственного департамента МВД Павел Сычев рассказал о криминальном бизнесе «нальщиков» - Глава Банка России Эльвира Набиуллина заявила о снижении объемов теневого оборота в конце 2013 года. Что показывает ваша статистика по выявлению незаконных операций? - В последние годы объем денежных средств, выведенных в теневой сектор, увеличивался, и криминогенная обстановка ухудшалась. Проблема находится в поле зрения президента -  в декабрьском послании Федеральному Собранию, он призвал избавить нашу финансовую систему от разного рода «отмывочных контор» и так называемых «прачечных». Оперативники уже получили ориентировку на более активное выявление этих преступлений. П о уголовным делам, расследованным МВД только в первом полугодии 2013 года, проходит 145 млрд рублей, обналиченных и незаконно выведенных заграницу. Это неуплаченные налоги, незаконный бизнес, хищения, взятки. Финансовый доход посредников от этих операций составил 8 млрд рублей. Расследовано 89

Залив на карту без предоплаты по SWIFT или SEPA

В последнее время наблюдается такая ситуация, что нальщиков и дропов на рынке много, а адекватных заливщиков , можно сказать, совсем нет. Например, один мой хороший знакомый, имеющий свой собственный офшор, работает с заливщиками на условиях партнерства, предоставляя им трафик и взамен получая 20% от поведенных транзакций на свой счет в офшорном банке. Мне он рассказал по большому секрету, как такое ему удается, а начинал он как и все с малого - продажи дебетовых карт и игре на рынке FOREX . Просто так искать Заливщиков на различных форумах, посвящённых обналу и отмыванию денег - достаточно муторное и нудное занятие, потому как после общения с десятым по счету заливщиком, начинаешь понимать, что просто так на карты и счета никто лить не будет. Однако моему другу попался один довольно интересный вариант - Заливщик предложил сделать перевод в размере 375 000 EUR по SEPA  в день предоставления готового к работе счета и активной системы Multihomed AS . Остальные предлож