SAP Security In-Depth

Similar documents
Attacks to SAP. Web Applications Your crown jewels online. Mariano Nuñez Di Croce. DeepSec, Austria. November 18th,

Inception of the SAP Platform's Brain Attacks on SAP Solution Manager

SAP Security. BIZEC APP/11 Version 2.0 BIZEC TEC/11 Version 2.0

Attacks based on security configurations

Layer Seven Security ADVISORY

Preventing vulnerabilities in HANAbased MARCH TROOPERS SECURITY CONFERENCE

Layer Seven Security ADVISORY. SAP Security Notes

Layer Seven Security ADVISORY

Mobile Trends And The New Threats Is Your SAP System Vulnerable to Cyber Attacks? Stephen Lamy, Virtual Forge

Layer Seven Security ADVISORY

Layer Seven Security ADVISORY

Identity Provider for SAP Single Sign-On and SAP Identity Management

Layer Seven Security ADVISORY

Layer Seven Security ADVISORY

Layer Seven Security ADVISORY

You ve got mail Owning an SAP running business via

Layer Seven Security ADVISORY

Rootkits and Trojans on Your SAP Landscape

Layer Seven Security ADVISORY

Layer Seven Security ADVISORY

Layer Seven Security ADVISORY

Layer Seven Security ADVISORY

Specialized Security Services, Inc. REDUCE RISK WITH CONFIDENCE. s3security.com

01/02/2014 SECURITY ASSESSMENT METHODOLOGIES SENSEPOST 2014 ALL RIGHTS RESERVED

Layer Seven Security ADVISORY

Next Generation Privilege Identity Management

Secure coding practices

Layer Seven Security ADVISORY

10 FOCUS AREAS FOR BREACH PREVENTION

CREATION AND CONFIGURATION OF WEB SERVICE FROM RFC AND DEPLOYMENT IN ANOTHER SYSTEM

SAP Policy Management, group insurance add-on 1.1

Secure Application Development. OWASP September 28, The OWASP Foundation

SAP Security in a Hybrid World. Kiran Kola

Kenna Platform Security. A technical overview of the comprehensive security measures Kenna uses to protect your data

Ethical Hacking and Countermeasures: Web Applications, Second Edition. Chapter 3 Web Application Vulnerabilities

Solutions Business Manager Web Application Security Assessment

A (sample) computerized system for publishing the daily currency exchange rates

Onapsis: The CISO Imperative Taking Control of SAP

Exploiting new default accounts in SAP systems

About the company. What we do? Cybersecurity solutions adapted to protect enterprise business applications (SAP & Oracle).

Introduction. The Safe-T Solution

RiskSense Attack Surface Validation for IoT Systems

C1: Define Security Requirements

ADM960. SAP NetWeaver Application Server Security COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day

RiskSense Attack Surface Validation for Web Applications

Automating the Top 20 CIS Critical Security Controls

ADM960. SAP NetWeaver Application Server Security COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

Oracle Payment Interface Token Proxy Service Security Guide Release 6.1 E November 2017

the SWIFT Customer Security

AppSpider Enterprise. Getting Started Guide

Oracle Database Vault with Oracle Database 12c ORACLE WHITE PAPER MAY 2015

SAP Audit Guide for Basis

CyberArk Privileged Threat Analytics

Integrigy Consulting Overview

HP 2012 Cyber Security Risk Report Overview

The SANS Institute Top 20 Critical Security Controls. Compliance Guide

Single Sign-on For SAP NetWeaver Mobile PDA Client

Vulnerabilities in online banking applications

EP200. SAP NetWeaver Portal: System Administration COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

Processed on SAP Solution Manager SSM Service Center Release EHP 1 for Solution Manager 7.0 Telephone Service Tool 701_2010_1 SP8 Fax

Securing Privileged Access and the SWIFT Customer Security Controls Framework (CSCF)

DIGIPASS Authentication for Microsoft ISA 2006 Single Sign-On for Sharepoint 2007

CA Single Sign-On and LDAP/AD integration

