文献笔记《Analyzing Inter-Application Communication in Android》

文献引用:Chin E, Felt A P, Greenwood K, et al. Analyzing inter-application communication in Android[C]//Proceedings of the 9th international conference on Mobile systems, applications, and services. ACM, 2011: 239-252.

之所以会回过头来看这篇论文,是因为看到不少论文都有关于ComDroid的描述、对比。索性回过头来了解其具体是个什么东西。

ComDroid是一个用来发现APP漏洞的项目,主要是根据Intent进行分析。正如我们了解的,Intent是每个Android程序员开发必须要了解的东西,通过它可以便捷的实现各个组件、应用间的调用,传递信息,是各组件应用通信的主要载体。但其由于Android模型的特点,会存在如下安全隐患:Intent传递的消息可以被嗅探、修改、窃取以及篡改,那么用户的隐私存在泄露的可能。同时恶意程序可以伪造、注入恶意消息使得用户数据被污染,应用的安全策略被绕过。因此ComDroid的出现就是为了能对应用程序通信的漏洞进行检测。

基本知识

Intent相关: 文中关注的重点在于Intent,主要用于Activity,Services,Broadcast Receviers这三大组件之间,下表列出了针对不同组件的启动函数以及对应的函数签名,这些函数是一个Intent的发起操作。

组件相关:Android组件的声明一般在Manifest配置文件中,如果组件中包含EXPORTED标识,或者包含IntentFilter则意味着该组件是暴露的,因此就能被其他程序调用。需要说明的是IntentFilter并不是一种安全的做法,发送者可以自己够造action,type,category的Intent发送,也可以通过显示的Intent来绕过系统filter.

比较好的保护措施就是在声明组件的时候对添加权限,或则在对于发送广播Intent时,可以指定接收方需要具有的权限,所有权限保护主要分为Normal permissions,Dangerous permissions, Signature permissions.SignatureOrSystem permissions

基于Intent的攻击方式

1.不可信的Intent接收方

除非Intent由权限保护,并且恶意软件并没有申请该权限。否则恶意软件是可以获取到他匹配的Intent数据,同时也恶意软件也可以实现对其流程的控制,就好比拒绝服务或钓鱼攻击

  • 广播窃听

作为广播比较常见的漏洞利用就是被动窃听和主动拒绝攻击,窃听方可以不中断广播而对该Intent进行窃听

一些攻击者可以对ordered broadcast发动拒绝服务或者数据注入攻击,对于ordered broadcast,攻击者可以注册高优先级的receiver来接收并取消广播,从而达到拒绝服务攻击,而No-ordered broadcast则不行。对于ordered broadcast,攻击者还可以将数据注入到广播中。对于这里广播,receiver一般会通过注册的优先级依次获取广播,同时将其发送给下一优先级的receiver,当所有receiver处理玩Intent之后会给发送方返回一些结果。因此若存在恶意receiver,那么每个receiver接收处理转发的Intent可能是不可信的。
建议:开发者要根据自己的广播Intent的敏感程度选择不同的方式发送(显示或者隐式),程序内部件的通信建议采用显示方式,对于隐式通信建议配合权限保护

  • Activity Service Hijacking

这是一个常见的隐患,由于没有对接收Intent的组件进行合法性验证,那么将存在被劫持的风险。
最简单的攻击模型就是,恶意的activity可以在Intent发出后启动,获取用户相应数据后,启动合法的activity以实现劫持过程的隐藏
钓鱼攻击(Phishing attacks)只所以能成功实现主要是由于Android UI并不会对正在运行的应用进行验证。这就导致了Intent发送后,会存在假冒组件启动的可能。

不过activity hijacking并不是总是都奏效的,对于一个Intent存在多个匹配的Activity时,Android系统会提示用户选择将Intent发送至哪个activity(除非用户已知设置好默认启动项)。但一般对于这种情况,恶意软件主要采用两种方式进行绕过,1)起一个和系统名字混淆的应用名欺骗用户。2)恶意软件可以丰富自己一些额外功能诱导用户使用。有的activity发送Intent后会期望目的组件发回结果,那么劫持成功后,可以伪造返回结果实现对源组件的欺骗。

对于service hijacking,成功的可能性更高。对于一个Intent匹配多个service的情况,系统采用随机的方式进行调用,并不像activity一样提示用户选择,如果Intent发起组件还提供了service回调,那么可能还存在回调被利用的危险

  • 特殊Intent

