SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
1
My background:
I worked for several years as a web application developer (server side as well
as UI). I studied the types of security techniques that are important for that
domain. However, once I started working in AIR I learned that there is another
set of potential concerns, and another set of solutions to learn.


In
I particular, I was working on the documentation f the encrypted d t b
       ti l             ki     th d          t ti for th         t d database
functionality that was added in AIR 1.5 and I found myself questioning a lot of
my previous assumptions about how to keep data secure and even what it
means for an application to be “secure.” That led to conversations with
engineers from the AIR and Adobe secure software teams
which led me to
this presentation, as a way to compile the things I had learned and share them
with others.
     others




                                                                                  2
Since I work on the AIR documentation team, I know that my colleagues and I
don’t intentionally “keep secrets.” As much as time permits, we try to put the
best information we can in the documentation.
Because of this, most of what I’m going to tell you is available in the
documentation (or will be the next time we release an update).


In dditi
I addition, one resource that was particularly valuable t me i preparing thi
                         th t        ti l l      l bl to     in      i this
presentation is Ethan Malasky and Peleus Uhley’s MAX 2008 session “




                                                                                 3
4
Flash Player has a different security model, based on the idea of security
sandboxes. (This model is common among web browsers and browser plug-
ins.)


The idea of security sandboxes is that any executable code that comes from a
network source runs within its own security sandbox. The code can’t access
information about the user’s computer It also can’t access code or data from
                      user s computer.        can t
remote sources other than its own sandbox.


(Examples: accessing local files; full-screen mode restrictions (user-triggered
and esc); cross-domain policy)


This is very important. When you click on a link or type in a url you don’t know
what you’re going to come across. It should not be possible for code from a
web site to cause damage to your computer or access private data without
your explicit consent.




                                                                                   5
AIR design philosophy:
AIR apps, on the other hand, are different from web pages in a browser. In order to
run an AIR app, you must explicitly opt in by choosing to install the application.
Consequently, AIR apps are able to perform lots of actions that aren’t available to
Flash Player, browsers, etc. For example, any AIR app can delete every file from your
hard drive (at least, every file that you have access to). (Note that this is no different
than any other executable application that a user can install on his/her computer.)


The AIR runtime isn’t intentionally designed to be “insecure.” However, end-user
security is not generally a reason that particular functionality is excluded from AIR. As
Oliver Goldman, lead engineer for Adobe AIR states on his blog:
“AIR applications are desktop applications and can already do dangerous things. It
doesn't make sense for us to limit new features that aren't any more dangerous. We
do design features to default to safe behaviors but we don't reject features just
                                      behaviors,        don t
because they might be dangerous.”


There are exceptions to the rule that content executing in AIR has full system access.
A general way of describing the exceptions is that when AIR is functioning like a
browser, it behaves like a browser – the content is sandboxed like browser content.
(examples: SWF-in-HTML; remote or non-application content)
           SWF in HTML;           non application
I’ll discuss this in more detail later in the presentation.




                                                                                             6
“Privacy is overrated”
That’s probably overstating things a bit =)
However, it’s definitely true that not every application needs the utmost level of
privacy and security for the content it creates/manipulates/stores.
(examples: Photoshop; MS Word/Excel)


Whenever you’re designing an application, you need to carefully consider the
goals and uses of your application in deciding how much and what kind of data
privacy you need to provide.




                                                                                     7
An important step in deciding what level of privacy your application needs is
figuring out who should, and more importantly who shouldn’t, have access to
the data. The answer to those questions defines what “data privacy and
security” actually means for your application.


One category that I didn’t think much about at first was keeping data private
from the end users themselves After all if they own the app they own the
                    themselves.       all,                app,
data, right? Not always

(example: Video rental app)
This category is where AIR’s security measures are weakest. In all other cases
the end user is motivated to support the goal of keeping data private, or at
least has no interest either way. But in this case, the user has a motivation to
break the
b k th security of th application and may actively use attack t h i
                it f the      li ti      d        ti l        tt k techniques t to
do so.




                                                                                     8
These are the most common ways that attackers try to obtain private data or
cause damage to the user’s system. This list is intentionally broad at this point
– later we’ll talk about more specific ways that these attacks are carried out.




                                                                                    9
An AIR application executes with the access permissions and privileges of the
user who runs the app. If the user has permission to read data from a certain
folder, the AIR app can read data from that folder. Likewise, if an AIR app
writes private data into a location where only the user has access (such as
their “documents” or “application storage” directories) then other users who
don’t have access to those areas won’t be able to access that data.


However, this protection is fairly limited. It protects against other users who
don’t have access to the files, but doesn’t protect against “admin” users and
doesn’t protect against malicious apps that are running with the user’s
permissions.


The f ld
Th folder names f application storage di t i l k random at fi t
                   for    li ti   t      directories look    d     t first
glance. Practically speaking, however, the application storage directory is not
obfuscated in any meaningful way. Other AIR apps, or any other app, could
enumerate folder and file names easily enough.




                                                                                  10
A .air file is just a zip file – you can change the extension to .zip and open it
using any ZIP file extractor.


Once the AIR application is installed, the unzipped source code is placed in
the application directory. For HTML/JS applications, this means the HTML and
JavaScript files. For a Flex- or Flash-based AIR app, this means the SWF file,
which can be easily decompiled
                      decompiled.


Demo decompiling a SWF




                                                                                    11
12
When a user downloads an AIR application from the Internet, the user has to
make a decision as to whether to install the application. This is essentially a
decision of trust – do they trust that the .air file comes from who they think it
comes from, and do they trust that person or company.

To assist the user in making a trust decision, the AIR runtime requires all AIR
apps to be signed with a code-signing certificate. This potentially provides two
forms of reassurance to the useruser.
1. The AIR runtime validates the content of the .air file to ensure that the bits
   haven’t been altered since the application was signed. That way, the user
   can trust that the application hasn’t been modified by some third party.
   However, a malicious entity could just as easily take an app, modify its
   contents, and re-sign it with another certificate. In that case, the app would
   still pass the validation step.
2. The signed app can also be signed with a certificate issued by a
   recognized certificate authority. If the computer recognizes the CA as a
   trusted entity, the computer trusts the certificate that the app was signed
   with and consequently shows the name of the entity that owns the
   certificate in the installer. This guarantees that the specified company in
   fact is the source of the application. However, it doesn’t make any
   judgement about whether that company is in fact trustworthy. For that the
                                                         trustworthy     that,
   user needs to rely on their own knowledge of the company and whether
   they can be trusted.



                                                                                    13
AIR includes an easy and useful update framework, as well as more flexible
approaches. If you add the few lines of code it takes to support updates in your
app, then your users will pull down updates as soon as you make them
available.


If you don’t, then when you discover a bug or security issue, you’ll have to rely
on users manually downloading and installing the update
                                                  update.




                                                                                    14
15
The way Internet addressing works, it’s like a mailman wearing a blindfold who
knocks on each door, hands the person all the mail, asks them to take their
own and hand back the rest (without checking whether they’ve read it before
handing it back).


Luckily the solution is easy – just use SSL or TLS between the client and
server.
server Because AIR uses the computer’s networking stack it supports this
                                computer s            stack,
automatically.




                                                                                 16
One great thing about REST-based web services is that they’re easy to test.
You can just type the URL in a web browser and see the XML (or whatever)
response directly in the browser window.


Unfortunately, this means that anyone who can find out the URL of your web
service (e.g. by decompiling your SWF) can access your server and perform
any operation that your app can. To prevent this require authentication on the
                            can             this,
server, and make sure that the username/password aren’t hard-coded in the
app but instead are input by the user.


Again, AIR uses the OS network stack (including cookie management) to
communicate with servers. Some clever apps incorporate web-based
authentication b di l i th l i web page i an HTML control. Wh th
  th ti ti by displaying the login       b      in              t l When the
user logs in a cookie is set and subsequent requests to the server include the
authentication cookie in their requests.




                                                                                 17
If you’ve read this far, you should probably just come to the session on
Wednesday at 1:00 pm. =)


If you can’t make it to the session (or you’re reading this after the conference),
check my web site for the complete slides, notes, links, etc.:
http://probertson.com/




                                                                                     18

Weitere Àhnliche Inhalte

Andere mochten auch

Hacking with B2G – Web Apps and Customisation
Hacking with B2G – Web Apps and CustomisationHacking with B2G – Web Apps and Customisation
Hacking with B2G – Web Apps and Customisation
Robin Hawkes
 
HTML5 Canvas Hack Night - The Future of Graphics on the Web
HTML5 Canvas Hack Night - The Future of Graphics on the WebHTML5 Canvas Hack Night - The Future of Graphics on the Web
HTML5 Canvas Hack Night - The Future of Graphics on the Web
Robin Hawkes
 

Andere mochten auch (13)

Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
 
Hacking with B2G – Web Apps and Customisation
Hacking with B2G – Web Apps and CustomisationHacking with B2G – Web Apps and Customisation
Hacking with B2G – Web Apps and Customisation
 
Get Moving! (with HTML5 canvas)
Get Moving! (with HTML5 canvas)Get Moving! (with HTML5 canvas)
Get Moving! (with HTML5 canvas)
 
Ignite Denver 3
Ignite Denver 3Ignite Denver 3
Ignite Denver 3
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus
 
Ryan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderersRyan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderers
 
Ignite Denver - Ignite a Cigar
Ignite Denver - Ignite a CigarIgnite Denver - Ignite a Cigar
Ignite Denver - Ignite a Cigar
 
Tom Gonzalez - Adv Data Visualization
Tom Gonzalez - Adv Data VisualizationTom Gonzalez - Adv Data Visualization
Tom Gonzalez - Adv Data Visualization
 
Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4
 
HTML5 Canvas Hack Night - The Future of Graphics on the Web
HTML5 Canvas Hack Night - The Future of Graphics on the WebHTML5 Canvas Hack Night - The Future of Graphics on the Web
HTML5 Canvas Hack Night - The Future of Graphics on the Web
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1
 
Programação de Jogos Digitais - Aula 2
Programação de Jogos Digitais - Aula 2Programação de Jogos Digitais - Aula 2
Programação de Jogos Digitais - Aula 2
 

Mehr von 360|Conferences

Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework
360|Conferences
 

Mehr von 360|Conferences (20)

InsideMobile Keynote
InsideMobile KeynoteInsideMobile Keynote
InsideMobile Keynote
 
Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality
 
Web Os Hands On
Web Os Hands OnWeb Os Hands On
Web Os Hands On
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps
 
Unlocking Android
Unlocking AndroidUnlocking Android
Unlocking Android
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight
 
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 
Ben Elmore - Do You Speak Flex
Ben Elmore - Do You Speak FlexBen Elmore - Do You Speak Flex
Ben Elmore - Do You Speak Flex
 
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
 
Joe Johnston - FLEXperience - putting the Flex in UX
Joe Johnston - FLEXperience - putting the Flex in UXJoe Johnston - FLEXperience - putting the Flex in UX
Joe Johnston - FLEXperience - putting the Flex in UX
 

KĂŒrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

KĂŒrzlich hochgeladen (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Paul Robertson - AIR Data Privacy, Encryption, and Security

  • 1. 1
  • 2. My background: I worked for several years as a web application developer (server side as well as UI). I studied the types of security techniques that are important for that domain. However, once I started working in AIR I learned that there is another set of potential concerns, and another set of solutions to learn. In I particular, I was working on the documentation f the encrypted d t b ti l ki th d t ti for th t d database functionality that was added in AIR 1.5 and I found myself questioning a lot of my previous assumptions about how to keep data secure and even what it means for an application to be “secure.” That led to conversations with engineers from the AIR and Adobe secure software teams
which led me to this presentation, as a way to compile the things I had learned and share them with others. others 2
  • 3. Since I work on the AIR documentation team, I know that my colleagues and I don’t intentionally “keep secrets.” As much as time permits, we try to put the best information we can in the documentation. Because of this, most of what I’m going to tell you is available in the documentation (or will be the next time we release an update). In dditi I addition, one resource that was particularly valuable t me i preparing thi th t ti l l l bl to in i this presentation is Ethan Malasky and Peleus Uhley’s MAX 2008 session “ 3
  • 4. 4
  • 5. Flash Player has a different security model, based on the idea of security sandboxes. (This model is common among web browsers and browser plug- ins.) The idea of security sandboxes is that any executable code that comes from a network source runs within its own security sandbox. The code can’t access information about the user’s computer It also can’t access code or data from user s computer. can t remote sources other than its own sandbox. (Examples: accessing local files; full-screen mode restrictions (user-triggered and esc); cross-domain policy) This is very important. When you click on a link or type in a url you don’t know what you’re going to come across. It should not be possible for code from a web site to cause damage to your computer or access private data without your explicit consent. 5
  • 6. AIR design philosophy: AIR apps, on the other hand, are different from web pages in a browser. In order to run an AIR app, you must explicitly opt in by choosing to install the application. Consequently, AIR apps are able to perform lots of actions that aren’t available to Flash Player, browsers, etc. For example, any AIR app can delete every file from your hard drive (at least, every file that you have access to). (Note that this is no different than any other executable application that a user can install on his/her computer.) The AIR runtime isn’t intentionally designed to be “insecure.” However, end-user security is not generally a reason that particular functionality is excluded from AIR. As Oliver Goldman, lead engineer for Adobe AIR states on his blog: “AIR applications are desktop applications and can already do dangerous things. It doesn't make sense for us to limit new features that aren't any more dangerous. We do design features to default to safe behaviors but we don't reject features just behaviors, don t because they might be dangerous.” There are exceptions to the rule that content executing in AIR has full system access. A general way of describing the exceptions is that when AIR is functioning like a browser, it behaves like a browser – the content is sandboxed like browser content. (examples: SWF-in-HTML; remote or non-application content) SWF in HTML; non application I’ll discuss this in more detail later in the presentation. 6
  • 7. “Privacy is overrated” That’s probably overstating things a bit =) However, it’s definitely true that not every application needs the utmost level of privacy and security for the content it creates/manipulates/stores. (examples: Photoshop; MS Word/Excel) Whenever you’re designing an application, you need to carefully consider the goals and uses of your application in deciding how much and what kind of data privacy you need to provide. 7
  • 8. An important step in deciding what level of privacy your application needs is figuring out who should, and more importantly who shouldn’t, have access to the data. The answer to those questions defines what “data privacy and security” actually means for your application. One category that I didn’t think much about at first was keeping data private from the end users themselves After all if they own the app they own the themselves. all, app, data, right? Not always
 (example: Video rental app) This category is where AIR’s security measures are weakest. In all other cases the end user is motivated to support the goal of keeping data private, or at least has no interest either way. But in this case, the user has a motivation to break the b k th security of th application and may actively use attack t h i it f the li ti d ti l tt k techniques t to do so. 8
  • 9. These are the most common ways that attackers try to obtain private data or cause damage to the user’s system. This list is intentionally broad at this point – later we’ll talk about more specific ways that these attacks are carried out. 9
  • 10. An AIR application executes with the access permissions and privileges of the user who runs the app. If the user has permission to read data from a certain folder, the AIR app can read data from that folder. Likewise, if an AIR app writes private data into a location where only the user has access (such as their “documents” or “application storage” directories) then other users who don’t have access to those areas won’t be able to access that data. However, this protection is fairly limited. It protects against other users who don’t have access to the files, but doesn’t protect against “admin” users and doesn’t protect against malicious apps that are running with the user’s permissions. The f ld Th folder names f application storage di t i l k random at fi t for li ti t directories look d t first glance. Practically speaking, however, the application storage directory is not obfuscated in any meaningful way. Other AIR apps, or any other app, could enumerate folder and file names easily enough. 10
  • 11. A .air file is just a zip file – you can change the extension to .zip and open it using any ZIP file extractor. Once the AIR application is installed, the unzipped source code is placed in the application directory. For HTML/JS applications, this means the HTML and JavaScript files. For a Flex- or Flash-based AIR app, this means the SWF file, which can be easily decompiled decompiled. Demo decompiling a SWF 11
  • 12. 12
  • 13. When a user downloads an AIR application from the Internet, the user has to make a decision as to whether to install the application. This is essentially a decision of trust – do they trust that the .air file comes from who they think it comes from, and do they trust that person or company. To assist the user in making a trust decision, the AIR runtime requires all AIR apps to be signed with a code-signing certificate. This potentially provides two forms of reassurance to the useruser. 1. The AIR runtime validates the content of the .air file to ensure that the bits haven’t been altered since the application was signed. That way, the user can trust that the application hasn’t been modified by some third party. However, a malicious entity could just as easily take an app, modify its contents, and re-sign it with another certificate. In that case, the app would still pass the validation step. 2. The signed app can also be signed with a certificate issued by a recognized certificate authority. If the computer recognizes the CA as a trusted entity, the computer trusts the certificate that the app was signed with and consequently shows the name of the entity that owns the certificate in the installer. This guarantees that the specified company in fact is the source of the application. However, it doesn’t make any judgement about whether that company is in fact trustworthy. For that the trustworthy that, user needs to rely on their own knowledge of the company and whether they can be trusted. 13
  • 14. AIR includes an easy and useful update framework, as well as more flexible approaches. If you add the few lines of code it takes to support updates in your app, then your users will pull down updates as soon as you make them available. If you don’t, then when you discover a bug or security issue, you’ll have to rely on users manually downloading and installing the update update. 14
  • 15. 15
  • 16. The way Internet addressing works, it’s like a mailman wearing a blindfold who knocks on each door, hands the person all the mail, asks them to take their own and hand back the rest (without checking whether they’ve read it before handing it back). Luckily the solution is easy – just use SSL or TLS between the client and server. server Because AIR uses the computer’s networking stack it supports this computer s stack, automatically. 16
  • 17. One great thing about REST-based web services is that they’re easy to test. You can just type the URL in a web browser and see the XML (or whatever) response directly in the browser window. Unfortunately, this means that anyone who can find out the URL of your web service (e.g. by decompiling your SWF) can access your server and perform any operation that your app can. To prevent this require authentication on the can this, server, and make sure that the username/password aren’t hard-coded in the app but instead are input by the user. Again, AIR uses the OS network stack (including cookie management) to communicate with servers. Some clever apps incorporate web-based authentication b di l i th l i web page i an HTML control. Wh th th ti ti by displaying the login b in t l When the user logs in a cookie is set and subsequent requests to the server include the authentication cookie in their requests. 17
  • 18. If you’ve read this far, you should probably just come to the session on Wednesday at 1:00 pm. =) If you can’t make it to the session (or you’re reading this after the conference), check my web site for the complete slides, notes, links, etc.: http://probertson.com/ 18