[go: up one dir, main page]

RU2660643C1 - System and method of detecting the harmful cil-file - Google Patents

System and method of detecting the harmful cil-file Download PDF

Info

Publication number
RU2660643C1
RU2660643C1 RU2017133835A RU2017133835A RU2660643C1 RU 2660643 C1 RU2660643 C1 RU 2660643C1 RU 2017133835 A RU2017133835 A RU 2017133835A RU 2017133835 A RU2017133835 A RU 2017133835A RU 2660643 C1 RU2660643 C1 RU 2660643C1
Authority
RU
Russia
Prior art keywords
file
cil
similarity
lines
hash
Prior art date
Application number
RU2017133835A
Other languages
Russian (ru)
Inventor
Владимир Владимирович Крылов
Александр Викторович Лискин
Алексей Евгеньевич Антонов
Original Assignee
Акционерное общество "Лаборатория Касперского"
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Акционерное общество "Лаборатория Касперского" filed Critical Акционерное общество "Лаборатория Касперского"
Priority to RU2017133835A priority Critical patent/RU2660643C1/en
Priority to US15/939,789 priority patent/US10713359B2/en
Priority to EP18172180.4A priority patent/EP3462699B1/en
Application granted granted Critical
Publication of RU2660643C1 publication Critical patent/RU2660643C1/en
Priority to CN201810770368.4A priority patent/CN109583201B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

FIELD: information technology.
SUBSTANCE: invention relates to solutions for identifying malicious applications. Method of detecting an analyzed file containing translated code from high-level languages to intermediate language, malicious, where a set of lines from the analyzed file are selected, calculate the hash of a set of selected rows, reveal the degree of similarity of a set of selected lines of the analyzed file with sets of selected lines of known malicious files, make a decision about the severity of the analyzed file.
EFFECT: increase the safety of the user on the computing device.
5 cl, 3 dwg

Description

Область техникиTechnical field

Изобретение относится к решениям для выявления вредоносных приложений, а более конкретно к системам и способам выявления вредоносных CIL-файлов.The invention relates to solutions for detecting malicious applications, and more particularly to systems and methods for detecting malicious CIL files.

Уровень техникиState of the art

В настоящее время количество файлов, хранящихся на вычислительных устройствах, растет. Компьютеры и мобильные устройства пользователей работают под управлением различных операционных систем (ОС), содержат различные установленные приложения и файлы пользователя. Кроме того, приложения и компоненты операционной системы регулярно обновляются, в результате чего один и тот же компонент может иметь различные версии у разных пользователей. Также все большую популярность набирает платформа.NET, предлагаемая компанией Microsoft. Многие приложения адаптируются под эту технологию. Одной из ключевых особенностей платформы.NET является то, что независимо от языка высокого уровня платформы.NET, который используется при создании приложения, компилятор преобразует исходный код в промежуточный язык Microsoft (англ. Microsoft Intermediate Language, MSIL), представляющий собой независимый от процессора набор инструкций, который можно эффективно преобразовать в машинный код.Currently, the number of files stored on computing devices is growing. Computers and mobile devices of users operate under various operating systems (OS), contain various installed applications and user files. In addition, applications and components of the operating system are regularly updated, as a result of which the same component may have different versions for different users. Also becoming increasingly popular is the .NET platform offered by Microsoft. Many applications adapt to this technology. One of the key features of the .NET platform is that regardless of the high-level language of the .NET platform that is used to create the application, the compiler converts the source code into the Microsoft intermediate language (Microsoft Intermediate Language, MSIL), which is a processor-independent set instructions that can be effectively converted to machine code.

Стоит отметить, что в настоящее время растет и количество вредоносного программного обеспечения (например, компьютерные вирусы, троянские программы, сетевые черви). Зачастую злоумышленники, создающие вредоносное программное обеспечение, также используют платформу .NET.It is worth noting that the number of malicious software (for example, computer viruses, trojans, network worms) is also growing. Often malicious cybercriminals also use the .NET platform.

Приложения безопасности (например, антивирусные приложения) используют различные методы определения вредоносного программного обеспечения, среди которых есть методы анализа файлов, созданных с помощью платформы .NET.Security applications (for example, anti-virus applications) use various methods for detecting malicious software, including methods for analyzing files created using the .NET platform.

Так, публикация US9384364 описывает технологию добавления сборок платформы .NET, содержащих CIL-код, в белый список (англ. whitelist). На основании одной сборки на каждом отдельном устройстве формируется свой образ (англ. Image) - предкомпилированная сборка, в которой CIL-код уже откомпилирован в исполняемый машинный код, при этом образ не является РЕ-файлом, РЕ-заголовок образа выполняет роль контейнера для исполняемого кода. Эти образы машинно-зависимы, и для каждой конфигурации устройства формируется уникальный образ сборки, поэтому у одной сборки-родителя есть множество образов-потомков. Возникающая проблема - это значительное количество некатегоризированных образов-потомков на фоне меньшего количества категоризированных сборок-родителей. Упомянутая технология использует метаданные сборок для определения связи между категоризированной сборкой-родителем и некатегоризированным образом-потомком. При установлении такой связи потомки получают категорию родителя (в частности, если сборка-родитель находится в белом списке, то образ-потомок тоже попадет в белый список).So, publication US9384364 describes the technology of adding .NET platform assemblies containing CIL code to the white list (English whitelist). On the basis of one assembly on each separate device, its own image is formed (Image) - a precompiled assembly in which the CIL code is already compiled into executable machine code, while the image is not a PE file, the PE header of the image acts as a container for the executable code. These images are machine-dependent, and a unique assembly image is generated for each device configuration, therefore, one parent assembly has many descendant images. The emerging problem is a significant number of uncategorized child images against the background of a smaller number of categorized parent assemblies. The technology mentioned uses assembly metadata to determine the relationship between a categorized parent assembly and a non-categorized child image. When such a relationship is established, the descendants receive the parent category (in particular, if the parent assembly is in the white list, the child image will also be in the white list).