Intent中还可能附带uri来访问存储在其他应用程序的content provider。当Intent的接收方没有权限访问该URI时,Intent发送方可以在Intent上设置FLAG_GRANT_READ_URI_PERMISSION 或 FLAG_GRANT_WRITE_URI_PERMISSION标志。如果对方Provider允许授权访问uri,即临时权限android:grantUriPermissions系列有在manifest中声明,这么一来将赋予Intent接收方对URI中data的读或写权限,倘若被恶意组件劫持,那么恶意组件将存在读写权限。
对于pending Intent其包含了所有权限以及创建者的权限,pending Intent接收方可以发送这个Intent给第三方应用,其所携带的creator认证信息也会被传送,那么一旦恶意软件截获了该pending Intent,那么creator的认证信息将被滥用

2.Intent欺骗

恶意软件可以构造Intent去触发暴露组件响应,从而实施Intent欺骗攻击。

  • 恶意广播注入

虽然很多receiver是响应系统广播的,这意味着只有系统广播才能激发他们。但事实上,对于这样的receiver,其实已经是公开可以访问的组件了,此时我们可以采用显示调用的方式来触发receiver响应,这样一来我们就不需要发送系统广播行为了。如果receiver没有check action,必定将触发receiver,因此安全的措施就是在receiver中检查是否是系统action.

  • 恶意Activity Service启动

此外,服务的启动,将有更多的机会获取隐私数据,因为服务通常提供丰富的接口,也许能触发对应的毁掉函数。

3.ComDroid工作内容

其主要通过逆向DEX获取指令内容,通过解析dalvik文件并跟踪Intent、IntentFilter、registers、sinks(e.g., sendBroadcast(), startActiv-ity(), etc.),以及components的状态来进行分析.

对于Intent分析:主要跟踪状态如下:1)是否显式 2)是否有action 3)是否设置flags 4)是否有extra data 。对于sink,我们检查是否存在隐式Intent对象流向。由于一些发送Intent的方式会呈现出权限,以及那些Intent将被送往哪里,其系统主要记录这些信息。
针对以上提出的软件潜在漏洞进行警告,从而检测潜在漏洞。

对于组件的分析:主要针对manifest中的exposed,以及动态注册registerReceiver,对于暴露但是没有设置权限的组件进行警告,对于没有检查系统action的receiver进行警告。

结果:能够对潜在漏洞进行警告提示,包括文件名,方法,行号,类型(恶意启动、广播窃取等等),是否存在数据泄露注入

4.缺点不足:

不能够检测pending Intent以及 URI 读写权限的Intent
ComDroid仅仅是警告可能存在的漏洞,并不能够验证是否存在攻击
仅仅是通过静态分析的方式,未来可能会采取和动态结合

Gas Metal Arc Welding (GMAW) is a widely used welding process in which a consumable metal wire electrode is fed into a weld pool to join two or more metal parts together. During the welding process, the electrode melts and forms a molten metal pool, which then cools and solidifies to form a welded joint. One way to analyze the GMAW process is to examine the metal-transfer images that are generated during welding. Metal-transfer images are high-speed photographs or videos of the GMAW process that capture the behavior of the molten metal as it is transferred from the electrode to the workpiece. Analyzing these images can provide insights into the physical processes that occur during welding, such as droplet detachment, droplet formation, and arc behavior. There have been several studies that have analyzed metal-transfer images in the GMAW process. One such study was conducted by Liu et al. (2017), who used high-speed photography to capture metal-transfer images during GMAW of aluminum alloys. They found that the droplet detachment frequency was influenced by the welding current, and that there was a critical current level above which the droplet detachment frequency increased dramatically. Another study by Liao et al. (2019) analyzed metal-transfer images during GMAW of high-strength steel. They found that the droplet transfer mode shifted from globular to spray transfer as the welding current increased, and that the formation of an unstable arc affected the droplet detachment process. Other researchers have used image processing techniques to analyze metal-transfer images. For example, Zhang et al. (2019) developed an algorithm to automatically detect and track the movement of droplets in metal-transfer images during GMAW. They found that the droplet size and transfer frequency were affected by the welding current and the wire feed speed. Overall, the analysis of metal-transfer images in the GMAW process is an active area of research that has the potential to improve our understanding of the physical processes that occur during welding. By studying metal-transfer images, researchers can gain insights into the factors that affect droplet detachment, droplet formation, and arc behavior, which can in turn help to optimize the welding process for different materials and applications.
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值