Slide 1

Slide 1 text

OWASP  Broken  Web  Applica3on  Project   Bad  Web  Apps  are  Good  

Slide 2

Slide 2 text

About  Me   •  Mordecai  (Mo)  Kraushar   •  Director  of  Audit,  CipherTechs   •  OWASP  Project  Lead,  Vicnum   •  OWASP  New  York  City  chapter  member  

Slide 3

Slide 3 text

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  

Slide 4

Slide 4 text

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  

Slide 5

Slide 5 text

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  

Slide 6

Slide 6 text

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  

Slide 7

Slide 7 text

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  

Slide 8

Slide 8 text

DISCLAIMER  

Slide 9

Slide 9 text

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    

Slide 10

Slide 10 text

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  

Slide 11

Slide 11 text

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/  

Slide 12

Slide 12 text

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?  

Slide 13

Slide 13 text

Demo   Demo  of  Vicnum   JoTo   Some  OWASP  tools  to  use:   Zap   DirBuster   JBroFuzz  

Slide 14

Slide 14 text

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  

Slide 15

Slide 15 text

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  

Slide 16

Slide 16 text

Demo   Demo  of  Cyclone  Transfers  

Slide 17

Slide 17 text

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  

Slide 18

Slide 18 text

Demo   A  look  at  other  BWA  apps  

Slide 19

Slide 19 text

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!  

Slide 20

Slide 20 text

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?  

Slide 21

Slide 21 text

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  

Slide 22

Slide 22 text

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  

Slide 23

Slide 23 text

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  

Slide 24

Slide 24 text

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