KR102462541B1 - Methods and systems for validating licenses for open source software - Google Patents

Methods and systems for validating licenses for open source software Download PDF

Info

Publication number
KR102462541B1
KR102462541B1 KR1020207015830A KR20207015830A KR102462541B1 KR 102462541 B1 KR102462541 B1 KR 102462541B1 KR 1020207015830 A KR1020207015830 A KR 1020207015830A KR 20207015830 A KR20207015830 A KR 20207015830A KR 102462541 B1 KR102462541 B1 KR 102462541B1
Authority
KR
South Korea
Prior art keywords
tree structure
open source
source software
data
code
Prior art date
Application number
KR1020207015830A
Other languages
Korean (ko)
Other versions
KR20200096766A (en
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 라인플러스 주식회사
Publication of KR20200096766A publication Critical patent/KR20200096766A/en
Application granted granted Critical
Publication of KR102462541B1 publication Critical patent/KR102462541B1/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/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/105Arrangements for software license management or administration, e.g. for managing licenses at corporate level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/034Test or assess a computer or a system

Abstract

오픈소스 소프트웨어의 라이선스를 검증하는 방법 및 시스템을 개시한다. 본 발명의 실시예들에 따른 라이선스 검증 방법은, 오픈소스 소프트웨어의 라이선스를 검사할 수 있다. 일실시예로 라이선스 검증 방법은 안드로이드 환경에서의 smali 코드와 같은 기설정된 코드 형태를 활용하여 개발자의 소스코드 없이 빌드된 상태의 바이너리 코드를 통해서도 오픈소스 소프트웨어의 라이선스를 검증할 수 있다. 다른 실시예로 라이선스 검증 방법은 패키지 파일의 구조에 따른 형태 비교를 통해 문자열이 난독화된 코드에 대해서도 오픈소스 소프트웨어의 라이선스를 검증할 수 있다.Disclosed are methods and systems for verifying licenses of open source software. The license verification method according to embodiments of the present invention may check the license of open source software. In one embodiment, the license verification method can verify the license of the open source software even through the binary code in the built state without the developer's source code by using a preset code form such as smali code in the Android environment. In another embodiment, the license verification method may verify the license of the open source software even for the code in which the string is obfuscated by comparing the form according to the structure of the package file.

Description

오픈소스 소프트웨어의 라이선스를 검증하는 방법 및 시스템Methods and systems for validating licenses for open source software

아래의 설명은 오픈소스 소프트웨어의 라이선스를 검증하는 방법 및 시스템에 관한 것으로, 보다 자세하게는 오픈소스 소프트웨어의 라이선스를 검사할 수 있는 라이선스 검증 방법, 상기 라이선스 검증 방법을 수행하는 컴퓨터 장치, 그리고 컴퓨터와 결합되어 상기 라이선스 검증 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램과 그 기록매체에 관한 것이다.The description below relates to a method and system for verifying the license of open source software, and in more detail, a license verification method that can check the license of open source software, a computer device performing the license verification method, and combination with a computer It relates to a computer program stored in a computer-readable recording medium and the recording medium to execute the license verification method on a computer.

오픈소스 소프트웨어는 소프트웨어 개발에 있어 자유롭게 사용되고 있지만, 상업적 목적으로 사용되는 경우에는 라이선스 규약을 지켜야 한다. 오픈소스 소프트웨어를 만든 단체나 성격에 따라 서로 다른 라이선스를 따른다. 대표적으로 BSD(Berkeley Software Distribution), GPL(General Public License), 아파치(Apache) 등이 있는데, 사용, 복제, 개작, 개작 후 재배포가 자유롭게 허용되는 라이선스가 있는 반면 수정한 소스코드를 공개해야 하는 라이선스도 있다.Open source software is freely used for software development, but when used for commercial purposes, the license agreement must be followed. Different licenses apply depending on the organization or nature of the open source software. Representative examples include BSD (Berkeley Software Distribution), GPL (General Public License), and Apache. While there is a license that allows freely use, duplication, adaptation, and redistribution after modification, a license that requires the disclosure of the modified source code. there is also

또한 오픈소스 소프트웨어의 사용이 늘어나는 만큼 이에 따른 오픈소스 보안취약점을 악용하는 사이버공격도 해마다 증가하는 추세다.  부실한 오픈소스 보안관리로 이미 발견된 보안 취약점 조차 패치되지 않은 채 방치되고 있는 상황이 이어지면서 피해가 발생하고 있는 상황이다.  취약점을 포함한 오픈소스가 소프트웨어에 포함되어 배포될 수 있기 때문에 사용한 오픈소스의 관리가 필요하다.In addition, as the use of open source software increases, cyberattacks that exploit open source security vulnerabilities are also increasing year by year. Even security vulnerabilities that have already been discovered due to poor open source security management are being left unpatched, causing damage. Since open source including vulnerabilities can be included and distributed in software, it is necessary to manage the used open source.

종래기술에서는 오픈소스 라이선스 검사 시스템에서 개발자의 소스코드를 입력으로 받아 개발자의 코드와 오픈소스 소프트웨어의 코드를 비교하여 사용된 오픈소스 소프트웨어를 판별하였다. 이 경우 개발사의 입장에서는 오픈소스 라이선스 검사를 위해 시스템으로 소스코드를 전달해야 하며, 개발사의 자산인 소스코드의 유출은 개발사의 관점에서 보안상 위험요소가 될 수 있기 때문에 불편함과 거부감이 발생할 수 있다는 문제점이 있다.In the prior art, the open source software used was determined by comparing the developer's code with the code of the open source software by receiving the developer's source code as an input from the open source license inspection system. In this case, the developer must deliver the source code to the system for open source license inspection, and the leakage of the source code, which is the developer's property, can be a security risk from the developer's point of view, so inconvenience and rejection may occur. There is a problem that there is

오픈소스 소프트웨어의 라이선스를 검사할 수 있는 라이선스 검증 방법, 상기 라이선스 검증 방법을 수행하는 컴퓨터 장치, 그리고 컴퓨터와 결합되어 상기 라이선스 검증 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램과 그 기록매체를 제공한다.A license verification method capable of examining the license of open source software, a computer device performing the license verification method, and a computer program stored in a computer-readable recording medium in combination with a computer to execute the license verification method on the computer; A recording medium is provided.

안드로이드 환경에서의 smali 코드와 같은 기설정된 코드 형태를 활용하여 개발자의 소스코드 없이 빌드된 상태의 바이너리 코드를 통해서도 오픈소스 소프트웨어의 라이선스 검증이 가능한 라이선스 검증 방법, 상기 라이선스 검증 방법을 수행하는 컴퓨터 장치, 그리고 컴퓨터와 결합되어 상기 라이선스 검증 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램과 그 기록매체를 제공한다.A license verification method that can verify the license of open source software even through a binary code built without a developer's source code by using a preset code form such as smali code in the Android environment, a computer device that performs the license verification method, And it is combined with a computer to provide a computer program and the recording medium stored in a computer-readable recording medium to execute the license verification method on the computer.

패키지 파일의 구조에 따른 형태 비교를 통해 문자열이 난독화된 코드에 대해서도 오픈소스 소프트웨어의 라이선스 검증이 가능한 라이선스 검증 방법, 상기 라이선스 검증 방법을 수행하는 컴퓨터 장치, 그리고 컴퓨터와 결합되어 상기 라이선스 검증 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램과 그 기록매체를 제공한다.A license verification method capable of verifying the license of open source software even for a code whose string is obfuscated by comparing the form according to the structure of the package file, a computer device that performs the license verification method, and the license verification method in combination with a computer Provided are a computer program stored in a computer-readable recording medium to be executed by a computer and the recording medium.

라이선스 검증 방법에 있어서, 오픈소스 소프트웨어를 다운로드하는 단계; 상기 다운로드된 오픈소스 소프트웨어에서 메소드 호출 정보를 추출하는 단계; 상기 추출된 메소드 호출 정보를 이용하여 기설정된 코드 형태의 패턴을 생성하는 단계; 및 상기 생성된 패턴을 상기 다운로드된 오픈소스 소프트웨어의 식별자와 연계하여 데이터베이스에 저장하는 단계를 포함하는 것을 특징으로 하는 라이선스 검증 방법을 제공한다.A license verification method comprising: downloading open source software; extracting method call information from the downloaded open source software; generating a pattern in the form of a preset code using the extracted method call information; and storing the generated pattern in a database in association with the identifier of the downloaded open source software.

일측에 따르면, 상기 라이선스 검증 방법은 검사의 대상이 되는 패키지 파일을 입력받는 단계; 상기 패키지 파일의 실행파일을 추출하는 단계; 상기 추출한 실행파일을 상기 기설정된 코드 형태로 변환하는 단계; 상기 기설정된 코드 형태로 변환된 실행파일에서 메소드 호출 정보를 추출하는 단계; 및 상기 추출된 메소드 호출 정보를 상기 데이터베이스에 저장된 패턴과 비교하는 단계를 더 포함하는 것을 특징으로 할 수 있다.According to one side, the license verification method includes the steps of receiving a package file to be inspected; extracting an executable file of the package file; converting the extracted executable file into the preset code form; extracting method call information from the executable file converted into the preset code form; and comparing the extracted method call information with a pattern stored in the database.

라이선스 검증 방법에 있어서, 오픈소스 소프트웨어를 다운로드하는 단계; 상기 다운로드된 오픈소스 소프트웨어의 디렉토리 구조에 대응하는 제1 트리 구조의 데이터를 생성하는 단계; 및 상기 제1 트리 구조의 데이터를 해당 오픈소스 소프트웨어의 식별자와 연계하여 데이터베이스에 저장하는 단계를 포함하는 것을 특징으로 하는 라이선스 검증 방법을 제공한다.A license verification method comprising: downloading open source software; generating data of a first tree structure corresponding to the directory structure of the downloaded open source software; and storing the data of the first tree structure in a database in association with the identifier of the corresponding open source software.

일측에 따르면, 상기 라이선스 검증 방법은, 검사의 대상이 되는 패키지 파일을 입력받는 단계; 상기 입력된 패키지 파일의 디렉토리 구조에 대응하는 제2 트리 구조의 데이터를 생성하는 단계; 및 상기 제2 트리 구조의 데이터와 상기 데이터베이스에 저장된 상기 제1 트리 구조의 데이터를 비교하는 단계를 더 포함하는 것을 특징으로 할 수 있다.According to one side, the license verification method, the step of receiving a package file to be inspected; generating data of a second tree structure corresponding to the directory structure of the input package file; and comparing the data of the second tree structure with the data of the first tree structure stored in the database.

컴퓨터와 결합되어 상기 라이선스 검증 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.It provides a computer program stored in a computer-readable recording medium in combination with a computer to execute the license verification method on the computer.

상기 라이선스 검증 방법을 컴퓨터에 실행시키기 위한 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터에서 판독 가능한 기록매체를 제공한다.There is provided a computer-readable recording medium in which a program for executing the license verification method on a computer is recorded.

컴퓨터 장치에 있어서, 컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는, 오픈소스 소프트웨어를 다운로드하고, 상기 다운로드된 오픈소스 소프트웨어에서 메소드 호출 정보를 추출하고, 상기 추출된 메소드 호출 정보를 이용하여 기설정된 코드 형태의 패턴을 생성하고, 상기 생성된 패턴을 상기 다운로드된 오픈소스 소프트웨어의 식별자와 연계하여 데이터베이스에 저장하는 것을 특징으로 하는 컴퓨터 장치를 제공한다.A computer device comprising: at least one processor implemented to execute computer-readable instructions, the at least one processor to download open source software, extract method call information from the downloaded open source software; , to generate a pattern in the form of a preset code using the extracted method call information, and to store the generated pattern in a database in association with the identifier of the downloaded open source software.

컴퓨터 장치에 있어서, 컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는, 오픈소스 소프트웨어를 다운로드하고, 상기 다운로드된 오픈소스 소프트웨어의 디렉토리 구조에 대응하는 제1 트리 구조의 데이터를 생성하고, 상기 제1 트리 구조의 데이터를 해당 오픈소스 소프트웨어의 식별자와 연계하여 데이터베이스에 저장하는 것을 특징으로 하는 컴퓨터 장치를 제공한다.A computer device comprising: at least one processor embodied to execute instructions readable by a computer, wherein the at least one processor is configured to download an open source software and a second processor corresponding to a directory structure of the downloaded open source software. There is provided a computer device characterized in that it generates data of a one tree structure, and stores the data of the first tree structure in a database in association with an identifier of the corresponding open source software.

오픈소스 소프트웨어의 라이선스를 검사할 수 있는 라이선스 검증 방법, 상기 라이선스 검증 방법을 수행하는 컴퓨터 장치, 그리고 컴퓨터와 결합되어 상기 라이선스 검증 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램과 그 기록매체를 제공할 수 있다.A license verification method capable of examining the license of open source software, a computer device performing the license verification method, and a computer program stored in a computer-readable recording medium in combination with a computer to execute the license verification method on the computer; A recording medium may be provided.

안드로이드 환경에서의 smali 코드와 같은 기설정된 코드 형태를 활용하여 개발자의 소스코드 없이 빌드된 상태의 바이너리 코드를 통해서도 오픈소스 소프트웨어의 라이선스를 검증할 수 있다.By using a preset code form such as smali code in the Android environment, it is possible to verify the license of open source software even through the binary code built without the developer's source code.

패키지 파일의 구조에 따른 형태 비교를 통해 문자열이 난독화된 코드에 대해서도 오픈소스 소프트웨어의 라이선스를 검증할 수 있다.The license of open source software can be verified even for code whose string is obfuscated by comparing the format according to the structure of the package file.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다.
도 3은 본 발명의 일실시예에 있어서, 오픈소스 소프트웨어의 패턴을 수집하는 방법의 예를 도시한 흐름도이다.
도 4는 본 발명의 일실시예에 있어서, 패턴을 이용한 오픈소스 소프트웨어의 사용 여부를 검사하는 방법의 예를 도시한 흐름도이다.
도 5는 본 발명의 일실시예에 있어서, 오픈소스 소프트웨어의 소스코드로부터 smali 코드 형태의 패턴을 생성하는 예를 도시한 도면이다.
도 6 및 도 7은 본 발명의 일실시예에 있어서, 덱스 파일을 smali 코드로 변환한 예를 도시한 도면들이다.
도 8은 본 발명의 일실시예에 있어서, 자바 코드와 자바 코드에 대응하는 smali 코드의 예를 도시한 도면이다.
도 9는 본 발명의 일실시예에 있어서, 패키지 파일의 구조를 오픈소스 소프트웨어의 패턴으로서 수집하는 방법의 예를 도시한 흐름도이다.
도 10은 본 발명의 일실시예에 있어서, 패키지 파일의 구조에 따른 형태 비교를 통해 오픈소스 소프트웨어의 사용 여부를 검사하는 방법의 예를 도시한 흐름도이다.
도 11은 본 발명의 일실시예에 있어서, 패키지 파일의 디렉토리 구조의 예를 도시한 도면이다.
도 12는 본 발명의 일실시예에 있어서, 디렉토리 구조에 대응하는 트리 구조의 예를 도시한 도면이다.
도 13은 본 발명의 일실시예에 있어서, 정렬된 트리 구조의 예를 도시한 도면이다.
도 14는 본 발명의 일실시예에 있어서, 직렬화되어 저장된 데이터의 예를 도시한 도면이다.
도 15 및 도 16은 본 발명의 일실시예에 있어서, 트리 구조의 비교 예를 도시한 도면들이다.
1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
2 is a block diagram illustrating an example of a computer device according to an embodiment of the present invention.
3 is a flowchart illustrating an example of a method for collecting patterns of open source software according to an embodiment of the present invention.
4 is a flowchart illustrating an example of a method of checking whether open source software is used using a pattern according to an embodiment of the present invention.
5 is a diagram illustrating an example of generating a smali code type pattern from a source code of an open source software according to an embodiment of the present invention.
6 and 7 are diagrams illustrating an example of converting a Dex file into a smali code according to an embodiment of the present invention.
8 is a diagram illustrating an example of a Java code and a smali code corresponding to the Java code according to an embodiment of the present invention.
9 is a flowchart illustrating an example of a method of collecting the structure of a package file as a pattern of an open source software according to an embodiment of the present invention.
10 is a flowchart illustrating an example of a method of checking whether an open source software is used by comparing a shape according to a structure of a package file according to an embodiment of the present invention.
11 is a diagram illustrating an example of a directory structure of a package file according to an embodiment of the present invention.
12 is a diagram illustrating an example of a tree structure corresponding to a directory structure according to an embodiment of the present invention.
13 is a diagram illustrating an example of an ordered tree structure according to an embodiment of the present invention.
14 is a diagram illustrating an example of serialized and stored data according to an embodiment of the present invention.
15 and 16 are diagrams illustrating a comparative example of a tree structure according to an embodiment of the present invention.

발명의 실시를 위한 최선의 형태Best mode for carrying out the invention

이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

본 발명의 실시예들에 따른 라이선스 검증 시스템은 이후 설명될 서버와 같은 컴퓨터 장치를 통해 구현될 수 있다. 이때, 컴퓨터 장치에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 라이선스 검증 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터 장치와 결합되어 라이선스 검증 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.The license verification system according to embodiments of the present invention may be implemented through a computer device such as a server, which will be described later. In this case, the computer program according to an embodiment of the present invention may be installed and driven in the computer device, and the computer device may perform the license verification method according to the embodiments of the present invention under the control of the driven computer program. . The above-described computer program may be stored in a computer-readable recording medium in combination with a computer device to execute the license verification method on the computer.

도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment of FIG. 1 shows an example including a plurality of electronic devices 110 , 120 , 130 , 140 , a plurality of servers 150 , 160 , and a network 170 . 1 is an example for explaining the invention, and the number of electronic devices or the number of servers is not limited as in FIG. 1 .

복수의 전자 기기들(110, 120, 130, 140)은 컴퓨터 장치로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 전자 기기들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 네비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC 등이 있다. 일례로 도 1에서는 전자 기기 1(110)의 예로 스마트폰의 형상을 나타내고 있으나, 본 발명의 실시예들에서 전자 기기 1(110)은 실질적으로 무선 또는 유선 통신 방식을 이용하여 네트워크(170)를 통해 다른 전자 기기들(120, 130, 140) 및/또는 서버(150, 160)와 통신할 수 있는 다양한 물리적인 컴퓨터 장치들 중 하나를 의미할 수 있다.The plurality of electronic devices 110 , 120 , 130 , and 140 may be a fixed terminal implemented as a computer device or a mobile terminal. Examples of the plurality of electronic devices 110 , 120 , 130 , 140 include a smart phone, a mobile phone, a navigation device, a computer, a notebook computer, a digital broadcasting terminal, a personal digital assistant (PDA), and a portable multimedia player (PMP). ), tablet PCs, etc. As an example, although the shape of a smartphone is shown as an example of the electronic device 1110 in FIG. 1 , in the embodiments of the present invention, the electronic device 1110 substantially communicates with the network 170 using a wireless or wired communication method. It may refer to one of various physical computer devices capable of communicating with other electronic devices 120 , 130 , 140 and/or servers 150 and 160 through the communication system.

통신 방식은 제한되지 않으며, 네트워크(170)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(170)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(170)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and not only a communication method using a communication network (eg, a mobile communication network, a wired Internet, a wireless Internet, a broadcasting network) that the network 170 may include, but also short-range wireless communication between devices may be included. For example, the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). , the Internet, and the like. In addition, the network 170 may include any one or more of a network topology including a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree, or a hierarchical network, etc. not limited

서버(150, 160) 각각은 복수의 전자 기기들(110, 120, 130, 140)과 네트워크(170)를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다. 예를 들어, 서버(150)는 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 제1 서비스를 제공하는 시스템일 수 있으며, 서버(160) 역시 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 제2 서비스를 제공하는 시스템일 수 있다. 보다 구체적인 예로, 서버(150)는 제1 서비스로서 복수의 전자 기기들(110, 120, 130, 140)에 어플리케이션을 설치 및 구동시키기 위한 파일을 복수의 전자 기기들(110, 120, 130, 140)로 배포할 수 있다. 또한, 서버(160)는 상술한 어플리케이션을 통해, 해당 어플리케이션이 목적하는 서비스를 제2 서비스로서 복수의 전자 기기들(110, 120, 130, 140)로 제공할 수 있다.Each of the servers 150 and 160 communicates with the plurality of electronic devices 110 , 120 , 130 , 140 and the network 170 through a computer device or a plurality of computers providing commands, codes, files, contents, services, etc. It can be implemented in devices. For example, the server 150 may be a system that provides a first service to a plurality of electronic devices 110 , 120 , 130 , 140 connected through the network 170 , and the server 160 is also a network ( It may be a system that provides the second service to the plurality of electronic devices 110 , 120 , 130 , and 140 connected through 170 . As a more specific example, the server 150 transmits a file for installing and driving an application to the plurality of electronic devices 110 , 120 , 130 , and 140 as a first service to the plurality of electronic devices 110 , 120 , 130 , and 140 . ) can be distributed. In addition, the server 160 may provide a service targeted by the corresponding application to the plurality of electronic devices 110 , 120 , 130 , and 140 as a second service through the above-described application.

이때, 서버(150)에는 본 발명의 실시예들에 따른 라이선스 검증 시스템이 구현될 수 있다. 라이선스 검증 시스템은 개발자로부터 서버(150)에 등록되는 어플리케이션을 설치 및 구동시키기 위한 파일에 대해 오픈소스 소프트웨어의 사용을 감지할 수 있으며, 감지된 오픈소스 소프트웨어의 라이선스 정보를 관리자에게 제공할 수 있다. 실시예에 따라 라이선스 검증 시스템은 서버(150)와 구별되는 별도의 컴퓨터 장치로 구현되어 서버(150)와 네트워크(170)를 통해 연계될 수도 있다.In this case, the server 150 may implement a license verification system according to embodiments of the present invention. The license verification system may detect the use of the open source software for a file for installing and driving an application registered in the server 150 from the developer, and may provide license information of the detected open source software to the administrator. According to an embodiment, the license verification system may be implemented as a separate computer device distinct from the server 150 , and may be linked with the server 150 through the network 170 .

도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 앞서 설명한 복수의 전자 기기들(110, 120, 130, 140) 각각이나 서버들(150, 160) 그리고 본 발명의 실시예들에 따른 라이선스 검증 시스템은 도 2를 통해 도시된 컴퓨터 장치(200)에 의해 구현될 수 있으며, 일실시예에 따른 라이선스 검증 방법은 이러한 컴퓨터 장치(200)에 의해 구현되는 라이선스 검증 시스템에 의해 수행될 수 있다. 만약, 라이선스 검증 시스템이 서버(150)에 구현되는 경우, 서버(150)를 구현하는 컴퓨터 장치(200)에 의해 본 발명의 실시예들에 다른 라이선스 검증 방법이 수행될 수 있다. 예를 들어, 컴퓨터 장치(200)에는 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치(200)는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 라이선스 검증 방법을 수행할 수 있다. 실시예에 따라 라이선스 검증 시스템은 복수의 컴퓨터 장치들의 결합을 통해 구현될 수도 있다.2 is a block diagram illustrating an example of a computer device according to an embodiment of the present invention. Each of the plurality of electronic devices 110 , 120 , 130 , 140 or servers 150 , 160 and the license verification system according to embodiments of the present invention described above are installed in the computer device 200 shown in FIG. 2 . may be implemented by, and the license verification method according to an embodiment may be performed by a license verification system implemented by the computer device 200 . If the license verification system is implemented in the server 150 , the license verification method according to the embodiments of the present invention may be performed by the computer device 200 implementing the server 150 . For example, a computer program according to an embodiment may be installed and driven in the computer device 200 , and the computer device 200 is a license verification method according to embodiments of the present invention under the control of the driven computer program. can be performed. According to an embodiment, the license verification system may be implemented through a combination of a plurality of computer devices.

