Chinaunix首页 | 论坛 | 博客
  • 博客访问: 197328
  • 博文数量: 77
  • 博客积分: 1749
  • 博客等级: 上尉
  • 技术积分: 810
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-28 18:27
文章分类
文章存档

2012年(28)

2011年(49)

分类: LINUX

2011-12-12 20:30:47

之前接触的沙盒都是来自于软件开发领域,现在介绍一下信息安全领域的沙盒,来源于维基百科。


In computer security, a sandbox is a security mechanism for separating running programs. It is often used to execute untested code, or untrusted programs from unverified third-parties, suppliers, untrusted users and untrusted websites.


The 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. In this sense, sandboxes are a specific example of virtualization.


Scratch space is space on the hard disk drive that is dedicated for only temporary storage. It cannot be used to permanently backup files. Scratch disks can be set to erase all data at regular intervals so that the disk space is left free for future use. The management of scratch disk space is typically dynamic, occurring when needed.

Scratch space is commonly used in graphic design programs, such as Adobe Photoshop. It is used when the program needs more memory, and the amount of available system RAM is insufficient. A common error in that program is "scratch disks full", which occurs when one has left the scratch disks configured to the default setting, being the boot drive. Many computer users gradually fill up their primary hard drive with permanent data, slowly reducing the amount of space the scratch disk may take up.

Partitioning off several gigabytes of hard drive and leaving that space empty will ensure a reliable scratch disk.[weasel words] Hard drive space, on a per-gigabyte basis, is far cheaper than RAM, though performs far slower. Even if on a separate physical drive (even a high-spindle drive such as a 'WD Raptor' or an SSD), to the main operating system and software, a scratch disk cannot match RAM for speed. However, since 10,000 RPM hard drives or SSDs can be purchased with capacities of up to 300 GB or beyond - whereas few motherboards can handle more than 32 GB of RAM - for applications such as video editing, it is a reasonable solution.


Some examples of sandboxes are:

  • Applets are self-contained programs that run in a virtual machine or scripting language interpreter that does the sandboxing. In application streaming schemes, the applet is downloaded onto a remote client and may begin executing before it arrives in its entirety. Applets are common in web browsers, which use the mechanism to safely execute untrusted code embedded in web pages. Three common applet implementations—Adobe FlashJava applets and Silverlight—provide (at minimum) a rectangular window with which to interact with the user and some persistent storage (at the user's permission).
  • jail is a set of resource limits imposed on programs by the operating system kernel. It can include I/O bandwidth caps, disk quotas, network access restrictions and a restricted filesystem namespace. Jails are most commonly used in virtual hosting.
  • Rule-based Execution gives users full control over what processes are started, spawned (by other applications), or allowed to inject code into other apps and have access to the net. It also can control file/registry security (What programs can read and write to the file system/registry) As such, viruses and trojans will have a less likely chance of infecting your PC. The SELinux and Apparmor security frameworks are two such implementations forLinux.
  • 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 is sandboxed in the sense that it does not run 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.
  • 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 would be HTML rendering in Google Chrome.
  • Online judge systems to test programs in programming contests.
  • New generation pastebins allowing users to execute pasted code snippets.
  • Linux' 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 [2
    ]

阅读(1257) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~