5 OAuth Essentials for API Access Control

Oracle Database Vault

Securing Apache Tomcat. AppSec DC November The OWASP Foundation

SOLUTION BRIEF. Enabling and Securing Digital Business in API Economy. Protect APIs Serving Business Critical Applications

Access Control 5.3 Implementation Considerations for Superuser Privilege Management ID-Based Firefighting versus Role-Based Firefighting Applies to:

SOLUTION BRIEF FPO. Imperva Simplifies and Automates PCI DSS Compliance

DreamFactory Security Guide

Protect Your Organization from Cyber Attacks

Quality Inspection Engine (QIE) Security Guide

IBM Secure Proxy. Advanced edge security for your multienterprise. Secure your network at the edge. Highlights

Application and Data Security with F5 BIG-IP ASM and Oracle Database Firewall

Information Security Controls Policy

CoreMax Consulting s Cyber Security Roadmap

SAP Single Sign-On 2.0 Overview Presentation

The Top 6 WAF Essentials to Achieve Application Security Efficacy

The Honest Advantage

Creating Application Definitions in Hana Cloud Platform Mobile Services

Best Practices Using KMC Capabilities in an External Facing Portal Version 1.00 October 2006

Cyber Security Audit & Roadmap Business Process and

CS 356 Operating System Security. Fall 2013

Technical Overview. Access control lists define the users, groups, and roles that can access content as well as the operations that can be performed.

ADM920 SAP Identity Management

TIBCO Cloud Integration Security Overview

RBS NetGain Enterprise Manager Multiple Vulnerabilities of 11

CSWAE Certified Secure Web Application Engineer

Integrated Access Management Solutions. Access Televentures

AKAMAI WHITE PAPER. Enterprise Application Access Architecture Overview

VULNERABILITIES IN 2017 CODE ANALYSIS WEB APPLICATION AUTOMATED

SAP BusinessObjects Explorer API Guide SAP BusinessObjects Explorer XI 3.2 SP2

Closing the Biggest Security Hole in Web Application Delivery

Security Fundamentals for your Privileged Account Security Deployment

SAP BusinessObjects Enterprise Upgrade Guide

Trigger-Based Data Replication Using SAP Landscape Transformation Replication Server

INCREASE APPLICATION SECURITY FOR PCI DSS VERSION 3.1 SUCCESS AKAMAI SOLUTIONS BRIEF INCREASE APPLICATION SECURITY FOR PCI DSS VERSION 3.

Cloud Access Manager Overview

10 KEY WAYS THE FINANCIAL SERVICES INDUSTRY CAN COMBAT CYBER THREATS

Web Application Penetration Testing

Transcription:

SAP Security In-Depth by Mariano Nunez Vol. 5 / May 2012 Abstract "SAP platforms are only accessible internally". While that was true in many organizations more than a decade ago, today, driven by modern business requirements, SAP systems are very often connected to the Internet. This scenario dramatically increases the universe of possible attackers, as malicious parties can remotely try to compromise the organization's SAP platform and perform espionage, sabotage and fraud attacks. SAP provides different Web technologies, such as the Enterprise Portal, the Internet Communication Manager (ICM) and the Internet Transaction Server (ITS), which may be prone to specific security risks. This issue analyzes possible attack vectors to SAP Web components and the measures that need to be taken in order to prevent them. This information will enable organizations to better protect their business-critical infrastructure against cyber-attacks performed over Web scenarios.. All Rights Reserved.

Copyright Onapsis, Inc. 2012 - All rights reserved. No portion of this document may be reproduced in whole or in part without the prior written permission of Onapsis, Inc. Onapsis offers no specific guarantee regarding the accuracy or completeness of the information presented, but the professional staff of Onapsis makes every reasonable effort to present the most reliable information available to it and to meet or exceed any applicable industry standards. This publication contains references to the products of SAP AG. SAP, R/3, xapps, xapp, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius and other Business Objects products and services mentioned herein are trademarks or registered trademarks of Business Objects in the United States and/or other countries. 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.