이러한 컴퓨터 장치(200)는 도 2에 도시된 바와 같이, 메모리(210), 프로세서(220), 통신 인터페이스(230) 그리고 입출력 인터페이스(240)를 포함할 수 있다. 메모리(210)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(210)와는 구분되는 별도의 영구 저장 장치로서 컴퓨터 장치(200)에 포함될 수도 있다. 또한, 메모리(210)에는 운영체제와 적어도 하나의 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(210)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 메모리(210)로 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 인터페이스(230)를 통해 메모리(210)에 로딩될 수도 있다. 예를 들어, 소프트웨어 구성요소들은 네트워크(170)를 통해 수신되는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 컴퓨터 장치(200)의 메모리(210)에 로딩될 수 있다.As shown in FIG. 2 , the computer device 200 may include a memory 210 , a processor 220 , a communication interface 230 , and an input/output interface 240 . The memory 210 is a computer-readable recording medium and may include a random access memory (RAM), a read only memory (ROM), and a permanent mass storage device such as a disk drive. Here, a non-volatile mass storage device such as a ROM and a disk drive may be included in the computer device 200 as a separate permanent storage device distinct from the memory 210 . Also, the memory 210 may store an operating system and at least one program code. These software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210 . The separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD/CD-ROM drive, and a memory card. In another embodiment, the software components may be loaded into the memory 210 through the communication interface 230 instead of a computer-readable recording medium. For example, the software components may be loaded into the memory 210 of the computer device 200 based on a computer program installed by files received through the network 170 .

프로세서(220)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(210) 또는 통신 인터페이스(230)에 의해 프로세서(220)로 제공될 수 있다. 예를 들어 프로세서(220)는 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The processor 220 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input/output operations. The instructions may be provided to the processor 220 by the memory 210 or the communication interface 230 . For example, the processor 220 may be configured to execute a received instruction according to a program code stored in a recording device such as the memory 210 .

통신 인터페이스(230)은 네트워크(170)를 통해 컴퓨터 장치(200)가 다른 장치(일례로, 앞서 설명한 저장 장치들)와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)가 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(230)의 제어에 따라 네트워크(170)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(170)를 거쳐 컴퓨터 장치(200)의 통신 인터페이스(230)를 통해 컴퓨터 장치(200)로 수신될 수 있다. 통신 인터페이스(230)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(220)나 메모리(210)로 전달될 수 있고, 파일 등은 컴퓨터 장치(200)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication interface 230 may provide a function for the computer device 200 to communicate with other devices (eg, the storage devices described above) through the network 170 . For example, a request, command, data, file, etc. generated by the processor 220 of the computer device 200 according to a program code stored in a recording device such as the memory 210 is transmitted to the network ( 170) to other devices. Conversely, signals, commands, data, files, etc. from other devices may be received by the computer device 200 through the communication interface 230 of the computer device 200 via the network 170 . A signal, command, or data received through the communication interface 230 may be transmitted to the processor 220 or the memory 210 , and the file may be a storage medium (described above) that the computer device 200 may further include. persistent storage).

입출력 인터페이스(240)는 입출력 장치(250)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(240)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(250)는 컴퓨터 장치(200)와 하나의 장치로 구성될 수도 있다.The input/output interface 240 may be a means for an interface with the input/output device 250 . For example, the input device may include a device such as a microphone, keyboard, or mouse, and the output device may include a device such as a display or a speaker. As another example, the input/output interface 240 may be a means for an interface with a device in which functions for input and output are integrated into one, such as a touch screen. The input/output device 250 may be configured as one device with the computer device 200 .

또한, 다른 실시예들에서 컴퓨터 장치(200)는 도 2의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(200)는 상술한 입출력 장치(250) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.Also, in other embodiments, the computer device 200 may include fewer or more components than those of FIG. 2 . However, there is no need to clearly show most of the prior art components. For example, the computer device 200 may be implemented to include at least a portion of the above-described input/output device 250 or may further include other components such as a transceiver and a database.

도 3은 본 발명의 일실시예에 있어서, 오픈소스 소프트웨어의 패턴을 수집하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법은 일실시예에 따른 라이선스 검증 방법에 포함될 수 있으며, 앞서 설명한 컴퓨터 장치(200)에 의해 수행될 수 있다. 예를 들어, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드나 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(220)는 컴퓨터 장치(200)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 3의 방법이 포함하는 단계들(310 내지 340)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다.3 is a flowchart illustrating an example of a method for collecting patterns of open source software according to an embodiment of the present invention. The method according to the present embodiment may be included in the license verification method according to the embodiment, and may be performed by the computer device 200 described above. For example, the processor 220 of the computer device 200 may be implemented to execute a control instruction according to a code of an operating system included in the memory 210 or a code of at least one program. Here, the processor 220 causes the computer device 200 to perform steps 310 to 340 included in the method of FIG. 3 according to a control command provided by a code stored in the computer device 200 . can control

단계(310)에서 컴퓨터 장치(200)는 오픈소스 소프트웨어를 다운로드할 수 있다. 예를 들어, 컴퓨터 장치(200)는 오픈소스 소프트웨어의 소스코드를 공유하는 복수의 사이트들 중 적어도 하나의 사이트로부터 복수의 오픈소스 소프트웨어들을 다운로드 할 수 있으며, 다운로드된 복수의 오픈소스 소프트웨어들 각각에 대해 아래의 단계(320) 내지 단계(340)을 수행할 수 있다.In step 310 , the computer device 200 may download open source software. For example, the computer device 200 may download a plurality of open source software from at least one of a plurality of sites sharing the source code of the open source software, For the following steps 320 to 340 may be performed.

단계(320)에서 컴퓨터 장치(200)는 다운로드된 오픈소스 소프트웨어에서 메소드 호출 정보를 추출할 수 있다. 일례로, 메소드 호출 정보는 특정 메소드를 호출하기 위해 요구되는 정보로서, 자바(Java) 코드에서는 클래스 경로명, 클래스명, 메소드명, 메소드 인자의 개수, 각 인자의 타입을 포함할 수 있다. 이때, 컴퓨터 장치(200)는 적어도 클래스 경로명, 클래스명 및 메소드명을 상기 메소드 호출 정보로서 추출할 수 있다. 실시예에 따라 메소드 인자의 개수 및 각 인자의 타입 중 적어도 하나가 메소드 호출 정보로서 더 추출될 수도 있다.In step 320, the computer device 200 may extract method call information from the downloaded open source software. For example, method call information is information required to call a specific method, and in Java code, it may include a class path name, a class name, a method name, the number of method arguments, and the type of each argument. In this case, the computer device 200 may extract at least a class path name, a class name, and a method name as the method call information. According to an embodiment, at least one of the number of method arguments and the types of each argument may be further extracted as method call information.

단계(330)에서 컴퓨터 장치(200)는 추출된 메소드 호출 정보를 이용하여 기설정된 코드 형태의 패턴을 생성할 수 있다. 예를 들어, 컴퓨터 장치(200)는 추출된 메소드 호출 정보를 이용하여 안드로이드 어플리케이션을 위한 패키지 파일인 APK(Android application package) 파일에서 사용되는 smali 코드 형태의 패턴을 생성할 수 있다. 이후 보다 자세히 설명하는 바와 같이, smali 코드 형태의 패턴은 클래스 경로명, 클래스명 및 메소드명을 포함할 수 있다.In operation 330, the computer device 200 may generate a pattern in the form of a preset code using the extracted method call information. For example, the computer device 200 may generate a pattern in the form of a smali code used in an Android application package (APK) file, which is a package file for an Android application, by using the extracted method call information. As will be described in more detail later, the smali code type pattern may include a class path name, a class name, and a method name.

단계(340)에서 컴퓨터 장치(200)는 생성된 패턴을 해당 오픈소스 소프트웨어의 식별자와 연계하여 데이터베이스에 저장할 수 있다. 일례로, 오픈소스 소프트웨어의 식별자는 해당 오픈소스 소프트웨어의 이름일 수 있다. 또한, 다운로드된 복수의 오픈소스 소프트웨어들 각각에 대해 적어도 하나의 패턴이 생성될 수 있으며, 생성된 패턴들은 복수의 오픈소스 소프트웨어들 각각의 식별자와 연계되어 데이터베이스에 저장될 수 있다. In operation 340, the computer device 200 may store the generated pattern in a database in association with an identifier of the corresponding open source software. For example, the identifier of the open source software may be a name of the corresponding open source software. In addition, at least one pattern may be generated for each of the plurality of downloaded open source software, and the generated patterns may be stored in a database in association with an identifier of each of the plurality of open source software.

도 4는 본 발명의 일실시예에 있어서, 패턴을 이용한 오픈소스 소프트웨어의 사용 여부를 검사하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법 역시 일실시예에 따른 라이선스 검증 방법에 포함될 수 있다. 예를 들어, 도 3의 실시예에 따른 방법을 통해 다양한 오픈소스 소프트웨어들 각각에 대한 패턴들이 생성되어 데이터베이스화된 이후, 도 4의 실시예에 따른 방법을 통해 특정 어플리케이션에 대해 오픈소스 소프트웨어 검사가 수행될 수 있다. 본 실시예에 따른 방법 역시 앞서 설명한 컴퓨터 장치(200)에 의해 수행될 수 있다. 예를 들어, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드나 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(220)는 컴퓨터 장치(200)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 4의 방법이 포함하는 단계들(410 내지 440)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다.4 is a flowchart illustrating an example of a method of checking whether open source software is used using a pattern according to an embodiment of the present invention. The method according to the present embodiment may also be included in the license verification method according to the embodiment. For example, after patterns for each of various open source software are created and databased through the method according to the embodiment of FIG. 3 , open source software inspection is performed for a specific application through the method according to the embodiment of FIG. 4 . can be performed. The method according to the present embodiment may also be performed by the computer device 200 described above. For example, the processor 220 of the computer device 200 may be implemented to execute a control instruction according to a code of an operating system included in the memory 210 or a code of at least one program. Here, the processor 220 causes the computer device 200 to perform the steps 410 to 440 included in the method of FIG. 4 according to a control command provided by the code stored in the computer device 200 . can control

단계(410)에서 컴퓨터 장치(200)는 검사의 대상이 되는 패키지 파일을 입력받을 수 있다. 예를 들어, 안드로이드 어플리케이션이 검사의 대상이 되는 경우, 컴퓨터 장치(200)는 해당 안드로이드 어플리케이션의 설치 및 구동을 위한 APK 파일을 입력받을 수 있다.In step 410, the computer device 200 may receive a package file to be tested. For example, when an Android application is the target of inspection, the computer device 200 may receive an APK file for installing and driving the Android application.

단계(420)에서 컴퓨터 장치(200)는 패키지 파일의 실행파일을 추출할 수 있다. 상술한 안드로이드 어플리케이션의 예에서 컴퓨터 장치(200)는 입력된 APK 파일에서 압축을 해제하여 'classes.dex'와 같은 덱스(Dalvik Executable, DEX) 파일을 실행파일로서 추출할 수 있다. 압축의 해제 후 덱스 파일은 압축이 해제된 디렉토리의 루트 경로에 존재하게 된다.In step 420 , the computer device 200 may extract an executable file of the package file. In the above-described example of the Android application, the computer device 200 may extract a Dalvik Executable (DEX) file such as 'classes.dex' as an executable file by decompressing the input APK file. After decompression, the dex file exists in the root path of the uncompressed directory.

단계(430)에서 컴퓨터 장치(200)는 추출한 실행파일을 기설정된 코드 형태로 변환할 수 있다. 예를 들어, 도 3에서 설명한 smali 코드 형태를 이용하는 경우, 컴퓨터 장치(200)는 baksmali 라이브러리를 이용하여 실행파일을 smali 코드로 변환할 수 있다. 만약, 단계(420)에서 APK 파일의 압축을 해제하기 위한 툴인 apktool에서 baksmali 라이브러리를 내장하고 있는 경우에는 APK 파일의 압축과 덱스 파일의 smali 코드로의 변환이 동시에 이루어질 수도 있다.In step 430 , the computer device 200 may convert the extracted executable file into a preset code form. For example, when using the smali code form described in FIG. 3 , the computer device 200 may convert an executable file into smali code using the baksmali library. If the baksmali library is built-in in apktool, which is a tool for decompressing the APK file in step 420 , compression of the APK file and conversion of the dex file into smali code may be simultaneously performed.

단계(440)에서 컴퓨터 장치(200)는 기설정된 코드 형태로 변환된 실행파일에서 메소드 호출 정보를 추출할 수 있다. 이때, 추출되는 메소드 호출 정보는 실행파일이 이미 기설정된 코드 형태로 변환되었기 때문에 도 3의 단계(330)에서 생성된 패턴과 동일 또는 유사한 형태를 가질 수 있으며, 적어도 클래스 경로명, 클래스명 및 메소드명을 포함할 수 있다. 실시예에 따라 메소드 인자의 개수 및 각 인자의 타입 중 적어도 하나가 단계(440)에서 추출된 메소드 호출 정보에 더 포함될 수도 있다.In step 440 , the computer device 200 may extract method call information from an executable file converted into a preset code form. At this time, the extracted method call information may have the same or similar form as the pattern generated in step 330 of FIG. 3 because the executable file has already been converted into a preset code form, and at least a class path name, class name, and method name. may include According to an embodiment, at least one of the number of method arguments and the types of each argument may be further included in the method call information extracted in step 440 .

단계(450)에서 컴퓨터 장치(200)는 추출된 메소드 호출 정보를 데이터베이스에 저장된 패턴과 비교할 수 있다. 이때, 데이터베이스에 추출된 메소드 호출 정보와 일치(혹은 추출된 메소드 호출 정보를 포함)하는 패턴이 존재하는 경우, 해당 패턴에 대응하여 데이터베이스에 저장된 오픈소스 소프트웨어의 식별자에 따라 단계(410)에서 입력된 패키지 파일이 해당 오픈소스 소프트웨어를 사용하고 있음을 알 수 있다.In step 450 , the computer device 200 may compare the extracted method call information with a pattern stored in a database. At this time, if there is a pattern matching the extracted method call information (or including the extracted method call information) in the database, the data input in step 410 according to the identifier of the open source software stored in the database corresponding to the pattern exists. You can see that the package file uses the corresponding open source software.

이후, 컴퓨터 장치(200)는 검색된 오픈소스 소프트웨어의 식별자와 해당 오픈소스 소프트웨어에 매칭된 라이선스 정보를 제공할 수 있다. 이 경우, 관리자는 검색의 대상이 되는 패키지 파일이 어떠한 오픈소스 소프트웨어를 사용하고 있으며, 어떠한 라이선스가 적용되고 있는가를 파악할 수 있게 된다.Thereafter, the computer device 200 may provide an identifier of the searched open source software and license information matched to the corresponding open source software. In this case, the administrator can determine which open source software the package file to be searched uses and which license is applied.

도 5는 본 발명의 일실시예에 있어서, 오픈소스 소프트웨어의 소스코드로부터 smali 코드 형태의 패턴을 생성하는 예를 도시한 도면이다. 도 5는 오픈소스 소프트웨어의 예로서, 해당 오픈소스 소프트웨어를 위한 자바 코드 파일 'Square.java'(510)과 'Square.java'(510)에 포함된 자바 코드(520)의 예를 나타내고 있다. 이러한 자바 코드(520)에 따르면, 제1 점선박스(521)에 나타난 'com.sample.math'의 패키지 경로에 제2 점선박스(522)에 나타난 'Square' 클래스가 정의되어 있으며, 'Square' 클래스에는 제3 점선박스(523)에 나타난 'getWidth()' 메소드가 포함되어 있음을 알 수 있다.5 is a diagram illustrating an example of generating a smali code type pattern from a source code of an open source software according to an embodiment of the present invention. 5 is an example of open source software, and shows examples of Java code 520 included in Java code files 'Square.java' 510 and 'Square.java' 510 for the open source software. According to the Java code 520 , the 'Square' class shown in the second dotted box 522 is defined in the package path of 'com.sample.math' shown in the first dotted box 521, and 'Square' It can be seen that the class includes the 'getWidth()' method shown in the third dotted line box 523 .

컴퓨터 장치(200)는 단계(320)에서 이러한 자바 코드(520)로부터 메소드 호출 정보로서 패키지 경로명 'com.sample.math', 클래스명 'Square', 그리고 메소드명 'getWidth()'을 각각 추출할 수 있다. The computer device 200 extracts the package path name 'com.sample.math', the class name 'Square', and the method name 'getWidth()' as method call information from the Java code 520 in step 320, respectively. can

이 경우, 컴퓨터 장치(200)는 단계(330)에서 추출된 정보를 이용하여 도 5에 도시된 바와 같이 대응하는 smali 코드 형태의 정보(530)를 생성할 수 있다. smali 코드 형태의 정보(530)에서 'invoke-virtual' 명령어는 smali 코드 형태에서 virtual 메소드를 호출하는 명령어이며, 이때, 호출되는 메소드는 static 메소드, private 메소드, final 메소드, constructor 메소드가 아니어야 한다. 'v0'는 클래스의 인스턴스를, 클래스 경로명 'com.sample.math' 앞의 'L'은 클래스가 객체 타입임을 의미할 수 있고, 메소드명 'getWidth()' 뒤의 'V'는 리턴 타입이 보이드(void)임을 의미할 수 있다. 그 외에 상위 클래스의 virtual 메소드를 호출하는 'invoke-super' 명령어, direct 메소드 B를 호출하는 'invoke-direct' 명령어, static 메소드를 호출하는 'invoke-static' 명령어, interface 메소드를 호출하는 'invoke-interface' 명령어 등이 사용될 수 있다. 이때, 'invoke-super' 명령어를 통해 호출되는 메소드는 static 메소드, private 메소드, final 메소드, constructor 메소드가 아니어야 한다. 또한, 'invoke-direct' 명령어를 통해 호출되는 메소드는 static 메소드가 아니어야 하며, 'invoke-direct' 명령어는 private 메소드, constructor 메소드와 같이 오버라이드(override) 할 수 없는 메소드를 호출할 때 사용될 수 있다. In this case, the computer device 200 may generate information 530 in the form of a corresponding smali code as shown in FIG. 5 by using the information extracted in step 330 . The 'invoke-virtual' command in the smali code form information 530 is a command for calling a virtual method in the smali code form, and in this case, the called method must not be a static method, a private method, a final method, or a constructor method. 'v0' is the instance of the class, the 'L' in front of the class path name 'com.sample.math' can mean that the class is an object type, and the 'V' after the method name 'getWidth()' is the return type. It may mean that it is void. In addition, the 'invoke-super' command to call the virtual method of the parent class, the 'invoke-direct' command to call the direct method B, the 'invoke-static' command to call the static method, and the 'invoke- command to call the interface method. interface' command may be used. In this case, the method called through the 'invoke-super' command must not be a static method, a private method, a final method, or a constructor method. Also, the method called through the 'invoke-direct' command must not be a static method, and the 'invoke-direct' command can be used to call methods that cannot be overridden, such as private methods and constructor methods. .

이 경우, 특정 패키지 파일의 실행파일에서 'com.sample.math' 클래스 경로를 통해 'Square' 클래스의 'getWidth()'를 호출하는 경우, 자바 코드 파일 'Square.java'(510)를 포함하는 오픈소스 소프트웨어를 사용함을 알 수 있게 된다.In this case, when 'getWidth()' of the 'Square' class is called through the 'com.sample.math' class path in the executable file of a specific package file, the Java code file 'Square.java' (510) is included. You will know that you are using open source software.

클래스의 경로인 패키지명에는 일반적으로 회사명, 소프트웨어명과 같이 고유한 이름이 포함되어 있기 때문에, 중복의 위험이 낮으며, 두 개 이상의 클래스와 메소드에 대해 패턴을 생성하여 검사하는 경우, 오탐의 확률은 제로에 가깝다.Since the package name, which is the path of the class, generally contains unique names such as company name and software name, the risk of duplication is low, and when a pattern is generated and inspected for two or more classes and methods, the probability of false positives is close to zero.

이때, 컴퓨터 장치(200)는 일례로, 제4 점선박스(540)에 나타난 'Lcom/sample/math/Square;->getWidth()V'를 패턴으로서 데이터베이스에 저장할 수 있다.In this case, the computer device 200 may store, for example, 'Lcom/sample/math/Square;->getWidth()V' shown in the fourth dotted line box 540 as a pattern in the database.

도 6 및 도 7은 본 발명의 일실시예에 있어서, 덱스 파일을 smali 코드로 변환한 예를 도시한 도면들이다. 도 6의 제1 박스(610)는 덱스 파일 'classes.dex'의 코드 중 일부를 나타내고 있으며, 도 7의 제2 박스(620)는 덱스 파일 'classes.dex'를 baksmali 라이브러리를 이용하여 변환한 smali 파일 'class.smali'의 코드 중 일부를 나타내고 있다. 예를 들어, 컴퓨터 장치(200)는 '$ java -jar baksmali.jar -o <output directory> classes.dex'와 같은 명령을 통해 덱스 파일 'classes.dex'을 smali 파일 'class.smali'로 변환할 수 있다. 6 and 7 are diagrams illustrating an example of converting a Dex file into a smali code according to an embodiment of the present invention. The first box 610 of FIG. 6 shows a part of the code of the dex file 'classes.dex', and the second box 620 of FIG. 7 is the result of converting the dex file 'classes.dex' using the baksmali library. Some of the codes of the smali file 'class.smali' are shown. For example, the computer device 200 converts the dex file 'classes.dex' into the smali file 'class.smali' through a command such as '$ java -jar baksmali.jar -o <output directory> classes.dex' can do.

이때, 컴퓨터 장치(200)는 변환된 smali 파일 'class.smali'에서 'invoke-virtual' 명령어를 통해 메소드를 호출하는 코드를 식별할 수 있으며, 이러한 코드로부터 메소드 호출 정보를 추출할 수 있다.In this case, the computer device 200 may identify a code for calling a method through the 'invoke-virtual' command in the converted smali file 'class.smali', and extract method call information from the code.

도 8은 본 발명의 일실시예에 있어서, 자바 코드와 자바 코드에 대응하는 smali 코드의 예를 도시한 도면이다. 도 7에서 제1 박스(710)는 안드로이드의 'Toast'를 이용하여 "Toast Hello"라는 간단한 메시지를 화면에 출력하는 자바 코드의 예를 나타내고 있으며, 제2 박스(720)는 제1 박스(710)의 자바 코드를 smali 코드의 형태로 변환한 예를 나타내고 있다. 실질적으로는 자바 코드를 덱스 파일의 코드 형태로 변환한 후 도 6에서와 같이 덱스 파일을 다시 smali 파일의 형태로 변환하는 과정이 요구된다.8 is a diagram illustrating an example of a Java code and a smali code corresponding to the Java code according to an embodiment of the present invention. In FIG. 7 , the first box 710 shows an example of Java code that outputs a simple message “Toast Hello” to the screen using 'Toast' of Android, and the second box 720 is the first box 710 ) of Java code is converted into smali code. Actually, after converting the Java code into the code form of the dex file, a process of converting the dex file back into the form of a smali file is required as shown in FIG. 6 .

