SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Downloaden Sie, um offline zu lesen
AL
                                                    Contents



                                             RI
                                            TE
Introduction
                                    MA                           xiv

Part I         Anatomy of Vulnerabilities                         1
                              ED

Chapter 1      That Horrible Sinking Feeling                      3
               Avoiding That Sinking Feeling                      4
                         HT



                 It’s Up to You                                   4
                 What Is Web Application Security?                5
                    IG




                 Security Is a Balance                            5
               Common Ways Drupal Gets Cracked                    5
                  R




                 Authentication, Authorization, and Sessions      6
               PY




                 Command Execution: SQL Injection and Friends    12
                 Cross-Site Scripting                            16
         CO




                 Cross-Site Request Forgery                      17
               The Big Scary World                               19
               The Most Common Vulnerabilities                   19
               Summary                                           20

Chapter 2      Security Principles and Vulnerabilities outside
               Drupal                                            21
               Server and Network Vulnerabilities                22
                 Weaknesses across the Stack                     22
                 Denial of Service—Generic and Specific           23
                 Defense in Depth                                23

                                                                       ix
x   Contents


                  Web Server File System Permissions                 24
                  Least Privilege—Minimum Permissions for the Task   25
                  Least Privilege for Database Accounts              25
                Social and Physical Vulnerabilities                  26
                  The Vendor Password Please?                        26
                  This Is IT; Can I Help?                            27
                  Let’s Get Physical                                 28
                  Sanitizing a Typical Drupal Database               28
                Summary                                              29

    Part II     Protecting against Vulnerabilities                   31

    Chapter 3   Protecting Your Site with Configuration               33
                Stay Current with Code Updates                       33
                   Staying Informed about Code Updates               34
                   Updating Your Site’s Code                         36
                Know Your Attack Surface                             38
                   Best Practices for Contributed Modules            38
                   Performing a Quick Security Scan                  40
                Using Extra Security Modules                         40
                   Login and Session-Related Modules                 41
                   Password-Related Modules                          42
                   Visitor Analysis                                  44
                Smart Configuration of Core                           45
                   User Permissions                                  45
                   Input Formats and Filters                         45
                Summary                                              48

    Chapter 4   Drupal’s User and Permissions System                 49
                Using the API                                        49
                What Are Hooks, Form Handlers, and Overrides?        51
                Defining Permissions: hook_perm                       52
                Checking Permission: user_access and Friends         53
                  Menu Callback Permissions                          54
                  Input Format Access: filter_access                  56
                Common Mistakes with Users and Permissions           57
                  Insufficient or Incorrect Menu Access               57
                  Overloading a Permission                           58
                  Access Definitely Denied                            58
Contents   xi


              Acting as Another User—and Getting Stuck                    59
            Summary                                                       61

Chapter 5   Dangerous Input, Cleaning Output                             63
            Database Sanitizing: db_query and Friends                    63
               Queries for Drupal 6.x and Earlier                        64
               Improper Use of db_query                                  65
               Queries for Drupal 7.x and Newer                          66
            Translation and Sanitizing: t                                67
            Improper Use of t                                            68
            Linking to Content: l and url                                69
            The Form API                                                 70
               Semantic Protection: Invalid Form Data                    71
               Form API: Sanitizing Options and Labels                   73
            Filtering Content: check_plain, check_markup,
             filter_xss_admin                                              74
               Escaping Everything: check_plain                           75
               Filtering HTML-Formatted Code: check_markup                77
               Basic Filtering for Admins: filter_xss_admin                77
            Summary                                                       78

Chapter 6   Safety in the Theme                                          79
            Quick Introduction to Theming in Drupal                      79
              Overridable Templates and Functions                        80
              Providing Variables for Templates                          82
            Common Mistakes                                              83
              Printing Raw Node Data                                     83
              Best Practice: Filter Data Prior to Using Templates        86
            Summary                                                      88

Chapter 7   The Drupal Access System                                     89
            Respecting the Access System                                 90
              Modifying Queries for Access: db_rewrite_sql               90
              Testing Access for a Single Node: node_access              92
              Case Study: Private Module                                 93
              Node Access Storage Explained                              93
            Summary                                                      97

Chapter 8   Automated Security Testing                                    99
            Test Drupal with Drupal: Coder Module                        100
