paris - Dave's Blog

Search
My timeline on Mastodon

Edge browser and JavaScript UWP app security model comparison

2018 Nov 29, 2:21

There are two main differences in terms of security between a JavaScript UWP app and the Edge browser:

Process Model

A JavaScript UWP app has one process (technically not true with background tasks and other edge cases but ignoring that for the moment) that runs in the corresponding appcontainer defined by the app's appx manifest. This one process is where edgehtml is loaded and is rendering HTML, talking to the network, and executing script. Specifically, the UWP main UI thread is the one where your script is running and calling into WinRT.

In the Edge browser there is a browser process running in the same appcontainer defined by its appx manifest, but there are also tab processes. These tab processes are running in restricted app containers that have fewer appx capabilities. The browser process has XAML loaded and coordinates between tabs and handles some (non-WinRT) brokering from the tab processes. The tab processes load edgehtml and that is where they render HTML, talk to the network and execute script.

There is no way to configure the JavaScript UWP app's process model but using WebViews you can approximate it. You can create out of process WebViews and to some extent configure their capabilities, although not to the same extent as the browser. The WebView processes in this case are similar to the browser's tab processes. See the MSWebViewProcess object for configuring out of process WebView creation. I also implemented out of proc WebView tabs in my JSBrowser fork.

ApplicationContentUriRules

The ApplicationContentUriRules (ACUR) section of the appx manifest lets an application define what URIs are considered app code. See a previous post for the list of ACUR effects.

Notably app code is able to access WinRT APIs. Because of this, DOM security restrictions are loosended to match what is possible with WinRT.

Privileged DOM APIs like geolocation, camera, mic etc require a user prompt in the browser before use. App code does not show the same browser prompt. There still may be an OS prompt – the same prompt that applies to any UWP app, but that’s usually per app not per origin.

App code also gets to use XMLHttpRequest or fetch to access cross origin content. Because UWP apps have separate state, cross origin here might not mean much to an attacker unless your app also has the user login to Facebook or some other interesting cross origin target.

PermalinkCommentsedge javascript security uwp web-security wwa

Application Content URI Rules wildcard syntax

2017 May 31, 4:48

Application Content URI Rules (ACUR from now on) defines the bounds of the web that make up the Microsoft Store application. Package content via the ms-appx URI scheme is automatically considered part of the app. But if you have content on the web via http or https you can use ACUR to declare to Windows that those URIs are also part of your application. When your app navigates to URIs on the web those URIs will be matched against the ACUR to determine if they are part of your app or not. The documentation for how matching is done on the wildcard URIs in the ACUR Rule elements is not very helpful on MSDN so here are some notes.

Rules

You can have up to 100 Rule XML elements per ApplicationContentUriRules element. Each has a Match attribute that can be up to 2084 characters long. The content of the Match attribute is parsed with CreateUri and when matching against URIs on the web additional wildcard processing is performed. I’ll call the URI from the ACUR Rule the rule URI and the URI we compare it to found during app navigation the navigation URI.

The rule URI is matched to a navigation URI by URI component: scheme, username, password, host, port, path, query, and fragment. If a component does not exist on the rule URI then it matches any value of that component in the navigation URI. For example, a rule URI with no fragment will match a navigation URI with no fragment, with an empty string fragment, or a fragment with any value in it.

Asterisk

Each component except the port may have up to 8 asterisks. Two asterisks in a row counts as an escape and will match 1 literal asterisk. For scheme, username, password, query and fragment the asterisk matches whatever it can within the component.

Host

For the host, if the host consists of exactly one single asterisk then it matches anything. Otherwise an asterisk in a host only matches within its domain name label. For example, http://*.example.com will match http://a.example.com/ but not http://b.a.example.com/ or http://example.com/. And http://*/ will match http://example.com, http://a.example.com/, and http://b.a.example.com/. However the Store places restrictions on submitting apps that use the http://* rule or rules with an asterisk in the second effective domain name label. For example, http://*.com is also restricted for Store submission.

Path

For the path, an asterisk matches within the path segment. For example, http://example.com/a/*/c will match http://example.com/a/b/c and http://example.com/a//c but not http://example.com/a/b/b/c or http://example.com/a/c

Additionally for the path, if the path ends with a slash then it matches any path that starts with that same path. For example, http://example.com/a/ will match http://example.com/a/b and http://example.com/a/b/c/d/e/, but not http://example.com/b/.

If the path doesn’t end with a slash then there is no suffix matching performed. For example, http://example.com/a will match only http://example.com/a and no URIs with a different path.

As a part of parsing the rule URI and the navigation URI, CreateUri will perform URI normalization and so the hostname and scheme will be made lower case (casing matters in all other parts of the URI and case sensitive comparisons will be performed), IDN normalization will be performed, ‘.’ and ‘..’ path segments will be resolved and other normalizations as described in the CreateUri documentation.

PermalinkCommentsapplication-content-uri-rules programming windows windows-store

Retweet of vivisandroan

2015 Nov 13, 1:43
Parisians Use #PorteOuverte Hashtag for Those Seeking Safety From Attacks: The hashtag #PorteOuverte spread on... http://bit.ly/20Sc0TM 
PermalinkComments

ericlaw: A nice look at HTTP/2 in practice, including use of data frame padding to attempt to thwart datalength-leak attacks.

2015 Jan 15, 9:32
Eric Lawrence @ericlaw :
A nice look at HTTP/2 in practice, including use of data frame padding to attempt to thwart datalength-leak attacks. http://blog.httpwatch.com/2015/01/16/a-simple-performance-comparison-of-https-spdy-and-http2/ …
PermalinkComments

Retweet of TriciaLockwood

2013 Jan 9, 1:45
.@parisreview So is Paris any good or not
PermalinkComments

The frequent fliers who flew too much - latimes.com

2012 May 6, 10:24

“Both men bought tickets that gave them unlimited first-class travel for life on American Airlines. “

“He was airborne almost every other day. If a friend mentioned a new exhibit at the Louvre, Rothstein thought nothing of jetting from his Chicago home to San Francisco to pick her up and then fly to Paris together.”

“She pulled years of flight records for Rothstein and Vroom and calculated that each was costing American more than $1 million a year.”

PermalinkCommentshumor airline american-airlines travel

