SAST für TYPO3 Extensions

Oliver Hader
Oliver HaderM.Sc. at TYPO3, hofhäckerei, inpublica.it
SAST für TYPO3
Extensions


#T3CRR21 #security
Oliver Hader
oliver@typo3.org
@ohader
TYPO3camp RheinRuhr 2021


6. November 2021
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 2
▪Research & Development


▪TYPO3 Security Team Lead


▪50% TYPO3 GmbH / 50% Freelancer


▪#hof #cycling #paramedic #in.die.musik
~# whoami
Oliver Hader
@ohader
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 3
▪Statische Code Analyse #basics


▪Orientierung im Security Bereich #context


▪Verwendung für TYPO3 #nähkästchen


▪MüssteMalJemand™ #zukunft
Agenda
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 4
▪ Bitte, bitte, bitte: Security
Schwachstellen nicht öffentlich
einstellen/diskutieren


▪ nicht auf GitHub/Forge


▪ nicht in Slack Channels


▪ nicht auf Twitter, Twitch, ...


▪ Meldung an security@typo3.org


▪ Security Team unterstützt Community
Trigger Warning
⚠︎
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
#basics


Statische Code


Analyse
5
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 6
Statische Code Analyse - Schematischer Ablauf
Statische Code Analyse
https://www.grammatech.com/products/source-code-analysis
Abstract Syntax Tree (AST)
▪ Abstract Syntax Tree (AST)


▪ Composer Package


nikic/php-parser
7
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
Abstract Syntax Tree (AST)
▪ Abstract Syntax Tree (AST)


▪ Composer Package


nikic/php-parser
8
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
Statische Code Analyse in PHP
▪ basierend auf


Abstract Syntax Tree (AST)


▪ Extension Scanner in TYPO3


▪ PhpStan - Core CI Builds


▪ Rector - TYPO3 Code Upgrade


▪ Psalm - Security Taint Graph
9
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
#context


Orientierung im


Security Bereich
10
Ebenenmodell zur Sicherheitskonzeption (BSI)
11
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
https://www.bsi.bund.de/DE/Themen/Unternehmen-und-Organisationen/Informationen-und-Empfehlungen/Empfehlungen-nach-Angriffszielen/Webanwendungen/webanwendungen_node.html
Auf Grundlage eines Ebenenmodells lassen sich die Zuständigkeiten der relevanten
Organisationsbereiche den einzelnen Teilaufgaben bei Sicherheitskonzeption und
Realisierung von Webanwendungen zuordnen. Ausgangspunkt ist eine Unterteilung
in 5 Ebenen:
Abbildung 1: Ebenenmodell
Ebene Inhalt (Beispiele)
5 Semantik Schutz vor Täuschung und Betrug
- Informationen ermöglichen Social Engineering-Angriffe
- Gebrauch von Popups u.ä. erleichtern Phishing-Angriffe
- Keine Absicherung für den Fall der Fälschung der Web­
site
4 Logik Absicherung von Prozessen und Workflows als Ganzes
- Verwendung unsicherer Email in einem ansonsten gesi­
cherten Workflow
- Angreifbarkeit des Passworts durch nachlässig gestaltete
"Passwort vergessen"-Funktion
- Die Verwendung sicherer Passworte wird nicht erzwun­
gen
3 Implementie­
rung
Vermeiden von Programmierfehlern, die zu Schwachstellen
führen
- Cross-Site Scripting
- SQL-Injection
- Session Riding
2 Technologie Richtige Wahl und sicherer Einsatz von Technologie
- unverschlüsselte Übertragung sensitiver Daten
- Authentisierungsverfahren, die nicht dem Schutzbedarf
angemessen sind
- Ungenügende Randomness von Token
1 System Absicherung der auf der Systemplattform eingesetzten
Software
- Fehler in der Konfiguration des Webservers
- "Known Vulnerabilities" in den eingesetzten Software­
produkten
- Mangelnder Zugriffsschutz in der Datenbank
0 Netzwerk &
Host
Absicherung von Host und Netzwerk
Sicherheit von Webanwendungen
Maßnahmenkatalog und Best Practices
Im Auftrag des
Bundesamtes für Sicherheit
in der Informationstechnik
erstellt von:
Version 1, August 2006
SAST


