FINE-GRAINED POLICY 
ENFORCEMENT FOR 
UNTRUSTED SOFTWARE 
Phu H. Phung 
University of Gothenburg, Sweden, and 
University of Illinois at Chicago, USA 
IEEE Senior member
Untrusted software 
• Freeware downloaded over Internet 
• Computer 
• Smartphone 
• Vehicle 
• Third-party JavaScript in the Web 
2 
92% of all websites use JavaScript 
[w3techs.com] 
“88.45% of the Alexa top 10,000 web 
sites included at least one remote 
JavaScript library” CCS’12 
Untrusted software might not run at 
system level but run on a container, 
e.g. web browser, virtual machine
Conventional security mechanisms 
• Firewall 
• Cryptography 
• Access control 
• System calls/ 
privileged mode 
Treat programs as black box, 
cannot address vuneralbilities inside a program
Attack examples on smartphones 
4
5 
A real attack example in vehicle system 
http://www.wired.com/threatlevel/2010/03/hacker-bricks-cars/
Samy attack on Myspace 
• MySpace tries to 
filter out JavaScript 
code in user data 
• BUT: The malicious 
code was injected in a 
“strange” way that 
escapes the filter 
<div id=mycode style="BACKGROUND: url('java 
script:eval(document.all.mycode.expr)')" 
expr="var B=String.fromCharCode(34);………"> 
</div> 
6
Another attack 
• Million Browser Botnet 
(July 2013) 
• Leverage Advertising 
Networks using JavaScript 
to launch Application-Level 
DDoS 
• Paid on 2 ad networks for 
displaying treacherous 
advertisements on pages visited 
by hundreds of thousands of people 
7 
Jeremiah Grossman & Matt Johansen 
WhiteHat SECURITY 
(Malicious code run automatically without user knowledge)
Usability vs. Security 
•Modern software tends to be open and 
extensible 
• Needs for fine-grained security enforcement, 
• i.e. not only allow or disallow an action, but 
enforce application-specific security policies 
• Needs for runtime monitoring 
• Control bad behaviors
Motivations for fined-grained 
policy enforcement at runtime 
• Third-party service needs to 
use sensitive resources, 
e.g. GPS location, 
SMS sending to function 
9 
• Potential security risks: e.g. leaking GPS info, 
send too many SMS messages causing high 
cost 
Need for fined-grained security 
policy enforcement at runtime Policy: allow SMS sending but 
restricted to a specific recipient address, 
limit on the number of messages sent per 
day, 
depending on the vehicle's location
Language-based security 
• Looking inside a program to enforce 
security 
• Before execution 
• analyze the code to ensure it is safe 
• rewrite the code to avoid potential harm 
• During execution 
• monitor security-relevant events and stop the 
event violating security 
• audit the code and take policing action if it did 
harm 
Inlined Reference Monitors
Inlined Reference Monitors 
•A language-based approach, combining of 
• Rewriting 
• Monitoring 
• Auditing
Overview of our contributions 
The Lightweight 
Enforcement 
Approach 
Vehicle 
Application 
Domain 
Web 
application 
security at 
browsers
The lightweight enforcement approach to 
the vehicle domain 
Third-party vehicle 
application 
(in Java source or 
bytecode) 
Security 
policies 
(in 
AspectJ) 
Rewriting 
tool 
(AspectJ 
weaver) 
Embedded security policies 
will prevent bad behaviours 
at runtime 
. . . . 
The modified (secured) 
application 
with embedded policies
The deployment model 
In-vehicle system Control center Third party 
Request a third-party app 
Request the app 
the app 
Install and run the app 
Modify the app to 
embed security policies 
Install and run the app
Overview of our contributions 
The Lightweight 
Enforcement 
Approach 
Vehicle 
Application 
Domain 
Web 
application 
security at 
browsers
The lightweight self-protecting JavaScript 
approach 
• “inline” the policy into the JavaScript code so 
that the code becomes self-protecting 
• The policy enforcement is implemented in a 
lightweight manner 
• does not require browser modification 
• non invasive: the original code (and any 
dynamically generated code) is not syntactically 
modified 
• its implementation is a small and simple adaptation 
of an aspect-oriented programming library
Deployment illustration 
<html> 
<head> 
<script src=“selfprotectingJS.js"></script> 
<title>Self-protecting JavaScript </title> 
<meta content=…> <style>…</style> 
<script>…</script> 
<!-- more heading setting --> 
70 
60 
50 
</head> 
<body> 
<script type="text/javascript"> 
(function() {..})(); 
</script> 
<!-- the content of page --> 
</body> 
40 
30 
20 
10 
</html> 
Policy code 
and 
enforcement 
code defined 
in a text file 
The enforcement code can 
be deployed anywhere: 
server side, proxy or 
browser plug-in, i.e. no 
need for a modified 
browser 
The orgininal 
code is not 
syntactically 
modified 
6.33 
66.03 
0 
Self-Protecting BrowserShield 
Slowdown (times) 
Runtime overhead 
17
Our contributions in web security 
Lightweight Self- 
Protecting JavaScript A Two-tier Sandbox 
Architecture for Untrusted 
JavaScript 
Safe Wrappers and Sane 
Policies for 
Self-Protecting JavaScript 
JSand: complete client-side 
sandboxing of third-party 
JavaScript without browser 
modifications 
SAFESCRIPT: JavaScript 
Transformation for Policy Enforcement
Summary 
• Fine-grained security policy enforcement remains 
a topic of research for all open systems 
• Smartphone 
• Vehicle 
• The Web 
• The proposed lightweight IRM approach has 
benefits in providing a complete and robust tool 
for: 
• Java bytecode for open telematics systems 
• JavaScript running on a web browser.

