What is Application Sandboxing? (2024)

What is application sandboxing?

Application sandboxing, also called application containerization, is an approach to software development and management and mobile application management (MAM) that limits the environments in which certain code can execute.

What is Application Sandboxing? (1)

The term sandbox comes from the idea of a child's sandbox, in which the sand and toys are kept inside a small container or walled area so children can play safely.

With the sandboxing approach, every software application is given a "sandbox," which is a controlled, restricted environment to run and execute code. This environment helps developers isolate and protect system resources from malware and other kinds of cyberthreats.

Researchers also use sandboxes to identify how a software behaves and spot any malware or other undesirable program elements.

The aim of application sandboxing

Application sandboxing seeks to improve security by isolating and shielding the application from outside intruders or malware. It's also used when preventing system resources or other applications from interacting with the protected app is necessary.

This kind of separation helps create a secure environment so the app can run without the risk of damaging the overall system. The approach is especially useful to run or test applications from untrustworthy sources (e.g., unknown developers) or websites.

Sandboxing also increases application integrity; it lets developers wrap the app in security policies or isolate and protect the application within its own virtual machine. The latter approach is known as micro-virtualization.

Application sandboxing benefits

The primary benefit of application sandboxing is enhanced security. By limiting the environment in which codes can execute, developers protect the app from outside influences, whether these are system resources or nonmalicious bugs, or malicious malware or hackers.

Application sandboxing is also beneficial because of the following:

  • ensures a secure application experience for users;
  • prevents users from accessing environments they do not need access to or should not access;
  • provides additional security in case of errors caused by unexpected bugs or vulnerabilities; and
  • encapsulates and isolates even human errors within the sandbox so the outside environment is intact.

Major software vendors like Apple and Google count on these benefits of sandboxes to provide secure application environments to users.

What is Application Sandboxing? (2)

Types of application sandboxes

Some of the most common types of application sandboxes include:

  • User-level validation
  • OS support
  • Browser-based
  • Java sandbox

Application sandboxes with user-level validation

Here, interaction between an application and its environment happens via system calls to the operating system (OS). This includes interactions like accessing devices or files, changing permissions, accessing the network, etc. The sandbox lets users create policies defining permissible system calls and how they can be used. It will review every system call, check its parameters and decide whether to allow it or return an error.

A crucial drawback of user-level validation is possible time-of-check-to-time-of-use (TOCTTOU) race conditions. By the time the request is processed and the system call is validated, the environment may change.

Android sandbox

The Android platform isolates apps from each other and protects them -- and the overall system -- from malicious apps and intruders. Android assigns a unique user ID (UID) to each application to create a kernel-level sandbox. This kernel ensures security between apps and the system at the process level. Moreover, because the sandbox is in the kernel, its security model extends to native code and OS applications, and all software above the kernel, including OS libraries, application runtime and application framework.

To identify and isolate app resources, the Android sandbox offers Linux user-based protection through standard Linux facilities such as user and group IDs assigned to apps. Apps cannot take malicious action against other apps in the sandbox because they don't have the appropriate default user privileges required to do so. The sandbox is auditable and it's based on the Unix ideas of process separation and file permissions.

Application sandboxing with integrated OS support

Consider some examples where the OS provides a built-in kernel support environment for application sandboxing:

Windows sandbox

Windows sandbox gives users a safe, lightweight environment to execute code and run applications. The environment is also temporary because all files, state and software are deleted once the sandbox is closed. Running the sandbox application again creates a new sandbox.

Notably, with the Windows sandbox, software components inside the environment run separately from the host, isolating the application from the underlying OS. All other software installed on the host are unavailable to the sandbox environment, and all applications that need the sandbox environment must be installed directly in the isolated environment.

Linux sandbox -- seccomp-BPF

SECure COMPuting with Berkeley Packet Filter (seccomp-BPF) is a sandboxing framework for Linux systems. Seccomp uses the BPF interpreter that lets users create filters to restrict specific data types to come through the socket. Users can assign a system call filter to a process, which then lets them allow or disallow access to calls based on predefined parameters.

Apple sandbox

Apple also provides a kernel-level sandbox with user-level library functions. However, it does not adopt the BPF filter, like the Linux sandbox. The Apple sandbox includes a server-level process to handle logging from the kernel, and a kernel extension to enforce sandbox policies via the TrustedBSD application program interface (API). Initially, an application calls the sandbox by calling sandbox_init that reads the policy definition file and converts it into a binary format for the kernel that initializes the sandbox.

Browser-based application and sandboxing

Web browsers can support a plugin architecture for application sandboxing. Modules that contain the native code can be loaded into the browser. This enables download of the requested content and invocation of the plugin associated with the object type invoked on the content. Common plugins include Adobe Flash, Adobe Reader, Java, etc.

Chromium Native Client (NaCl) is an example of sandboxing that specifically addresses the risk of running untrusted native code in a plugin and web browser. Chromium is the Open Source project behind the Google Chrome browser and NaCl is the browser plugin designed to safely execute untrusted native code in a browser.

NaCl, a user-level sandbox, executes with an inner sandbox and outer sandbox. The inner sandbox uses Intel's IA-32 architecture's segmentation capabilities to isolate memory regions among apps. The outer sandbox restricts app capabilities at the system call level.

NaCl also supports two categories of code: trusted and untrusted. Trusted code can run without a sandbox. Untrusted code must run inside a sandbox.

The Java sandbox

The Java sandbox is also known as the Java Virtual Machine (JVM), a hypothetical architecture where the application author does not know the client's OS or hardware architecture.

The three main components of a Java sandbox are:

  1. The bytecode verifier
  2. The class loader
  3. The security manager

The bytecode verifier ensures that the code looks like a Java byte code without any attempts to illegally convert data, bypass array bounds or forge pointers.

The class loader is responsible for enforcing restrictions on whether a program is allowed to load additional classes. It implements address space layout randomization (ASLR) while ensuring that key parts of the runtime environment are not overwritten and there's no interference of malicious code with trusted code. The security creates the protection domain. It creates the sandbox boundaries and is consulted for access to any resources. It throws a security exception error when any actions not allowed or defined in the policy are invoked.

See also: Build a virtualized development environment with these guidelines and learn about the first sandboxed antivirus: Windows Defender.

What is Application Sandboxing? (2024)

FAQs

What does sandboxing an app mean? ›

With the sandboxing approach, every software application is given a "sandbox," which is a controlled, restricted environment to run and execute code. This environment helps developers isolate and protect system resources from malware and other kinds of cyberthreats.

What is an example of sandboxing? ›

An example of sandboxing would be running a virtual machine running a Linux operating system on Windows. The virtual machine will utilize the hardware of your computer. However, it will not have any direct access to it. But you can connect a USB drive directly to the virtual machine, bypassing the operating system.

How to sandbox an application? ›

Usage
  1. Copy an executable file (and any other files needed to run the application) from the host and paste them into the Windows Sandbox window.
  2. Run the executable file or installer inside the sandbox.
  3. When you're finished experimenting, close the sandbox.
Mar 26, 2024

What is the main purpose of sandboxing? ›

Sandboxing works by keeping potentially malicious program or unsafe code isolated from the rest of the organization's environment. This way, it can be analyzed safely, without compromising your operating system or host devices. If a threat is detected, it can be removed proactively.

Is sandboxing obsolete? ›

No, not really. Sandboxing can be a great tool for analyzing malware once it's detected through other techniques. Organizations using sandboxes should consider them just one part of a modern defense-in-depth and multi-tiered security model.

What is application virtualization vs sandboxing? ›

The most significant difference between full virtualization and sandboxing / application virtualization is that the target applications run in a dedicated OS, known as the guest, on the host. As a result, the exploitation of the kernel in the guest is isolated from the host OS kernel.

Is sandboxing a malware? ›

A sandbox is a system for malware detection that runs a suspicious object in a virtual machine (VM) with a fully-featured OS and detects the object's malicious activity by analyzing its behavior. If the object performs malicious actions in a VM, the sandbox detects it as malware.

What is sandboxing not allowed? ›

Sandbox mode is a security feature that prevents Access from running certain expressions that could be unsafe. These unsafe expressions are blocked regardless of whether the database has been 'trusted' – its content enabled.

What is Google sandboxing? ›

The term “Google Sandbox” is used by some SEOs to refer to the situation where new websites are not ranked well in Google search results. The idea behind this is that Google may place newly created websites in a “sandbox” for a certain period of time.

Are iPhone apps sandboxed? ›

And users can access these apps on their Apple devices without undue fear of viruses, malware, or unauthorized attacks. On iPhone, iPad, and iPod touch, all apps are obtained from the App Store—and all apps are sandboxed—to provide the tightest controls.

Does Apple have a sandbox? ›

Overview. App Sandbox provides protection to system resources and user data by limiting your app's access to resources requested through entitlements. To distribute a macOS app through the Mac App Store, you must enable the App Sandbox capability.

Does Android use sandboxing? ›

The Android platform uses the concept of app sandboxing to maintain robust execution and security boundaries for app code, along process boundaries. It's a common practice for apps to include third party code in their apps, often in the form of SDKs such as ads SDKs or analytics SDKs.

What is an API sandbox? ›

What is an API sandbox? Following what has been mentioned above, an API sandbox is a feature that allows developers to imitate the characteristics of a production environment in a dedicated testing environment. Within the sandbox, developers create simulated responses from all APIs the application relies on.

What is sandboxing on an iPhone? ›

Sandboxing. All third-party apps are “sandboxed,” so they are restricted from accessing files stored by other apps or from making changes to the device. Sandboxing is designed to prevent apps from gathering or modifying information stored by other apps.

What is sandbox app on iphone? ›

App Sandbox provides protection to system resources and user data by limiting your app's access to resources requested through entitlements.

Is sandboxing a type of malware? ›

Sandboxing is a security technique that is used to restrict the interaction of a program with the operating system simply because the program is untested or the program contains some malicious codes. This is usually done when analyzing or testing a program such as new software or malware.

Top Articles
Latest Posts
Article information

Author: Kieth Sipes

Last Updated:

Views: 6522

Rating: 4.7 / 5 (47 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Kieth Sipes

Birthday: 2001-04-14

Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271

Phone: +9663362133320

Job: District Sales Analyst

Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing

Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.