이때, 점선박스(830)에 나타난 바와 같이, 클래스 'Toast'의 메소드 'show()'를 호출하는 코드를 살펴보면, 'v1'은 클래스 'Toast'의 인스턴스를, 'android/widget/Toast'는 클래스 경로와 클래스를, 'show()'는 메소드를, 'V'는 리턴 타입 보이드(void)를 각각 나타내고 있다. 이처럼, 컴퓨터 장치(200)는 smali 코드 형태로 변환된 실행 코드로부터 메소드 호출 정보를 추출할 수 있게 되며, 바람직하게는 도 3에서 데이터베이스에 저장되는 패턴과의 비교를 위해 "Landroid/widget/Toast;->show()V"와 같은 형태로 메소드 호출 정보를 추출할 수 있다.At this time, as shown in the dotted line box 830, looking at the code for calling the method 'show()' of the class 'Toast', 'v1' is an instance of the class 'Toast', and 'android/widget/Toast' is Class path and class, 'show()' indicates method, and 'V' indicates return type void. As such, the computer device 200 is able to extract method call information from the executable code converted to the smali code form, and preferably for comparison with the pattern stored in the database in FIG. 3 "Landroid/widget/Toast; ->show()V", method call information can be extracted.

컴퓨터 장치(200)는 추출된 메소드 호출 정보와 데이터베이스에서 읽어온 패턴을 비교하여 일치 여부를 판단할 수 있으며, 일치하는 경우 해당 패턴과 연계하여 데이터베이스에 저장된 오픈소스 소프트웨어의 식별자를 통해 검사의 대상이 되는 패키지 파일이 해당 오픈소스 소프트웨어를 사용하고 있다고 판단할 수 있게 된다. 패키지명(클래스 경로명), 클래스명, 메소드명은 각각 회사명, 기능명을 의미하기 때문에 중복의 위험은 적으나, 중복의 위험이 있다면, 두 개 이상의 패턴을 비교하여 오탐의 확률을 줄일 수 있다.The computer device 200 may compare the extracted method call information with the pattern read from the database to determine whether it is a match. It can be determined that the package file used is using the corresponding open source software. Since the package name (class path name), class name, and method name mean a company name and function name, respectively, the risk of duplication is small, but if there is a risk of duplication, the probability of false positives can be reduced by comparing two or more patterns.

또한, 컴퓨터 장치(200)는 패키지 파일이 해당 오픈소스 소프트웨어를 사용하고 있다고 결정되는 경우, 해당하는 오픈소스 소프트웨어의 식별자(일례로, 오픈소스 소프트웨어명)과 해당하는 오픈소스 소프트웨어에서 사용하는 라이선스의 식별자(일례로, 라이선스명)를 제공할 수 있다.In addition, when it is determined that the package file uses the corresponding open source software, the computer device 200 includes an identifier (eg, an open source software name) of the corresponding open source software and a license used in the corresponding open source software. An identifier (eg, a license name) may be provided.

이하에서는 패키지 파일의 구조에 따른 형태 비교를 통해 라이선스를 검증하는 실시예를 설명한다.Hereinafter, an embodiment in which the license is verified by comparing the form according to the structure of the package file will be described.

도 9는 본 발명의 일실시예에 있어서, 패키지 파일의 구조를 오픈소스 소프트웨어의 패턴으로서 수집하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법은 일실시예에 따른 라이선스 검증 방법에 포함될 수 있으며, 앞서 설명한 컴퓨터 장치(200)에 의해 수행될 수 있다. 예를 들어, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드나 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(220)는 컴퓨터 장치(200)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 9의 방법이 포함하는 단계들(910 내지 940)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다.9 is a flowchart illustrating an example of a method of collecting the structure of a package file as a pattern of an open source software according to an embodiment of the present invention. The method according to the present embodiment may be included in the license verification method according to the embodiment, and may be performed by the computer device 200 described above. For example, the processor 220 of the computer device 200 may be implemented to execute a control instruction according to a code of an operating system included in the memory 210 or a code of at least one program. Here, the processor 220 causes the computer device 200 to perform steps 910 to 940 included in the method of FIG. 9 according to a control command provided by a code stored in the computer device 200 . can control

단계(910)에서 컴퓨터 장치(200)는 오픈소스 소프트웨어를 다운로드할 수 있다. 예를 들어, 컴퓨터 장치(200)는 오픈소스 소프트웨어의 소스코드를 공유하는 다양한 사이트들로부터 복수의 오픈소스 소프트웨어들을 다운로드 할 수 있으며, 다운로드된 복수의 오픈소스 소프트웨어들 각각에 대해 아래의 단계(920) 내지 단계(940)을 수행할 수 있다. 이러한 단계(910)은 도 3을 통해 설명한 단계(310)에 대응할 수 있으며, 라이선스 검증 방법이 도 3의 방법과 도 9의 방법을 모두 포함하는 경우에는 단계(310) 및 단계(910)가 동일한 단계일 수 있다.In step 910 , the computer device 200 may download open source software. For example, the computer device 200 may download a plurality of open source software from various sites sharing the source code of the open source software, and the following step 920 for each of the plurality of downloaded open source software ) to step 940 may be performed. This step 910 may correspond to the step 310 described with reference to FIG. 3 , and when the license verification method includes both the method of FIG. 3 and the method of FIG. 9 , steps 310 and 910 are the same. may be a step.

단계(920)에서 컴퓨터 장치(200)는 다운로드된 오픈소스 소프트웨어의 디렉토리 구조에 대응하는 트리 구조의 데이터를 생성할 수 있다. 자바 소스코드는 비슷한 성격의 자바 클래스를 모아 디렉토리를 만들어 분류해 놓는다. 이러한 디렉토리 구조의 형태는 오픈소스 소프트웨어의 하나의 특징이 될 수 있으며, 트리 구조로 표현될 수 있다. 예를 들어, 디렉토리는 브랜치 노드(branch node)가 될 수 있으며, 디렉토리에 저장된 자바 코드 파일들은 리프 노드(leaf node)로 표현될 수 있다. 이러한 디렉토리 구조와 트리 구조에 대해서는 이후 더욱 자세히 설명한다.In operation 920, the computer device 200 may generate data of a tree structure corresponding to the directory structure of the downloaded open source software. Java source code collects Java classes with similar characteristics and creates directories to classify them. The form of such a directory structure may be a characteristic of open source software and may be expressed as a tree structure. For example, a directory may be a branch node, and Java code files stored in the directory may be expressed as a leaf node. The directory structure and tree structure will be described in more detail later.

단계(930)에서 컴퓨터 장치(200)는 생성된 트리 구조의 노드들을 정렬할 수 있다. 트리 구조에서 노드들의 정렬은 추후 다른 트리 구조와의 일치 여부를 비교하기 위해 수행될 수 있으며, 실시예에 따라 생략될 수도 있다. 자세한 정렬 방법은 이후 더욱 자세히 설명한다.In operation 930 , the computer device 200 may align the nodes of the generated tree structure. The arrangement of nodes in the tree structure may be performed later to compare whether they coincide with another tree structure, and may be omitted according to embodiments. A detailed sorting method will be described in more detail later.

단계(940)에서 컴퓨터 장치(200)는 정렬된 트리 구조의 데이터를 해당 오픈소스 소프트웨어의 식별자와 연계하여 데이터베이스에 저장할 수 있다. 트리 구조의 데이터는 트리 구조 그대로 데이터베이스에 저장될 수도 있으나, 트리 구조의 데이터베이스화의 복잡성을 고려할 때, 직렬화(serialize)되어 저장될 수도 있다. 이러한 트리 구조의 데이터의 직렬화에 대해서는 이후 더욱 자세히 설명한다.In operation 940, the computer device 200 may store the sorted tree-structured data in a database in association with the identifier of the corresponding open source software. The tree-structured data may be stored in the database as it is, but in consideration of the complexity of the tree-structured database, it may be serialized and stored. Serialization of data in such a tree structure will be described in more detail later.

또한, 다운로드되는 복수의 오픈소스 소프트웨어들 각각에 대해 이러한 트리 구조의 데이터가 생성될 수 있으며, 생성된 트리 구조의 데이터는 복수의 오픈소스 소프트웨어들 각각의 식별자와 연계되어 데이터베이스에 저장될 수 있다.In addition, data of such a tree structure may be generated for each of the plurality of open source software to be downloaded, and the generated data of the tree structure may be stored in a database in association with identifiers of each of the plurality of open source software.

도 10은 본 발명의 일실시예에 있어서, 패키지 파일의 구조에 따른 형태 비교를 통해 오픈소스 소프트웨어의 사용 여부를 검사하는 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 방법 역시 일실시예에 따른 라이선스 검증 방법에 포함될 수 있다. 예를 들어, 도 9의 실시예에 따른 방법을 통해 다양한 오픈소스 소프트웨어들 각각에 대해 트리 구조의 데이터들이 생성되어 데이터베이스화된 이후, 도 10의 실시예에 따른 방법을 통해 특정 어플리케이션에 대해 오픈소스 소프트웨어 검사가 수행될 수 있다. 본 실시예에 따른 방법 역시 앞서 설명한 컴퓨터 장치(200)에 의해 수행될 수 있다. 예를 들어, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드나 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(220)는 컴퓨터 장치(200)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 10의 방법이 포함하는 단계들(1010 내지 1040)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다.10 is a flowchart illustrating an example of a method of checking whether an open source software is used by comparing a shape according to a structure of a package file according to an embodiment of the present invention. The method according to the present embodiment may also be included in the license verification method according to the embodiment. For example, after data of a tree structure is generated and databased for each of various open source software through the method according to the embodiment of FIG. 9 , open source for a specific application through the method according to the embodiment of FIG. 10 . A software check may be performed. The method according to the present embodiment may also be performed by the computer device 200 described above. For example, the processor 220 of the computer device 200 may be implemented to execute a control instruction according to a code of an operating system included in the memory 210 or a code of at least one program. Here, the processor 220 causes the computer device 200 to perform steps 1010 to 1040 included in the method of FIG. 10 according to a control command provided by a code stored in the computer device 200 . can control

단계(1010)에서 컴퓨터 장치(200)는 검사의 대상이 되는 패키지 파일을 입력받을 수 있다. 예를 들어, 안드로이드 어플리케이션이 검사의 대상이 되는 경우, 컴퓨터 장치(200)는 해당 안드로이드 어플리케이션의 설치 및 구동을 위한 APK 파일을 입력받을 수 있다.In operation 1010, the computer device 200 may receive a package file to be tested. For example, when an Android application is the target of inspection, the computer device 200 may receive an APK file for installing and driving the Android application.

단계(1020)에서 컴퓨터 장치(200)는 입력된 패키지 파일의 디렉토리 구조에 대응하는 트리 구조의 데이터를 생성할 수 있다. 이러한 단계(1020)은 단계(920)에서 트리 구조의 데이터를 생성하는 과정과 동일할 수 있다.In operation 1020 , the computer device 200 may generate tree-structured data corresponding to the directory structure of the input package file. This step 1020 may be the same as the process of generating data of a tree structure in step 920 .

단계(1030)에서 컴퓨터 장치(200)는 생성된 트리 구조의 노드들을 정렬할 수 있다. 이러한 단계(1030)은 단계(930)에서 트리 구조의 데이터를 정렬하는 과정과 동일할 수 있다.In operation 1030, the computer device 200 may align the nodes of the generated tree structure. This step 1030 may be the same as the process of arranging data in a tree structure in step 930 .

