面向物联网终端的自动化动态固件安全分析系统设计与实现

 2022-07-30 02:07

论文总字数:52324字

摘 要

随着成熟的商用嵌入式设备日益普及,人们在日常生活中也享受到了很多便利。但是嵌入式系统的安全性也因为其不断增长的在信息网络中的地位而日益重要,就以家用无线路由器为例,是将家庭用户的个人信息设备与互联网隔开的第一道也是唯一一道防线,但是最近的研究表明控制嵌入式设备的固件其安全性正在逐渐受到挑战。

研究固件的安全性之一是及时的发现其安全漏洞。对于市场上提供的大量嵌入式设备,需要一套高效、可扩展的系统批量化地对嵌入式设备的固件进行大规模地分析,本论文展示了一种面向基于linux固件的自动化动态安全分析系统。首先,根据抽取固件中根文件系统,利用虚拟机QEMU和插装的系统内核推测固件启动过程中需要的网络配置,并将系统配置后在QEMU中启动。然后,系统集成了metasploit渗透测试工具,对虚拟机中的运行系统手动进行扫描、渗透测试,并且将发现的漏洞形成测试脚本,对同系列或是其他品牌的固件进行统一扫描,由于代码共享较为流行,已发现的攻击可能会影响其他固件。

本研究针对Netgear和Dlink的11个固件进行漏洞分析,所有固件都成功抽取根文件系统并且成功结合编译好的内核使用QEMU模拟,系统不仅结合了metasploit的70多种渗透测试分析,同时也发现了固件潜在的易受包括指令注入、缓冲区溢出以及信息泄露的安全漏洞,并通过本论文的自动分析工具进行渗透测试验证。

关键词:嵌入式设备 、固件、自动分析、渗透测试

Design and Implementation of an Automatic Dynamic Firmware Security

Analysis System for Embedded System

Abstract

With the increasing popularity of mature commercial embedded devices, we have enjoyed a great deal of convenience. However, the security of embedded systems is also increasingly important because of its growing position in information networks. Take home wireless routers as an example, they separate the home users' personal information devices from the Internet. However, recent research, especially on the research of embedded systems’ firmwares, has found that the security of the systems that’re fundamentally controlled by the firmwares is gradually being challenged.

One of the security aspects of researching firmwares is the timely detection of security vulnerabilities. For a large number of embedded devices on the market, an efficient and scalable system is required to analyze the firmwares of embedded devices in batches. This paper presents an automated dynamic security analysis system based on linux firmwares. First, according to the extracted root file systems in the firmwares, use QEMU and the revised kernel to infer the required network configuration during the firmware startup process. Next, system boots the firmwares with the right network configuration. Then, the system integrates metasploit to scan and exploit the running system, and the discovered vulnerabilities are formed into test scripts. The firmwares of the same series or other brands is scanned in a unified manner because the code sharing is relatively popular. Thus discovered attacks may affect other firmwares.

This research focuses on the vulnerability analysis of 11 firmwares of Netgear and Dlink. We successfully extracted all the root file systems and simulated the firmwares with combined the pre-compiled kernel by QEMU. The system not only intergrates 70 exploits testing from metaspolit, but also finds the potentially vulnerabilities, including instruction injection, buffer overflow, and information disclosure, which are verified by our system.

KEY WORDS: Embedded device, Firmware, Automatic analysis, Exploit

目录

摘要 I

Abstract II

第一章 绪论 1

1.1 研究背景 1

1.2 研究现状 1

1.3 研究目标和内容 3

1.4 论文组织结构 3

第二章 技术背景 4

2.1 kprobe与jprobe 4

2.1.1 简介 4

2.1.2 kprobe实现 4

2.1.3 jprobe实现 5

2.2 虚拟化 7

2.2.1 虚拟化技术 7

2.2.2 软件虚拟化 7

2.2.3 虚拟化模型 8

2.2.4 KVM-QEMU架构 8

2.3 binwalk 9

2.3.1 binwalk简介 9

2.3.2 binwalk使用方法 10

2.4 本章小结 11

第三章 系统实现 12

3.1 系统总览 12

3.2 抽取固件 13

3.2.1 概述 13

3.2.2 文件类型识别方法 13

3.2.3 文件系统类型识别方法 14

3.2.4 binwalk及手动提取的不足 14

3.2.5 改进之处 15

3.2.6 算法说明 16

3.3 基于虚拟机的固件启动 20

3.3.1 概述 20

3.3.2 内核探测 21

3.3.3 通过串行端口连接终端 24

3.3.4 自动化固件网络配置的推理 25

3.3.5 虚拟机网络配置 27

3.4 渗透测试 29

3.4.1 基于metasploit的渗透测试 29

3.4.2 主动信息搜索 30

3.4.3 其他渗透测试 32

3.5 本章小结 33

第四章 实验验证 34

4.1 手动提取文件系统 34

4.1.1 查看文件类型 34

4.1.2 手动判断文件类型 34

4.1.3 手动提取文件系统 35

4.2 自动提取文件系统 35

4.3 编译修改的内核 37

4.4 #0~#70渗透测试 39

4.5 指令注入测试(#200,#201,#204-206,#208) 40

4.6 缓冲区溢出(#203) 40

4.7 信息泄露(#209 – #214) 42

4.8 本章小结 43

第五章 总结与展望 44

5.1 论文总结 44

5.2 工作展望 44

参考文献 46

绪论

研究背景

在物联网快速部署的今天,嵌入式设备的安全性正受到挑战。这些嵌入式设备包括路由器、互联网电视盒、摄像头、智能电源插座等等。很多固件常常会拥有相同的技术特性,例如基于ARM或MIPS的嵌入式单芯片系统以及通过以太网或无线网络连接。这些设备中的很多都受供应商提供的固件的控制,但是这些固件很少更新来解决影响这些设备的安全漏洞。

因许多设备占据的重要网络地位,其供应商的安全措施显得更加重要。例如,无线路由器通常是用户计算设备与互联网之间的第一道也是唯一的防线。成功破坏这种网络设备的攻击者能够访问用户的网络,并且可以进一步重新配置设备以篡改任意网络流量。由于大多数供应商没有主动提高其设备的安全性,因此数百万家庭和小型企业网络易受到已知和未知威胁的影响。作为提高商品计算机设备安全性的第一步,能够准确识别嵌入式固件中的漏洞非常重要。

剩余内容已隐藏,请支付后下载全文,论文总字数:52324字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;