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:

  • 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(), and sigreturn() 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:

https://en.wikipedia.org/wiki/Sandbox_(computer_security)

Sandbox 沙盒的更多相关文章

  1. Xcode 7.0 SDK(Software Development Kit) 及 Sandbox(沙盒) 存放路径

    1. Sandbox(沙盒) 存放路径 我的硬盘/Users/wj121/Library/Developer/CoreSimulator/Devices/879D7E35-BE50-4620-97E1 ...

  2. APNS IOS 消息推送沙盒模式和发布模式

    在做.NET向IOS设备的App进行消息推送时候,采用的是PushSharp开源类库进行消息的推送,而在开发过程中,采用的是测试版本的app,使用的是测试的p12证书采用的是ApnsConfigura ...

  3. 沙盒SandBox

    每个App都有自己的沙盒,也就是一个存储空间.App之间没有权限访问对方的沙盒资源.沙盒的目录下有三个文件夹:Documents.Library.temp 目录结构 Documents:用于存储用户数 ...

  4. IOS 学习之 iOS沙盒(sandbox) 介绍 沙盒机制 文件操作(一)

    1.iOS沙盒机制 iOS应用程序只能在为该改程序创建的文件系统中读取文件,不可以去其它地方访问,此区域被成为沙盒,所以所有的非代码文件都要保存在此,例如图像,图标,声音,映像,属性列表,文本文件等. ...

  5. iOS 沙盒(sandbox)结构 使用 实例

    声明:该文档是经过自己查找网上的资料以及自己多年的经验后而总结出来的,希望对大家有所帮助,有什么不恰当支出还请大家多指点! iOS中的沙盒机制(SandBox)是一种安全体系,它规定了应用程序只能在为 ...

  6. 数据存储--沙盒sandBox

    默认情况下,每个沙盒必含有3个文件夹:Documents, Library 和 tmp 一.沙盒(sandbox)出于安全的目的,应用程序只能将自己的数据和偏好设置写入到几个特定的位置上.当应用程序被 ...

  7. iOS 沙盒(sandbox)机制和文件操作

    本文参看了 http://www.uml.org.cn/mobiledev/201209211.asp#1 这篇文章中的介绍,尊重原著. 1.IOS沙盒机制 IOS应用程序只能在本应用程序中创建的文件 ...

  8. IOS学习之IOS沙盒(sandbox)机制和文件操作

    IOS学习之IOS沙盒(sandbox)机制和文件操作(一) 1.IOS沙盒机制 IOS应用程序只能在为该改程序创建的文件系统中读取文件,不可以去其它地方访问,此区域被成为沙盒,所以所有的非代码文件都 ...

  9. 【iOS开发必收藏】详解iOS应用程序内使用IAP/StoreKit付费、沙盒(SandBox)测试、创建测试账号流程!【2012-12-11日更新获取”产品付费数量等于0的问题”】

    转的别人的 看到很多童鞋问到,为什么每次都返回数量等于0?? 其实有童鞋已经找到原因了,原因是你在 ItunesConnect 里的 “Contracts, Tax, and Banking”没有完成 ...

随机推荐

  1. Ubuntu下的软件一般安装在哪个文件夹里

    一般安装在/usr下,里面很多文件夹,根据文件的类型,分门别类,不是一个软件一个文件夹.以前老版本的Linux习惯放在/usr/local目录下. 部分软件放在/opt下,则是一个软件统一在一个文件夹 ...

  2. 浅谈SQL Server 对于内存的管理--宋沄剑 英文名:CareySo

    http://www.cnblogs.com/CareySon/archive/2012/08/16/HowSQLServerManageMemory.html

  3. 浅谈WEB标准

    WEB标准,WEB标准.可亲可爱的WEB,什么是你定下的标准呢.这几天又又一次回归最基础的知识了,OK.言归正传,什么是WEB标准.为什么要用WEB标准? 比方说,如今的浏览器版本号多吧,chrome ...

  4. 新手学測试----Unit Test(单元測试)

    在程序猿做项目的过程中,每当完毕一个功能,首先自己须要对完毕的功能进行測试.我如今正在做的项目用的工具是VS2012.那么接下来,就说一说在VS2012中是怎样创建单元測试的. 怎样创建单元測试? 在 ...

  5. 跨平台C、C++代码注意的事项

    在我们的开发中,跨平台的需求越来越强烈,怎样保持C/C++代码能在多个平台上编译,是一个比較值得研究的问题.关于跨平台的文章网上非常多,跨平台的库网上也非常多.那么我从自己的跨平台开发经验谈一谈自己的 ...

  6. js实现伪音乐盒

    支持快进 <div class="music-part"> <div class="box-bg"></div> <d ...

  7. ssh整合步骤整理

    PackageUtil.createPackages(PackageUtil.changePath(System.getProperty("user.dir")));

  8. hdoj--5611--Baby Ming and phone number(模拟水题)

     Baby Ming and phone number Crawling in process... Crawling failed Time Limit:1500MS     Memory Li ...

  9. bzoj2780

    AC自动机+树链剖分+线段树/树状数组+dfs序+树链的并 题意:给出n个母串和q个询问串,对于每个询问串输出有多少个母串包含这个询问串 N=∑|母串|<=10^5 Q=∑|询问串|<=3 ...

  10. 看看 SDWebImage内部基本实现过程

    一.实现流程 入口 setImageWithURL:placeholderImage:options: 会先把 placeholderImage 显示,然后 SDWebImageManager 根据 ...