단계(1040)에서 컴퓨터 장치(200)는 정렬된 트리 구조의 데이터와 데이터베이스에 저장된 트리 구조의 데이터를 비교할 수 있다. 이때, 컴퓨터 장치(200)는 데이터베이스에서 추출된 트리 구조의 데이터와 단계(1030)에서 정렬된 트리 구조의 데이터가 일치하는 경우, 데이터베이스에 저장된 오픈소스 소프트웨어의 식별자를 통해 단계(1010)에서 입력된 패키지 파일이 해당 오픈소스 소프트웨어를 사용하고 있음을 알 수 있다.In operation 1040, the computer device 200 may compare the sorted tree-structured data with the tree-structured data stored in the database. At this time, when the data of the tree structure extracted from the database and the data of the tree structure sorted in step 1030 match, the computer device 200 is inputted in step 1010 through the identifier of the open source software stored in the database. You can see that the package file uses the corresponding open source software.

이후, 컴퓨터 장치(200)는 검색된 오픈소스 소프트웨어의 식별자와 해당 오픈소스 소프트웨어에 매칭된 라이선스 정보를 제공할 수 있다. 이 경우, 관리자는 검색의 대상이 되는 패키지 파일이 어떠한 오픈소스 소프트웨어를 사용하고 있으며, 어떠한 라이선스가 적용되고 있는가를 파악할 수 있게 된다.Thereafter, the computer device 200 may provide an identifier of the searched open source software and license information matched to the corresponding open source software. In this case, the administrator can determine which open source software the package file to be searched uses and which license is applied.

만약 패키지 파일의 문자열에 대한 난독화가 적용된 경우에는 클래스 경로명, 클래스명, 메소드명 등이 변경될 수 있다. 그러나, 본 실시예에서는 소스코드의 내용을 비교하는 것이 아니라 디렉토리와 디렉토리에 저장된 자바 코드 파일과 같은 패키지 파일의 구조에 기반하여 오픈소스 소프트웨어의 사용 여부를 검사하기 때문에 패키지 파일에 난독화가 적용된 경우에도 사용될 수 있다.If obfuscation is applied to the string in the package file, the class path name, class name, method name, etc. may be changed. However, in this embodiment, rather than comparing the contents of the source code, since the use of open source software is checked based on the directory and the structure of the package file such as the Java code file stored in the directory, even when obfuscation is applied to the package file can be used

도 11은 본 발명의 일실시예에 있어서, 패키지 파일의 디렉토리 구조의 예를 도시한 도면이고, 도 12는 본 발명의 일실시예에 있어서, 디렉토리 구조에 대응하는 트리 구조의 예를 도시한 도면이다.11 is a diagram showing an example of a directory structure of a package file according to an embodiment of the present invention, and FIG. 12 is a diagram showing an example of a tree structure corresponding to the directory structure according to an embodiment of the present invention to be.

우선, 도 11은 패키지 파일의 디렉토리 구조의 예로서, 9 개의 디렉토리와 8개의 자바 코드 파일을 나타내고 있다. 이때, 도 12는 디렉토리를 원 모양의 브랜치 노드로 표현하고 있으며, 자바 코드 파일을 사각형 모양의 리프 노드로 표현하고 있다. 이때, 원 안의 첫 번째 숫자는 자식노드의 수인 차수를, 두 번째 숫자는 하위의 모든 노드들의 수인 차수합을 각각 의미할 수 있다. 예를 들어, 도 11의 첫 번째 디렉토리 'com'은 도 12에서 차수 1과 차수합 16을 갖는 루트 노드로서 표현되어 있다. 도 11의 두 번째 디렉토리 'sample'은 도 12에서 차수 1과 차수합 15를 갖는 브랜치 노드로서 표현되어 있다. 또한, 도 11의 첫 번째 자바 코드 파일인 'Internet.java'는 도 12에서 루트 노드의 깊이를 0이라 할 때, 깊이 5의 사각형 모양의 첫 번째 리프 노드로 표현되어 있다.First, FIG. 11 shows nine directories and eight Java code files as an example of a directory structure of a package file. In this case, in FIG. 12 , the directory is expressed as a circle-shaped branch node, and the Java code file is expressed as a square-shaped leaf node. In this case, the first number in the circle may mean a degree that is the number of child nodes, and the second number may mean the sum of degrees that is the number of all nodes below it. For example, the first directory 'com' of FIG. 11 is expressed as a root node having order 1 and order sum 16 in FIG. 12 . The second directory 'sample' of FIG. 11 is expressed as a branch node having order 1 and order sum 15 in FIG. 12 . In addition, when the depth of the root node is 0 in FIG. 12 , the first Java code file 'Internet.java' of FIG. 11 is expressed as a first leaf node having a depth of 5 and a rectangular shape.

이처럼 컴퓨터 장치(200)는 도 11의 패키지 파일의 디렉토리 구조를 왼쪽에서부터 오른쪽으로, 그리고 위에서부터 아래로 순회하면서 트리 구조의 데이터를 생성할 수 있다. 이미 설명한 바와 같이 브랜치 노드는 디렉토리를 의미할 수 있으며, 하위 노드(자식 노드)로서 브랜치 노드 또는 리프 노드를 가질 수 있다. 각 노드는 차수와 차수합의 정보를 가질 수 있다. 또한, 리프 노드는 자바 코드 파일을 의미할 수 있으며 하위 노드를 가질 수 없다. 클래스에 대한 정보를 포함할 수 있고, 포함된 클래스에 대한 정보로는 멤버 변수의 개수, 멤버 함수의 개수, 각 멤버 함수의 시그니처, 메소드 리턴타입, 인자의 개수 및 각 인자의 타입 중 대응하는 정보를 포함할 수 있다. 예를 들어, 코드 'public static void main(String[] args)에서 리턴 타입은 'void'이고, 인자 개수는 2 이며, 인자 타입은 'String[]'과 'args'임을 알 수 있다.As such, the computer device 200 may generate tree-structured data while traversing the directory structure of the package file of FIG. 11 from left to right and from top to bottom. As already described, a branch node may mean a directory, and may have a branch node or a leaf node as a sub-node (child node). Each node may have degree and order sum information. Also, a leaf node can mean a Java code file and cannot have child nodes. Information on the class may be included, and information on the included class includes the number of member variables, the number of member functions, the signature of each member function, the method return type, the number of arguments, and corresponding information among the types of each argument. may include. For example, in the code 'public static void main(String[] args), the return type is 'void', the number of arguments is 2, and the argument types are 'String[]' and 'args'.

이미 설명한 바와 같이 트리 구조의 정렬은 추후 다른 트리 구조와의 일치 여부를 비교하기 위해 수행될 수 있다. 정렬의 기준은 브랜치 노드가 리프 노드보다 높은 우선순위를 가질 수 있으며, 동일한 부모를 가진 브랜치 노드들은 차수를 이용하여 내림차순 또는 오름차순으로 정렬될 수 있다. 차수를 이용하여 정렬된 브랜치 노드들 중 동일한 차수를 가진 브랜치 노드들은 차수합을 이용하여 내림차순 또는 오름차순으로 정렬될 수 있다. 동일한 부모를 가진 리프 노드들은 메소드의 개수(멤버 함수의 개수)를 기준으로 하는 내림차순 또는 오름차순으로 정렬될 수 있다. 정렬 방식은 오픈소스 소프트웨어의 디렉토리 구조에 대해 생성된 트리 구조와 패키지 파일의 디렉토리 구조에 대해 생성된 트리 구조에 대해 동일한 방식으로 적용될 수 있는 정렬 방식이라면 앞서 설명한 실시예로 제한되지 않는다.As already described, the alignment of the tree structure may be performed in order to compare whether the tree structure coincides with another tree structure later. As a criterion for sorting, a branch node may have a higher priority than a leaf node, and branch nodes having the same parent may be sorted in descending or ascending order using a degree. Branch nodes having the same degree among branch nodes sorted using the degree may be sorted in descending order or ascending order using the degree sum. Leaf nodes with the same parent can be sorted in descending or ascending order based on the number of methods (number of member functions). The sorting method is not limited to the above-described embodiment as long as the sorting method can be applied in the same way to the tree structure generated for the directory structure of the open source software and the tree structure generated for the directory structure of the package file.

도 13은 본 발명의 일실시예에 있어서, 정렬된 트리 구조의 예를 도시한 도면이다. 도 12와 도 13을 비교해보면, 제1 브랜치 노드(1210)의 차수가 1이고, 제2 브랜치 노드(1220)의 차수가 2인 관계로 제2 브랜치 노드(1220)가 제1 브랜치 노드(1210)의 왼쪽에 배치되도록 정렬된 예를 나타내고 있다. 이러한 제1 브랜치 노드(1210)와 제2 브랜치 노드(1220)간의 배치 변경에 따라 앞서 설명한 정렬 방식에 따라 트리 구조의 모든 노드들이 배치되었음을 알 수 있다.13 is a diagram illustrating an example of an ordered tree structure according to an embodiment of the present invention. Comparing FIGS. 12 and 13 , the second branch node 1220 is the first branch node 1210 because the degree of the first branch node 1210 is 1 and the degree of the second branch node 1220 is 2 . ) shows an example arranged to be placed on the left. According to the arrangement change between the first branch node 1210 and the second branch node 1220 , it can be seen that all the nodes of the tree structure are arranged according to the above-described arrangement method.

또한, 컴퓨터 장치(200)는 자바 객체 직렬화를 이용하여 트리 구조의 데이터를 직렬화한 후 데이터베이스에 저장할 수 있다. 보다 구체적으로 컴퓨터 장치(200)는 디렉토리를 순회하며 각 디렉토리를 자바 객체로 만들고, 차수에 따라 내림차순 또는 오름차순 정렬 한 객체들을 저장할 수 있다. 트리구조의 비선형 자료구조를 관계형 데이터베이스에 저장하기 위해서는 각 노드별로 부모와 자식관계를 따져본 뒤 데이터베이스에 저장해야 하기에 구현이 복잡해 진다. 따라서, 이를 쉽게 저장하기 위해, 컴퓨터 장치(200)는 루트노드를 기준으로 자바 객체 직렬화(Serialize)를 사용하여 트리 구조의 데이터를 직렬화한 후 데이터베이스에 저장할 수 있다. 이때 저장에 필요한 객체들은 'java.io.Serializable'을 구현(implements)해야 하고, 멤버 변수로 저장에 필요한 정보를 넣어야 한다. 브랜치 노드의 객체인 경우 차수, 차수합, 부모노드 정보, 자식노드 정보가 멤버 변수로 정의될 수 있고, 리프 노드의 경우 멤버 변수의 개수, 멤버 함수의 개수, 각 멤버 함수의 시그니처(메소드 리턴 타입, 인자의 개수, 각 인자의 타입), 부모 노드의 정보가 멤버 변수로 정의될 수 있다.Also, the computer device 200 may serialize data of a tree structure using Java object serialization and then store the data in a database. More specifically, the computer device 200 traverses the directory, makes each directory a Java object, and stores objects arranged in descending or ascending order according to the order. In order to store a tree-structured nonlinear data structure in a relational database, the implementation becomes complicated because the parent and child relationship of each node must be checked and then stored in the database. Accordingly, in order to easily store this, the computer device 200 may serialize the tree-structured data using Java object serialization based on the root node and then store it in the database. At this time, the objects required for storage must implement 'java.io.Serializable', and information necessary for storage must be entered as a member variable. In the case of a branch node object, the degree, sum of degrees, parent node information, and child node information can be defined as member variables. In the case of a leaf node, the number of member variables, the number of member functions, and the signature of each member function (method return type) , number of arguments, type of each argument), and parent node information can be defined as member variables.

아래 표 1은 부모와 자식의 관계를 정의한 정보의 예를, 표 2는 브랜치 노드를 정의한 정보의 예를, 표 3은 리프 노드를 정의한 정보의 예를 각각 나타내고 있다.Table 1 below shows an example of information defining the relationship between parent and child, Table 2 shows an example of information defining a branch node, and Table 3 shows an example of information defining a leaf node.