More Related Content

PPS
Security testing
PDF
Web Application Security 101 - 03 Web Security Toolkit
ODP
Web Application Firewall
PPTX
A new web application vulnerability assessment framework
PPT
Benefits of web application firewalls
PPTX
OTG - Practical Hands on VAPT
PPTX
Security Testing for Web Application
PPTX
Penetration Testing
Security testing
Web Application Security 101 - 03 Web Security Toolkit
Web Application Firewall
A new web application vulnerability assessment framework
Benefits of web application firewalls
OTG - Practical Hands on VAPT
Security Testing for Web Application
Penetration Testing

What's hot (20)

PPT
Networking and penetration testing
PPTX
Security Testing
PPT
Nguyễn Tấn Vi - office of the CISO
PDF
Web Application Penetration Testing
PPTX
Security testing fundamentals
PPT
Security testing
PPTX
Anatomy of an Attack - Sophos Day Belux 2014
PPTX
Security testing
PDF
Introduction to Security Testing
PPTX
Ethical Hacking & Penetration Testing
PPT
Ethical Hacking and Penetration Testing
PPTX
WEB APPLICATION SECURITY
PPTX
Confoo 2012 - Web security keynote
PDF
Security Implications of the Cloud - CSS Dallas Azure
PPTX
Advanced Threat Protection
PPTX
Web Application Vulnerabilities
PPTX
Web application vulnerability assessment
PDF
Stories from the Security Operations Center
PPT
Ch08 Microsoft Operating System Vulnerabilities
Networking and penetration testing
Security Testing
Nguyễn Tấn Vi - office of the CISO
Web Application Penetration Testing
Security testing fundamentals
Security testing
Anatomy of an Attack - Sophos Day Belux 2014
Security testing
Introduction to Security Testing
Ethical Hacking & Penetration Testing
Ethical Hacking and Penetration Testing
WEB APPLICATION SECURITY
Confoo 2012 - Web security keynote
Security Implications of the Cloud - CSS Dallas Azure
Advanced Threat Protection
Web Application Vulnerabilities
Web application vulnerability assessment
Stories from the Security Operations Center
Ch08 Microsoft Operating System Vulnerabilities
Ad

Viewers also liked (7)

PPTX
A Two-Tier Sandbox Architecture for Untrusted JavaScript
PPTX
Governing Bot-as-a-Service in Sustainability Platforms - Issues and Approaches
PPTX
Self-Protecting JavaScript: A Lightweight Approach to Enforcing Security Poli...
PPTX
Lightweight Self-Protecting JavaScript
PPTX
Web security: Securing Untrusted Web Content in Browsers
PPTX
Web security: Securing untrusted web content at browsers
PPT
Security Policy Enforcement for the OSGi Framework using Aspect-Oriented Pr...
A Two-Tier Sandbox Architecture for Untrusted JavaScript
Governing Bot-as-a-Service in Sustainability Platforms - Issues and Approaches
Self-Protecting JavaScript: A Lightweight Approach to Enforcing Security Poli...
Lightweight Self-Protecting JavaScript
Web security: Securing Untrusted Web Content in Browsers
Web security: Securing untrusted web content at browsers
Security Policy Enforcement for the OSGi Framework using Aspect-Oriented Pr...
Ad

Similar to Fine-grained policy enforcement for untrusted software (20)

