Security Issues in Web Applications - PowerPoint PPT Presentation

About This Presentation
Title:

Security Issues in Web Applications

Description:

CS 6431 Security Issues in Web Applications Vitaly Shmatikov – PowerPoint PPT presentation

Number of Views:166
Avg rating:3.0/5.0
Slides: 44
Provided by: Vital75
Category:

less

Transcript and Presenter's Notes

Title: Security Issues in Web Applications


1
Security Issuesin Web Applications
CS 6431
  • Vitaly Shmatikov

2
User Input Validation
Bisht et al. NoTamper Automatic Blackbox
Detection of Parameter Tampering Opportunities in
Web Applications. CCS 2010
  • Web applications need to reject invalid inputs
  • Credit card number should be 15 or 16 digits
  • Expiration date in the past is not valid
  • Traditionally done at the server
  • Round-trip communication, increased load
  • Better idea (?) do it in the browser using
  • client-side JavaScript code

3
Client-Side Validation
Bisht et al.
onSubmit validateCard()
validateQuantities()
Validation Ok?
Yes
No
reject inputs
send inputs to server
4
Problem Client Is Untrusted
Bisht et al.
Previously rejected values sent to server
Inputs must be re-validated at server!
5
Online Shopping
Bisht et al.
Client-side constraints quantity1 0
quantity2 0 Server-side code total
quantity1 price1
quantity2 price2
CodeMicro.com
Vulnerability malicious client submits negative
quantities for unlimited shopping
rebates
Two items in cart price1 100, price2
500 quantity1 -4, quantity2 1, total 100
(rebate of 400 on price2)
6
Online Banking
Bisht et al.
Client-side constraints from IN (Accnt1,
Accnt2) to IN (Accnt1, Accnt2) Server-side
code transfer money from ? to
SelfReliance.com
Vulnerability malicious client submits arbitrary
account numbers for unauthorized money
transfers
7
IT Support
Bisht et al.
Client-side constraints userId
96 (hidden field) Server-side code Update
profile with id 96 with new details
Hidden Field
Vulnerability update arbitrary account
Inject a cross-site scripting (XSS) payload in
admin account, cookies stolen every time admin
logged in
8
Content Management
Bisht et al.
Server-side code privilege non-admin
if ( _COOKIEmake_install_prn 1
) privilege admin
Vulnerability malicious client sets
make_install_prn cookie,
creates fake admin account
9
Cashier-as-a-Service
Wang et al.  How to Shop for Free Online
Security Analysis of Cashier-as-a-Service Based
Web Stores. Oakland 2011
Web store
communication about the order
Shopper
Joint decision is an order appropriately paid?
communication about the payment
PayPal, Amazon Payments, Google Checkout, etc.
10
nopCommerce Amazon Simple Pay
Wang et al.
  • Anyone can register an Amazon seller account, so
    can Chuck
  • Purchase a 25 MasterCard gift card by cash,
    register under a fake address and phone number
  • Create seller accounts in PayPal, Amazon and
    Google using the card

Great, I will ship order123!
Jeff, I want to buy this DVD.
Jeff
Hi, 10 has been paid for order123. Amazons
signature
  • Chucks trick
  • Check out from Jeff, but pay to Mark (Chuck
    himself)
  • Amazon tells Jeff that payment has been
    successful
  • Jeff is confused, ships product

Shopper Chuck
(and seller Mark)
Amazon (CaaS)
11
Interspire PayPal Express
Wang et al.
Session 1 pay for a cheap order (orderID1), but
prevent the merchant from finalizing it by
holding Message B
store
Message A
Message B
Message A redirects to store.com/finalizeOrder?or
derID1store
orderID2store
Message B calls store.com/finalizeOrder?orderID1
store
Expensive order is checked out but the cheap one
is paid!
12
Side-Channel Leaks
Chen et al.  Side-Channel Leaks in Web
Applications a Reality Today, a Challenge
Tomorrow. Oakland 2010
encrypted! privacy problems solved?
Attacker can still see the number of
packets, size of each packet, time between
packets
13
Chen et al.
  • Search using encrypted Wi-Fi (WPA / WPA2)
  • Example user types l-i-s-t on his laptop

different size of suggestion list
Each additional letter of query
Attackers effort linear in the size of query
Consequence any eavesdropper knows our search
queries
14
Online Medical Application
Chen et al.
  • Entering health records
  • By typing auto-suggestion
  • By mouse a tree structure of elements
  • Finding a doctor
  • Dropdown list

2000x reduction in ambiguity
Uniquely identify the specialty
15
Tax Preparation Application
Chen et al.
  • Wizard-style questionnaire
  • Tailor the questions based on previous inputs
  • Which forms you work on reveal filing status, big
    medical bills, adjusted gross income
  • Knowing the state machine of the application the
    eavesdropper can infer sensitive information
  • Especially by combining information learned from
    multiple state machines

