Extraction of an Architectural Model for Least Privilege Analysis
Bernard Spitz, R. Scandariato, W. Joosen
{"title":"Extraction of an Architectural Model for Least Privilege Analysis","authors":"Bernard Spitz, R. Scandariato, W. Joosen","doi":"10.4018/jsse.2012100102","DOIUrl":null,"url":null,"abstract":"This paper presents the design and implementation of a prototype tool for the extraction of the so-called Task Execution Model directly from the source code of a software system. The Task Execution Model is an essential building block for the analysis of the least privilege violations in a software architecture (presented in previous work). However, the trustworthiness of the analysis results relies on the correspondence between the analyzed model and the implementation of the system. Therefore, the tool presented here is a key ingredient to provide assurance that the analysis results are significant for the system at hand. DOI: 10.4018/jsse.2012100102 28 International Journal of Secure Software Engineering, 3(4), 27-44, October-December 2012 Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited. the intended tasks. The TEM is a precise representation of the behavior of a system that is tailored for the purpose of identifying LP violations. When a new system is being developed, an early LP analysis can be done before the system is implemented. In this case, the TEM can be constructed starting from the software architecture documentation, namely the component diagrams, the deployment diagrams, and the sequence diagrams. However, the development of the system might significantly deviate from the architectural design. This also happens after maintenance cycles, as often the documentation is not updated after changes are made. Therefore, the LP analysis needs to be reassessed after the system has been implemented or evolved. In this case, the TEM needs to be constructed starting from the source code, which is a tedious and error prone endeavor. The experience in four medium-sized projects revealed that undocumented behavior in the code of the four systems required the modification of the TEMs, which were initially built starting from the documentation only. The divergence between the documentation and the implementation is particularly detrimental from a security perspective. In fact, the analysis results would have been erroneous if the TEMs would have not been corrected. In our experience, the macro-structures of the design, like components and sub-systems, are in general properly documented. The majority of the inconsistencies are to be found at the level of the invocations among the components. Typically, only the main interactions among components are properly documented and additional communication paths that emerge at later stage (e.g., because of implementation-level optimizations) are missing. The least privilege analysis focuses on the interaction among components and, hence, is particularly affected by these inconsistencies. Therefore, the trustworthiness of the least privilege analysis is at stake if the conformance of the TEM with the final system is not assured. As its main contribution, this paper provides a solution to the problem. We present the design and implementation of a prototype tool for the assisted recovery of the Task Execution Model from the source code. The prototype is build on top of a commodity software architecture recovery platform, namely Bauhaus (Raza, 2006). The prototype requires minimal human input. Namely, the user has to provide the system’s macro-structures, which are often properly documented, as observed before). This paper also presents the validation of the prototype in the context of a medium-size software project. The project has been previously analyzed for least privilege violations by a third party expert and, in that context, a correct TEM has been manually built by using both the available documentation and the code. In this paper, we use the prototype to generate the TEM and compare the results. The main value of this paper’s contribution is the creation of an end-to-end chain for analysis of least privilege in software architectures: from the source code to the TEM (this work) and from the TEM to identification of least privilege violations (Scandariato, 2010). In the rest of the paper, we introduce the Bauhaus platform and give more background information on the least privilege analysis. Then, we present the TEM extraction tool and its validation. Finally, we cover the related work and present the concluding remarks. BACKGROUND: THE BAUHAUS TOOL The Bauhaus tool suite (Raza, 2006) is a software architecture recovery tool developed at the universities of Bremen and Stuttgart. From the source code, Bauhaus creates two internal representations with different kinds of granularity: the intermediate language (IML), which contains low-level information, and the Resource Flow Graph (RFG), which provides a more abstract, high-level structure of the system under analysis. The latter format is used in this work to create a model that can be used to analyze least privilege violations. The IML representation is populated using language specific parsers and allows low-level inspection of the source code such as code 16 more pages are available in the full version of this document, which may be purchased using the \"Add to Cart\" button on the product's webpage: www.igi-global.com/article/extraction-architectural-modelleast-privilege/74843?camid=4v1 This title is available in InfoSci-Journals, InfoSci-Journal Disciplines Computer Science, Security, and Information Technology, InfoSci-Computer Systems and Software Engineering eJournal Collection, InfoSci-Knowledge Discovery, Information Management, and Storage eJournal Collection, InfoSci-Physical Sciences, Biological Sciences, and Engineering eJournal Collection, InfoSci-Surveillance, Security, and Defense eJournal Collection, InfoSci-Journal Disciplines Engineering, Natural, and Physical Science, InfoSci-Select. Recommend this product to your librarian: www.igi-global.com/e-resources/libraryrecommendation/?id=2","PeriodicalId":89158,"journal":{"name":"International journal of secure software engineering","volume":"40 1","pages":"27-44"},"PeriodicalIF":0.0000,"publicationDate":"2012-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International journal of secure software engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4018/jsse.2012100102","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
This paper presents the design and implementation of a prototype tool for the extraction of the so-called Task Execution Model directly from the source code of a software system. The Task Execution Model is an essential building block for the analysis of the least privilege violations in a software architecture (presented in previous work). However, the trustworthiness of the analysis results relies on the correspondence between the analyzed model and the implementation of the system. Therefore, the tool presented here is a key ingredient to provide assurance that the analysis results are significant for the system at hand. DOI: 10.4018/jsse.2012100102 28 International Journal of Secure Software Engineering, 3(4), 27-44, October-December 2012 Copyright © 2012, IGI Global. Copying or distributing in print or electronic forms without written permission of IGI Global is prohibited. the intended tasks. The TEM is a precise representation of the behavior of a system that is tailored for the purpose of identifying LP violations. When a new system is being developed, an early LP analysis can be done before the system is implemented. In this case, the TEM can be constructed starting from the software architecture documentation, namely the component diagrams, the deployment diagrams, and the sequence diagrams. However, the development of the system might significantly deviate from the architectural design. This also happens after maintenance cycles, as often the documentation is not updated after changes are made. Therefore, the LP analysis needs to be reassessed after the system has been implemented or evolved. In this case, the TEM needs to be constructed starting from the source code, which is a tedious and error prone endeavor. The experience in four medium-sized projects revealed that undocumented behavior in the code of the four systems required the modification of the TEMs, which were initially built starting from the documentation only. The divergence between the documentation and the implementation is particularly detrimental from a security perspective. In fact, the analysis results would have been erroneous if the TEMs would have not been corrected. In our experience, the macro-structures of the design, like components and sub-systems, are in general properly documented. The majority of the inconsistencies are to be found at the level of the invocations among the components. Typically, only the main interactions among components are properly documented and additional communication paths that emerge at later stage (e.g., because of implementation-level optimizations) are missing. The least privilege analysis focuses on the interaction among components and, hence, is particularly affected by these inconsistencies. Therefore, the trustworthiness of the least privilege analysis is at stake if the conformance of the TEM with the final system is not assured. As its main contribution, this paper provides a solution to the problem. We present the design and implementation of a prototype tool for the assisted recovery of the Task Execution Model from the source code. The prototype is build on top of a commodity software architecture recovery platform, namely Bauhaus (Raza, 2006). The prototype requires minimal human input. Namely, the user has to provide the system’s macro-structures, which are often properly documented, as observed before). This paper also presents the validation of the prototype in the context of a medium-size software project. The project has been previously analyzed for least privilege violations by a third party expert and, in that context, a correct TEM has been manually built by using both the available documentation and the code. In this paper, we use the prototype to generate the TEM and compare the results. The main value of this paper’s contribution is the creation of an end-to-end chain for analysis of least privilege in software architectures: from the source code to the TEM (this work) and from the TEM to identification of least privilege violations (Scandariato, 2010). In the rest of the paper, we introduce the Bauhaus platform and give more background information on the least privilege analysis. Then, we present the TEM extraction tool and its validation. Finally, we cover the related work and present the concluding remarks. BACKGROUND: THE BAUHAUS TOOL The Bauhaus tool suite (Raza, 2006) is a software architecture recovery tool developed at the universities of Bremen and Stuttgart. From the source code, Bauhaus creates two internal representations with different kinds of granularity: the intermediate language (IML), which contains low-level information, and the Resource Flow Graph (RFG), which provides a more abstract, high-level structure of the system under analysis. The latter format is used in this work to create a model that can be used to analyze least privilege violations. The IML representation is populated using language specific parsers and allows low-level inspection of the source code such as code 16 more pages are available in the full version of this document, which may be purchased using the "Add to Cart" button on the product's webpage: www.igi-global.com/article/extraction-architectural-modelleast-privilege/74843?camid=4v1 This title is available in InfoSci-Journals, InfoSci-Journal Disciplines Computer Science, Security, and Information Technology, InfoSci-Computer Systems and Software Engineering eJournal Collection, InfoSci-Knowledge Discovery, Information Management, and Storage eJournal Collection, InfoSci-Physical Sciences, Biological Sciences, and Engineering eJournal Collection, InfoSci-Surveillance, Security, and Defense eJournal Collection, InfoSci-Journal Disciplines Engineering, Natural, and Physical Science, InfoSci-Select. Recommend this product to your librarian: www.igi-global.com/e-resources/libraryrecommendation/?id=2
最小特权分析体系结构模型的提取
本文设计并实现了一个原型工具,用于直接从软件系统的源代码中提取所谓的任务执行模型。任务执行模型(Task Execution Model)是分析软件体系结构(在前面的工作中介绍过)中最小权限冲突的基本构建块。然而,分析结果的可信度依赖于分析模型与系统实现之间的对应关系。因此,这里介绍的工具是保证分析结果对现有系统具有重要意义的关键因素。DOI: 10.4018 / jsse。2012100102 28国际安全软件工程学报,3(4),27-44,October-December 2012版权所有©2012,IGI Global。未经IGI Global书面许可,禁止以印刷或电子形式复制或分发。预期的任务。TEM是系统行为的精确表示,它是为识别LP违规而定制的。在开发新系统时,可以在系统实现之前进行早期LP分析。在这种情况下,TEM可以从软件体系结构文档开始构建,即组件图、部署图和序列图。然而,系统的开发可能会严重偏离架构设计。这也会发生在维护周期之后,因为文档在做出更改后通常不会更新。因此,在系统实现或发展之后,需要重新评估LP分析。在这种情况下,TEM需要从源代码开始构建,这是一项繁琐且容易出错的工作。在四个中等规模项目中的经验表明,四个系统代码中未记录的行为需要修改tem,这些tem最初只是从文档开始构建的。从安全的角度来看,文档和实现之间的分歧尤其有害。事实上,如果tem没有被纠正,分析结果就会是错误的。根据我们的经验,设计的宏观结构,如组件和子系统,通常都有适当的文档。大多数不一致是在组件之间的调用级别上发现的。通常,只有组件之间的主要交互被适当地记录下来,而在后期出现的附加通信路径(例如,由于实现级优化)被遗漏。最小权限分析侧重于组件之间的交互,因此特别受这些不一致性的影响。因此,如果不能保证TEM与最终系统的一致性,那么最小特权分析的可信度就会受到威胁。本文的主要贡献是提供了解决这一问题的方法。我们提出了一个原型工具的设计和实现,用于从源代码中辅助恢复任务执行模型。原型构建在商品软件架构恢复平台之上,即Bauhaus (Raza, 2006)。原型机需要最少的人力投入。也就是说,用户必须提供系统的宏观结构,这通常是适当的文档,如前所述)。本文还介绍了在一个中型软件项目的背景下对原型的验证。该项目之前已经由第三方专家分析了最少的特权侵犯,并且在这种情况下,通过使用可用的文档和代码手动构建了正确的TEM。在本文中,我们使用原型生成瞬变电磁法,并对结果进行比较。本文贡献的主要价值在于创建了一个端到端链,用于分析软件架构中的最小特权:从源代码到TEM(本工作),从TEM到识别最小特权违规(Scandariato, 2010)。在本文的其余部分,我们介绍了包豪斯平台,并给出了最小特权分析的更多背景信息。然后,我们给出了TEM提取工具及其验证。最后,介绍了相关工作并作了结束语。包豪斯工具套件(Raza, 2006)是不来梅和斯图加特大学开发的软件架构恢复工具。从源代码中,Bauhaus创建了两种不同粒度的内部表示:包含低级信息的中间语言(IML)和资源流图(RFG),它提供了被分析系统的更抽象、更高级的结构。后一种格式在本文中用于创建一个模型,该模型可用于分析最小特权违规。
本文章由计算机程序翻译,如有差异,请以英文原文为准。