injection angriffe szenarien analyseans tze gegenma
play

Injection-Angriffe: Szenarien, Analyseanstze, Gegenmanahmen und - PowerPoint PPT Presentation

Injection-Angriffe: Szenarien, Analyseanstze, Gegenmanahmen und Erfahrungen aus der Praxis Dr. Alexander von Rhein Alexander von Rhein Research Software Verification Software-Product-Line Analysis Taint-Analysis Consulting Software


  1. Injection-Angriffe: Szenarien, Analyseansätze, Gegenmaßnahmen und Erfahrungen aus der Praxis Dr. Alexander von Rhein

  2. Alexander von Rhein Research Software Verification Software-Product-Line Analysis Taint-Analysis Consulting Software Development Quality-Assessment & Quality-Controlling      Free for Research & Open Source Projects

  3. Security Threat: System Command Injection source sink rm -rf

  4. Most Common Security Threats in SAP Systems Code execution Cross-client access Directory traversal Database modification Authentication flaws Open SQL injection Injection/leak attacks      

  5. Security Situation in SAP systems 83% Forbes 500 companies use SAP (mainly ERP systems) Customization [Business Risk Illustration, Onapsis]    SAP systems are extended with custom code written in ABAP  In-house, closed-world development

  6. Analysis View – Closed World System Source (Report Parameter) Sinks source   sink  System-Commands  CALL ‘SYSTEM‘ ID ‘COMMAND‘  Directory Traversal  OPEN DATASET  ABAP Program Generation  INSERT REPORT  GENERATE SUBROUTINE POOL  Loop iteration limits  DO input TIMES. … ENDDO.  … 21 pattern in total

  7. ABAP in 1 minute Object, can be Parameter of the report invoked by user Class declaration Class implementation „Main method“ of the report

  8. Analysis View – Closed World System Source (Report Parameter) Sinks source   sink  System-Commands  CALL ‘SYSTEM‘ ID ‘COMMAND‘  Directory Traversal  OPEN DATASET  ABAP Program Generation  INSERT REPORT  GENERATE SUBROUTINE POOL  Loop iteration limits  DO input TIMES. … ENDDO.  … 21 pattern in total

  9. Simple Security Threat Scenario  Data Injection Data Leak SAP ERP Database

  10. Trivial Checks for Deprecated Sinks Local analysis (typically method level) Fast Here: Based on discouraged statements   

  11. Taint-Propagation Analysis z = x + y    z x y z x y = 1, z = 2 to unsecure statements Detailed taint-propagation analysis   Requires much more time and memory  Data-flow analysis  Tracks user input source sink 1 source 2 3 sink

  12. Global inter-procedural taint-propagation analysis Complex data flow Large, active code bases source  1  Crossing method boudaries  Multiple files   Incremental analysis 3 sink 5 4 2

  13. 1659 LOC / 1301 SLOC

  14. Findings im Benchmark Trivial Checks Taint Analysis   12.943 yellow findings  24.555 red findings   7.251 taint-analysis findings  Some methods (2%) had to be ignored (cycles, complexity)

  15. Performance Performance benchmark 3 hours initial analysis time Analysis time for single commit depends on number of „touched“ methods   12.600.000 source lines of code from customers  Some projects use git, so they have actually more code  with 270.000 methods    Typically few seconds

  16. Beyond ABAP ABAP Java, C#, …   Closed world  Client/Server setting  Database and Server-Filesystem are typically trusted  Entropy of identifiers (method names, variable names) is high   No closed-world scenario  Who defines the taint sources and sinks?  More use of high-level programming (inheritance, lambdas, …)  Many similar variable and method names

  17. Code Test Results cmocka Test Results Reviews GCOV Test Coverage Static Analysis Version History Models Issues Code Reviews Coverage Test Analysis Static Models History Version … and many more. Issue Trackers

  18. Models Software Intelligence Code Version History Static Analysis Test Coverage Reviews Issues Test Results

  19. Does our Version Issues Reviews Coverage Test Analysis Static History Code system leak Software Intelligence Models tests? gaps in my Where are data? confidential Test Results

  20. GUI.Base GUI.Dialogs Authentication UI Controls Data Validation

  21. • = Modified & untested • = Added & untested • = Unchanged

  22. Does our Code Issues Reviews Coverage Test Analysis Static History Version Software Intelligence system leak Models used? is actually Which code tests? gaps in my Where are data? confidential Test Results

  23. Does our Models Issues Reviews Coverage Test Analysis Static History Version Code Software Intelligence monopolies? system leak head- Are there used? is actually Which code tests? gaps in my Where are data? confidential Test Results

  24. Einarbeitung abgebrochen Neues Team Knowledge-Transfer

  25. Which Software Intelligence components are most error-prone? Do we discover errors early enough? Models Code monopolies? Version History Static Analysis Test Coverage Reviews Issues Which head- changes code? have not been reviewed? Is our architecture in conformance with the Does our Are there system leak confidential data? Where are gaps in my tests? Which code is actually used? Test Results

  26. www.cqse.eu/de/ressourcen/blog/

  27. Conclusion Static analysis can find many attack scenarios at development time. Security attacks are often injection/leak attacks. (Near) real-time feedback is vital for acceptance. Our solution is incremental analysis. Wanted: Evaluation partners for security analyses (and teamscale in general).

  28. Kontakt Dr. Alexander von Rhein · rhein@cqse.eu · +49 159 04517754 @alexvonrhein www.cqse.eu/en/blog CQSE GmbH Centa-Hafenbrädl-Straße 59 81249 München

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend