Understanding Android Security

Understanding Android Security
Enck et al. IEEE Security & Privacy 2009

This is an "ancient" article discussing the security enforcement provided by Android. It is like the CS101 of Android security. By the year of 2017, a lot of things have changed and a lot of new features have been added to Android. However, it is still worth reading as the principle of programming for Android is stable and unchanged. Below is an excerpt from the paper.

Android Applications

Developers must design applications in terms of components.

Component Types

  • Activity components define an application's user interface.
  • Service components perform background processing.
  • Content provider components store and share data using a relational database interface.
  • Broadcast receiver components act as mailboxes for messages from other applications.

Component Interaction

The primary mechanism for component interaction is an intent, which is simply a message object containing a destination component address and data.

Although developers can uniquely address a target component using its application's namespace, they can also specify an implicit name. In the latter case, the system determines the best component for an action by considering the set of installed applications and user choices. The implicit name is called an action string because it specifies the type of requested action---for example, if the "VIEW" action string is specified in an intent with data fields pointing to an image file, the system will direct the intent to the preferred image viewer. On the receiving end, developers use an intent filter to subscribe to specific action strings.

Inter-component communication (ICC).

Security Enforcement

Android protects applications and data through a combination of two enforcement mechanisms, one at the system level and the other at the ICC level.

In the general case, each application runs as a unique user identity, which lets Android limit the potential damage of programming flaws.

ICC isn't limited by user and process boundaries. In fact, all ICC occurs via an I/O control command on a special device node, /dev/binder. Because the file must be world readable and writable for proper operation, the Linux system has no way of mediating ICC. Although user separation is straightforward and easily understood, controlling ICC is much more subtle and warrants careful consideration.

The Android middleware implements a reference monitor providing mandatory access control (MAC) enforcement about how applications access components. Developers assign applications collections of permission labels. When a component initiates ICC, the reference monitor looks at the permission labels assigned to its containing application and—if the target component's access permission label is in that collection—allows ICC establishment to proceed. Android's permission label model only restricts access to components and doesn't currently provide information flow guarantees, such as in domain type enforcement (?).

Security Refinements

Public vs. Private Components

Instead of defining an access permission, the developer could make a component private by either explicitly setting the exported attribute to false in the manifest file or letting Android infer if the component should be private from other attributes in its manifest definition.

Others

Other refinements includes:

  • Implicitly Open Components
  • Broadcast Intent Permissions
  • Content Provider Permissions
  • Service Hooks
  • Protected APIs
  • Permission Protection Levels
  • Pending Intents: Pending intents diverge from Android's MAC model by introducing delegation. By using a pending intent, an application delegates the ability to influence intent contents and the time of performing the action. Historically, certain delegation techniques have substantial negative effects on the tractability of policy evaluation.
  • URI Permissions

Lessons in Defining Policy

Android security policy begins with a relatively easy-to-understand MAC enforcement model, but the number and subtlety of refinements make it difficult to discover an application's policy.

The label itself is merely a text string, but its assignment to an application provides access to potentially limitless resources.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 214,444评论 6 496
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,421评论 3 389
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 160,036评论 0 349
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,363评论 1 288
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,460评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,502评论 1 292
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,511评论 3 412
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,280评论 0 270
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,736评论 1 307
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,014评论 2 328
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,190评论 1 342
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,848评论 5 338
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,531评论 3 322
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,159评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,411评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,067评论 2 365
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,078评论 2 352

推荐阅读更多精彩内容

  • 又是一年秋叶煞落的季节,家属院里的那棵粗大的泡桐树儿,己只剩下枝枝丫丫,一阵萧索秋风起,那枝枝丫丫晃动着,...
    泡桐_730f阅读 391评论 1 1
  • 你说? 你的对象和一个他/她的同事一起合租。会不时一起下班,会不时一起逛街。会不时一起聊天。然后他们会一起吃饭!...
    Yt丶青虾阅读 180评论 0 1
  • 第九章 翌日清晨,早读。有人读的兴冲冲,有人睡得美滋滋。大脸老师不期而至,负手巡视一周,登上讲台。 “咳咳,大家静...
    垚君阅读 110评论 0 1
  • 人们喜爱相声或小品是因为我们需要在平凡枯燥的生活中找到一点不一样的滋味。真正的逗比们其实是一群性格中充满阳光的人,...
    LilyBian阅读 642评论 0 1