What is the SAP Security In-Depth Publication? Until recently, SAP security was regarded as a synonym for Segregation of Duties (SoD) by the majority of the Information Security community. While this kind of security is mandatory and of absolute importance, many threats have been so far overlooked by the Auditing and Information Security practices, which entail much higher levels of business risk. The technological components of these business-critical solutions introduce many specific security concerns that, if not implemented appropriately, can be subject to information security attacks on the confidentiality, integrity and/or availability of the critical business information processed by these systems. Therefore, failing to properly protect these components can leave the business information at risk of espionage, fraud and sabotage attacks. SAP Security In-Depth is a publication led by the Onapsis Research Labs with the purpose of providing specialized information about the current and future risks in this area, allowing all the different actors (financial managers, information security managers, SAP administrators, auditors, consultants and others) to better understand the involved risks and the techniques and tools available to assess and mitigate them.

TABLE OF CONTENTS 1. Introduction...6 2. SAP Web Applications...7 3. Discovery & Exploration...10 4. Attack Vectors...15 5. Conclusions...23 6. References...24

EXECUTIVE SUMMARY While the SAP Security In-Depth publication delves into highly technical security aspects of these platforms, we consider it is important to provide an executive summary, using a non-technical language, of the most outstanding concepts and risks presented in this volume. Key concepts analyzed in this edition: SAP provides different technologies to enable Web access to the company's business applications. Each of these technologies feature complex and different security architectures, which must be holistically understood in order to be properly evaluated. This publication analyzes the current risks affecting these components and the necessary measures that must be taken in order to mitigate them. Key findings and risks: Many organizations are currently exposing their backend SAP systems to the Internet through SAP Web applications. Remote attackers can easily discover them through public search engines. Specific vulnerabilities in the SAP J2EE Engine may allow attackers to completely bypass logon screens. For instance, a malicious party would be able to login to the SAP Enterprise Portal without having to provide a valid password. If not properly secured, attackers can exploit vulnerabilities in SAP Web components which would allow them to perform espionage, sabotage and fraud attacks against the business-critical information of the company. 5

1. INTRODUCTION SAP applications are used to run the world's most important businesses. Key processes such as sales, invoicing, manufacturing, procurement, human resources management and financial planning are managed and processed by systems running SAP software. This critical nature is what makes them highly attractive for cyber-criminals. If a malicious party is able to compromise the organization's SAP platform, it would be able to engage in espionage, sabotage and fraud attacks on the business, leading to severe economic damage. Several years ago, the use of these integrated business systems was only available to internal employees, working behind the corporate firewall. Nowadays, driven by current business requirements, these firewalls had to be opened and SAP platforms made available to external, untrusted networks such as the Internet. Under this new paradigm, the choice for the technological platform for this new interconnectivity was obvious: the Web. SAP has developed several proprietary Web Application components through its history: the Internet Transaction Server (ITS), the Web Application Server/ Internet Communication Manager (ICM) and the Enterprise Portal (EP). Each of these components feature their own security models and, therefore, require specialized knowledge to understand current and future threats to the business information processed by them. This white-paper consolidates the research performed throughout 2011 by the Onapsis Research Labs on this matter, which was presented in major security conferences such as BlackHat and RSA. The document describes some of the threats affecting the security of standard SAP Web applications and configurations, in order to better understand the existing risks and how to mitigate them. This information will enable organizations to better protect their business-critical systems from cyber-attacks to their SAP platforms which are performed over Web scenarios. The security of custom SAP Web applications, protecting against attacks such as SQL Injection, Cross-Site Scripting (XSS) and Path Traversals generally falls under the domain of Secure Development practices and is not in the scope of the current work. This subject will be covered in a future publication. 6

