erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

24

Upload: jvandevis

Post on 14-Apr-2017

370 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2
Page 2: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Introduction

Whoami

Page 3: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Topics

- Jamesbond-kind-of-spionage; it’s real- A practical example of a backdoor - SAP Hana security- SAP Security baseline

Page 4: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Not a sexy topic

SAP Security, not allways a sexy topic. But….

Page 5: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

007, Secret service activities

• Corporate espionage

• State-sponsored espionage

• ‘Regular’ Cybercrime

• Political motivated cybercrime

• Backdoors

Page 6: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Jamesbond-kind-of-spionage, it’s real

Page 7: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

It’s China… they say…

Page 8: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

SAP and backdoors?

SAP building backdoors for the NSA. Far fetched? Yes, strongly denied by SAP and in my believe also not true.

But what if there are backdoors SAP or customers are no aware of…. A practical example…

Page 9: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

The challenge:

In order to effectively secure an SAP platform, you need to understand and secure all of its systems, components, infrastructure layers and related vulnerabilities and threats.

To break a SAP platform you only need one flaw/vulnerability!

If you are the good guy, you have to work harder!

But first… The challenge

Page 10: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

A backdoor into SAP; you need one of these 3

So, to fully compromise an SAP system we need at leastone of the following:

• Gain SAP_ALL rights on application layer

• Get access to the Operating system as <sid>adm

• Get access to the Database, in particular the SAP scheme

Getting access to one of the above means you have access to all three.

Page 11: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

A backdoor into SAP…

In this scenario we will combine 3 vulnerabilities:

1. A Default user with default password for Diagnostics purposes

2. A Remote wrapper to execute local function modules remotely without authorization check

3. A Local function module to execute native SQL without authorization check

Business risk: Leads to a full compromise

of your business critical data

1

2

3

Page 12: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Some details on the 3 vulnerabilities

1. Default user with default password for Diagnostics purposes

• User SMDAGENT_<SID> is used by the Wily host agent for gathering diagnostics

• It gets created via the Solution Manager “Managed System Configuration” in solman 7.0

• Exists not only in Solution Manager, but also in backend systems

2. Local function to execute native SQL without authorization check

• Function Module /SDF/RBE_NATSQL_SELECT can be used to execute native SQL

• Lacks authorization check

3. Remote wrapper without authorization check

• Function Module /SDF/GEN_PROXY can be used to execute local Function Modules remotely

• Lacks authorization check

Page 13: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Select password hashes from the database

Brute force privileged SAP accounts

Gain access to the SAP Solution Manager

Demo

Page 14: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Post-exploitation

From there?

• Use (trusted) RFC’s to the world

• Use your imagination

• And take over the world

Try and take over the world!

Page 15: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Mitigation

How to protect?

Change password or delete user SMDAGENT_<SID>

Apply OSS note 1774432 (CVSS score 4.6)

Apply OSS note 1727914 (CVSS score 7.5)

Monitoring / logging

Also see the SAP Whitepaper

https://scn.sap.com/docs/DOC-60424

Page 16: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Something about Hana Security…

0

2

4

6

8

10

12

14

16

18

20112012

20132014

2015

SAP HANA Security notes

With great power comes great responsibility

Page 17: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Running Hana? Better patch…

Page 18: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

SAP Security baseline

SAP Security baseline template

• Helps you when defining a SAP Security baseline

• Contains many settings to check

• Not only on SAP application level, but also includes Database, Operating System, network and frontend level

The baseline can be accessed

on the SAP Support site at

https://support.sap.com/sos

-> Media Library

-> Security Baseline Template.

Page 19: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Concluding

What I hope you learned today:

• SAP Security can be sexy

• Defenders have to work harder

• Don’t forget the systems of the ‘techies’ as the SAP Solution Manager is a critical component when it comes to security

• Patch, patch, patch

• Check the SAP Teched Materials!

• Read and make use of the SAP Security Baseline document

Page 20: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Questions?

Page 21: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Website: www.erp-sec.com

Twitter: @jvis @erpsec

Need more info? Contact us...

Page 22: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

SAP, R/3, ABAP, SAP GUI, SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only.

The authors assume no responsibility for errors or omissions in this document. The authors do not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.

The authors shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of this document.

SAP AG is neither the author nor the publisher of this publication and is not responsible for its content, and SAP Group shall not be liable for errors or omissions with respect to the materials.

No part of this document may be reproduced without the prior written permission of ERP Security BV. © 2013 ERP Security BV.

Disclaimer

Page 23: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2

Thank you!

Page 24: Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2