Предлагаемое решение отличается от существующих тем, что использует статический анализ для выявления вредоносности CIL-файла. Общеизвестно, что методы статического анализа выполняются намного быстрее методов эвристического анализа, что позволяет экономить вычислительные ресурсы системы, на которой выполняется проверка CIL-файла, а также сокращает время, требуемое на проверку вредоносности CIL-файла.The proposed solution differs from the existing ones in that it uses static analysis to detect the harmfulness of the CIL file. It is well known that static analysis methods are much faster than heuristic analysis methods, which saves the computing resources of the system on which the CIL file is checked, and also reduces the time required to check the harmfulness of the CIL file.

Сущность изобретенияSUMMARY OF THE INVENTION

Технический результат настоящего изобретения заключается в повышении безопасности работы пользователя на вычислительном устройстве, которое достигается выявлением вредоносных CIL-файлов.The technical result of the present invention is to increase the security of the user on the computing device, which is achieved by the detection of malicious CIL files.

Другой технический результат настоящего изобретения заключается в реализации заявленного назначения.Another technical result of the present invention is the implementation of the claimed purpose.

Согласно одному из вариантов реализации предоставляется способ выявления анализируемого файла, содержащего транслированный код с языков высокого уровня на промежуточный язык, вредоносным, в котором с помощью средства выделения ресурсов выделяют набор строк из анализируемого файла; с помощью средства вычисления хеша вычисляют хеш набора выделенных строк; с помощью средства анализа выявляют степень схожести набора выделенных строк анализируемого файла с наборами выделенных строк известных вредоносных файлов, содержащих транслированный код с языков высокого уровня на промежуточный язык, путем сравнения хешей, при этом степень схожести есть числовая вероятностная величина, чем выше которая, тем выше схожесть наборов выделенных строк упомянутого анализируемого файла и известного вредоносного файла; в случае, если степень схожести упомянутого наборов выделенных строк анализируемого файла превышает пороговое значение, выносят решение о вредоносности упомянутого файла на основании результатов сравнения.According to one embodiment, a method is provided for detecting an analyzed file containing translated code from high-level languages into an intermediate language as malicious, in which a set of lines is extracted from the analyzed file using the resource allocation tool; using a hash calculator, a hash of a set of selected rows is calculated; using the analysis tool, the degree of similarity of the set of selected lines of the analyzed file with the sets of selected lines of known malicious files containing translated code from high-level languages to an intermediate language is revealed by comparing hashes, and the degree of similarity is a numerical probabilistic value, the higher the higher the higher the similarity of the sets of highlighted lines of the analyzed file and the known malicious file; if the degree of similarity of the said sets of highlighted lines of the analyzed file exceeds a threshold value, a decision is made on the harmfulness of the said file based on the results of the comparison.

Согласно другому варианту реализации предоставляется способ, в котором из выделенного набора строк исключаются строки, сгенерированные случайным образом.According to another embodiment, a method is provided in which randomly generated rows are excluded from a selected set of rows.

Согласно одному из частных вариантов реализации предоставляется способ, в котором вычисляют перцептивный хеш.In one particular embodiment, a method is provided in which a perceptual hash is calculated.

Согласно одному из частных вариантов реализации предоставляется способ, в котором перцептивный хеш вычисляется с использованием дискретного косинусного преобразования.In one particular embodiment, a method is provided in which a perceptual hash is computed using a discrete cosine transform.

Согласно одному из частных вариантов реализации предоставляется, способ, в котором степень схожести вычисляется с использованием расстояния Хэмминга.According to one particular embodiment, a method is provided in which a degree of similarity is calculated using a Hamming distance.

Краткое описание чертежейBrief Description of the Drawings

Дополнительные цели, признаки и преимущества настоящего изобретения будут очевидными из прочтения последующего описания осуществления изобретения со ссылкой на прилагаемые чертежи, на которых:Additional objectives, features and advantages of the present invention will be apparent from reading the following description of an embodiment of the invention with reference to the accompanying drawings, in which:

Фиг. 1 отображает структуру системы выявления вредоносных CIL-файлов.FIG. 1 shows the structure of a system for detecting malicious CIL files.

Фиг. 2 отображает способ выявления вредоносных CIL-файлов.FIG. 2 displays a method for detecting malicious CIL files.

Фиг. 3 представляет пример компьютерной системы общего назначения, на которой может быть реализовано настоящее изобретение.FIG. 3 is an example of a general purpose computer system on which the present invention may be implemented.

Описание вариантов осуществления изобретенияDescription of Embodiments

Объекты и признаки настоящего изобретения, способы для достижения этих объектов и признаков станут очевидными посредством отсылки к примерным вариантам осуществления. Однако настоящее изобретение не ограничивается примерными вариантами осуществления, раскрытыми ниже, оно может воплощаться в различных видах. Сущность, приведенная в описании, является ничем иным, как конкретными деталями, обеспеченными для помощи специалисту в области техники в исчерпывающем понимании изобретения, и настоящее изобретение определяется только в объеме приложенной формулы.The objects and features of the present invention, methods for achieving these objects and features will become apparent by reference to exemplary embodiments. However, the present invention is not limited to the exemplary embodiments disclosed below, it can be embodied in various forms. The essence described in the description is nothing more than the specific details provided to assist the specialist in the field of technology in a comprehensive understanding of the invention, and the present invention is defined only in the scope of the attached claims.

Введем ряд определений и понятий, которые будут использоваться при описании вариантов осуществления изобретения.We introduce a number of definitions and concepts that will be used in the description of embodiments of the invention.