2. SAP WEB APPLICATIONS Throughout its history, SAP has developed different technologies in order to provide Web access to the core backend systems. This section provides a quick introduction into these components. The SAP Internet Transaction Server (ITS) The ITS was released in 1996, being SAP's first approach to enable Internet access to the SAP systems. This component acts as a middleware which works mainly by translating SAP Dynpros (dynamic programs) into HTML pages. The ITS is built upon two sub-components: Wgate: Web filter (CGI/ISAPI) that receives HTTP requests for the ITS system. Forwards the requests to the Agate. Agate: Receives requests from Wgate and translates them to RFC/DIAG calls to the backend SAP Application Server. It receives the results, translates them to HTML and forwards them back to the Wgate. The following figure presents the architecture of a standalone ITS deployment: SAP ITS functionality is delivered in the form of services. These services are represented by operating system files (.srvc), located in the Agate server. Each service contains the necessary information to connect to the backend SAP system and perform the required operation. End users access these services by requesting URLs with a specific format: http://<server>:<port>/<path_to_wgate>/<service_name>/!?<optional_params> 7

By default, the path_to_wgate is configured as /scripts/wgate/. Since release 6.40, the ITS has been integrated into the Web Application Server and is accessible as a set of services within the ICF (Internet Communication Framework). More information about the ITS can be obtained at [1]. The SAP Internet Communication Manager (ICM) The ICM is the evolution of the ITS component. In this new scenario, there is no need to deploy an intermediate, middleware component to process HTTP requests, as the SAP kernel itself has been enhanced to support the processing of the HTTP(S) and SMTP protocols. Specifically, the component in charge of processing requests is the Internet Communication Framework (ICF). This framework provides access to ICF services. More information about the ICM can be obtained at [2]. The SAP Enterprise Portal (EP) The SAP Enterprise Portal is the latest SAP's solution to provide a unique access point to the organization's SAP (a non-sap) systems through the Web. According to SAP, the EP provides employees, partners, customers, and other workers with immediate, secure, and role-based access to key information and applications. Technically, the Enterprise Portal is a J2EE application running on top of the SAP J2EE Engine (renamed to SAP Application Server Java starting with version 7.1). This application is composed of three main components: the Portal Platform, Knowledge Management and Collaboration. SAP 8

More information about the EP can be obtained at [3]. The SAP Web Dispatcher The Web Dispatcher is a component developed by SAP that acts as a reverse proxy to internal SAP Web applications, mainly providing load-balancing features. Typically, the SAP Web Dispatcher is deployed in a public DMZ, which receives requests from end-users and proxies them to the backend SAP Web components. The following diagram illustrates a typical Web Dispatcher deployment: SAP 9

3. DISCOVERY & EXPLORATION This section analyzes different techniques that attackers may use in order to discover and obtain technical information from the components discussed in the previous section. 3.1. Information on Public Search Engines It is possible for attackers to detect online SAP Web applications by using public search engines, such as Google or SHODAN. In the first case, as SAP Web components are usually configured using default URL mappings, an attacker can use the inurl keyword and search for SAPspecific applications in the Google directory. For example, searching for inurl:/irj/portal will present the attacker with SAP Enterprise Portal applications connected to the Internet: Furthermore, the search engine SHODAN can be used to retrieve Web servers which return the keyword SAP in the HTTP response, usually indicating the presence of an SAP Web Application Server: 3.2. Identification of SAP Web Servers through Banners Just as any regular Web server, SAP Web servers return an HTTP Server header describing the underlying technology. Attackers can use this information in order to discover these systems in the wild and also obtain information about their specific versions. ITS As the Web-facing component of the ITS is a regular Web server (such as Microsoft IIS, Apache, etc), identifying ITS components through this technique is not feasible. 10

ICM The ICM can return the following Server headers: server: SAP Web Application Server (1.0;<VERSION>) server: SAP NetWeaver Application Server (1.0;<VERSION>) server: SAP NetWeaver Application Server / ABAP <VERSION> server: SAP NetWeaver Application Server <VERSION> / ICM <VERSION> For example: server: SAP Web Application Server (1.0;640) server: SAP NetWeaver Application Server (1.0;700) server: SAP NetWeaver Application Server / ABAP 701 J2EE Engine (SAP EP) The J2EE Engine can return the following Server headers: Server: SAP J2EE Engine/<VERSION> Server: SAP NetWeaver Application Server <VERSION> / AS Java <VERSION> For example: Server: SAP J2EE Engine/7.00 Server: SAP NetWeaver Application Server 7.10 / AS Java 7.10 Protection / Countermeasures - Disable or configure a customized HTTP Server header for the ICM server. Check SAP Note 1329326. - For the J2EE Engine, disable the server banner through property UseServerHeader. Check [12] for more information. 3.3. Exploration of SAP Web Servers through Error Messages By requesting specific URLs and triggering error conditions, an attacker could identify the underlying software component and obtain information that could be used in the next phases of the attack. 11

ITS Requesting a non-existent ITS service (such as /scripts/wgate/inexistent/!) will trigger an error message, where the use of this component can be confirmed. The screen returned depends on the ITS version in use. In some cases it will return a login screen, such as the following: Furthermore, by analyzing the source code of this Web page, the attacker will be able to obtain sensitive information from the ITS infrastructure: <!-This page was created by the SAP Internet Transaction Server (ITS, Version 6200.1004.33246.0, Build 587598, Virtual Server PROD, Add. service info none, WGate-AGate Host abtrwu, WGate-Instance PROD) All rights reserved. Creation time: Mon Jan 03 02:36:27 2011 Charset: utf-8 Template: zwebfal98/99/login --> 12

ICM The ICM returns a descriptive error message in HTTP 404 and 403 responses: From this message, it is possible to obtain: SAP server hostname (vmsapecc6). SAP System ID/SAPSID (ST1). SAP system number (00). By accessing a protected service, it is also possible to retrieve the SAPSID of the target SAP system, as this information is included in the realm property of the HTTP Basic authentication response. Tip You can use Onapsis Bizploit's icmerrorinfodisc plugin in order to verify if your SAP platform is affected by this issue. 13

J2EE Engine (SAP EP) The presence of the SAP Enterprise Portal can be checked by trying to access the default path for the application (/irj/portal). If available (and anonymous access is restricted), a logon screen will be presented: Furthermore, by requesting a non-existent resource, it is also possible to obtain the SAP J2EE Engine version presented in the top of the resulting page. The SAP EP also provides version information in the source code of the generated pages: Protection / Countermeasures - For the ITS, check SAP Note 747818 to disable the disclosure of hidden version information. - For the ICM, customize generated error pages to avoid disclosing infrastructure information. Check [6] and [7]. 14

4. ATTACK VECTORS 4.1. Abuse of Unrestricted Access to ICF Services When a request for an ICF service is received, the SAP system will first verify whether the service is public or not. If it is public, no authentication credentials are required. If not, the currently defined authentication procedure takes place. After the user has been successfully authenticated, the SAP kernel will check that it has the following authorization object: S_ICF ICF_FIELD = 'SERVICE' ICF_VALUE = '<authorization_value>' where authorization_value is the value assigned in the Authorization field of the requested service's configuration. While this situation may seem secure in the first place, a major security threat arises: the lack of authorization checks by default. If the administrator does not enforce authorizations after the setup of the system, ICF services will not have an Authorization value configured. This implies that any authenticated user can execute any ICF service. The user will only be restricted by the authority checks defined in the code of the specific service he is accessing. As standard users, such as SAP*, DDIC, EARLYWATCH, SAPCPIC and TMSADM, have publicly known default passwords, this situation poses a significant threat to the system. If these users have not been secured, a malicious attacker will be able to use them to access sensitive ICF services and possibly take complete control of the SAP server. Protection / Countermeasures - Make sure that standard users don't have default passwords. You can use SAP's standard report RSUSR003. - Disable any ICF service that is not enabled due to business requirements. Check SAP Note 1498575 and [8]. - Maintain ICF Authorization Data as described in [9] and [10]. 15

