PaaS平臺上Python沙箱研究
本文關(guān)鍵詞: 平臺即服務(wù) 隔離 Python 沙箱 細(xì)粒度 出處:《南京大學(xué)》2014年碩士論文 論文類型:學(xué)位論文
【摘要】:平臺即服務(wù)式云計(jì)算(PaaS)是將基礎(chǔ)設(shè)施平臺作為一種服務(wù)的商業(yè)模式。PaaS向租戶提供平臺環(huán)境,允許多個(gè)租戶同時(shí)部署自己的云服務(wù)。由于其開放和多租戶的特性,PaaS平臺面臨著安全隔離問題:惡意租戶的代碼可能會對平臺自身或者其他租戶應(yīng)用造成危害。現(xiàn)有的PaaS平臺支持Java、Python等多種語言,本文分析現(xiàn)有的針對PaaS平臺上Python應(yīng)用的安全解決方案,認(rèn)為它們存在控制粒度過粗,兼容性差等問題,導(dǎo)致控制策略不靈活,租戶應(yīng)用代碼遷移成本高。本文研究應(yīng)用于PaaS平臺,針對Python程序的安全沙箱,以解決平臺上的安全隔離問題。本文提出一種在應(yīng)用框架層對Python應(yīng)用進(jìn)行隔離監(jiān)控的安全沙箱Opsandbox,為平臺提供細(xì)粒度的訪問控制功能。同時(shí)利用容器虛擬化技術(shù)Linux Containers(LXC),在PaaS平臺上構(gòu)建進(jìn)程級沙箱,為平臺提供底層防護(hù),并支持部分資源限額功能。本文的主要工作和創(chuàng)新包括:1.研究了目前已有的解決方法,包括容器虛擬化技術(shù)、seccomp沙箱、精簡解釋器、PyPy項(xiàng)目、RePy項(xiàng)目以及PyXhon項(xiàng)目等解決方案。并分析了各自的優(yōu)缺點(diǎn),認(rèn)為容器虛擬化技術(shù)、seccomp沙箱以及PyXhon存在監(jiān)控粒度過粗的問題,而精簡解釋器、PyPy項(xiàng)目和RePy項(xiàng)目存在兼容性差的問題。2.研究并理解了Python解釋器的工作原理。主要分析了Python執(zhí)行引擎的工作方式,包括對若干關(guān)鍵結(jié)構(gòu)體(PyCodeObject,PyFrameObject等)的研究、對指令(opcode)執(zhí)行方式的研究、以及對模塊和函數(shù)實(shí)現(xiàn)機(jī)制的研究等。此外,對Python的內(nèi)存管理機(jī)制也做了一定研究。3.提出一種在應(yīng)用框架層對Python應(yīng)用進(jìn)行細(xì)粒度控制的沙箱Opsandbox。Opsandbox通過修改Python程序的編譯結(jié)果,向其插入Python解釋器指令序列,使得Python程序在運(yùn)行時(shí)能夠自主執(zhí)行安全檢查。Opsandbox不修改解釋器和庫函數(shù),對用戶完全透明,具有較好的兼容性;同時(shí)能夠?qū)Σ煌拇a應(yīng)用不同的控制策略,實(shí)現(xiàn)細(xì)粒度的訪問控制功能。4.借鑒AspectBox多層防御的思想,利用容器虛擬化技術(shù)Linux Containers(LXC)構(gòu)建進(jìn)程級沙箱,為平臺提供底層防護(hù),并支持部分資源限額功能。本文詳細(xì)描述了沙箱系統(tǒng)的結(jié)構(gòu)和實(shí)現(xiàn)細(xì)節(jié),最后通過實(shí)驗(yàn)證明該沙箱系統(tǒng)的有效性。
[Abstract]:Platform as a service cloud computing (PaaS) provides a platform environment for tenants to use the infrastructure platform as a business model for services. PaaS. It allows multiple tenants to deploy their own cloud services at the same time. Due to their open and multi-tenant characteristics PaaS platform faces security isolation problems: malicious tenant code may harm the platform itself or other tenant applications. The existing PaaS platform supports a variety of languages, such as Java Java Python, This paper analyzes the existing security solutions for Python applications on PaaS platform, and points out that they have some problems, such as too coarse control granularity and poor compatibility, which lead to inflexible control strategy. The tenant application code migration cost is high. This paper studies the application of PaaS platform, aimed at the Python program security sandbox, In order to solve the problem of security isolation on the platform, this paper presents a security sandbox that can isolate and monitor the Python application in the application framework layer, which provides fine-grained access control function for the platform. At the same time, the container virtualization technology Linux is used to provide the platform with fine-grained access control function. Container LXC, build process level sandboxes on the PaaS platform, The main work and innovation of this paper include: 1. Research on existing solutions, including container virtualization technology, seccomp sandbox, Based on the analysis of their advantages and disadvantages, it is concluded that container virtualization technology, such as seccomp sandbox and PyXhon, has the problem of too coarse monitoring granularity. However, there is a problem of poor compatibility between the simplified interpreter and the RePy project. 2. The working principle of the Python interpreter is studied and understood. The working mode of the Python execution engine is mainly analyzed, including the study of several key structures, such as PyCodeObjectPyFrameObject, etc. Research on the execution mode of instruction code, and the implementation mechanism of modules and functions, etc. In addition, The memory management mechanism of Python is also studied. 3. A sandbox Opsandbox.Opsandbox with fine granularity control over Python application at the application frame layer is proposed. By modifying the compilation result of Python program, it inserts the instruction sequence of Python interpreter into it. The Python program can independently execute the security check. Opsandbox does not modify the interpreter and library functions while running, which is transparent to the user and has good compatibility. At the same time, it can apply different control strategies to different codes. To realize fine-grained access control function .4.draw lessons from the idea of AspectBox multi-layer defense, use container virtualization technology Linux containers LXCto build process level sandbox, and provide the bottom layer protection for the platform. The structure and implementation details of the sandbox system are described in detail. Finally, the effectiveness of the sandbox system is proved by experiments.
【學(xué)位授予單位】:南京大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2014
【分類號】:TP393.09
【相似文獻(xiàn)】
相關(guān)期刊論文 前10條
1 姚競;;面向項(xiàng)目的“Python程序設(shè)計(jì)”教學(xué)實(shí)踐與研究[J];福建電腦;2009年07期
2 透明;;關(guān)于Python[J];程序員;2002年03期
3 王寧,汪飛星;基于Python開發(fā)氣象服務(wù)器運(yùn)行系統(tǒng)界面[J];微機(jī)發(fā)展;2003年07期
4 湯韜;;Python庫簡介[J];程序員;2006年06期
5 高昂;;Python近況全接觸[J];程序員;2009年04期
6 郭芬;劉明;;Python垃圾收集器原理研究及應(yīng)用[J];信息技術(shù);2009年07期
7 王麗;;Python的元類編程研究[J];電腦編程技巧與維護(hù);2011年06期
8 李愛寧;唐勇;孫曉輝;劉昕彤;;基于Python語言的3DES算法優(yōu)化[J];計(jì)算機(jī)系統(tǒng)應(yīng)用;2011年08期
9 曾浩;;Python在其它語言中的應(yīng)用研究[J];大眾科技;2012年07期
10 鞠文飛;曾智銳;;使用Python開發(fā)跨平臺的單詞助記程序[J];電腦編程技巧與維護(hù);2012年24期
相關(guān)會議論文 前5條
1 ;Development of Python-based ArcGIS Tools for Spatially Balanced Forest Sampling Design[A];Information Technology and Computer Science—Proceedings of 2012 National Conference on Information Technology and Computer Science[C];2012年
2 伊鵬躍;于哲峰;汪海;;基于Abaqus/Python的三維復(fù)合材料層壓板有限元建模參數(shù)化開發(fā)[A];第17屆全國復(fù)合材料學(xué)術(shù)會議(復(fù)合材料結(jié)構(gòu)設(shè)計(jì)與性能表征分論壇)論文集[C];2012年
3 黃佳聰;高俊峰;;基于Python編程語言的空間動態(tài)模型集成[A];自然地理學(xué)與生態(tài)安全學(xué)術(shù)論文摘要集[C];2012年
4 于文麗;;基于Python的空間自相關(guān)模式研究[A];中國地理學(xué)會百年慶典學(xué)術(shù)論文摘要集[C];2009年
5 郭霞;關(guān)志東;劉遂;陳萍;劉佳;王欣晶;邱太文;;基于Python的Abaqus二次開發(fā)在層壓板修理模擬中的應(yīng)用[A];計(jì)算機(jī)輔助工程及其理論研討會2013(CAETS2013)論文集[C];2013年
相關(guān)重要報(bào)紙文章 前6條
1 高壽福;無所不能的靈蛇——Python[N];中華讀書報(bào);2001年
2 ·特約作者 鄒肇輝;BT編程的王者[N];電腦報(bào);2005年
3 易水;IT新詞集錦(403)[N];計(jì)算機(jī)世界;2004年
4 本報(bào)記者 蒙克;顛覆傳統(tǒng)數(shù)據(jù)庫的“玩具”[N];網(wǎng)絡(luò)世界;2009年
5 ;Ruby on Rails[N];計(jì)算機(jī)世界;2006年
6 周蓉蓉;中低端Unix直指Linux[N];計(jì)算機(jī)世界;2006年
相關(guān)碩士學(xué)位論文 前10條
1 張正陽;基于Python的戶外通訊設(shè)備連接關(guān)系的挖掘研究[D];蘇州大學(xué);2015年
2 魏武斌;基于Python的灌區(qū)水情采集系統(tǒng)開發(fā)[D];西北農(nóng)林科技大學(xué);2015年
3 趙強(qiáng);用于PCB版圖審查的Python腳本子系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)[D];西安電子科技大學(xué);2014年
4 鄺洪勝;基于Python的電商導(dǎo)購APP設(shè)計(jì)與實(shí)現(xiàn)[D];華南理工大學(xué);2015年
5 代紅震;基于STAF和Python混合編程的自動化測試系統(tǒng)的研究和實(shí)現(xiàn)[D];南京郵電大學(xué);2015年
6 劉志凱;基于Web的Python編程環(huán)境研究[D];新疆農(nóng)業(yè)大學(xué);2015年
7 趙明洪;Python程序設(shè)計(jì)題的查重研究[D];新疆農(nóng)業(yè)大學(xué);2015年
8 曹明君;基于Visual Studio與Python平臺開發(fā)有限元分析結(jié)果自動后處理系統(tǒng)[D];青島理工大學(xué);2015年
9 周健;Python虛擬機(jī)內(nèi)存管理的研究[D];南京大學(xué);2014年
10 王衡;PaaS平臺上Python沙箱研究[D];南京大學(xué);2014年
,本文編號:1554130
本文鏈接:http://sikaile.net/guanlilunwen/ydhl/1554130.html