xii   Contents


                     More Testing Drupal with Drupal Security Scanner   102
                   Testing Drupal with Grendel-Scan                     105
                   Summary                                              107

      Part III     Weaknesses in the Wild                               109

      Chapter 9    Finding, Exploiting, and Avoiding Vulnerabilities    111
                   Strategies to Crack Drupal                            112
                   Searching Core and Contrib for Vulnerabilities        112
                      Using Grep to Search for Common Mistakes           112
                      Finding Sites Vulnerable to the Stock Weakness     115
                      Finding Vulnerabilities by Happenstance            116
                      Exploiting the Talk Module XSS Vulnerability       120
                   How to Report Vulnerabilities                         123
                   Summary                                               124

      Chapter 10   Un-Cracking Drupal                                   127
                   Step 1: Secure the Menu                               128
                   Step 2: Secure the User Search                        130
                   Step 3: Secure the Node List                          131
                   Step 4: Disable Users Safely                          133
                   Drupal Un-cracked                                     134

      Part IV      Appendixes                                           135

      Appendix A   Function Reference                                   137
                   Text-Filtering Functions                              137
                   Link and URL Building Functions                       139
                   Users and Permissions                                 142
                   Database Interaction                                  144

      Appendix B   Installing and Using Drupal 6 Fresh out of the Box   147
                   Step 1: Installing Drupal—Easier Than Ever Before     149
                      Downloading Drupal                                 150
                      Unzipping and Preparing Files for Upload           150
                      Uploading Files                                    150
                      Creating the Database and User for the Drupal
                       Installation                                     151
                      Running the Drupal Installation Wizard            151
                      Alternate Method: Managing Drupal with CVS        155
Contents   xiii


                Updating Drupal Core and Running the Update
                 Script                                             156
             Step 2: Designing and Building the Architecture        158
                Application Scope and Domain                        158
                Creating Roles and Users                            160
                Installing and Enabling Modules                     161
                Making the Site Bilingual                           162
             Step 3: Creating the Business Objects                  167
             Step 4: Creating the Workflows                          172
                Implementing the Registration Workflow               172
                Implementing the Client’s Workflow                   177
                Implementing the Translator Team Leader’s
                 Workflow                                            184
                Implementing the Translator’s Workflow               188
                Installing the Vulnerable.module                    195
             Summary                                                196
Appendix C   Leveraging Community Resources                        197
             Resources from the Drupal Security Team                197
             General Security Resources                             199
               PHP.net                                              199
               OWASP                                                199
               Google Code University                               200
               Heine Deelstra                                       200
               Groups.Drupal.org                                    201
               Robert Hansen—rsnake                                 201
               Bruce Schneier                                       201
               CrackingDrupal.com                                   202
             Summary                                                202

Glossary                                                           203

Index                                                              213

Weitere ähnliche Inhalte

Ähnlich wie Cracking drupal table_of_contents

Extreme wareuserguide72
Extreme wareuserguide72Extreme wareuserguide72
Extreme wareuserguide72etrunk
 
Introduction to hacking
Introduction to hackingIntroduction to hacking
Introduction to hackingnitish mehta
 
Cp data collectiongd
Cp data collectiongdCp data collectiongd
Cp data collectiongdBhushan Mulay
 
Data in your SOA: From SQL to NoSQL and Beyond
Data in your SOA: From SQL to NoSQL and BeyondData in your SOA: From SQL to NoSQL and Beyond
Data in your SOA: From SQL to NoSQL and BeyondWSO2
 
6) robotica mcgraw - hill - pic robotics a beginners guide to robotics proj...
6) robotica   mcgraw - hill - pic robotics a beginners guide to robotics proj...6) robotica   mcgraw - hill - pic robotics a beginners guide to robotics proj...
6) robotica mcgraw - hill - pic robotics a beginners guide to robotics proj...Miguel Angel Corona Lòpez
 
Technical Debt - PHPBenelux
Technical Debt - PHPBeneluxTechnical Debt - PHPBenelux
Technical Debt - PHPBeneluxenaramore
 
Web applications security conference slides
Web applications security  conference slidesWeb applications security  conference slides
Web applications security conference slidesBassam Al-Khatib
 
BeEF: The Browser Exploitation Framework
BeEF: The Browser Exploitation FrameworkBeEF: The Browser Exploitation Framework
BeEF: The Browser Exploitation Frameworkawiasecretary
 
CyberArk Interview.pdf
CyberArk Interview.pdfCyberArk Interview.pdf
CyberArk Interview.pdfInfosec Train
 
CIS 333 Exceptional Education / snaptutorial.com
CIS 333 Exceptional Education / snaptutorial.comCIS 333 Exceptional Education / snaptutorial.com
CIS 333 Exceptional Education / snaptutorial.comdonaldzs97
 
Introduction to Codeigniter
Introduction to Codeigniter Introduction to Codeigniter
Introduction to Codeigniter Zero Huang
 
<marquee>html title testfsdjk34254</marquee>
<marquee>html title testfsdjk34254</marquee><marquee>html title testfsdjk34254</marquee>
<marquee>html title testfsdjk34254</marquee>slideshareperson2
 
Cis 333 Enhance teaching / snaptutorial.com
Cis 333   Enhance teaching / snaptutorial.comCis 333   Enhance teaching / snaptutorial.com
Cis 333 Enhance teaching / snaptutorial.comDavis104
 
Modern Post-Exploitation Strategies - 44CON 2012
Modern Post-Exploitation Strategies - 44CON 2012Modern Post-Exploitation Strategies - 44CON 2012
Modern Post-Exploitation Strategies - 44CON 201244CON
 

Ähnlich wie Cracking drupal table_of_contents (20)

Obj c
Obj cObj c
Obj c
 
Extreme wareuserguide72
Extreme wareuserguide72Extreme wareuserguide72
Extreme wareuserguide72
 
Introduction to hacking
Introduction to hackingIntroduction to hacking
Introduction to hacking
 
Obj c
Obj cObj c
Obj c
 
Cp data collectiongd
Cp data collectiongdCp data collectiongd
Cp data collectiongd
 
Data in your SOA: From SQL to NoSQL and Beyond
Data in your SOA: From SQL to NoSQL and BeyondData in your SOA: From SQL to NoSQL and Beyond
Data in your SOA: From SQL to NoSQL and Beyond
 
6) robotica mcgraw - hill - pic robotics a beginners guide to robotics proj...
6) robotica   mcgraw - hill - pic robotics a beginners guide to robotics proj...6) robotica   mcgraw - hill - pic robotics a beginners guide to robotics proj...
6) robotica mcgraw - hill - pic robotics a beginners guide to robotics proj...
 
Technical Debt - PHPBenelux
Technical Debt - PHPBeneluxTechnical Debt - PHPBenelux
Technical Debt - PHPBenelux
 
Mac OS X Security Configuration - Leopard
Mac OS X Security Configuration - LeopardMac OS X Security Configuration - Leopard
Mac OS X Security Configuration - Leopard
 
Web applications security conference slides
Web applications security  conference slidesWeb applications security  conference slides
Web applications security conference slides
 
BeEF: The Browser Exploitation Framework
BeEF: The Browser Exploitation FrameworkBeEF: The Browser Exploitation Framework
BeEF: The Browser Exploitation Framework
 
CyberArk Interview.pdf
CyberArk Interview.pdfCyberArk Interview.pdf
CyberArk Interview.pdf
 
CIS 333 Exceptional Education / snaptutorial.com
CIS 333 Exceptional Education / snaptutorial.comCIS 333 Exceptional Education / snaptutorial.com
CIS 333 Exceptional Education / snaptutorial.com
 
Xforce 2008 Annual Report
Xforce 2008 Annual ReportXforce 2008 Annual Report
Xforce 2008 Annual Report
 
Xforce 2008 Annual Report
Xforce 2008 Annual ReportXforce 2008 Annual Report
Xforce 2008 Annual Report
 
Introduction to Codeigniter
Introduction to Codeigniter Introduction to Codeigniter
Introduction to Codeigniter
 
" onclick="alert(1)
" onclick="alert(1)" onclick="alert(1)
" onclick="alert(1)
 
<marquee>html title testfsdjk34254</marquee>
<marquee>html title testfsdjk34254</marquee><marquee>html title testfsdjk34254</marquee>
<marquee>html title testfsdjk34254</marquee>
 
Cis 333 Enhance teaching / snaptutorial.com
Cis 333   Enhance teaching / snaptutorial.comCis 333   Enhance teaching / snaptutorial.com
Cis 333 Enhance teaching / snaptutorial.com
 
Modern Post-Exploitation Strategies - 44CON 2012
Modern Post-Exploitation Strategies - 44CON 2012Modern Post-Exploitation Strategies - 44CON 2012
Modern Post-Exploitation Strategies - 44CON 2012
 

Kürzlich hochgeladen

ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcEViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcEApsara Of India
 
Call Girls Near The Corus Hotel New Delhi 9873777170
Call Girls Near The Corus Hotel New Delhi 9873777170Call Girls Near The Corus Hotel New Delhi 9873777170
Call Girls Near The Corus Hotel New Delhi 9873777170Sonam Pathan
 
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...Amil Baba Dawood bangali
 
Call Girls Near Delhi Pride Hotel New Delhi 9873777170
Call Girls Near Delhi Pride Hotel New Delhi 9873777170Call Girls Near Delhi Pride Hotel New Delhi 9873777170
Call Girls Near Delhi Pride Hotel New Delhi 9873777170Sonam Pathan
 
Vip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services AvailableVip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services AvailableKomal Khan
 
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...Amil Baba Company
 
Amil Baba In Rawalpindi Kala Jadu Expert Rawalpindi amil baba in rawalpindi j...
Amil Baba In Rawalpindi Kala Jadu Expert Rawalpindi amil baba in rawalpindi j...Amil Baba In Rawalpindi Kala Jadu Expert Rawalpindi amil baba in rawalpindi j...
Amil Baba In Rawalpindi Kala Jadu Expert Rawalpindi amil baba in rawalpindi j...Amil Baba Company
 
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...Amil baba
 
Gripping Adult Web Series You Can't Afford to Miss
Gripping Adult Web Series You Can't Afford to MissGripping Adult Web Series You Can't Afford to Miss
Gripping Adult Web Series You Can't Afford to Missget joys
 
Deconstruction theory ppt easy ppt for ms
Deconstruction theory ppt easy ppt for msDeconstruction theory ppt easy ppt for ms
Deconstruction theory ppt easy ppt for mshudamushtaq259
 
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand FinaleBiswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand FinaleQui9 (Ultimate Quizzing)
 
原版1:1复刻卡尔加里大学毕业证UC毕业证留信学历认证
原版1:1复刻卡尔加里大学毕业证UC毕业证留信学历认证原版1:1复刻卡尔加里大学毕业证UC毕业证留信学历认证
原版1:1复刻卡尔加里大学毕业证UC毕业证留信学历认证gwhohjj
 
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceCall Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceTina Ji
 
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...Amil Baba Dawood bangali
 
Statement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfileStatement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfilef4ssvxpz62
 
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].ppGRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].ppJasmineLinogon
 
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...Amil Baba Company
 
NO,1 Amil baba in Lahore Astrologer in Karachi amil baba in pakistan amil bab...
NO,1 Amil baba in Lahore Astrologer in Karachi amil baba in pakistan amil bab...NO,1 Amil baba in Lahore Astrologer in Karachi amil baba in pakistan amil bab...
NO,1 Amil baba in Lahore Astrologer in Karachi amil baba in pakistan amil bab...Amil Baba Company
 

Kürzlich hochgeladen (20)

ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcEViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
ViP Call Girls In Udaipur 9602870969 Gulab Bagh Escorts SeRvIcE
 
Call Girls Near The Corus Hotel New Delhi 9873777170
Call Girls Near The Corus Hotel New Delhi 9873777170Call Girls Near The Corus Hotel New Delhi 9873777170
Call Girls Near The Corus Hotel New Delhi 9873777170
 
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
 
Call Girls Near Delhi Pride Hotel New Delhi 9873777170
Call Girls Near Delhi Pride Hotel New Delhi 9873777170Call Girls Near Delhi Pride Hotel New Delhi 9873777170
Call Girls Near Delhi Pride Hotel New Delhi 9873777170
 
Vip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services AvailableVip Delhi Ncr Call Girls Best Services Available
Vip Delhi Ncr Call Girls Best Services Available
 
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
Amil baba in Pakistan amil baba Karachi amil baba in pakistan amil baba in la...
 
Amil Baba In Rawalpindi Kala Jadu Expert Rawalpindi amil baba in rawalpindi j...
Amil Baba In Rawalpindi Kala Jadu Expert Rawalpindi amil baba in rawalpindi j...Amil Baba In Rawalpindi Kala Jadu Expert Rawalpindi amil baba in rawalpindi j...
Amil Baba In Rawalpindi Kala Jadu Expert Rawalpindi amil baba in rawalpindi j...
 
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
 
Gripping Adult Web Series You Can't Afford to Miss
Gripping Adult Web Series You Can't Afford to MissGripping Adult Web Series You Can't Afford to Miss
Gripping Adult Web Series You Can't Afford to Miss
 
young call girls in Hari Nagar,🔝 9953056974 🔝 escort Service
young call girls in Hari Nagar,🔝 9953056974 🔝 escort Serviceyoung call girls in Hari Nagar,🔝 9953056974 🔝 escort Service
young call girls in Hari Nagar,🔝 9953056974 🔝 escort Service
 
Deconstruction theory ppt easy ppt for ms
Deconstruction theory ppt easy ppt for msDeconstruction theory ppt easy ppt for ms
Deconstruction theory ppt easy ppt for ms
 
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand FinaleBiswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
 
原版1:1复刻卡尔加里大学毕业证UC毕业证留信学历认证
原版1:1复刻卡尔加里大学毕业证UC毕业证留信学历认证原版1:1复刻卡尔加里大学毕业证UC毕业证留信学历认证
原版1:1复刻卡尔加里大学毕业证UC毕业证留信学历认证
 
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts ServiceCall Girls in Faridabad 9000000000 Faridabad Escorts Service
Call Girls in Faridabad 9000000000 Faridabad Escorts Service
 
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
 
Statement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfileStatement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfile
 
Call Girls Koti 7001305949 all area service COD available Any Time
Call Girls Koti 7001305949 all area service COD available Any TimeCall Girls Koti 7001305949 all area service COD available Any Time
Call Girls Koti 7001305949 all area service COD available Any Time
 
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].ppGRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
 
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
Amil Baba in karachi Kala jadu Expert Amil baba Black magic Specialist in Isl...
 
NO,1 Amil baba in Lahore Astrologer in Karachi amil baba in pakistan amil bab...
NO,1 Amil baba in Lahore Astrologer in Karachi amil baba in pakistan amil bab...NO,1 Amil baba in Lahore Astrologer in Karachi amil baba in pakistan amil bab...
NO,1 Amil baba in Lahore Astrologer in Karachi amil baba in pakistan amil bab...
 

