<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Security Engineering Research Group</title>
	<atom:link href="http://imsciences.edu.pk/serg/feed/" rel="self" type="application/rss+xml" />
	<link>http://imsciences.edu.pk/serg</link>
	<description>Security Engineering Research Group</description>
	<lastBuildDate>Thu, 02 Sep 2010 07:48:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OpenERP Module Development Part-1</title>
		<link>http://imsciences.edu.pk/serg/2010/09/openerp-module-development-part-1/</link>
		<comments>http://imsciences.edu.pk/serg/2010/09/openerp-module-development-part-1/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 07:35:52 +0000</pubDate>
		<dc:creator>mir.nauman</dc:creator>
				<category><![CDATA[OpenERP]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=665</guid>
		<description><![CDATA[We will start by creating a simple OpenERP module with only one form and one table in PostgreSQL database with no relations at all. Later on we will extend this simple module in more complex module with multiple forms, multiple tables and relations step by step. I assume that u have installed OpenERP All-In-One that [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } -->We will start by creating a simple OpenERP module with only one form and one table in PostgreSQL database with no relations at all. Later on we will extend this simple module in more complex module with multiple forms, multiple tables and relations step by step. I assume that u have installed OpenERP All-In-One that includes OpenERP Server, OpenERP Web Client, OpenERP GTK Client and PostgreSQL and I assume that its configured and working fine.</p>
<p>I am using Ubuntu 9.10</p>
<ul>
<li>Open terminal and write sudo 	nautilus. Than enter your password. A file browser window will open. 	Browse to the addons folder in the openerp-server. The path would be 	something like this e.g, 	/usr/local/lib/python2.6/dist-packages/openerp-server/addons/</li>
<li>create a new folder in it and name 	it “sim”, short for Student Information  Management. Open the 	folder.</li>
<li>Create the following files in the 	sim folder.
<ol type="i">
<li>__init__.py (its “double 		underscore init double underscore.py”). 	Python file.</li>
<li>__terp__py (its “double 		underscore terp double underscore.py”). 	Python file.</li>
<li>sim.py 									Python file</li>
<li>sim_view.xml 								XML file.</li>
</ol>
</li>
<li>Open __init__.py file and write 	the following code.
<ol type="i">
<li><em>import sim</em></li>
<li>sim is the name of our module 		that we are developing and its the name our major python file that 		will include all our python code. Save the file and exit</li>
</ol>
</li>
<li>Open __terp__.py file and write 	the following code.</li>
</ul>
<p style="padding-left: 60px;"><em>{</em></p>
<p style="padding-left: 60px;"><em>&#8216;name&#8217;: &#8216;Student Information  Management&#8217;,</em></p>
<p style="padding-left: 60px;"><em>&#8216;version&#8217;: &#8216;0.1&#8242;,</em></p>
<p style="padding-left: 60px;"><em>&#8216;category&#8217;: &#8216;Tools&#8217;,</em></p>
<p style="padding-left: 60px;"><em>&#8216;description&#8217;: &#8220;&#8221;"This module is for the Student Information Management.&#8221;"&#8221;,</em></p>
<p style="padding-left: 60px;"><em>&#8216;author&#8217;: &#8216;Mir Nauman Tahir&#8217;,</em></p>
<p style="padding-left: 60px;"><em>&#8216;website&#8217;: &#8216;http://mirnauman.wordpress.com/&#8217;,</em></p>
<p style="padding-left: 60px;"><em>&#8216;depends&#8217;: ['base'],</em></p>
<p style="padding-left: 60px;"><em>&#8216;init_xml&#8217;: [],</em></p>
<p style="padding-left: 60px;"><em>&#8216;update_xml&#8217;: [</em></p>
<p style="padding-left: 60px;"><em>'sim_view.xml'</em></p>
<p style="padding-left: 60px;"><em>],</em></p>
<p style="padding-left: 60px;"><em>&#8216;demo_xml&#8217;: [],</em></p>
<p style="padding-left: 60px;"><em>&#8216;installable&#8217;: True,</em></p>
<p style="padding-left: 60px;"><em>}</em></p>
<p>You can write your own strings in “name, description,author and website”Save the file and exit</p>
<ul>
<li>Now open sim.py file and write the 	following code.</li>
</ul>
<p style="padding-left: 60px;"><em>class student(osv.osv):</em></p>
<p style="padding-left: 90px;"><em>_name = &#8220;sim.student&#8221;</em></p>
<p style="padding-left: 90px;"><em>_description = &#8220;This table is for keeping personal data of student&#8221;</em></p>
<p style="padding-left: 90px;"><em>_columns = {</em></p>
<p style="padding-left: 120px;"><em>&#8216;name&#8217;: fields.char(&#8216;Registration Number&#8217;,size=256,required=True),</em></p>
<p style="padding-left: 120px;"><em>&#8217;student_name&#8217;: fields.char(&#8216;Student Name&#8217;,size=256,required=True),</em></p>
<p style="padding-left: 120px;"><em>&#8216;father_name&#8217;: fields.char(&#8216;Father Name&#8217;,size=256),</em></p>
<p style="padding-left: 120px;"><em>&#8216;gender&#8217;:fields.selection([('male','Male'),('female','Female')],&#8217;Gender&#8217;),</em></p>
<p style="padding-left: 120px;"><em>&#8216;contact_no&#8217;:fields.char(&#8216;Contact Number&#8217;,size=256)</em></p>
<p style="padding-left: 90px;"><em>}</em></p>
<p style="padding-left: 90px;"><em>student()</em></p>
<p>This code will create a table in the database “sim_student”. In database the dot between sim and student is converted to underscore. The value for _description can be any string of your choice. _column is a dictionary and contains all the column names of the table with their data types. In side the parenthesis is the caption for that field that will appear on the form, its size and “required=True” shows that its a must to enter this field.  The “field.selection” creates a drop down list control that has two items, Male and Female. The “student()” shows the end of the class.</p>
<p>Some precautions. Python is a language that works with indentation. One space extra or less can generate billions of errors and you wont get a proper clue, if you are not using the proper editor.</p>
<ul>
<li>Open the sim_view.xml file and 	write the following code</li>
</ul>
<p style="padding-left: 60px;">&lt;!&#8211; ============== Document Start================= &#8211;&gt;</p>
<p style="padding-left: 60px;">&lt;?xml version=&#8221;1.0&#8243;?&gt;</p>
<p style="padding-left: 60px;">&lt;openerp&gt;</p>
<p style="padding-left: 60px;">&lt;data&gt;</p>
<p style="padding-left: 90px;">&lt;!&#8211; ============== student================= &#8211;&gt;</p>
<p style="padding-left: 90px;">&lt;!&#8211; 1<sup>st</sup> part of the sim_view start&#8211;&gt;</p>
<p style="padding-left: 90px;">&lt;record model=&#8221;ir.ui.view&#8221; id=&#8221;student_form&#8221;&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;name&#8221;&gt;Student&lt;/field&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;model&#8221;&gt;sim.student&lt;/field&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;type&#8221;&gt;form&lt;/field&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;arch&#8221; type=&#8221;xml&#8221;&gt;</p>
<p style="padding-left: 120px;">&lt;form string=&#8221;Student&#8221;&gt;</p>
<p style="padding-left: 180px;">&lt;field name=&#8221;name&#8221;/&gt;</p>
<p style="padding-left: 180px;">&lt;field name=&#8221;student_name&#8221;/&gt;</p>
<p style="padding-left: 180px;">&lt;field name=&#8221;father_name&#8221;/&gt;</p>
<p style="padding-left: 180px;">&lt;field name=&#8221;gender&#8221;/&gt;</p>
<p style="padding-left: 180px;">&lt;field name=&#8221;contact_no&#8221;/&gt;</p>
<p style="padding-left: 120px;">&lt;/form&gt;</p>
<p style="padding-left: 120px;">&lt;/field&gt;</p>
<p style="padding-left: 90px;">&lt;/record&gt;</p>
<p style="padding-left: 90px;">&lt;!&#8211; 1<sup>st</sup> part of the sim_view end&#8211;&gt;</p>
<p style="padding-left: 90px;">
<p style="padding-left: 90px;">&lt;!&#8211;2<sup>nd</sup> part of the sim_view start&#8211;&gt;</p>
<p style="padding-left: 90px;">&lt;record model=&#8221;ir.ui.view&#8221; id=&#8221;student_tree&#8221;&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;name&#8221;&gt;Student&lt;/field&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;model&#8221;&gt;sim.student&lt;/field&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;type&#8221;&gt;tree&lt;/field&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;arch&#8221; type=&#8221;xml&#8221;&gt;</p>
<p style="padding-left: 120px;">&lt;tree string=&#8221;Student&#8221;&gt;</p>
<p style="padding-left: 150px;">&lt;field name=&#8221;name&#8221;/&gt;</p>
<p style="padding-left: 150px;">&lt;field name=&#8221;student_name&#8221;/&gt;</p>
<p style="padding-left: 150px;">&lt;field name=&#8221;father_name&#8221;/&gt;</p>
<p style="padding-left: 150px;">&lt;field name=&#8221;gender&#8221;/&gt;</p>
<p style="padding-left: 150px;">&lt;field name=&#8221;contact_no&#8221;/&gt;</p>
<p style="padding-left: 120px;">&lt;/tree&gt;</p>
<p style="padding-left: 120px;">&lt;/field&gt;</p>
<p style="padding-left: 90px;">&lt;/record&gt;</p>
<p style="padding-left: 90px;">&lt;!&#8211;2<sup>nd</sup> part of the sim_view end&#8211;&gt;</p>
<p style="padding-left: 90px;">
<p style="padding-left: 90px;">&lt;!&#8211; 3<sup>rd</sup> part of the sim_view start&#8211;&gt;</p>
<p style="padding-left: 90px;">&lt;record model=&#8221;ir.actions.act_window&#8221; id=&#8221;action_student&#8221;&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;name&#8221;&gt;Student&lt;/field&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;res_model&#8221;&gt;sim.student&lt;/field&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;view_type&#8221;&gt;form&lt;/field&gt;</p>
<p style="padding-left: 120px;">&lt;field name=&#8221;view_mode&#8221;&gt;tree,form&lt;/field&gt;</p>
<p style="padding-left: 90px;">&lt;/record&gt;</p>
<p style="padding-left: 90px;">&lt;!&#8211;3<sup>rd</sup> part of the sim_view end&#8211;&gt;</p>
<p style="padding-left: 90px;">
<p style="padding-left: 90px;">&lt;!&#8211;4<sup>th</sup> part of the sim_view start&#8211;&gt;</p>
<p style="padding-left: 90px;">&lt;menuitem name=&#8221;SIM/Student/StudentInfo&#8221; id=&#8221;menu_sim_student&#8221; action=&#8221;action_student&#8221;/&gt;</p>
<p style="padding-left: 90px;">&lt;!&#8211;4<sup>th</sup> part of the sim_view end&#8211;&gt;</p>
<p style="padding-left: 60px;">&lt;/data&gt;</p>
<p style="padding-left: 60px;">&lt;/openerp&gt;</p>
<p style="padding-left: 60px;">&lt;!&#8211; ============== Document End=================&#8211;&gt;</p>
<p style="padding-left: 60px;">
<p>From my perspective every view file for an OpenERP module will consist of atleast 3 or 4 parts</p>
<ol type="i">
<li>The form part.</li>
<li>The tree part.</li>
<li>The action part.</li>
<li>The menu part.</li>
</ol>
<p>And thats how I have divided the above documents in 4 parts. Its not necessary that an OpenERP module must have all the above 4 parts. It can have form,action and menu parts or tree,action and menu or all the four parts. The 1<sup>st</sup> part will create a form view.  It should be kept in mind that the &lt;field name=”model”&gt;sim.student&lt;/field&gt;, the sim.student should be exactly the same as the value for the _name=”sim.student”. This refers to the sim_student table for which we are creating this form. The &lt;field name=”type”&gt;form&lt;/field&gt; shows which view type it is, a tree or a form. The next important block is the &lt;field name=”name”/&gt;,&lt;field name=”student_name”/&gt;&#8230;.. the values for the name here will be the exact column names from our sim.py file. The rest of the things don&#8217;t need much explanation for now.</p>
<p>The 2<sup>nd</sup> part contain exactly the same things as the form view with very few differences like the type is tree here instead of form. And the column fields are encapsulated in the &lt;tree string=”Student” …..&gt;. This will create a grid type view displaying all the rows and column that are entered. This grid type view is called tree view.</p>
<p>The 3<sup>rd</sup> part is the action. In res_model give the exact model name or the table name from our sim.py file, I.e “sim.student”. Specify a view_type that is form and view mode that is tree, form. The action defines when a menu is clicked for this action which form will it open. In the menu, id of this action will be used.</p>
<p>The 4<sup>th</sup> part is related to creating the menu. A menu has the following important parts that are name,id,action and in some cases parent. There are two ways for creating a menu. I have used a way that I found more simple. “SIM/Student/StudentInfo”, SIM is the primary menu and appears in the left pane. When SIM is clicked Student menu will appear in the right pane. When student is clicked StudentInfo will appear and when StudentInfo is clicked it will open the form that is defined in the action for this menu.</p>
<p>Save the file, exit. Now run  OpenERP client. Install the current developed module and check it in working condition. More complexities to this tutorial will be added soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/09/openerp-module-development-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EASIP 3rd deliverable &#8220;Strengths and Weaknesses of Policy Enforcement Mechanism for Open Source mobile platforms&#8221;</title>
		<link>http://imsciences.edu.pk/serg/2010/09/easip-3rd-deliverable-strengths-and-weaknesses-of-policy-enforcement-mechanism-for-open-source-mobile-platforms/</link>
		<comments>http://imsciences.edu.pk/serg/2010/09/easip-3rd-deliverable-strengths-and-weaknesses-of-policy-enforcement-mechanism-for-open-source-mobile-platforms/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 07:02:44 +0000</pubDate>
		<dc:creator>Engineer@IMS</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=663</guid>
		<description><![CDATA[Third deliverable of EASIP project can be found at
http://imsciences.edu.pk/serg/wp-content/uploads/2010/09/strength-and-weakness-of-each-mechanism.pdf
The deliverable starts with an introduction to Android followed by Openmoko, both of which are open source mobile platforms. Security enforcement mechanism of both platforms are discussed separately. Finally a comparative analysis is done between Android and Openmoko focusing on strengths and weaknesses of their policy enforcement [...]]]></description>
			<content:encoded><![CDATA[<p>Third deliverable of EASIP project can be found at</p>
<p>http://imsciences.edu.pk/serg/wp-content/uploads/2010/09/strength-and-weakness-of-each-mechanism.pdf</p>
<p>The deliverable starts with an introduction to Android followed by Openmoko, both of which are open source mobile platforms. Security enforcement mechanism of both platforms are discussed separately. Finally a comparative analysis is done between Android and Openmoko focusing on strengths and weaknesses of their policy enforcement mechanisms.</p>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/09/easip-3rd-deliverable-strengths-and-weaknesses-of-policy-enforcement-mechanism-for-open-source-mobile-platforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>History And Evolution of MAC</title>
		<link>http://imsciences.edu.pk/serg/2010/08/history-and-evolution-of-mac/</link>
		<comments>http://imsciences.edu.pk/serg/2010/08/history-and-evolution-of-mac/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 06:36:09 +0000</pubDate>
		<dc:creator>alishinwari</dc:creator>
				<category><![CDATA[MAC on mobile platform]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=613</guid>
		<description><![CDATA[1  History of Mandatory Access Control
Evolution of mandatory access control can be traced back to the early  efforts Defense Science Board starting in October 1967 to enhance  security that would protect classified information exposed to remote  access and resource sharing. The task force presented a report named  “security controls for computer [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><strong>1  History of Mandatory Access Control</strong></p>
<p>Evolution of mandatory access control can be traced back to the early  efforts Defense Science Board starting in October 1967 to enhance  security that would protect classified information exposed to remote  access and resource sharing. The task force presented a report named  “security controls for computer systems” in February 1970 recommending a  number of policy and technical actions to be taken to reduce threat to  classified data accessed remotely. The DoD directive 5200.28 was  published with a manual to enhance the computer systems of all defense  and intelligence agencies. Research and development efforts were  undertaken by Airforce, ARPA, and others to develop and demonstrate  practical solutions.<sup id="cite_ref-0">[1]</sup></p>
<p>This work progressed to the first evaluation criteria known as  Trusted Computing Security Evaluation Criteria, which is described in  the next subsection.Earlier MAC implementations were Honeywell&#8217;s SCOMP <sup id="cite_ref-0">[2]</sup> and NSA Blacker<sup id="cite_ref-0">[3]</sup>, concerned with MLS to protect military oriented security classification levels with efficient enforcement.</p>
<p><strong>1.1 Trusted Computer System Evaluation Criteria (TCSEC)</strong></p>
<p>TCSEC <sup id="cite_ref-0">[1]</sup> is a US Government Department of Defense (DoD) standard that sets basic  requirements for assessing the effectiveness of computer security  controls built into a computer system. The TCSEC was used to evaluate,  classify and select computer systems being considered for the  processing, storage and retrieval of sensitive or classified  information.<br />
Orthogonal to DoD efforts, the National Bureau of Standards (NBS) had  begun work to define issues and technical solutions for constructing,  evaluating, and auditing trusted computer systems. In this work NBS  conducted two workshops on audit and evaluation of security in computer  systems. The main deliverable of the second workshop was a definitive  document on the issues pertaining to providing standard criteria for the  evaluation of technical computer system security effectiveness. MITRE  Corporation began work on a set of computer security evaluation criteria  that could be used to assess the degree of trust one could place in a  computer system to protect classified data. This outgrowth of  recommendations from the document was also supported by the DoD Computer  Security Initiative. The early concepts relating to computer security  evaluation were thoroughly discussed at invitational workshops and  symposia, where the invited participants represented computer security  experts from industry and academia in addition to the government  agencies.<br />
Other nations had started work on their own standard criteria. To  standardize the criteria these national authorities joined to form what  is known as the common criteria.</p>
<p><strong>1.1.2 Common Criteria </strong></p>
<p>The Common Criteria for Information Technology Security Evaluation<sup id="cite_ref-0">[4]</sup> (<a href="http://www.commoncriteriaportal.org/." target="_blank">Common Criteria &#8211; CC</a>) is an international standard (<a href="http://webstore.iec.ch/preview/info_isoiec15408-1%7Bed3.0%7Den.pdf" target="_blank">ISO/IEC 15408</a>)   for computer security certifications. The certifications are given on  criteria bases. Labeled Security Protection Profile is a relevant  certificate for MAC enabled systems. CC provides assurance that the  process of specification, implementation and evaluation of a computer  security product has been conducted in a rigorous and standard manner.</p>
<p>CC is a framework in which computer systems users can specify their  security requirements with respect to functional and assurance goals.  Then the vendors implement and define the security features of their  products. The testing laboratories evaluate products to determine if  they actually meet the standard minimum requirements of the certificate  according to the criteria vendor claims.</p>
<p style="text-align: left;"><strong> 2 Evolution of </strong><strong>Mandatory Access Control</strong></p>
<p><strong>2.1  MAC on </strong><strong>Opensource Distributions </strong></p>
<p>In this section first we compare the MAC solutions on Linux based  distributions in depth. Then we discuss the solutions available for  other open source platforms based on BSD and Solaris. Some newer latest  but maturing efforts like SMACK and Tomoyo are also touched for  completeness.</p>
<p><strong>2.1.2  MAC Mechanisms for the Linux Kernel</strong></p>
<p>Mandatory access control on Linux platform started as patches  available per solution. In order to mainstream it in the kernel an  implementation independent security module was needed. This module would  then be used by any MAC mechanism to register to it at a time. This  modular security framework is known as the Linux security module  framework.</p>
<p><strong>2.1.2.1  Linux Security Module Framework</strong><br />
Earlier projects resorted to system call interposition to control kernel operations, which had serious limitations. <sup id="cite_ref-0">[5]</sup> Secondly, there was lack for a standard mechanism and enhancements  hooked to the kernel in a manner that only suited their own  requirements. In addition, creating effective security module was a  problematic task because the kernel had no infrastructure to mediate  access of the security module to kernel objects.<br />
To facilitate these issues the LSM<sup id="cite_ref-0">[6]</sup><sup id="cite_ref-0">[7]</sup> project was developed as a lightweight, general purpose, access control  framework for the Linux kernel. It enables many different access  control models to be implemented as loadable kernel modules. Figure 2.1  LSM Framework is a visual representation. The LSM kernel modified the  kernel in five primary ways.<br />
• It adds opaque security fields as void* pointers, which enable  security modules to associate security information with kernel objects.<br />
• It inserts calls to security hook functions at various points in kernel to mediate access to kernel objects.<br />
• It adds generic security system calls to implement new calls for security aware applications.<br />
• It provides functions to allow kernel modules to register and unregistered themselves as security modules.<br />
It moves most of the capability logic into an optional security module.  LSM has an important feature that is module stacking but it pushes most  of the work to modules themselves. Our future study may require this  feature if we are to use integrity measurements for remote attestation.  LSM kernel control flow, while assessing access control rights, first  checks the DAC decision and if it is positive then LSM hook gives  control to hook implementation, which mediates access between kernel  data structures and the decision module, else system call is returned an  error code.</p>
<p style="text-align: center;"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.1.png"><img class="aligncenter" title="imageMAC2.1" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.1-300x196.png" alt="" width="300" height="196" /></a></p>
<p style="text-align: center;">Figure 2.1 LSM Framework</p>
<p><strong>2.1.2.2  AppArmor</strong></p>
<p>AppArmor<sup id="cite_ref-0">[8]</sup> previously known as SubDomain <sup id="cite_ref-0">[9]</sup>,  is yet another implementation, which is not derived from a formal  framework. It utilizes the concept of chroot jail with access control  isolation enabled through program profiles. It provides a similar  containment value to chroot, but without the need to physically move the  application and its required resources into a separate container.  AppArmor access control concentrates on file system resources, which  means process transitions are not consider adequately.<br />
AppArmor has an LSM compliant security module which is similar to  SELinux in this regard. It uses LSM to communicate with securityfs,  where it stores its security attributes and configurations. It uses  profiles for the containment.</p>
<p style="text-align: center;"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.21.png"><img class="aligncenter" title="imageMAC2.2" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.21.png" alt="" width="287" height="215" /></a></p>
<p style="text-align: center;">Figure 2.2 AppArmor Overview</p>
<p><strong>2.1.2.2.1  Access Decision Mechanism </strong></p>
<p>AppArmor’s decision facility is similar to SELinux as it is also LSM  compliant. AppArmor is itself the core module, which handles most of the  functionality. When a process invokes a system call, LSM hook  implementation hooks the information from kernel data structures and  provides it to the AppArmor module. Kernel data structures and identity  of the subject and object, is checked against the profile of the  application and reply is sent back via the hook function’s return to the  system call.</p>
<p><strong>2.1.2.2.2  Access Enforcement Mechanism </strong></p>
<p>AppArmor earlier used system call modifications to check the  confinement of processes. Now it uses the LSM module to perform these  tasks. LSM is the leveraging medium between AppArmor module, system  calls and kernel data structures.</p>
<p><strong>2.1.2.2.3  Security Attributes and Policy Store </strong></p>
<p>AppArmor uses securityfs, normally mounted on /sys/kernel/security to  store its binary profile. The text files that make up the profile are  parsed by apparmor_parse() called by the user space /ets/apparmor.d. The  parser loads the binary policy onto securityfs via a sysctl() call from  where AppArmor module loads it. By convention  /etc/apparmor.d/hello_world will confine hello world.</p>
<p><strong>2.1.2.3 GrSecurity </strong></p>
<p>GrSecurity <sup id="cite_ref-0">[10]</sup> is a suite of solutions that address different shortcomings of the  operating system security. Thus, it can be stated that it does not  implement any framework. It is a set of patches knitted in harmony with  each other. It was originally a port of the security features of  Openwall <sup id="cite_ref-0">[11]</sup> but with time it has grown.<br />
Philosophy behind GrSecurity is that currently operating systems avoid,  identify and fix software bugs. The history of software development has  proven that there are always going to be bugs in the software no matter  what security measures are taken. GrSecurity as a solution detects,  prevents and contains. Detection of vulnerabilities is available through  auditing and logging of attacks, prevention by PaX (address space  protection) with a combination of additional techniques.</p>
<p>Containment is enabled through access control lists. The ACL feature  incorporates MAC into this enhancement and encourages a modular design  for future extensions.<br />
GrSecurity <sup id="cite_ref-0">[10]</sup> being a knit of patches does not have a well defined kernel security  module because it is inserted into various parts of the kernel to  address the lack of current security mechanisms. Its ACL engine acts as  the decision making facility and stores the ACL policy along with RBAC  extensions.</p>
<p><strong>2.1.2.3.1  Access Decision Mechanism</strong></p>
<p>The ACL core of GrSecurity is the decision making facility, which  gets requests from its enforcement mechanism. These requests contain  identity of the requesting subject and the object being accessed. It  utilizes hooks similar to what LSM provides, but are much more in number  as it uses access control in multiple layers.</p>
<p><strong>2.1.2.3.2  Access Enforcement Mechanism</strong></p>
<p>GrSecurity enforcement being similar to SELinux and AppArmor as it  has hook functions to mediate the control flow but it also has  additional functionality. It has to manage the various security  mechanisms. These are address space layout randomization, extensive  auditing capabilities, netfilter module, stealth netfilter module,  enhanced trusted path execution, OpenBSD randomness features at multiple  layers, enhanced chroot jail, ptrace and Glibc restriction and various  others.<br />
These require lots of hooks and other mechanisms. This is the reason why it can’t be ported to LSM activated kernels.</p>
<p><strong>2.1.2.3.3  Security Attributes and Policy Store</strong></p>
<p>GrSecurity attribute management for ACL module is similar to LSM in  that it does not centralize them. This was necessary for the various  security features it supports. It extends various kernel data structures  in order to facilitate all the patches it makes to the kernel.</p>
<p><strong>2.1.2.4  RSBAC</strong></p>
<p>Rule Set Based Access Control <sup id="cite_ref-0">[12]</sup> is an open source security extension for the Linux type kernels based on the Generalized Framework for Access Control (GFAC) <sup id="cite_ref-0">[13]</sup>.  The GFAC framework targeted the integration of multiple policy  components. This was achieved by modularizing the framework into access  control enforcement, access control decision and access control  information (security attributes) facilities. Access Decision Facility  (ADF) implements the MAC security policies and a metapolicy to decide  whether process’ requests satisfy those policies. Access Enforcement  Facility (AEF) uses the ADF decisions to enforce the operations at  system call level.<br />
RSBAC is a direct implementation of the GFAC framework. It has been  extended to supports more object types, includes generic list management  and network access control, contains several additional security models  and supports runtime registration of decision modules and system calls  for their administration. The components ADF, AEF and ACI are hard  linked into the kernel.</p>
<p style="text-align: center;"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.3.png"><img class="aligncenter" title="imageMAC2.3" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.3-297x300.png" alt="" width="294" height="273" /></a> <a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.3.3.png"><img title="imageMAC2.3.3" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.3.3-300x202.png" alt="" width="294" height="206" /></a></p>
<p style="text-align: center;">Figure 2.3 Overview and Flow Diagram of RSBAC</p>
<p><strong>2.1.2.4.1   Access Decision Framework</strong></p>
<p>RSBAC’s  decision facility is ADF. With every security relevant system call,  called by the subject to access an object, the AEF is invoked by  intercepting the call. AEF compiles a request and sends it to the ADF  for decision using an abstract function with relevant request type. The  request has certain parameters; desired type of functionality is known  from the request type, identification of the subjects and possibly some  attributes of the object. These values are extracted by the AEF from the  ACI against the subject and object.<br />
Security policies are evaluated with respect to the policy rules for the  request type by the ADF. ADF consults ACI for policy rules. When these  rules are determined the meta-policy is evaluated to make the decision.  Meta-policy uses the set of results from different security policies  present to build the final result. Meta-policy is the union of the set  of decision modules present in ADF.<br />
ADF can be split into two parts: the main part, which handles the  general work and the second part being the installed modules. The  general work mainly consists of handling requests from AEF, dispatching  it to the modules and performing generic logging. The modules compute  the actual decisions against its policies and security attributes of the  subject and object.</p>
<p><strong>2.1.2.4.2   Access Enforcement Mechanism</strong></p>
<p>RSBAC’s AEF  enforces the decision based on the decision of ADF. Either the system  call is permitted to do its function or an error is returned to the  process with associated control data if necessary. In case of a positive  result, ADF is notified so that ACI can be updated, the ADF tells the  decision modules<br />
to update their attributes from the data structures, sends an acknowledgement to AEF and then the object is accessed normally.<br />
As AEF is embedded in the kernel subsystems it is the only RSBAC  component, which cannot be modularized. It is hooked into several  locations of the existing kernel code. Every security relevant system  call and pseudo file handling function is extended by two calls to ADF.  One is made before the original code, which requests for a decision and  one after the original code to send update information to ADF. These two  security-handling calls differ by functionality with the change in  request type. Thus, it cannot be ported to LSM activated kernels. It  would require a lot of change and loss in flexibility to implement new  policy models.<br />
<strong>2.1.2.4.3  Security Attributes and Policy Store</strong></p>
<p>RSBAC’s ACI is used to store and maintain system values and data  structures (for policy modules). System values portion stores and  maintains label information for subjects and objects. It implements and  store the contexts and data structures that are not handled by the  kernel data structures.<br />
Persistent attributes are additionally saved in the secondary storage.  Dynamic, module specific data, like roles, user groups, access control  lists and other relevant information are handled separately in the data  structure portion. A file descriptor cache, fdcache, is used to reduce  the performance hit because of the storage on secondary storage.</p>
<p><strong>2.1.2.5  SELinux</strong></p>
<p>NSA SELinux’s <sup id="cite_ref-0">[14]</sup> origins are found in the research of an access control framework based on Distributed Trusted Operating System (DTOS)<sup id="cite_ref-0">[15]</sup> and Distributed Trusted MACH (DTMACH) <sup id="cite_ref-0">[16]</sup>, two MACH <sup id="cite_ref-0">[17]</sup> based kernels. The resulting framework was named Flask <sup id="cite_ref-0">[18]</sup>, when ported to the Fluke <sup id="cite_ref-0">[19]</sup> operating system. The Flask security framework is similar to GFAC where  it separates the security policy decision from the enforcement  mechanism.<br />
The Security Server (SS), being the decision module, separates the  policy logic with well defined interfaces for obtaining security policy  decisions. The object managers are the enforcers for their specific  objects (file system, process management, IPC, sockets, e.t.c.). There  is an Access Vector<br />
Cache (AVC), which is present inside the object managers. It caches access decisions for subsequent use by the object managers.<br />
Flask being implemented on Fluke, micro kernel architecture, had to be  adjusted with the monolithic design of Linux. Its implementation was a  huge patch to the bare kernel, explicitly extending a lot of data  structures it used internally to handle the operations concerning files,  communication and other I/O. The object managers were ported as  additional functionalities implemented inside the kernel subsystems.  Security server is also part of the kernel now, which was originally a  server in Flask.<br />
After LSM became the standard access control farmework for the Linux  kernel, SELinux adapted. Now SS is located as a LSM compliant module and  kernel subsystems use the LSM features to communicate with the security  server. AVC has also become centralized but an interface is provided in  libselinux for user space object managers like the X server. The LSM  architecture has made the SELinux design to become a bit scattered due  to LSM’s coherence with the kernel.<br />
Internal components, in addtion to SS, enforcement at kernel subsystems  and AVC are network interface table (mapping of network interfaces to  security contexts), network notificationcode (keep libselinux consistent  with kernel module), SELinux pseudo file system (SS’s API to processes,  selinuxfs) and hook functions’ implementation.<br />
User space object managers are supported by libselinux. X server and  Postgresql are already security enhanced servers. Policy Management  Server (PMS), a user space feature lately added, can also be extended to  a user space SS, which will reduce burden on kernel SS. Currently PMS  only provides policy management in an object oriented manner but it also  aims at handling a networked policy.</p>
<p><strong>2.1.2.5.1 </strong><strong>Access Decision Mechanism</strong></p>
<p>SS is the  decision facility for SELinux. It uses security labels to compute an  access decision comparing an object’s label with the authorization level  of a subject that attempts to access the object. To handle this  objective there are two data types to map an object with its access  rights. The security context is a string representation of the object’s  rights, which is used by the SS to compute its decision against the  policy. A security identifier (SID), an integer value, is mapped to the  security context and is passed to the kernel subsystem for labeling of  objects. The kernel subsystems pass SIDs to the SS so that it performs  the translation to security context and computes the decision.</p>
<p><strong>2.1.2.5.2 </strong><strong>Access Enforcement Mechanism</strong></p>
<p>The  enforcement of policy decisions in SELinux, is accomplished in the  kernel subsystems. When the SS returns the decision as a return to the  hook function, the enforcement code either allows by letting the system  call to continue or denies by returning an error code to it.<br />
The kernel subsystems have the duty to label its objects with the SIDs  passed from the security server. In case of subjects, they are  non-persistent so these SIDs work fine for their data structures. But  file system objects are persistent and labeling them means to release  SIDs to user space. SELinux does not allow this. This problem is  addressed in the next subsection.</p>
<p><strong>2.1.2.5.3 </strong><strong>Security Attributes and Policy Store</strong></p>
<p>SELinux is  straight forward in labeling non-persistent objects but allowing the  labeling of persistent objects needs a solution. This is enabled by  storing the security context in extended file system attributes (EA) <sup id="cite_ref-0">[20]</sup>. These attributes are special settings stored in the vnode of the file, which is more<br />
efficient by storing security attributes in an inode, for each file (an  earlier solution), more localized manner. Although it is a logical  solution but it has the limitation of which file systems can be used  with SELinux. Currently ext2, ext3, ReiserFS and XFS file systems  supports extended attributes.<br />
The policy configurations are stored in selinuxfs, the pseudo file  system. This is the binary policy, while the readable version is stored  on secondary storage. It can be found in /etc/selinux/policy.conf. The  generation of policy.conf is based on the base and loadable policy  modules configurations.<br />
Lately two new mechanisms have been introduced to with simplicity with  high priority because normal desktop users find it difficult to manage  the ones mentioned above. Following are work in progress and we will  give a brief overview as they are not complete for our development  purposes.</p>
<p><strong>2.2  Other Maturing Mac mechanisms for Linux</strong></p>
<p><strong>2.2.1 </strong><strong>SMACK</strong></p>
<p>Smack <sup id="cite_ref-0">[21]</sup> is a Mandatory Access Control mechanism designed to provide useful MAC  while avoiding the pitfalls of its predecessors. The limitations of Bell  &amp; LaPadula are addressed by providing a scheme whereby access can  be controlled according to the requirements of the system and its  purpose rather than those imposed by an arcane government policy.<br />
The complexity of Domain Type Enforcement is avoided by defining access controls in terms of the access modes already in use.</p>
<p style="text-align: center;"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/table2.11.png"><img class="aligncenter" title="table2.1" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/table2.11-300x114.png" alt="" width="358" height="144" /></a>Table 2.1 Comparison of MAC mechanisms</p>
<p><strong>2.2.2 </strong><strong>Tomoyo Linux</strong><br />
Tomoyo Linux <sup id="cite_ref-0">[22]</sup> is a path based MAC mechanism like AppArmor but it deals with domains  rather than program based. The chain of execution defines the integrity  of a domain from its history of execution and accesses to this domain’s  resources are controlled via the behavior defined as a policy.<br />
Tomoyo tries to avoid the complexity of SELinux by simplifying access  control. The approach is to define a domain for the subject/process by a  sequence of executed processes starting from the kernel, init and  onwards to the subject process and associate all access rights with  these domains. Tomoyo&#8217;s approach is feasible with the learning mode that  it provides. It is a work in progress due to lack of tools when  compared to others.</p>
<p><strong>2.3   Non Linux, Opensource MAC Implementations</strong></p>
<p><strong>2.3.1 </strong><strong>Trusted BSD</strong></p>
<p>The TrustedBSD Framework for MAC <sup id="cite_ref-0">[23]</sup> was first released with FreeBSD 5.0 distribution. It has matured to  support policy modules that include rule-based filesystem firewall,  TCP/UDP port ACLs, inter-user process controls and classic MAC policies  such as MLS with compartments, Biba integrity policies.<br />
Policy modules include cryptographic checksums on system services and utilities. SEBSD<sup id="cite_ref-0">[24]</sup> policies from the NSA FLASK based on SELinux are also ported FreeBSD.<br />
The TrustedBSD MAC Framework was released in Mac OS X as of the Leopard  distribution, where it is implemented for Seatbelt and other security  services. The port of the MAC Framework was accomplished as part of the  SEDarwin<sup id="cite_ref-0">[25]</sup>, which also had a port of FLASK/SELinux to Mac OS X.</p>
<p><strong>2.3.2 </strong><strong>Trusted Solaris and FMAC</strong></p>
<p>Labeled  security has made it to the mainstream operating system therefore Sun  Microsystems has included features of Trusted Solaris<sup id="cite_ref-0">[26]</sup>,  such as fine-grained access control, as part of the standard Solaris 10  release. This extension is called the Solaris Trusted Extensions. It is  no longer necessary maintain a different kernel for labeled security  environments. Solaris Trusted Extensions is an OpenSolaris project.<br />
Solaris Trusted Extensions enforce a MAC policy on device access, file  systems, networking, print and window management services and other  operating system services. Sensitivity labels are assigned to objects of  services, thereby establishing explicit information flow relationships  between objects. Appropriate rules allows applications and users access  to the objects&#8217; methods and properties.<br />
Lately the Flexible MAC (FMAC) project <sup id="cite_ref-0">[27]</sup> has been initiated by the openSolaris community in the leadership of  NSA, which adds the Flux Advanced Security Kernel architecture and Type  Enforcement to OpenSolaris.</p>
<p><strong>2.3.3 </strong><strong>MAC on mobile devices</strong></p>
<p>There have  been researches, commercial and individual scholarly efforts to  implement MAC on mobile devices. One of the first successful attempts  was made by Montavista Linux <sup id="cite_ref-0">[28]</sup>. Then Willis Vanderventer also ported it for GTA01 in a Google summer of code project <sup id="cite_ref-0">[29]</sup>, which we have used as a base source for our GTA02 targeted porting efforts.<br />
In this section we will dive into the innovations of MAC on mobile platforms rather than porting issues which is discussed in <a href="http://imsciences.edu.pk/serg/2010/07/selinux-on-openmoko/" target="_blank">implementation of SELinux on Openmoko</a> in depth. First of all we will understand what the requirements are then followed by the available solutions.<br />
The most important role that MAC plays is to provide isolation to  stakeholder engines and resources with well defined interfaces. The MPWG  <sup id="cite_ref-0">[30]</sup> requires resources on the platform to be organized in isolated domains  with internal interfaces creating sub-domains, with limited tiers. The  software stack is supposed to be considered as entities that group into  engines for stakeholders&#8217; domain of authority. Engines communicate using  defined interfaces.<br />
MAC policy ensures that the software components, entities or data are  accessed in a specified and trusted manner thus enabling a framework  that gives integrity to the platform and its resources.</p>
<p style="text-align: center;"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.4.png"><img class="aligncenter" title="imageMAC2.4" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.4-300x143.png" alt="" width="300" height="143" /></a></p>
<p style="text-align: center;">Figure 2.4 Mobile Phone Reference Architecture</p>
<p>Stakeholders  are the autonomous entities that the resources of the platform belong  to. In the TCG MPWG model the stakeholders are categorized as the  mandatory and discretionary owners with respect to the engine types. An  owner can have both types of engines as well. Then we can further  categorize to device manufacturer, network operator, and general service  providers as remote owners and the device user as local owner.</p>
<p style="text-align: center;"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.5.png"><img class="aligncenter" title="imageMAC2.5" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/imageMAC2.5.png" alt="" width="298" height="209" /></a></p>
<p style="text-align: center;">Figure 2.5 A generic Trust Engine and its interfaces</p>
<p>Consider the  engine, in Figure 2.5, which can access services of other engines only  through interfaces (1) and (6), and provides services to others only  through interfaces (2) and (5).<br />
Zhang et al. used the SELinux to form MPRA <sup id="cite_ref-0">[31]</sup> as specified by the MPWG. In this work the MAC policy controls the  information flows in such a way that stakeholder engines are isolated  and least privileges are provided using interfaces between engines. They  have also included a binary measurement agent that is used to measure  the binary integrity using SELinux file system attributes and hooks.<br />
Yet in another work he has demonstrated to use an integrity model for access control and on a mobile platform <sup id="cite_ref-0">[32]</sup>. It demonstrates how object managers can be used to enforce better integrity of the platform.<br />
PRIMA <sup id="cite_ref-0">[33]</sup> is an approach where integrity measurement has been integrated with MAC  mechanism of the platform. A Clark-Wilson lite model is used to enforce  integrity based on filtering subjects. The filtering subjects are the  object managers.</p>
<p>Nokia&#8217;s research on MAC <sup id="cite_ref-0">[34]</sup> for mobile platforms uses two techniques, which are very different then  other related literature on this topic. The first technique is to use a  pre-configured lattice-based capability system for manufacturer  provided operating system and its services. The second technique is the  caging for untrusted programs. Caging allows the user to run these  programs in an isolated environment. A cage being a virtual entity,  which controls access to file system, networking and IPC for these  programs according to the caging policy defined by the user at install  time.</p>
<p><strong>References</strong></p>
<ol>
<li>Trusted computer system evaluation criteria. Tcsec, DOD. s.l. : Technical Report 5200.28-STD, US Department of Defense, 1985</li>
<li>Scomp: A solution to the multilevel security problem. Fraim, LJ. 1983. Computer</li>
<li>Defense Data Network Security Architecture. Shirey, R.W. s.l. : ACM  SIGCOMM Computer Communication Review, ACM, 1990. ACM SIGCOMM Computer  Communication Review.</li>
<li>Common Criteria for Information Security Evaluation. [Online] <a href="http://www.commoncriteriaportal.org/" target="_blank">http://www.commoncriteriaportal.org/</a>.</li>
<li>Traps and pitfalls: Practical problems in system call interposition based security tools. Garfinkel, T.</li>
<li>Linux security modules: General security support for the linux  kernel. Wright, C. and Cowan, C. and Smalley, S. and Morris, J. and  Kroah-Hartman, G. s.l. : Proceedings of the 11th USENIX Security  Symposium, 2002</li>
<li>Linux security module framework. Wright, C. and Cowan, C. and  Morris, J. and Smalley, S. and Kroah-Hartman, G. s.l. : Ottawa Linux  Symposium, 2002</li>
<li>AppArmor Security for Linux Application. Novel. [Online] Novel Inc.<a href="http://www.novell.com/linux/security/apparmor/" target="_blank"> http://www.novell.com/linux/security/apparmor/</a>.</li>
<li>Subdomain: Parsimonious server security. Cowan, C. and Beattie, S. and Kroah-Hartman, G. and Pu, C. and Wagle, P. and Gligor, V.</li>
<li>GrSecurity Papers. GrSecuirity. [Online] <a href="http://www.grsecurity.net/papers.php" target="_blank">http://www.grsecurity.net/papers.php</a>.</li>
<li>Openwall Project &#8211; Information Security Software. Openwall. [Online]<a href="http://www.openwall.com/" target="_blank"> http://www.openwall.com/</a>.</li>
<li>Documentation. Rulset Based Access Control. [Online] <a href="http://www.rsbac.org/documentation" target="_blank">http://www.rsbac.org/documentation</a>.</li>
<li>The rule set based access control (rsbac) framework for linux. Ott, A. and Fischer-H{\\&#8221;u}bner, S. s.l. : Citeseer.</li>
<li>Publications. NSA Security Enhanced Linux. [Online] <a href="http://www.nsa.gov/research/publications/index.shtml" target="_blank">http://www.nsa.gov/research/publications/index.shtml</a>.</li>
<li>Home Page. A Distributed trusted Operating System. [Online]<a href="http://www.cs.utah.edu/flux/fluke/html/dtos/HTML/dtos.html."> http://www.cs.utah.edu/flux/fluke/html/dtos/HTML/dtos.html.<br />
</a></li>
<li>Assuring distributed trusted mach. Fine, T. and Minear, SE. s.l. :  IEEE Computer Society Symposium on Research in Security and Privacy.,  1993</li>
<li>Home Page. The MACH project. [Online]<a href="http://www-2.cs.cmu.edu/afs/cs/project/mach/public/www/mach.html" target="_blank"> http://www-2.cs.cmu.edu/afs/cs/project/mach/public/www/mach.html</a>.</li>
<li>Flux Advance Security Kernel. Flask. [Online] <a href="http://www.cs.utah.edu/flux/fluke/html/flask.html" target="_blank">http://www.cs.utah.edu/flux/fluke/html/flask.html</a>.</li>
<li>Flux Micro Kernel Architecture. [Online] <a href="http://www.cs.utah.edu/flux/fluke/html/index.html" target="_blank">http://www.cs.utah.edu/flux/fluke/html/index.html</a>.</li>
<li>Linux Extended Attributes and ACLs. [Online] <a href="http://acl.bestbits.at/" target="_blank">http://acl.bestbits.at/</a>.</li>
<li>schaufler, Casey. Smack White paper. [Online]<a href="http://www.schaufler-ca.com/data/SmackWhitePaper.pdf" target="_blank"> http://www.schaufler-ca.com/data/SmackWhitePaper.pdf</a>.</li>
<li>Tomoyo Linux Wiki. TOMOYO Linux : Behavior oriented system analyzer and protector. [Online] <a href="http://tomoyo.sourceforge.jp/wiki-e/" target="_blank">http://tomoyo.sourceforge.jp/wiki-e/</a>.</li>
<li>Documentation. The TrustedBSD Project. [Online] <a href="http://www.trustedbsd.org/docs.html" target="_blank">http://www.trustedbsd.org/docs.html</a>.</li>
<li>SE-BSD. The TrustedBSD Project. [Online] <a href="http://www.trustedbsd.org/sebsd.html" target="_blank">http://www.trustedbsd.org/sebsd.html</a>.</li>
<li>SE-Darwin. Security Enhanced Darwin. [Online] <a href="http://sedarwin.org/" target="_blank">http://sedarwin.org/</a>.</li>
<li>Trusted Solaris Operating Environment &#8211; Documentation. Trusted Solaris Operating System. [Online]<a href="http://www.sun.com/software/solaris/trustedsolaris/documentation/index.xml" target="_blank"> http://www.sun.com/software/solaris/trustedsolaris/documentation/index.xml</a>.</li>
<li>Project FMAC: Flexible Mandaroy Access COntrol. [Online] <a href="http://hub.opensolaris.org/bin/view/Project+fmac/" target="_blank">http://hub.opensolaris.org/bin/view/Project+fmac/</a>.</li>
<li>Datasheet. Montavista &#8211; Mobilinux. [Online]<a href="http://www.mvista.com/download/MontaVista-Mobilinux-5-datasheet.pdf" target="_blank"> http://www.mvista.com/download/MontaVista-Mobilinux-5-datasheet.pdf</a>.</li>
<li>Openmoko-Selinux. GSoC. [Online] <a href="Openmoko-Selinux. GSoC. [Online] http://code.google.com/openmoko-selinux/." target="_blank">http://code.google.com/openmoko-selinux/</a>.</li>
<li>Mobile. Trusted Computing Group. [Online] <a href="http://www.trustedcomputinggroup.org/developers/mobile" target="_blank">http://www.trustedcomputinggroup.org/developers/mobile</a>.</li>
<li>A trusted mobile phone reference architecturevia secure kernel.  Zhang, X. and Ac{\i}i{\c{c}}mez, O. and Seifert, J.P. s.l. : Proceedings  of the 2007 ACM workshop on Scalable trusted computing, 2007.</li>
<li> Building Efficient Integrity Measurement and Attestation for Mobile   Phone Platforms. Zhang, X. and Ac{\i}i{\c{c}}mez, O. and Seifert, J.P.   s.l. : Security and Privacy in Mobile Information and Communication   Systems: First International ICST Conference, MobiSec 2009, Turin,   Italy, June 3-5, 2009, Revised Selected Papers.</li>
<li> PRIMA: policy-reduced integrity measurement architecture. Jaeger,  T. and Sailer, R. and Shankar, U. s.l. : Proceedings of the eleventh ACM  symposium on Access control models and technologies, 2006.</li>
<li> Mandatory Access Control for Mobile Devices. Ekberg, Elena  Reshetova and Jan-Erik. s.l. : Nokia Research Center Helsinki.  NRC-TR-2008-010.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/08/history-and-evolution-of-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Porting TPM Emulator on  Openmoko</title>
		<link>http://imsciences.edu.pk/serg/2010/08/porting-tpm-emulator-on-openmoko/</link>
		<comments>http://imsciences.edu.pk/serg/2010/08/porting-tpm-emulator-on-openmoko/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 06:27:09 +0000</pubDate>
		<dc:creator>Ibrahim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=619</guid>
		<description><![CDATA[Trusted Computing Group[1] is an alliance initiated to provide trusted computing by developing a chip following the specifications[2] , revised edition published in July 2007, thus providing cryptographic  keys[3]  used for security of Information.   
Openmoko[4] Inc. sponsored a project for the creation of mobiles phones with open architecture, both hardware and operating system; the project was [...]]]></description>
			<content:encoded><![CDATA[<p><body align="justified"><a title="Trusted Computing Group" href="http://www.trustedcomputinggroup.org/" target="_blank">Trusted Computing Group</a>[1] is an alliance initiated to provide trusted computing by developing a chip following the <a title="TCG Specification" href="http://en.wikipedia.org/wiki/Specification" target="_blank">specifications</a>[2] , revised edition published in July 2007, thus providing <a title="Cryptographics Keys" href="http://en.wikipedia.org/wiki/Cryptography" target="_blank">cryptographic  keys</a>[3]  used for security of Information.   <br />
<a title="Openmoko" href="http://en.wikipedia.org/wiki/Openmoko" target="_blank">Openmoko</a>[4] Inc. sponsored a project for the creation of mobiles phones with open architecture, both hardware and operating system; the project was name <a title="Openmoko" href="http://en.wikipedia.org/wiki/Openmoko" target="_self">Openmoko</a>[4]. In the mid 2008 Neo FreeRunner came out to the market, with the beauty of customization of its operating system and software stack. There are various other phones supporting Openmoko.</p>
<p>In this documentation we cover the proper deployment of a TPM emulator on the software stack of Openmoko device. This task is a deliverable in the project DBAMP funded by ICT R&amp;D accomplished at SERG.</p>
<p><strong> </strong></p>
<p><strong>Contents</strong><strong></strong></p>
<ol>
<li>TPM/MTM Emulators</li>
<li>Obtaining Tool Chain</li>
<li>Installation of TPM Emulator</li>
<li>Installation of TPM Tools</li>
<li>Installation of Trousers</li>
<li>Trouble shooting</li>
<li>References<br />
 </li>
</ol>
<p><strong>1. TPM/MTM Emulator</strong><br />
Software based Emulator for <a title="TPM" href="http://en.wikipedia.org/wiki/Trusted_Platform_Module" target="_blank">TPM</a>[5]/MTM is a flexible simulator of the hardware TPM/MTM providing a strong platform for testing and debugging tool for programmers. The emulator is portable to different operating systems like Linux, Mac, Windows etc, and provides compatibility to common Software’s.</p>
<p><strong>2. Obtaining Tool Chain<br />
</strong>You need a <a href="http://downloads.openmoko.org/developer/toolchains/openmoko-i686-20090323-armv4t-linux-gnueabi-toolchain-openmoko.tar.bz2" target="_blank">tool chain</a>[6] to cross compile the libraries and to setup environment for cross compilation. The Tools-Chain’s Cross-compiler will compile the source code from native machine (x86 in our case) to a target platform (ARM).  To Download the tool chain <a href="http://downloads.openmoko.org/developer/toolchains/openmoko-i686-20090323-armv4t-linux-gnueabi-toolchain-openmoko.tar.bz2" target="_blank">Click here</a>.</p>
<p> Extract the contents of the archive to the root directory and the files will get to /usr/local/openmoko.<br />
 </p>
<p><strong>3.Installation of TPM Emulator</strong><br />
First we have to download the <a title="TPM Emulator" href="http://tpm-emulator.berlios.de/download.html" target="_blank">TPM emulator </a>[7]from the site given below<br />
<a href="http://tpm-emulator.berlios.de/download.html">http://tpm-emulator.berlios.de/download.html</a><br />
To use the <a title="TPM Emulator" href="http://tpm-emulator.berlios.de/download.html" target="_blank">TPM emulator </a>[7]you have to perorm the following step.The downloaded file is in tar.gz form.First unextract it through the command given below<br />
 <br />
<strong>#tar -xvzf tpm_emulator-X.Y.tar.gz</strong><strong><br />
</strong> <br />
Then go to the tpm emulator directory through the command<br />
 <br />
<strong># cd tpm_emulator-X.Y</strong><strong><br />
</strong> <br />
In tpm emulator directory we have to make another directory named as build through the command<br />
 <br />
<strong># mkdir build</strong></p>
<p>Go in to build directory through the command given below<br />
 <br />
<strong># cd build</strong> <br />
<strong># . /usr/local/openmoko/arm/bin/setup-env</strong><strong><br />
<strong># . /usr/local/openmoko/arm/envirnoment-setup</strong><br />
</strong> <br />
 Now execute this command in terminal</p>
<p><strong># cmake ../</strong><br />
 <br />
After cmake you have to install libgmp3-dev otherwise it will give you error.<br />
 <br />
<strong>#apt-get install libgmp3-dev</strong><br />
 <br />
Then excute the following command<br />
 <br />
<strong># make</strong><strong><br />
<strong># make install</strong><br />
</strong> <br />
To start using the tpm emulator in linux you have excute the following command<br />
 <br />
<strong>#depmod -a(To resolve the dependencies)</strong><strong><br />
<strong># modprobe tpmd_dev</strong><br />
<strong># tpmd</strong><br />
</strong> <br />
<strong>4.Installation of TPM Tools </strong><strong><br />
</strong>First we have to download the <a title="TPM Tools" href="http://sourceforge.net/projects/trousers/files/tpm-tools/1.3.5/tpm-tools-1.3.5.tar.gz/downloadTo" target="_blank">TPM Tools </a>[8]from the site given below<br />
<a href="http://sourceforge.net/projects/trousers/files/tpm-tools/1.3.5/tpm-tools-1.3.5.tar.gz/downloadTo">http://sourceforge.net/projects/trousers/files/tpm-tools/1.3.5/tpm-tools-1.3.5.tar.gz/downloadTo</a></p>
<p>use the TPM Tools you have to perorm the following step.The downloaded file is in tar.gz form.First unextract it through the command given below<br />
 <br />
<strong>#tar -xvzf tpm_tools.tar.gz</strong><strong><br />
<strong># . /usr/local/openmoko/arm/bin/setup-env<br />
</strong></strong><strong><strong># . /usr/local/openmoko/arm/envirnoment-setup</strong><br />
<strong># ./configure</strong><br />
<strong>#make</strong><br />
<strong>#make install</strong><br />
</strong> <br />
 <br />
<strong>5.Installation of Trousers</strong><br />
 First we have to download the <a title="Trouser" href="http://sourceforge.net/projects/trousers/files/To" target="_blank">Trouser</a>[9] from the site given below<br />
<a href="http://sourceforge.net/projects/trousers/files/To">http://sourceforge.net/projects/trousers/files/To</a> use the Trousers you have to perorm the following step<br />
 <br />
The downloaded file is in tar.gz form.First unextract it through the command given below<br />
 <br />
<strong>#tar -xvzf trouser-X.Y.tar.gz</strong><strong><br />
</strong> <br />
Then go to the trouser directory through the command<br />
 <br />
<strong># cd trouser-X.Y</strong><strong><br />
<strong># . /usr/local/openmoko/arm/bin/setup-env</strong><br />
<strong># . /usr/local/openmoko/arm/envirnoment-setup</strong><br />
<strong># ./configure</strong><br />
<strong>#make</strong><br />
<strong>#make install</strong><br />
</strong> </p>
<p><strong>6.Trouble Shooting</strong></p>
<p><strong>7.References</strong><strong><br />
</strong> <br />
[1]<a href="http://www.trustedcomputinggroup.org/">http://www.trustedcomputinggroup.org/</a><br />
[2]<a href="http://www.trustedcomputinggroup.org/resources/tpm_main_specification">http://www.trustedcomputinggroup.org/resources/tpm_main_specification</a><br />
[3]<a href="http://en.wikipedia.org/wiki/Cryptography">http://en.wikipedia.org/wiki/Cryptography</a><br />
[4]<a href="http://en.wikipedia.org/wiki/Openmoko">http://en.wikipedia.org/wiki/Openmoko</a><br />
[5]<a href="http://en.wikipedia.org/wiki/Trusted_Platform_Module">http://en.wikipedia.org/wiki/Trusted_Platform_Module</a><br />
[6]<a href="http://downloads.openmoko.org/developer/toolchains/openmoko-i686-20090323-armv4t-linux-gnueabi-toolchain-openmoko.tar.bz2">http://downloads.openmoko.org/developer/toolchains/openmoko-i686-20090323-armv4t-linux-gnueabi-toolchain-openmoko.tar.bz2</a><br />
[7http://tpm_emulator.berlios.de/                                                                                                                                                                                                                                                                                                                   <a href="http://sourceforge.net/projects/trousers/files/">[8]</a><a href="http://sourceforge.net/projects/trousers/files/tpm-tools/1.3.5/tpm-tools-1.3.5.tar.gz/download">http://sourceforge.net/projects/trousers/files/tpm-tools/1.3.5/tpm-tools-1.3.5.tar.gz/download</a><a href="http://sourceforge.net/projects/trousers/files/"><br />
[9]http://sourceforge.net/projects/trousers/files/</a></body></p>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/08/porting-tpm-emulator-on-openmoko/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discreationary Access Control</title>
		<link>http://imsciences.edu.pk/serg/2010/07/discreationary-access-control/</link>
		<comments>http://imsciences.edu.pk/serg/2010/07/discreationary-access-control/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 06:30:07 +0000</pubDate>
		<dc:creator>alishinwari</dc:creator>
				<category><![CDATA[MAC on mobile platform]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=587</guid>
		<description><![CDATA[Discretionary Access Control
A general notion of discretionary security suggests that DAC [1] [2] is any security policy or a security mechanism where ordinary users are  involved in defining the security policy. Discretionary access control  (DAC) is defined by the Trusted Computer System Evaluation Criteria [3] as &#8220;a means of restricting access to objects [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Discretionary Access Control</strong></p>
<p>A general notion of discretionary security suggests that DAC <sup id="cite_ref-0">[1]</sup> <sup id="cite_ref-0">[2]</sup> is any security policy or a security mechanism where ordinary users are  involved in defining the security policy. Discretionary access control  (DAC) is defined by the Trusted Computer System Evaluation Criteria <sup id="cite_ref-0">[3]</sup> as &#8220;a means of restricting access to objects based on the identity of  subjects and/or groups to which they belong. The controls are  discretionary in the sense that a subject with certain access permission  is capable of passing that permission (perhaps indirectly) on to any  other subject (unless restrained by mandatory access control)&#8221;.<br />
In discretionary access control individual users can grant or deny  permissions to other programs and applications on the platform, on the  objects that are owned by them. In most cases the authorizations are  stored in an access control matrix and the access requests from users  are checked against the corresponding authorizations in the ACM. Access  control matrix and its various implementations are discussed in the  following subsections.</p>
<p><strong>Access Control Matrix</strong></p>
<p>An Access Control Matrix or Access Matrix <sup id="cite_ref-0">[4]</sup> stores the rights and permissions of each subject with respect to every  object in the system and represents an abstract model of permissions.  If the ACM is literally implemented as it is then the resulting data  structure will have excessive memory requirements. Therefore to make it  more practical some variations of the access matrix are implemented in  the real world which are slightly different from its literal  representation, but nonetheless serve the same purpose. The variations  of access control matrix include capability-based systems and access  control lists.<br />
<strong> </strong></p>
<p><strong>Implementation of Access Control Matrix</strong></p>
<p><strong> Access Control Lists</strong></p>
<p>An access control list (ACL) is a list of permissions associated with  an object. An ACL is a table that specifies which access rights each  user has on a particular system object. The list has an entry for each  system user and his or hers corresponding access privileges e.g. read,  write or execute. When a user or a process tries to access an object the  operating system lookup the entries in the ACL defined for that  particular object and determines whether the user or the process is  authorized to perform underlying operation.</p>
<p><strong> Capability based systems</strong></p>
<p>Capability-based systems use capabilities as a token of authority in  order to determine the authorization of users. A capability refers to an  object and the set of access rights that are associated with it. A user  program will use a capability to access an object and may also share  its own capability with other programs and also with the operating  system infrastructure, which provides the primary means of granting and  distributing access rights within the system.<br />
Capabilities achieve their objective of improving system security by  being used in place of forgeable references. A forgeable reference  identifies an object such as the file path of an object, but does not  specify which access rights are appropriate for that object. If a user  program or a processes possesses a capability entitles it to use object  that the capability refers to and to exercise the rights that it  associates with the object.</p>
<p><strong>References</strong></p>
<ol>
<li> Access control: Principles and practice. Sandhu, R.S. and Samarati,  P. New York : Communications Society of Institute of Electrical and  Electronics Engineers, 1994, IEEE Communications Magazine, Vol. 32, pp.  40&#8211;49.</li>
<li> Issues in discretionary access control. Downs, D.D. and Rub, J.R.  and Kung, K.C. and Jordan, C.S. s.l. : IEEE Computer Society, 1987,  Tutorial computer and network security.</li>
<li> Trusted computer system evaluation criteria. Qiu, L. and Zhang, Y.  and Wang, F. and Kyung, M. and Mahajan, H.R. s.l. : Citeseer, 1985,  National Computer Security Center.</li>
<li>Protection. Lampson, B.W. s.l. : ACM, 1974, ACM SIGOPS Operating Systems Review, Vol. 8, pp. 18&#8211;24.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/07/discreationary-access-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mandatory Access Control</title>
		<link>http://imsciences.edu.pk/serg/2010/07/mandatory-access-control/</link>
		<comments>http://imsciences.edu.pk/serg/2010/07/mandatory-access-control/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 06:30:06 +0000</pubDate>
		<dc:creator>alishinwari</dc:creator>
				<category><![CDATA[MAC on mobile platform]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=588</guid>
		<description><![CDATA[Mandatory Access Control
Mandatory access control (1) aims to improve the security of computer  systems by overcoming the weaknesses found in the discretionary access  control systems. One of the major weaknesses of DAC is that it treats  all of the processes of a user equally and does not differentiate  between them i.e. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Mandatory Access Control</strong></p>
<p>Mandatory access control (1) aims to improve the security of computer  systems by overcoming the weaknesses found in the discretionary access  control systems. One of the major weaknesses of DAC is that it treats  all of the processes of a user equally and does not differentiate  between them i.e. all of the processes of a user have exactly the same  permissions as the user himself. This creates several problems in the  real world where malicious programs may exploit the permissions and  privileges of a user on whose behalf they are being executed within the  system, Trojan horses can easily exploit this weakness, -Whereby an  unsuspecting user executes the malicious application as a result of  which the security of the system is compromised.</p>
<p>A mandatory security policy is considered to be any security policy  where the definition of the policy logic and the assignment of security  attributes are tightly controlled by a system security policy  administrator. MAC enforces access control on the basis of the labels  assigned to subjects and objects. A mandatory access control policy  specifies how subjects may access objects under the control of the  operating system.<br />
In any system which supports mandatory security, some applications  require special privileges in the mandatory policy in order to perform  some security-relevant function. Such applications are frequently called  trusted applications because they are trusted to correctly perform some  security-related function and because they are trusted to not misuse  privileges required in order to perform that function. If the mandatory  security mechanisms of a secure operating system only support coarse  grained privileges, then the security of the overall system may devolve  to the security of the trusted applications on the system. The mandatory  security mechanisms of most of the operating system use the principle  of least privilege to reduce the dependency on trusted applications.  Type enforcement is an example of a mandatory security mechanism which  is used to limit trusted applications to the minimal set of privileges  required for their function and also to confine the damage caused by any  misuse of these privileges.<br />
MAC is often used to provide domain isolation, a mechanism used to  rigorously confine an application to a unique security domain that is  strongly separated from other domains in the system. As a result any  damage arising from the misuse or exploitation of an application is  restricted to a single security domain without disrupting the  functionality applications running in different domains. This  confinement property is critical to controlling data flows in support of  a system security policy. In the case of personal computing systems,  where the user may be the system security policy administrator,  mandatory security mechanisms are helpful in protecting against flawed  or malicious software.</p>
<p><strong>Multi Level Security</strong></p>
<p>Multilevel security (MLS) is used to process information with  different sensitivities and to prevent unauthorized access to  information. MLS allows the information to flow freely between  recipients in a computing system who have appropriate security  clearances while preventing the leakage of information to unauthorized  users. MLS is most commonly used in military and government  applications.<br />
The notion of MLS seems very simple but unfortunately it is not easy to  implement modern in computer systems effectively, where the sheer  complexity of information flows within the system makes it impossible to  prevent the leakage of data from high classification levels to lower  ones. Furthermore more often than not MLS is not reliable and suitable  enough for truly large scale systems.<br />
Various security mechanisms are based on MLS each serves a different  purpose e.g. confidentiality or integrity of information etc. Lattice  based access control systems, Bell-La Padula, Biba and clark Wilson  models may be viewed as variations of the multi-level security model.</p>
<p><strong>Lattice based access control</strong></p>
<p>Lattice based systems <sup id="cite_ref-0">[2]</sup><sup id="cite_ref-0">[3]</sup> are concerned with preserving the confidentiality and integrity of  information flows with in a system and were formally defined by Denning.  Lattice-based access control (LBAC) is a complex access control  mechanism based on the interaction between any combination of objects  and subjects. A lattice is used to define the levels of security that an  object may have and that a subject may have access to. The subject is  only allowed to access an object if the security level of the subject is  greater than or equal to that of the object.</p>
<p><strong>Bell-La Padula</strong></p>
<p>The Bell-La Padula model <sup id="cite_ref-0">[4]</sup> focuses on the confidentiality of data and access to classified  information and aims to protect information from unauthorized subjects.  Bell-La Padula is inspired from the hierarchy and information flow rules  of military organizations and is the predominant form of access control  in governmental and military applications. Access decision is taken on  the basis of the security labels that are assigned to subjects and  objects of a system. The security label of the subjects is known as  “Security clearance” while the security label of an object is termed as  its “Security classification”. The label of an object shows the  sensitivity of the information contained within, while the label of a  subject denotes the extent of sensitive information that can be accessed  e.g. Top Secret, Secret, Classified, Unclassified, Public etc.<br />
The model defines two mandatory access control (MAC) rules and one  discretionary access control (DAC) rule with three security properties:<br />
• The Simple Security Property: a subject at a given security level may  not read an object at a higher security level (no read-up).<br />
• The *-property: a subject at a given security level must not write to  any object at a lower security level (no write-down). The *-property is  also known as the Confinement property.<br />
• The strong *-property: an alternative to the *-Property in which  subjects are only allowed to write objects at their own security level.  Thus, the write-up operation permitted in the usual *-Property is not  present.<br />
The transfer of information from a document of higher security level to a  document in the lower security levels may happen in the Bell-La Padula  model via the concept of trusted subjects. Trusted Subjects are not  restricted by the *-property while un-trusted subjects are. Trusted  Subjects must be shown to be trustworthy with regard to the security  policy.<br />
With Bell-La Padula, users can create content only at or above their own  security level e.g. users having the security clearance of “secret” can  create documents with security classification of “secret” or  “top-secret”, but they are not allowed to create public files. While at  the same time users can view content only at or below their own security  level.</p>
<p><strong>Biba</strong></p>
<p>The Biba Model or Biba Integrity Model describes a set of access  control rules designed to ensure data integrity. Data and subjects are  grouped into ordered levels of integrity. In contrast to the Bell-La  Padula model, subjects are not allowed to read information from the  lower security level so users can only view content at or above their  own integrity level. While at the same time writing to higher levels is  prohibited.<br />
In general the model was developed to circumvent a weakness in the  Bell-La Padula Model which only addresses data confidentiality. The  rules defined by the Biba model are the reverse of the Bell-La Padula  rules:<br />
• The Simple Integrity Axiom states that a subject at a given level of  integrity must not read an object at a lower integrity level (no read  down).<br />
• The * (star) Integrity Axiom states that a subject at a given level of  integrity must not write to any object at a higher level of integrity  (no write up).</p>
<p><strong>Low Water-Mark Model</strong></p>
<p>Low Water-Mark also serves to protect the integrity of objects and  information in a system and its rules are similar to the Biba model with  one major difference <sup id="cite_ref-0">[5]</sup>.  The LOMAC model allows a subject to decrease its integrity level in  order to read information from objects of lower integrity in which case  the subject having decrease its integrity will not be able to write to  the higher integrity objects so as to preserve their and to prevent the  low integrity information from flowing into the higher integrity  objects.</p>
<p><strong>Clark Wilson</strong></p>
<p>The Clark-Wilson integrity <sup id="cite_ref-0">[6]</sup> model provides a foundation for specifying and analyzing an integrity  policy for a commercial application system. The rules of Clark Wilson’s  model are based on commercial data processing practices and are  primarily concerned with formalizing the notion of information  integrity.<br />
Information integrity is maintained by preventing corruption of data  items in a system due to either error or malicious intent. An integrity  policy describes how the data items in the system should be kept valid  from one state of the system to the next and specifies the capabilities  of various principals in the system. The model defines enforcement rules  and certification rules.<br />
In contrast to the Bell-La Padula model, Clark-Wilson is more clearly  applicable to business and industry processes in which the integrity of  the information content is paramount at any level of classification.<br />
The model uses two categories of mechanisms to realize integrity:  well-formed transactions and separation of duty. The core of the model  is based on the notion of a transaction.<br />
• A well-formed transaction consists of a series of operations that  transition a system from one consistent state to another consistent  state and is defined as a transaction where the user is unable to  manipulate data arbitrarily, but only in a constrained manner that  preserves or ensures the integrity of the data. Well-formed transactions  ensure that only legitimate actions can be executed so that the data is  accurate and consistent to what it represents in the real world.<br />
• The principle of separation of duty states no single person should  perform a task from beginning to end, but should be divided among two or  more people to prevent fraud by one person acting alone. According to  this principle the certifier of a transaction and the implementer be  different entities.<br />
• In this model the integrity policy addresses the integrity of the transactions.<br />
The model contains a number of basic constructs that represent both data  items and processes that operate on those data items. Clark-Wilson  model partitions all data in a system into two categories -constrained  data items (CDI) and unconstrained items (UDI), data items for which  integrity must be ensured. The (CDI) are objects that the integrity  model is applied to and (UDI) are objects that are not covered by the  integrity policy. Two procedures are then applied to these data items  for protection. The first procedure integrity verification procedure  (IVP), verifies that the data items are in a valid state. The second  procedure is the transformation procedure (TP) or well-formed  transaction, which changes the data items from one valid state to  another. If only a transformation procedure is able to change data  items, the integrity of the data is maintained.<br />
Two types of rules have been defined in the Clark-Wilson model to ensure  that integrity is preserved and achieved. These two types of rules are  called integrity-monitoring (certification rules) and  integrity-preserving rules (enforcement rules). The integrity-monitoring  rules are enforced by the administrator and the integrity-preserving  rules are enforcement rules guaranteed by the system.</p>
<p><strong>Chinese wall policy</strong></p>
<p>The Chinese wall policy caters to the information flow requirements  of commercial sector organizations in general and financial sector in  particular. The rules of Chinese wall can be easily understood by taking  the example of an analyst working for a financial sector organization  which provides services to various corporations. In such a scenario the  financial organization has to adhere to rigorous rules and follow  certain guidelines that have been devised to protect the confidential  data of its clients, which in most cases are competitors of each other,  to prevent the business secrets of one from falling into the hands of  another. This means that the organization must not allow the analyst to  advise a corporate client if he happens to have knowledge of or access  to data and information of its competitors. Therefore the analyst is  only allowed to advise and guide those organizations who are competitors  of each other.<br />
The Chinese wall policy works by dividing datasets into groups or  categories, the group is called a “Conflict of interest class”, the  conflict of interest class in general represents a business sector. A  subject can access at most on dataset from any such conflict of interest  class, therefore in the Chinese wall policy the access history of a  subject determines what kind of objects or datasets he is allowed to  access. If a subject has accessed a dataset from one conflict of  interest class then any subsequent attempts to access other datasets  from the said conflict of interest class are denied. Initially the users  has the choice to access any dataset, once the initial choice has been  made and a dataset is accessed then the user cannot access other  datasets that belong to the same conflict of interest class, hence a  wall is created around the dataset that has been accessed and the  datasets that belong the same conflict of interest class are viewed as  being on the wrong side of the wall, furthermore datasets belonging to  other conflict of interest classes can be accessed by the user. As the  user accesses datasets from other conflict of interest classes the wall  changes its shape to include the newly selected dataset and the  remaining items of its conflict of interest class also become  inaccessible as they are now also on the wrong side of the wall.  Therefore access to an object is allowed if it belongs to the datasets  that have already been accessed and are therefore inside the wall, or if  the object belongs to a dataset whose conflict of interest class has  not been accessed before by the user.<br />
In United Kingdom the Chinese Wall requirements of the UK Stock Exchange  must be implemented either manually or via automated means and are  mandatory as per law <sup id="cite_ref-0">[7]</sup>.</p>
<p>References:</p>
<ol>
<li>Trusted computer system evaluation criteria. Qiu, L. and Zhang, Y. and  Wang, F. and Kyung, M. and Mahajan, H.R. s.l. Citeseer, 1985, National  Computer Security Center.</li>
<li> A lattice model of secure information flow. Denning, D.E. s.l. : ACM New York, NY, USA, 1976.</li>
<li>Lattice-based access control models. Sandhu, R.S. 11, s.l. : IEEE computer, 1993, Vol. 26.</li>
<li>Computer security model: Unified exposition and multics interpretation.  Bell, D.E. and LaPadula, L.J. s.l. : MITRE Corp., Bedford, MA, Tech.  Rep. ESD-TR-75-306, June, 1975.</li>
<li>Biba., K. J. Integrity Considerations for Secure Computer Systems. .  Bedford, Massachusetts : USAF Electronic Systems Division, Hanscom Air  Force Base, April 1977. Technical Report ESD-TR-76-372</li>
<li>A comparison of commercial and military computer security policies.  Clark, D.D. and Wilson, D.R. s.l. : NATIONAL INSTIUTE OF STANDARDS &amp;  TECHNOLOGY, 1989, Vol. NIST SPECIAL PUBLICATION SP.</li>
<li>The Chinese wall security policy. Brewer, D.F.C. and Nash, M.J. s.l. :  Proceedings of the 1989 IEEE Symposium on Security and Privacy, 1989.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/07/mandatory-access-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Role Based Access Control</title>
		<link>http://imsciences.edu.pk/serg/2010/07/role-bases-access-control/</link>
		<comments>http://imsciences.edu.pk/serg/2010/07/role-bases-access-control/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 06:30:03 +0000</pubDate>
		<dc:creator>alishinwari</dc:creator>
				<category><![CDATA[MAC on mobile platform]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=589</guid>
		<description><![CDATA[Role Based Access Control
The idea of role based access control was first introduced during the  1970&#8217;s and this model is most widely implemented on computer systems  where the number of users is relatively large, where it became  increasingly difficult for a system administrator to define and assign  permissions to each and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Role Based Access Control</strong></p>
<p>The idea of role based access control was first introduced during the  1970&#8217;s and this model is most widely implemented on computer systems  where the number of users is relatively large, where it became  increasingly difficult for a system administrator to define and assign  permissions to each and every user of a computer system. RBAC was  introduced to streamline the cumbersome process of security management  roles are used to group users with similar permissions together,  permissions are then assigned to the roles which are inherited by the  users who are its members, thus making the lives of system  administrators much easier and simplifies the task of permission  management.<br />
Generally the roles that are created on a system or a group of systems  vary from organization to organization and usually depend on their job  functions. When roles are created and permissions have been granted to  them these roles can be assigned to users based on their  responsibilities and authorizations. Roles are very flexible and it is  easy to add or remove users from roles. It&#8217;s easy to assign new  permissions as well as to revoke permissions from the roles within a  system.<br />
In RBAC the decision to allow access to a piece of data depends upon the  role of the user and the permissions associated with that role. Hence  the policy enforced by an RBAC access control system depends upon how  the owner or the security administrator of the computing platform  configures the various components of RBAC including the roles their  permissions and the assignment of roles to the users, as well as the  hierarchy of the roles and the relationships among them.</p>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/07/role-bases-access-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tree Walker file</title>
		<link>http://imsciences.edu.pk/serg/2010/07/tree-walker-file/</link>
		<comments>http://imsciences.edu.pk/serg/2010/07/tree-walker-file/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 11:24:44 +0000</pubDate>
		<dc:creator>mir.nauman</dc:creator>
				<category><![CDATA[Policy Writing]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=577</guid>
		<description><![CDATA[It is highly recommended to go through the following links first

http://imsciences.edu.pk/serg/2010/07/antlr-introduction/
http://imsciences.edu.pk/serg/2010/07/setting-up-antlr-3-1-in-eclipse-3-5-for-windows/
http://imsciences.edu.pk/serg/2010/07/grammer-file-syntex-symentics-of-our-policy-writing-with-antlr/

In this grammar file we do our semantic analysis, by walking and evaluating the nodes, of the AST tree, generated in our grammar file.
tree grammar StatementWalker1;
options {
language = Java;
tokenVocab = XL1;
ASTLabelType = CommonTree;
}
@header{
package com.fawad.policywritingtool;
}
policy
: (mode &#8216;(&#8221;&#8221;&#8216; appname &#8216;&#8221;&#8216; &#8216;as&#8217; app &#8216;,&#8217; &#8216;&#8221;&#8216; permname&#8217;&#8221;&#8216; &#8216;as&#8217; perm [...]]]></description>
			<content:encoded><![CDATA[<p><strong>It is highly recommended to go through the following links first</strong></p>
<ul>
<li><strong>http://imsciences.edu.pk/serg/2010/07/antlr-introduction/</strong></li>
<li><strong>http://imsciences.edu.pk/serg/2010/07/setting-up-antlr-3-1-in-eclipse-3-5-for-windows/</strong></li>
<li><strong>http://imsciences.edu.pk/serg/2010/07/grammer-file-syntex-symentics-of-our-policy-writing-with-antlr/</strong></li>
</ul>
<p><strong>In this grammar file we do our semantic analysis, by walking and evaluating the nodes, of the AST tree, generated in our grammar file.</strong></p>
<div id="attachment_576" class="wp-caption aligncenter" style="width: 451px"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/treeWalker.jpg"><img class="size-full wp-image-576" title="treeWalker" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/treeWalker.jpg" alt="" width="441" height="394" /></a><p class="wp-caption-text">Figure 1. A screenshot of the tree of a statement.</p></div>
<p><em>tree grammar StatementWalker1;</em></p>
<p><em>options {</em></p>
<p><em>language = Java;</em></p>
<p><em>tokenVocab = XL1;</em></p>
<p><em>ASTLabelType = CommonTree;</em></p>
<p><em>}</em></p>
<p><em>@header{</em></p>
<p><em>package com.fawad.policywritingtool;</em></p>
<p><em>}</em></p>
<p><em>policy</em></p>
<p><em>: (mode &#8216;(&#8221;&#8221;&#8216; appname &#8216;&#8221;&#8216; &#8216;as&#8217; app &#8216;,&#8217; &#8216;&#8221;&#8216; permname&#8217;&#8221;&#8216; &#8216;as&#8217; perm &#8216;)&#8217; &#8216;:&#8217;</em></p>
<p><em>statement+ &#8216;-&gt;&#8217; policyeffect &#8216;(&#8216;app &#8216;,&#8217; perm &#8216;)&#8217; &#8216;;&#8217; )+</em></p>
<p><em>;</em></p>
<p><em>mode</em></p>
<p><em>: </em><em>RES</em></p>
<p><em>;</em></p>
<p><em>appname</em></p>
<p><em>: </em><em>IDENT(&#8216;.&#8217; </em><em>IDENT | &#8216;_&#8217; </em><em>IDENT)+</em></p>
<p><em>;</em></p>
<p><em>app</em></p>
<p><em>: </em><em>IDENT+</em></p>
<p><em>;</em></p>
<p><em>method</em></p>
<p><em>: </em><em>IDENT+&#8217;()&#8217;</em></p>
<p><em>;</em></p>
<p><em>permname</em></p>
<p><em>: </em><em>IDENT(&#8216;.&#8217; </em><em>IDENT | &#8216;_&#8217; </em><em>IDENT)+</em></p>
<p><em>;</em></p>
<p><em>perm</em></p>
<p><em>: </em><em>IDENT+</em></p>
<p><em>;</em></p>
<p><em><br />
</em></p>
<p><strong>An integer &#8216;result&#8217; is returned when the statement is evaluated</strong></p>
<p><em>statement returns [int result] :    e=expression  { result = e; }</em></p>
<p><em>;</em></p>
<p><em><br />
</em></p>
<p><strong>Following are the operators and their respective implementation in the walker</strong></p>
<p><em>expression returns [int result]</em></p>
<p><em>: ^(&#8216;AND&#8217; op1=expression op2=expression ) { if(op1==1 &amp;&amp; op2 == 1) result =1; else result =0;}</em></p>
<p><em>|^(&#8216;OR&#8217; op1=expression op2=expression ) { if(op1==1 || op2 == 1) result =1; else result =0;}</em></p>
<p><em>|^(&#8216;&gt;&#8217; op1=expression op2=expression) { result= op1 &gt; op2?1:0; }</em></p>
<p><em>| ^(&#8216;&lt;&#8217; op1=expression op2=expression) { result= op1 &lt; op2?1:0;}</em></p>
<p><em>| ^(&#8216;&gt;=&#8217; op1=expression op2=expression) { result= op1 &gt;= op2?1:0;}</em></p>
<p><em>| ^(&#8216;&lt;=&#8217; op1=expression op2=expression) { result= op1 &lt;= op2?1:0;}</em></p>
<p><em>| ^(&#8216;=&#8217; op1=expression op2=expression) { result= op1 != op2?1:0;}</em></p>
<p><em>| ^(&#8216;!=&#8217; op1=expression op2=expression) { result= op1 != op2?1:0;}</em></p>
<p><em>| ^(&#8216;+&#8217; op1=expression op2=expression) { result = op1 + op2; }</em></p>
<p><em>| ^(&#8216;-&#8217; op1=expression op2=expression) { result = op1 &#8211; op2; }</em></p>
<p><em>| ^(&#8216;*&#8217; op1=expression op2=expression) { result = op1 * op2; }</em></p>
<p><em>| ^(&#8216;/&#8217; op1=expression op2=expression) { result = op1 / op2; }</em></p>
<p><em>| ^(&#8216;%&#8217; op1=expression op2=expression) { result = op1 \% op2; }</em></p>
<p><em>| ^(</em><em>NEGATION e=expression) { result = -e;}</em></p>
<p><em>| </em><em>TRUE{ result = 1;}</em></p>
<p><em>| </em><em>FALSE{ result = 0;}</em></p>
<p><em>| </em><em>INTEGER { result= Integer.parseInt($INTEGER.text); }</em></p>
<p><em>;</em></p>
<p><strong>Policy effect returns an integer &#8216;res&#8217; with the value &#8216;1&#8242; for allow and  &#8217;0&#8242; for deny</strong></p>
<p><em>policyeffect returns [int res ]</em></p>
<p><em>: </em><em>ALLOW {res= 1 ;}</em></p>
<p><em>| </em><em>DENY {res= 0 ;}</em></p>
<p><em>;</em></p>
<p><em><strong>Courtesy of Fawad, Owais, &amp; Mir Nauman Tahir</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/07/tree-walker-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Deployment of a Mandatory Access Control Mechanism on the mobile platform</title>
		<link>http://imsciences.edu.pk/serg/2010/07/deployment-of-a-mandatory-access-control-mechanism-on-the-mobile-platform/</link>
		<comments>http://imsciences.edu.pk/serg/2010/07/deployment-of-a-mandatory-access-control-mechanism-on-the-mobile-platform/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 10:35:12 +0000</pubDate>
		<dc:creator>alishinwari</dc:creator>
				<category><![CDATA[MAC on mobile platform]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=562</guid>
		<description><![CDATA[ 
Introduction
The mobile devices and their related technologies have been developing significantly and have changed a lot during the last decade. With the passage of time the computing capabilities of these mobile devices have been increasing rapidly, which are now comparable to the personal computers that existed in the market five to eight years ago. [...]]]></description>
			<content:encoded><![CDATA[<p><strong> </strong></p>
<p><strong>Introduction</strong></p>
<p>The mobile devices and their related technologies have been developing significantly and have changed a lot during the last decade. With the passage of time the computing capabilities of these mobile devices have been increasing rapidly, which are now comparable to the personal computers that existed in the market five to eight years ago. The usability of these devices has also improved a great deal along with their computing power and there has been a considerable change in the way these mobile devices are deployed and the way people use them.<br />
As a result these mobile devices have evolved from being devices dedicated only for communication purpose to general purpose computing platforms. Therefore the use of these mobile devices is not limited to making calls and sending text messages only, instead they are being used to consume a wide range of services e.g. browsing the web either using GPRS or Wi-Fi, running various softwares that can be used to carry out business transactions or sending emails, creating spreadsheets, presentations, word documents. Besides this these devices also host a variety of multimedia capabilities such as camera and imaging capabilities, music and jukebox capabilities, movies and video playback as well as a gaming capabilities etc. Therefore Mobile phones are now sophisticated smart phones that provide services beyond basic telephony, such as supporting third-party applications. These third-party applications may very well be security-critical in some cases, such as mobile banking, online business, e-governance and other commercial applications, other third party applications may be untrusted, such as games that have been downloaded from the internet.<br />
As the nature of the usage of these devices has changed so have their security requirements. The nature of security threats encountered on the mobile devices is very much different from those found in the PC world. The major threat comes from the applications that are downloaded and executed on the mobile device. The malicious application can be downloaded by the user on to the device via GPRS, Wi-Fi, or may be received via Bluetooth from other mobile devices. These malicious applications might potentially damage the personal data of the user on the mobile device such as deleting the address book and the messages from the inbox, malicious applications can also delete or overwrite sensitive operating system files, a malicious application may send SMS or make voice calls to premium numbers without the consent of the user hence incurring a huge economic cost to the user.<br />
More and more applications are being developed by third party application developers for these powerful mobile devices which are easily available for download from the internet. however the introduction of third party applications on the mobile phone gives rise to some very critical security concerns as these phones host a variety of trusted code and sensitive information that needs to be protected from third party applications and untrusted code. There is no shortage of sensitive applications such as the banking applications for mobile phones, which are valuable targets for the cyber criminals who discover and exploit any vulnerability that might exist on the platform. Cyber criminals have exploited many vulnerabilities of the Symbian platform to launch various kinds of worm attacks on the devices that run the Symbian operating system. As the Linux and Windows based smartphones grow in numbers, it is eminent that they are an obvious target for malwares. As a result of these developments, research activities in the field of mobile platform’s security has gained momentum as researchers try counter the threats faced by the trusted applications running on these versatile devices and to alleviate the concerns of their users.<br />
In order to counter the threats faced by the mobile devices various access control mechanisms are deployed to protect the services running on the device as well as the data of the user stored on these devices. Discretionary access control is the predominant form of security mechanism that exists on an overwhelming majority of mobile phones. While this type of access control mechanism is simple however past experience has shown that it is insufficient to cater the security needs of an open platforms such as Linux and windows based operating systems for mobile phones. As more and more vulnerabilities have been discovered in mobile phones, researchers in the field of mobile phones security have taken rigorous initiative to counter the threats that are now staring in their eyes as a result research in this particular field is gathering momentum to keep up with the challenges that are arising in the wake of rapid advancements in the technology of mobile phones including the software and the hardware.<br />
Recent research work has focused on leveraging the features of Mandatory access control which provides the foundation needed to build a secure environment where trusted and untrusted code co-exist on the platform in such a manner that the trusted code and sensitive data is protected from untrusted applications and unauthorized access.<br />
The report is organized as follows the introduction section gives a general overview of the existing access control models including mandatory access control. The second section outlines the various implementations of mandatory access control mechanisms on PC and mobile platforms. The third section provides detailed information about SELinux while the last section provides technical details about the process of porting SELinux to the linux based openmoko mobile phone.</p>
<p><strong>Access Control Systems</strong></p>
<p>Access control system <sup id="cite_ref-0" class="reference"><span>[</span>1<span>]</span></sup><sup id="cite_ref-0" class="reference"><span>[</span>2<span>]</span></sup> determines the privileges that a user or a program has on the system and consequently determines the operations that can be performed by them. Access control systems regulate access to the resources of a system in order to ensure that the users of a computing platform and the processes running on it access these resources in a controlled and authorized manner. The access control system limits the actions of the users and the programs on the system based on the permissions that have been assigned to them in order to protect the system and its resources from being compromised and to counter the threats originating from malicious users as well as malware applications.<br />
The access control system encompasses two key concepts of an access control policy and an access control mechanism. An access control policy provides high level guidelines about what type access is allowed and how the access control decision is going to be made by the reference monitor. Access control mechanism consists of a combination of hardware and software components of the system that are used to implement the access control policy.<br />
An important concept associated with the access control mechanisms is that of a reference monitor <sup id="cite_ref-0" class="reference"><span>[</span>3<span>]</span></sup>. The reference monitor intercepts and regulates the requests of users and applications to access various objects or resources in the system. The reference monitor then mediates the access requests and takes the decision of whether to allow or deny access based on the security policy of the platform which determines whether the user or the application is authorized to perform the underlying action on specified object.<br />
Although access control mechanisms are vital for preserving the security of the computing platform however to be effective and to prevent the security of the system from being compromised, these mechanisms have to work in tandom with other security services of the platform such as authentication, auditing and administration. While the access control mechanism controls the actions that a user is allowed to perform, the authentication mechanism is responsible for identifying the user usually with the help of a username and a password, therefore the access control mechanism assumes that the user has been successfully authenticated prior to enforcement of the access control by the reference monitor.<br />
All the actions of the users that are allowed by the reference monitor or denied are also examined by the auditing services of the platform and logs the relevant activity of the various users and applications running on the system.<br />
Three types of access control policies are most commonly used in computing systems around the world<br />
• <a href="http://imsciences.edu.pk/serg/2010/07/discreationary-access-control/" target="_blank">Discretionary access control</a><br />
• <a href="http://imsciences.edu.pk/serg/2010/07/mandatory-access-control/" target="_blank">Mandatory access control</a><br />
• <a href="http://imsciences.edu.pk/serg/2010/07/role-bases-access-control/" target="_blank">Role based access control</a></p>
<p>Effective access control systems in today’s computing environments use a combination of these security policies in the following subsections provide a brief introduction to the afore mentioned security policies.</p>
<p><strong> </strong></p>
<p><strong>References</strong></p>
<ol>
<li> Access control: The neglected frontier. Sandhu, R. s.l. : Springer, 1996, Lecture Notes in Computer Science, pp. 219&#8211;227.</li>
<li> Access control: Policies, models, and mechanisms. Samarati, P. and De Capitani di Vimercati, S. s.l. : Springer, 2001, Lecture Notes in Computer Science, pp. 137&#8211;196.</li>
<li> Computer Security Technology Planning Study. Anderson, J.P. and others. s.l. : ANDERSON (JAMES P) AND CO FORT WASHINGTON PA, 1972.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/07/deployment-of-a-mandatory-access-control-mechanism-on-the-mobile-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Security, A survey. So far so good.</title>
		<link>http://imsciences.edu.pk/serg/2010/07/android-security-a-survey-so-far-so-good/</link>
		<comments>http://imsciences.edu.pk/serg/2010/07/android-security-a-survey-so-far-so-good/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 09:11:27 +0000</pubDate>
		<dc:creator>mir.nauman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://imsciences.edu.pk/serg/?p=537</guid>
		<description><![CDATA[Abstract
Smartphones with open operating systems are getting popular with the passage of time. Increased exposure of open source smartphones also increased the security risk.  Android is one of the most popular open source operating system for mobile platforms. Android provide a base set of permissions to protect phone resources. But still the security area is [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Abstract</strong></p>
<p>Smartphones with open operating systems are getting popular with the passage of time. Increased exposure of open source smartphones also increased the security risk.  Android is one of the most popular open source operating system for mobile platforms. Android provide a base set of permissions to protect phone resources. But still the security area is underdeveloped. This survey is about the current work done on the Android operating system. Some of the techniques, which can give a positive edge to the security area, are analyzed in the present survey paper. These techniques are basically to provide a better security and to make the Android security mechanism more flexible. As the current security mechanism is too rigid. User does not have any control over the usage of an application. User has only two choices, a) allow all permissions and application will install, b) deny all permissions and installation will fail.</p>
<p>I.<strong>Introduction</strong></p>
<p>Smartphones are spreading day by day all over the world. However its security is still a big issue. The increased capability and computational power of smartphones increased the interest of developers towards the development of applications for this next generation platforms. Smartphones brings the mobility of traditional cell phones and the power of desktop computers in a single package. Weather updates, shopping, e-ticketing, mobile health and social networking, all on single platform with the additional factor of mobility. Where, the term mobility introduces, so the security and privacy becomes a major issue over there. In this emerging environment, applications are not stand alone. Applications expose its specific features to rest of applications installed on the same platform. And also use features of its neighbour applications. Where, this feature increases the functionality of an application, thereby it also welcomes some security threats. Which can’t be ignores in order to achieve a secure platform.</p>
<p>In the present environment of mobile platforms, Android is quite popular and famous open source and well customizable software package for cell phone devices. Android is a Google operating system for mobile platforms with the basic functionality of system utilities, middleware in form of VM and some core application like browser, dialler, calculator and some others as well.</p>
<p>The present applications are not enough to take full benefit of Android. So, third party developers create applications and launch it to the applications of Android Market. Users are able to download and install the launched applications. This is a sign of high availability of applications for users. But at the same time the user need trust full applications, which do not harm their privacy and security issues. Keeping this issue in mind, every application asks for permissions from the user during the time of installation. User has only two choices, either to grant all the required permissions and the application will be install. And once the permissions are granted, Android does not provide any facility to revoke those permissions, unless the user uninstalls the application.  If user denies the permissions so the application will fail installation. There is no mechanism to allow some permission and deny the rest.</p>
<p>Consider a weather update application that reads user’s location from his phone and provide weather updates on the base of time and location. Location information can be received by two ways. Either by taking location information automatically from GPS or the user himself enters his location where GPS is not available. At the time of installation, this application will ask for location permission. If the user grants the permission to the application so, the application will get install. The drawback is that, the application can collect the user location anytime, even user do not wish so. And if the user does not grant permission to the application during installation, so the application will not be install.</p>
<p>II. <strong>Background</strong></p>
<p>Android is a Google operating system launched for mobile platforms. The current architecture of Android is explained below:</p>
<p><strong>2.1 </strong><strong>Android Layered Architecture</strong></p>
<p>Android architecture composed of four layers. Application layer on top and the rest of three layers are beneath, application framework, Android runtime and Linux kernel.</p>
<p><em>Linux kernel </em>is used as an abstraction the hardware and the software.</p>
<p><em>Android runtime’s </em>is a core component of Dalvik virtual machine. Each Android process runs in a separate instance of Dalvik virtual machine.</p>
<p><em>Application Framework </em>is a built in toolkit. It provides different packages of services to applications.</p>
<p><strong>2</strong>.<strong>2    <em>Android Application Structure</em></strong></p>
<p>Android applications are written in java. But Android does not support execution of java byte code. Dx tool is used by Android for the conversion of java code into Dalvik byte code. Every application is assign with a unique Linux user ID call as UID. This functionality allows Dalvik to run multiple applications in a separate process. Those applications who run in a single process, must share a single UID. Otherwise every application will have a separate UID.</p>
<p><em> </em></p>
<div id="attachment_528" class="wp-caption aligncenter" style="width: 696px"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure1.png"><img class="size-full wp-image-528" title="figure1" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure1.png" alt="" width="686" height="119" /></a><p class="wp-caption-text">             Figure 1: Typical ICC between Activities, Services, Content Providers and Broadcast Receivers</p></div>
<p><strong><em>2.3    Android’s   Components</em></strong><em> </em></p>
<p><em> </em> Android composed of basic four components. ICC is used for communication between components.</p>
<p><strong>i) Activity:</strong> Activity is a visual screen for interaction of user with the application. Depends upon design, an application may consists of one or more activities</p>
<p><strong>ii)Service: </strong>Service do not have a visual interface, it runs in the back ground, like play back music and fetching data from the network.</p>
<p><strong>iii)Broadcast Receiver:</strong> Broadcast receiver receive broadcast announcements and response to them according to the situation.</p>
<p><strong>iv)Content Provider:</strong> Content provider is a SQLite database, which supports the sharing and accessing of data among applications.</p>
<p><strong><em>2.4    Android Security Policy Enforcement Mechanism</em></strong></p>
<p><em> </em>One of the major components of Android mandatory access control is Reference monitor. Which helps in the inter component communication (ICC).  Each component of an application is assign with some permission labels. These labels are used for interaction with the components of other applications. It is possible that a specific component of an application can interact with the component A of other application but can’t interact with the component B of the same application. This happens because of the permission assigns to each component of each application. Whenever a component wants to initiate ICC, the application checks the label of permissions. If the target component’s label is present in that bundle of permissions, ICC establishment is allowed to continue, otherwise denied.</p>
<p>In Android components interact with other components of same or other application through ICC mechanism based upon intents. Intents is mechanism for message passing, that also contains nature of the action to be performed. Intents can be sent to a specific component or can be broadcast to the Android framework. Android framework then passes it to the suitable component. Action strings help in specifying the intents, actually action strings show the type of action to be performed and then Android system take the decision that which component is suitable to perform the required action.</p>
<p>All the permissions are defined in the AndroidManifest.xml file. It also contains metadata related to security policy enforcement. &lt;Permission&gt;  tag specifies the components which can access it. &lt;Intent-Filters&gt;   specify those intents which can be resolved.</p>
<p><em> </em></p>
<p><strong><em>2.5    Protection Levels</em></strong></p>
<p>Android has four permission levels, on the basis of which an application can be install.</p>
<p><strong>i.  Normal:</strong> Normal permissions are granted without asking any permission from user.</p>
<p><strong>ii.Dangerous:</strong> Dangerous permissions ask for the approval from the user at the time of installation. User has two choices, either grant all permission or deny all. Denying of permissions will stop installation.</p>
<p><strong>iii.Signature: </strong> System grants these permissions if the requesting and granting application share the same certificate.</p>
<p><strong>iv.</strong> Signature System:  Same as Signature but use for system applications only.</p>
<p><em> </em></p>
<p><strong><em>2.6    Limitations</em></strong></p>
<p>Android permission lacks the modification of permissions. Android policy is very strict. It walks on all or nothing policy. User should allow all permission to allow any installation.</p>
<p>Android do not provide any runtime investigation for the behaviour of application. Once an application installed, so then it can every activity which it wants.</p>
<p><em> </em></p>
<p><strong><em>2.7   Mobile Phone Threats</em></strong></p>
<ul>
<li><em>Proof of concept</em>: Keeping the Bluetooth device on without the knowledge of the user is an example of this threat. It drained device batteries.</li>
<li><em>Destructive</em>: Deletion of phone book entries without the knowledge of user is an example of this threat.</li>
<li><em>Premeditated spyware</em>:  This category includes location tracking and remote listening.</li>
<li><em>Direct payoff</em>:  Sending sms without the permission of the user is a threat include in this category.</li>
<li><em>Information scavengers</em>: Checking the address book, passwords and cookies without the permission of the user, lie down in this part.</li>
<li><em>Ad</em>-<em>ware: </em>The malware advertisements on cell phones are included in this category.</li>
<li></li>
</ul>
<p>III.<strong>Extending Android Permission Model and Enforcement with User defined runtime constraints</strong></p>
<p><strong> </strong></p>
<p>In this paper, author presents a policy enforcement framework for framework for Android that allows users to grant permissions to applications on the basis of their needs. And also to impose constrains on the usage of resources.</p>
<p><em> </em></p>
<p><strong><em>3.1   Problem description</em></strong></p>
<p>Android contain a suit of built in applications like dialler, browser and address book etc. Using the SDK developer can develop their own applications. Applications require some permission which is mentioned in the AndroidMamifest.xml.  These permissions are used for performing sensitive tasks like sms sending, using camera etc. At the time on installation Android asks user to grant permissions to the application to install. User does not have any other choice rather than granting all permissions to the application. Otherwise the application will not get install. Once the permissions are granted then user can not revoke those permissions until user uninstall the specific application.</p>
<p>Granting of a permission to an application results in providing unrestricted access to the resources. Android existing framework does not provide a security check on the usage of resources. For example, if once sms permission is granted to an application. So, that application can start sending sms any time. There is no way to stop it, unless user does not grant all permissions to it.</p>
<p>Four issues: (1) User must grant all permissions to install any application; (2) No way for restricting the granted permissions to an application; (3) As all permissions are based on install time checks, access to resources cannot be restricted based on dynamic constraints and (4) The only way of revoking permissions are to uninstall the application.</p>
<p><strong><em>3.2   Android Permission Extension Framework</em></strong></p>
<p>The existing Android application framework does not define specific entry point for execution of applications. There is no main function of applications, as applications are composed of components. So, components can communicate with components of other applications, if they permit them.</p>
<p>Different methods of ApplicationContext class in Android are used to handle the installation of these components. ApplicationContext acts as an interface for intents handling. With the rising of an intent, ApplicationContext two checks, that whether the permissions are associated with the intent and secondly, it checks whether the calling component has been granted with those permissions which are associated with the intent.</p>
<p>The ApplicationContext implements the IActivityManager interface. It uses the concept of <em>binders</em> and <em>parcels</em>, the Inter Process Communication for Android. Binder is the base class for remotable objects, that implements the <em>IBinder</em> interface and</p>
<p>Parcel acts as generic buffer for inter-process messages which are passed with the help of IBinder.</p>
<p>The ApplicationContext creates a parcel with the help of IActivityManager, and decide that calling application has specific permissions. The ActivityManagerService class receives this parcel and extract the PID, UID and the permissions associated with it. After that, send it to the checkPermission method of ActivityManagerService class. Then these arguments are passed to checkComponentPermission, it perform some checks. If the UID is root or system UID then it grants all permissions. For the rest, it will call PackageManagerService which extracts the package name for the pass UID and validate the permissions. If received permission does not match any of those present in the GrantedPermission so, it throws a security exception.</p>
<p>After checking the present security permissions, control is given to AccessManager. For the purpose a hook is placed in the CheckUidpermission of PackageManagerService. As it is the only entry point for permission checking. It throws the UID and the requested permissions to the AccessManager. AccessManager invokes PolicyResolver, it retrieves attached to the related application and using the PolicyEvaluatinonEngine, evaluate it. The policy includes the condition on the basis of which permissions will be denied or granted. EspressionParser retrieves the attribute of application from attribute repository and performs some sort of operations on these attributes.</p>
<p><em> </em></p>
<p><em> </em></p>
<p><strong><em>3.3    Poly Android Installer</em></strong></p>
<p><em> </em>Writing policy is complex job for even system administrators. Android targeted at the consumer market and the end users as well. And users cannot complex usage policies. To end this problem the author created <em>Poly. </em>It is an advanced Android application installer. It provides user to specify constraints on the use of an application.</p>
<p><em> </em></p>
<p><em>i) </em><strong><em>Allow:</em></strong><em> </em>By default Android allows all permissions. This makes the existing Android installer a subset of Poly.</p>
<p><em>ii) </em><strong><em>Deny:</em></strong><em> </em>This approach opposed the current approach of Android, which is all-or-nothing. As this approach give facility to the user to deny any permission by his owns choice. For example if Tom wants download an application and that specific application require some permission, sending sms is one of among those permissions. But Tom wants the application not to send any sms. So Tom will simply tap on the ‘send SMS’ permission and set it to ‘deny’. And still he may be able to install the application and enjoy the rest of facilities provided by that application.</p>
<p><em> </em></p>
<p><strong><em> 3.4    Constraint Modification at Runtime</em></strong></p>
<p><em> </em> One of the limitations of Android security mechanism is the lack of ability of revoking permissions after an application get installs. Uninstalling of an application is the only way to revoke the permissions. Apex allows the user to specify his fine grained constraints at the time of installation through Poly. Once a user come to know that the application is not harmful, and he wants to assign more permissions to it, so Poly will help him in that. For example if a user install an application and grant it some permission and deny the permission of GPS. After some time he realize that this application not harmful and the user wishes to facilitate him with GPS facility as well. For modification the author created a shortcut to the constraint specification activity of Poly in the settings application of Android. (com.android.settings.ManageApplications class). This allows the user to modify constraints he specified at the time of installation. Even after, the application has been installed. And the same rule follows for denying of permissions after installation.</p>
<div id="attachment_529" class="wp-caption aligncenter" style="width: 696px"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure2.png"><img class="size-full wp-image-529" title="figure2" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure2.png" alt="" width="686" height="221" /></a><p class="wp-caption-text">Figure 2: Android Permission Extension (Apex) Framework</p></div>
<p><strong>IV. Mitigating Android Software Misuse Before It Happens<br />
</strong></p>
<p>In this paper, author proposed a framework; know as Kirin to capture security policy that transcends Android applications. Stakeholders’ define some policy invariants, for sack of security. On the base of which, an application will be certified at the time of installation. Mobile phone operating system provides more open APIs for third party applications. That is why the security framework must not only provide per interface permissions, but it should also be capable of supporting “administrative” policies defined by all stakeholders’.</p>
<p><em> </em></p>
<p><strong><em>4.1   Contributions</em></strong></p>
<ul>
<li>The author reverse engineer Android’s security model and present it formally.</li>
<li> Author provides a framework for specifying and enforcing stakeholder security policy.</li>
<li>Prolog is used for install time installation. Prolog is a common language for security policy evaluation.</li>
<li>Author use the proposed framework to identify insecure application policy configurations within Android. Such applications can affect voice, SMS and location services.</li>
</ul>
<p><em> </em></p>
<p><strong><em>4.2    Kirin</em></strong></p>
<p>In this paper a model is proposed, which states that before   system install any downloaded application package, it must first ensure the applications satisfy all security requirements. If any requirements fail to met, the installation will be terminates. This model, of installation ensures the cell phone will remain in its original secure state, without based on user made security decisions.</p>
<p>The policy pre-processor extracts policy from the target applications package, and converts it to Prolog facts. After that it merges it with the existing policy knowledge. The result of the merger represents the security state of the system, if the installation were to proceed. The policy engine after that uses the temporary policy state to evaluate invariants. Policy engine extract invariants from system policy, user policy and applications policy. On the basis of these invariants, policy engine take the decisions. It automatically generates compliance proofs for the target application. If all the invariants satisfied, so installation will continue. If any of the invariant fails to satisfy so the installation will abort.</p>
<p><strong><em>4.3 </em></strong><strong><em> System invariants</em></strong></p>
<p>Invariant 1: “An application must have explicit permission to make an outgoing voice call.”Android uses CALL_PHONE and CALL_PRIVILEGED permissions, to protect the API from making outgoing calls. An application holding the call permission can indirectly provides its API access via its components interface. This invariant makes it sure the no indirect access should be allowed.</p>
<div id="attachment_530" class="wp-caption aligncenter" style="width: 696px"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure3.png"><img class="size-full wp-image-530" title="figure3" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure3.png" alt="" width="686" height="160" /></a><p class="wp-caption-text">Figure 3: Enhanced Installation Logic. New packages cannot be installed unless all policy in variants passes</p></div>
<p>Invariant   2: “An application holding a dangerous permission must have no unprotected components”</p>
<p>Android framework introduces “dangerous permissions”. Which states that user should allow permissions to applications at time of installation. For example, sensitive tasks like making call and sending SMS permissions are mark as dangerous. So that, any application asks from user before using these services.</p>
<p>Invariant   3: “Only system applications can interface with hardware”. Android framework introduces high level java APIs for interfacing with hard ware. For the sack of flexibility, Android let any application to interact with the APIs, but with proper permissions. This invariant insures only system applications have direct access to APIs.</p>
<p><em> </em></p>
<p><strong><em>4.4    User Privacy Invariants</em></strong></p>
<p>Invariant 4: “Only system applications can process outgoing calls.”[2] Android framework let applications to receive notifications of outgoing calls, including the destination number. To keep the issue of privacy in eye, user may wish that only system applications should receive such notifications.</p>
<p>Invariant 5:  “Applications that can perform audio record must not have network access or pass data to</p>
<p>an application that has network access”. It is quite dangerous for security, if an application record voice and send it on internet.</p>
<p>Invariant 6: “An application with access to Wiﬁ or Network state must also declare network access.”</p>
<p><em> </em></p>
<p><strong><em>4.5 Application invariants</em></strong></p>
<p><strong> </strong></p>
<p>Invariant 7:  “An application can only receive SMS notifications from trusted system components.”Any application has the ability to broadcast intent. But some intent can only be broadcast by system applications. This gives the surety that only system applications can send SMS.</p>
<p>Invariant 8: “An application can only receive location updates from trusted system components.”  Some applications take decision on the base of location so, only the system applications have the right to send the location notification.</p>
<p><strong><em>4.6 Limitations</em></strong></p>
<p>Kirin is limited to obtain data from application package metadata. Kirin does not provide any dynamic security check. Kirin provides only install time security.</p>
<p><strong>V. ON LIGHTWEIGHT MOBILE PHONE APPLICATION CERTIFICATION</strong></p>
<p>The author proposed Kirin security service for Android, which provides a lightweight certification of application at the time on installation. To certify applications based on security configuration requires to clearly specifying the unwanted properties. For the identification of Kirin security rules, the author took help of security requirements engineering. On other hand a security language design has been defined, to implement Kirin security service within the Android framework.</p>
<ul>
<li>Methodology for adding new security requirements and flaws in current Android are defined.</li>
<li>Practical method of performing lightweight certification of applications at install time is provided.</li>
<li>Mitigation of malware rules are mentioned.</li>
</ul>
<p><em> </em></p>
<p><strong><em>5.1 Kirin Security Rules</em></strong></p>
<p><em> </em>Security requirements engineering is based upon three basics. 1) Operation of a system in normal environment, 2) assets are entities that someone places value upon, 3) security requirements are actually constraints on the functionality of system to protect assets.</p>
<p><em> </em></p>
<p><strong><em>5.2 Identifying Security Requirements</em></strong></p>
<p><em> </em>Existing security requirements engineering techniques are referred in order to identify dangerous application configuration.</p>
<p><em> </em></p>
<p><strong><em>Step 1: Identify Assets</em></strong><em>: </em>Assets are defined from features of Android platform.  In the form of label permissions, assets are already defined by Google.</p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em></p>
<div id="attachment_531" class="wp-caption aligncenter" style="width: 696px"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure4.png"><img class="size-full wp-image-531" title="figure4" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure4.png" alt="" width="686" height="188" /></a><p class="wp-caption-text">Figure 4: Sample Kirin security rules to mitigate malware</p></div>
<p></em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p>All components of system applications are assets basically. Android defines the RECORD_AUDIO permission to protect the audio recorder. Microphone is an asset in this example, as microphone records the voice of user. Permission are define by Android for making phone calls, and observation of phone state as well.</p>
<p><em> <strong>Step 2: Identify Functional Requirement</strong>:</em> In this step the author studied the interaction of applications with phone and with third party applications. Assets and functional description plays a vital role in security threats. When an incoming call is receives so, the system broadcasts intent to the PHONE_STATE action string. And also notify the registered application with the PhoneStateListner. In the same way action NEW_OUTGOING_CALL action string is also broadcasted.</p>
<p><strong><em>Step 3: Determine Assets Security Goals and Threats</em></strong><em>: C</em>onfidentiality, integrity and availability considers being high security goals. Determination of appropriate goals and determination of methods that how functional requirements can be abused with respect to the remaining security goals is important. If a voice call is record and sends on internet, it is against the confidentiality.</p>
<p><strong><em>Step 4: Develop Asset’s Security Requirement</em></strong><em>: </em>Next security requirement from the threat descriptions. Security requirements are constrains on functional requirements. Which defines who can exercise functionality.  Observations says that, eavesdropper requires a) notification of incoming or outgoing call, b) the ability to record audio and c) access to Internet. So an application must not have these rights at the once.</p>
<p><strong><em>Step 5: Determine Security Mechanism Limitations</em></strong><em>: </em>The goal of this step is to determine dangerous configurations at only install time. Author is limited to information available in an application manifest file. An application must not have permission for processing outgoing calls, record audio and internet permission.</p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><strong><em>5.3 Single Permission Security Rules</em></strong></p>
<p>Dangerous permissions of Android may be too dangerous in some production environment. The SET_DEBUB_APP permission allows an application to turn the debugging for another application. The corresponding API is hidden in the most recent SDK. Third party does not have access to hidden APIs but it is not a substitute for security. Rule1 ensures third party applications do not have the SET_DEBUG_APP permission.</p>
<p><em> </em></p>
<p><strong><em>5.4 Multiple Permission Security Rules</em></strong></p>
<p><em> </em>Voice and location eavesdropping malware need permissions to record audio and access location information. But at same time legitimate applications also use these permissions. So a rule is need as multiple permission. Rule 2 and 3 protect against the voice eavesdropper. Rule 4 and 5 protect from location tracker.  Rule 6 protects from incoming malware SMS. Rule 6 and 7 consider malware interaction with messages. As SMS can be used as a path for malware. And malware owner will not let user let know about SMS, therefore content provider will be is modified just after receiving a SMS.  Rule 7 does not stop SMS sending, but increase the probability that user becomes aware of the activity. Rule8 makes use of the duality of permission labels.</p>
<p>Permissions are not always enough to differentiate between malware and legitimate behaviour. Rule 9 provides example of a rule considering both permission and an action string.  This stops a malware from replacing the default voice call dialler application without the awareness of the user.</p>
<p><strong>VI. SEMANTIC RICH APPLICATION-CENTRI SECURITY IN ANDROID</strong></p>
<p><strong> </strong></p>
<p>Android system protects the phone from malicious applications, but with limited infrastructure for applications protection.</p>
<p><strong>Permission assignment policy:</strong> Applications have limited ability to control, to which the permissions are granted for accessing their interface.</p>
<div id="attachment_532" class="wp-caption aligncenter" style="width: 696px"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure5.png"><img class="size-full wp-image-532" title="figure5" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure5.png" alt="" width="686" height="245" /></a><p class="wp-caption-text">Figure 5: Policy tree illustrating the example policies required by applications</p></div>
<p><strong>Interface exposure policy: </strong> Androids facility is too rigid for controlling of their interface for other applications.</p>
<p><strong>Interface use policy:</strong> Limited means of selecting, at run-time, that which applications interface are accessible.</p>
<p><strong><em>6.1 Application policies </em></strong></p>
<p>Permission granting policy is an install time policy. Its subparts have a) Protection level based policy. Normal permissions are granted directly, Dangerous permissions are granted by the wish of user, Signature based permission allows only those permissions to be installed which are signed by the same developer. Signature system is used for system applications only. B) Signature based policy, this is same as signature based, but permissions can be allotted even if application A and B are signed by different developers. c) Applications configuration based policy. This policy keeps on check upon the application version etc.</p>
<p>Interaction policy is runtime policy. Its first three parts are as same as install time policy, but it just checks those permissions at runtime. Additional feature in runtime policy is context based policy. For example if a user do not want to allow GPS permission at specific day or time, or a game should not be start, if the battery is low that 10%.</p>
<p><strong><em>6.2 Install time policy</em></strong></p>
<p>Saint install-time policy regulates granting of application on the basis of mentioned permissions. An application define permissions, requested application should hold those permissions in order to communicate with the specific application.</p>
<p>AppPolicy provider takes the decision at time of installation and Saint installer enforce it. AppPolicy maintains record of all install and runtime policies. At the time of installation Android installer retrieves the permissions from the manifest file a) it check the AppPolicy provider for each permission. B) AppPolicy provider consults its policy database, and returns a result by keeping the rule in notice. C) installation will proceed only if the conditions satisfy.</p>
<p><strong><em>6.2 Runtime Policy Enforcement </em></strong></p>
<p>For the interaction of softwares components with in Android framework, IPC are used. Caller application sends the IPC and callee receives that IPC. If conditions of both caller and callee satisfy, then IPC continues.</p>
<p>First Saint Madiator retrieves policy file from the application, then send it to Saint AppPolicy provider, the conditions and permissions are checked there. If not satisfied, so the IPC is blocked. Otherwise the IPC is directed towards the current Android permission check and after that communication starts between two applications.</p>
<p><em> </em></p>
<p><strong><em>6.3 Administrative Policy</em></strong><strong> </strong></p>
<p>Administrative policy defines the control of user towards policy.  If user is not allowed to change the policy so, he cannot use it in very appropriate way. And if allowed to change then it is a compromise on security. Because user may changes it in wrong way. So author leaves this decision upon operating system. Two flags are defined, SaintOverride flag and Override flag. If both flags are yes, then user can change the policy.</p>
<div id="attachment_527" class="wp-caption aligncenter" style="width: 461px"><a href="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure6.png"><img class="size-full wp-image-527" title="figure6" src="http://imsciences.edu.pk/serg/wp-content/uploads/2010/07/figure6.png" alt="" width="451" height="254" /></a><p class="wp-caption-text">Figure 6: Saint enhances the application  installation and interaction of policies.</p></div>
<p><strong><em>6.4 Operational Policy</em></strong></p>
<p><em> </em>Operational policy consists of three type of conditions.</p>
<ul>
<li>Always satisfied</li>
<li>Satisfiable</li>
<li>Unsatisfiable</li>
</ul>
<p><strong>6.5 Saint Architecture</strong></p>
<p>Saint architecture was implemented as modification on Android. For policy enforcement, hooks are placed.</p>
<p><strong>A)    Saint Installer: </strong></p>
<p>It is a modified version of Android installer. Saint installer retrieves all permission from the application package, its version and signature etc. Saint policy is implemented in an XML file with the same name of the package. After parsing the package file, it checks the permissions, if do not satisfy so rejected.</p>
<p><strong>B)    Saint Mediator:</strong></p>
<p><strong><em>1. Starting an Activity:</em></strong> Saint runtime enforcement consists of four components. Starting new activity, binding components to services, receiving broadcast intents and accessing content provider. For starting an activity, intent is generated, Activity Manager Service open the required program if the name of application is mentioned in the intent. But before starting a security hook will check the policy. If name of application is not mentioned in the intent so the intent will be handed over to Resolver activity. If single match found, so application will be started but a hook is there to check the policy. If multiple applications found for the raised intent, so a menu will be open in front of user, and user will select an application. But before that a hook will check the policy.</p>
<p><em><strong>2. Receiving intent broadcast:</strong></em> Activity Manager will receive intent. If receiver name is mentioned so, it will receive it but a security hook is there to check the policy. If name of receiver is not mentioned first it will be checked in Dynamic BR list and after that in Static BR list. In both cases hook will be placed to check the policy before starting any activity.</p>
<p><em><strong>3.Accessomg Content Provider:</strong></em> Any application wants to access content provider, so a hook is placed to check that weather the given application has the permissions to access the content provider .</p>
<p><em><strong>4. Binding components to services:</strong></em> This allows binding intent to a service. Intent binds to a service either by its name mentioned in the intent or intent containing the action string to which the service is registered.</p>
<p><strong>VII. SUMMARY </strong></p>
<p>In this survey paper four approaches are discussed for the security of Android. Kirin and Lightweight approaches are basically install time approaches. If once an application grant some permissions, so there is no security mechanism through which Kirin or Lightweight keep check on the behaviour of application during runtime. Kirin cannot keep on check on dynamic broadcasts.</p>
<p>Light weight cannot directly utilize these existing techniques because the current techniques are structured to supplement system and software development. Lightweight cannot guarantee fixed number of SMS is sent during in specific period of time.</p>
<p>Comparatively to Kirin and Lightweight, Apex approach seems to be more feasible. As its architecture is simple and the property which give edge to Apex is its runtime policy. Which keep on check on the application behaviour at runtime, and on base of policy do not let an application to do something which permission is not grant to it. Still some problems are there, the installer currently incorporates a small number of constraints. For a larger user community, study of user requirements is required. Secondly it can create problems if user unknowingly grants such permissions to an application which can produce harmful results. This problem can be solved by the conjunction of Kirin with Apex, by analysing the constrains and permissions to verify that security rules are not being violated.</p>
<p>Also developer should mention in the manifest file of an application, that why the specific permission is required for the functionality of the application. For example, requesting GPS permission, the developer should mention that why GPS is needed by the application.</p>
<p>Semantic Rich Application Centric Security in Android is an approach for the security of Android. This approach provides a good security mechanism for install time, runt time and application to application interaction as well. In this approach security hooks are placed in every require place of Android framework for the insurance of security.</p>
<p><em><strong>Courtesy of Kamran Habib Khan &amp; Mir Nauman Tahir </strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://imsciences.edu.pk/serg/2010/07/android-security-a-survey-so-far-so-good/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