CIL-файл - исполняемый файл, созданный компилятором, поддерживающим платформу.NET, при этом содержащий транслированный код с языков высокого уровня (например, платформы .NET) на промежуточный язык CIL (англ. Common Intermediate Language). В общем случае CIL-файл - это именованная область данных на носителе информации. В частном варианте реализации CIL-файлом является непрерывная область памяти, содержащая транслированный код с языков высокого уровня платформы.NET на промежуточный язык CIL.CIL file - an executable file created by a compiler supporting the .NET platform, while containing translated code from high-level languages (for example, the .NET platform) to the CIL intermediate language (English Common Intermediate Language). In general, a CIL file is a named data area on a storage medium. In a particular embodiment, the CIL file is a contiguous memory area containing translated code from high-level languages of the .NET platform to the intermediate CIL language.

Под средствами системы в настоящем изобретении понимаются реальные устройства, системы, компоненты, группы компонентов, реализованные с использованием аппаратных средств, таких как интегральные микросхемы (англ. application-specific integrated circuit, ASIC) или программируемые вентильные матрицы (англ. field-programmable gate array, FPGA) или, например, в виде комбинации программных и аппаратных средств, таких как микропроцессорная система и набор программных инструкций, а также на нейроморфных чипах (англ. neurosynaptic chips) Функциональность указанных средств системы может быть реализована исключительно аппаратными средствами, а также в виде комбинации, где часть функциональности средств системы реализована программными средствами, а часть аппаратными. В некоторых вариантах реализации часть средств, или все средства, могут быть исполнены на процессоре компьютера общего назначения (например, который изображен на Фиг. 3). При этом компоненты (каждое из средств) системы могут быть реализованы в рамках как одного вычислительного устройства, так и разнесены между несколькими, связанными между собой вычислительными устройствами.System means in the present invention are understood to be real devices, systems, components, groups of components implemented using hardware such as integrated circuits (application-specific integrated circuit, ASIC) or programmable gate arrays (English field-programmable gate array , FPGA), or, for example, in the form of a combination of software and hardware, such as a microprocessor system and a set of software instructions, as well as on neuromorphic chips (English neurosynaptic chips) The functionality of these system tools can be implemented exclusively in hardware, as well as in the form of a combination, where part of the functionality of the system is implemented in software, and part in hardware. In some embodiments, part of the means, or all means, may be executed on a processor of a general-purpose computer (for example, which is shown in Fig. 3). In this case, the components (each of the means) of the system can be implemented within the framework of a single computing device, or distributed between several connected computing devices.

Фиг.1 отображает структуру системы выявления вредоносных CIL-файлов.Figure 1 shows the structure of a system for detecting malicious CIL files.

Система выявления вредоносных CIL-файлов является частью приложения безопасности 140 (например, антивирусного приложения) и содержит средство выделения ресурсов 110, средство вычисления хеша 120 и средство анализа 130. В общем случае приложение безопасности 140 выполняется на вычислительном устройстве. Приложение безопасности 140 выявляет CIL-файл 180, анализ которого на вредоносность необходимо выполнить (далее по тексту - анализируемый CIL-файл), и передает его средству выделения ресурсов 110. В одном из вариантов реализации приложение безопасности 140 выявляет для анализа CIL-файл 180, который не имеет цифровой подписи доверенного центра сертификации. В другом варианте реализации приложение безопасности 140 выявляет для анализа CIL-файл 180, размер которого или контрольная сумма изменились.The system for detecting malicious CIL files is part of a security application 140 (for example, an anti-virus application) and comprises a resource allocation tool 110, a hash calculator 120, and an analysis tool 130. In general, the security application 140 is executed on a computing device. Security application 140 detects the CIL file 180, the analysis of which must be performed (hereinafter referred to as the analyzed CIL file), and transfers it to the resource allocation tool 110. In one embodiment, security application 140 detects the CIL file 180 for analysis. which does not have a digital signature from a trusted certification authority. In another embodiment, the security application 140 detects for analysis a CIL file 180 whose size or checksum has changed.

В одном из вариантов реализации средство выделения ресурсов 110 выполняется на устройстве пользователя. В другом варианте реализации средство выделения ресурсов 110 выполняется на удаленном сервере или в качестве облачного сервиса. Средство выделения ресурсов 110 предназначено для выделения ресурсов из анализируемого CIL-файла. В общем случае средство выделения ресурсов 110 выделяет из области ресурсов CIL-файла строки. В одном из вариантов реализации средство выделения ресурсов 110 выделяет строки, состоящие из ANSI-символов. В еще одном из вариантов реализации средство выделения ресурсов 110 определяет лингвистический язык, на котором составлены упомянутые выделенные строки. После выделения упомянутых строк средство выделения ресурсов 110 определяет с помощью известных из уровня техники фильтров, какие из выделенных ANSI-строк сгенерированы случайными методами. В общем случае строки, сгенерированные случайными методами, исключаются средством выделения ресурсов 110 из дальнейшего анализа анализируемого CIL-файла.In one embodiment, the resource allocator 110 is executed on a user device. In another embodiment, the resource allocator 110 is executed on a remote server or as a cloud service. Resource allocator 110 is for allocating resources from a parsed CIL file. In general, the resource allocator 110 extracts lines from the resource area of the CIL file. In one embodiment, the resource allocator 110 allocates strings consisting of ANSI characters. In yet another embodiment, the resource allocator 110 determines the linguistic language in which said highlighted lines are composed. After extracting said lines, resource allocator 110 determines, using prior art filters, which of the selected ANSI lines are randomly generated. In the general case, strings generated by random methods are excluded by the resource allocation tool 110 from further analysis of the analyzed CIL file.

