本科学生毕业设计(论文)
Android手机防火墙
学生:
:
指导教师:
专业:信息安全
大学计算机
二O一四年六月
Graduation Design(Thesis) of University
The Design and Implementation of Android Firewall
Undergraduate: Zhou Zhengting
Supervisor: Lecturer
Major: Information security
College of ComputerScience
University
June 2014
摘要
在智能手机越来越普及的今天,人们对安全问题越来越重视。当前,越来越多的手机用户接收到垃圾短信以及电话,这不仅严重地影响了用户的正常生活,还为用户带来了很多安全隐患。同时,手机应用的流量问题日渐凸显,越来越多的手机应用在使用过程中经常发生"偷"流量现象。这也就产生了一种关于如何控制手机流量的使用,使其透明、直观的被用户控制的诉求。所以一款针对骚扰拦截、流量管理、任务管理等功能的手机防火墙成为了广大用户的必须。
手机防火墙存在于各种智能手机平台,其中就包括Android、Windows Mobile和Symbian。本文将详细地介绍基于Android平台的手机防火墙。重点介绍在Android系统上实现骚扰电话和短信的拦截和过滤的相关问题及其关键实现技术,并给出了一种实现Android系统电话和短信黑白名单过滤的防骚扰的方法。同时,也详细介绍实现快速精确控制软件访问网络的相关策略问题,也给出了一种实现Android系统上gprs和wifi管控的具体方法。
本文介绍的防火墙是采用面向对象的方法进行分析设计,采用功能模块化分类的方式进行开发实现。首先,网络防火墙部分采用的是用Iptables规则构造一个包过滤防火墙的方式来实现。使用Iptables设计的规则可以集成到Linux内核中,通过它,可以对整个系统发出去的包,接收到的包,以及转发的包进行拦截、修改、拒绝等操作,从而实现gprs和wifi的控制,最终实现网络防火墙的功能。其次,在实现电话拦截部分时,采用的是Java反射机制获取ITelephony的实例对象,并调用它的endCall()方法实现挂机。而在实现拨号拦截或发送短信拦截时,采用取消广播的方式,让电话管理器或短信管理器不能收到相应广播。同时,在实现短信拦截时,采用了基于关键字的方式进行短信拦截。最后,在实现任务管理功能部分时,则是充分调用Android中操作进程的API来完成。
依据本文的设计方案,最后完成编码后,对本文设计的手机防火墙系统的各个功能模块进行总体测试。测试表明该防火墙的骚扰拦截、上网监控等各个功能都能成功实现。同时,该系统运行稳定,使用简单方便,基本实现了预期设定的设计目标,可用于保障Android手机的安全。
关键词:Android,Iptables规则,防火墙,骚扰拦截
ABSTRACT
With the smart phone becoming more and more unbiquitous, people are paying more attention to security issues when they use smart phone. At present, a growing number of mobile phone users receive spam messages and phone calls, which not only seriously affect the their normal life, but also force them to bear a lot of security risks. Meanwhile, the applications on smart phones often consume large amount of traffic most of which are "stealed" in background. This phenomenon give rise to the demand of smart phone users to control the usage of traffic transparently and intuitively. So a firewall with interception against harassment, traffic management, task management is seriously needed.
Mobile firewall software exist in a variety of smart phone platforms, including Android, Windows Phone and Symbian etc. This thesis will describe the design and implementation of firewall which is based on Android platform in detail. It will focus on the techniques to implement the function of harassing phone calls, SMS interception and filtering. It also introduces a method which tells us how to anti-harassment on the Android system via calls and SMS black-white list filter. Meanwhile, it not only introduces some of network-related strategic issues which tell us how to control software access to internet precisely and quickly, but also conclude a concrete method to manage and control the GPRS and WiFi moudules on the Android system.
The android firewall of this thesis utilize the object-oriented methods to do analysis and design, the functional modular classification approach to do the development and implementation. Firstly, in order to implement the network firewall, we utilize the rules of the iptables to construct a packet-filtering firewall. The rules designed by iptables can be integrated into the Linux kernel. With the help of these rules, we can intercept (or modify and refuse etc.) the packets sent, packet received or the forwarding packets, resulting in achieving to control GPRS and WiFi, and ultimately implementing the function of network firewall. Secondly, in order to implement the telephone interception, we make use of the Java reflection mechanism to get ITelephony instance of an object, and use its endCall() method to hook the phone. When it comes to implement the function of dial-up blocking or SMS interception, we use the method of abortBroadcast() which does not allow the phone manager or the SMS manager to receive a corresponding message broadcast. At the same time, to implement SMS interception, we use keyword-based approach. Finally, to implement task management, we make full use of the APIs of Android to operate process.
Based on the design of this thesis, after the finalization of coding, we have tested all the modules of firewall. The results of testing indicate that the firewall blocked harassment, Internet monitoring and other modules can work very well as expected. What's more, this system is very stable and easy to use. And the desired objectives specified have achieve. So this system can be used to keep Android phones safety.
Key words:Android, iptables rules, firewall, harassment intercept
目录
中文摘要 I
ABSTRACT I
1绪论 1
1.1 课题背景 1
1.2 课题任务 1
1.3 课题开发目的 1
1.4 章节组织 1
2相关技术简介 1
2.1 ANDROID相关知识 1
2.1.1 Android框架概述 1
2.1.2搭建Android开发平台 1
2.2 IPTABLES介绍 1
2.2.1 Iptables的表与链 1
2.2.2 Iptables的规则 1
2.3 SQLITE介绍 1
2.4 XML介绍 1
2.5 JAVA反射机制 1
3需求分析 1
3.1引言 1
3.1.1编制目
上一篇:
win7下无线网卡软AP设置_针对android系统
下一篇:
试论APP广告在手机中的应用