PDF
Application Security Testing for Software Engineers: An approach to build sof...
PPT
CyberCrime in the Cloud and How to defend Yourself
PPTX
Web Application Hacking tools .pptx
PPT
How PCI And PA DSS will change enterprise applications
PDF
Web Application Penetration Testing Course in 2025.pdf
PDF
Datasheet app vulnerability_assess
PDF
Solvay secure application layer v2015 seba
PPTX
Secure Code review - Veracode SaaS Platform - Saudi Green Method
PPT
Web Application Security
PDF
Best Practices for Developing Secure Web Applications
PDF
19BCP072_Presentation_Final.pdf
PPT
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
PDF
Essential Security Practices for Modern Web Developers.pdf
PDF
Jonathan Singer - Wheezing The Juice.pdf
PDF
F5 Web Application Security
PDF
Protect Your IT Infrastructure from Zero-Day Attacks and New Vulnerabilities
PDF
Developing Web Applications Securely - How to Fix Common Code Vulnerabilities...
PDF
Cyber Security and Data Privacy - presentation
PPT
Security Design Principles.ppt
PDF
C01461422
Application Security Testing for Software Engineers: An approach to build sof...
CyberCrime in the Cloud and How to defend Yourself
Web Application Hacking tools .pptx
How PCI And PA DSS will change enterprise applications
Web Application Penetration Testing Course in 2025.pdf
Datasheet app vulnerability_assess
Solvay secure application layer v2015 seba
Secure Code review - Veracode SaaS Platform - Saudi Green Method
Web Application Security
Best Practices for Developing Secure Web Applications
19BCP072_Presentation_Final.pdf
Avoiding Application Attacks: A Guide to Preventing the OWASP Top 10 from Hap...
Essential Security Practices for Modern Web Developers.pdf
Jonathan Singer - Wheezing The Juice.pdf
F5 Web Application Security
Protect Your IT Infrastructure from Zero-Day Attacks and New Vulnerabilities
Developing Web Applications Securely - How to Fix Common Code Vulnerabilities...
Cyber Security and Data Privacy - presentation
Security Design Principles.ppt
C01461422

Recently uploaded (20)

PPT
LEC Synthetic Biology and its application.ppt
PPT
Computional quantum chemistry study .ppt
PPT
Presentation of a Romanian Institutee 2.
PPTX
gene cloning powerpoint for general biology 2
PPTX
INTRODUCTION TO PAEDIATRICS AND PAEDIATRIC HISTORY TAKING-1.pptx
PDF
Communicating Health Policies to Diverse Populations (www.kiu.ac.ug)
PDF
Warm, water-depleted rocky exoplanets with surfaceionic liquids: A proposed c...
PDF
CHAPTER 2 The Chemical Basis of Life Lecture Outline.pdf
PPTX
POULTRY PRODUCTION AND MANAGEMENTNNN.pptx
PPTX
SCIENCE 4 Q2W5 PPT.pptx Lesson About Plnts and animals and their habitat
PPT
Biochemestry- PPT ON Protein,Nitrogenous constituents of Urine, Blood, their ...
PDF
Unit 5 Preparations, Reactions, Properties and Isomersim of Organic Compounds...
PPTX
Probability.pptx pearl lecture first year
PPTX
Microbes in human welfare class 12 .pptx
PPT
THE CELL THEORY AND ITS FUNDAMENTALS AND USE
PDF
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
PDF
Worlds Next Door: A Candidate Giant Planet Imaged in the Habitable Zone of ↵ ...
PDF
Science Form five needed shit SCIENEce so
PDF
GROUP 2 ORIGINAL PPT. pdf Hhfiwhwifhww0ojuwoadwsfjofjwsofjw
PPTX
ap-psych-ch-1-introduction-to-psychology-presentation.pptx
LEC Synthetic Biology and its application.ppt
Computional quantum chemistry study .ppt
Presentation of a Romanian Institutee 2.
gene cloning powerpoint for general biology 2
INTRODUCTION TO PAEDIATRICS AND PAEDIATRIC HISTORY TAKING-1.pptx
Communicating Health Policies to Diverse Populations (www.kiu.ac.ug)
Warm, water-depleted rocky exoplanets with surfaceionic liquids: A proposed c...
CHAPTER 2 The Chemical Basis of Life Lecture Outline.pdf
POULTRY PRODUCTION AND MANAGEMENTNNN.pptx
SCIENCE 4 Q2W5 PPT.pptx Lesson About Plnts and animals and their habitat
Biochemestry- PPT ON Protein,Nitrogenous constituents of Urine, Blood, their ...
Unit 5 Preparations, Reactions, Properties and Isomersim of Organic Compounds...
Probability.pptx pearl lecture first year
Microbes in human welfare class 12 .pptx
THE CELL THEORY AND ITS FUNDAMENTALS AND USE
Cosmic Outliers: Low-spin Halos Explain the Abundance, Compactness, and Redsh...
Worlds Next Door: A Candidate Giant Planet Imaged in the Habitable Zone of ↵ ...
Science Form five needed shit SCIENEce so
GROUP 2 ORIGINAL PPT. pdf Hhfiwhwifhww0ojuwoadwsfjofjwsofjw
ap-psych-ch-1-introduction-to-psychology-presentation.pptx

