HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

65
Killing a bounty program By : Itzhak (Zuk) Avraham; Nir Goldshlager; Hackito Ergo Sum

description

Hackito Ergo Sum 2012

Transcript of HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Page 1: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Killing  a  bounty  program  

By  :  Itzhak  (Zuk)  Avraham;  Nir  Goldshlager;  

Hackito  Ergo  Sum  

Page 2: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

#  whoami  |  presentation  

Itzhak  Avraham  (Zuk)  Founder  &  CEO          Twitter:  @ihackbanme  Blog  :  http://imthezuk.blogspot.com    zuks(+@@zimperium(+.(+com      #  root  

Page 3: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

#  whoami  |  presentation  

Nir  Goldshlager  Senior  Web  Applications  Researcher            Twitter:  @nirgoldshlager    Blog  :  http://nirgoldshlager.com    

#  root  

Page 4: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager
Page 5: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Reasons  for  bug  bounty  

ü  Money  

ü  Fame  

Page 6: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Reasons  for  bug  bounty  

ü  Money  

ü  Fame  

ü  Okay,  mostly  fame,  they  don’t  pay  much  :P  

Page 7: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Bug  bounty  programs  

ü  1995  –  Netscape  

ü  2004  –  Firefox  ü  2005  –  ZDI  ü  2007  –  Pwn2own  

ü  2010  –  Google  ü  2011  –  Facebook  

Page 8: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Know  your  enemy  

Page 9: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Know  your  enemy  

•  Nope.  Your  enemies  might  be  :  •  Masato  Kinugawa  •  Neal  Poole  •  Nils  Juenemann  •  Szymon  Gruszecki  •  Wladimir  Palant  •  …  

Page 10: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Know  your  enemy  

•  Nope.  Your  enemies  might  be  :  •  Masato  Kinugawa  •  Neal  Poole  •  Nils  Juenemann  •  Szymon  Gruszecki  •  Wladimir  Palant  •  …  •  ...  •  ???  

•  TIME!  

Page 11: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Learn  your  target  Overview  

•  Spy  on  their  blogs  •  New  bugs  –  new  ideas  to  detect  different  vulnerabilities.  

•  Learn  the  company  •  Unchecked  services  •  Successful  acquisitions  •  Untested/Less  secured  web  applications  

•  Multi  vector  •  Unknown  vectors  /  logical  techniques  

•  Repetitive  of  weak  spots  

Page 12: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Overview  

•  Learn  the  company  •  Successful  acquisitions  

http://en.wikipedia.org/wiki/List_of_acquisitions_by_Google    •  New  services  –  Knol(???),    Friends  Connect  •  Subdomains    •  Learn  all  the  functions  of  the  application  you  are  going  to  test  

•  Multi  vector  •  Unknown  vectors  /  logical  techniques  

•  Repetitive  of  weak  spots  

Page 13: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Overview  

•  Successful  acquisitions  http://en.wikipedia.org/wiki/List_of_acquisitions_by_Google  

•  More  than  1  acquisition  per  week  since  2010!    

Page 14: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Overview  

•  Approach  •  Logical  /  mixed  issues  

Page 15: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

XSS  for  fun  and  …  profit?  

•  XSS  is  not  just  for  account  hijacking  •  Trusted  website,  runs  malicious  javascript…  •  Client  Side  Exploit  anyone?  

Page 16: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Overview  

•  Convention  •  Calender  •  Google.com/calender  

•  Friends  Connect  •  google.com/friendconnect  

•  Knol  •  Google.com/knol  

•  Analytics  •  Google.com/analytics  

•  Blogger  •  Google.com/blogger  

Page 17: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Support  Overview  

•  Convention  •  Knol  •  Google.com/knol  •  No  

•  Friends  Connect  •  Support.google.com/friendconnect  

•  Calendar  •  Support.google.com/calendar  

•  Analytics  •  Support.google.com/analytics  

•  Blogger  •  Support.google.com/blogger  

•  Admob  •  Support.google.com/admob  

Page 18: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calender  Stored  XSS  

Page 19: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Stored  XSS  (Error  based)  •  Calendar  name  field  is  vulnerable  

Page 20: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  On  delete  of  the  calendar,  XSS  popped  out.  •  We  need  to  find  a  way  to  trigger  it  for  REMOTE  

users.    

Page 21: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  How  can  one  see  our  calendar  name?  

Page 22: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  Let’s  share  our  malicious  calendar  with  the  target  (!!)  

•  Approve  is  not  needed  for  sharing  calendars  •  Ohh  hello.  

Page 23: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  Let’s  share  our  malicious  calendar  with  the  target  (!!)  

•  Approve  is  not  needed  for  sharing  calendars  

Page 24: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  user  must  delete  his  calendar.  

Page 25: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  user  must  delete  his  calendar.  

•  Let’s  FORCE  our  target  to  DELETE!  

Page 26: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  Calendar  SPAM  !!!  

Page 27: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  Let’s  share  again  

Page 28: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  And  again  

Page 29: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  And  again  …  

Page 30: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  No  sharing  limit  