4.2. Exploitation of Dangerous ICF Services While in NetWeaver systems all standard ICF services are disabled by default, it is highly common for Administrators to enable all of them to satisfy business requirements. The problem is that certain ICF services provide sensitive functionality and, combined with the issue described in the previous section, can then be exploited by attackers to perform unauthorized activities over the systems. 4.2.1. The Info Service This service can be accessed anonymously through the /sap/public/info URL and discloses sensitive information about the SAP platform: Protection / Countermeasures The usage of the Info service should be analyzed. If this service is not in use following business requirements, it must be deactivated through transaction SICF. 16

Tip You can use Onapsis Bizploit's icminfo plugin in order to verify if your SAP platform is affected by this issue. 4.2.2. The SOAP RFC Service This service is used to execute SAP RFC function calls over the HTTP protocol. The RFC protocol is used to execute ABAP Function Modules on remote SAP servers, and represent a critical aspect of the system's security. If this service is available a remote attacker would have access to perform arbitrary RFC calls against the system, which can lead to different attacks, such as: Obtain the currently logged on users The attacker can call the TH_USER_LIST function module and obtain a list of the currently logged on users. Take full control of the target SAP system Exploiting a shell character injection vulnerability in the TH_GREP function on Unix platforms (can be protected through [5]), discovered by Joris van de Vis, an attacker could execute operating system commands over the SAP application server and obtain full control of the system's database. These privileges are equivalent as having the SAP_ALL profile over the system. This situation is highly dangerous as this function module can be executed by standard users, such as EARLYWATCH. Please note that the above mentioned cases are just two examples of possible attack vectors. The attacker can execute any RFC function module. If an attacker is able to obtain valid credentials for a high-privileged user (such as SAP*), he would be able to perform even more sensitive operations (create SAP_ALL users, access SAP tables, modify business information, etc). Protection / Countermeasures The SOAP RFC service has been qualified as dangerous by SAP and should be deactivated. Please see [4] for more information. 17

4.2.3. The WEBGUI Service The WEBGUI service is part of the Integrated ITS of the ICM engine, and can be accessed through the /sap/bc/gui/sap/its/webgui URL. This is a clear example of how the company's boundaries can become vague if SAP Web applications are not properly protected. As this service provides a SAPGUI interface through a Web browser, a remote attacker would have access to functionality that is typically reserved only for internal users. Therefore, if this service is available, a malicious party (with valid access credentials) would be able to login to the SAP system and perform sensitive operations over the business information, just as if he were connected to the internal company network. Protection / Countermeasures The usage of the WEBGUI service should be analyzed. If this service is not in use following business requirements, it must be deactivated through transaction SICF. Tip You can use Onapsis Bizploit's icmwebgui plugin in order to verify if your SAP platform is affected by this issue. 4.3. Exploitation of Vulnerable ICF Services Beyond the abuse of sensitive functionality provided by certain ICF services, it's important to note that other services can suffer from reported security vulnerabilities, which may be also exploited by malicious parties. Protection / Countermeasures Periodically review the latest SAP Security Notes to analyze whether ICF services in use are affected by a new security vulnerability. If so, the respective fix must be applied as soon as possible. 18

4.4. Attacks to the SAP Web Dispatcher Where deployed, the Web Dispatcher receives all the requests from end-users and dispatches them to the backend SAP Web servers. This component features a Web administration interface, whose default path is /sap/wdisp/admin. This interface is not enabled by default and it requires valid authentication credentials to access most of its functionality. This interface provides several administration features, one of them being the ability to manage the desired trace level of the component. While originally designed to be used for debugging purposes, an attacker can abuse this capability and configure an elevated trace level, which would allow him to capture the full HTTP requests and responses that are being processed by the Web Dispatcher. This traffic may contain sensitive business information which would be visualized by the attacker. Furthermore, the attacker will be able to capture cookies or authentication headers being used by users with valid sessions, enabling him to impersonate them and obtain access to the backend systems. The following screenshot illustrates this situation: Protection / Countermeasures The Web Administration interface should not be accessible from untrusted networks. If in use, a strong password must be configured for the administrator user. 19

4.5. Internal Port-scanning through SAP wsnavigator The SAP J2EE Engine has an application called wsnavigator, which is used to analyze the available Web Services in the SAP J2EE cluster. Beyond providing an interface to test installed Web services, this application allows users to retrieve the WSDL from a URL. When a URL is provided, the application dispatches an HTTP request to the specified server. If the request is not successful, a descriptive error message is presented. Therefore, analyzing the generated responses, the attacker will be able to perform a discovery/port-scan of systems located in the company's internal network/dmz through this application. Some examples are presented below: Connection to a live host with an open TCP port Connection to a live host with a closed TCP port Connection to an unavailable or filtered host-port 20

Protection / Countermeasures The wsnavigator application should not be used in productive environments. In order to prevent this (and other) issues, this application should be disabled. Check SAP Note 1461268 and 1394544, which contain specific protections for this vulnerability. Also check SAP Note 781882 and 871394, which lists mandatory and optional services on the J2EE Engine 4.6. Bypass of SAP J2EE Engine Authentication The SAP J2EE Engine supports different standard (and customized) logon modules to provide flexible authentication procedures. One of these methods is the HTTP Header Variables authentication, which is used in the following scenarios: Integrated Windows Authentication (now replaced by Kerberos) Authentication by third parties tools (EAM/WAM solutions) Under these scenarios, the user is authenticated against the intermediate server (authentication proxy). If the authentication procedure is successful, the authentication proxy communicates with the SAP J2EE Engine and commands it to authenticate the user. This information is sent in HTTP headers. When the SAP server receives the request, it checks whether the user exists and, if so, a new Single Sign-On ticket is generated and forwarded to the user. This login mechanism was designed to provide single-sign on functionalities and/or increase the security level of the entire SAP platform. Several renowned EAM/WAM solutions are integrated to SAP environments through this mechanism. Some examples include: RSA ClearTrust CA SiteMinder Oracle Oblix Entrust GetAccess Microsoft Integrated Windows Authentication However, if this integration is not implemented securely, a major security threat is created: a remote anonymous attacker could bypass the SAP J2EE Engine authentication mechanism, being able to login as an arbitrary user in the system. 21

For example, if the J2EE Engine is used to run Enterprise Portal, PI/XI or Solution Manager solutions, the attacker would be able to login as Administrator without having to provide a valid password. The attack vector is basically the impersonation of the third-party EAM/WAM product, by sending the following HTTP request directly to the SAP server: GET /irj/portal HTTP/1.1 Host: <server>:<port> <additional_headers> <AUTH_HEADER>: <user_to_impersonate> The HTTP header AUTH_HEADER is dependent on the third-party solution in use. For instance, in the case of Integrated Windows Authentication, the header name is REMOTE_USER. If successful, the SAP server will return a valid logon cookie and the attacker would be able to access the business content with the privileges of the impersonated user. Protection / Countermeasures The entire security of this authentication scheme relies on the fact that an attacker should never be able to connect directly to the SAP J2EE server, as otherwise he would be able to impersonate the authentication proxy and obtain a SSO ticket without providing access credentials. The prevention of impersonation attacks can be enforced by configuring trust relationships and mutual authentication between the SAP server and the intermediate authentication server. If this mechanism is in use, direct requests to the SAP server from endusers must be prohibited. For more information check [11]. 22

5. CONCLUSIONS SAP features a broad range of technologies to provide Web access to the organizations' core business information. Each of these technologies comprises its own proprietary security models and therefore is exposed to specific threats that need to be understood and mitigated holistically. Contrary to popular belief, many SAP systems are currently connected to the Internet and other untrusted networks, which dramatically increases the universe of possible attackers. As presented in this document, by exploiting vulnerabilities in SAP Web components, it would be possible for remote attackers to perform espionage, sabotage and fraud attacks to the organization's businesscritical information. In recent years, SAP has significantly increased its efforts in raising the awareness regarding the risk of cyber-attacks. The SAP Security Guides, newly released white-papers and the Security Patch Day are some examples of this long-term policy. Now the challenge is for customers to catch-up and protect their core business information from these threats. This publication has outlined only some of the existing risks and their impact. Other research projects are already in place and will be presented in the future. It is expected that, by understanding the presented threats and following the detailed recommendations, SAP customers can increase the security level of their ERP systems and protect themselves against the rising threat of cyber-attacks to business-critical applications. For further information into this subject or to request specialized assistance, feel free to contact Onapsis at info@onapsis.com 23

