KR20220077894A - 스트립트 바이너리 함수 심볼 예측 방법 및 그 장치 - Google Patents
스트립트 바이너리 함수 심볼 예측 방법 및 그 장치 Download PDFInfo
- Publication number
- KR20220077894A KR20220077894A KR1020210170615A KR20210170615A KR20220077894A KR 20220077894 A KR20220077894 A KR 20220077894A KR 1020210170615 A KR1020210170615 A KR 1020210170615A KR 20210170615 A KR20210170615 A KR 20210170615A KR 20220077894 A KR20220077894 A KR 20220077894A
- Authority
- KR
- South Korea
- Prior art keywords
- function
- vector
- neural network
- sentence
- code
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000006870 function Effects 0.000 claims abstract description 164
- 239000013598 vector Substances 0.000 claims abstract description 84
- 238000013528 artificial neural network Methods 0.000 claims abstract description 55
- 239000012634 fragment Substances 0.000 claims abstract description 34
- 238000012545 processing Methods 0.000 claims description 27
- 239000011159 matrix material Substances 0.000 claims description 17
- 230000000306 recurrent effect Effects 0.000 claims description 8
- 230000006403 short-term memory Effects 0.000 claims description 5
- 239000000284 extract Substances 0.000 claims 1
- 230000003014 reinforcing effect Effects 0.000 claims 1
- 238000005516 engineering process Methods 0.000 description 5
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 239000011800 void material Substances 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000015654 memory Effects 0.000 description 2
- 238000003062 neural network model Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008451 emotion Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
- G06F21/562—Static detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/53—Decompilation; Disassembly
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computer Hardware Design (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- Virology (AREA)
- Machine Translation (AREA)
Abstract
Description
도 2는 본 발명의 일 실시예에 따른, 함수 심볼 예측 장치의 구성도이다.
도 3은 본 발명의 일 실시예에 따른, 제1 소스코드에서 제1 코드조각 및 제1 문장을 추출하는 과정을 나타내는 예시이다.
도 4은 본 발명의 일 실시예에 따른, 제2 소스코드에서 제2 코드조각 및 제2 문장을 추출하는 과정을 나타내는 예시이다.
도 5는 본 발명의 일 실시예에 따른, 워드 임베딩 중에서 Word2Vec의 알고리즘 모델이다.
도 6은 본 발명의 일 실시예에 따른, 신경망의 일종인 GRU(Gated Recurrent Unit)의 알고리즘 모델이다.
도 7은 본 발명의 일 실시예에 따른, 스트립트 바이너리의 디컴파일된 함수를 이용한 함수 심볼 예측을 설명하기 위한 예시이다.
도 8은 본 발명의 일 실시예에 따른, 함수 심볼 예측 방법의 순서도이다.
소스코드 데이터베이스 200
코드조각 획득부 300
임베딩 처리부 400
신경망 처리부 500
함수 심볼 획득부 600
Claims (12)
- 타겟함수에 관한 제1 소스코드에서 함수호출 및 함수호출 인자를 추출하여 제1 코드조각을 획득하는 단계;
상기 제1 소스코스보다 업데이트된 제2 소스코드에서 함수호출 및 함수호출 인자를 추출하여 제2 코드조각을 획득하는 단계;
상기 제1 코드조각 및 상기 제2 코드조각을 각각 제1 문장 및 제2 문장으로 변환하는 단계;
상기 제1 문장 및 상기 제2 문장을 바탕으로 워드 임베딩(word embedding) 모델을 이용하여 각각 제1 벡터 및 제2 벡터를 획득하는 단계;
상기 제1 벡터 및 상기 제2 벡터를 순차적으로 입력하여 신경망을 학습시키는 단계;
스트립트 바이너리(strriped binary)에서 제3 코드조각을 획득하는 단계;
상기 제3 코드조각을 제3 문장으로 변환하는 단계;
상기 제3 문장을 바탕으로 상기 워드 임베딩 모델을 이용하여 제3 벡터를 획득하는 단계; 및
상기 제3 벡터를 상기 학습된 신경망에 입력하여 출력된 결과를 상기 제3 코드조각에 해당하는 함수 심볼로 획득하는 단계; 를 포함하되,
상기 제1 벡터 및 상기 제2 벡터는 상기 타겟함수의 심볼을 가리키는 벡터인,
함수 심볼 예측 방법. - 제1항에 있어서,
상기 워드 임베딩(word embedding) 모델은,
워드투벡터(word2vec), GloVe 및 FastText 중에서 어느 하나인,
함수 심볼 예측 방법. - 제1항에 있어서,
상기 신경망은,
RNN(Recurrent Neural Network), LSTM (Long Short Term Memory), GRU(Gated Recurrent Unit) 중에서 어느 하나인,
함수 심볼 예측 방법. - 제1항에 있어서,
상기 제1 벡터 및 상기 제2 벡터를 획득하는 단계는,
상기 제1 문장의 각 단어를 상기 워드 임베딩 모델에 입력하여 상기 워드 임베딩 모델을 학습시키는 단계;
상기 학습된 워드 임베딩 모델의 임베딩 매트릭스(matrix)를 제1 벡터로 획득하는 단계;
상기 제2 문장의 각 단어를 상기 워드 임베딩 모델에 입력하여 상기 워드 임베딩 모델을 학습시키는 단계; 및
상기 학습된 워드 임베딩 모델의 임베딩 매트릭스(matrix)를 제2 벡터로 획득하는 단계;를 포함하는,
함수 심볼 예측 방법. - 제1항에 있어서,
상기 신경망을 학습시키는 단계는,
상기 신경망의 입력으로 상기 제1 벡터 및 상기 제2 벡터를 입력하였을 때 상기 타겟함수의 심볼이 출력되도록 상기 신경망을 학습시키는 단계;를 포함하는,
함수 심볼 예측 방법. - 제1항에 있어서,
상기 신경망을 학습시키는 단계는,
상기 제1 벡터가 임베딩 매트릭스를 포함하는 경우, 상기 임베딩 매트릭스에 포함된 각 행을 상기 신경망에 순차적으로 입력함으로써 상기 신경망을 학습시키는 단계; 및
상기 제2 벡터가 임베딩 매트릭스를 포함하는 경우, 상기 임베딩 매트릭스에 포함된 각 행을 상기 신경망에 순차적으로 입력함으로써 상기 신경망의 학습을 강화시키는 단계;를 포함하는,
함수 심볼 예측 방법. - 제1항에 있어서,
상기 제3 코드조각을 획득하는 단계는,
상기 스트립트 바이너리를 디컴파일(decompile) 과정을 통해 제3 소스코드를 획득하는 단계; 및
상기 제3 소스코드에서 함수호출 및 함수호출 인자를 추출하여 제3 코드조각을 획득하는 단계;를 포함하는,
함수 심볼 예측 방법. - 타겟 함수가 포함된 하나 이상의 소스코드가 저장된 소스코드 데이터베이스;
상기 소스코드 데이터베이스부에 포함된 소스코드에서 함수호출 및 함수호출 인자를 추출하여 샘플 코드조각을 획득하는 코드조각 획득부;
상기 획득된 샘플 코드조각을 바탕으로 샘플 문장을 생성하며, 상기 샘플 문장을 워드 임베딩 모델에 입력하여 상기 워드 임베딩 모델을 학습시키고, 상기 학습된 워드 임베딩 모델에서 상기 샘플 문장에 관한 벡터를 획득하는 임베딩 처리부;
상기 임베딩 처리부에서 획득된 벡터를 입력하면 상기 타겟 함수의 심볼을 출력하도록 신경망을 학습시키는 신경망 처리부; 및
스트립트 바이너리에서 심볼이 제거된 함수의 제3 코드조각을 획득하고, 상기 코드조각을 바탕으로 제3 문장을 생성하며, 상기 제3 문장과 상기 워드 임베딩 모델을 이용하여 제3 벡터를 획득하고, 상기 제3 벡터를 상기 신경망에 입력하여 그 출력값을 상기 심볼이 제거된 함수의 심볼로 획득하는 심볼 획득부;를 포함하는
함수 심볼 예측 장치. - 제8항에 있어서,
상기 워드 임베딩(word embedding) 모델은,
워드투벡터(word2vec), GloVe 및 FastText 중에서 어느 하나이고,
상기 신경망은,
RNN(Recurrent Neural Network), LSTM (Long Short Term Memory), GRU(Gated Recurrent Unit) 중에서 어느 하나인,
함수 심볼 예측 장치. - 제8항에 있어서,
상기 임베딩 처리부는,
상기 샘플 문장에 포함된 각 단어를 원핫벡터로 변환시키고, 상기 원핫벡터를 상기 워드 임베딩 모델에 입력함으로써 상기 워드 임베딩 모델을 학습시키며, 상기 학습된 워드 임베딩 모델의 임베딩 매트릭스를 상기 샘플 문장의 벡터로 획득하는,
함수 심볼 예측 장치. - 제8항에 있어서,
상기 신경망 처리부는,
상기 임베딩 처리부에서 획득된 벡터가 임베딩 매트릭스를 포함하는 경우, 상기 임베딩 매트릭스에 포함된 각 행을 상기 신경망에 순차적으로 입력함으로써 상기 신경망을 학습시키는,
함수 심볼 예측 장치. - 제8항에 있어서,
상기 심볼 획득부는,
상기 스트립트 바이너리를 디컴파일 과정을 통해서 함수 심볼이 제거된 제3 소스코드를 획득하고, 상기 제3 소스코드에서 함수호출 및 함수호출 인자를 추출하여 제3 코드조각을 획득하며, 상기 제3 코드조각에 포함된 함수명, 함수 인자, 함수 파라미터 및 변수명을 하나의 문장으로 생성하여 제3 문장을 획득하는,
함수 심볼 예측 장치.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020200166393 | 2020-12-02 | ||
KR20200166393 | 2020-12-02 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20220077894A true KR20220077894A (ko) | 2022-06-09 |
KR102608014B1 KR102608014B1 (ko) | 2023-11-30 |
Family
ID=81985827
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210170615A KR102608014B1 (ko) | 2020-12-02 | 2021-12-02 | 스트립트 바이너리 함수 심볼 예측 방법 및 그 장치 |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102608014B1 (ko) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102695309B1 (ko) * | 2023-09-11 | 2024-08-14 | 라온시큐어(주) | 대규모 언어 모델(llm) 기반의 바이너리 코드 시각화 장치 및 방법 |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101228899B1 (ko) | 2011-02-15 | 2013-02-06 | 주식회사 안랩 | 벡터량 산출을 이용한 악성코드의 분류 및 진단 방법과 장치 |
-
2021
- 2021-12-02 KR KR1020210170615A patent/KR102608014B1/ko active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101228899B1 (ko) | 2011-02-15 | 2013-02-06 | 주식회사 안랩 | 벡터량 산출을 이용한 악성코드의 분류 및 진단 방법과 장치 |
Non-Patent Citations (4)
Title |
---|
Jeremy Lacomis et al., "DIRE: A Neural Approach to Decompiled Identifier Naming"(2019.)* * |
Jingxuan He et al., "Debin: Predicting Debug Information in Stripped Binaries"(2018.)* * |
Yue Duan et al., "DEEPBINDIFF: Learning Program-Wide Code Representations for Binary Diffing"(2020.02.)* * |
김문회 외, "Stripped 바이너리 함수 심볼 예측방법 기술동향"(2020.11.)* * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102695309B1 (ko) * | 2023-09-11 | 2024-08-14 | 라온시큐어(주) | 대규모 언어 모델(llm) 기반의 바이너리 코드 시각화 장치 및 방법 |
Also Published As
Publication number | Publication date |
---|---|
KR102608014B1 (ko) | 2023-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Cummins et al. | Programl: A graph-based program representation for data flow analysis and compiler optimizations | |
Cummins et al. | Programl: Graph-based deep learning for program optimization and analysis | |
Russell et al. | Automated vulnerability detection in source code using deep representation learning | |
CN112733137B (zh) | 一种面向漏洞检测的二进制代码相似性分析方法 | |
US20190265955A1 (en) | Method and system for comparing sequences | |
CN113900923A (zh) | 一种跨指令集架构的二进制函数相似性检查系统及方法 | |
CN114201406B (zh) | 基于开源组件的代码检测方法、系统、设备及存储介质 | |
CN115935369A (zh) | 使用源代码元素的数值数组表示来评估源代码的方法 | |
Levy et al. | Learning to align the source code to the compiled object code | |
CN114942879A (zh) | 一种基于图神经网络的源代码漏洞检测与定位方法 | |
CN118227139A (zh) | 一种基于图注意力网络的跨语言代码相似性检测系统及方法 | |
KR102608014B1 (ko) | 스트립트 바이너리 함수 심볼 예측 방법 및 그 장치 | |
KR20200071413A (ko) | 학습용 데이터 생성 장치, 소스 코드 오류 분석 장치 및 방법 | |
CN114254323A (zh) | 基于PCODE和Bert的软件脆弱性分析方法及系统 | |
Nitin et al. | Direct: A transformer-based model for decompiled identifier renaming | |
Nitin et al. | Direct: A transformer-based model for decompiled variable name recovery | |
CN115688108B (zh) | 一种webshell静态检测方法及系统 | |
Cummins et al. | Deep data flow analysis | |
CN117763560A (zh) | 一种基于双视图因果推理的可解释漏洞检测方法及系统 | |
US20240211596A1 (en) | Malicious vba detection using graph representation | |
CN109657247B (zh) | 机器学习的自定义语法实现方法及装置 | |
CN116595537A (zh) | 一种基于多模态特征的生成式智能合约的漏洞检测方法 | |
Xiao et al. | Measurement of embedding choices on cryptographic api completion tasks | |
KR20070040805A (ko) | 비순환 패턴 인식 방법 | |
Jeong et al. | A data type inference method based on long short-term memory by improved feature for weakness analysis in binary code |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20211202 |
|
PA0201 | Request for examination | ||
PG1501 | Laying open of application | ||
E902 | Notification of reason for refusal | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20230523 Patent event code: PE09021S01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20231122 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20231127 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20231127 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration |