Design and Implementation of Software Vulnerability Detection System Based on Program Analysis
─system
├─forms
│ ├─result_from.py
│ └─file_form.py
├─function
│ ├─json2txt.py
│ └─extract.py
├─instance
│ ├─result
│ │ ├─neg
│ │ ├─pos
│ │ └─unknow
│ ├─test
│ │ ├─neg
│ │ └─pos
│ └─upload
├─machine_learning
│ ├─data.py
│ ├─model.py
│ ├─network.py
│ ├─test.py
│ ├─train.py
│ └─predict.py
├─source
│ ├─neg
│ ├─pos
│ ├─runs
│ ├─test
│ └─unknow
├─templates
│ ├─index.html
│ └─result.html
├─app.py
├─evaluation.py
└─training.py
-
训练模型
启动 training.py ,将文件(恶意软件+label)放入 test 中
-
读取 instance - test
-
对每个恶意软件调用一次 function-extract.py
(输入恶意软件路径 instance-test-pos/neg,输出路径 instance-result-pos/neg)
- 传入 sandbox
- 传出 json文件
-
调用 function-json2txt.py
(输入json路径 instance-result-pos/neg,输出路径 source-pos/neg)
- 传入 json 信息提取
- 将txt文件存入
-
调用 machine_learning-train.py (输入sample.db中的编号)
- 放入模型
-
-
评估模型
启动 evaluation.py ,将文件(恶意软件+label)放入 test 中
- 读取 instance - test
- 对每个恶意软件调用一次 function-extract.py (输入恶意软件路径)
- 传入 sandbox
- 传出的 json文件存入 instance-result中
- 将 feature 存入 source-unknow.db中
- 调用 machine_learning-predict.py (输入unknow.db中的编号)
- 放入模型
- 输出预测结果
- 用预测结果和label做比较,画评估曲线
-
用户上传
-
上传至 instance - upload
-
调用一次 function-extract.py
(输入恶意软件路径 instance-upload,输出路径 instance-result-unknow)
-
传入 sandbox
-
传出 json文件
-
-
调用 function-json2txt.py
(输入json路径 instance-result-unknow,输出路径 source-unknow)
-
传入 json 信息提取
-
将txt文件存入
-
-
调用 machine_learning-predict.py
(输入json路径 source-unknow)
- 放入模型
- 输出预测结果
-
显示输出结果
-