Набор выделенных ANSI-строк, которые не были исключены, передается средством выделения ресурсов 110 средству вычисления хеша 120.A set of allocated ANSI strings that have not been excluded is transmitted by the resource allocator 110 to the hash calculator 120.

В одном из вариантов реализации средство вычисления хеша 120 выполняется на устройстве пользователя. В другом варианте реализации средство вычисления хеша 120 выполняется на удаленном сервере или в качестве облачного сервиса. Средство вычисления хеша 120 предназначено для вычисления перцептивного хеша (англ. perceptive hash) набора выделенных ANSI-строк анализируемого CIL-файла 180, полученных от средства выделения ресурсов 110. Перцептивный хеш - это хеш, вычисленный способом, предназначенным для создания сравнимых хешей.In one embodiment, the hash calculator 120 is executed on a user device. In another embodiment, the hash calculator 120 is executed on a remote server or as a cloud service. The hash calculator 120 is intended to calculate the perceptive hash of a set of selected ANSI lines of the analyzed CIL file 180 received from the resource allocator 110. The perceptive hash is a hash calculated in a way designed to create comparable hashes.

Из уровня техники известны способы вычисления перцептивных хешей. Примером вычисления перцептивного хеша средством вычисления хеша 120 может являться способ, использующий дискретное косинусное преобразование (ДКП, англ. Discrete Cosine Transform, DCT).Methods for computing perceptual hashes are known in the art. An example of calculating a perceptual hash by means of computing a hash 120 may be a method using a discrete cosine transform (DCT, English Discrete Cosine Transform, DCT).

Пусть x[m], где m=0,…, (N - 1) - набор строк длиной N.Let x [m], where m = 0, ..., (N - 1) is a set of strings of length N.

При этом ДКП можно определить какIn this case, DCT can be defined as

Figure 00000001
Figure 00000001

Это выражение можно переписать какThis expression can be rewritten as

Figure 00000002
Figure 00000002

где c[n,m] - элемент матрицы ДКП на пересечении строки с номером n и столбца с номером m.where c [n, m] is an element of the DCT matrix at the intersection of a row with number n and a column with number m.

ДКП матрица определяется какDCT matrix is defined as

Figure 00000003
Figure 00000003

В одном из вариантов реализации ДКП матрица может быть вычислена заранее для любой необходимой длины строки. Таким образом ДКП может быть представлена в видеIn one embodiment of the DCT, the matrix can be calculated in advance for any desired row length. Thus, DCT can be represented as

ДКП=М×I×М'DCT = M × I × M '

где: М - ДКП матрица, I - набор строк квадратного размера, М' - обратная матрица.where: M - DCT matrix, I - a set of rows of square size, M '- inverse matrix.

Стоит отметить, что низкочастотные коэффициенты ДКП наиболее стабильны к манипуляциям со строками, так как большая часть информации, как правило, сосредоточена в нескольких низкочастотных коэффициентах.It is worth noting that low-frequency DCT coefficients are most stable to string manipulations, since most of the information is usually concentrated in several low-frequency coefficients.

В данном примере в качестве матрицы I выступает набор выделенных ANSI-строк, который дополняется до квадратного размера (длина строк равна количеству строк, длина дополняется нулевыми символами, пустые строки заполняются нулевыми символами). Далее матрица I сжимается до размера 32×32. В одном из вариантов реализации к матрице I средством сравнения могут быть применены различные фильтры, известные из уровня техники. В результате получается матрица I', в левом верхнем углу которой находятся низкочастотные коэффициенты, при этом в одном из вариантов реализации средством вычисления хеша 120 из левого верхнего угла выделяется блок значений 8×8 (например, целочисленные значения ANSI-символов). Далее вычисляется среднее значение для всех 64 значений. На следующем шаге создается последовательность из 64 битов, при этом для каждого из 64 значений устанавливается или сбрасывается соответствующий ему бит в зависимости от того, значение для этого бита больше или меньше среднего значения. На последнем шаге вычисляется перцептивный хеш, при этом 64 отдельных бита преобразовываются в 64-битное значение. Порядок старшинства бит не имеет значения.In this example, the matrix I is a set of selected ANSI strings, which is padded to a square size (the length of the rows is the number of rows, the length is padded with zero characters, empty lines are filled with zero characters). Further, the matrix I is compressed to a size of 32 × 32. In one embodiment, various filters known in the art may be applied to matrix I by means of comparison. The result is a matrix I ', in the upper left corner of which there are low-frequency coefficients, while in one embodiment, a hash calculator 120 extracts a block of 8 × 8 values from the upper left corner (for example, integer values of ANSI characters). Next, the average value for all 64 values is calculated. In the next step, a sequence of 64 bits is created, and for each of 64 values, the corresponding bit is set or reset, depending on whether the value for this bit is greater or less than the average value. In the last step, a perceptual hash is computed, with 64 individual bits converted to a 64-bit value. The order of precedence of the bits does not matter.

Вычисленный перцептивный хеш (64-битное значение) средство вычисления хеша 120 передает средству анализа 130. В одном из вариантов реализации перцептивные хеши выделенных ANSI-строк известных вредоносных CIL-файлов могут быть вычислены средством вычисления хеша 120 ранее и сохранены в базе данных 190, при этом в базе данных 190 также сохраняется идентификатор известного вредоносного CIL-файла, соответствующий вычисленному перцептивному хешу. При этом анализ известных вредоносных CIL-файлов на вредоносность был проведен ранее любым из известных из уровня техники способов или их комбинациейThe calculated perceptual hash (64-bit value) of the hash calculator 120 passes to the analysis tool 130. In one embodiment, the perceptual hashes of the extracted ANSI strings of known malicious CIL files can be calculated by the hash calculator 120 earlier and stored in the database 190, with this, database 190 also stores the identifier of a known malicious CIL file corresponding to the computed perceptual hash. Moreover, the analysis of known malicious CIL files for malware was carried out earlier by any of the methods known from the prior art, or a combination thereof

В одном из вариантов реализации средство анализа 130 выполняется на устройстве пользователя. В другом варианте реализации средство анализа 130 выполняется на удаленном сервере или в качестве облачного сервиса. Средство анализа 130 предназначено для выявления вредоносности анализируемого CIL-файла 180 на основании результатов сравнения вычисленного средством вычисления хеша 120 перцептивного хеша набора выделенных ANSI-строк анализируемого файла 180 с перцептивными хешами известных вредоносных CIL-файлов.In one embodiment, the analysis tool 130 is performed on a user device. In another embodiment, the analysis tool 130 runs on a remote server or as a cloud service. The analysis tool 130 is intended to detect the harmfulness of the analyzed CIL file 180 based on the results of comparing the perceptual hash calculated by the hash calculator 120 of the set of selected ANSI strings of the analyzed file 180 with the perceptual hashes of known malicious CIL files.

В одном из вариантов реализации для сравнения вычисляется степень схожести наборов выделенных ANSI-строк анализируемого CIL-файла 180 и известного вредоносного CIL-файла. В общем случае степень схожести есть числовая вероятностная величина, чем выше которая, тем выше схожесть наборов выделенных ANSI-строк. В общем случае для вычисления степени схожести используется расстояние Хэмминга, использующее для сравнения количество разных битов в перцептивных хешах. Нулевое расстояние означает, что наборы выделенных ANSI-строки, вероятно, одинаковые, при этом степень схожести наборов сравниваемых выделенных ANSI-строк равна 1. Расстояние 5 означает, что наборы выделенных ANSI-строки отличаются, но похожи друг на друга, степень схожести при этом высокая (например, 0.75). Если расстояние 10 или больше, то это, вероятно, совершенно разные наборы выделенных ANSI-строк, степень схожести низкая (например, 0.1). В одном из вариантов реализации значения соответствий степени схожести расстоянию Хэмминга могут быть сохранены в базе данных 190. В другом варианте реализации средство сравнения 110 использует пороговое значение (для степени схожести или для расстояния Хэмминга). В еще одном из вариантов реализации ближайшие по расстоянию Хэмминга перцептивные хеши известных вредоносных CIL-файлов средством сравнения 110 объединяются в общие (англ. generic) хеши побитовым объединением перцептивных хешей.In one embodiment, for comparison, the degree of similarity between the sets of selected ANSI strings of the analyzed CIL file 180 and the known malicious CIL file is calculated. In general, the degree of similarity is a numerical probabilistic value, the higher which, the higher the similarity of the sets of selected ANSI strings. In general, the Hamming distance is used to calculate the degree of similarity, using the number of different bits in perceptual hashes to compare. Zero distance means that the sets of selected ANSI strings are probably the same, while the degree of similarity of the sets of compared selected ANSI strings is 1. Distance 5 means that the sets of selected ANSI strings are different, but similar, the degree of similarity high (e.g. 0.75). If the distance is 10 or more, then these are probably completely different sets of selected ANSI strings, the degree of similarity is low (for example, 0.1). In one embodiment, the values of correspondence of the degree of similarity to the Hamming distance can be stored in the database 190. In another embodiment, the comparator 110 uses a threshold value (for the degree of similarity or for the Hamming distance). In another embodiment, the closest Hamming distance perceptual hashes of known malicious CIL files by means of comparison 110 are combined into generic hashes by bitwise union of perceptual hashes.

Это может быть полезно в случае для выделения группы схожих CIL-файлов, если известные вредоносные CIL-файлы (или семейство вредоносных CIL-файлов) от версии к версии обновляют набор ANSI-строк, при этом набор ANSI-строк изменяется не сильно, а хранение всех наборов ANSI-строк (и, соответственно, сравнение со всеми наборами ANSI-строк), соответствующих всем версиям известного вредоносного CIL-файла нецелесообразно.This can be useful in case of highlighting a group of similar CIL files, if known malicious CIL files (or a family of malicious CIL files) update the ANSI string set from version to version, while the ANSI string set does not change much, but storage all sets of ANSI strings (and, accordingly, comparison with all sets of ANSI strings) corresponding to all versions of a known malicious CIL file is impractical.

При превышении порогового значения (например, пороговое значение 0.9, вычисленная степень схожести 0.99) наборы ANSI-строк считаются схожими, средство анализа 130 выносит решение о том, что анализируемый CIL-файл 180 является вредоносным.If the threshold value is exceeded (for example, the threshold value 0.9, the calculated degree of similarity is 0.99), the ANSI string sets are considered similar, the analysis tool 130 decides that the analyzed CIL file 180 is malicious.

В общем случае решение о вредоносности анализируемого CIL-файла 180 средство анализа 130 передает приложению безопасности 140.In the General case, the decision about the harmfulness of the analyzed CIL file 180, the analysis tool 130 passes to the security application 140.

Приложение безопасности 140 в случае получения решения о вредоносности анализируемого CIL-файла 180 от средства анализа 130 выполняет действие для обеспечения безопасности вычислительного устройства. В одном из вариантов реализации приложение безопасности 140 удаляет анализируемый CIL-файл 180. В другом варианте реализации приложение безопасности 140 помещает анализируемый CIL-файл 180 в карантин. В еще одном из вариантов реализации приложение безопасности 140 блокирует активность CIL-файла 180, например, сетевую или файловую активность.Security application 140, in the event of a decision on the harmfulness of the analyzed CIL file 180 from analysis tool 130, performs an action to ensure the security of the computing device. In one embodiment, the security application 140 deletes the parsed CIL file 180. In another embodiment, the security application 140 deletes the parsed CIL file 180 in quarantine. In yet another embodiment, the security application 140 blocks the activity of the CIL file 180, for example, network or file activity.

