camera - 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

Retweet of hodgman

2015 Nov 3, 1:37
📷 http://tmblr.co/ZVV4ww1xPc0Gx 
PermalinkComments

Tweet from David_Risney

2015 Sep 19, 1:08
Designing the least JPG compressible fabric pattern: http://dsp.stackexchange.com/questions/2010/what-is-the-least-jpg-compressible-pattern-camera-shooting-piece-of-cloth-sca …. This is the anti @ericlaw
PermalinkComments

Serializing JavaScript Promise Execution

2013 Aug 10, 3:07
Occasionally I have need to run a set of unrelated promises in series, for instance an object dealing with a WinRT camera API that can only execute one async operation at a time, or an object handling postMessage message events and must resolve associated async operations in the same order it received the requests. The solution is very simply to keep track of the last promise and when adding a new promise in serial add a continuation of the last promise to execute the new promise and point the last promise at the result. I encapsulate the simple solution in a simple constructor:

    function PromiseExecutionSerializer() {
var lastPromise = WinJS.Promise.wrap(); // Start with an empty fulfilled promise.

this.addPromiseForSerializedExecution = function(promiseFunction) {
lastPromise = lastPromise.then(function () {
// Don't call directly so next promise doesn't get previous result parameter.
return promiseFunction();
});
}
}

The only thing to watch out for is to ensure you don't pass the result of a previous promise onto a subsequent promise that is unrelated.
PermalinkCommentsasync javascript promise technical

wired: [via motherjones]: theweekmagazine: Sticking to an...

2012 Jun 7, 3:29


wired:

[via motherjones]:

theweekmagazine:

Sticking to an exercise routine takes dedication, and many fitness junkies swear that a running companion can be a huge help. That’s why researchers have developed “Joggobot,” a quad-rotor helicopter drone designed to motivate joggers by flying in front of them. 

The aerial robot uses its camera to spot a colorful pattern on a T-shirt worn by the jogger, and flies at a safe distance ahead. The runner can control Joggobot using a smartphone: In “companion mode,” the drone simply maintains the jogger’s pace; in “coach mode,” it pushes its human trainee a little faster.

Don’t worry, there’s a video

Science!

Maybe it should chase you instead?

PermalinkCommentshumor exercise robot future video

(via Descriptive Camera) A digital camera sends photos to...

2012 Apr 25, 4:23


(via Descriptive Camera)

A digital camera sends photos to Mechanical Turk service to generate a textual description and print the result on a thermal printer.  Thus a camera that prints out a textual description of what you photographed.

PermalinkCommentshumor camera photo mechanical-turk

BBC News - Polar bears get the better of spy cameras

2011 Mar 10, 6:14Polar bears destroy hiddern cameras (filming them for Science!) It is a well known fact that polar bears are very protective of their rights to privacy.
PermalinkCommentsvideo science nature animals bbc humor

Download a new Radiohead concert film for free | Music | Newswire | The A.V. Club

2010 Sep 4, 8:10"Reminiscent of the Beastie Boys "Awesome; I Fuckin'Shot That", more than 50 Radiohead fans captured the band's Aug. 23 show in Prague on Flip cameras, with the resulting footage later assembled into the new Live In Praha DVD."
PermalinkCommentsradiohead music video youtube

racer

2010 Aug 4, 2:26
Video of racer 0.2 a video game made real sort of. Arcade racing cabinet hooked up to an RC car with wireless video camera placed on a cardboard track.
PermalinkCommentshumor awesome 3d game videogame video cardboard irl

Schneier on Security: Alerting Users that Applications are Using Cameras, Microphones, Etc.

2010 May 24, 6:26"What You See is What They Get: Protecting users from unwanted use of microphones, cameras, and other sensors," by Jon Howell and Stuart Schechter.

"We introduce the sensor-access widget, a graphical user interface element that resides within an application's display. The widget provides an animated representation of the personal data being collected by its corresponding sensor, calling attention to the application's attempt to collect the data."

Not sure how well that scales...PermalinkCommentstechnical security privacy research

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

In Which She's Every Woman - Today - This Recording

2009 Aug 21, 3:31"A woman approaches me and tells me that she's with Getty Images. They're shooting stock photos in the park today, would I be willing to pose?" Then finds her photo on tea, camera ads, Quicken's website, etc.PermalinkCommentshumor photo advertising getty via:waxy

The Future of Data Tags: Bokodes | Brain Pickings

2009 Aug 5, 7:57"Ten times smaller than barcodes, Bokodes’ low-cost optical design can be read from as far as 4 meters away, much farther than barcodes, by taking an out-of-focus photo with any off-the-shelf camera." Love for stuff like this to catch on, however compared to QR codes, these are much more difficult to produce than barcodes in that you can't just print them out and they require changes to the photography technique (must be out of focus) rather than just analyzing any photograph of a barcode. They seem to be solving slightly different problems.
PermalinkCommentsqrcode qr barcode camera information design bokode augmented-reality technical

Coding4Fun : Look at me! Windows Image Acquisition

2009 Jun 20, 9:43How to use the WIA APIs in C#. WIA is Windows API to get images from scanners and cameras. And, as I found out, if you want to use the API in PowerShell try '$deviceManager = new-object -ComObject WIA.DeviceManager'PermalinkCommentsvideo scanner api wia csharp howto programming camera image photo .net webcam technical

Free OCR software? You may already have it... - Jon Galloway

2009 Jun 20, 9:39If you have Office installed you may have an OCR library sitting on your hard drive just waiting to be used via C#...PermalinkCommentsocr microsoft office .net automation scanner camera windows technical

IR Ink

2009 May 29, 9:01PermalinkCommentsir ir-paint ink purchase

Infrared Paint Link Roundup

2009 May 29, 2:50

I like the idea of QR codes, encoding URLs and placing them on real world objects, but the QR codes themselves are kind of ugly. To make them less obvious I thought I could spray QR codes on to an object with an infrared reflective paint and shine infrared light on the QR codes, since most cameras, for instance the camera in my G1 phone, pick up infrared that our eyes do not.

In my search for infrared paint I've found a seller of IR ink (via programming forum) and an Infrared Paint Recipe (via IR FAQ).

In looking for this paint I've found that it comes up a lot in relation to the military for things like paint markers that are visible at night with proper equipment, and paint that absorbs IR light to make vehicles less obvious to night vision goggles. Even though the first reflects infrared light and the second absorbs it websites end up refering to both as infrared paint which made it difficult to search.

Additionally I found links to some other geeky infrared projects:

PermalinkCommentsir paint technical ir infrared qr qr code

Night Run II, 1st Half on Flickr - Photo Sharing!

2009 May 6, 12:56Time lapse photography from the perspective of a large ship at night in Texas. "The camera was fastened to an outside rail and set to take a photo every six seconds. Quicktime then assembled the photos into a .mov file that plays back at 12 frames per second. So, one minute of movie time represents 72 minutes of trip time on the channel. The first half begins just below the Port of Houston Authority Turning Basin (the very end of the channel) and continues down to Green's Bayou."PermalinkCommentsflickr video photography travel camera texas ship boat

Awesome Spokesmen Billy Mays and Vince Offer

2009 Apr 8, 4:06PermalinkCommentspersonal2 infomercial stupid vince offer billy mays

meteotek08's photosets on Flickr

2009 Mar 18, 9:35Team of teenagers attach camera to weather balloon and send it to space!PermalinkCommentsphotography photos via:boingboing.comments science space flickr
Older Entries Creative Commons License Some rights reserved.