16
Child Credit State Machine
Chen et al.
Entry page of deductions credits
All transitions have unique traffic patterns
Summary of deductions credits
Not eligible
Full credit
Partial credit
Consult the IRS instruction 1000 for each
child Phase-out starting from 110,000. For
every 1000 income, lose 50 credit.
17
Student Loan Interest State Machine
Chen et al.
Even worse, most decision procedures for
credits/deductions have asymmetric paths
eligible more questions, not eligible no more
questions
Entry page of deductions credits
Summary of deductions credits
Not eligible
Enter your paid interest
Full credit
Partial credit
18
Some Identifiable AGI Thresholds
Chen et al.
19
Online Investments

Chen et al.
  • Which funds you invest in?
  • Each price history curve is a GIF image from
    MarketWatch
  • Anyone in the world can get them from this
    website
  • Just compare the image sizes!
  • Your investment allocation?
  • Can see the size of the pie chart, but hundreds
    of pie charts have the same image

20
Change Over Time Is Revealing!

Chen et al.
Financial institution updates your pie chart
every day after market close. Mutual fund prices
are public knowledge.
? 80000 charts
Size of day 1
Size of day 4 Prices of the day
Size of day 3 Prices of the day
Size of day 2 Prices of the day
? 800 charts
? 80 charts
? 8 charts
1 chart
21
Rounding? Padding?
Chen et al.
  • Still have the asymmetric path problem
  • Googles responses are compressed, destination
    networks may or may not uncompress responses
  • For example, Microsoft gateways uncompress and
    inspect Web traffic, but university does not
  • Round before compression university still sees
    distinguishable sizes after compression
    Microsoft does
  • Random padding is not appropriate
  • If user checks several times, repeated random
    padding of the same responses quickly degrades
    effectiveness
  • Images come from MarketWatch, not site itself

22
Trends in Software Design
Jana and Shmatikov. Memento Learning Secrets
from Process Footprints. Oakland 2012
  • Applications rely on OS abstractions to improve
    their safety and reliability
  • Process, User
  • Case study Web browsers

Fork a new process
Fork a new process
xbank.com
quickdate.com
OS isolation
23
Unintended Consequences
  • Good
  • Better isolation
  • Better reliability
  • Others not affected if one process crashes
  • Better safety

Bad Leaks more info to concurrent
processes
24
ProcFS in Multi-User OS
cat /proc/1/ status
ps top p 1
Tom Killian "Processes as Files (1984)
Introduced in the 1980s
25
Noone Uses Multi-User OS Anymore
26
Multi-User Isolation
cat /proc/1/ status
ps top p 1
UNIX multi-users in the 1980s
27
Android Sandboxing
cat /proc/1/ status
ps top p 1
Android multi-users today
28
Android Apps as Users
  • Different apps run as different users

Android uses OS user abstraction to isolate
applications
29
ProcFS Did Not Go Away
ProcFS API is still unchanged!
cat /proc/1/ status
ps top p 1
Android multi-users today
30
This Is Not Just About Android
31
What Can Be Learned from ProcFS?
  • No permissions needed to read any world-readable
    file in ProcFS
  • IP addresses of network connections
  • Value of stack pointer
  • Various statistics
  • Packet counters
  • Number of context switches / CPU scheduling
    statistics
  • Memory usage

WTF?!
Peeping Tom attacks
TCP sequence number inference
Keystroke sniffing
Memento attacks
32
Putting Memory Streams Together
33
Memprint Stream of Memory Usage
10568 KB
49380 KB
15976 KB
11632 KB
65948 KB
48996 KB
60280 KB
60820 KB
59548 KB
34
Sniffing Memory Footprints
browser process
alloc 1
alloc 2
Parsing JavaScript Rendering images
OS free page pool
OS isolation
2050
used page count
memprint
zero-permission malicious process
2050
35
Sniffing Memory Footprints
browser process
alloc 1
alloc 2
Parsing JavaScript Rendering images
brk/mmap
OS free page pool
OS isolation
2056
used page count
memprint
zero-permission malicious process
2050
2056
36
Sniffing Memory Footprints
browser process
alloc 1
alloc 2
Parsing JavaScript Rendering images
brk/mmap
OS free page pool
OS isolation
2080
used page count
memprint
zero-permission malicious process
2050
2056
2080
37
Loading BeNaughty.com in Chrome
38
Loading BeNaughty.com in Chrome
39
Loading BeNaughty.com in Chrome
40
Full Attack
zero-permission app
browser
memprint
memprint database
/proc/pid/statm
OS isolation
41
Why the Attack Works
  • Memprints are unique - for up to 43 of Alexa top
    100,000 pages
  • Can tune recognition to achieve zero false
    positives
  • Memprints are stable across repeated visits to
    the same page

memprints are OS/browser-dependent but
machine-independent
42
Cross-Page Similarity
web page ID
similarity Jaccard index of memprints
Different from others
Similar to themselves
web page ID
43
Other Privacy Leaks
  • Fine-grained memory dynamics reveal membership in
    dating sites, interest in medical conditions,
    etc.
  • Dynamics of CPU scheduling reveal individual
    keystrokes
  • General problem fine-grained resource usage
    statistics are correlated with secrets
  • These statistics are visible across isolation
    boundary
  • Their dynamics are a high-bandwidth side channel
Write a Comment
User Comments (0)
About PowerShow.com