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 16.04安装PPA图形化管理工具Y PPA Manager

    安装: sudo add-apt-repository ppa:webupd8team/y-ppa-manager sudo apt-get update sudo apt-get install y ...

  2. python 元组不变 列表可变

    python 元组不变 列表可变 1,   --元组,注意要有逗号: [1] --列表 竟然才开始写python blog:

  3. [Vue +TS] Use Two-Way Binding in Vue Using @Model Decorator with TypeScript

    Vue models, v-model, allow us to use two-way data binding, which is useful in some cases such as for ...

  4. 如何使用PHP显示在线Word文档

    在线生成FlashPaper文档 1 安装 FlashPaper2,最好下载绿色版的FlashPaper软件,如下所示,先点击初始化.bat即开始绿化,然后双击"FlashPrinter.e ...

  5. leetcode笔记:Wiggle Sort

    一. 题目描写叙述 Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nu ...

  6. Domain-specific language 领域特定语言

    https://en.wikipedia.org/wiki/Domain-specific_language A domain-specific language (DSL) is a compute ...

  7. 在word中doc与docx的区别是什么(整理)

    在word中doc与docx的区别是什么(整理) docx 是Office2007使用的,是用新的基于XML的压缩文件格式取代了其目前专有的默认文件格式,在传统的文件名扩展名后面添加了字母x(即.do ...

  8. bzoj 4537 最小公倍数

    给定一张N个顶点M条边的无向图 每条边上带有权值 所有权值都可以分解成2^a*3^b的形式 q个询问,每次询问给定四个参数u.v.a和b,请你求出是否存在一条顶点u到v之间的路径,使得路径依次经过的边 ...

  9. 【BZOJ 3032】 七夕祭

    [题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=3032 [算法] 交换左右两个相邻格子的摊点,不会改变这一行的摊点个数 交换上下两个相 ...

  10. 第三周 Leetcode 4. Median of Two Sorted Arrays (HARD)

    4. Median of Two Sorted Arrays 给定两个有序的整数序列.求中位数,要求复杂度为对数级别. 通常的思路,我们二分搜索中位数,对某个序列里的某个数 我们可以在对数时间内通过二 ...