project 2 section - crypto.stanford.edu · • download vm • virtualbox: in...

20
CS 155

Upload: others

Post on 31-Aug-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start

CS 155

Page 2: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start

• Project 2:• Setup• Ruby on Rails primer• Tips for part A

Page 3: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start

• Bitbar

• Ruby on Rails App

• New users get 200 bitbars

• Can transfer bitbarsto other users

Page 4: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start

Part A: Attacks

Due May 11

Part B: Defenses

Due May 18

Page 5: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start

• Download VM

• VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist

• Start the VM. • proj2 directory has starter code

Page 6: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 7: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start

Route Map To Controller:bitbar/config/routes.rb

User Controller:bitbar/app/controllers/user_controller.rb

User Profile View:bitbar/app/views/user/profile.html.erb

Page 8: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 9: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 10: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 11: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 12: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 13: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start

http://blog.bigbinary.com/2013/03/19/cookies-on-rails.html

Page 14: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start

”Transfer 10 bitbars to attacker”

Victim’s bitbar cookies sent as auth!Victim logs in to Bitbar

Victim visits attacker website

Page 15: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 16: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 17: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start

Attacker’s Profile

User1’s Profile User 2’s Profile

User Bitbars

Attacker 10

User1 50

User2 100

User Bitbars

Attacker 11

User1 49

User2 100

User Bitbars

Attacker 12

User1 49

User2 99

Views

Views

Page 18: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 19: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start
Page 20: Project 2 Section - crypto.stanford.edu · • Download VM • VirtualBox: In Preferences->Network->Host-only Networks, add a new network (vboxnet0) if it doesn’t exist • Start