(via Ferris Bueller, Film & Super Bowl Commercial...

2012 Feb 7, 11:53


(via Ferris Bueller, Film & Super Bowl Commercial Side-by-Side Comparison)

PermalinkCommentshumor video ferris-bueller ad

JavaScript Array methods in the latest browsers

2011 Dec 3, 6:46

Cool and (relatively) new methods on the JavaScript Array object are here in the most recent versions of your favorite browser! More about them on ECMAScript5, MSDN, the IE blog, or Mozilla's documentation. Here's the list that's got me excited:

some & every
Does your callback function return true for any (some) or all (every) of the array's elements?
filter
Filters out elements for which your callback function returns false (in a new copy of the Array).
map
Each element is replaced with the result of it run through your callback function (in a new copy of the Array).
reduce & reduceRight
Your callback is called on each element in the array in sequence (from start to finish in reduce and from finish to start in reduceRight) with the result of the previous callback call passed to the next. Reduce your array to a single value aggregated in any manner you like via your callback function.
forEach
Simply calls your callback passing in each element of your array in turn. I have vague performance concerns as compared to using a normal for loop.
indexOf & lastIndexOf
Finds the first or last (respectively) element in the array that matches the provided value via strict equality operator and returns the index of that element or -1 if there is no such element. Surprisingly, no custom comparison callback method mechanism is provided.
PermalinkCommentsjavascript array technical programming

Comparison of CORS and UMP - Web Security

2010 May 7, 6:29UMP instead of CORS for cross-domain access control: "...a developer can read only UMP and ignore CORS, yet still create safe code. This code can successfully message with CORS resources that do not require credentials. UMP is therefore a way of messaging with the credential-free subset of CORS resources."PermalinkCommentsw3c security web browser technical

Comparison of JavaScript frameworks - Wikipedia, the free encyclopedia

2010 Apr 27, 3:30PermalinkCommentsajax javascript reference web browser script technical jquery gwt

YouTube - Galactica: Sabotage Comparison

2010 Mar 11, 11:50Side by side comparison of the BSG+Sabotage mashup and the original Sabotage music video. Cool remix certainly although it really must be watched in this side by side comparison form to be appreciated. By itself the remix isn't really coherent.
PermalinkCommentsbsg video humor music music-video sabotage beastie-boys

Marc Rotenberg: Brandeis in Italy: The Privacy Issues in the Google Video Case

2010 Mar 9, 5:35Comparison of US claim 'the tort of appropriation' to Google video case in Italy.PermalinkCommentsitaly google privacy law legal us technical

The "blueprints" of Monsieur Eiffel

2009 Dec 23, 10:02"These designs are reproductions of Eiffel's original designs included in his book "The 300 Meter Tower", Lemercier publications, Paris 1900."PermalinkCommentsdesign architecture blueprints france eiffel eiffel-tower retro visualization illustration

How to Google Maps on Vimeo

2009 Aug 31, 4:53From Ira as part of The Balloon Project "... took the lo-fi diy map making essentials (portable helium tank, party balloons, and a disposable video camera) to Paris, France, where they launched a video camera into the sky not knowing where it would go, and created some very unique aerial cartography of the Place de la Concorde.' I'd love to see this run through photo stitching software like Photosynth and then layered on Google Maps.PermalinkCommentsmap balloon art ira-mowen france paris

yahoo! vs. google: synerge

2009 Jul 20, 5:25Search results comparison tool with a neato visualization of overlapping results.PermalinkCommentsgoogle yahoo search tool visualization mashup flash web technical

Common Web Server software comparison report

2009 Jul 1, 2:24Stats on HTTP servers and HTTP server response headers. "Current statistics are based on a sample of 84604 probed servers, gathered in the last 386 days."PermalinkCommentshttp statistics server internet http-header via:mnot technical

CSS - Contents and compatibility - mobile

2009 May 3, 4:42A comparison of the implementation status of various CSS features across mobile browsers.PermalinkCommentsvia:connolly css html browser web mobile android google iphone compatibility

Awesome Spokesmen Billy Mays and Vince Offer

2009 Apr 8, 4:06
Vince Offer photo from onebutan-iphoneBilly Mays photo from onebutan-iphone

There can be no doubt that infomercial pitchmen Billy Mays and Vince Offer are awesome, but how can I decide which is my favorite?

Infomercial Performance.
Among other things they sell Zorbeez and ShamWow respectively, both of which are absorbant towels so first up I can get a somewhat apples-to-apples comparison on informercials for comparable products. Thankfully someone has created a Vince Offer vs Billy Mays youtube video featuring these informercials.

Billy has an upbeat yell to everything he says while Vince has an endearing condescension to his "You followin' me camera guy?" In the end I must give this one to Vince Offer.

Extracurriculars.
Billy Mays has a new show Pitchmen on the Discovery Channel, a reality show involving folks pitching inventions to the pitchmen Billy Mays and someone else. Vince Offer was arrested for assaulting a prostitute. A clear win for Billy.
Intra-pitchman Interactions.
Billy has challenged Vince to a pitchman-off which on the surface sounds like a point for Billy, but if you listen to the challenge Billy says that Vince attempted to extend the olive branch. Billy Mays calls out Vince on the Adam Corolla Show
PermalinkCommentspersonal2 infomercial stupid vince offer billy mays

Internet Explorer 8 Released

2009 Mar 20, 6:18

Our Fearless Leader reveals IE8 at MIX09. Photo by DBegley.IE8, the software I've been working on for some time now, has finally been released at MIX09.

As I mentioned previously, I worked on accelerators (previously named Activities) in IE8. Looking at the kinds of things I blog about on the IE Blog, you might also correctly guess that I work on the networking stack. Ask me about what else I worked on during IE8 development. The past few months were very busy for me and I'm happy this is finally out.PermalinkCommentstechnical internet explorer ie8

2008 Election Maps

2008 Nov 6, 6:24Comparison of various website's US presidential election maps: "Most media outlets covering the 2008 US Presidential Election used the familar red/blue map to track the progress of the race as results from the polls rolled in Tueday evening. Here are several of those maps, in some ways as similar to each other as they are varied."PermalinkCommentsmap visualization geography president election vote voting politics
Older Entries Creative Commons License Some rights reserved.