BIZEC APP/11 and BIZEC TEC/11 - Virtual Forge
BIZEC APP/11 and BIZEC TEC/11 - Virtual Forge
BIZEC APP/11 and BIZEC TEC/11 - Virtual Forge
Transform your PDFs into Flipbooks and boost your revenue!
Leverage SEO-optimized Flipbooks, powerful backlinks, and multimedia content to professionally showcase your products and significantly increase your reach.
Welcome<br />
<strong>BIZEC</strong> Roundtable @ IT Defense, Berlin<br />
SAP Security<br />
<strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong> Version 2.0<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> Version 2.0<br />
February 1, 2013<br />
Andreas Wiegenstein<br />
CTO, <strong>Virtual</strong> <strong>Forge</strong>
2<br />
SAP Security<br />
SAP security is a complex discipline. It must be addressed holistically:<br />
• SoD controls (user roles <strong>and</strong> profiles) are necessary, but they are not enough.<br />
• As covered by <strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong>, code-level security is a clear example of this. Reviewing the<br />
security of ABAP custom developments is critical.<br />
• Another weak link: The SAP technical layer (NetWeaver/BASIS).<br />
• Base framework in charge of critical tasks such as authentication, authorization,<br />
encryption, interfacing, auditing, logging, etc.<br />
• Can be susceptible of security vulnerabilities that, if exploited, can lead to<br />
espionage, sabotage <strong>and</strong> fraud attacks to the business information.
3<br />
<strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong><br />
<strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong> Version 2.0<br />
(Content <strong>and</strong> research contributed by <strong>Virtual</strong> <strong>Forge</strong>, Germany)
4<br />
What is <strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong> ?<br />
The <strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong> st<strong>and</strong>ard comprises the most critical <strong>and</strong> the most common<br />
security defects in SAP ABAP applications.<br />
Its purpose is to give companies that plan to conduct ABAP code audits<br />
guidance which types of security defects should be covered at minimum by an<br />
audit.
5<br />
Why (yet) another st<strong>and</strong>ard?<br />
Existing st<strong>and</strong>ards<br />
• Cover risks that don‘t exist in ABAP<br />
• Buffer overflows<br />
• Authentication issues<br />
• …<br />
• Don‘t cover risks that are specific to ABAP<br />
• Authorization-related risks<br />
• Client concept<br />
• …<br />
• Have a different scope<br />
• Web-specific (WASC, OWASP)<br />
• Generic (SANS CWE)<br />
Facit: Other application security st<strong>and</strong>ards are not applicable to ERP systems.
6<br />
Why we revised the <strong>APP</strong>/<strong>11</strong> list<br />
• New threat profile<br />
• Research yielded new risks like Native SQL Injection<br />
• New SAP technologies mitigate certain risks<br />
• Substantial increase of analyzed code base<br />
• More than 100 Mio lines of code<br />
• More than 50 companies contributed code<br />
• More contributors<br />
• SAP security researchers<br />
• SAP experts from the industry
7<br />
Results of code analysis<br />
• Priority based on „Critical Findings“, not „Total Findings“<br />
• New items: SQL Injection (Native), Direct Database Modifications, Hidden ABAP Code<br />
• Dropped items: File Upload (Malware), Cross-Site Request <strong>Forge</strong>ry, Unmanaged SQL
8<br />
<strong>BIZEC</strong> Protection goals for ERP Systems (#1)<br />
PG-1 Confidentiality of Business Data<br />
• The confidentiality of business data must be protected. This is a key requirement in<br />
data protection laws <strong>and</strong> compliance st<strong>and</strong>ards, like e.g. PCI/DSS. Any read access to<br />
(sensitive) business data must be properly authorized.<br />
PG-2 Integrity of Business Data<br />
• The integrity of all business data must be guaranteed. This is a key requirement for<br />
compliance <strong>and</strong> financial audits. Any (authorized) change of business data must also<br />
be accountable.<br />
PG-3 Privileges to execute Business Logic<br />
• Execution of Business Logic must be protected by proper authorization controls.<br />
ABAP coding must duly enforce the required authorizations <strong>and</strong> must not bypass the<br />
authorization concept of the Business Runtime.<br />
Cascading effect: PG-1 <strong>and</strong> PG-2 will also be violated.<br />
PG-4 Accountability of the Business Logic<br />
• All (authorized) actions performed by the Business Logic must be accountable. ABAP<br />
coding must not bypass the accountability features provided by the Business<br />
Runtime.
9<br />
<strong>BIZEC</strong> Protection goals for ERP Systems (#2)<br />
PG-5 Integrity of the Business Logic<br />
• The Integrity of the business logic must be protected in order to prevent<br />
manipulation. ABAP coding must neither accidentally nor intentionally<br />
bypass/undermine security features of the Business Runtime.<br />
Cascading effect: PG-1, PG-2, PG-3 <strong>and</strong> PG-4 will also be violated.<br />
PG-6 Availability of the Business Runtime<br />
• The Business Runtime is the base platform for the execution of the Business Logic<br />
<strong>and</strong> Business Data layers. Therefore, the availability of the Business Runtime is a<br />
critical requirement for the overall operational health of the system. Successful DOS<br />
attacks to the components in this layer will result in unexpected downtimes,<br />
preventing the Organization's users or systems from using the entire SAP system.<br />
PG-7 Integrity of the Business Runtime<br />
• The integrity of the components in this layer must be enforced <strong>and</strong> controlled, as any<br />
unauthorized modification in them imply high-level risks to the confidentiality,<br />
integrity <strong>and</strong> availability of the information used by the Business Data <strong>and</strong> Business<br />
layers.<br />
Cascading effect: All other protection goals will also be violated.
10<br />
<strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong> 2012 in detail (#1)<br />
<strong>APP</strong>-01 ABAP Comm<strong>and</strong> Injection Critical<br />
Coding that dynamically creates <strong>and</strong> executes ABAP programs based on user input on a<br />
productive system, bypassing SE80 <strong>and</strong> the concept of a three-tier-system l<strong>and</strong>scape.<br />
Violates: PG-1, PG-2, PG-3, PG-4, PG-5, PG-6, PG-7<br />
Exemplary SAP Note: 1589919<br />
<strong>APP</strong>-02 OS Comm<strong>and</strong> Injection Critical<br />
Coding that executes arbitrary (input-based) comm<strong>and</strong>s on the operating system, bypassing<br />
the allowed comm<strong>and</strong>s specified in SM49/SM69 <strong>and</strong> S_LOG_COM authorizations.<br />
Violates: PG-6, PG-7<br />
Exemplary SAP Note: 1520462<br />
<strong>APP</strong>-03 Native SQL Injection Critical<br />
Coding that executes arbitrary (input-based) native SQL comm<strong>and</strong>s on the SAP database,<br />
bypassing any Open SQL restriction.<br />
Violates: PG-1, PG-2, PG-4, PG-6, PG-7<br />
Exemplary SAP Note: 1456569
<strong>11</strong><br />
<strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong> 2012 in detail (#2)<br />
<strong>APP</strong>-04 Improper Authorization (Missing, Broken, Proprietary, Generic) Common<br />
Coding that does not (properly) perform authorization checks based on the SAP st<strong>and</strong>ard for<br />
critical operations. Improper Authorization includes semantically incorrect authority checks,<br />
generic authority checks, missing as well as proprietary authorization checks.<br />
Violates: PG-3 (implicitly PG-1, PG-2)<br />
Exemplary SAP Note: 1576763<br />
<strong>APP</strong>-05 Directory Traversal Common<br />
Coding that performs server-side file/directory read/write access, where a file name or path<br />
is (partially) based on unvalidated user input. Such coding gives attackers read/write access<br />
to restricted files, e.g. OS configuration, SAP configuration <strong>and</strong> temporarily stored business<br />
data.<br />
Violates: PG-1, PG-6, PG-7<br />
Exemplary SAP Note: 1595074
12<br />
<strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong> 2012 in detail (#3)<br />
<strong>APP</strong>-06 Direct Database Modifications Common<br />
Coding that directly modifies (restricted SAP st<strong>and</strong>ard) database tables without proper<br />
authorizations, bypassing S_TABU_DIS, S_TABU_NAM <strong>and</strong> S_TABU_CLI authorizations.<br />
Violates: PG-2<br />
Exemplary SAP Note: not known. Problem specific to custom code.<br />
<strong>APP</strong>-07 Cross-Client Database Access Common<br />
Coding that accesses business data on a different client, bypassing the SAP client separation<br />
mechanism.<br />
Violates: PG-5 (implicitly PG-1, PG-2, PG-3, PG-4)<br />
Exemplary SAP Note: not known
13<br />
<strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong> 2012 in detail (#4)<br />
<strong>APP</strong>-08 Open SQL Injection Common<br />
Coding that makes use of dynamic Open SQL, where part of such a query is based on input.<br />
This defect enables malicious users to alter the SQL query in order to access restricted data<br />
without authorization.<br />
Violates: PG-5 (implicitly PG-1, PG-2, PG-3, PG-4)<br />
Exemplary SAP Note: 1447616<br />
<strong>APP</strong>-09 Generic Module Execution Common<br />
Coding that allows uncontrolled execution of SAP st<strong>and</strong>ard business modules. The SAP<br />
st<strong>and</strong>ard provides a large number of business modules in the basis as well as the business<br />
suite. Execution of these business modules is restricted by SAP st<strong>and</strong>ard security features,<br />
e.g. SE37, SE38/SA38 <strong>and</strong> SE80.<br />
Violates: PG-3 (implicitly PG-1, PG-2)<br />
Exemplary SAP Note: 1683644
14<br />
<strong>BIZEC</strong> <strong>APP</strong>/<strong>11</strong> 2012 in detail (#5)<br />
<strong>APP</strong>-10 Cross-Site Scripting Common<br />
(BSP) Coding that does not properly encode data before rendering it as HTML. Cross-Site<br />
Scripting (XSS) attacks are targeted at users that run business applications in Web browsers.<br />
An XSS vulnerability compromises the security of the attacked user's client system, affecting<br />
any active SAP sessions.<br />
Violates: PG-1, PG-2, PG-3, PG-4, PG-5, PG-6, PG-7<br />
Exemplary SAP Note: 1337913<br />
<strong>APP</strong>-<strong>11</strong> Obscure ABAP Code Common<br />
Any coding that uses stealth techniques in order to obscure its true purpose.<br />
Violates: PG-4<br />
Exemplary SAP Note: not known. Problem specific to custom code.
15<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong><br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> Version 2.0<br />
(Content <strong>and</strong> research contributed by Onapsis, USA)
16<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
The <strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> project lists the most common <strong>and</strong> critical security defects <strong>and</strong><br />
threats affecting the technical layer of SAP platforms.<br />
• Several of the presented threats can be exploited by attackers who do not even<br />
have a valid SAP user in the system!<br />
• Because of the technical layer being the foundation of the business logic, a<br />
successful exploitation of several of these vulnerabilities would usually result in a<br />
complete compromise of the business information <strong>and</strong> processes (SAP_ALL<br />
privileges or equivalent).<br />
• Several affect both SAP ABAP <strong>and</strong> Java-based solutions.<br />
• The first list was presented on May 2010, <strong>and</strong> it has been updated, after two<br />
additional years of real-world SAP security assessments <strong>and</strong> knowledge exchange<br />
with other experts.
17<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
The <strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong><br />
• <strong>BIZEC</strong> <strong>TEC</strong>-01: Missing SAP Security Notes<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-02: St<strong>and</strong>ard SAP Users with Default Passwords<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-03: Dangerous SAP Web Applications<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-04: Unsecured SAP Gateway<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-05: Unsecured SAP/Oracle authentication<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-06: Insecure SAP RFC interfaces<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-07: Unsecured SAP Message Server<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-08: Insecure SAP Administration <strong>and</strong> Monitoring Services<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-09: Insecure SAP Network Filtering<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-10: Insecure SAProuter Implementation<br />
• <strong>BIZEC</strong> <strong>TEC</strong>-<strong>11</strong>: Unencrypted SAP Communications
18<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-01: Missing SAP Security Patches<br />
Risk<br />
The SAP platform is running based on technological components whose<br />
versions are affected by reported security vulnerabilities <strong>and</strong> the<br />
respective SAP Security Notes have not been applied.<br />
Business Impact<br />
Attackers would be able to exploit reported security vulnerabilities <strong>and</strong><br />
perform unauthorized activities over the business information processed<br />
by the affected SAP system.
19<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-01: Missing SAP Security Patches
20<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-02: St<strong>and</strong>ard Users with Default Passwords<br />
Risk<br />
Users created automatically during the SAP system installation, or other<br />
administrative procedures, are configured with default, publicly known<br />
passwords.<br />
Business Impact<br />
Attackers would be able to login to the affected SAP system using a<br />
st<strong>and</strong>ard SAP user account. As these accounts are usually highly<br />
privileged, the business information would be exposed to espionage,<br />
sabotage <strong>and</strong> fraud attacks.
21<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-03: Dangerous SAP Web Applications<br />
Risk<br />
The SAP Application Server is providing Web applications with reported<br />
security vulnerabilities or sensitive functionality (XSS, SQL Injection,<br />
Invoker Servlet detour, Verb Tampering, XXE Tunneling, etc.)<br />
Business Impact<br />
Attackers would be able to exploit vulnerabilities in SAP Web applications,<br />
enabling them to perform unauthorized activities over the business<br />
information processed by the affected SAP system.<br />
Should these SAP Web Applications be accessible from untrusted<br />
networks, such as the Internet, the probability of attacks is highly<br />
increased.
23<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-04: Unsecured SAP Gateway<br />
Risk<br />
The SAP Application Server’s Gateway is not restricting the starting,<br />
registration <strong>and</strong>/or cancellation of external RFC servers.<br />
Business Impact<br />
Attackers would be able to obtain full control of the SAP system.<br />
Furthermore, they would be able to intercept <strong>and</strong> manipulate RFC<br />
interfaces used for transmitting sensitive business information.
24<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-05: Unsecured SAP/Oracle authentication<br />
Risk<br />
The SAP ABAP Application Server authenticates to the Oracle database<br />
through the external OS authentication scheme, <strong>and</strong> the Oracle’s listener<br />
has not been secured.<br />
Business Impact<br />
Attackers would be able to obtain full control of the affected SAP system’s<br />
database, enabling them to create, visualize, modify <strong>and</strong>/or delete any<br />
business information processed by the system.
25<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-06: Insecure SAP RFC interfaces<br />
Risk<br />
The SAP environment is using insecure RFC connections from systems of<br />
lower security-classification level to systems with higher securityclassification<br />
levels (i.e. from Development to Production).<br />
Business Impact<br />
Attackers would be able to perform RFC pivoting attacks, by first<br />
compromising an SAP system with low security-classification <strong>and</strong>,<br />
subsequently, abusing existing insecure RFC interfaces to compromise<br />
SAP systems with higher security-classification levels.
26<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-06: Insecure SAP RFC interfaces
27<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-07: Unsecured SAP Message Server<br />
Risk<br />
The SAP System’s Message Server is not restricting the registration of<br />
SAP Application Servers, therefore allowing access to unauthorized<br />
systems.<br />
Business Impact<br />
Attackers would be able to register malicious SAP Application Servers <strong>and</strong><br />
perform man-in-the-middle attacks, being able to obtain valid user access<br />
credentials <strong>and</strong> sensitive business information. Attacks against the SAP<br />
system's user workstations would also be possible.
28<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-08: Insecure SAP Administration <strong>and</strong> Monitoring Services<br />
Risk<br />
The SAP platform is not protected against unauthorized access to<br />
sensitive administration or monitoring services, such as the SAP<br />
Management Console, the P4 interface, SDM, Solution Manager, Transport<br />
Management System, etc.<br />
Business Impact<br />
Attackers would be able to access sensitive functionality of the SAP<br />
system, which could lead to unauthorized activities over the business<br />
information processed by the affected SAP system.
29<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-09: Insecure SAP Network Filtering<br />
Risk<br />
The SAP platform network is not properly isolated from untrusted<br />
networks, both external <strong>and</strong> internal, <strong>and</strong> intrusion detection/prevention<br />
systems have not been implemented.<br />
Business Impact<br />
Attackers would be able to access administration or monitoring services<br />
<strong>and</strong> perform unauthorized activities over the affected SAP components,<br />
possibly leading to a full compromise of the SAP system. Due to the lack<br />
of IDS/IPS solutions, these attacks could stay undetected.
30<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-10: Insecure SAProuter Implementation<br />
Risk<br />
The SAProuter Route Permission Table is not properly configured to allow<br />
connections only from/to authorized systems, restricting the use of native<br />
protocols <strong>and</strong>/or logging features are not properly configured.<br />
Business Impact<br />
Attackers would be able to access SAP (<strong>and</strong> possibly non-SAP) systems<br />
located in the Company's network.
31<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-10: Insecure SAProuter Implementation
32<br />
<strong>BIZEC</strong> <strong>TEC</strong>/<strong>11</strong> (2012)<br />
<strong>BIZEC</strong> <strong>TEC</strong>-<strong>11</strong>: Unencrypted SAP Communications<br />
Risk<br />
The confidentiality <strong>and</strong> integrity of communications in the SAP l<strong>and</strong>scape<br />
is not enforced. These communications comprise SAP-to-SAP connections<br />
as well as interactions between SAP servers <strong>and</strong> external systems, such<br />
as user workstations <strong>and</strong> third-party systems.<br />
Business Impact<br />
Attackers would be able to access sensitive technical <strong>and</strong> business<br />
information being transferred to/from the SAP environment.
33<br />
Thank you for your feedback<br />
We are looking forward to meeting you at our next event.<br />
Further information on <strong>BIZEC</strong> <strong>and</strong> <strong>BIZEC</strong> events:<br />
http://bizec.org.
34<br />
Disclaimer<br />
• SAP, ABAP <strong>and</strong> other named SAP products <strong>and</strong> services <strong>and</strong> their respective logos<br />
are trademarks or registered trademarks of SAP AG in Germany <strong>and</strong> other countries<br />
worldwide. All other names of products <strong>and</strong> services are trademarks of their<br />
respective companies / owners.<br />
• Information contained in this publication is not binding <strong>and</strong> serves information<br />
purposes only. All information can be changed without notice.