•  User  gets  email  for  each  share  

Page 31: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  User  gets  email  for  each  share  

Page 32: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  After  Calendar  delete  :      •  Achievement  Unlocked.  

Page 33: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Calendar  Error  based  •  After  Calendar  delete  :      •  Achievement  Unlocked.  

Page 34: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  FeedBurner  Stored  XSS  

Page 35: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Feedburner  Unsubscribe  XSS   §  1.Victim  perform    subscribe  to  malicious  feedburner  

ú  Well  it  doesn’t  have  to  be  malicious     Feed  title  is  vulnerable  

Page 36: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Feedburner  Unsubscribe  XSS   §  Feed  title  is  vulnerable  

Page 37: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Feedburner  Unsubscribe  XSS   §  When  the  victim  will  decide  to  unsubscribe  the  

malicious  feedburner  a  stored  xss  will  be  run  on  his  client.  

Page 38: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Feedburner  Unsubscribe  XSS   §  2  Methods  to  exploit  this  scenario:  

1.  Send  a  malicious  unsubscribe  link  (no  permission  needed)  

Page 39: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Feedburner  Unsubscribe  XSS   §  2  Methods  to  exploit  this  scenario:  

1.  Send  a  malicious  unsubscribe  link  (no  permission  needed)  

2.  Victim  subscribe,  unsubscribe  the  malicious  feedburner.

Page 40: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Feedburner  Unsubscribe  XSS   §  User  unsubscribe  –  achievement  unlocked

Page 41: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  FriendConnect  Error  based  

•  Meet  your  new  best  friend  :  

Page 42: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  FriendConnect  Error  based  

•  The  target  approved  our  request.    

Page 43: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  FriendConnect  Error  based  

•  The  target  approved  our  request.    •  Now,  let’s  force  him  to  delete  us,  not  before  we’re  

going  to  change  our  name  to  :  •  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

AAAAAAAAAAAAAAAAA  ….  “><XSS  Payload>  

Page 44: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  FriendConnect  Error  based  

Page 45: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  FriendConnect  Error  based  •  After  User  delete  :      •  Achievement  Unlocked.  

Page 46: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  –  Stored  XSS  

Page 47: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  

•  In-­‐page  analytics  doesn’t  escape  incoming  requests:  •  Meaning,  an  attacker  can  send  XSS  to  the  administrator  

by  sending  a  URL  

Page 48: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  

•  In-­‐page  analytics  doesn’t  escape  incoming  requests:  •  Meaning,  an  attacker  can  send  XSS  to  the  administrator  

by  sending  a  URL  

Page 49: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  

Page 50: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  

•  Let’s  exploit  this  vulnerability  in  2  creative  ways:  •  In-­‐Page  Analytics  –  When  the  administrator  logins  boom.  •  Sharing  –  Infect  ourselves  and  do  share  our  Analytics  with  

the  victim  (the  link  would  be  directly  to  in-­‐page  analytics)  

Page 51: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  

•  Let’s  wait  for  our  administrator  to  login  •  Achievement  unlocked,  we  can  run  JS  on  any  web  

administrator  using  Analytics  

Page 52: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  

Page 53: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  

•  Second  method  :  Sharing  with  the  victim  our  analytics  

•  We  will  add  the  victim  with  read-­‐only  permission  and  will  submit  the  link  for  google.com/analytics  account  with  our  ID  

Page 54: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  

Page 55: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Google  Analytics  

§  Achievement  unlocked  

Page 56: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Permission  bypass  –  Google  Knol  

Page 57: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Permission  bypass  

Unpublished  document  

Page 58: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Permission  bypass  

•  This  document  isn’t  accessible  via  URL  

Page 59: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Permission  bypass  

•  We  don’t  have  permission  to  view  the  document  

•  Knol  Translate  does,  let’s  use  the  service  to  show  us  what  we  want  and  cannot  access  

Page 60: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Permission  bypass  

Page 61: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Permission  bypass  

•  Private  document  accessed  using  translate  service.  

•  Achievement  unlocked  

Page 62: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Permission  bypass  

•  Blogger  

Page 63: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Summary  

§  Think  different  §  Information  gathering  §  Mixed  services  §  Permissions  

Page 64: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Reference  

●  http://www.nirgoldshlager.com/2011/03/blogger-­‐get-­‐administrator-­‐privilege-­‐on.html  -­‐  Blogger  admin  privileges  bypass    

●  http://www.google.com/about/company/rewardprogram.html  -­‐  Google  Reward  program  

●  http://www.google.com/about/company/halloffame.html  -­‐  Google  Hall  of  Fame  

●  http://www.slideshare.net/michael_coates/bug-­‐bounty-­‐programs-­‐for-­‐the-­‐web  -­‐  Michael  Coates  -­‐  Bug  Bounty  Program  –  OWASP  2011  

Page 65: HES 2012- Killing a Bug Bounty Program by Itzhak Zuk Avraham&Nir Goldshlager

Thank  you!            Itzhak  “Zuk”  Avraham  -­‐  @ihackbanme  Nir  Goldshlager  -­‐  @nirgoldshlager