#bugs
#infrastructure
#workflows
#phishing
#SocialEngineering
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
Marktanalyse - Statische Code Analyse für TYPO3
12
▪ SonarSource, SonarCloud, SonarCube


▪ RIPS Tech Scanner


▪ DeepCode.ai


▪ PsalmPHP
https://github.com/ohader/sast-demo
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 13
Demo Anwendung (vereinfacht)
https://github.com/ohader/sast-demo
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 14
Demo Anwendung (vereinfacht)
https://github.com/ohader/sast-demo
SQLi
Benutzereingaben
XSS
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 15
SonarCloud (SonarSource) → „Alles supi!“ #nicht
SonarCloud
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 16
RIPS Tech Scanner → übernommen von SonarSource
RIPS Tech Scanner
UNRELATED!


ganz anderes Projekt
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 17
DeepCode.ai → übernommen von Snyk.io → Schwachstellen gefunden
DeepCode.ai / Snyk.io
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 18
PsalmPHP (https://psalm.dev/r/159771bec7) → Schwachstellen gefunden
PsalmPHP
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
Marktanalyse - Statische Code Analyse für TYPO3
19
▪ SonarSource, SonarCloud, SonarCube - nichts gefunden 😵


▪ RIPS Tech Scanner - Schwachstellen vermutlich gefunden 🙄


▪ im Mai 2020 von SonarSource übernommen


▪ DeepCode.ai - Schwachstellen gefunden 😅


▪ im August 2020 von Snyk.io übernommen


▪ PsalmPHP - Schwachstellen gefunden 😅
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 20
Demo Anwendung (realistischer)
https://github.com/ohader/sast-demo
Demo Anwendung (realistischer)
▪ TYPO3 ist speziell!


▪ fehlende Unterstützung für


Framework Komponenten


▪ PSR: Request/Response


▪ PSR: Dependency Injection


▪ Fluid: Templating Engine


▪ DBAL: Datenbank Schicht


▪ TYPO3: Hooks, TypoScript
21
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
SQLi
Injection
XSS
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
#nähkästchen


Verwendung für
TYPO3
22
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
SAST für TYPO3 mit PsalmPHP
23
▪ PsalmPHP für TYPO3


▪ Open-Source Project (MIT)


▪ Implementiert in PHP


▪ Erweiterbar durch Plugins


▪ unterstützt sources, sinks,


escapes, unescapes, flow
https://github.com/vimeo/psalm
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 24
PsalmPHP Stubs
▪ @template


▪ liefert Instanz


von $className
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 25
PsalmPHP Stubs
▪ @psalm-taint-source


▪ Rückgabewerte sind


Benutzereingaben


▪ wie $_GET, $_POST,
$_COOKIE, HTTP Header
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 26
PsalmPHP Stubs
▪ @psalm-taint-sink


▪ verwundbar in Aspekt sql,
wenn Parameter $query
aus unsicherer


@psalm-taint-source
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 27
PsalmPHP Stubs
▪ @psalm-taint-escape


▪ markiert Parameter $str für
Aspekt sql als bereinigt


▪ @psalm-taint-unescape


▪ … das Gegenteil (unsicher)
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 28
typo3-security/psalm-plugin - nicht öffentlich
TYPO3 Plugin für PsalmPHP
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 29
Kompakte Ausgabe
Demo TYPO3 Psalm-Runner
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 30
Ausführlichere Ausgabe
Demo TYPO3 Psalm-Runner
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 31
SARIF Export & GitHub Integration
Demo TYPO3 Psalm-Runner
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 32
SARIF Export & GitHub Integration
Demo TYPO3 Psalm-Runner
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 33
SARIF Export & GitHub Integration
Demo TYPO3 Psalm-Runner
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
#zukunft


MüssteMalJemand™
34
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
Nächste Schritte
35
▪ Erweiterung der Stub-Deklarationen (Hooks, Fluid, TypoScript)


▪ Erweiterung für bekannte/bereinigte Verwundbarkeiten


▪ Infrastruktur & Queue für regelmäßige Extension Scans


▪ Freigabe für (echte) Extension Maintainer & Integration in TER


▪ (mögliche Fundstellen müssen natürlich auch bereinigt werden)
TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
Nächste Schritte
36
▪ TYPO3 Psalm-Plugin & Psalm-Runner vorerst nicht öffentlich


▪ evtl. Public-Beta über Verified Extensions (@VolkerGraubaum)


▪ Entwicklung wird durch TYPO3 Association finanziert


▪ Interessierte/Supporter bitte unter security@typo3.org melden
thanks!


questions?
37
1 of 37

Recommended

Hacking TYPO3 v9 by
Hacking TYPO3 v9Hacking TYPO3 v9
Hacking TYPO3 v9Oliver Hader
1.5K views30 slides
Hacking TYPO3 v9 (T3DD19 edition) by
Hacking TYPO3 v9 (T3DD19 edition)Hacking TYPO3 v9 (T3DD19 edition)
Hacking TYPO3 v9 (T3DD19 edition)Oliver Hader
2.1K views53 slides
Web Application Security Workshop (T3DD19) by
Web Application Security Workshop (T3DD19)Web Application Security Workshop (T3DD19)
Web Application Security Workshop (T3DD19)Oliver Hader
2.4K views91 slides
H4CK1N6 - Web Application Security by
H4CK1N6 - Web Application SecurityH4CK1N6 - Web Application Security
H4CK1N6 - Web Application SecurityOliver Hader
2.1K views52 slides
TYPO3 Backstage Development by
TYPO3 Backstage DevelopmentTYPO3 Backstage Development
TYPO3 Backstage DevelopmentOliver Hader
939 views29 slides
TYPO3 Event Sourcing by
TYPO3 Event SourcingTYPO3 Event Sourcing
TYPO3 Event SourcingOliver Hader
1.4K views43 slides

More Related Content

What's hot

Testing iOS apps without jailbreak in 2018 by
Testing iOS apps without jailbreak in 2018Testing iOS apps without jailbreak in 2018
Testing iOS apps without jailbreak in 2018SecuRing
3.9K views73 slides
CMS Hacking Tricks - DerbyCon 4 - 2014 by
CMS Hacking Tricks - DerbyCon 4 - 2014CMS Hacking Tricks - DerbyCon 4 - 2014
CMS Hacking Tricks - DerbyCon 4 - 2014Greg Foss
2.5K views67 slides
Paolo Passeri - A Multi Layered Approach to Threat Intelligence by
Paolo Passeri - A Multi Layered Approach to Threat IntelligencePaolo Passeri - A Multi Layered Approach to Threat Intelligence
Paolo Passeri - A Multi Layered Approach to Threat IntelligenceCodemotion
521 views30 slides
Building & Hacking Modern iOS Apps by
Building & Hacking Modern iOS AppsBuilding & Hacking Modern iOS Apps
Building & Hacking Modern iOS AppsSecuRing
656 views66 slides
Internet of Terrible: Can you hear me meow? by
Internet of Terrible: Can you hear me meow?Internet of Terrible: Can you hear me meow?
Internet of Terrible: Can you hear me meow?Brandon McCrillis
190 views71 slides
TRITON: The Next Generation of ICS Malware by
TRITON: The Next Generation of ICS MalwareTRITON: The Next Generation of ICS Malware
TRITON: The Next Generation of ICS MalwareThomas Roccia
1.6K views31 slides

What's hot(14)

Testing iOS apps without jailbreak in 2018 by SecuRing
Testing iOS apps without jailbreak in 2018Testing iOS apps without jailbreak in 2018
Testing iOS apps without jailbreak in 2018
SecuRing3.9K views
CMS Hacking Tricks - DerbyCon 4 - 2014 by Greg Foss
CMS Hacking Tricks - DerbyCon 4 - 2014CMS Hacking Tricks - DerbyCon 4 - 2014
CMS Hacking Tricks - DerbyCon 4 - 2014
Greg Foss2.5K views
Paolo Passeri - A Multi Layered Approach to Threat Intelligence by Codemotion
Paolo Passeri - A Multi Layered Approach to Threat IntelligencePaolo Passeri - A Multi Layered Approach to Threat Intelligence
Paolo Passeri - A Multi Layered Approach to Threat Intelligence
Codemotion521 views
Building & Hacking Modern iOS Apps by SecuRing
Building & Hacking Modern iOS AppsBuilding & Hacking Modern iOS Apps
Building & Hacking Modern iOS Apps
SecuRing656 views
Internet of Terrible: Can you hear me meow? by Brandon McCrillis
Internet of Terrible: Can you hear me meow?Internet of Terrible: Can you hear me meow?
Internet of Terrible: Can you hear me meow?
Brandon McCrillis190 views
TRITON: The Next Generation of ICS Malware by Thomas Roccia
TRITON: The Next Generation of ICS MalwareTRITON: The Next Generation of ICS Malware
TRITON: The Next Generation of ICS Malware
Thomas Roccia1.6K views
Building&Hacking modern iOS apps by SecuRing
Building&Hacking modern iOS appsBuilding&Hacking modern iOS apps
Building&Hacking modern iOS apps
SecuRing2K views
Mobile Penetration Testing: Episode 1 - The Forensic Menace by NowSecure
Mobile Penetration Testing: Episode 1 - The Forensic MenaceMobile Penetration Testing: Episode 1 - The Forensic Menace
Mobile Penetration Testing: Episode 1 - The Forensic Menace
NowSecure2.2K views
REST API Pentester's perspective by SecuRing
REST API Pentester's perspectiveREST API Pentester's perspective
REST API Pentester's perspective
SecuRing4.7K views
Magento Security Best Practises - MM17DE by Anna Völkl
Magento Security Best Practises - MM17DEMagento Security Best Practises - MM17DE
Magento Security Best Practises - MM17DE
Anna Völkl1.9K views
Deception Driven Defense - Infragard 2016 by Greg Foss
Deception Driven Defense - Infragard 2016Deception Driven Defense - Infragard 2016
Deception Driven Defense - Infragard 2016
Greg Foss932 views

Similar to SAST für TYPO3 Extensions

T3DD23 Content Security Policy - Concept, Strategies & Pitfalls by
T3DD23 Content Security Policy - Concept, Strategies & PitfallsT3DD23 Content Security Policy - Concept, Strategies & Pitfalls
T3DD23 Content Security Policy - Concept, Strategies & PitfallsOliver Hader
94 views48 slides
Top 10 most interesting vulnerabilities and attacks in SAP by
Top 10 most interesting vulnerabilities and attacks in SAPTop 10 most interesting vulnerabilities and attacks in SAP
Top 10 most interesting vulnerabilities and attacks in SAPERPScan
929 views58 slides
Beyond Web Interfaces by
Beyond Web InterfacesBeyond Web Interfaces
Beyond Web Interfacesciacchi
324 views38 slides
Architecting next generation big data platform by
Architecting next generation big data platformArchitecting next generation big data platform
Architecting next generation big data platformhadooparchbook
1.8K views163 slides
PyCon Canada 2015 - Is your python application secure by
PyCon Canada 2015 - Is your python application securePyCon Canada 2015 - Is your python application secure
PyCon Canada 2015 - Is your python application secureIMMUNIO
286 views43 slides
MLSEC 2020 by
MLSEC 2020MLSEC 2020
MLSEC 2020Zoltan Balazs
15 views24 slides

Similar to SAST für TYPO3 Extensions(20)

T3DD23 Content Security Policy - Concept, Strategies & Pitfalls by Oliver Hader
T3DD23 Content Security Policy - Concept, Strategies & PitfallsT3DD23 Content Security Policy - Concept, Strategies & Pitfalls
T3DD23 Content Security Policy - Concept, Strategies & Pitfalls
Oliver Hader94 views
Top 10 most interesting vulnerabilities and attacks in SAP by ERPScan
Top 10 most interesting vulnerabilities and attacks in SAPTop 10 most interesting vulnerabilities and attacks in SAP
Top 10 most interesting vulnerabilities and attacks in SAP
ERPScan929 views
Beyond Web Interfaces by ciacchi
Beyond Web InterfacesBeyond Web Interfaces
Beyond Web Interfaces
ciacchi324 views
Architecting next generation big data platform by hadooparchbook
Architecting next generation big data platformArchitecting next generation big data platform
Architecting next generation big data platform
hadooparchbook1.8K views
PyCon Canada 2015 - Is your python application secure by IMMUNIO
PyCon Canada 2015 - Is your python application securePyCon Canada 2015 - Is your python application secure
PyCon Canada 2015 - Is your python application secure
IMMUNIO286 views
RIoT (Raiding Internet of Things) by Jacob Holcomb by Priyanka Aash
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
Priyanka Aash1.1K views
Is your python application secure? - PyCon Canada - 2015-11-07 by Frédéric Harper
Is your python application secure? - PyCon Canada - 2015-11-07Is your python application secure? - PyCon Canada - 2015-11-07
Is your python application secure? - PyCon Canada - 2015-11-07
Frédéric Harper827 views
Practical SAP pentesting workshop (NullCon Goa) by ERPScan
Practical SAP pentesting workshop (NullCon Goa)Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting workshop (NullCon Goa)
ERPScan1.9K views
Spark + AI Summit 2019: Apache Spark Listeners: A Crash Course in Fast, Easy ... by Landon Robinson
Spark + AI Summit 2019: Apache Spark Listeners: A Crash Course in Fast, Easy ...Spark + AI Summit 2019: Apache Spark Listeners: A Crash Course in Fast, Easy ...
Spark + AI Summit 2019: Apache Spark Listeners: A Crash Course in Fast, Easy ...
Landon Robinson140 views
Automotive Cybersecurity: Test Like a Hacker by ForAllSecure
Automotive Cybersecurity: Test Like a HackerAutomotive Cybersecurity: Test Like a Hacker
Automotive Cybersecurity: Test Like a Hacker
ForAllSecure89 views
HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試 by Secview
HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試
HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試
Secview1.4K views
Practical SAP pentesting (B-Sides San Paulo) by ERPScan
Practical SAP pentesting (B-Sides San Paulo)Practical SAP pentesting (B-Sides San Paulo)
Practical SAP pentesting (B-Sides San Paulo)
ERPScan2.5K views
Apache Spark Listeners: A Crash Course in Fast, Easy Monitoring by Databricks
Apache Spark Listeners: A Crash Course in Fast, Easy MonitoringApache Spark Listeners: A Crash Course in Fast, Easy Monitoring
Apache Spark Listeners: A Crash Course in Fast, Easy Monitoring
Databricks3.5K views
Architecture vulnerabilities in SAP platforms by ERPScan
Architecture vulnerabilities in SAP platformsArchitecture vulnerabilities in SAP platforms
Architecture vulnerabilities in SAP platforms
ERPScan526 views
SAP Forensics Detecting White Collar Cyber-crime by Onapsis Inc.
SAP Forensics Detecting White Collar Cyber-crimeSAP Forensics Detecting White Collar Cyber-crime
SAP Forensics Detecting White Collar Cyber-crime
Onapsis Inc. 854 views
Serverless survival kit by Steve Houël
Serverless survival kitServerless survival kit
Serverless survival kit
Steve Houël56 views

More from Oliver Hader

TYPO3camp Munich 2018 - Keynote - "Wo woll'n mer denn hin?" by
TYPO3camp Munich 2018 - Keynote - "Wo woll'n mer denn hin?"TYPO3camp Munich 2018 - Keynote - "Wo woll'n mer denn hin?"
TYPO3camp Munich 2018 - Keynote - "Wo woll'n mer denn hin?"Oliver Hader
555 views54 slides
TYPO3 CMS - Datenmodifikation & Event Sourcing (Masterarbeit) by
TYPO3 CMS - Datenmodifikation & Event Sourcing (Masterarbeit)TYPO3 CMS - Datenmodifikation & Event Sourcing (Masterarbeit)
TYPO3 CMS - Datenmodifikation & Event Sourcing (Masterarbeit)Oliver Hader
2.4K views100 slides
Vor- und Nachteile von Web Components mit Polymer gegenüber AngularJS ohne P... by
Vor- und Nachteile von Web Components mit Polymer gegenüber AngularJS ohne P...Vor- und Nachteile von Web Components mit Polymer gegenüber AngularJS ohne P...
Vor- und Nachteile von Web Components mit Polymer gegenüber AngularJS ohne P...Oliver Hader
1.8K views10 slides
WebGL - 3D im Browser - Erfahrungsbericht mit BabylonJS by
WebGL - 3D im Browser - Erfahrungsbericht mit BabylonJSWebGL - 3D im Browser - Erfahrungsbericht mit BabylonJS
WebGL - 3D im Browser - Erfahrungsbericht mit BabylonJSOliver Hader
2.8K views23 slides
Web Components by
Web ComponentsWeb Components
Web ComponentsOliver Hader
1.3K views18 slides
Web application security by
Web application securityWeb application security
Web application securityOliver Hader
1.4K views7 slides

More from Oliver Hader(11)

TYPO3camp Munich 2018 - Keynote - "Wo woll'n mer denn hin?" by Oliver Hader
TYPO3camp Munich 2018 - Keynote - "Wo woll'n mer denn hin?"TYPO3camp Munich 2018 - Keynote - "Wo woll'n mer denn hin?"
TYPO3camp Munich 2018 - Keynote - "Wo woll'n mer denn hin?"
Oliver Hader555 views
TYPO3 CMS - Datenmodifikation & Event Sourcing (Masterarbeit) by Oliver Hader
TYPO3 CMS - Datenmodifikation & Event Sourcing (Masterarbeit)TYPO3 CMS - Datenmodifikation & Event Sourcing (Masterarbeit)
TYPO3 CMS - Datenmodifikation & Event Sourcing (Masterarbeit)
Oliver Hader2.4K views
Vor- und Nachteile von Web Components mit Polymer gegenüber AngularJS ohne P... by Oliver Hader
Vor- und Nachteile von Web Components mit Polymer gegenüber AngularJS ohne P...Vor- und Nachteile von Web Components mit Polymer gegenüber AngularJS ohne P...
Vor- und Nachteile von Web Components mit Polymer gegenüber AngularJS ohne P...
Oliver Hader1.8K views
WebGL - 3D im Browser - Erfahrungsbericht mit BabylonJS by Oliver Hader
WebGL - 3D im Browser - Erfahrungsbericht mit BabylonJSWebGL - 3D im Browser - Erfahrungsbericht mit BabylonJS
WebGL - 3D im Browser - Erfahrungsbericht mit BabylonJS
Oliver Hader2.8K views
Web application security by Oliver Hader
Web application securityWeb application security
Web application security
Oliver Hader1.4K views
Contribute to TYPO3 CMS by Oliver Hader
Contribute to TYPO3 CMSContribute to TYPO3 CMS
Contribute to TYPO3 CMS
Oliver Hader1.3K views
T3CON13DE - TYPO3 CMS Team by Oliver Hader
T3CON13DE - TYPO3 CMS TeamT3CON13DE - TYPO3 CMS Team
T3CON13DE - TYPO3 CMS Team
Oliver Hader795 views
TYPO3camp Regensburg: TYPO3 6.0 by Oliver Hader
TYPO3camp Regensburg: TYPO3 6.0TYPO3camp Regensburg: TYPO3 6.0
TYPO3camp Regensburg: TYPO3 6.0
Oliver Hader742 views
TYPO3 Inline Relational Record Editing (IRRE) by Oliver Hader
TYPO3 Inline Relational Record Editing (IRRE)TYPO3 Inline Relational Record Editing (IRRE)
TYPO3 Inline Relational Record Editing (IRRE)
Oliver Hader3.3K views
TYPO3 4.6 & TYPO3 4.7 by Oliver Hader
TYPO3 4.6 & TYPO3 4.7TYPO3 4.6 & TYPO3 4.7
TYPO3 4.6 & TYPO3 4.7
Oliver Hader1.3K views

Recently uploaded

State of the Union - Rohit Yadav - Apache CloudStack by
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
218 views53 slides
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc
130 views29 slides
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveNetwork Automation Forum
49 views35 slides
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueShapeBlue
63 views15 slides
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...ShapeBlue
120 views62 slides
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...ShapeBlue
86 views25 slides

Recently uploaded(20)

State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue218 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc130 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue63 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue120 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue86 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue75 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue74 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker50 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue93 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu287 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty54 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE67 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
Precisely76 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue81 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue121 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue154 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue56 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue113 views

SAST für TYPO3 Extensions

  • 1. SAST für TYPO3 Extensions 
 #T3CRR21 #security Oliver Hader oliver@typo3.org @ohader TYPO3camp RheinRuhr 2021 6. November 2021
  • 2. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 2 ▪Research & Development ▪TYPO3 Security Team Lead ▪50% TYPO3 GmbH / 50% Freelancer ▪#hof #cycling #paramedic #in.die.musik ~# whoami Oliver Hader @ohader
  • 3. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 3 ▪Statische Code Analyse #basics ▪Orientierung im Security Bereich #context ▪Verwendung für TYPO3 #nähkästchen ▪MüssteMalJemand™ #zukunft Agenda
  • 4. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 4 ▪ Bitte, bitte, bitte: Security Schwachstellen nicht öffentlich einstellen/diskutieren ▪ nicht auf GitHub/Forge ▪ nicht in Slack Channels ▪ nicht auf Twitter, Twitch, ... ▪ Meldung an security@typo3.org ▪ Security Team unterstützt Community Trigger Warning ⚠︎
  • 5. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org #basics Statische Code 
 Analyse 5
  • 6. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 6 Statische Code Analyse - Schematischer Ablauf Statische Code Analyse https://www.grammatech.com/products/source-code-analysis
  • 7. Abstract Syntax Tree (AST) ▪ Abstract Syntax Tree (AST) ▪ Composer Package 
 nikic/php-parser 7 TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
  • 8. Abstract Syntax Tree (AST) ▪ Abstract Syntax Tree (AST) ▪ Composer Package 
 nikic/php-parser 8 TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
  • 9. Statische Code Analyse in PHP ▪ basierend auf 
 Abstract Syntax Tree (AST) ▪ Extension Scanner in TYPO3 ▪ PhpStan - Core CI Builds ▪ Rector - TYPO3 Code Upgrade ▪ Psalm - Security Taint Graph 9 TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org
  • 10. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org #context 
 Orientierung im 
 Security Bereich 10
  • 11. Ebenenmodell zur Sicherheitskonzeption (BSI) 11 TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org https://www.bsi.bund.de/DE/Themen/Unternehmen-und-Organisationen/Informationen-und-Empfehlungen/Empfehlungen-nach-Angriffszielen/Webanwendungen/webanwendungen_node.html Auf Grundlage eines Ebenenmodells lassen sich die Zuständigkeiten der relevanten Organisationsbereiche den einzelnen Teilaufgaben bei Sicherheitskonzeption und Realisierung von Webanwendungen zuordnen. Ausgangspunkt ist eine Unterteilung in 5 Ebenen: Abbildung 1: Ebenenmodell Ebene Inhalt (Beispiele) 5 Semantik Schutz vor Täuschung und Betrug - Informationen ermöglichen Social Engineering-Angriffe - Gebrauch von Popups u.ä. erleichtern Phishing-Angriffe - Keine Absicherung für den Fall der Fälschung der Web­ site 4 Logik Absicherung von Prozessen und Workflows als Ganzes - Verwendung unsicherer Email in einem ansonsten gesi­ cherten Workflow - Angreifbarkeit des Passworts durch nachlässig gestaltete "Passwort vergessen"-Funktion - Die Verwendung sicherer Passworte wird nicht erzwun­ gen 3 Implementie­ rung Vermeiden von Programmierfehlern, die zu Schwachstellen führen - Cross-Site Scripting - SQL-Injection - Session Riding 2 Technologie Richtige Wahl und sicherer Einsatz von Technologie - unverschlüsselte Übertragung sensitiver Daten - Authentisierungsverfahren, die nicht dem Schutzbedarf angemessen sind - Ungenügende Randomness von Token 1 System Absicherung der auf der Systemplattform eingesetzten Software - Fehler in der Konfiguration des Webservers - "Known Vulnerabilities" in den eingesetzten Software­ produkten - Mangelnder Zugriffsschutz in der Datenbank 0 Netzwerk & Host Absicherung von Host und Netzwerk Sicherheit von Webanwendungen Maßnahmenkatalog und Best Practices Im Auftrag des Bundesamtes für Sicherheit in der Informationstechnik erstellt von: Version 1, August 2006 SAST #bugs #infrastructure #workflows #phishing #SocialEngineering
  • 12. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org Marktanalyse - Statische Code Analyse für TYPO3 12 ▪ SonarSource, SonarCloud, SonarCube ▪ RIPS Tech Scanner ▪ DeepCode.ai ▪ PsalmPHP https://github.com/ohader/sast-demo
  • 13. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 13 Demo Anwendung (vereinfacht) https://github.com/ohader/sast-demo
  • 14. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 14 Demo Anwendung (vereinfacht) https://github.com/ohader/sast-demo SQLi Benutzereingaben XSS
  • 15. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 15 SonarCloud (SonarSource) → „Alles supi!“ #nicht SonarCloud
  • 16. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 16 RIPS Tech Scanner → übernommen von SonarSource RIPS Tech Scanner UNRELATED! 
 ganz anderes Projekt
  • 17. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 17 DeepCode.ai → übernommen von Snyk.io → Schwachstellen gefunden DeepCode.ai / Snyk.io
  • 18. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 18 PsalmPHP (https://psalm.dev/r/159771bec7) → Schwachstellen gefunden PsalmPHP
  • 19. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org Marktanalyse - Statische Code Analyse für TYPO3 19 ▪ SonarSource, SonarCloud, SonarCube - nichts gefunden 😵 ▪ RIPS Tech Scanner - Schwachstellen vermutlich gefunden 🙄 ▪ im Mai 2020 von SonarSource übernommen ▪ DeepCode.ai - Schwachstellen gefunden 😅 ▪ im August 2020 von Snyk.io übernommen ▪ PsalmPHP - Schwachstellen gefunden 😅
  • 20. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 20 Demo Anwendung (realistischer) https://github.com/ohader/sast-demo
  • 21. Demo Anwendung (realistischer) ▪ TYPO3 ist speziell! ▪ fehlende Unterstützung für 
 Framework Komponenten ▪ PSR: Request/Response ▪ PSR: Dependency Injection ▪ Fluid: Templating Engine ▪ DBAL: Datenbank Schicht ▪ TYPO3: Hooks, TypoScript 21 TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org SQLi Injection XSS
  • 22. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org #nähkästchen 
 Verwendung für TYPO3 22
  • 23. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org SAST für TYPO3 mit PsalmPHP 23 ▪ PsalmPHP für TYPO3 ▪ Open-Source Project (MIT) ▪ Implementiert in PHP ▪ Erweiterbar durch Plugins ▪ unterstützt sources, sinks, 
 escapes, unescapes, flow https://github.com/vimeo/psalm
  • 24. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 24 PsalmPHP Stubs ▪ @template ▪ liefert Instanz 
 von $className
  • 25. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 25 PsalmPHP Stubs ▪ @psalm-taint-source ▪ Rückgabewerte sind 
 Benutzereingaben ▪ wie $_GET, $_POST, $_COOKIE, HTTP Header
  • 26. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 26 PsalmPHP Stubs ▪ @psalm-taint-sink ▪ verwundbar in Aspekt sql, wenn Parameter $query aus unsicherer 
 @psalm-taint-source
  • 27. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 27 PsalmPHP Stubs ▪ @psalm-taint-escape ▪ markiert Parameter $str für Aspekt sql als bereinigt ▪ @psalm-taint-unescape ▪ … das Gegenteil (unsicher)
  • 28. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 28 typo3-security/psalm-plugin - nicht öffentlich TYPO3 Plugin für PsalmPHP
  • 29. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 29 Kompakte Ausgabe Demo TYPO3 Psalm-Runner
  • 30. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 30 Ausführlichere Ausgabe Demo TYPO3 Psalm-Runner
  • 31. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 31 SARIF Export & GitHub Integration Demo TYPO3 Psalm-Runner
  • 32. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 32 SARIF Export & GitHub Integration Demo TYPO3 Psalm-Runner
  • 33. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org 33 SARIF Export & GitHub Integration Demo TYPO3 Psalm-Runner
  • 34. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org #zukunft 
 MüssteMalJemand™ 34
  • 35. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org Nächste Schritte 35 ▪ Erweiterung der Stub-Deklarationen (Hooks, Fluid, TypoScript) ▪ Erweiterung für bekannte/bereinigte Verwundbarkeiten ▪ Infrastruktur & Queue für regelmäßige Extension Scans ▪ Freigabe für (echte) Extension Maintainer & Integration in TER ▪ (mögliche Fundstellen müssen natürlich auch bereinigt werden)
  • 36. TYPO3camp RheinRuhr 2021 - SAST für TYPO3 Extensions - oliver.hader@typo3.org Nächste Schritte 36 ▪ TYPO3 Psalm-Plugin & Psalm-Runner vorerst nicht öffentlich ▪ evtl. Public-Beta über Verified Extensions (@VolkerGraubaum) ▪ Entwicklung wird durch TYPO3 Association finanziert ▪ Interessierte/Supporter bitte unter security@typo3.org melden