分享好友 移动开发首页 频道列表

NJAS Sandboxing Unmodified Applications in Non-rooted Devices Running Stock Android

Android开发  2016-11-16 09:310

论文下载

简介

这篇文章提出了一种不修改系统,不需要ROOT,不重打包来制造一个沙盒的工具–NJAS(Not Just Another Sandbox)

特点

  • executing an Android application within the context of another one1
  • achieves sandboxing by means of system call interposition(using the ptrace mechanism)
  • no modication to the framework, no root access to the device, no require to enable unsafe options
  • cannot be evaded by using native code components

实现方法

原APP这里称为orig, 针对每个orig, 会单独生成一个stub APP。 这个stub包含orig的menifest.xml中少量基本信息,权限,组件声明等等,不包括资源文件和代码。

用户直接运行stub, stub收先会fork自身,生成一个monitor 子进程。monitor子进程会利用ptrace来在system call 层面上监督stub执行的代码,目前可以限制四个功能:network,filesystem,sms,contact。 而stub执行的代码来自orig。 stub通过从data/app目录下的apk文件中拿到orig的dex及资源文件。用classloader来读取并运行其代码。除了监控,monitor子进程还需要做一些对源代码的patch工作,来保证orig的代码可以在stub的context中正常运行。比如修改一些参数和返回值,(文件系统路径,包名等等)。

Security

by using syscall interposition, Njas is able to fully control the behavior of an app. In fact, the usage of the ptrace mechanism guarantees that the monitor process will be able to intercept every syscall invoked by orig。

  1. Java-level API
  2. native library
  3. syscall through inline assembly code

会阻止ptrace和kill指令,防止恶意APP绕过Njas

评估

NJAS Sandboxing Unmodified Applications in Non-rooted Devices Running Stock Android

查看更多关于【Android开发】的文章

展开全文
相关推荐
反对 0
举报 0
评论 0
图文资讯
热门推荐
优选好物
更多热点专题
更多推荐文章
Supporting Multiple Screens
术语和概念Screen size 屏幕尺寸又称「屏幕大小」,是屏幕对角线的物理尺寸。单位英寸 inch,比如 Samsung Note4 是 5.7 英寸。Resolution 屏幕分辨率屏幕纵横方向上物理像素的总数,比如 Samsung Note4 是 2560x1440,表示纵向有 2560 个像素,横向有 1440

0评论2017-02-05363

Android插件化(4):OpenAtlasの插件的卸载与更新
如果看过我的前两篇博客Android插件化(2):OpenAtlas插件安装过程分析和Android插件化(3):OpenAtlas的插件重建以及使用时安装,就知道在插件的安装过程中OpenAtlas做了哪些事,那么插件的卸载就只需要把持久化和内存中的内容移除即可。1.插件的卸载插件卸载的

0评论2017-02-05229

个人简历
吴朝晖/男/1993.1本科/南京师范大学中北学院信息系工作年限:1年以内技术博客:wuzhaohui026.github.ioGitHub:https://github.com/wuzhaohui026期望职位:Android开发(初级Android工程师)期望薪资:税前月薪5.5k~7k期望城市:常州工作经历常州慧展信息科技有

0评论2017-02-05126

Android插件化(五):OpenAtlasの四大组件的Hack
引言到目前为止,我们已经分析了OpenAtlas中插件的安装,卸载,更新,以及安装好插件之后组件类的加载过程,但是对于这些是如何引发的还不知道,比如,在宿主的一个Activit中调用startActivity()跳转到插件中的一个Activity,如何判断这个Activity在的插件是否

0评论2017-02-0598

更多推荐