DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Browser Sandboxing: the Rise of Seatbelt

Learn more about why modern browsers are becoming a major target.

Christopher Lamb user avatar by
Christopher Lamb
CORE ·
Jan. 09, 19 · Analysis
Like (1)
Save
Tweet
Share
4.82K Views

Join the DZone community and get the full member experience.

Join For Free

Modern browsers use a wide range of techniques to attempt to protect the underlying operating system from browser application level compromise. This, not surprisingly, is very difficult to do today.

The browser you're using to read this is essentially a virtualized computer that runs at the user level of your computer. It has networking capabilities built in via WebSockets and asynchronous processing via Web Workers. It has persistent storage. All of this is built into the browser itself, which is used to load arbitrary and provider-defined content from around the world. Seriously — open a mainstream news site like Al Jazeera or CNN with developer tooling enabled and take a look at the network traffic. Visiting that one site results in your browser firing off hundred(s) of requests to a wide range of sites. And many of those sites you've probably never heard of.

No wonder browsers are such a target!

So, browser developers have taken two basic but converging approaches to security. The first, exemplified by Edge, is exploit mitigation. The second, lead by Chrome, is sandboxing. Now, it's pretty clear you really want both, and in the future, we likely will as these approaches are converging. For now, let's take a look at sandboxing — specifically with Safari on MacOS.

So how does Safari sandbox? Well, it uses the same system any other MacOS apps can use — the app sandbox. This sandbox started its life as Seatbelt and has grown more popular and powerful over the years. Today, it's used on all *OS devices, though some devices have more stringent requirements as to when it needs to be used. The app sandbox has plenty of documentation written for a developers perspective. Seatbelt does not.

Fortunately, though, Seatbelt does have a fair amount of research that's been put together over the past couple of years, so we do have a bit of a headstart on figuring out exactly how it works. Basically, it uses access definition files, written in TinyScheme, to define acceptable application service access. The operating system will parse these configuration files and limit application access accordingly. The app sandbox extends Seatbelt and changes how it is applied to applications. The app sandbox is also dependent on code signing, while Seatbelt was not.

These policy files, today, are generated by Xcode when you build an app. The developer selects some group of entitlements, and the policy files are automatically created and distributed with the app. Safari entitlements are likely a bit more nuanced than this, as you can see by looking them over at /System/Library/Frameworks/WebKit.framework/Versions/A/Resources/*.sb. So, when Safari runs, MacOS loads these policies (and others, in fact, like /System/Library/Sandbox/Profiles/system.sb) to determine what on the operating system Safari can access. You can tell, based on the complexity of the policies, that Apple grants Safari a wide range of capabilities, likely much more than a typical app. We'll go more into the technical details of how this sandbox works next. Stay tuned!

operating system app

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Spring Boot Docker Best Practices
  • Using QuestDB to Collect Infrastructure Metrics
  • Promises, Thenables, and Lazy-Evaluation: What, Why, How
  • Project Hygiene

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: