{"id":1712,"date":"2016-03-16T08:27:50","date_gmt":"2016-03-16T13:27:50","guid":{"rendered":"http:\/\/swildow.darktech.org\/wp\/?p=1712"},"modified":"2016-03-16T08:54:05","modified_gmt":"2016-03-16T13:54:05","slug":"a-closer-look-at-the-locky-ransomware","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=1712","title":{"rendered":"A closer look at the Locky ransomware"},"content":{"rendered":"<div class=\"section post-header\">\n<h1><span id=\"hs_cos_wrapper_name\" class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"text\">A closer look at the Locky ransomware<\/span><\/h1>\n<\/div>\n<div class=\"section post-body\">\n<p>Today, we bring you a deep look into the latest ransomware called Locky. This new file encryptor, targeting PC users, has most likely been created by authors of the<span class=\"Apple-converted-space\">\u00a0<\/span><a href=\"http:\/\/www.theguardian.com\/technology\/2015\/oct\/14\/what-is-dridex-how-can-i-stay-safe\">well-known Dridex botnet<\/a><span class=\"Apple-converted-space\">\u00a0<\/span>and is spread the same way.<\/p>\n<p>Locky uses all \u201ctop class\u201d features, such as a domain generation algorithm, custom encrypted communication, TOR\/BitCoin payment, strong RSA-2048+AES-128 file encryption and can encrypt over 160 different file types, including virtual disks, source codes and databases.<\/p>\n<p>We monitored the Locky family this past month and discovered a second variant of the malware, which has new features and program code improvements. Locky\u2019s authors added a new hard-coded seed to the domain generation algorithm, which allows them to deactivate Locky on Russian PCs.<\/p>\n<h1>Infection vector<\/h1>\n<p>Locky is spreading via spam email campaigns that are similar to those used by the Dridex botnet. They use similar file names, obfuscation, email content and structure of download URLs.<\/p>\n<p>We have observed three different campaign versions of Locky and have described them below.<\/p>\n<p>Below is an example of one of the spam emails. The emails are designed to make people believe they were sent from large companies such as Nordstrom, Symantec and Crown Holdings.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"email.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/email.png?t=1458157163059&amp;width=499&amp;height=381\" alt=\"email.png\" width=\"499\" height=\"381\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>We found different malicious documents (Word, Excel, etc.) attached to the emails that include macros with obfuscated Visual Basic Script (VBS). The malware authors use social engineering to get people to enable the by default disabled macros. The malicious code contains autoopen() sub, which triggers the VBS to automatically run once the macros have been enabled.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"doc_macro_autoopen.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/doc_macro_autoopen.png?t=1458157163059&amp;width=586&amp;height=204\" alt=\"doc_macro_autoopen.png\" width=\"586\" height=\"204\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<h2>Campaign Version One<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" title=\"camp_01.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/camp_01.png?t=1458157163059&amp;width=586&amp;height=263\" alt=\"camp_01.png\" width=\"586\" height=\"263\" \/><\/p>\n<p>The authors of Locky used uncommon obfuscation via the CallByName function and a significant string to generate the VBS code.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" title=\"camp_01_string.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/camp_01_string.png?t=1458157163059&amp;width=586&amp;height=72\" alt=\"camp_01_string.png\" width=\"586\" height=\"72\" \/><\/p>\n<p>The obfuscation is simple and is the same obfuscation as found inside Dridex email campaigns. The download \u00a0URL is \u201cencrypted\u201d and hard-coded as an array.<\/p>\n<p>VBS after deobfuscation:<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"camp_01_deobf.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/camp_01_deobf.png?t=1458157163059&amp;width=540&amp;height=385\" alt=\"camp_01_deobf.png\" width=\"540\" height=\"385\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>Campaign Version Two<\/h2>\n<h2><img decoding=\"async\" title=\"camp_02.png\" src=\"https:\/\/cdn2.hubspot.net\/hubfs\/486579\/Locky_blog_post\/camp_02.png?t=1458157163059\" alt=\"camp_02.png\" \/><\/h2>\n<h2><\/h2>\n<p>In the second campaign, the author used more complicated obfuscation over script files and added more steps before downloading the final PE binary file.<\/p>\n<p>Obfuscated batch file:<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"camp_02_batch_obf.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/camp_02_batch_obf.png?t=1458157163059&amp;width=586&amp;height=208\" alt=\"camp_02_batch_obf.png\" width=\"586\" height=\"208\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>Final deobfuscation Visual Basic Script:<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"camp_02_deobf.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/camp_02_deobf.png?t=1458157163059&amp;width=540&amp;height=277\" alt=\"camp_02_deobf.png\" width=\"540\" height=\"277\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>Execution script and hard-coded plaintext download URL:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" title=\"camp_02_url.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/camp_02_url.png?t=1458157163059&amp;width=586&amp;height=53\" alt=\"camp_02_url.png\" width=\"586\" height=\"53\" data-pin-nopin=\"true\" \/><\/p>\n<h2>Campaign Version Three<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" title=\"camp_03.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/camp_03.png?t=1458157163059&amp;width=586&amp;height=263\" alt=\"camp_03.png\" width=\"586\" height=\"263\" \/><\/p>\n<p>We also spotted emails with a very generic obfuscated JavaScript downloader inside the Zip archives.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"camp_03_obf.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/camp_03_obf.png?t=1458157163059&amp;width=586&amp;height=166\" alt=\"camp_03_obf.png\" width=\"586\" height=\"166\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>Here, we saw the same downloader that was featured in Campaign version two. In this case, however, it was just rewritten in JavaScript language.<\/p>\n<p>Here is the JavaScript after deobfuscation:<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" title=\"camp_03_deobf.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/camp_03_deobf.png?t=1458157163059&amp;width=640\" alt=\"camp_03_deobf.png\" width=\"640\" \/><br \/>\n<\/strong><\/strong><\/span><\/span><strong>Downloading and executing the Locky malware is the last and final step of all of the three mentioned campaigns.<\/strong><\/p>\n<p>We also spotted two specific types of download URLs inside the infected documents and archives.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><strong>Domain Type 1<\/strong><\/td>\n<td><strong>Domain Type 2<\/strong><\/td>\n<\/tr>\n<tr>\n<td>ecoledecorroy.be\/1\/1.exeonigirigohan.web.fc2.com\/1\/1.exe<\/p>\n<p>killerjeff.free.fr\/2\/2.exe<\/p>\n<p>lasmak.pl\/2\/2.exe<\/p>\n<p>animar.net.pl\/3\/3.exe<\/p>\n<p>uponor.otistores.com\/3\/3.exe<\/p>\n<p>premium34.tmweb.ru\/4\/4.exe<\/p>\n<p>suicast.de\/4\/4.exe<\/p>\n<p>bebikiask.bc00.info\/5\/5.exe<\/p>\n<p>ratgeber-beziehung.de\/5\/5.exe<\/p>\n<p>proteusnet.it\/6\/6.exe<\/p>\n<p>test.rinzo.biz\/6\/6.exe<\/p>\n<p>avp-mech.ru\/7\/7.exe<\/p>\n<p>luigicalabrese.it\/7\/7.exe<\/td>\n<td>173.214.183.81\/~tomorrowhope\/09u8h76f\/65fg67n66.133.129.5\/~chuckgilbert\/09u8h76f\/65fg67n<\/p>\n<p>iynus.net\/~test\/09u8h76f\/65fg67n<br \/>\nmondero.ru\/system\/logs\/56y4g45gh45h<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>neways-eurasia.com.ua\/system\/logs\/7647gd7b43f43.exe<\/p>\n<p>tcpos.com.vn\/system\/logs\/56y4g45gh45h<\/p>\n<p>tramviet.vn\/system\/logs\/7647gd7b43f43.exe<\/p>\n<p>www.bag-online.com\/system\/logs\/56y4g45gh45h<\/p>\n<p>choobyta.com\/system\/logs\/23f3rf33.exe<\/p>\n<p>bitmeyenkartusistanbul.com\/system\/logs\/87h754\/<\/p>\n<p>shop.havtoto.bget.ru\/system\/logs\/45g456jhyfg<br \/>\nwww.iglobali.com\/34gf5y\/r34f3345g.exe<\/p>\n<p>www.jesusdenazaret.com.ve\/34gf5y\/r34f3345g.exe<\/p>\n<p>www.southlife.church\/34gf5y\/r34f3345g.exe<\/p>\n<p>www.villaggio.airwave.at\/34gf5y\/r34f3345g.exe<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<\/strong><\/strong><\/span><\/span>Malicious documents from campaign version two use a very specific Base64 decode function written in Visual Basic Script, which we also discovered inside other Banker\/Banload\/RAT malware campaigns in Brazil.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"vbs_debase.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/vbs_debase.png?t=1458157163059&amp;width=586&amp;height=92\" alt=\"vbs_debase.png\" width=\"586\" height=\"92\" data-pin-nopin=\"true\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<h1>Locky file cryptor<\/h1>\n<p>We first saw samples of Locky spreading without a PE packer, which is strange as malware usually contains generic PE packers to avoid AV detections.<\/p>\n<p>Below is a graph of newly infected countries, day by day (DD\/MM\/YYYY). There are three peaks, which represent new campaigns targeting different geo-locations. The total count of infected countries is over 160.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<img decoding=\"async\" loading=\"lazy\" title=\"country_hits.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/country_hits.png?t=1458157163059&amp;width=586&amp;height=295\" alt=\"country_hits.png\" width=\"586\" height=\"295\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><strong>Date<\/strong><\/td>\n<td><strong>Count<\/strong><\/td>\n<td><strong>Infected countries<\/strong><\/td>\n<\/tr>\n<tr>\n<td>18.02. 2016<\/td>\n<td>18<\/td>\n<td>Brazil, Viet Nam, South Africa, Ghana, Lithuania, Bulgaria, Kuwait, Croatia, Namibia, Germany, France, Spain, Ukraine, Peru, Mexico, Chile, Ecuador, United States<\/td>\n<\/tr>\n<tr>\n<td>19.02. 2016<\/td>\n<td>24<\/td>\n<td>Philippines, India, Austria, Lebanon, South Korea, Thailand, Slovenia, Czech Republic, Hungary, Moldova, Belgium, Italy, Greece, Romania, Netherlands, Indonesia, Poland, Morocco, Ireland, Kenya, Bolivia, Costa Rica, Jamaica, Colombia<\/td>\n<\/tr>\n<tr>\n<td>20.02. 2016<\/td>\n<td>2<\/td>\n<td>Malaysia, Paraguay<\/td>\n<\/tr>\n<tr>\n<td>21.02. 2016<\/td>\n<td>1<\/td>\n<td>Argentina<\/td>\n<\/tr>\n<tr>\n<td>22.02. 2016<\/td>\n<td>4<\/td>\n<td>Serbia, Luxembourg, Singapore, Bangladesh<\/td>\n<\/tr>\n<tr>\n<td>23.02. 2016<\/td>\n<td>2<\/td>\n<td>Finland, Puerto Rico<\/td>\n<\/tr>\n<tr>\n<td>24.02.2016<\/td>\n<td>12<\/td>\n<td>Sri Lanka, Saudi Arabia, Brunei Darussalam, Pakistan, Cambodia, Great Britain, Taiwan, Guatemala, Curacao, Canada, Portugal, Japan<\/td>\n<\/tr>\n<tr>\n<td>25.02. 2016<\/td>\n<td>4<\/td>\n<td>Bosnia and Herzegovina, Azerbaijan, Tunisia, Slovakia<\/td>\n<\/tr>\n<tr>\n<td>26.02. 2016<\/td>\n<td>22<\/td>\n<td>Australia, Hong Kong, Israel, Kyrgyzstan, Turkey, Switzerland, Estonia, Sweden, Denmark, Guadeloupe, Russian Federation, Malta, Egypt, Reunion, Norway, China, Martinique, Macedonia, United Arab Emirates, Barbados, Cyprus, Venezuela<\/td>\n<\/tr>\n<tr>\n<td>27.02. 2016<\/td>\n<td>4<\/td>\n<td>Quatar, Maledives, Zimbabwe, Algeria<\/td>\n<\/tr>\n<tr>\n<td>28.02. 2016<\/td>\n<td>5<\/td>\n<td>Panama, Jordan, Djibouti, Congo, Uruguay<\/td>\n<\/tr>\n<tr>\n<td>29.02. 2016<\/td>\n<td>7<\/td>\n<td>Georgia, Latvia, Uganda, Gabon, Angola, Nigeria, Cameroon<\/td>\n<\/tr>\n<tr>\n<td>01.03. 2016<\/td>\n<td>6<\/td>\n<td>Comoros, Congo, Senegal, Nicaragua, New Caledonia, El Salvador<\/td>\n<\/tr>\n<tr>\n<td>02.03. 2016<\/td>\n<td>6<\/td>\n<td>New Zealand, Botswana, Niger, Madagascar, Haiti, C\u00f4te d\u2019Ivoire<\/td>\n<\/tr>\n<tr>\n<td>03.03. 2016<\/td>\n<td>5<\/td>\n<td>Belarus, Kazakhstan, Iraq, Armenia, Dominican Republic<\/td>\n<\/tr>\n<tr>\n<td>04.03. 2016<\/td>\n<td>3<\/td>\n<td>Mauritius, Benin, Honduras<\/td>\n<\/tr>\n<tr>\n<td>05.03. 2016<\/td>\n<td>22<\/td>\n<td>Zambia, Mali, Liechtenstein, Cabo Verde, Iceland, Yeman, Guernsey, Macao, Palestine, Monaco, Tanzania, Guyana, Bahamas, Bahrain, Togo San Marino, Cook Islands, Malawi, Vatican City State, Vanuatu, Grenada, French Polynesia<\/td>\n<\/tr>\n<tr>\n<td>06.03. 2016<\/td>\n<td>11<\/td>\n<td>Northern Mariana Islands, Oman, Seychelles, Nepal, Liberia, Libya, Gibraltar, Andorra, Montenegro, \u00c5land Islands, Saint Kitts and Nevis<\/td>\n<\/tr>\n<tr>\n<td>07.03. 2016<\/td>\n<td>9<\/td>\n<td>French Guiana, Mongolia, Lao People\u2019s Democratic Republic, Tonga, Turkmenistan, Ethiopia, Mozambique, Albania, Swaziland<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>The top 10 countries that have encountered Locky are: France, Italy, Germany, Spain, USA, Great Britain, Poland, Japan, Czech Republic, and Canada.<\/p>\n<h2>Persistence<\/h2>\n<p>After its execution, the Locky binary is copied to the<span class=\"Apple-converted-space\">\u00a0<\/span><i>%TEMP%<span class=\"Apple-converted-space\">\u00a0<\/span><\/i>directory and renamed to<i>svchost.exe<\/i>, to make it difficult for people to find and delete. The malware then removes the<i>:Zone.Identifier<\/i><span class=\"Apple-converted-space\">\u00a0<\/span>flag from the newly created<span class=\"Apple-converted-space\">\u00a0<\/span><i>svchost.exe<\/i><span class=\"Apple-converted-space\">\u00a0<\/span>file (to bypass the \u201cFile Downloaded from the Internet\u201d warning) and executes it.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"zone_ident.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/zone_ident.png?t=1458157163059&amp;width=416&amp;height=214\" alt=\"zone_ident.png\" width=\"416\" height=\"214\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>The first downloaded Locky binary is moved to the<span class=\"Apple-converted-space\">\u00a0<\/span><i>%TEMP%<\/i><span class=\"Apple-converted-space\">\u00a0<\/span>directory, renamed as \u201c<i>sys*.tmp<\/i>\u201d and deleted by<i><span class=\"Apple-converted-space\">\u00a0<\/span>cmd.exe<\/i>.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"cmd_del_origin.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/cmd_del_origin.png?t=1458157163059&amp;width=475&amp;height=116\" alt=\"cmd_del_origin.png\" width=\"475\" height=\"116\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>Locky also sets a registry value to<span class=\"Apple-converted-space\">\u00a0<\/span><i>Software\\Microsoft\\Windows\\CurrentVersion\\Run<\/i><span class=\"Apple-converted-space\">\u00a0<\/span>in case the infected PC is restarted before the malware encrypts all the files. In this case, Locky encrypts the files during the next session.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"currentversion_run.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/currentversion_run.png?t=1458157163059&amp;width=447&amp;height=80\" alt=\"currentversion_run.png\" width=\"447\" height=\"80\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>The malware creates a new process with the CommandLine value \u201c<i>vssadmin.exe Delete Shadows \/All \/Quiet<\/i>\u201d and deletes stored data from Volume Shadow Copy Service. This action prevents a backup retrieval or system restore from previous saved data on an infected computer.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"mountvol_olly.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/mountvol_olly.png?t=1458157163059&amp;width=573&amp;height=74\" alt=\"mountvol_olly.png\" width=\"573\" height=\"74\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>The malware then adds a \u201c<i>completed=1<\/i>\u201d value to the Locky registry key and deletes the previously added .<i>.\\CurrentVersion\\Run<\/i><span class=\"Apple-converted-space\">\u00a0<\/span>value after encrypting all possible files. It also opens an instruction text file,creates an image file from txt and sets an instruction image as the computer\u2019s desktop wallpaper.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"completed_after_encrypt.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/completed_after_encrypt.png?t=1458157163059&amp;width=586&amp;height=144\" alt=\"completed_after_encrypt.png\" width=\"586\" height=\"144\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>The malware\u2019s process is closed and the malicious<span class=\"Apple-converted-space\">\u00a0<\/span><i>svchost.exe<\/i><span class=\"Apple-converted-space\">\u00a0<\/span>file is deleted from the<span class=\"Apple-converted-space\">\u00a0<\/span><i>%TEMP%<\/i>directory in the last step.<\/p>\n<h2>C&amp;C servers<\/h2>\n<p>Locky contains hard-coded IP addresses of C&amp;C (Command and Control) servers and also uses a domain generation algorithm, which is probably used as a backup in case the main hard-coded IPs are blocked.<\/p>\n<p>C&amp;C servers are used for reporting infections and to exchange encryption keys.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"communication_wire.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/communication_wire.png?t=1458157163059&amp;width=586&amp;height=286\" alt=\"communication_wire.png\" width=\"586\" height=\"286\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<h3>Domain Generation Algorithm (DGA)<\/h3>\n<p>The original domain generation algorithm was based on two hard-coded seeds and the current system time of an infected machine. This DGA version generates six unique domains every two days.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"dga.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/dga.png?t=1458157163059&amp;width=586&amp;height=300\" alt=\"dga.png\" width=\"586\" height=\"300\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>The authors decided to change the DGA by a less deterministic algorithm after a quick domains block or sinkhole from AVs. This version of DGA is now based on seed value hard-coded to malware binary and this seed can be changed at any time or in every sample. It also generates eight unique domains every two days.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"dga2.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/dga2.png?t=1458157163059&amp;width=586&amp;height=306\" alt=\"dga2.png\" width=\"586\" height=\"306\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>Both versions use the following Top Level Domains:<\/p>\n<p><i>.be, .de, .eu, .fr, .in, .it, .nl, .pm, .pw, .ru, .tf, .uk, .us, .yt.<\/i><\/p>\n<p>You can download both DGA Python scripts<span class=\"Apple-converted-space\">\u00a0<\/span><a href=\"https:\/\/cdn2.hubspot.net\/hubfs\/486579\/dga_v1.py?t=1458157163059\">here<span class=\"Apple-converted-space\">\u00a0<\/span><\/a>and<span class=\"Apple-converted-space\">\u00a0<\/span><a href=\"https:\/\/cdn2.hubspot.net\/hubfs\/486579\/dga_v2.py?t=1458157163059\">here<\/a>.<\/p>\n<p>List of hard-coded IP addresses:<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<\/strong><\/strong><\/span><\/span><\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><strong>Hard-coded IP<\/strong><\/td>\n<td><strong>ISP\/Organization\/Geolocation<\/strong><\/td>\n<td><strong>Resolved IP<\/strong><\/td>\n<\/tr>\n<tr>\n<td>5.34.183.136<\/td>\n<td>Ua Servers, UA<\/td>\n<td>skaldin.uaservers.net<\/td>\n<\/tr>\n<tr>\n<td>31.41.47.3<\/td>\n<td>RelinkRoute, Relink LTD, RU<\/td>\n<td>31.41.47.3<\/td>\n<\/tr>\n<tr>\n<td>31.41.47.37<\/td>\n<td>RelinkRoute, Relink LTD, RU<\/td>\n<td>casader.ce<\/td>\n<\/tr>\n<tr>\n<td>31.184.233.106<\/td>\n<td>Virty.io Network, Virty.io, RU<\/td>\n<td>31.184.233.106<\/td>\n<\/tr>\n<tr>\n<td>46.4.239.76<\/td>\n<td>Hetzner-rz-fks, ObjectNova, DE<\/td>\n<td>static.76.239.4.46.clients.your-server.de<\/td>\n<\/tr>\n<tr>\n<td>85.25.138.187<\/td>\n<td>PlusServer AG, BSB-Service GmbH, DE<\/td>\n<td>echo509.dedicatedpanel.com<\/td>\n<\/tr>\n<tr>\n<td>86.104.134.144<\/td>\n<td>One Telecom SRL, MD<\/td>\n<td>144.onetelecom.md<\/td>\n<\/tr>\n<tr>\n<td>91.121.97.170<\/td>\n<td>Ovh Isp, Ovh Sas, FR<\/td>\n<td>ns353643.ip-91-121-97.eu<\/td>\n<\/tr>\n<tr>\n<td>91.195.12.185<\/td>\n<td>Host4.Biz, PE Astakhov Pavel Viktorovich, UA<\/td>\n<td>91-195-12-185.net.host4.biz<\/td>\n<\/tr>\n<tr>\n<td>91.234.33.206<\/td>\n<td>FOP Sedinkin Olexandr Valeriyovuch, UA<\/td>\n<td>client.thehost.com.ua<\/td>\n<\/tr>\n<tr>\n<td>94.242.57.45<\/td>\n<td>NET Network &amp; vStoike.com DC, RU<\/td>\n<td>mail.hsaworkshop.ru<\/td>\n<\/tr>\n<tr>\n<td>95.181.171.58<\/td>\n<td>Qwarta.ru, QWARTA LLC, RU<\/td>\n<td>95.181.171.58<\/td>\n<\/tr>\n<tr>\n<td>109.237.111.168<\/td>\n<td>Adman, Krek Ltd., RU<\/td>\n<td>109.237.111.168<\/td>\n<\/tr>\n<tr>\n<td>109.234.38.35<\/td>\n<td>Vdsina, RU<\/td>\n<td>qikos.sa<\/td>\n<\/tr>\n<tr>\n<td>185.14.29.188<\/td>\n<td>Camper Solutions, NL<\/td>\n<td>skaldin11.example.com<\/td>\n<\/tr>\n<tr>\n<td>185.14.30.97<\/td>\n<td>Camper Solutions, NL<\/td>\n<td>vepliok.pq<\/td>\n<\/tr>\n<tr>\n<td>185.46.11.239<\/td>\n<td>Agava, RU<\/td>\n<td>kvm17915.hv9.ru<\/td>\n<\/tr>\n<tr>\n<td>185.82.216.213<\/td>\n<td>Itldc1-sof1, BG<\/td>\n<td>skaldin21.example.com<\/td>\n<\/tr>\n<tr>\n<td>188.138.88.184<\/td>\n<td>Plusserver AG, intergenia AG, DE<\/td>\n<td>xray730.dedicatedpanel.com<\/td>\n<\/tr>\n<tr>\n<td>192.71.213.69<\/td>\n<td>RIPE Network Coordination Center. FR<\/td>\n<td>335.ES.multiservers.xyz<\/td>\n<\/tr>\n<tr>\n<td>192.121.16.196<\/td>\n<td>EDIS GmbH, AT<\/td>\n<td>335.NL.multiservers.xyz<\/td>\n<\/tr>\n<tr>\n<td>193.124.181.169<\/td>\n<td>MAROSNET Telecommunication Company Network, RU<\/td>\n<td>test.ru<\/td>\n<\/tr>\n<tr>\n<td>195.154.241.208<\/td>\n<td>Online SAS, FR<\/td>\n<td>304.worldit.xyz<\/td>\n<\/tr>\n<tr>\n<td>212.47.223.19<\/td>\n<td>LINXTELECOM Linx Telecommunications B.V., EE<\/td>\n<td>ought-scan.retirecompet.com.223.47.212.in-addr.arpa<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<\/strong><\/strong><\/span><\/span>Nine servers are located in Russia, three in Germany and the rest is in France, Ukraine, theNetherlands, Austria, Bulgaria, Estonia and Moldova.<\/p>\n<h2>C&amp;C communication<\/h2>\n<p>All C&amp;C requests are in a specific format:<\/p>\n<p><i>HTTP\/1.1 POST http:\/\/{hardcoded_IP_or_DGA}\/.main.php?{parameters}<\/i><\/p>\n<h3>Parameters<\/h3>\n<p>The malware computes a User ID and gathers some information about the infected machine. The User ID isn&#8217;t randomly generated, but is instead computed as a MD5 hash of volume mount point GUID from the infected machine\u2019s hard disk. The GUID can be displayed if the cmd.exe is run and the \u201cmountvol\u201d command is entered.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" title=\"mountvol_olly.png\" src=\"https:\/\/cdn2.hubspot.net\/hubfs\/486579\/Locky_blog_post\/mountvol_olly.png?t=1458157163059\" alt=\"mountvol_olly.png\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>Locky checks the infected device\u2019s operating system version and checks if it is a 32\/64 bit version, has the original installed service pack and which language the PC is set to, to determine in which language it should show the ransom message. The parameters AffiliateID, C&amp;C command and two others parameters &amp;corp= and &amp;serv= are also requested by the C&amp;C server.<span class=\"Apple-converted-space\">\u00a0<\/span>The<span class=\"Apple-converted-space\">\u00a0<\/span>Affiliate ID value is hard-coded inside Locky\u2019s binary. We found AffiliateIDs with the values 0, 1 and 3.<\/p>\n<p>All parameters merged together:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" title=\"request.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/request.png?t=1458157163059&amp;width=586&amp;height=131\" alt=\"request.png\" width=\"586\" height=\"131\" \/><\/p>\n<p>Parameters of Locky C&amp;C command \u201c<i>&amp;act=<\/i>\u201d:<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<\/strong><\/strong><\/span><\/span><\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><strong>Parameter<\/strong><\/td>\n<td><strong>Action<\/strong><\/td>\n<\/tr>\n<tr>\n<td>getkey<\/td>\n<td>Request public RSA key.<\/td>\n<\/tr>\n<tr>\n<td>stats&amp;path + encrypted, failed, length<\/td>\n<td>Global statistics of encryption and paths of encrypted files.<\/td>\n<\/tr>\n<tr>\n<td>report&amp;data<\/td>\n<td>List of all encrypted files.<\/td>\n<\/tr>\n<tr>\n<td>gettext&amp;lang<\/td>\n<td>Request Locky language files.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<\/strong><\/strong><\/span><\/span>The entire malware traffic is encrypted with two different algorithms for incoming and outgoing data &#8212; both algorithms contain specific hard-coded keys. Both incoming and outgoing traffic data includes a MD5 hash as a CRC of the data content.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"traffic_decrypt.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/traffic_decrypt.png?t=1458157163059&amp;width=492&amp;height=462\" alt=\"traffic_decrypt.png\" width=\"492\" height=\"462\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>File encryption<\/h2>\n<p>The malware starts encrypting files only after it reports the infection to the C&amp;C server and gets back the RSA public key. Locky does not begin encrypting files without a requested RSA key or when a device is disconnected from the Internet. Public and private RSA keys for every infection are generated on the server\u2019s side, so manual decryption is impossible.<\/p>\n<p>Attackers use RSA-2048 + AES-128 cipher with ECB mode for file encryption. All encrypted files are renamed to form<span class=\"Apple-converted-space\">\u00a0<\/span><i>{USERID}{random_hash}<\/i><span class=\"Apple-converted-space\">\u00a0<\/span>with .locky extension.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"crypto.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/crypto.png?t=1458157163059&amp;width=534&amp;height=438\" alt=\"crypto.png\" width=\"534\" height=\"438\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>Affecting file types<\/h2>\n<p>Locky malware can encrypt 164 file types that can be broken down into 11 categories:<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<\/strong><\/strong><\/span><\/span><\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>Office\/Document files (62x):<\/td>\n<td>.123, .602, .CSV, .dif, .DOC, .docb, .docm, .docx, .DOT, .dotm, .dotx, .hwp, .mml, .odg, .odp, .ods, .odt, .otg, .otp, .ots, .ott, .pdf, .pot, .potm, .potx, .ppam, .pps, .ppsm, .ppsx, .PPT, .pptm, .pptx, .RTF, .sldm, .sldx, .slk, .stc, .std, .sti, .stw, .sxc, .sxd, .sxi, .sxm, .sxw, .txt, .uop, .uot, .wb2, .wk1, .wks, .xlc, .xlm, .XLS, .xlsb, .xlsm, .xlsx, .xlt, .xltm, .xltx, .xlw, .xml<\/td>\n<\/tr>\n<tr>\n<td>Scripts\/Source codes (23x):<\/td>\n<td>.asm, .asp, .bat, .brd, .c, .class, .cmd, .cpp, .cs, .dch, .dip, .h, .jar, .java, .js, .pas, .php, .pl, .rb, .sch, .sh, .vb, .vbs<\/td>\n<\/tr>\n<tr>\n<td>Media files (20x):<\/td>\n<td>.3g2, .3gp, .asf, .avi, .fla, .flv, .m3u, .m4u, .mid, .mkv, .mov, .mp3, .mp4, .mpeg, .mpg, .swf, .vob, .wav, .wma, .wmv<\/td>\n<\/tr>\n<tr>\n<td>Graphic\/Image files (14x):<\/td>\n<td>.bmp, .cgm, .djv, .djvu, .gif, .jpeg, .jpg, .NEF, .png, .psd, .raw, .svg, .tif, .tiff<\/td>\n<\/tr>\n<tr>\n<td>Database files (14x):<\/td>\n<td>.db, .dbf, .frm, .ibd, .ldf, .mdb, .mdf, .MYD, .MYI, .odb, .onenotec2, .sql, .SQLITE3, .SQLITEDB<\/td>\n<\/tr>\n<tr>\n<td>Archives (11x):<\/td>\n<td>.7z, .ARC, .bak, .gz, .PAQ, .rar, .tar, .bz2, .tbk, .tgz, .zip<\/td>\n<\/tr>\n<tr>\n<td>CAD\/CAM\/3D files (8x):<\/td>\n<td>.3dm, .3ds, .asc, .lay, .lay6, .max, .ms11, .ms11 (Security copy)<\/td>\n<\/tr>\n<tr>\n<td>Certificates (5x):<\/td>\n<td>.crt, .csr, .key, .p12, .pem<\/td>\n<\/tr>\n<tr>\n<td>Virtual HDD (4x):<\/td>\n<td>.qcow2, .vdi, .vmdk, .vmx<\/td>\n<\/tr>\n<tr>\n<td>Data encryption (2x):<\/td>\n<td>.aes, .gpg<\/td>\n<\/tr>\n<tr>\n<td>Virtual currency (1x):<\/td>\n<td>wallet.dat<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Because the file type range is very wide, this malware can also affect a large number of businesses. Especially interesting are the.<i>ms11<\/i><span class=\"Apple-converted-space\">\u00a0<\/span>file types, which are created by the CAD application used for printed circuit boards. File types from the Virtual HDD category are also interesting, as they are used by many developers, testers or virtualized business solutions.<\/p>\n<p>Locky also adds \u201c_Locky_recover_instructions.txt\u201d file to every directory with encrypted files and also sets \u201c_Locky_recover_instructions.bmp\u201d as desktop wallpaper.<\/p>\n<p>Locky encrypts files on all fixed drives, removable drives and also on RAM disk drives. Remote drives are not affected.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"affecting_disks.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/affecting_disks.png?t=1458157163059&amp;width=448&amp;height=366\" alt=\"affecting_disks.png\" width=\"448\" height=\"366\" \/><\/strong><\/strong><\/span><\/span><\/p>\n<p>We discovered some changes inside the newer Locky binary version. The algorithm is more precious and accurate now.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"affecting_disks2.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/affecting_disks2.png?t=1458157163059&amp;width=586&amp;height=158\" alt=\"affecting_disks2.png\" width=\"586\" height=\"158\" \/><br \/>\n<\/strong><\/strong><\/span><\/span><\/p>\n<h3>Exclusion of Russian PCs<\/h3>\n<p>The newer version of the malware contains a new hard-coded config value to disable Locky\u2019s encryption on PCs whose locale is set to Russia or whose language is set to Russian (0x19). The hard-coded config value also determines how long Locky should remain dormant after its execution to avoid sandbox detections.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" title=\"exclude_ru.png\" src=\"https:\/\/cdn2.hubspot.net\/hubfs\/486579\/Locky_blog_post\/exclude_ru.png?t=1458157163059\" alt=\"exclude_ru.png\" \/><br \/>\n<\/strong><\/strong><\/span><\/span><\/p>\n<h3>Configuration structure<\/h3>\n<p>Malware samples from the newer version contain hard-coded configuration data. Included are AffiliateID<span class=\"Apple-converted-space\">\u00a0<\/span><i>(DWORD)<\/i>, DGA seed value<span class=\"Apple-converted-space\">\u00a0<\/span><i>(DWORD)<\/i>, count of second for Sleep<span class=\"Apple-converted-space\">\u00a0<\/span><i>(DWORD)<\/i>, create<i>%TEMP%\\svchost.exe (BYTE)<\/i>, set Locky to<span class=\"Apple-converted-space\">\u00a0<\/span><i>\\CurrentVersion\\RUN<\/i><span class=\"Apple-converted-space\">\u00a0<\/span>registry<span class=\"Apple-converted-space\">\u00a0<\/span><i>(BYTE)<\/i>, exclude RU machines and list of hard-coded IPs.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"config.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/config.png?t=1458157163059&amp;width=586&amp;height=139\" alt=\"config.png\" width=\"586\" height=\"139\" \/><br \/>\n<\/strong><\/strong><\/span><\/span><\/p>\n<h1>Locky payment method<\/h1>\n<p>Locky\u2019s payment system for decrypting files is the same as that of numerous other ransomwares. Locky\u2019s website is hidden inside the Tor network and the ransom can only be paid with BitCoins. The decryption price is likely based on how many files are encrypted and the ransom value typically starts at 0.5 BitCoins.<\/p>\n<p>Locky\u2019s decryptor can be found on the following TOR sites:<\/p>\n<p><i>6dtxgqam4crv6rr6.onion<\/i><\/p>\n<p><i>i3ezlvkoi7fwyood.onion<\/i><\/p>\n<p><i>lpholfnvwbukqwye.onion<\/i><\/p>\n<p><i>twbers4hmi6dc65f.onion<\/i><\/p>\n<p>Locky\u2019s authors changed the design of the decryptor webpage during its campaign.<\/p>\n<p>Original design:<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><img decoding=\"async\" loading=\"lazy\" title=\"tor_page.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/tor_page.png?t=1458157163059&amp;width=586&amp;height=350\" alt=\"tor_page.png\" width=\"586\" height=\"350\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>New design:<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<img decoding=\"async\" loading=\"lazy\" title=\"tor_page_new.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/tor_page_new.png?t=1458157163059&amp;width=586&amp;height=430\" alt=\"tor_page_new.png\" width=\"586\" height=\"430\" \/><br \/>\n<\/strong><\/strong><\/span><\/span>You can download the Locky decryptor after the payment has been verified. The decryptor contains a hard-coded private RSA key and it\u2019s also possible to decrypt files with other stored key files using the<span class=\"Apple-converted-space\">\u00a0<\/span><i>\/key:<span class=\"Apple-converted-space\">\u00a0<\/span><\/i>parameter.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" title=\"decryptor.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/decryptor.png?t=1458157163059&amp;width=470&amp;height=169\" alt=\"decryptor.png\" width=\"470\" height=\"169\" \/><\/p>\n<h1>Traces<\/h1>\n<p>Inside some of Locky\u2019s malicious documents, we uncovered several strings which shed light on the malware\u2019s authors. As previously mentioned, the Locky creators are probably the same or closely connected to the Dridex group, as they use the same obfuscation techniques and spam email campaign.<\/p>\n<p>We also suspect that the authors are from Russia, because many of their C&amp;C servers are there and because they added a function to the newer Locky binary to exclude Locky from infecting Russian PCs.<\/p>\n<p>While taking a close look at Locky\u2019s strings, we discovered that certain malicious documents contained file path strings that include PC user names. Yikes!<\/p>\n<p><img decoding=\"async\" title=\"trace_01.png\" src=\"https:\/\/cdn2.hubspot.net\/hubfs\/486579\/Locky_blog_post\/trace_01.png?t=1458157163059\" alt=\"trace_01.png\" \/><\/p>\n<h1><img decoding=\"async\" loading=\"lazy\" title=\"trace_02.png\" src=\"https:\/\/cdn2.hubspot.net\/hub\/486579\/hubfs\/Locky_blog_post\/trace_02.png?t=1458157163059&amp;width=586&amp;height=70\" alt=\"trace_02.png\" width=\"586\" height=\"70\" \/><\/h1>\n<h1>Conclusions<\/h1>\n<p>Locky ransomware is currently a big player in the malware sphere. When looking into Locky, we can see all top features, such as a time-based DGA system, huge spam email campaigns, various scripting languages, generic PE packers, server-side encryption key generation and Tor\/BitCoin payment.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<\/strong><\/strong><\/span><\/span>The authors of Locky are skilled and are developing Locky further. They reacted to the AV industry blocking their C&amp;C server infrastructure by changing the DGA algorithm and also patched some minor bugs in the newer version.<\/p>\n<p><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><span class=\"hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text\" data-hs-cos-general-type=\"meta_field\" data-hs-cos-type=\"rich_text\"><strong><strong><br \/>\n<\/strong><\/strong><\/span><\/span>File encryption malware is currently very popular and can be very profitable. We therefore predict new ransomware families will emerge this year.<\/p>\n<h1>How to stay safe<\/h1>\n<ul>\n<li>As always, don\u2019t open suspicious attachments (e.g. .doc, .xls, and .zip files)<\/li>\n<li>Disable Microsoft Office macros by default and never enable macros in strange\/unknown attachments that you receive via email<\/li>\n<li>Keep recent backup copies of important data in a secure place either online or offline<\/li>\n<li>Ensure that your system and applications are fully updated and patched<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A closer look at the Locky ransomware Today, we bring you a deep look into the latest ransomware called Locky. This new file encryptor, targeting PC users, has most likely been created by authors of the\u00a0well-known Dridex botnet\u00a0and is spread &#8230; <a class=\"more-link\" href=\"http:\/\/www.wildow.com\/blog\/?p=1712\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1712"}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1712"}],"version-history":[{"count":2,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1712\/revisions"}],"predecessor-version":[{"id":1714,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1712\/revisions\/1714"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1712"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}