Cracking drupal table_of_contents

  • 1. AL Contents RI TE Introduction MA xiv Part I Anatomy of Vulnerabilities 1 ED Chapter 1 That Horrible Sinking Feeling 3 Avoiding That Sinking Feeling 4 HT It’s Up to You 4 What Is Web Application Security? 5 IG Security Is a Balance 5 Common Ways Drupal Gets Cracked 5 R Authentication, Authorization, and Sessions 6 PY Command Execution: SQL Injection and Friends 12 Cross-Site Scripting 16 CO Cross-Site Request Forgery 17 The Big Scary World 19 The Most Common Vulnerabilities 19 Summary 20 Chapter 2 Security Principles and Vulnerabilities outside Drupal 21 Server and Network Vulnerabilities 22 Weaknesses across the Stack 22 Denial of Service—Generic and Specific 23 Defense in Depth 23 ix
  • 2. x Contents Web Server File System Permissions 24 Least Privilege—Minimum Permissions for the Task 25 Least Privilege for Database Accounts 25 Social and Physical Vulnerabilities 26 The Vendor Password Please? 26 This Is IT; Can I Help? 27 Let’s Get Physical 28 Sanitizing a Typical Drupal Database 28 Summary 29 Part II Protecting against Vulnerabilities 31 Chapter 3 Protecting Your Site with Configuration 33 Stay Current with Code Updates 33 Staying Informed about Code Updates 34 Updating Your Site’s Code 36 Know Your Attack Surface 38 Best Practices for Contributed Modules 38 Performing a Quick Security Scan 40 Using Extra Security Modules 40 Login and Session-Related Modules 41 Password-Related Modules 42 Visitor Analysis 44 Smart Configuration of Core 45 User Permissions 45 Input Formats and Filters 45 Summary 48 Chapter 4 Drupal’s User and Permissions System 49 Using the API 49 What Are Hooks, Form Handlers, and Overrides? 51 Defining Permissions: hook_perm 52 Checking Permission: user_access and Friends 53 Menu Callback Permissions 54 Input Format Access: filter_access 56 Common Mistakes with Users and Permissions 57 Insufficient or Incorrect Menu Access 57 Overloading a Permission 58 Access Definitely Denied 58
  • 3. Contents xi Acting as Another User—and Getting Stuck 59 Summary 61 Chapter 5 Dangerous Input, Cleaning Output 63 Database Sanitizing: db_query and Friends 63 Queries for Drupal 6.x and Earlier 64 Improper Use of db_query 65 Queries for Drupal 7.x and Newer 66 Translation and Sanitizing: t 67 Improper Use of t 68 Linking to Content: l and url 69 The Form API 70 Semantic Protection: Invalid Form Data 71 Form API: Sanitizing Options and Labels 73 Filtering Content: check_plain, check_markup, filter_xss_admin 74 Escaping Everything: check_plain 75 Filtering HTML-Formatted Code: check_markup 77 Basic Filtering for Admins: filter_xss_admin 77 Summary 78 Chapter 6 Safety in the Theme 79 Quick Introduction to Theming in Drupal 79 Overridable Templates and Functions 80 Providing Variables for Templates 82 Common Mistakes 83 Printing Raw Node Data 83 Best Practice: Filter Data Prior to Using Templates 86 Summary 88 Chapter 7 The Drupal Access System 89 Respecting the Access System 90 Modifying Queries for Access: db_rewrite_sql 90 Testing Access for a Single Node: node_access 92 Case Study: Private Module 93 Node Access Storage Explained 93 Summary 97 Chapter 8 Automated Security Testing 99 Test Drupal with Drupal: Coder Module 100
  • 4. xii Contents More Testing Drupal with Drupal Security Scanner 102 Testing Drupal with Grendel-Scan 105 Summary 107 Part III Weaknesses in the Wild 109 Chapter 9 Finding, Exploiting, and Avoiding Vulnerabilities 111 Strategies to Crack Drupal 112 Searching Core and Contrib for Vulnerabilities 112 Using Grep to Search for Common Mistakes 112 Finding Sites Vulnerable to the Stock Weakness 115 Finding Vulnerabilities by Happenstance 116 Exploiting the Talk Module XSS Vulnerability 120 How to Report Vulnerabilities 123 Summary 124 Chapter 10 Un-Cracking Drupal 127 Step 1: Secure the Menu 128 Step 2: Secure the User Search 130 Step 3: Secure the Node List 131 Step 4: Disable Users Safely 133 Drupal Un-cracked 134 Part IV Appendixes 135 Appendix A Function Reference 137 Text-Filtering Functions 137 Link and URL Building Functions 139 Users and Permissions 142 Database Interaction 144 Appendix B Installing and Using Drupal 6 Fresh out of the Box 147 Step 1: Installing Drupal—Easier Than Ever Before 149 Downloading Drupal 150 Unzipping and Preparing Files for Upload 150 Uploading Files 150 Creating the Database and User for the Drupal Installation 151 Running the Drupal Installation Wizard 151 Alternate Method: Managing Drupal with CVS 155
  • 5. Contents xiii Updating Drupal Core and Running the Update Script 156 Step 2: Designing and Building the Architecture 158 Application Scope and Domain 158 Creating Roles and Users 160 Installing and Enabling Modules 161 Making the Site Bilingual 162 Step 3: Creating the Business Objects 167 Step 4: Creating the Workflows 172 Implementing the Registration Workflow 172 Implementing the Client’s Workflow 177 Implementing the Translator Team Leader’s Workflow 184 Implementing the Translator’s Workflow 188 Installing the Vulnerable.module 195 Summary 196 Appendix C Leveraging Community Resources 197 Resources from the Drupal Security Team 197 General Security Resources 199 PHP.net 199 OWASP 199 Google Code University 200 Heine Deelstra 200 Groups.Drupal.org 201 Robert Hansen—rsnake 201 Bruce Schneier 201 CrackingDrupal.com 202 Summary 202 Glossary 203 Index 213