Upgrade to Pro — share decks privately, control downloads, hide ads and more …

OWASP Broken Web Application Project #appsecapac2014

OWASP Japan
March 19, 2014
230

OWASP Broken Web Application Project #appsecapac2014

OWASP Japan

March 19, 2014
Tweet

Transcript

  1. About  Me   •  Mordecai  (Mo)  Kraushar   •  Director

     of  Audit,  CipherTechs   •  OWASP  Project  Lead,  Vicnum   •  OWASP  New  York  City  chapter  member  
  2. Assessing  the  assessor   Network  Assessment   –  Known  methodologies

      •  Reconnaissance   •  Discover   •  Fingerprint   •  Enumerate   •  Exploit   –  Known  tools   •  Nmap   •  Vulnerability  Manager   •  Metasploit   –  Known  Goal   •  Shell   –  Predictable  Results   Web  Applica4on  Assessment   –  Methodology  is  uncertain*     –  Assorted  approaches     –  Assorted  tools  exist  to  target   the  technical  side  of  a  web   app*   –  Assorted  Goals   –  Unpredictable  Results*   *  GeSng  beTer  but  s3ll  not  as  good  as   network  assessments  
  3. Why  the  Difference?   Network  Assessment   –  Mature  and

     stable  TCP/IP   protocols   –  Well  defended  by  network   firewalls  (usually)   Web  Applica4on  Assessment   –  New  technologies  are   constantly  emerging   •  Web  Services   •  Mobile  plaZorms   •  Different  databases   –  New  CMS  and  Web   frameworks     •  Ruby  on  Rails   •  Django  (Python  based)   •  Node.js   –  Business  logic   –  Human  element  
  4. Vulnerable  Web  Applica3ons   •  Many  uninten3onal  broken  web  applica3ons

     ☺     •  Inten3onally  broken  web  applica3ons  exist  as  well   –  Different  frameworks,  languages,  databases   –  Some  available  live,  others  to  be  downloaded  and  installed   •  Several  vendor  provided  apps  exist   –  Test  their  product     •  Training  apps  such  as  the  OWASP  WebGoat  project   –  WebGoat  originally  wriTen  in  J2EE  now  available  on  other     plaZorms   –  An  interac3ve  teaching  environment  for  web  applica3on   security  
  5. Broken  Web  Applica3on   Project  Goal   •  Broken  Web

     Applica3ons  are  needed  to  know  evil   –  Introduce  people  to  the  topic   –  Test  web  applica3on  scanner    people   –  Test  web  applica3on  scanner    products   –  Test  source  code  analysis  tools     –  Test  web  applica3on  firewalls     –  Collect  evidence  le_  by  aTackers   –  Develop  business  logic  perspec3ves     –  Develop  human  element  perspec3ves  
  6. Bad  Web  Apps  Challenges   •  Some  web  sites  are

     built  on  proprietary   systems   •  Back  end  databases  may  need  licensing   •  Mul3ple  bad  web  apps  on  one  system  can   conflict  with  one  another     •  Can  be  difficult  to  install     •  Should  be  set  up  in  a  secured  and  isolated   environment  
  7. What  is  it?   OWASPBWA  –  A  Virtual  Machine  that

     is  a   collec3on  of  broken  web  applica3ons   –  Version  1.1.1  released  in  September  2013   –  Available  in  ova  and  vmware  formats   –  Ubuntu  Linux  Server  10.04  LTS    
  8. OWASP  BWA   •  “Training  Applica3ons”   –  Web  Goat

     (mul3ple  plaZorms)   –  Damn  Vulnerable  Web  Applica3on   •  “Real  applica3ons”     –  OWASP  Vicnum  project     –  Cyclone  Transfers       •  Older  (broken)  versions  of  real  applica3ons/frameworks  such   as  WordPress  and  Joomla  
  9. Vicnum   •  Flexible,  realis3c,  vulnerable  web  applica3ons  useful  to

     auditor’s   honing  their  web  applica3on  security  skills   •  And  anyone  else  needed  a  web  security  primer   •  Used  as  a  hacker  challenge  for  several  security  events  including   hTp://2013.appsecusa.org/   •  PERL/PHP  apps  available  on  Sourceforge   –  Guess  the  number  (Guessnum)   –  Guess  the  word  (JoTo)   –  Union  Challenge   •  Ruby  on  Rails  apps  available  on  Github   –  Cyclone  Transfers   –  hTps://github.com/fridaygoldsmith/bwa_cyclone_transfers   •  Usually  available  live  at  hTp://vicnum.ciphertechs.com/  
  10. Demonstra3on  of  Vicnum   A  game  to  review  in  Vicnum

      Jo=o  -­‐  The  computer  will  think  of  a  five  leTer  word  with  unique  leTers.   A_er  you  aTempt  to  guess  the  word,  the  computer  will  tell  you  whether   you  guessed  the  word  successfully,  or  how  many  of  the  leTers  in  your   guess  match  the  computer's  word.  Keep  on  submiSng  five  leTer  words   un3l  you  have  guessed  the  computer's  word.   Where  do  we  start?   What  methodology?   What  tools?   What  are  we  a_er?  
  11. Demo   Demo  of  Vicnum   JoTo   Some  OWASP

     tools  to  use:   Zap   DirBuster   JBroFuzz  
  12. Hacking  Vicnum     •  Are  input  fields  sani3zed?  

    –  Cross  site  scrip3ng  aTacks   •  GET   •  POST   –  SQL  injec3ons   •  URL  manipula3on   •  Backdoors  in  the  applica3on   •  Administra3on  and  Authen3ca3on  issues   •  The  ques3on  of  state   •  Encryp3on  and  encoding  issues   •  Business  logic  and  the  human  element  
  13. Cyclone  Transfers   •  Ruby  on  Rails  Framework   • 

    Available  on  github   –  git://github.com/fridaygoldsmith/bwa_cyclone_transfers.git   •  A    fic3onal  money  transfer  service,    that  consists  of  mul3ple   vulnerabili3es  including:     –  mass  assignment  vulnerability   –  cross  site  scrip3ng   –  sql  injec3ons   –  file  upload  weaknesses   –  session  management  issues  
  14. Cyclone  Review   •  Mass  assignment  allows  Rails  web  apps

     to  set  many   aTributes  at  once     –  Rails  is  conven&on-­‐heavy  and  certain  fields   like  :admin,  and  :public_key  are  easily  guessable   –  curl  -­‐d       "user[email][email protected]&user[password]=password&u ser[password_confirma3on]=password&user[name]=mo& user[admin]=true"  localhost/cyclone/users   –  Many  Rails  based  web  sites  were  exploited  in  2012  via  the   mass  assignment  vulnerability  
  15. Technical  Issues  in  Web   Hacking   •  Hacking  a

     network  is  different  than  hacking  a  web  app   •  Similari3es  do  exist  in  certain  areas   –  Cryptography  checking   –  Creden3al  aTacks   –  Tools  exist  for  scanning,  fuzzing  ….   •   But  major  technical  challenges  exist   –  A    request/response  protocol  where  state  is  always  an  issue   –  Code  to  be  evaluated  on  both  server  and  browser!  
  16. Non  Technical  Issues  in  Web   Hacking   •  Ul3mately

     web  pages  are  set  up  by  applica3on  programmers   mee3ng    a  business  requirement   •  Data  works  its  way  into  web  sites  that  might  be  difficult  for  a   tool  or  a  security  analyst  to  evaluate   –  Comments  might  contain  inappropriate  data   –  URL  fields  can  be  manipulated  and  might  show  unintended  web  pages   –  URL  parameters  can  also  be  guessed  and  may  leak  informa3on   –  Hidden  fields  in  form  fields  can  be  viewed  and  manipulated     •  And  then  there  are  those  business  logic  issues!   •  How  can  we  prepare  assessors  for  the  non  technical  piece  of   an  assessment?  
  17. Going  Forward   New   Technologies   New  ways  to

      or  detect  or   block  aTacks   New  tools  to   discover   New   Security   Issues   Broken  web   applica3ons  needed   to  raise  awareness   and  sharpen  skills  
  18. Help  needed!   •  Near  Term  Items     – Documenta3on

     can  use  some  work   – Catalog  of  vulnerabili3es  can  be  expanded   •  Longer  Term   – Will  get  increasingly  difficult  to  support  older   applica3ons  due  to  library  and  other  dependency   issues   – May  move  to  mul3ple  VMs   – Would  like  to  improve  set  of  applica3ons  
  19. Wish  List   •  More  applica3ons  in  more  languages  –

      –  ASP.NET   –  Python   –  Node.js     •  More  modern  UIs   –  Rich  JavaScript   –  HTML5   –  Mobile  op3mized  sites   •  More  database  back  ends   –  PostgreSQL   –  No  SQL   •  More  web  services  
  20. Ques3ons  and  Review         We  welcome  your

     feedback  and  contribu3ons!   hTps://www.owasp.org/index.php/OWASP_Broken_Web_Applica3ons_Project   @owaspbwa   [email protected]   [email protected]   hTp://vicnum.ciphertechs.com   hTp://cyclone.ciphertechs.com