public class Node<T> implements Serializable { private T data; private Node<T> parent; private List<Node<T>> children;public class Node<T> implements Serializable { private T data; private Node<T> parent; private List<Node<T>> children;

public class Branch { private int degree; //차수 private int degreeSum; //차수합public class Branch { private int degree; //degree private int degreeSum; // order sum

public class Leaf { private int cntField; //멤버변수의 개수 private int cntMethod; //메소드의 개수 private List<MethodSignature> methodList; //각 멤버 함수의 시그니처public class Leaf { private int cntField; //Number of member variables private int cntMethod; //Number of methods private List<MethodSignature> methodList; // Signature of each member function

도 14는 본 발명의 일실시예에 있어서, 직렬화되어 저장된 데이터의 예를 도시한 도면이다. 자바 직렬화 과정은 클래스의 형태로 만든 메모리의 힙(Heap) 영역에 객체를 쓰기(write)위해 연속적인 데이터로 변형하는 과정일 수 있으며, 예를 들어, 트리 구조의 데이터를 연속적인 자바 객체의 데이터로 변형하는 과정일 수 있다. 직렬화되어 저장된 데이터는 도 14에 나타난 바와 같이 사람이 알아보기 어려운 형태로 저장될 수 있다.14 is a diagram illustrating an example of serialized and stored data according to an embodiment of the present invention. The Java serialization process may be a process of transforming data into continuous data to write an object to the heap area of memory created in the form of a class. It may be a process of transformation into The serialized and stored data may be stored in a form that is difficult for a human to recognize as shown in FIG. 14 .

검사의 대상이 되는 패키지 파일에 오픈소스 소프트웨어가 사용되었는지 여부를 결정하기 위해, 컴퓨터 장치(200)는 우선, 패키지 파일의 루트 디렉토리부터 하위 디렉토리를 순회하여 트리 구조의 데이터를 생성 및 정렬할 수 있다. 또한, 컴퓨터 장치(200)는 직렬화되어 데이터베이스에 저장된 데이터를 역직렬화(deserialize)하여 메모리(210)로 읽어올 수 있다. 역직렬화 과정은 직렬화 과정의 반대일 수 있다. 역직렬화 과정을 완료하면 직렬화하기 전의 형태로 객체가 생성되어 메모리의 힙(Heap) 영역에 로드될 수 있다. 컴퓨터 장치(200)는 이 객체를 사용하여 두 개의 트리 구조를 비교할 수 있다.In order to determine whether open source software is used for the package file to be inspected, the computer device 200 may first traverse the sub-directories from the root directory of the package file to generate and sort data in a tree structure. . Also, the computer device 200 may deserialize serialized data stored in the database and read it into the memory 210 . The deserialization process may be the opposite of the serialization process. When the deserialization process is completed, an object is created in the form before serialization and can be loaded into the heap area of memory. The computer device 200 may use this object to compare two tree structures.

도 15 및 도 16은 본 발명의 일실시예에 있어서, 트리 구조의 비교 예를 도시한 도면들이다. 도 15의 점선박스(1510)는 오픈소스 소프트웨어의 디렉토리 구조에 대응하는 트리 구조(이하, '오픈소스 트리 구조'라 함)의 예를 나타내고 있다. 또한, 도 16의 제1 점선박스(1610)는 패키지 파일의 디렉토리 구조에 대응하는 트리 구조(이하, '패키지 파일 트리 구조'라 함)의 예를 나타내고 있다. 이때, 도 16의 제2 점선박스(1620)는 도 15의 점선박스(1510)가 나타내는 트리 구조와 일치하는 서브트리 구조를 나타내고 있다.15 and 16 are diagrams illustrating a comparative example of a tree structure according to an embodiment of the present invention. A dotted line box 1510 of FIG. 15 shows an example of a tree structure (hereinafter, referred to as an 'open source tree structure') corresponding to the directory structure of the open source software. In addition, the first dotted line box 1610 of FIG. 16 shows an example of a tree structure (hereinafter, referred to as a 'package file tree structure') corresponding to the directory structure of the package file. In this case, the second dotted line box 1620 of FIG. 16 indicates a subtree structure that matches the tree structure indicated by the dotted line box 1510 of FIG. 15 .

예를 들어, 컴퓨터 장치(200)는 패키지 파일 트리 구조의 노드들을 순회하며 오픈소스 트리 구조의 루트 노드의 정보(차수, 차수합)와 일치하는 노드를 찾을 수 있다. 일치하는 노드를 찾는 경우, 찾은 노드를 포함하는 서브트리와 오픈소스 트리 구조를 순회하면서 비교할 수 있다. 브랜치 노드의 비교는 노드의 정보(차수, 차수합)의 일치 여부를 비교할 수 있으며, 리프 노드의 비교는 멤버 변수의 개수, 멤버 함수의 개수, 각 멤버 함수의 시그니처를 비교하여 일치 여부를 판단할 수 있다. 단, 함수의 시그니처 비교에서 인자의 타입은 자바 프리미티브(primitive) 타입만 비교하고 넌-프리미티브(non-primitive) 타입의 경우 난독화될 가능성이 있기 때문에 비교대상에 포함하지 않을 수 있다.For example, the computer device 200 may traverse the nodes of the package file tree structure and find a node that matches information (degree, sum of degrees) of the root node of the open source tree structure. When a matching node is found, the subtree including the found node and the open source tree structure can be traversed and compared. Branch node comparison can compare whether node information (degree, sum of degrees) matches, and leaf node comparison can determine whether or not the match is made by comparing the number of member variables, number of member functions, and signatures of each member function. can However, in the function signature comparison, only Java primitive types are compared, and non-primitive types may not be included in the comparison target because there is a possibility of obfuscation.

앞서 설명한 두 가지 실시예들(도 3 내지 8을 통해 설명한 패턴을 이용하는 실시예 및 도 9 내지 도 16을 통해 설명한 트리 구조를 이용하는 실시예)은 각각 개별적으로 이용될 수도 있고, 결합되어 사용될 수도 있다. 예를 들어, 검사의 대상이 되는 패키지 파일에 난독화가 적용되지 않은 경우에는 패턴을 이용하는 실시예를 적용하고, 패키지 파일에 난독화가 적용된 경우에는 트리 구조를 이용하는 실시예를 적용할 수 있다.The two embodiments described above (the embodiment using the pattern described with reference to FIGS. 3 to 8 and the embodiment using the tree structure described with reference to FIGS. 9 to 16) may be used individually or in combination. . For example, when obfuscation is not applied to a package file to be inspected, an embodiment using a pattern may be applied, and when obfuscation is applied to a package file, an embodiment using a tree structure may be applied.

이상에서와 같이, 본 발명의 실시예들에 따르면, 안드로이드 환경에서의 smali 코드와 같은 기설정된 코드 형태를 활용하여 개발자의 소스코드 없이 빌드된 상태의 바이너리 코드를 통해서도 오픈소스 소프트웨어의 라이선스를 검증할 수 있다. 또한, 패키지 파일의 구조에 따른 형태 비교를 통해 문자열이 난독화된 코드에 대해서도 오픈소스 소프트웨어의 라이선스를 검증할 수 있다.As described above, according to the embodiments of the present invention, it is possible to verify the license of the open source software even through the binary code in the built state without the developer's source code by using a preset code form such as smali code in the Android environment. can In addition, the license of the open source software can be verified even for the code whose string is obfuscated by comparing the shape according to the structure of the package file.

이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 소프트웨어 구성요소 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The system or apparatus described above may be implemented as a hardware component, a software component, or a combination of a hardware component and a software component. For example, devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA). , a programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions, may be implemented using one or more general purpose or special purpose computers. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For convenience of understanding, although one processing device is sometimes described as being used, one of ordinary skill in the art will recognize that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that may include For example, the processing device may include a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록매체에 저장될 수 있다.The software may comprise a computer program, code, instructions, or a combination of one or more thereof, which configures a processing device to operate as desired or is independently or collectively processed You can command the device. The software and/or data may be any kind of machine, component, physical device, virtual equipment, computer storage medium or device, to be interpreted by or to provide instructions or data to the processing device. may be embodied in The software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored in one or more computer-readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 통상의 기술자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 이러한 기록매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있으며, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be specially designed and configured for the embodiment, or may be known and available to those skilled in the art of computer software. Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floppy disks. - includes magneto-optical media, and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Such a recording medium may be various recording means or storage means in the form of a single or a combination of several hardware, and is not limited to a medium directly connected to any computer system, and may be distributed over a network. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.

발명의 실시를 위한 형태Modes for carrying out the invention

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with reference to the limited embodiments and drawings, various modifications and variations are possible by those skilled in the art from the above description. For example, the described techniques are performed in a different order than the described method, and/or the described components of the system, structure, apparatus, circuit, etc. are combined or combined in a different form than the described method, or other components Or substituted or substituted by equivalents may achieve an appropriate result.

그러므로, 다른 구현들, 다른 실시예들 및 청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

Claims (18)

라이선스 검증 방법에 있어서,
검사의 대상이 되는 패키지 파일을 입력받는 단계;
상기 패키지 파일의 실행파일을 추출하는 단계;
상기 추출한 실행파일을 기설정된 코드 형태로 변환하는 단계;
상기 기설정된 코드 형태로 변환된 실행파일에서 제1 메소드 호출 정보를 추출하는 단계; 및
상기 추출된 제1 메소드 호출 정보를 데이터베이스에 저장된 패턴과 비교하는 단계
를 포함하고,
상기 데이터베이스에는 오픈소스 소프트웨어에서 추출된 제2 메소드 호출 정보를 이용하여 생성된 기설정된 코드 형태의 상기 패턴이 해당 오픈소스 소프트웨어의 식별자와 연계하여 저장되는 것
을 특징으로 하는 라이선스 검증 방법.
In the license verification method,
receiving a package file to be inspected;
extracting an executable file of the package file;
converting the extracted executable file into a preset code form;
extracting first method call information from the executable file converted into the preset code form; and
Comparing the extracted first method call information with a pattern stored in a database
including,
In the database, the pattern in the form of a preset code generated using the second method call information extracted from the open source software is stored in association with the identifier of the corresponding open source software.
License verification method, characterized in that.
제1항에 있어서,
상기 제1 메소드 호출 정보 및 상기 제2 메소드 호출 정보는 특정 메소드를 호출하기 위해 요구되는 정보로서, 자바(Java) 코드에서의 클래스 경로명, 클래스명 및 메소드명을 포함하는 것을 특징으로 하는 라이선스 검증 방법.
According to claim 1,
The first method call information and the second method call information are information required to call a specific method, and include a class path name, a class name, and a method name in Java code. .
제1항에 있어서,
상기 기설정된 코드 형태는 안드로이드 어플리케이션을 위한 패키지 파일인 APK(Android application package) 파일에서 사용되는 smali 코드 형태를 포함하고,
상기 패턴은 상기 smali 코드 형태에서 메소드를 추출하기 위해 요구되는 상기 제2 메소드 호출 정보를 포함하는 형태로 생성되는 것을 특징으로 하는 라이선스 검증 방법.
According to claim 1,
The preset code form includes a smali code form used in an APK (Android application package) file that is a package file for an Android application,
The pattern is generated in a form including the second method call information required to extract a method from the smali code form.
삭제delete 제1항에 있어서,
상기 비교하는 단계는,
상기 제1 메소드 호출 정보를 포함하는 패턴을 상기 데이터베이스에서 검색하는 것을 특징으로 하는 라이선스 검증 방법.
According to claim 1,
The comparing step is
License verification method, characterized in that the search for a pattern including the first method call information in the database.
제1항에 있어서,
상기 데이터베이스에 상기 제1 메소드 호출 정보를 포함하는 패턴이 존재하는 경우, 상기 존재하는 패턴과 연계하여 상기 데이터베이스에 저장된 오픈소스 소프트웨어의 식별자 및 상기 오픈소스 소프트웨어에서 사용하는 라이선스의 식별자를 제공하는 단계
를 더 포함하는 것을 특징으로 하는 라이선스 검증 방법.
According to claim 1,
When the pattern including the first method call information exists in the database, providing an identifier of an open source software stored in the database and an identifier of a license used in the open source software in association with the existing pattern
License verification method, characterized in that it further comprises.
제1항에 있어서,
하나의 오픈소스 소프트웨어에 대해 둘 이상의 패턴이 생성되고,
상기 비교하는 단계는,
상기 기설정된 코드 형태로 변환된 실행파일에서 추출되는 둘 이상의 제1 메소드 호출 정보를 상기 둘 이상의 패턴과 각각 비교하는 것
을 특징으로 하는 라이선스 검증 방법.
According to claim 1,
More than one pattern is created for one open source software,
The comparing step is
Comparing the two or more first method call information extracted from the executable file converted into the preset code form with the two or more patterns, respectively
License verification method, characterized in that.
라이선스 검증 방법에 있어서,
검사의 대상이 되는 패키지 파일을 입력받는 단계;
상기 입력된 패키지 파일의 디렉토리 구조에 대응하는 제1 트리 구조의 데이터를 생성하는 단계; 및
상기 제1 트리 구조의 데이터와 상기 데이터베이스에 저장된 제2 트리 구조의 데이터를 비교하는 단계
를 포함하고,
상기 데이터베이스에는 오픈소스 소프트웨어의 디렉토리 구조에 대응하는 상기 제2 트리 구조의 데이터가 해당 오픈소스 소프트웨어의 식별자와 연계하여 저장되는 것
을 특징으로 하는 라이선스 검증 방법.
In the license verification method,
receiving a package file to be inspected;
generating data of a first tree structure corresponding to the directory structure of the input package file; and
Comparing the data of the first tree structure with the data of the second tree structure stored in the database
including,
In the database, the data of the second tree structure corresponding to the directory structure of the open source software is stored in association with the identifier of the open source software.
License verification method, characterized in that.
제8항에 있어서,
상기 제2 트리 구조의 데이터는 상기 디렉토리 구조의 디렉토리를 브랜치 노드(branch node)로서 포함하고, 상기 디렉토리 구조의 자바 코드 파일을 리프 노드(leaf node)로서 포함하는 것을 특징으로 하는 라이선스 검증 방법.
9. The method of claim 8,
The data of the second tree structure includes a directory of the directory structure as a branch node, and a Java code file of the directory structure as a leaf node.
제9항에 있어서,
상기 브랜치 노드는 자식노드의 수에 대응하는 차수 및 하위 모든 노드의 수에 대응하는 차수합을 포함하고,
상기 리프 노드는 대응하는 자바 코드 파일의 멤버 변수의 개수, 멤버 함수의 개수 및 각 멤버 함수의 시그니처를 포함하는 것을 특징으로 하는 라이선스 검증 방법.
10. The method of claim 9,
The branch node includes a degree corresponding to the number of child nodes and a degree sum corresponding to the number of all lower nodes,
wherein the leaf node includes the number of member variables, the number of member functions, and the signature of each member function of a corresponding Java code file.
제8항에 있어서,
상기 제2 트리 구조의 노드들이 정렬되는 것을 특징으로 하는 라이선스 검증 방법.
9. The method of claim 8,
The license verification method, characterized in that the nodes of the second tree structure are arranged.
제8항에 있어서,
상기 제2 트리 구조의 노드들은 상기 제2 트리 구조가 포함하는 동일한 부모를 갖는 브랜치 노드들이 상기 브랜치 노드들 각각이 포함하는 차수 및 차수합에 기초하여 정렬되고, 상기 제2 트리 구조가 포함하는 동일한 부모를 갖는 리프 노드들이 상기 리프 노드들 각각에 대응하는 자바 코드 파일의 멤버 함수의 개수에 기초하여 정렬되는 것을 특징으로 하는 라이선스 검증 방법.
9. The method of claim 8,
The nodes of the second tree structure are arranged based on the degree and sum of degrees included in each of the branch nodes of branch nodes having the same parent included in the second tree structure, and the same branch nodes included in the second tree structure are identical. A method of verifying a license, characterized in that leaf nodes having a parent are sorted based on the number of member functions of a Java code file corresponding to each of the leaf nodes.
제8항에 있어서,
상기 데이터베이스에는 상기 제2 트리 구조의 데이터가 자바 객체 직렬화를 이용하여 직렬화되어 저장되는 것을 특징으로 하는 라이선스 검증 방법.
9. The method of claim 8,
The license verification method, characterized in that the data of the second tree structure is serialized and stored in the database using Java object serialization.
제13항에 있어서,
상기 자바 객체 직렬화는 상기 제2 트리 구조의 노드들 각각을 자바 객체로 정의하여 상기 제2 트리 구조의 데이터를 연속적인 자바 객체의 데이터로 변형하는 것을 특징으로 하는 라이선스 검증 방법.
14. The method of claim 13,
In the Java object serialization, each of the nodes of the second tree structure is defined as a Java object, and the data of the second tree structure is transformed into data of a continuous Java object.
삭제delete 제8항에 있어서,
상기 비교하는 단계는,
상기 제2 트리 구조의 데이터를 상기 제1 트리 구조의 서브트리 구조의 데이터로서 포함하는지 여부를 확인하는 것을 특징으로 하는 라이선스 검증 방법.
9. The method of claim 8,
The comparing step is
The license verification method, characterized in that it is checked whether the data of the second tree structure is included as data of the subtree structure of the first tree structure.
제16항에 있어서,
상기 비교하는 단계는,
상기 제1 트리 구조 및 상기 제2 트리 구조의 브랜치 노드가 포함하는 차수 및 차수합간의 비교 및 상기 제1 트리 구조 및 상기 제2 트리 구조의 리프 노드가 포함하는 멤버 변수의 개수, 멤버 함수의 개수 및 각 멤버 함수의 시그니처간의 비교에 기초하여 상기 제1 트리 구조의 데이터와 상기 데이터베이스에 저장된 상기 제2 트리 구조의 데이터를 비교하는 것을 특징으로 하는 라이선스 검증 방법.
17. The method of claim 16,
The comparing step is
Comparison between degrees and sums of degrees included in branch nodes of the first tree structure and the second tree structure, the number of member variables included in the leaf nodes of the first tree structure and the second tree structure, and the number of member functions and comparing the data of the first tree structure with the data of the second tree structure stored in the database based on the comparison between the signatures of each member function.
제1항 내지 제3항, 제5항 내지 제14항, 제16항 또는 제17항 중 어느 한 항의 방법을 컴퓨터에 실행시키기 위한 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터에서 판독 가능한 기록매체.A computer-readable recording medium in which a program for executing the method of any one of claims 1 to 3, 5 to 14, 16 or 17 in a computer is recorded.
KR1020207015830A 2018-01-04 2018-01-04 Methods and systems for validating licenses for open source software KR102462541B1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/KR2018/000162 WO2019135425A1 (en) 2018-01-04 2018-01-04 Open source software license verification method and system

Publications (2)

Publication Number Publication Date
KR20200096766A KR20200096766A (en) 2020-08-13
KR102462541B1 true KR102462541B1 (en) 2022-11-03

Family

ID=67143677

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020207015830A KR102462541B1 (en) 2018-01-04 2018-01-04 Methods and systems for validating licenses for open source software

Country Status (3)

Country Link
JP (1) JP7119096B2 (en)
KR (1) KR102462541B1 (en)
WO (1) WO2019135425A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400672A (en) * 2020-03-18 2020-07-10 中国信息安全测评中心 Open source software monitoring method and device
KR102286451B1 (en) 2020-11-18 2021-08-04 숭실대학교산학협력단 Method for recognizing obfuscated identifiers based on natural language processing, recording medium and device for performing the method
KR102443938B1 (en) 2020-12-24 2022-09-16 숭실대학교 산학협력단 Method for identifying intelligent core code based on code sequence, recording medium and device for performing the method
KR20230147908A (en) * 2022-04-15 2023-10-24 삼성전자주식회사 Electronic apparatus and method for open source license verification

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101472321B1 (en) * 2013-06-11 2014-12-12 고려대학교 산학협력단 Malignant code detect method and system for application in the mobile

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100750834B1 (en) * 2005-10-06 2007-08-22 (주)아이피엠에스 A method of data call stack tracing in data monitoring of JAVA byte code and a device for storing the method in compter program type
US8108315B2 (en) * 2006-06-19 2012-01-31 Hewlett-Packard Development Company, L.P. Discovering software code subject to licenses
JP5690689B2 (en) * 2011-09-16 2015-03-25 Kddi株式会社 Application analysis apparatus and program
KR101214893B1 (en) * 2011-12-16 2013-01-09 주식회사 안랩 Apparatus and method for detecting similarity amongf applications
JP2013152559A (en) * 2012-01-24 2013-08-08 Toshiba Corp Program comparison analysis device and program comparison analysis method
KR101999656B1 (en) * 2012-06-20 2019-07-12 삼성전자 주식회사 License verification method, apparatus and computer readable medium thereof
KR20140050323A (en) * 2012-10-19 2014-04-29 삼성전자주식회사 Method and apparatus for license verification of binary file
CN103473346B (en) * 2013-09-24 2017-01-04 北京大学 A kind of Android based on application programming interface beats again bag applying detection method
KR101780233B1 (en) * 2016-04-26 2017-09-21 고려대학교 산학협력단 Apparatus and method for deteting code cloning of software
US10296745B2 (en) * 2016-06-23 2019-05-21 International Business Machines Corporation Detecting vulnerable applications

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101472321B1 (en) * 2013-06-11 2014-12-12 고려대학교 산학협력단 Malignant code detect method and system for application in the mobile

Also Published As

Publication number Publication date
JP7119096B2 (en) 2022-08-16
KR20200096766A (en) 2020-08-13
WO2019135425A1 (en) 2019-07-11
JP2021516379A (en) 2021-07-01

Similar Documents

Publication Publication Date Title
KR102462541B1 (en) Methods and systems for validating licenses for open source software
US8863082B2 (en) Transformational context-aware data source management
US11640352B2 (en) Testing software and/or computing hardware design through test fragmentation into one or more discrete computing environments
US11062022B1 (en) Container packaging device
US20160147578A1 (en) Api validation system
CN104123493A (en) Method and device for detecting safety performance of application program
US11669439B2 (en) Computing hardware and software design testing auditability, including for critical control systems, functional safety, and autonomous vehicle component certification
KR102006245B1 (en) Method and system for identifying an open source software package based on binary files
KR20160109870A (en) System and method of fast searching of android malware
US20170192756A1 (en) Automatic classification of compilers
US20180074818A1 (en) Source code mapping through context specific key word indexes and fingerprinting
KR102006242B1 (en) Method and system for identifying an open source software package based on binary files
US20170249143A1 (en) Detecting open source components built into mobile applications
Holík et al. Predator shape analysis tool suite
KR102011725B1 (en) Whitelist construction method for analyzing malicious code, computer readable medium and device for performing the method
US11609985B1 (en) Analyzing scripts to create and enforce security policies in dynamic development pipelines
EP3147781A1 (en) Wrapper calls identification
CN110659063A (en) Software project reconstruction method and device, computer device and storage medium
US11716319B2 (en) Software deployment certification
JP6930862B2 (en) Client tampering judgment system and method
KR102117165B1 (en) Method and apparatus for testing intermediate language for binary analysis
CN104737125B (en) For the method and system for the integrality for safeguarding code generator output
Cam et al. Detect repackaged android applications by using representative graphs
Xie et al. An accurate and efficient two‐phase scheme for detecting Android cloned applications
Zhang et al. Smart Contract Code Clone Detection Based on Pre-training Techniques

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right