Фиг. 2 отображает способ выявления вредоносных CIL-файлов.FIG. 2 displays a method for detecting malicious CIL files.

На этапе 210 с помощью средства выделения ресурсов 110 выделяют набор строк из анализируемого файла 180, при этом анализируемый файл содержит транслированный код с языков высокого уровня на промежуточный язык. В общем случае анализируемый файл является CIL-файлом. В одном из вариантов реализации выделяются строки в формате ANSI.At step 210, using a resource allocation tool 110, a set of lines is extracted from the analyzed file 180, while the analyzed file contains translated code from high-level languages to an intermediate language. In general, the analyzed file is a CIL file. In one implementation, strings in ANSI format are allocated.

В одном из вариантов реализации средством выделения ресурсов 110 из выделенного набора строк исключаются строки, сгенерированные случайным образом.In one embodiment, the resource allocator 110 excludes randomly generated rows from the selected rowset.

На этапе 220 с помощью средства вычисления хеша 120 вычисляют перцептивный хеш набора выделенных строк.At step 220, a hash calculator 120 calculates the perceptual hash of the set of selected rows.

В одном из вариантов реализации перцептивный хеш вычисляется средством вычисления хеша 120 с использованием дискретного косинусного преобразования.In one embodiment, the perceptual hash is computed by hash calculator 120 using a discrete cosine transform.

На этапе 230 с помощью средства 130 анализа выявляют степень схожести набора выделенных строк анализируемого файла 180 с наборами выделенных строк известных вредоносных файлов путем сравнения перцептивных хешей, при этом степень схожести есть числовая вероятностная величина, чем выше которая, тем выше схожесть наборов выделенных строк упомянутого файла и известного файла.At step 230, using the analysis tool 130, the degree of similarity of the set of selected lines of the analyzed file 180 to the sets of selected lines of known malicious files is determined by comparing perceptual hashes, the degree of similarity being a numerical probabilistic value, the higher which, the higher the similarity of the sets of selected lines of the mentioned file and famous file.

На этапе 240 с помощью средства анализа 130 на основании результатов сравнения выносят решение о вредоносности. В случае, если степень схожести упомянутого набора выделенных строк анализируемого файла 180 превышает пороговое значение, анализируемый файл 180 признается средством анализа 130 вредоносным.At step 240, using the analysis tool 130, a harmful decision is made based on the results of the comparison. If the degree of similarity of the said set of highlighted lines of the analyzed file 180 exceeds a threshold value, the analyzed file 180 is recognized by the analysis tool 130 as malicious.

Фиг. 3 представляет пример компьютерной системы общего назначения, персональный компьютер или сервер 20, содержащий центральный процессор 21, системную память 22 и системную шину 23, которая содержит разные системные компоненты, в том числе память, связанную с центральным процессором 21. Системная шина 23 реализована, как любая известная из уровня техники шинная структура, содержащая в свою очередь память шины или контроллер памяти шины, периферийную шину и локальную шину, которая способна взаимодействовать с любой другой шинной архитектурой. Системная память содержит постоянное запоминающее устройство (ПЗУ) 24, память с произвольным доступом (ОЗУ) 25. Основная система ввода/вывода (BIOS) 26, содержит основные процедуры, которые обеспечивают передачу информации между элементами персонального компьютера 20, например, в момент загрузки операционной системы с использованием ПЗУ 24.FIG. 3 represents an example of a general purpose computer system, a personal computer or server 20 comprising a central processor 21, a system memory 22, and a system bus 23 that contains various system components, including memory associated with the central processor 21. The system bus 23 is implemented as any prior art bus structure comprising, in turn, a bus memory or a bus memory controller, a peripheral bus and a local bus that is capable of interacting with any other bus architecture. The system memory contains read-only memory (ROM) 24, random access memory (RAM) 25. The main input / output system (BIOS) 26, contains basic procedures that ensure the transfer of information between the elements of the personal computer 20, for example, at the time of loading the operating ROM systems 24.

Персональный компьютер 20 в свою очередь содержит жесткий диск 27 для чтения и записи данных, привод магнитных дисков 28 для чтения и записи на сменные магнитные диски 29 и оптический привод 30 для чтения и записи на сменные оптические диски 31, такие как CD-ROM, DVD-ROM и иные оптические носители информации. Жесткий диск 27, привод магнитных дисков 28, оптический привод 30 соединены с системной шиной 23 через интерфейс жесткого диска 32, интерфейс магнитных дисков 33 и интерфейс оптического привода 34 соответственно. Приводы и соответствующие компьютерные носители информации представляют собой энергонезависимые средства хранения компьютерных инструкций, структур данных, программных модулей и прочих данных персонального компьютера 20.The personal computer 20 in turn contains a hard disk 27 for reading and writing data, a magnetic disk drive 28 for reading and writing to removable magnetic disks 29, and an optical drive 30 for reading and writing to removable optical disks 31, such as a CD-ROM, DVD -ROM and other optical information carriers. The hard disk 27, the magnetic disk drive 28, the optical drive 30 are connected to the system bus 23 through the interface of the hard disk 32, the interface of the magnetic disks 33 and the interface of the optical drive 34, respectively. Drives and associated computer storage media are non-volatile means of storing computer instructions, data structures, software modules and other data of a personal computer 20.

Настоящее описание раскрывает реализацию системы, которая использует жесткий диск 27, сменный магнитный диск 29 и сменный оптический диск 31, но следует понимать, что возможно применение иных типов компьютерных носителей информации 56, которые способны хранить данные в доступной для чтения компьютером форме (твердотельные накопители, флеш карты памяти, цифровые диски, память с произвольным доступом (ОЗУ) и т.п.), которые подключены к системной шине 23 через контроллер 55.The present description discloses an implementation of a system that uses a hard disk 27, a removable magnetic disk 29, and a removable optical disk 31, but it should be understood that other types of computer storage media 56 that can store data in a form readable by a computer (solid state drives, flash memory cards, digital disks, random access memory (RAM), etc.) that are connected to the system bus 23 through the controller 55.

