Source Byte Code Similarity Determination Using Feature Extraction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods struggle to calculate similarity between byte code and source code when they have different data formats, making it difficult to determine if a program was generated using specific source code, especially with fragmentary source code that lacks necessary compilation information.

Innovation Solution

A determination apparatus and method that extracts feature information from both byte code and source code, including function definitions and calling orders, and calculates similarity using algorithms like edit distance and longest common sequence, regardless of data format, to determine if a program was generated using specific source code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If source code is compiled into byte code to calculate similarity, then measurement precision is improved, but device complexity increases due to requiring same data format and compilation process

Engineering Contradiction:
Improvesimilarity calculation accuracyVSAvoidcompilation process complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary conversion process that translates source code into a standardized representation format that can be directly compared with byte code without requiring full compilation. This intermediary step bridges the gap between different data formats while maintaining measurement precision.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the parameters of comparison by extracting and comparing specific features (function definitions, variable declarations, control structures) from both source code and byte code, rather than comparing the entire data structures. This allows for accurate similarity calculation without requiring identical data formats.

Inventive Principle:
Principle #35Parameter changes

2Ease of operation

If fragmentary source code is used, then ease of operation is improved, but manufacturing precision deteriorates due to missing compilation information

Engineering Contradiction:
Improvesource code input flexibilityVSAvoidcompilation completeness
Core Design Contradiction:
Ease of operationVSManufacturing precision

Solution Approach 1:

The patent applies partial action by comparing only the essential features that are present in fragmentary source code (function definitions, variable declarations, control structures) rather than requiring complete compilation information. This allows similarity calculation to proceed with incomplete code while maintaining sufficient precision for detection purposes.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent performs preliminary extraction and normalization of code features before comparison, preparing the fragmentary source code in advance to compensate for missing information. This preliminary processing enables the system to work with incomplete code while achieving accurate similarity measurements.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If complete source code compilation is required, then measurement precision is improved, but loss of time increases due to enormous human labor

Engineering Contradiction:
Improvesimilarity calculation accuracyVSAvoidcompilation preparation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent extracts only the necessary features (function definitions, variable declarations, control structures) from source code without performing complete compilation. This extraction approach maintains measurement precision by focusing on critical code elements while eliminating time-consuming compilation steps.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent replaces the mechanical compilation process with an automated feature extraction and comparison system that uses algorithms to analyze code structure and semantics directly, eliminating the need for human labor and lengthy compilation processes while maintaining accuracy.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentEP3540596B1Determination device, determination method, and determination program
Publication Date: 2021.05.19 NIPPON TELEGRAPH & TELEPHONE CORP
  • EP3540596B1 patent drawingFigure 1
  • EP3540596B1 patent drawingFigure 2(a)~2(b)
  • EP3540596B1 patent drawingFigure 3(a)~3(b)

AI summary

A determination apparatus (10) includes: a feature information extraction unit (151) configured to extract, as feature information, function definition information as information for defining a function and function calling order information in which function names to be executed in the function are written in execution order from each of an input source code and a byte code of a program; and a similarity calculation unit (154) configured to calculate a similarity between a function in the source code and a function in the byte code by using the feature information extracted by the feature information extraction unit (151).