SEAndroid在IPC中安全功能进行分析

论坛 期权论坛     
选择匿名的用户   2021-6-2 16:30   72   0
<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">SELinux在系统级增加了强制访问控制,每个VFS node均在Security Server的控制之中。IPC是系统的重要功能,未经授权的使用均会给系统带来安全隐患,所以本文重点对SEAndroid在IPC中安全功能进行分析,作为Android的主要通信工具socket和binder,在SEAndroid均增加了权限的控制,下面分别对两个进行简要的分析。<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">由于Android行业化应用越来愈多,对SE的研究越来越多了,例如trustdroid。</span><br style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)"> <span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">SE目前实现太复杂了,另外仅提供kernel的MAC,框架层的也需要啊。类似的机制已经有厂商实现了,如三星S4 Knox! </span></span>
<br style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">
<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">一、  binder</span>
<br style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">
<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">为了增加binder的权限控制,首先在kernel的policy中增加一个class,并且增加了几个方法,</span>
<br style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">
<div style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245); margin:5px 20px 20px">
<div class="smallfont" style="line-height:normal; margin-bottom:2px">
  代码:
</div>
<pre dir="ltr" style="margin-top:0px; margin-bottom:0px; background-color:rgb(222,223,223); padding:6px; border:1px inset; width:700px; overflow:auto">{ &#34;binder&#34;, { &#34;impersonate&#34;, &#34;call&#34;, &#34;set_context_mgr&#34;, &#34;transfer&#34;, &#34;receive&#34;} },
</pre>
</div>
<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">Impersonate:该进程是否可以代表另一个进程使用binder</span>
<br style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">
<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">Call:该进程是否可以调用另一个进程</span>
<br style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">
<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">Set_context_mgr:是否可以将自己注册成Context Manager</span>
<br style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">
<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">Transfer:是否可以传递某类型的binder引用到其他进程</span>
<br style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">
<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">Receive:是否可以接收某类型binder引用</span>
<br style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">
<span style="color:rgb(19,37,60); font-family:宋体,verdana,geneva,lucida,&#39;lucida grande&#39;,arial,helvetica,sans-serif; line-height:19px; background-color:rgb(245,245,245)">对binder调用规则的配置有些繁琐,所以在TE中使用宏进行配置binder_use、
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP