T3DD12 Security Workshop

Helmut Hummel
Helmut HummelSoftware Developer at self employed
T3DD12 Security
                       Beyond SQL Injections
                                 13.04.2012

         Helmut Hummel <helmut@typo3.org>




TYPO3 Developer Days - Munich 2012             Inspiring people
Security Workshop                    1
                                               shar
Introduction


Who‘s that guy?
     TYPO3 Security Team Leader

     TYPO3 Core Team Member

     Employed @ naw.info in Hannover, Germany




TYPO3 Developer Days - Munich 2012         Inspiring people
Security Workshop                    2
                                           shar
T3DD12 Security Workshop


Agenda
     Web Application Security - a Recap

     Did you know ...?

     Knowing the Enemy

     Best Practice

     TYPO3 Security Team




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    3
                                          shar
What is Security?




TYPO3 Developer Days - Munich 2012       Inspiring people
Security Workshop                    4
                                         shar
Absence of potential




TYPO3 Developer Days - Munich 2012       Inspiring people
Security Workshop                    5
                                         shar
What is Security?


Characteristics of Security




TYPO3 Developer Days - Munich 2012       Inspiring people
Security Workshop                    6
                                         shar
What is Security?


Characteristics of Security
     There is no absolute Security




TYPO3 Developer Days - Munich 2012       Inspiring people
Security Workshop                    6
                                         shar
What is Security?


Characteristics of Security
     There is no absolute Security

     An evironment is only as secure as it‘s weakest
     point




TYPO3 Developer Days - Munich 2012             Inspiring people
Security Workshop                    6
                                               shar
What is Security?


Characteristics of Security
     There is no absolute Security

     An evironment is only as secure as it‘s weakest
     point

     Security is an investment




TYPO3 Developer Days - Munich 2012             Inspiring people
Security Workshop                    6
                                               shar
What is Security?


Characteristics of Security
     There is no absolute Security

     An evironment is only as secure as it‘s weakest
     point

     Security is an investment

     The efforts for Security must be proportianal to
     the potential damage




TYPO3 Developer Days - Munich 2012              Inspiring people
Security Workshop                    6
                                                shar
What is Security?


Characteristics of Security
     There is no absolute Security

     An evironment is only as secure as it‘s weakest
     point

     Security is an investment

     The efforts for Security must be proportianal to
     the potential damage

     An application or a service can be called secure, if
     the effort of compromising it are way higher than
     the possible gains


TYPO3 Developer Days - Munich 2012               Inspiring people
Security Workshop                    6
                                                 shar
What is Security?


Security is relative




TYPO3 Developer Days - Munich 2012       Inspiring people
Security Workshop                    7
                                         shar
What is Security?


Security is relative
     Security depends on your needs




TYPO3 Developer Days - Munich 2012       Inspiring people
Security Workshop                    7
                                         shar
What is Security?


Security is relative
     Security depends on your needs

     Security depends on a certain point in time




TYPO3 Developer Days - Munich 2012                 Inspiring people
Security Workshop                    7
                                               shar
What is Security?


Security is relative
     Security depends on your needs

     Security depends on a certain point in time

     Security needs to be constantly adapte and
     improved




TYPO3 Developer Days - Munich 2012                 Inspiring people
Security Workshop                    7
                                               shar
Security is a process, not
          a product.
                            (Bruce Schneier)




TYPO3 Developer Days - Munich 2012             Inspiring people
Security Workshop                    8
                                               shar
Criteria for Security




TYPO3 Developer Days - Munich 2012       Inspiring people
Security Workshop                    9
                                         shar
Criteria for Security




                        10
Criteria for Security




                        Security




                           10
Criteria for Security




                        Integrity




                        Security




                           10
Criteria for Security




                        Integrity




                        Security


                                    Availability




                           10
Criteria for Security




                        Integrity




                        Security


       Confidentiality               Availability




                           10
General Security Priciples
     Least privilege

     Minimize Exposure

     Do not rely on „security by obscurity“

     Defense in depth




TYPO3 Developer Days - Munich 2012            Inspiring people
Security Workshop                    11
                                              shar
Defense in Depth




            12
Defense in Depth
PHP-application

     PHP

    DBMS

  Webserver

      OS

    Server
                  12
Defense in Depth
PHP-application

     PHP

    DBMS

  Webserver

      OS

    Server             Firewall
                        Proxy
                  12
Defense in Depth
PHP-application

     PHP

    DBMS

  Webserver

      OS               Harding



    Server             Firewall
                        Proxy
                  12
Defense in Depth
PHP-application

     PHP

    DBMS

  Webserver            mod_security



      OS               Harding



    Server             Firewall
                        Proxy
                  12
Defense in Depth
PHP-application

     PHP

    DBMS               SQL Proxy



  Webserver            mod_security



      OS               Harding



    Server             Firewall
                        Proxy
                  12
Defense in Depth
PHP-application

     PHP               suhosin



    DBMS               SQL Proxy



  Webserver            mod_security



      OS               Harding



    Server             Firewall
                        Proxy
                  12
Defense in Depth
PHP-application        security layer(s)



     PHP                suhosin



    DBMS                SQL Proxy



  Webserver             mod_security



      OS                Harding



    Server              Firewall
                         Proxy
                  12
Did you know?




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    13
                                          shar
TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    14
                                          shar
TypoScript




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    15
                                          shar
page.10 = CONTENT
page.10.table = tt_content
page.10.where = colPos=0
page.10.andWhere.data = GP:page_id
page.10.andWhere.wrap = pid=|




                         16
page.10 = CONTENT
page.10.table = tt_content
page.10.where = colPos=0
page.10.andWhere.data = GP:page_id
page.10.andWhere.intval = 1
page.10.andWhere.wrap = pid=|




                         17
page.10 = TEXT
page.10.field = title
page.10.wrap = <h1 class="c-{field:layout}">|</h1>
page.10.insertData = 1




                          18
page.10 = TEXT
page.10.field = title
page.10.wrap = <h1 class="c-{field:layout}">|</h1>
page.10.insertData = 1




                          19
page.10 = TEXT
page.10.field = title
page.10.dataWrap = <h1 class="c-{field:layout}">|</h1>




                          20
page.10 = TEXT
page.10.field = title
page.10.dataWrap = <h1 class="c-{field:layout}">|</h1>
page.10.htmlSpecialChars = 1




                          21
page.10 = TEXT
page.10.field = title
page.10.dataWrap = <h1 class="c-{field:layout}">|</h1>
page.10.htmlSpecialChars = 1




                          22
Security Problems




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    23
                                          shar
XSS




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    24
                                          shar
HTML Contexts
     HTML-Element

     HTML-Attribute Value

     JS-Values

     URL Parameter




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    25
                                          shar
CSRF




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    26
                                          shar
CSRF

<img src="http://bank.com/transfer.do?
acct=MARIA&amount=100000" width="1" height="1"
border="0">




                       27
Avoid CSRF
     Secret random token in the request

     Save token in session

     One-Time Token may have usability impacts




TYPO3 Developer Days - Munich 2012          Inspiring people
Security Workshop                    28
                                            shar
SQLi




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    29
                                          shar
File Handling




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    30
                                          shar
Header Injection




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    31
                                          shar
Code Injection




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    32
                                          shar
Insecure Unserialize




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    33
                                          shar
Extbase Security




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    34
                                          shar
XSS




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    35
                                          shar
extbase


XSS
     Flash Messages

     Context




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    36
                                          shar
SQLi




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    37
                                          shar
Mass Assignment




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    38
                                          shar
Access Violation




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    39
                                          shar
Knowing the enemy




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    40
                                          shar
Demo




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    41
                                          shar
Best Practice




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    42
                                          shar
Best Practice




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    43
                                          shar
Best Practice
     The world is bad™




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    43
                                          shar
Best Practice
     The world is bad™

     Every request is an attack as long the opposite is
     proven




TYPO3 Developer Days - Munich 2012              Inspiring people
Security Workshop                    43
                                                shar
Best Practice
     The world is bad™

     Every request is an attack as long the opposite is
     proven

     User input is untrustable




TYPO3 Developer Days - Munich 2012              Inspiring people
Security Workshop                    43
                                                shar
Best Practice
     The world is bad™

     Every request is an attack as long the opposite is
     proven

     User input is untrustable

     User input needs to be validated and encoded and
     escaped right before output




TYPO3 Developer Days - Munich 2012              Inspiring people
Security Workshop                    43
                                                shar
Best Practice
     The world is bad™

     Every request is an attack as long the opposite is
     proven

     User input is untrustable

     User input needs to be validated and encoded and
     escaped right before output

     Encoding and escaping depends on the context




TYPO3 Developer Days - Munich 2012              Inspiring people
Security Workshop                    43
                                                shar
Best Practice
     The world is bad™

     Every request is an attack as long the opposite is
     proven

     User input is untrustable

     User input needs to be validated and encoded and
     escaped right before output

     Encoding and escaping depends on the context

     Separation of Concerns


TYPO3 Developer Days - Munich 2012              Inspiring people
Security Workshop                    43
                                                shar
What is User Input?




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    44
                                          shar
What is User Input?
     $_REQUEST ($_GET, $_POST, $_COOKIE)




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    44
                                          shar
What is User Input?
     $_REQUEST ($_GET, $_POST, $_COOKIE)

     $_FILES




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    44
                                          shar
What is User Input?
     $_REQUEST ($_GET, $_POST, $_COOKIE)

     $_FILES

     $_SERVER




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    44
                                          shar
What is User Input?
     $_REQUEST ($_GET, $_POST, $_COOKIE)

     $_FILES

     $_SERVER

     Filenames




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    44
                                          shar
What is User Input?
     $_REQUEST ($_GET, $_POST, $_COOKIE)

     $_FILES

     $_SERVER

     Filenames

     External Services




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    44
                                          shar
What is User Input?
     $_REQUEST ($_GET, $_POST, $_COOKIE)

     $_FILES

     $_SERVER

     Filenames

     External Services

     Editors are users




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    44
                                          shar
How to treat User Input
     Validation

     Filtering

     Escaping

     Encoding




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    45
                                          shar
How to treat User Input


    User Input            evil™




  Validate/ Filter        stop execution?




 Escaping/ Encoding       context!




      Output

                           46
How to treat User Input
     Filter Input




     Escape Output




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    47
                                          shar
How to treat User Input
     Filter Input

        Check Type

        Check Format

        Check length

     Escape Output

        Context!

          DB, HTML, JS

          Directly before output
TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    48
                                          shar
Separation of Concerns
 Security issues are bugs

 Clean code leads to less bugs

 Test Driven Development

 Leave Security to Security Code




                        49
TYPO3 Security Team




TYPO3 Developer Days - Munich 2012        Inspiring people
Security Workshop                    50
                                          shar
TYPO3 Security Team


TYPO3 Security Team
     Responsible Disclosure Policy

     One communication channel (security@typo3.org)

     Pre-Announcements for critical issues only

     You can support us with sober and precise
     communication and reading the Security Bulletins
     carefully




TYPO3 Developer Days - Munich 2012            Inspiring people
Security Workshop                    51
                                              shar
TYPO3 Security Team


CVSS2 Score
     It is a calculation to help you to identify the
     severity of a Security Issue

     The result are 4 different Scores

        Base Score

        Temporal Score

        Environmental Score

        Overall Score



TYPO3 Developer Days - Munich 2012                 Inspiring people
Security Workshop                    52
                                                   shar
53
53
53
53
54
54
54
55
55
55
56
Questions?




     57
Thank you!
     @helhum
h.hummel@naw.info




        58
1 of 96

Recommended

Nsc42 - the security phoenix devsecops - risk-present_0_3 share by
Nsc42 - the security phoenix devsecops - risk-present_0_3 shareNsc42 - the security phoenix devsecops - risk-present_0_3 share
Nsc42 - the security phoenix devsecops - risk-present_0_3 shareNSC42 Ltd
42 views27 slides
Nsc42 the security phoenix by
Nsc42 the security phoenixNsc42 the security phoenix
Nsc42 the security phoenixNSC42 Ltd
36 views28 slides
The security phoenix - from the ashes of DEV-OPS Appsec California 2020 by
The security phoenix - from the ashes of DEV-OPS Appsec California 2020The security phoenix - from the ashes of DEV-OPS Appsec California 2020
The security phoenix - from the ashes of DEV-OPS Appsec California 2020NSC42 Ltd
418 views44 slides
TYPO3 Security - Risks and Mitigation by
TYPO3 Security - Risks and MitigationTYPO3 Security - Risks and Mitigation
TYPO3 Security - Risks and MitigationHelmut Hummel
1.2K views76 slides
Nsc42 security knights slayer of dragons 0-5_very_short_15m_share by
Nsc42 security knights slayer of dragons 0-5_very_short_15m_shareNsc42 security knights slayer of dragons 0-5_very_short_15m_share
Nsc42 security knights slayer of dragons 0-5_very_short_15m_shareNSC42 Ltd
75 views28 slides
Secure programming language basis by
Secure programming language basisSecure programming language basis
Secure programming language basisAnkita Bhalla
1.1K views14 slides

More Related Content

Similar to T3DD12 Security Workshop

Steering a Bullet Train: Owasp Latam Tour BA 2015 by
Steering a Bullet Train: Owasp Latam Tour BA 2015Steering a Bullet Train: Owasp Latam Tour BA 2015
Steering a Bullet Train: Owasp Latam Tour BA 2015skantos
467 views55 slides
Web Application Security Workshop TYPO3 Developer Days 2014 by
Web Application Security Workshop TYPO3 Developer Days 2014Web Application Security Workshop TYPO3 Developer Days 2014
Web Application Security Workshop TYPO3 Developer Days 2014Helmut Hummel
1.3K views67 slides
Alfresco Virtual DevCon 2020 - Security First! by
Alfresco Virtual DevCon 2020 - Security First!Alfresco Virtual DevCon 2020 - Security First!
Alfresco Virtual DevCon 2020 - Security First!Jason Jolley
54 views34 slides
Reversing & Malware Analysis Training Part 13 - Future Roadmap by
Reversing & Malware Analysis Training Part 13 - Future RoadmapReversing & Malware Analysis Training Part 13 - Future Roadmap
Reversing & Malware Analysis Training Part 13 - Future Roadmapsecurityxploded
12.8K views20 slides
Cloud, DevOps and the New Security Practitioner by
Cloud, DevOps and the New Security PractitionerCloud, DevOps and the New Security Practitioner
Cloud, DevOps and the New Security PractitionerAdrian Sanabria
1.2K views31 slides
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor... by
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...Wouter Bloeyaert
62 views27 slides

Similar to T3DD12 Security Workshop(20)

Steering a Bullet Train: Owasp Latam Tour BA 2015 by skantos
Steering a Bullet Train: Owasp Latam Tour BA 2015Steering a Bullet Train: Owasp Latam Tour BA 2015
Steering a Bullet Train: Owasp Latam Tour BA 2015
skantos467 views
Web Application Security Workshop TYPO3 Developer Days 2014 by Helmut Hummel
Web Application Security Workshop TYPO3 Developer Days 2014Web Application Security Workshop TYPO3 Developer Days 2014
Web Application Security Workshop TYPO3 Developer Days 2014
Helmut Hummel1.3K views
Alfresco Virtual DevCon 2020 - Security First! by Jason Jolley
Alfresco Virtual DevCon 2020 - Security First!Alfresco Virtual DevCon 2020 - Security First!
Alfresco Virtual DevCon 2020 - Security First!
Jason Jolley54 views
Reversing & Malware Analysis Training Part 13 - Future Roadmap by securityxploded
Reversing & Malware Analysis Training Part 13 - Future RoadmapReversing & Malware Analysis Training Part 13 - Future Roadmap
Reversing & Malware Analysis Training Part 13 - Future Roadmap
securityxploded12.8K views
Cloud, DevOps and the New Security Practitioner by Adrian Sanabria
Cloud, DevOps and the New Security PractitionerCloud, DevOps and the New Security Practitioner
Cloud, DevOps and the New Security Practitioner
Adrian Sanabria1.2K views
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor... by Wouter Bloeyaert
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
Wouter Bloeyaert62 views
Security within Scaled Agile by Mark Underwood
Security within Scaled AgileSecurity within Scaled Agile
Security within Scaled Agile
Mark Underwood183 views
Chameleon Secure Solutions Overview Presentation by christoboshoff
Chameleon Secure Solutions Overview PresentationChameleon Secure Solutions Overview Presentation
Chameleon Secure Solutions Overview Presentation
christoboshoff252 views
SACON - Automating SecOps (Murray Goldschmidt) by Priyanka Aash
SACON - Automating SecOps (Murray Goldschmidt)SACON - Automating SecOps (Murray Goldschmidt)
SACON - Automating SecOps (Murray Goldschmidt)
Priyanka Aash2.9K views
OWASP AppSecEu 2016 Rome - Building secure cloud native apps by Andreas Falk
OWASP AppSecEu 2016 Rome - Building secure cloud native appsOWASP AppSecEu 2016 Rome - Building secure cloud native apps
OWASP AppSecEu 2016 Rome - Building secure cloud native apps
Andreas Falk231 views
Nsc42-CSA AGM is the cloud secure - is easy if you do it smart by NSC42 Ltd
Nsc42-CSA AGM is the cloud secure - is easy if you do it smartNsc42-CSA AGM is the cloud secure - is easy if you do it smart
Nsc42-CSA AGM is the cloud secure - is easy if you do it smart
NSC42 Ltd168 views
Getting to Know Security and Devs: Keys to Successful DevSecOps by Franklin Mosley
Getting to Know Security and Devs: Keys to Successful DevSecOpsGetting to Know Security and Devs: Keys to Successful DevSecOps
Getting to Know Security and Devs: Keys to Successful DevSecOps
Franklin Mosley234 views
OWASP Québec: Threat Modeling Toolkit - Jonathan Marcil by Jonathan Marcil
OWASP Québec: Threat Modeling Toolkit - Jonathan MarcilOWASP Québec: Threat Modeling Toolkit - Jonathan Marcil
OWASP Québec: Threat Modeling Toolkit - Jonathan Marcil
Jonathan Marcil733 views
Hardening as Part of a holistic Security Strategy by NoCodeHardening
Hardening as Part of a holistic Security StrategyHardening as Part of a holistic Security Strategy
Hardening as Part of a holistic Security Strategy
NoCodeHardening494 views
ABN AMRO DevSecOps Journey by Derek E. Weeks
ABN AMRO DevSecOps JourneyABN AMRO DevSecOps Journey
ABN AMRO DevSecOps Journey
Derek E. Weeks1.4K views
Risk Analytics: One Intelligent View by Skybox Security
Risk Analytics: One Intelligent ViewRisk Analytics: One Intelligent View
Risk Analytics: One Intelligent View
Skybox Security915 views

Recently uploaded

Democratising digital commerce in India-Report by
Democratising digital commerce in India-ReportDemocratising digital commerce in India-Report
Democratising digital commerce in India-ReportKapil Khandelwal (KK)
15 views161 slides
STPI OctaNE CoE Brochure.pdf by
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdfmadhurjyapb
14 views1 slide
Kyo - Functional Scala 2023.pdf by
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
368 views92 slides
SUPPLIER SOURCING.pptx by
SUPPLIER SOURCING.pptxSUPPLIER SOURCING.pptx
SUPPLIER SOURCING.pptxangelicacueva6
15 views1 slide
Data Integrity for Banking and Financial Services by
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial ServicesPrecisely
21 views26 slides

Recently uploaded(20)

STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely21 views
Serverless computing with Google Cloud (2023-24) by wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi127 views
Attacking IoT Devices from a Web Perspective - Linux Day by Simone Onofri
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri16 views
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst478 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab19 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta26 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma39 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software263 views

T3DD12 Security Workshop

  • 1. T3DD12 Security Beyond SQL Injections 13.04.2012 Helmut Hummel <helmut@typo3.org> TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 1 shar
  • 2. Introduction Who‘s that guy? TYPO3 Security Team Leader TYPO3 Core Team Member Employed @ naw.info in Hannover, Germany TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 2 shar
  • 3. T3DD12 Security Workshop Agenda Web Application Security - a Recap Did you know ...? Knowing the Enemy Best Practice TYPO3 Security Team TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 3 shar
  • 4. What is Security? TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 4 shar
  • 5. Absence of potential TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 5 shar
  • 6. What is Security? Characteristics of Security TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 6 shar
  • 7. What is Security? Characteristics of Security There is no absolute Security TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 6 shar
  • 8. What is Security? Characteristics of Security There is no absolute Security An evironment is only as secure as it‘s weakest point TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 6 shar
  • 9. What is Security? Characteristics of Security There is no absolute Security An evironment is only as secure as it‘s weakest point Security is an investment TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 6 shar
  • 10. What is Security? Characteristics of Security There is no absolute Security An evironment is only as secure as it‘s weakest point Security is an investment The efforts for Security must be proportianal to the potential damage TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 6 shar
  • 11. What is Security? Characteristics of Security There is no absolute Security An evironment is only as secure as it‘s weakest point Security is an investment The efforts for Security must be proportianal to the potential damage An application or a service can be called secure, if the effort of compromising it are way higher than the possible gains TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 6 shar
  • 12. What is Security? Security is relative TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 7 shar
  • 13. What is Security? Security is relative Security depends on your needs TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 7 shar
  • 14. What is Security? Security is relative Security depends on your needs Security depends on a certain point in time TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 7 shar
  • 15. What is Security? Security is relative Security depends on your needs Security depends on a certain point in time Security needs to be constantly adapte and improved TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 7 shar
  • 16. Security is a process, not a product. (Bruce Schneier) TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 8 shar
  • 17. Criteria for Security TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 9 shar
  • 19. Criteria for Security Security 10
  • 20. Criteria for Security Integrity Security 10
  • 21. Criteria for Security Integrity Security Availability 10
  • 22. Criteria for Security Integrity Security Confidentiality Availability 10
  • 23. General Security Priciples Least privilege Minimize Exposure Do not rely on „security by obscurity“ Defense in depth TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 11 shar
  • 25. Defense in Depth PHP-application PHP DBMS Webserver OS Server 12
  • 26. Defense in Depth PHP-application PHP DBMS Webserver OS Server Firewall Proxy 12
  • 27. Defense in Depth PHP-application PHP DBMS Webserver OS Harding Server Firewall Proxy 12
  • 28. Defense in Depth PHP-application PHP DBMS Webserver mod_security OS Harding Server Firewall Proxy 12
  • 29. Defense in Depth PHP-application PHP DBMS SQL Proxy Webserver mod_security OS Harding Server Firewall Proxy 12
  • 30. Defense in Depth PHP-application PHP suhosin DBMS SQL Proxy Webserver mod_security OS Harding Server Firewall Proxy 12
  • 31. Defense in Depth PHP-application security layer(s) PHP suhosin DBMS SQL Proxy Webserver mod_security OS Harding Server Firewall Proxy 12
  • 32. Did you know? TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 13 shar
  • 33. TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 14 shar
  • 34. TypoScript TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 15 shar
  • 35. page.10 = CONTENT page.10.table = tt_content page.10.where = colPos=0 page.10.andWhere.data = GP:page_id page.10.andWhere.wrap = pid=| 16
  • 36. page.10 = CONTENT page.10.table = tt_content page.10.where = colPos=0 page.10.andWhere.data = GP:page_id page.10.andWhere.intval = 1 page.10.andWhere.wrap = pid=| 17
  • 37. page.10 = TEXT page.10.field = title page.10.wrap = <h1 class="c-{field:layout}">|</h1> page.10.insertData = 1 18
  • 38. page.10 = TEXT page.10.field = title page.10.wrap = <h1 class="c-{field:layout}">|</h1> page.10.insertData = 1 19
  • 39. page.10 = TEXT page.10.field = title page.10.dataWrap = <h1 class="c-{field:layout}">|</h1> 20
  • 40. page.10 = TEXT page.10.field = title page.10.dataWrap = <h1 class="c-{field:layout}">|</h1> page.10.htmlSpecialChars = 1 21
  • 41. page.10 = TEXT page.10.field = title page.10.dataWrap = <h1 class="c-{field:layout}">|</h1> page.10.htmlSpecialChars = 1 22
  • 42. Security Problems TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 23 shar
  • 43. XSS TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 24 shar
  • 44. HTML Contexts HTML-Element HTML-Attribute Value JS-Values URL Parameter TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 25 shar
  • 45. CSRF TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 26 shar
  • 47. Avoid CSRF Secret random token in the request Save token in session One-Time Token may have usability impacts TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 28 shar
  • 48. SQLi TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 29 shar
  • 49. File Handling TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 30 shar
  • 50. Header Injection TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 31 shar
  • 51. Code Injection TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 32 shar
  • 52. Insecure Unserialize TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 33 shar
  • 53. Extbase Security TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 34 shar
  • 54. XSS TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 35 shar
  • 55. extbase XSS Flash Messages Context TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 36 shar
  • 56. SQLi TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 37 shar
  • 57. Mass Assignment TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 38 shar
  • 58. Access Violation TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 39 shar
  • 59. Knowing the enemy TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 40 shar
  • 60. Demo TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 41 shar
  • 61. Best Practice TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 42 shar
  • 62. Best Practice TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 43 shar
  • 63. Best Practice The world is bad™ TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 43 shar
  • 64. Best Practice The world is bad™ Every request is an attack as long the opposite is proven TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 43 shar
  • 65. Best Practice The world is bad™ Every request is an attack as long the opposite is proven User input is untrustable TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 43 shar
  • 66. Best Practice The world is bad™ Every request is an attack as long the opposite is proven User input is untrustable User input needs to be validated and encoded and escaped right before output TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 43 shar
  • 67. Best Practice The world is bad™ Every request is an attack as long the opposite is proven User input is untrustable User input needs to be validated and encoded and escaped right before output Encoding and escaping depends on the context TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 43 shar
  • 68. Best Practice The world is bad™ Every request is an attack as long the opposite is proven User input is untrustable User input needs to be validated and encoded and escaped right before output Encoding and escaping depends on the context Separation of Concerns TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 43 shar
  • 69. What is User Input? TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 44 shar
  • 70. What is User Input? $_REQUEST ($_GET, $_POST, $_COOKIE) TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 44 shar
  • 71. What is User Input? $_REQUEST ($_GET, $_POST, $_COOKIE) $_FILES TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 44 shar
  • 72. What is User Input? $_REQUEST ($_GET, $_POST, $_COOKIE) $_FILES $_SERVER TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 44 shar
  • 73. What is User Input? $_REQUEST ($_GET, $_POST, $_COOKIE) $_FILES $_SERVER Filenames TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 44 shar
  • 74. What is User Input? $_REQUEST ($_GET, $_POST, $_COOKIE) $_FILES $_SERVER Filenames External Services TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 44 shar
  • 75. What is User Input? $_REQUEST ($_GET, $_POST, $_COOKIE) $_FILES $_SERVER Filenames External Services Editors are users TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 44 shar
  • 76. How to treat User Input Validation Filtering Escaping Encoding TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 45 shar
  • 77. How to treat User Input User Input evil™ Validate/ Filter stop execution? Escaping/ Encoding context! Output 46
  • 78. How to treat User Input Filter Input Escape Output TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 47 shar
  • 79. How to treat User Input Filter Input Check Type Check Format Check length Escape Output Context! DB, HTML, JS Directly before output TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 48 shar
  • 80. Separation of Concerns Security issues are bugs Clean code leads to less bugs Test Driven Development Leave Security to Security Code 49
  • 81. TYPO3 Security Team TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 50 shar
  • 82. TYPO3 Security Team TYPO3 Security Team Responsible Disclosure Policy One communication channel (security@typo3.org) Pre-Announcements for critical issues only You can support us with sober and precise communication and reading the Security Bulletins carefully TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 51 shar
  • 83. TYPO3 Security Team CVSS2 Score It is a calculation to help you to identify the severity of a Security Issue The result are 4 different Scores Base Score Temporal Score Environmental Score Overall Score TYPO3 Developer Days - Munich 2012 Inspiring people Security Workshop 52 shar
  • 84. 53
  • 85. 53
  • 86. 53
  • 87. 53
  • 88. 54
  • 89. 54
  • 90. 54
  • 91. 55
  • 92. 55
  • 93. 55
  • 94. 56
  • 96. Thank you! @helhum h.hummel@naw.info 58

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. Apache, OS, PHP\n
  24. Green SQL\n
  25. Green SQL\n
  26. Green SQL\n
  27. Green SQL\n
  28. Green SQL\n
  29. Green SQL\n
  30. Green SQL\n
  31. Green SQL\n
  32. Green SQL\n
  33. Green SQL\n
  34. Green SQL\n
  35. Green SQL\n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. DB : tt_content:234:header\nDB : be_users:1:password\n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. (CASE WHEN (SELECT ASCII(SUBSTRING(password, 1, 1)) FROM be_users where username = 0x61646D696E) = 65 THEN date ELSE title END)\n
  61. \n
  62. edit falsches Feld\n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n