6. REFERENCES [1] http://www.sdn.sap.com/irj/sdn/sap-its [2] http://help.sap.com/saphelp_nw04/helpdata/en/0a/a7903febb15a7be10000000a11405a/frameset.htm [3] http://help.sap.com/saphelp_ep60sp0/helpdata/en/index.htm [4] https://service.sap.com/sap/support/notes/1394100 [5] https://service.sap.com/sap/support/notes/1433101 [6] http://help.sap.com/saphelp_nw73/helpdata/en/48/69efc9e8a607d6e10000000a42189c/frameset.htm [7] http://help.sap.com/saphelp_nw73/helpdata/en/48/45acaf43a64bb8e10000000a42189b/frameset.htm [8] http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0d2445f-509d-2d10-6fa7-9d3608950fee [9] http://help.sap.com/saphelp_nw70ehp2/helpdata/en/39/e11482b2d23a428e583a59bef07515/frameset.htm [10] http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9f/fc5e900b62d94e8878eb94db5b986f/frameset.htm [11] http://help.sap.com/saphelp_nw70ehp2/helpdata/en/d0/a3d940c2653126e10000000a1550b0/frameset.ht m [12] http://help.sap.com/saphelp_nw73/helpdata/en/55/4202bc3067492aa6887bcd97ed76a6/frameset.htm 24

About Onapsis X1 Onapsis X1TM is the industry's first comprehensive solution for the security assessment of ERP systems, currently supporting SAP NetWeaverTM and R/3 business solutions. Perform continuous and automated IT Security & Compliance Audits, Vulnerability Assessments and Penetration Tests over your SAP platform. Using Onapsis X1 you can decrease financial fraud risks, enforce compliance requirements and reduce audit costs significantly. Being the first-and-only SAP-certified solution of its kind, Onapsis X1 allows you to automatically and continuously detect: Insecure ABAP and Java instance configurations Missing SAP Security Notes and patches Dangerous user authorizations Insecure interfaces between your systems Following the product's detailed mitigation procedures, you can increase the security level of your platform to stay protected against cyber-attacks. Get more information at www.onapsis.com/x1. Onapsis X1 Enterprise 2 is 25

About Onapsis, Inc. Onapsis provides innovative security software solutions to protect ERP systems from cyber-attacks. Through unmatched ERP security, compliance and continuous monitoring products, Onapsis secures the business-critical infrastructure of its global customers against espionage, sabotage and financial fraud threats. Onapsis X1, the company's flagship product, is the industry's first comprehensive solution for the automated security assessment of SAP platforms. Being the first and only SAP-certified solution of its kind, Onapsis X1 allows customers to perform automated Vulnerability Assessments, Security & Compliance Audits and Penetration Tests over their entire SAP platform. Onapsis is backed by the Onapsis Research Labs, a world-renowned team of SAP & ERP security experts who are continuously invited to lecture at the leading IT security conferences, such as RSA and BlackHat, and featured by mainstream media such as CNN, Reuters, IDG and New York Times. For further information about our solutions, please contact us at info@onapsis.com and visit our website at www.onapsis.com. www.onapsis.com. All Rights Reserved. Subject to Terms of Use available at http://www.onapsis.com/legal/terms-of-use.html The Onapsis and Onapsis Securing Business Essentials names and logos and all other names, logos, and slogans identifying Onapsis's products and services are trademarks and service marks or registered trademarks and service marks of Onapsis, Inc. All other trademarks and service marks are the property of their respective owners.