Fine-grained policy enforcement for untrusted software

  • 1. FINE-GRAINED POLICY ENFORCEMENT FOR UNTRUSTED SOFTWARE Phu H. Phung University of Gothenburg, Sweden, and University of Illinois at Chicago, USA IEEE Senior member
  • 2. Untrusted software • Freeware downloaded over Internet • Computer • Smartphone • Vehicle • Third-party JavaScript in the Web 2 92% of all websites use JavaScript [w3techs.com] “88.45% of the Alexa top 10,000 web sites included at least one remote JavaScript library” CCS’12 Untrusted software might not run at system level but run on a container, e.g. web browser, virtual machine
  • 3. Conventional security mechanisms • Firewall • Cryptography • Access control • System calls/ privileged mode Treat programs as black box, cannot address vuneralbilities inside a program
  • 4. Attack examples on smartphones 4
  • 5. 5 A real attack example in vehicle system http://www.wired.com/threatlevel/2010/03/hacker-bricks-cars/
  • 6. Samy attack on Myspace • MySpace tries to filter out JavaScript code in user data • BUT: The malicious code was injected in a “strange” way that escapes the filter <div id=mycode style="BACKGROUND: url('java script:eval(document.all.mycode.expr)')" expr="var B=String.fromCharCode(34);………"> </div> 6
  • 7. Another attack • Million Browser Botnet (July 2013) • Leverage Advertising Networks using JavaScript to launch Application-Level DDoS • Paid on 2 ad networks for displaying treacherous advertisements on pages visited by hundreds of thousands of people 7 Jeremiah Grossman & Matt Johansen WhiteHat SECURITY (Malicious code run automatically without user knowledge)
  • 8. Usability vs. Security •Modern software tends to be open and extensible • Needs for fine-grained security enforcement, • i.e. not only allow or disallow an action, but enforce application-specific security policies • Needs for runtime monitoring • Control bad behaviors
  • 9. Motivations for fined-grained policy enforcement at runtime • Third-party service needs to use sensitive resources, e.g. GPS location, SMS sending to function 9 • Potential security risks: e.g. leaking GPS info, send too many SMS messages causing high cost Need for fined-grained security policy enforcement at runtime Policy: allow SMS sending but restricted to a specific recipient address, limit on the number of messages sent per day, depending on the vehicle's location
  • 10. Language-based security • Looking inside a program to enforce security • Before execution • analyze the code to ensure it is safe • rewrite the code to avoid potential harm • During execution • monitor security-relevant events and stop the event violating security • audit the code and take policing action if it did harm Inlined Reference Monitors
  • 11. Inlined Reference Monitors •A language-based approach, combining of • Rewriting • Monitoring • Auditing
  • 12. Overview of our contributions The Lightweight Enforcement Approach Vehicle Application Domain Web application security at browsers
  • 13. The lightweight enforcement approach to the vehicle domain Third-party vehicle application (in Java source or bytecode) Security policies (in AspectJ) Rewriting tool (AspectJ weaver) Embedded security policies will prevent bad behaviours at runtime . . . . The modified (secured) application with embedded policies
  • 14. The deployment model In-vehicle system Control center Third party Request a third-party app Request the app the app Install and run the app Modify the app to embed security policies Install and run the app
  • 15. Overview of our contributions The Lightweight Enforcement Approach Vehicle Application Domain Web application security at browsers
  • 16. The lightweight self-protecting JavaScript approach • “inline” the policy into the JavaScript code so that the code becomes self-protecting • The policy enforcement is implemented in a lightweight manner • does not require browser modification • non invasive: the original code (and any dynamically generated code) is not syntactically modified • its implementation is a small and simple adaptation of an aspect-oriented programming library
  • 17. Deployment illustration <html> <head> <script src=“selfprotectingJS.js"></script> <title>Self-protecting JavaScript </title> <meta content=…> <style>…</style> <script>…</script> <!-- more heading setting --> 70 60 50 </head> <body> <script type="text/javascript"> (function() {..})(); </script> <!-- the content of page --> </body> 40 30 20 10 </html> Policy code and enforcement code defined in a text file The enforcement code can be deployed anywhere: server side, proxy or browser plug-in, i.e. no need for a modified browser The orgininal code is not syntactically modified 6.33 66.03 0 Self-Protecting BrowserShield Slowdown (times) Runtime overhead 17
  • 18. Our contributions in web security Lightweight Self- Protecting JavaScript A Two-tier Sandbox Architecture for Untrusted JavaScript Safe Wrappers and Sane Policies for Self-Protecting JavaScript JSand: complete client-side sandboxing of third-party JavaScript without browser modifications SAFESCRIPT: JavaScript Transformation for Policy Enforcement
  • 19. Summary • Fine-grained security policy enforcement remains a topic of research for all open systems • Smartphone • Vehicle • The Web • The proposed lightweight IRM approach has benefits in providing a complete and robust tool for: • Java bytecode for open telematics systems • JavaScript running on a web browser.