Компьютер 20 имеет файловую систему 36, где хранится записанная операционная система 35, а также дополнительные программные приложения 37, другие программные модули 38 и данные программ 39. Пользователь имеет возможность вводить команды и информацию в персональный компьютер 20 посредством устройств ввода (клавиатуры 40, манипулятора «мышь» 42). Могут использоваться другие устройства ввода (не отображены): микрофон, джойстик, игровая консоль, сканер и т.п. Подобные устройства ввода по своему обычаю подключают к компьютерной системе 20 через последовательный порт 46, который в свою очередь подсоединен к системной шине, но могут быть подключены иным способом, например, при помощи параллельного порта, игрового порта или универсальной последовательной шины (USB). Монитор 47 или иной тип устройства отображения также подсоединен к системной шине 23 через интерфейс, такой как видеоадаптер 48. В дополнение к монитору 47, персональный компьютер может быть оснащен другими периферийными устройствами вывода (не отображены), например, колонками, принтером и т.п.Computer 20 has a file system 36 where the recorded operating system 35 is stored, as well as additional software applications 37, other program modules 38, and program data 39. The user is able to enter commands and information into personal computer 20 via input devices (keyboard 40, keypad “ the mouse "42). Other input devices (not displayed) can be used: microphone, joystick, game console, scanner, etc. Such input devices are, as usual, connected to the computer system 20 via a serial port 46, which in turn is connected to the system bus, but can be connected in another way, for example, using a parallel port, a game port, or a universal serial bus (USB). A monitor 47 or other type of display device is also connected to the system bus 23 via an interface such as a video adapter 48. In addition to the monitor 47, the personal computer can be equipped with other peripheral output devices (not displayed), for example, speakers, a printer, etc. .

Персональный компьютер 20 способен работать в сетевом окружении, при этом используется сетевое соединение с другим или несколькими удаленными компьютерами 49. Удаленный компьютер (или компьютеры) 49 являются такими же персональными компьютерами или серверами, которые имеют большинство или все упомянутые элементы, отмеченные ранее при описании существа персонального компьютера 20, представленного на Фиг. 3. В вычислительной сети могут присутствовать также и другие устройства, например, маршрутизаторы, сетевые станции, пиринговые устройства или иные сетевые узлы.The personal computer 20 is capable of operating in a networked environment, using a network connection with another or more remote computers 49. The remote computer (or computers) 49 are the same personal computers or servers that have most or all of the elements mentioned earlier in the description of the creature the personal computer 20 of FIG. 3. Other devices, such as routers, network stations, peer-to-peer devices, or other network nodes may also be present on the computer network.

Сетевые соединения могут образовывать локальную вычислительную сеть (LAN) 50 и глобальную вычислительную сеть (WAN). Такие сети применяются в корпоративных компьютерных сетях, внутренних сетях компаний и, как правило, имеют доступ к сети Интернет. В LAN- или WAN-сетях персональный компьютер 20 подключен к локальной сети 50 через сетевой адаптер или сетевой интерфейс 51. При использовании сетей персональный компьютер 20 может использовать модем 54 или иные средства обеспечения связи с глобальной вычислительной сетью, такой как Интернет. Модем 54, который является внутренним или внешним устройством, подключен к системной шине 23 посредством последовательного порта 46. Следует уточнить, что сетевые соединения являются лишь примерными и не обязаны отображать точную конфигурацию сети, т.е. в действительности существуют иные способы установления соединения техническими средствами связи одного компьютера с другим.Network connections can form a local area network (LAN) 50 and a wide area network (WAN). Such networks are used in corporate computer networks, internal networks of companies and, as a rule, have access to the Internet. In LAN or WAN networks, the personal computer 20 is connected to the local area network 50 via a network adapter or network interface 51. When using the networks, the personal computer 20 may use a modem 54 or other means of providing communication with a global computer network such as the Internet. The modem 54, which is an internal or external device, is connected to the system bus 23 via the serial port 46. It should be clarified that the network connections are only exemplary and are not required to display the exact network configuration, i.e. in reality, there are other ways to establish a technical connection between one computer and another.

В заключение следует отметить, что приведенные в описании сведения являются примерами, которые не ограничивают объем настоящего изобретения, определенного формулой. Специалисту в данной области становится понятным, что могут существовать и другие варианты осуществления настоящего изобретения, согласующиеся с сущностью и объемом настоящего изобретения.In conclusion, it should be noted that the information provided in the description are examples that do not limit the scope of the present invention defined by the claims. One skilled in the art will recognize that there may be other embodiments of the present invention consistent with the spirit and scope of the present invention.

Claims (9)

1. Способ выявления анализируемого файла, содержащего транслированный код с языков высокого уровня на промежуточный язык, вредоносным, в котором:1. A method for identifying an analyzed file containing translated code from high-level languages to an intermediate language, malicious, in which: - с помощью средства выделения ресурсов выделяют набор строк из анализируемого файла;- using the resource allocation tool, a set of lines is extracted from the analyzed file; - с помощью средства вычисления хеша вычисляют хеш набора выделенных строк;- using the hash calculator, the hash of the set of selected lines is calculated; - с помощью средства анализа выявляют степень схожести набора выделенных строк анализируемого файла с наборами выделенных строк известных вредоносных файлов, содержащих транслированный код с языков высокого уровня на промежуточный язык, путем сравнения хешей, при этом степень схожести есть числовая вероятностная величина, чем выше которая, тем выше схожесть наборов выделенных строк упомянутого анализируемого файла и известного вредоносного файла;- using the analysis tool, the degree of similarity of the set of selected lines of the analyzed file with the sets of selected lines of known malicious files containing translated code from high-level languages to an intermediate language is revealed by comparing hashes, while the degree of similarity is a numerical probability value, the higher which, the higher similarity of the sets of selected lines of the analyzed file and the known malicious file; - в случае, если степень схожести упомянутого наборов выделенных строк анализируемого файла превышает пороговое значение, выносят решение о вредоносности упомянутого файла на основании результатов сравнения.- in the event that the degree of similarity of the said sets of highlighted lines of the analyzed file exceeds a threshold value, a decision is made on the harmfulness of the said file based on the comparison results. 2. Способ по п. 1, в котором из выделенного набора строк исключаются строки, сгенерированные случайным образом.2. The method of claim 1, wherein randomly generated rows are excluded from the selected rowset. 3. Способ по п. 1, в котором вычисляют перцептивный хеш.3. The method of claim 1, wherein the perceptual hash is calculated. 4. Способ по п. 3, в котором перцептивный хеш вычисляется с использованием дискретного косинусного преобразования.4. The method of claim 3, wherein the perceptual hash is computed using a discrete cosine transform. 5. Способ по п. 1, в котором степень схожести вычисляется с использованием расстояния Хэмминга.5. The method of claim 1, wherein the degree of similarity is calculated using the Hamming distance.
RU2017133835A 2017-09-29 2017-09-29 System and method of detecting the harmful cil-file RU2660643C1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
RU2017133835A RU2660643C1 (en) 2017-09-29 2017-09-29 System and method of detecting the harmful cil-file
US15/939,789 US10713359B2 (en) 2017-09-29 2018-03-29 System and method of identifying a malicious intermediate language file
EP18172180.4A EP3462699B1 (en) 2017-09-29 2018-05-14 System and method of identifying a malicious intermediate language file
CN201810770368.4A CN109583201B (en) 2017-09-29 2018-07-13 System and method for identifying malicious intermediate language files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2017133835A RU2660643C1 (en) 2017-09-29 2017-09-29 System and method of detecting the harmful cil-file

Publications (1)

Publication Number Publication Date
RU2660643C1 true RU2660643C1 (en) 2018-07-06

Family

ID=62815815

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2017133835A RU2660643C1 (en) 2017-09-29 2017-09-29 System and method of detecting the harmful cil-file

Country Status (1)

Country Link
RU (1) RU2660643C1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2747464C2 (en) * 2019-07-17 2021-05-05 Акционерное общество "Лаборатория Касперского" Method for detecting malicious files based on file fragments

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8499167B2 (en) * 2009-10-01 2013-07-30 Kaspersky Lab Zao System and method for efficient and accurate comparison of software items
US9384364B1 (en) * 2015-03-31 2016-07-05 AO Kaspersky Lab System and method of controlling access of a native image of a machine code to operating system resources
RU2589862C1 (en) * 2015-06-30 2016-07-10 Закрытое акционерное общество "Лаборатория Касперского" Method of detecting malicious code in random-access memory
RU2628920C2 (en) * 2015-03-31 2017-08-22 Закрытое акционерное общество "Лаборатория Касперского" Method for detecting harmful assemblies

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8499167B2 (en) * 2009-10-01 2013-07-30 Kaspersky Lab Zao System and method for efficient and accurate comparison of software items
US9384364B1 (en) * 2015-03-31 2016-07-05 AO Kaspersky Lab System and method of controlling access of a native image of a machine code to operating system resources
RU2628920C2 (en) * 2015-03-31 2017-08-22 Закрытое акционерное общество "Лаборатория Касперского" Method for detecting harmful assemblies
RU2589862C1 (en) * 2015-06-30 2016-07-10 Закрытое акционерное общество "Лаборатория Касперского" Method of detecting malicious code in random-access memory

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2747464C2 (en) * 2019-07-17 2021-05-05 Акционерное общество "Лаборатория Касперского" Method for detecting malicious files based on file fragments

Similar Documents

Publication Publication Date Title
US11188650B2 (en) Detection of malware using feature hashing
US8479296B2 (en) System and method for detecting unknown malware
RU2617654C2 (en) System and method of formation of anti-virus records used to detect malicious files on user's computer
RU2614557C2 (en) System and method for detecting malicious files on mobile devices
US9092636B2 (en) Methods and systems for exact data match filtering
RU2634178C1 (en) Method of detecting harmful composite files
US9973525B1 (en) Systems and methods for determining the risk of information leaks from cloud-based services
US9135443B2 (en) Identifying malicious threads
US8776234B2 (en) System and method for dynamic generation of anti-virus databases
JP6505533B2 (en) Malicious code detection
US8336100B1 (en) Systems and methods for using reputation data to detect packed malware
RU2523112C1 (en) System and method of selecting optimum type of antiviral verification when accessing file
CN1773417A (en) System and method of aggregating the knowledge base of antivirus software applications
EP3462699B1 (en) System and method of identifying a malicious intermediate language file
CN105631336A (en) System and method for detecting malicious files on mobile device, and computer program product
US9135442B1 (en) Methods and systems for detecting obfuscated executables
RU2673708C1 (en) System and method of machine training model of detecting malicious files
EP2506179A2 (en) System and method for dynamic generation of anti-virus databases
US10339308B1 (en) Systems and methods for remediating computer reliability issues
CN112989337A (en) Malicious script code detection method and device
JP7031438B2 (en) Information processing equipment, control methods, and programs
RU2660643C1 (en) System and method of detecting the harmful cil-file
US8402545B1 (en) Systems and methods for identifying unique malware variants
RU2587424C1 (en) Method of controlling applications
RU2747514C2 (en) System and method for categorizing application on computing device