Sandbox 沙盒
In computer security, a sandbox is a security mechanism for separating running programs, usually in an effort to mitigate system failures or software vulnerabilities from spreading.
目的:在程序超出预期时,降低破坏范围。
A sandbox typically provides a tightly controlled set of resources for guest programs to run in, such as scratch space on disk and memory. Network access, the ability to inspect the host system or read from input devices are usually disallowed or heavily restricted.
手段:限制它的运行和访问范围。
让程序在受限的环境中运行:
A sandbox is implemented by executing the software in a restricted operating system environment, thus controlling the resources (for example, file descriptors, memory, file system space, etc.) that a process may use.[3]
Examples of sandbox implementations include the following:
- A jail: network-access restrictions, and a restricted filesystem namespace. Jails are most commonly used in virtual hosting.[4]
- Rule-based execution gives users full control over what processes are started, spawned (by other applications), or allowed to inject code into other applications and have access to the net, by having the system assign access levels for users or programs according to a set of determined rules.[5] It also can control file/registry security (what programs can read and write to the file system/registry). In such an environment, viruses and trojans have fewer opportunities of infecting a computer. The SELinux and Apparmor security frameworks are two such implementations for Linux.
- Virtual machines emulate a complete host computer, on which a conventional operating system may boot and run as on actual hardware. The guest operating system runs sandboxed in the sense that it does not function natively on the host and can only access host resources through the emulator.
- Sandboxing on native hosts: Security researchers rely heavily on sandboxing technologies to analyse malware behaviour. By creating an environment that mimics or replicates the targeted desktops, researchers can evaluate how malware infects and compromises a target host. Numerous malware analysis services are based on the sandboxing technology.[6]
- Capability systems can be thought of as a fine-grained sandboxing mechanism, in which programs are given opaque tokens when spawned and have the ability to do specific things based on what tokens they hold. Capability-based implementations can work at various levels, from kernel to user-space. An example of capability-based user-level sandboxing involves HTML rendering in a Web browser.
- Secure Computing Mode (seccomp) is a sandbox built in the Linux kernel. When activated, seccomp only allows the
write(),read(),exit(), andsigreturn()system calls. - HTML5 has a "sandbox" attribute for use with iframes.[7]
- Java virtual machines include a sandbox to restrict the actions of untrusted code, such as a Java applet.
- The .NET Common Language Runtime provides Code Access Security to enforce restrictions on untrusted code.
- Software Fault Isolation (SFI),[8] allows running untrusted native code by sandboxing all store, read and jump assembly instructions to isolated segments of memory.
Some of the use cases for sandboxes include the following:
- Online judge systems to test programs in programming contests.
- New-generation pastebins allowing users to execute pasted code snippets on the pastebin's server.
https://en.wikipedia.org/wiki/Sandbox_(computer_security)
Sandbox 沙盒的更多相关文章
- Xcode 7.0 SDK(Software Development Kit) 及 Sandbox(沙盒) 存放路径
1. Sandbox(沙盒) 存放路径 我的硬盘/Users/wj121/Library/Developer/CoreSimulator/Devices/879D7E35-BE50-4620-97E1 ...
- APNS IOS 消息推送沙盒模式和发布模式
在做.NET向IOS设备的App进行消息推送时候,采用的是PushSharp开源类库进行消息的推送,而在开发过程中,采用的是测试版本的app,使用的是测试的p12证书采用的是ApnsConfigura ...
- 沙盒SandBox
每个App都有自己的沙盒,也就是一个存储空间.App之间没有权限访问对方的沙盒资源.沙盒的目录下有三个文件夹:Documents.Library.temp 目录结构 Documents:用于存储用户数 ...
- IOS 学习之 iOS沙盒(sandbox) 介绍 沙盒机制 文件操作(一)
1.iOS沙盒机制 iOS应用程序只能在为该改程序创建的文件系统中读取文件,不可以去其它地方访问,此区域被成为沙盒,所以所有的非代码文件都要保存在此,例如图像,图标,声音,映像,属性列表,文本文件等. ...
- iOS 沙盒(sandbox)结构 使用 实例
声明:该文档是经过自己查找网上的资料以及自己多年的经验后而总结出来的,希望对大家有所帮助,有什么不恰当支出还请大家多指点! iOS中的沙盒机制(SandBox)是一种安全体系,它规定了应用程序只能在为 ...
- 数据存储--沙盒sandBox
默认情况下,每个沙盒必含有3个文件夹:Documents, Library 和 tmp 一.沙盒(sandbox)出于安全的目的,应用程序只能将自己的数据和偏好设置写入到几个特定的位置上.当应用程序被 ...
- iOS 沙盒(sandbox)机制和文件操作
本文参看了 http://www.uml.org.cn/mobiledev/201209211.asp#1 这篇文章中的介绍,尊重原著. 1.IOS沙盒机制 IOS应用程序只能在本应用程序中创建的文件 ...
- IOS学习之IOS沙盒(sandbox)机制和文件操作
IOS学习之IOS沙盒(sandbox)机制和文件操作(一) 1.IOS沙盒机制 IOS应用程序只能在为该改程序创建的文件系统中读取文件,不可以去其它地方访问,此区域被成为沙盒,所以所有的非代码文件都 ...
- 【iOS开发必收藏】详解iOS应用程序内使用IAP/StoreKit付费、沙盒(SandBox)测试、创建测试账号流程!【2012-12-11日更新获取”产品付费数量等于0的问题”】
转的别人的 看到很多童鞋问到,为什么每次都返回数量等于0?? 其实有童鞋已经找到原因了,原因是你在 ItunesConnect 里的 “Contracts, Tax, and Banking”没有完成 ...
随机推荐
- WPS for Linux字体配置(Ubuntu 16.04)
错误提示: 解决方法: 从http://bbs.wps.cn/thread-22355435-1-1.html下载字体库,离线版本:(链接: https://pan.baidu.com/s/1i5dz ...
- sql server 2016
https://www.microsoft.com/zh-cn/server-cloud/products/sql-server/
- 未来 Web 设计的 7 大趋势
1.手势代替点击 还记得曾经是怎样滚动网页的吗?将鼠标移到屏幕的右边缘,然后拖动古代称为"滚动栏"的玩意儿: 略微专业点的可能会使用鼠标滚轮,光标键或触控板,这已经率先于大多数的用 ...
- 【Cloud Foundry】Could Foundry学习(一)——Could Foundry浅谈
在阅读的过程中有不论什么问题.欢迎一起交流 邮箱:1494713801@qq.com QQ:1494713801 Cloud Foundry是VMware推出的业界第一个开源PaaS云平台.他包 ...
- ios-UI1
// AppDelegate.h // 01-HelloWorld的实现 // /* 新建工程的时候,Use Core Data:比如本地缓存, Include Unit test:增加单元测试 In ...
- 布局技巧1:创建可重用的UI组件(include标签)
Android平台提供了大量的UI构件,你可以将这些小的视觉块(构件)搭建在一起,呈现给用户复杂且有用的画面.然而,应用程序有时需要一些高级的视觉组件.为了满足这一需求,并且能高效的实现,你可以把多个 ...
- tiny4412 裸机程序 六、重定位代码到IRAM+0x8000【转】
本文转载自:http://blog.csdn.net/eshing/article/details/37115697 一.重定向 对于程序而言,我们需要理解两个概念,一是程序当前所处的地址,即程序在运 ...
- 51nod 1611 金牌赛事
被亮亮D飞啦!!QWQ 这题明明是最大权闭合子图+线段树优化构图好不好 被迫考虑DP,并且考虑f[i]表示到第i个位置的最大值(第i个位置可选可不选) 对于最终的答案,我们可以分割成一段一段的,也就是 ...
- ConfigurationManager.AppSettings Property
在app.config文件中添加如下配置 <appSettings> <add key="Server" value="127.0.0.1"/ ...
- poj3463 Sightseeing——次短路计数
题目:http://poj.org/problem?id=3463 次短路计数问题,在更新最短路的同时分类成比最短路短.长于最短路而短于次短路.比次短路长三种情况讨论一下,更新次短路: 然而其实不必被 ...