SlideShare a Scribd company logo
SAP Forensics
Detecting White-Collar Cyber-crime
March 13th
, 2013
Troopers Security Conference
Mariano NunezMariano Nunez
mnunez@onapsis.commnunez@onapsis.com
@marianonunezdc@marianonunezdc
Juan Perez-EtchegoyenJuan Perez-Etchegoyen
jppereze@onapsis.comjppereze@onapsis.com
@jp_pereze@jp_pereze
2www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Disclaimer
This publication is copyright 2013 Onapsis Inc. – All rights reserved.
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.
3www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Who is Onapsis Inc.?
 Company focused in protecting ERP systems from cyber-attacks
(SAP®
, Siebel®
, Oracle®
E-Business SuiteTM
, PeopleSoft®
, JD Edwards®
…).
 Working with Global Fortune-100 and large governmental organizations.
 What does Onapsis do?
 Innovative ERP security software (Onapsis X1, Onapsis IPS, Onapsis Bizploit).
 ERP security professional services.
 Trainings on ERP security.
Who are we?
 Mariano Nunez, CEO at Onapsis.
 Juan Perez-Etchegoyen, CTO at Onapsis.
 Ezequiel Gutesman & Nahuel Sanchez from Onapsis (Research Labs).
 Discovered several vulnerabilities in SAP and Oracle ERPs...
 Speakers/Trainers at BlackHat, RSA, SAP GRC, HITB, Source, DeepSec...
 TROOPERS’ fans!
Attacks on SAP Solution ManagerSAP Forensics
4www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Agenda
 Introduction to SAP
 Forensics on SAP platforms
 Sample attacks and audit trails
 Conclusions
Cyber-Attacks to SAP SystemsSAP Forensics
5www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
IntroductionIntroduction
SAP Forensics
6www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
What is SAP?
● Largest provider of business management solutions in the world.
● More than 140.000 implementations around the globe.
● More than 90.000 customers in 120 countries.
● Used by Global Fortune-1000 companies, governmental
organizations and defense agencies to run their every-day business
processes.
BIBI
SCMSCM
ERPERP
PIPI
CRMCRM
SMSM
BOBO
SRMSRM
PLMPLM
PORTALPORTAL
GRCGRC
7www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Ok, so… what is SAP?
● In plain English: the systems that safeguard the business crown
jewels.
8www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Cyber-attacks on SAP systems = $$$
● If the SAP platform is breached, an intruder would be able to
perform different attacks such as:
ESPIONAGE: Obtain customers/vendors/human resources
data, financial planning information, balances, profits, sales
information, manufacturing recipes, etc.
SABOTAGE: Paralyze the operation of the organization by
shutting down the SAP system, disrupting interfaces with other
systems and deleting critical information, etc.
FRAUD: Modify financial information, tamper sales and
purchase orders, create new vendors, modify vendor bank
account numbers, etc.
9www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
An attacker will exploit our Achilles’ heel…
• SAP systems are built upon several layers.
• The SAP Application Layer (NetWeaver/BASIS) is common to most
modern SAP solutions, serving as the base technological
framework.
Note: The Database and Operating System layers should not be forgotten!
Traditional techniques apply. Warning: reduced accountability due to SAP’s
using of single users (<sid>adm, SAPService<SID>, SAPR3,…)
Operating System
Database
SAP Business Logic
SAP Application Layer
SAP Solution
Base Infrastructure
Over 95% of the SAP systems we
evaluated were exposed to espionage,
sabotage and fraud attacks due to
vulnerabilities in the SAP Application
Layer.
Unlike SoD gaps, attackers do not need access
credentials to exploit this kind of vulnerabilities…
11www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Forensics onForensics on
SAP systemsSAP systems
SAP Forensics
12www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Forensics & SAP
● According to Wikipedia “Digital forensics (sometimes known as
digital forensic science) is a branch of forensic science
encompassing the recovery and investigation of material found in
digital devices, often in relation to computer crime”.
● We are looking for an answer to these questions:
● Has my SAP platform been hacked?
● Is it being attacked right now?
We’ll cover some of the standard capabilities provided in SAP
systems to register evidence of user activity and/or attacks
Our SAP systems have
never been hacked…
ƒGreat! I’m glad we have
configured the audit trails and
are reviewing the logs…
Audit trails? Logs? What
are you talking about?
We are doomed.
On October 30th
2012, Anonymous
claimed intent to exploit SAP systems
They claimed to have broken into the Greek Ministry of Finance
(to be confirmed) and mentioned:
"We have new guns in our arsenal. A
sweet 0day
SAP exploit is in our hands and oh boy
we're gonna sploit the hell out of it."
15www.onapsis.com – © 2013 Onapsis , Inc. – All rights reserved
Attacker performs
fraudulent business
process / access info
SAP Forensics
SAP Forensics & The Anatomy of an Attack
● Several SAP components are shipped with out-of-the-box
capabilities to register user and technical activities.
● In this talk we will analyze the most important ones, describing their
strengths, weaknesses and type of events that can be extracted
from them, following the “course of action” of a sample SAP
attack.
Anonymous attacker gains
access to the system / valid
user elevates privileges
Anonymous attacker gains
access to the system / valid
user elevates privileges
16www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Initial Recon
SAP Forensics
17www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
The SAP Web Dispatcher
● The SAP Web Dispatcher is a reverse-proxy mainly used for
load-balancing of HTTP(S) connections to SAP Web servers.
● It can also be used as a rudimentary Web Application Firewall.
● The Auditing and Tracing features also apply to the SAP Web
Application Server (ICM).
18www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Web Dispatcher – Security Log
Useful to detect the following events:
• HTTP fuzzing attempts
• Null bytes in request
• Bad protocol specification
• Incorrect logon attempts to Web administration interfaces
Information retrieved:
• Date & time
• Attacker’s source IP
• Request contents (depth defined by key LEVEL)
19www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Web Dispatcher - Security Log: Summary
Description Value
Enabled by default WD: No
ICM: Yes
Physical location of the log file(s) WD: specified by admin
ICM:
/usr/sap/<SID>/<INSTANCE>/work/
dev_icm_sec
Limit of the log file Specified by MAXSIZEKB (kb) –
Need SAP Note to work!
Action performed after reaching
log limit
Defined by FILEWRAP
Centralized logging capabilities No
How to access log(s) contents WD: Operating system access
ICM: Transaction MICM
20www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Web Dispatcher – HTTP Log
Useful to detect the following events:
• Incorrect logon attempts (401 responses)
• HTTP fuzzing attempts (400 responses)
• Access to dangerous Web applications
Information retrieved:
• Request contents are determined by the LOGFORMAT key.
• Date & time
• Attacker’s source IP
• User specified for authentication
• HTTP Request parameters and headers
• HTTP Response Code
21www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Web Dispatcher – HTTP Log: Summary
Description Value
Enabled by default WD: No
ICM: No
Physical location of the log file(s) Specified by parameter
icm/HTTP/logging_XX
Limit of the log file Specified by MAXSIZEKB (kb)
Action performed after reaching
log limit
Defined by FILEWRAP and
SWITCHTF
Centralized logging capabilities No
How to access log(s) contents WD: Operating system access
ICM: Transaction MICM
22www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
The SAProuter
● The SAProuter is a reverse proxy used to restrict remote access to
SAP platforms.
● Restrict connections through a firewall-like ACL file called Route
Permission Table.
23www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Threats Affecting SAProuters
● From the Onapsis Research Labs, we have researched on the
following attack vectors over SAProuter systems:
● Discovering established connections (connected clients & backend
SAP servers).
● Performing port-scans of internal systems.
● Routing native protocols - proxying protocols such as SSH or
HTTP and accessing internal services.
Detailed information about these risks and their mitigation techinques:
•The “Securing the Gate to the Kingdom: Auditing the SAProuter” whitepaper
•The ERP Security Blog
24www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Attacks on SAProuter
SAP Forensics
25www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Detecting Attacks on SAProuters
Mon May 31 14:30:45 2010 CONNECT FROM C1/- host 192.168.0.1/43556
Mon May 31 14:30:45 2010 CONNECT TO S1/2 host 192.168.0.105/3200 (192.168.0.105)
Mon May 31 14:30:58 2010 DISCONNECT S1/2 host 192.168.0.105/3200 (192.168.0.105)
Regular connection (accepted)
Mon May 31 14:32:25 2010 CONNECT FROM C1/- host 192.168.0.1/44654
Mon May 31 14:32:25 2010 PERM DENIED C1/- host 192.168.0.1 (192.168.0.1) to 192.168.0.105/3201
Mon May 31 14:32:25 2010 DISCONNECT C1/- host 192.168.0.1/44654 (192.168.0.1)
Regular connection (rejected)
26www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Detecting Attacks on SAProuters
Mon May 31 14:34:54 2010 CONNECT FROM C1/- host 192.168.0.1/4218
Mon May 31 14:34:54 2010 PERM DENIED C1/- info request
Mon May 31 14:34:54 2010 DISCONNECT C1/- host 192.168.0.1/4218 (192.168.0.1)
Info-request (rejected)
Mon May 31 14:51:38 2010 CONNECT FROM C2/- host 192.168.0.1/54650
Mon May 31 14:51:38 2010 CONNECT TO S2/1 host 192.168.0.105/22 (192.168.0.1), ***NATIVE ROUTING
***
Native connection
Mon May 31 14:33:13 2010 CONNECT FROM C1/- host 192.168.0.1/4218
Mon May 31 14:33:13 2010 SEND INFO TO C1/-
Mon May 31 14:33:13 2010 DISCONNECT C1/- host 192.168.0.1/4218 (192.168.0.1)
Info-request (accepted)
27www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Detecting Attacks on SAProuters
Wed Jun 30 22:28:16 2010 CONNECT FROM C1/- host 10.0.0.1/56734
Wed Jun 30 22:28:16 2010 PERM DENIED C1/- host 10.0.0.1 (10.0.0.1) to 192.168.3.2/3200
Wed Jun 30 22:28:16 2010 DISCONNECT C1/- host 10.0.0.1/56734 (10.0.0.1)
Wed Jun 30 22:28:16 2010 CONNECT FROM C1/- host 10.0.0.1/56735
Wed Jun 30 22:28:16 2010 PERM DENIED C1/- host 10.0.0.1 (10.0.0.1) to 192.168.3.2/3201
Wed Jun 30 22:28:16 2010 DISCONNECT C1/- host 10.0.0.1/56735 (10.0.0.1)
Wed Jun 30 22:28:16 2010 CONNECT FROM C1/- host 10.0.0.1/56736
Wed Jun 30 22:28:16 2010 PERM DENIED C1/- host 10.0.0.1 (10.0.0.1) to 192.168.3.2/3202
Wed Jun 30 22:28:16 2010 DISCONNECT C1/- host 10.0.0.1/56736 (10.0.0.1)
Wed Jun 30 22:28:16 2010 CONNECT FROM C1/- host 10.0.0.1/56737
Wed Jun 30 22:28:16 2010 PERM DENIED C1/- host 10.0.0.1 (10.0.0.1) to 192.168.3.2/3203
Wed Jun 30 22:28:17 2010 DISCONNECT C1/- host 10.0.0.1/56737 (10.0.0.1)
…
Detecting Port-scanning Attacks
28www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
The SAProuter Log: Summary
Description Value
Enabled by default No
Physical location of the log file(s) Specified by the administrator
through the –G option
Limit of the log file None by default. Can be specified by
option –J
Action performed after reaching
log limit
If limit is defined, starts logging to a
new file
Centralized logging capabilities No
How to access log(s) contents Operating system access
29www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Bruteforce Attacks
SAP Forensics
30www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Security Audit Log (SAL) is the security auditing feature provided by SAP.
It enabled the identification of security-related events such as:
• Successful and unsuccessful dialog logon attempts
• Successful and unsuccessful RFC logon attempts
• RFC calls to function modules
• Changes to user master records
• Successful and unsuccessful transaction starts
• Changes to the SAL configuration
Each event contains information about:
• Timestamp
• User, client and terminal (source system)
• Details of the activity performed
ABAP – Security Audit Log
31www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Description Value
Enabled by default No
Physical location of the log file(s) /
usr/sap/<SID>/<INSTANCE>/lo
g/audit_date
Limit of the log file By default 20 Mb per audit file
Action performed after reaching log
limit
Stops logging until next file is
initialized (until the end of the
day).
Centralized logging capabilities Not possible
How to access log(s) contents Transaction SM20
ABAP – Security Audit Log: Summary
32www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
What kind of information will we get from the traces events?:
● Timestamp
● User who made the change
● Modified username and client (with the old and new values)
● Transaction/program
The SAP system is configured by default to register all user and
authorizations activity.
ABAP – User & Authorizations
33www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Description Value
Enabled by default Yes
Physical location of the log file(s) Tables USH02, USH04, USH10,
USH12…
Limit of the log file No limit
Action performed after reaching log
limit
N/A
Centralized logging capabilities Not possible
How to access log(s) contents Report RSUSR100N
ABAP – User & Authorizations: Summary
34www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
On SAP, all information is stored in tables and changes to these tables
can reach the SAP system in two different ways:
•Changes performed by the system (rec/client)
•Changes performed through the transport system (recclient)
It is possible to restrict the client(s) and the transparent table(s) for
which to log changes. All changes are saved into table DBTABLOG,
containing:
• Timestamp
• User and client
• Table and field values (old and new)
ABAP – Table Change Logging
35www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Description Value
Enabled by default No
Physical location of the log file(s) Table DBTABLOG
Limit of the log file No limit
Action performed after reaching log
limit
N/A
Centralized logging capabilities Not possible
How to access log(s) contents Transaction SCU3
ABAP – Table Change Logging: Summary
36www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
•By default, the SAP system saves changes to the most important
logical documents: Purchase Orders, Credit Cards, Vendor
Information…
•It is possible for SAP customers to create their own change
documents, registering changes to other documents.
•This type of logging can be very useful for “business-level” forensics.
http://wiki.sdn.sap.com/wiki/display/CodeExchange/Use+of+Change+documents
http://help.sap.com/saphelp_nw70ehp2/helpdata/en/b8/686150ed102f1ae10000000a44176f/content.htm
ABAP – Change Documents
37www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Description Value
Enabled by default Yes
Physical location of the log file(s) Tables CDHDR, CDPOS
Limit of the log file No limit
Action performed after reaching log
limit
No limit
Centralized logging capabilities Not possible
How to access log(s) contents Report RSSCD200
ABAP – Change Documents: Summary
38www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Detouring Payments
SAP Forensics
39www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Attacks on SAP Gateways – i.e. “EvilTwin”
ID=SWIFT-IFACE01
ID=SWIFT-IFACE01
- Legimate External RFC Server registers at SAP R/3 Gateway.
- Innocent lamb connection establishment...
- Client performs RFC call and Server answers politely.
RESPONSE
- An external RFC malicious client/server appears in scene...
(don’t be afraid, it’s controlled)
- The attacker connects with the original RFC server,
preventing him from serving requests from other clients.
- Now, the same malicious client/server connects with the SAP
R/3 Gateway, registering itself with the same ID as the
original external server
- All future connections to the REG1 server will be attended
by the evil one.
RCF Call
SAP GW
40www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
S Wed Oct 10 2007 11:09:19:974 reginfo accepted server:
TP=IGS.WDFD00146227A, HOST=appserver01.company.com (10.18.94.4)
S Wed Oct 10 2007 11:10:24:975 reginfo accepted server:
TP=IGS.WDFD00146227A, HOST=appserver01.company.com (10.18.94.4)
S Wed Oct 10 2007 11:11:29:976 reginfo accepted server:
TP=SWIFT-IFACE01, HOST=swift.company.com (10.18.94.4)
S Sat Oct 13 2007 23:20:29:976 reginfo accepted server:
TP=SWIFT-IFACE01, HOST=101.205.120.45 (101.205.120.45)
Detecting Eviltwins on SAP Gateways
Gateway log:
41www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Gateway Logging
Useful to detect the following events:
• Start of external RFC servers
• Registration of malicious RFC servers
• Execution of monitor commands
• Change in security configuration
Information retrieved:
• Request contents are determined by the ACTION key.
• Date & time
• Attacker’s source IP
• Activity being performed (starting/registering server, monitor
command being executed, etc)
42www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Gateway Logs: Summary
Description Value
Enabled by default No
Physical location of the log
file(s)
/
usr/sap/<SID>/<INSTANCE>/work/<f
ile_name>
<file_name> is defined by key
LOGFILE
Limit of the log file Specified by MAXSIZEKB (kb)
Action performed after reaching
log limit
Defined by FILEWRAP and
SWITCHTF
Centralized logging capabilities No
How to access log(s) contents Transaction SMGW
43www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Technical
logs and traces
SAP Forensics
44www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
System Trace
● What kind of information do we get from the System Trace events?
● Timestamp
● Username and client
● RFC/Table information
● Transaction/program
● Duration
● Detailed individual fields
The SAP system trace registers internal SAP activity such as database
queries, authorization checks and execution of kernel and RFC
functions, among other things.
45www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
System Trace: Summary
Description Value
Enabled by default No. Activated upon user request
Physical location of the log file(s) /
usr/sap/<SID>/<INSTANCE>/lo
g/TRACE
Limit of the log file By default: 16 Mb per file, 10
files = 160 Mb.
Action performed after reaching log
limit
Overwrites the new files if limits
are reached.
Centralized logging capabilities Not possible
How to access log(s) contents Transaction ST01 -> Analysis
46www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Developer Traces
The developer trace is aimed to register technical activity of each SAP
service. The information registered is highly-dependent on the service:
● RFC information
● Memory information
● Configuration information
● Error information
======> CPIC-CALL: 'ThSAPOCMINIT' : cmRc=20 thRc=236
SAP gateway connection failed. Is SAP gateway started?
ABAP Programm: /BDL/SAPLBDL11 (Transaction: )
Called function module: RFC_PING
User: ZONAPSIS (Client: 001)
Destination: SM_TSMCLNT001_BACK (handle: 7, , {513DB0C7-AE8D-37F0-E100-0000C0A800C1})
SERVER> RFC Server Session (handle: 1, 14445002, {513DB4E0-AE30-37EF-E100-0000C0A800C1})
SERVER> Caller host:
SERVER> Caller transaction code: (Caller Program: /BDL/SAPLBDL11)
SERVER> Called function module: /BDL/RFC_CHECK
Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 2323
CPIC-CALL: 'ThSAPOCMINIT' : cmRc=20 thRc=236
SAP gateway connection failed. Is SAP gateway started?
HOST =192.168.0.197
SERV =sapdp00
A Mon Mar 11 08:21:18 2013
A *GENER* starting inline generation: /1BCDWB/DBUSH12
(reason: program touched by own LUW).
A
A Mon Mar 11 08:21:30 2013
A *GENER* request remote generation: SAPICDT_.
A
A Mon Mar 11 08:21:47 2013
A *GENER* starting inline generation: /1BCDWB/DBUSH04
(reason: program touched by own LUW).
A
A Mon Mar 11 08:26:13 2013
A *GENER* request remote generation: SBAL_DISPLAY.
A *GENER* request remote generation: SAPLSLG3.
M
M Mon Mar 11 08:49:23 2013
M ThIUsrDel: th_rollback_usrdelentry = 1
47www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Developer Traces
The trace level is a numeric value that can be configured from different
sources (even received remotely):
● Profile parameter rdisp/TRACE
● Configured on table RFCDES (T=Y)
● Profile parameters to accept remote trace (enabled by default)
● rdisp/accept_remote_trace_level
● gw/accept_remote_trace_level
● Environmental variables
● CPIC_TRACE
● RFC_TRACE
● Configured in the saprfc.ini or even at command line (-t)
[1] http://wiki.sdn.sap.com/wiki/display/ABAPConn/RFC+Trace+files+Increasing+in+Size
[2] https://service.sap.com/sap/support/notes/573800
48www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Developer Traces
Each SAP service generates a trace file containing technical information
Component File Name
Dispatcher dev_disp
Work Process dev_w<n> n is the work process
number.
Dynp (screen processor), Roll,
Paging, DB interface, ABAP
processor, Enqueue (lock),
Logging, Enqueue (lock),
Logging
dev_dy<n>, dev_ro<n>,
dev_pg<n>, dev_db<n>,
dev_ab<n>, dev_eq<n>,
dev_lg<n>, dev_eq<n>, dev_lg<n>
Message Server dev_ms
SAPGUI (presentation) dev_st<logon name>
APPC-server (CPIC gateway) dev_appc
RFC (Remote Function Call)
facility
dev_rfc, dev_rfc<n>
Gateway dev_rd
49www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Developer Traces: Summary
Description Value
Enabled by default Yes. TRACE level = 1
Physical location of the log file(s) Depends on the service. Files
are located in the following
directory:
/
usr/sap/<SID>/<INSTANCE>/w
ork/
Limit of the log file By default: 16 Mb per file, 10
files = 160 Mb.
Action performed after reaching log
limit
No limit if TRACE_LOGGING not
active. 20 Mb by default per file.
Centralized logging capabilities Not possible
How to access log(s) contents Transaction ST11
50www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
SQL Audit
The SQL Audit logs all OPEN SQL SELECT statements to certain
tables in dialog work processes.
The statements are written into sequential files in the file system of the
application server.
The SQL Audit is not available from BASIS version 8.0 onwards.
There might be a considerable impact on performance (check SAP
Note 115224).
51www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Description Value
Enabled by default No
Physical location of the log file(s) /
usr/sap/<SID>/<INSTANCE>/lo
g/SQL_++++++++.AUD
Limit of the log file By default 645 Mb (cd-rom size)
Action performed after reaching log
limit
Creates a new file
Centralized logging capabilities Not possible
How to access log(s) contents No transaction available
SQL Audit: Summary
52www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
System Log
From the SAP system log we can get technical information regarding
program errors and problems containing:
● Client
● Username
● Transaction
● Program
● Error details
53www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Description Value
Enabled by default Yes
Physical location of the log file(s) /
usr/sap/<SID>/<INSTANCE>/lo
g/SLOG<SYSNR>
Limit of the log file 100000 = 1 Mb (specified by
profile parameter
rslg/max_diskspace/local)
Action performed after reaching log
limit
Overwrites from the beginning
Centralized logging capabilities Disabled by default. Not possible
for Windows-based application
servers
How to access log(s) contents Transaction SM21
System Log: Summary
54www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
ConclusionsConclusions
SAP Forensics
55www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Conclusions
● It is impossible to cover this topic in a 1-hour talk! We had to leave several
logging mechanisms out :(
● SAP is shipped with several features that can be used to support forensics
analysis. However, most of them are disabled by default and must be
explicitly enabled by the administrators.
● It is important to understand the limitations and characteristics of each
feature to ensure we are logging the necessary information. Moreover, the
performance impact of enabling them should be properly analyzed and
understood.
● If it is already difficult to know whether an SAP platform has been
compromised, not recording user and technical activities makes it
impossible.
SAP Forensics
56www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications
Questions?Questions?
Stay tuned!
@onapsis
@marianonunezdc
@jp_pereze
SAP Forensics
57www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics
Thank you!Thank you!

More Related Content

What's hot

SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
Gary Jackson MBCS
 
Sapui5 & Fiori
Sapui5 & FioriSapui5 & Fiori
Sapui5 & Fiori
B.Raj Shekhar
 
Sap script made easy
Sap script made easySap script made easy
Sap script made easy
Kranthi Kumar
 
SAP Smart Business Cockpit for Suite on HANA (SoH)
SAP Smart Business Cockpit for Suite on HANA (SoH)SAP Smart Business Cockpit for Suite on HANA (SoH)
SAP Smart Business Cockpit for Suite on HANA (SoH)
Raja Gupta
 
Sap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4hSap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4h
Akhilendra Singh
 
Sap basis course content
Sap basis course contentSap basis course content
Sap basis course content
Muhammad Shamim
 
SAP Systems Integration by SAP PI (XI)
SAP Systems Integration by SAP PI (XI)SAP Systems Integration by SAP PI (XI)
SAP Systems Integration by SAP PI (XI)
alpercelk
 
Project Report on SAP
Project Report on SAPProject Report on SAP
Project Report on SAP
Sudhanshu Singh
 
SAP Cloud Platform Integration Services – L1 Deck
SAP Cloud Platform Integration Services – L1 DeckSAP Cloud Platform Integration Services – L1 Deck
SAP Cloud Platform Integration Services – L1 Deck
SAP Cloud Platform
 
The Grumpy Tree
The Grumpy TreeThe Grumpy Tree
API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...
SlideTeam
 
SAP Fiori ppt
SAP Fiori pptSAP Fiori ppt
SAP Fiori ppt
Pushkar Vinchurkar
 
Event driven architecture with Kafka
Event driven architecture with KafkaEvent driven architecture with Kafka
Event driven architecture with Kafka
Florence Next
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part II
Ashish Saxena
 
Privacy by Design or Privacy by Re-engineering
Privacy by Design or Privacy by Re-engineeringPrivacy by Design or Privacy by Re-engineering
Privacy by Design or Privacy by Re-engineering
Andre Cardinaal
 
Spring transaction management
Spring transaction managementSpring transaction management
Spring transaction management
Harshit Choudhary
 
SAP ARCHITECTURE (I).pptx
SAP ARCHITECTURE (I).pptxSAP ARCHITECTURE (I).pptx
SAP ARCHITECTURE (I).pptx
Temitope Fagbuyi
 
Sap fiori tutorial
Sap fiori tutorialSap fiori tutorial
Sap fiori tutorial
Nagendra Babu
 
05. sap architecture final and os concepts (1)
05. sap architecture  final and os concepts (1)05. sap architecture  final and os concepts (1)
05. sap architecture final and os concepts (1)
Tarek Hossain Chowdhury
 
Deep Dive into OAuth for Connected Apps
Deep Dive into OAuth for Connected AppsDeep Dive into OAuth for Connected Apps
Deep Dive into OAuth for Connected Apps
Salesforce Developers
 

What's hot (20)

SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
SAP HANA System Replication (HSR) versus SAP Replication Server (SRS)
 
Sapui5 & Fiori
Sapui5 & FioriSapui5 & Fiori
Sapui5 & Fiori
 
Sap script made easy
Sap script made easySap script made easy
Sap script made easy
 
SAP Smart Business Cockpit for Suite on HANA (SoH)
SAP Smart Business Cockpit for Suite on HANA (SoH)SAP Smart Business Cockpit for Suite on HANA (SoH)
SAP Smart Business Cockpit for Suite on HANA (SoH)
 
Sap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4hSap fiori-ux-architecture-for-s4h
Sap fiori-ux-architecture-for-s4h
 
Sap basis course content
Sap basis course contentSap basis course content
Sap basis course content
 
SAP Systems Integration by SAP PI (XI)
SAP Systems Integration by SAP PI (XI)SAP Systems Integration by SAP PI (XI)
SAP Systems Integration by SAP PI (XI)
 
Project Report on SAP
Project Report on SAPProject Report on SAP
Project Report on SAP
 
SAP Cloud Platform Integration Services – L1 Deck
SAP Cloud Platform Integration Services – L1 DeckSAP Cloud Platform Integration Services – L1 Deck
SAP Cloud Platform Integration Services – L1 Deck
 
The Grumpy Tree
The Grumpy TreeThe Grumpy Tree
The Grumpy Tree
 
API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...API Integration For Building Software Applications Powerpoint Presentation Sl...
API Integration For Building Software Applications Powerpoint Presentation Sl...
 
SAP Fiori ppt
SAP Fiori pptSAP Fiori ppt
SAP Fiori ppt
 
Event driven architecture with Kafka
Event driven architecture with KafkaEvent driven architecture with Kafka
Event driven architecture with Kafka
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part II
 
Privacy by Design or Privacy by Re-engineering
Privacy by Design or Privacy by Re-engineeringPrivacy by Design or Privacy by Re-engineering
Privacy by Design or Privacy by Re-engineering
 
Spring transaction management
Spring transaction managementSpring transaction management
Spring transaction management
 
SAP ARCHITECTURE (I).pptx
SAP ARCHITECTURE (I).pptxSAP ARCHITECTURE (I).pptx
SAP ARCHITECTURE (I).pptx
 
Sap fiori tutorial
Sap fiori tutorialSap fiori tutorial
Sap fiori tutorial
 
05. sap architecture final and os concepts (1)
05. sap architecture  final and os concepts (1)05. sap architecture  final and os concepts (1)
05. sap architecture final and os concepts (1)
 
Deep Dive into OAuth for Connected Apps
Deep Dive into OAuth for Connected AppsDeep Dive into OAuth for Connected Apps
Deep Dive into OAuth for Connected Apps
 

Viewers also liked

ETHICS04 - White Collar Crime
ETHICS04 - White Collar CrimeETHICS04 - White Collar Crime
ETHICS04 - White Collar Crime
Michael Heron
 
White collar &amp; blue collar
White collar &amp; blue collarWhite collar &amp; blue collar
White collar &amp; blue collar
Mardiana Moharam
 
Corporate Crime Legal Research Refresher
Corporate Crime Legal Research RefresherCorporate Crime Legal Research Refresher
Corporate Crime Legal Research Refresher
Charlotte Gill
 
Corporate crime presentation
Corporate crime presentationCorporate crime presentation
Corporate crime presentation
O'Neil Blake Football
 
Corporate crime
Corporate crimeCorporate crime
Corporate crime
lemonhusk
 
White Collar Crime Pwr Pnt
White Collar Crime Pwr PntWhite Collar Crime Pwr Pnt
White Collar Crime Pwr Pnt
jessmc1
 

Viewers also liked (6)

ETHICS04 - White Collar Crime
ETHICS04 - White Collar CrimeETHICS04 - White Collar Crime
ETHICS04 - White Collar Crime
 
White collar &amp; blue collar
White collar &amp; blue collarWhite collar &amp; blue collar
White collar &amp; blue collar
 
Corporate Crime Legal Research Refresher
Corporate Crime Legal Research RefresherCorporate Crime Legal Research Refresher
Corporate Crime Legal Research Refresher
 
Corporate crime presentation
Corporate crime presentationCorporate crime presentation
Corporate crime presentation
 
Corporate crime
Corporate crimeCorporate crime
Corporate crime
 
White Collar Crime Pwr Pnt
White Collar Crime Pwr PntWhite Collar Crime Pwr Pnt
White Collar Crime Pwr Pnt
 

Similar to SAP Forensics Detecting White Collar Cyber-crime

Onapsis SAP Forensics: Detecting White-Collar Cyber Crime with SAP Forensics
Onapsis SAP Forensics: Detecting White-Collar Cyber Crime with SAP ForensicsOnapsis SAP Forensics: Detecting White-Collar Cyber Crime with SAP Forensics
Onapsis SAP Forensics: Detecting White-Collar Cyber Crime with SAP Forensics
Onapsis Inc.
 
Pen Testing SAP Critical Information Exposed
Pen Testing SAP Critical Information ExposedPen Testing SAP Critical Information Exposed
Pen Testing SAP Critical Information Exposed
Onapsis Inc.
 
A Holistic View on SAP Security Why Securing Production Systems Is Not Enough
 	A Holistic View on SAP Security Why Securing Production Systems Is Not Enough 	A Holistic View on SAP Security Why Securing Production Systems Is Not Enough
A Holistic View on SAP Security Why Securing Production Systems Is Not Enough
Onapsis Inc.
 
Penetration Testing SAP Systems
Penetration Testing SAP SystemsPenetration Testing SAP Systems
Penetration Testing SAP Systems
Onapsis Inc.
 
Attacks to SAP Web Applications: Your crown jewels online (BlackHat DC)
 	Attacks to SAP Web Applications: Your crown jewels online (BlackHat DC) 	Attacks to SAP Web Applications: Your crown jewels online (BlackHat DC)
Attacks to SAP Web Applications: Your crown jewels online (BlackHat DC)
Onapsis Inc.
 
Attacks Based on Security Configurations
Attacks Based on Security ConfigurationsAttacks Based on Security Configurations
Attacks Based on Security Configurations
Onapsis Inc.
 
SAP Business Objects Attacks
SAP Business Objects AttacksSAP Business Objects Attacks
SAP Business Objects Attacks
Onapsis Inc.
 
Exploiting Critical Attack Vectors to Gain Control of SAP Systems
Exploiting Critical Attack Vectors to Gain Control of SAP SystemsExploiting Critical Attack Vectors to Gain Control of SAP Systems
Exploiting Critical Attack Vectors to Gain Control of SAP Systems
Onapsis Inc.
 
Cyber-Attacks & SAP systems: Is Our Business-Critical Infrastructure Exposed?
Cyber-Attacks & SAP systems: Is Our Business-Critical Infrastructure Exposed?Cyber-Attacks & SAP systems: Is Our Business-Critical Infrastructure Exposed?
Cyber-Attacks & SAP systems: Is Our Business-Critical Infrastructure Exposed?
michelemanzotti
 
Onapsis SAP Backdoors
Onapsis SAP BackdoorsOnapsis SAP Backdoors
Onapsis SAP Backdoors
Onapsis Inc.
 
How Hackers can Open the Safe and Take the Jewels
How Hackers can Open the Safe and Take the JewelsHow Hackers can Open the Safe and Take the Jewels
How Hackers can Open the Safe and Take the Jewels
Onapsis Inc.
 
Incident Response and SAP Systems
Incident Response and SAP SystemsIncident Response and SAP Systems
Incident Response and SAP Systems
Onapsis Inc.
 
Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting workshop (NullCon Goa)Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting workshop (NullCon Goa)
ERPScan
 
Inception of the SAP Platform's Brain: Attacks on SAP Solution Manager
Inception of the SAP Platform's Brain: Attacks on SAP Solution ManagerInception of the SAP Platform's Brain: Attacks on SAP Solution Manager
Inception of the SAP Platform's Brain: Attacks on SAP Solution Manager
Onapsis Inc.
 
SAP security made easy
SAP security made easySAP security made easy
SAP security made easy
ERPScan
 
Practical SAP pentesting (B-Sides San Paulo)
Practical SAP pentesting (B-Sides San Paulo)Practical SAP pentesting (B-Sides San Paulo)
Practical SAP pentesting (B-Sides San Paulo)
ERPScan
 
Blended Web and Database Attacks on Real Time In-memory Platforms
Blended Web and Database Attacks on Real Time In-memory PlatformsBlended Web and Database Attacks on Real Time In-memory Platforms
Blended Web and Database Attacks on Real Time In-memory Platforms
Onapsis Inc.
 
DeltaGRiC_Consulting_SMAC_Digital Innovation Security Conference_Presentation...
DeltaGRiC_Consulting_SMAC_Digital Innovation Security Conference_Presentation...DeltaGRiC_Consulting_SMAC_Digital Innovation Security Conference_Presentation...
DeltaGRiC_Consulting_SMAC_Digital Innovation Security Conference_Presentation...
Tunde Ogunkoya
 
SAP Enterprise Threat Detection Overview
SAP Enterprise Threat Detection OverviewSAP Enterprise Threat Detection Overview
SAP Enterprise Threat Detection Overview
SAP Technology
 
Assess and monitor SAP security
Assess and monitor SAP securityAssess and monitor SAP security
Assess and monitor SAP security
ERPScan
 

Similar to SAP Forensics Detecting White Collar Cyber-crime (20)

Onapsis SAP Forensics: Detecting White-Collar Cyber Crime with SAP Forensics
Onapsis SAP Forensics: Detecting White-Collar Cyber Crime with SAP ForensicsOnapsis SAP Forensics: Detecting White-Collar Cyber Crime with SAP Forensics
Onapsis SAP Forensics: Detecting White-Collar Cyber Crime with SAP Forensics
 
Pen Testing SAP Critical Information Exposed
Pen Testing SAP Critical Information ExposedPen Testing SAP Critical Information Exposed
Pen Testing SAP Critical Information Exposed
 
A Holistic View on SAP Security Why Securing Production Systems Is Not Enough
 	A Holistic View on SAP Security Why Securing Production Systems Is Not Enough 	A Holistic View on SAP Security Why Securing Production Systems Is Not Enough
A Holistic View on SAP Security Why Securing Production Systems Is Not Enough
 
Penetration Testing SAP Systems
Penetration Testing SAP SystemsPenetration Testing SAP Systems
Penetration Testing SAP Systems
 
Attacks to SAP Web Applications: Your crown jewels online (BlackHat DC)
 	Attacks to SAP Web Applications: Your crown jewels online (BlackHat DC) 	Attacks to SAP Web Applications: Your crown jewels online (BlackHat DC)
Attacks to SAP Web Applications: Your crown jewels online (BlackHat DC)
 
Attacks Based on Security Configurations
Attacks Based on Security ConfigurationsAttacks Based on Security Configurations
Attacks Based on Security Configurations
 
SAP Business Objects Attacks
SAP Business Objects AttacksSAP Business Objects Attacks
SAP Business Objects Attacks
 
Exploiting Critical Attack Vectors to Gain Control of SAP Systems
Exploiting Critical Attack Vectors to Gain Control of SAP SystemsExploiting Critical Attack Vectors to Gain Control of SAP Systems
Exploiting Critical Attack Vectors to Gain Control of SAP Systems
 
Cyber-Attacks & SAP systems: Is Our Business-Critical Infrastructure Exposed?
Cyber-Attacks & SAP systems: Is Our Business-Critical Infrastructure Exposed?Cyber-Attacks & SAP systems: Is Our Business-Critical Infrastructure Exposed?
Cyber-Attacks & SAP systems: Is Our Business-Critical Infrastructure Exposed?
 
Onapsis SAP Backdoors
Onapsis SAP BackdoorsOnapsis SAP Backdoors
Onapsis SAP Backdoors
 
How Hackers can Open the Safe and Take the Jewels
How Hackers can Open the Safe and Take the JewelsHow Hackers can Open the Safe and Take the Jewels
How Hackers can Open the Safe and Take the Jewels
 
Incident Response and SAP Systems
Incident Response and SAP SystemsIncident Response and SAP Systems
Incident Response and SAP Systems
 
Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting workshop (NullCon Goa)Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting workshop (NullCon Goa)
 
Inception of the SAP Platform's Brain: Attacks on SAP Solution Manager
Inception of the SAP Platform's Brain: Attacks on SAP Solution ManagerInception of the SAP Platform's Brain: Attacks on SAP Solution Manager
Inception of the SAP Platform's Brain: Attacks on SAP Solution Manager
 
SAP security made easy
SAP security made easySAP security made easy
SAP security made easy
 
Practical SAP pentesting (B-Sides San Paulo)
Practical SAP pentesting (B-Sides San Paulo)Practical SAP pentesting (B-Sides San Paulo)
Practical SAP pentesting (B-Sides San Paulo)
 
Blended Web and Database Attacks on Real Time In-memory Platforms
Blended Web and Database Attacks on Real Time In-memory PlatformsBlended Web and Database Attacks on Real Time In-memory Platforms
Blended Web and Database Attacks on Real Time In-memory Platforms
 
DeltaGRiC_Consulting_SMAC_Digital Innovation Security Conference_Presentation...
DeltaGRiC_Consulting_SMAC_Digital Innovation Security Conference_Presentation...DeltaGRiC_Consulting_SMAC_Digital Innovation Security Conference_Presentation...
DeltaGRiC_Consulting_SMAC_Digital Innovation Security Conference_Presentation...
 
SAP Enterprise Threat Detection Overview
SAP Enterprise Threat Detection OverviewSAP Enterprise Threat Detection Overview
SAP Enterprise Threat Detection Overview
 
Assess and monitor SAP security
Assess and monitor SAP securityAssess and monitor SAP security
Assess and monitor SAP security
 

More from Onapsis Inc.

Preventing Vulnerabilities in SAP HANA based Deployments
Preventing Vulnerabilities in SAP HANA based DeploymentsPreventing Vulnerabilities in SAP HANA based Deployments
Preventing Vulnerabilities in SAP HANA based Deployments
Onapsis Inc.
 
Onapsis Security Platform: Detection and Response
Onapsis Security Platform: Detection and ResponseOnapsis Security Platform: Detection and Response
Onapsis Security Platform: Detection and Response
Onapsis Inc.
 
Your Crown Jewels Online: Further Attacks to SAP Web Applications (RSAConfe...
 	Your Crown Jewels Online: Further Attacks to SAP Web Applications (RSAConfe... 	Your Crown Jewels Online: Further Attacks to SAP Web Applications (RSAConfe...
Your Crown Jewels Online: Further Attacks to SAP Web Applications (RSAConfe...
Onapsis Inc.
 
Unbreakable oracle er_ps_siebel_jd_edwards
Unbreakable oracle er_ps_siebel_jd_edwardsUnbreakable oracle er_ps_siebel_jd_edwards
Unbreakable oracle er_ps_siebel_jd_edwards
Onapsis Inc.
 
Inception of the SAP Platforms Brain: Attacks on SAP Solution Manager
Inception of the SAP Platforms Brain: Attacks on SAP Solution ManagerInception of the SAP Platforms Brain: Attacks on SAP Solution Manager
Inception of the SAP Platforms Brain: Attacks on SAP Solution Manager
Onapsis Inc.
 
Highway to Production Securing the SAP TMS
Highway to Production Securing the SAP TMSHighway to Production Securing the SAP TMS
Highway to Production Securing the SAP TMS
Onapsis Inc.
 
Dissecting and Attacking RMI Frameworks
Dissecting and Attacking RMI FrameworksDissecting and Attacking RMI Frameworks
Dissecting and Attacking RMI Frameworks
Onapsis Inc.
 

More from Onapsis Inc. (7)

Preventing Vulnerabilities in SAP HANA based Deployments
Preventing Vulnerabilities in SAP HANA based DeploymentsPreventing Vulnerabilities in SAP HANA based Deployments
Preventing Vulnerabilities in SAP HANA based Deployments
 
Onapsis Security Platform: Detection and Response
Onapsis Security Platform: Detection and ResponseOnapsis Security Platform: Detection and Response
Onapsis Security Platform: Detection and Response
 
Your Crown Jewels Online: Further Attacks to SAP Web Applications (RSAConfe...
 	Your Crown Jewels Online: Further Attacks to SAP Web Applications (RSAConfe... 	Your Crown Jewels Online: Further Attacks to SAP Web Applications (RSAConfe...
Your Crown Jewels Online: Further Attacks to SAP Web Applications (RSAConfe...
 
Unbreakable oracle er_ps_siebel_jd_edwards
Unbreakable oracle er_ps_siebel_jd_edwardsUnbreakable oracle er_ps_siebel_jd_edwards
Unbreakable oracle er_ps_siebel_jd_edwards
 
Inception of the SAP Platforms Brain: Attacks on SAP Solution Manager
Inception of the SAP Platforms Brain: Attacks on SAP Solution ManagerInception of the SAP Platforms Brain: Attacks on SAP Solution Manager
Inception of the SAP Platforms Brain: Attacks on SAP Solution Manager
 
Highway to Production Securing the SAP TMS
Highway to Production Securing the SAP TMSHighway to Production Securing the SAP TMS
Highway to Production Securing the SAP TMS
 
Dissecting and Attacking RMI Frameworks
Dissecting and Attacking RMI FrameworksDissecting and Attacking RMI Frameworks
Dissecting and Attacking RMI Frameworks
 

Recently uploaded

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 

Recently uploaded (20)

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 

SAP Forensics Detecting White Collar Cyber-crime

  • 1. SAP Forensics Detecting White-Collar Cyber-crime March 13th , 2013 Troopers Security Conference Mariano NunezMariano Nunez mnunez@onapsis.commnunez@onapsis.com @marianonunezdc@marianonunezdc Juan Perez-EtchegoyenJuan Perez-Etchegoyen jppereze@onapsis.comjppereze@onapsis.com @jp_pereze@jp_pereze
  • 2. 2www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Disclaimer This publication is copyright 2013 Onapsis Inc. – All rights reserved. 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.
  • 3. 3www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Who is Onapsis Inc.?  Company focused in protecting ERP systems from cyber-attacks (SAP® , Siebel® , Oracle® E-Business SuiteTM , PeopleSoft® , JD Edwards® …).  Working with Global Fortune-100 and large governmental organizations.  What does Onapsis do?  Innovative ERP security software (Onapsis X1, Onapsis IPS, Onapsis Bizploit).  ERP security professional services.  Trainings on ERP security. Who are we?  Mariano Nunez, CEO at Onapsis.  Juan Perez-Etchegoyen, CTO at Onapsis.  Ezequiel Gutesman & Nahuel Sanchez from Onapsis (Research Labs).  Discovered several vulnerabilities in SAP and Oracle ERPs...  Speakers/Trainers at BlackHat, RSA, SAP GRC, HITB, Source, DeepSec...  TROOPERS’ fans! Attacks on SAP Solution ManagerSAP Forensics
  • 4. 4www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Agenda  Introduction to SAP  Forensics on SAP platforms  Sample attacks and audit trails  Conclusions Cyber-Attacks to SAP SystemsSAP Forensics
  • 5. 5www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications IntroductionIntroduction SAP Forensics
  • 6. 6www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics What is SAP? ● Largest provider of business management solutions in the world. ● More than 140.000 implementations around the globe. ● More than 90.000 customers in 120 countries. ● Used by Global Fortune-1000 companies, governmental organizations and defense agencies to run their every-day business processes. BIBI SCMSCM ERPERP PIPI CRMCRM SMSM BOBO SRMSRM PLMPLM PORTALPORTAL GRCGRC
  • 7. 7www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Ok, so… what is SAP? ● In plain English: the systems that safeguard the business crown jewels.
  • 8. 8www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Cyber-attacks on SAP systems = $$$ ● If the SAP platform is breached, an intruder would be able to perform different attacks such as: ESPIONAGE: Obtain customers/vendors/human resources data, financial planning information, balances, profits, sales information, manufacturing recipes, etc. SABOTAGE: Paralyze the operation of the organization by shutting down the SAP system, disrupting interfaces with other systems and deleting critical information, etc. FRAUD: Modify financial information, tamper sales and purchase orders, create new vendors, modify vendor bank account numbers, etc.
  • 9. 9www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics An attacker will exploit our Achilles’ heel… • SAP systems are built upon several layers. • The SAP Application Layer (NetWeaver/BASIS) is common to most modern SAP solutions, serving as the base technological framework. Note: The Database and Operating System layers should not be forgotten! Traditional techniques apply. Warning: reduced accountability due to SAP’s using of single users (<sid>adm, SAPService<SID>, SAPR3,…) Operating System Database SAP Business Logic SAP Application Layer SAP Solution Base Infrastructure
  • 10. Over 95% of the SAP systems we evaluated were exposed to espionage, sabotage and fraud attacks due to vulnerabilities in the SAP Application Layer. Unlike SoD gaps, attackers do not need access credentials to exploit this kind of vulnerabilities…
  • 11. 11www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Forensics onForensics on SAP systemsSAP systems SAP Forensics
  • 12. 12www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Forensics & SAP ● According to Wikipedia “Digital forensics (sometimes known as digital forensic science) is a branch of forensic science encompassing the recovery and investigation of material found in digital devices, often in relation to computer crime”. ● We are looking for an answer to these questions: ● Has my SAP platform been hacked? ● Is it being attacked right now? We’ll cover some of the standard capabilities provided in SAP systems to register evidence of user activity and/or attacks
  • 13. Our SAP systems have never been hacked… ƒGreat! I’m glad we have configured the audit trails and are reviewing the logs… Audit trails? Logs? What are you talking about? We are doomed.
  • 14. On October 30th 2012, Anonymous claimed intent to exploit SAP systems They claimed to have broken into the Greek Ministry of Finance (to be confirmed) and mentioned: "We have new guns in our arsenal. A sweet 0day SAP exploit is in our hands and oh boy we're gonna sploit the hell out of it."
  • 15. 15www.onapsis.com – © 2013 Onapsis , Inc. – All rights reserved Attacker performs fraudulent business process / access info SAP Forensics SAP Forensics & The Anatomy of an Attack ● Several SAP components are shipped with out-of-the-box capabilities to register user and technical activities. ● In this talk we will analyze the most important ones, describing their strengths, weaknesses and type of events that can be extracted from them, following the “course of action” of a sample SAP attack. Anonymous attacker gains access to the system / valid user elevates privileges Anonymous attacker gains access to the system / valid user elevates privileges
  • 16. 16www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Initial Recon SAP Forensics
  • 17. 17www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics The SAP Web Dispatcher ● The SAP Web Dispatcher is a reverse-proxy mainly used for load-balancing of HTTP(S) connections to SAP Web servers. ● It can also be used as a rudimentary Web Application Firewall. ● The Auditing and Tracing features also apply to the SAP Web Application Server (ICM).
  • 18. 18www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Web Dispatcher – Security Log Useful to detect the following events: • HTTP fuzzing attempts • Null bytes in request • Bad protocol specification • Incorrect logon attempts to Web administration interfaces Information retrieved: • Date & time • Attacker’s source IP • Request contents (depth defined by key LEVEL)
  • 19. 19www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Web Dispatcher - Security Log: Summary Description Value Enabled by default WD: No ICM: Yes Physical location of the log file(s) WD: specified by admin ICM: /usr/sap/<SID>/<INSTANCE>/work/ dev_icm_sec Limit of the log file Specified by MAXSIZEKB (kb) – Need SAP Note to work! Action performed after reaching log limit Defined by FILEWRAP Centralized logging capabilities No How to access log(s) contents WD: Operating system access ICM: Transaction MICM
  • 20. 20www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Web Dispatcher – HTTP Log Useful to detect the following events: • Incorrect logon attempts (401 responses) • HTTP fuzzing attempts (400 responses) • Access to dangerous Web applications Information retrieved: • Request contents are determined by the LOGFORMAT key. • Date & time • Attacker’s source IP • User specified for authentication • HTTP Request parameters and headers • HTTP Response Code
  • 21. 21www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Web Dispatcher – HTTP Log: Summary Description Value Enabled by default WD: No ICM: No Physical location of the log file(s) Specified by parameter icm/HTTP/logging_XX Limit of the log file Specified by MAXSIZEKB (kb) Action performed after reaching log limit Defined by FILEWRAP and SWITCHTF Centralized logging capabilities No How to access log(s) contents WD: Operating system access ICM: Transaction MICM
  • 22. 22www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics The SAProuter ● The SAProuter is a reverse proxy used to restrict remote access to SAP platforms. ● Restrict connections through a firewall-like ACL file called Route Permission Table.
  • 23. 23www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Threats Affecting SAProuters ● From the Onapsis Research Labs, we have researched on the following attack vectors over SAProuter systems: ● Discovering established connections (connected clients & backend SAP servers). ● Performing port-scans of internal systems. ● Routing native protocols - proxying protocols such as SSH or HTTP and accessing internal services. Detailed information about these risks and their mitigation techinques: •The “Securing the Gate to the Kingdom: Auditing the SAProuter” whitepaper •The ERP Security Blog
  • 24. 24www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Attacks on SAProuter SAP Forensics
  • 25. 25www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Detecting Attacks on SAProuters Mon May 31 14:30:45 2010 CONNECT FROM C1/- host 192.168.0.1/43556 Mon May 31 14:30:45 2010 CONNECT TO S1/2 host 192.168.0.105/3200 (192.168.0.105) Mon May 31 14:30:58 2010 DISCONNECT S1/2 host 192.168.0.105/3200 (192.168.0.105) Regular connection (accepted) Mon May 31 14:32:25 2010 CONNECT FROM C1/- host 192.168.0.1/44654 Mon May 31 14:32:25 2010 PERM DENIED C1/- host 192.168.0.1 (192.168.0.1) to 192.168.0.105/3201 Mon May 31 14:32:25 2010 DISCONNECT C1/- host 192.168.0.1/44654 (192.168.0.1) Regular connection (rejected)
  • 26. 26www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Detecting Attacks on SAProuters Mon May 31 14:34:54 2010 CONNECT FROM C1/- host 192.168.0.1/4218 Mon May 31 14:34:54 2010 PERM DENIED C1/- info request Mon May 31 14:34:54 2010 DISCONNECT C1/- host 192.168.0.1/4218 (192.168.0.1) Info-request (rejected) Mon May 31 14:51:38 2010 CONNECT FROM C2/- host 192.168.0.1/54650 Mon May 31 14:51:38 2010 CONNECT TO S2/1 host 192.168.0.105/22 (192.168.0.1), ***NATIVE ROUTING *** Native connection Mon May 31 14:33:13 2010 CONNECT FROM C1/- host 192.168.0.1/4218 Mon May 31 14:33:13 2010 SEND INFO TO C1/- Mon May 31 14:33:13 2010 DISCONNECT C1/- host 192.168.0.1/4218 (192.168.0.1) Info-request (accepted)
  • 27. 27www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Detecting Attacks on SAProuters Wed Jun 30 22:28:16 2010 CONNECT FROM C1/- host 10.0.0.1/56734 Wed Jun 30 22:28:16 2010 PERM DENIED C1/- host 10.0.0.1 (10.0.0.1) to 192.168.3.2/3200 Wed Jun 30 22:28:16 2010 DISCONNECT C1/- host 10.0.0.1/56734 (10.0.0.1) Wed Jun 30 22:28:16 2010 CONNECT FROM C1/- host 10.0.0.1/56735 Wed Jun 30 22:28:16 2010 PERM DENIED C1/- host 10.0.0.1 (10.0.0.1) to 192.168.3.2/3201 Wed Jun 30 22:28:16 2010 DISCONNECT C1/- host 10.0.0.1/56735 (10.0.0.1) Wed Jun 30 22:28:16 2010 CONNECT FROM C1/- host 10.0.0.1/56736 Wed Jun 30 22:28:16 2010 PERM DENIED C1/- host 10.0.0.1 (10.0.0.1) to 192.168.3.2/3202 Wed Jun 30 22:28:16 2010 DISCONNECT C1/- host 10.0.0.1/56736 (10.0.0.1) Wed Jun 30 22:28:16 2010 CONNECT FROM C1/- host 10.0.0.1/56737 Wed Jun 30 22:28:16 2010 PERM DENIED C1/- host 10.0.0.1 (10.0.0.1) to 192.168.3.2/3203 Wed Jun 30 22:28:17 2010 DISCONNECT C1/- host 10.0.0.1/56737 (10.0.0.1) … Detecting Port-scanning Attacks
  • 28. 28www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics The SAProuter Log: Summary Description Value Enabled by default No Physical location of the log file(s) Specified by the administrator through the –G option Limit of the log file None by default. Can be specified by option –J Action performed after reaching log limit If limit is defined, starts logging to a new file Centralized logging capabilities No How to access log(s) contents Operating system access
  • 29. 29www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Bruteforce Attacks SAP Forensics
  • 30. 30www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Security Audit Log (SAL) is the security auditing feature provided by SAP. It enabled the identification of security-related events such as: • Successful and unsuccessful dialog logon attempts • Successful and unsuccessful RFC logon attempts • RFC calls to function modules • Changes to user master records • Successful and unsuccessful transaction starts • Changes to the SAL configuration Each event contains information about: • Timestamp • User, client and terminal (source system) • Details of the activity performed ABAP – Security Audit Log
  • 31. 31www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Description Value Enabled by default No Physical location of the log file(s) / usr/sap/<SID>/<INSTANCE>/lo g/audit_date Limit of the log file By default 20 Mb per audit file Action performed after reaching log limit Stops logging until next file is initialized (until the end of the day). Centralized logging capabilities Not possible How to access log(s) contents Transaction SM20 ABAP – Security Audit Log: Summary
  • 32. 32www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics What kind of information will we get from the traces events?: ● Timestamp ● User who made the change ● Modified username and client (with the old and new values) ● Transaction/program The SAP system is configured by default to register all user and authorizations activity. ABAP – User & Authorizations
  • 33. 33www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Description Value Enabled by default Yes Physical location of the log file(s) Tables USH02, USH04, USH10, USH12… Limit of the log file No limit Action performed after reaching log limit N/A Centralized logging capabilities Not possible How to access log(s) contents Report RSUSR100N ABAP – User & Authorizations: Summary
  • 34. 34www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics On SAP, all information is stored in tables and changes to these tables can reach the SAP system in two different ways: •Changes performed by the system (rec/client) •Changes performed through the transport system (recclient) It is possible to restrict the client(s) and the transparent table(s) for which to log changes. All changes are saved into table DBTABLOG, containing: • Timestamp • User and client • Table and field values (old and new) ABAP – Table Change Logging
  • 35. 35www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Description Value Enabled by default No Physical location of the log file(s) Table DBTABLOG Limit of the log file No limit Action performed after reaching log limit N/A Centralized logging capabilities Not possible How to access log(s) contents Transaction SCU3 ABAP – Table Change Logging: Summary
  • 36. 36www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics •By default, the SAP system saves changes to the most important logical documents: Purchase Orders, Credit Cards, Vendor Information… •It is possible for SAP customers to create their own change documents, registering changes to other documents. •This type of logging can be very useful for “business-level” forensics. http://wiki.sdn.sap.com/wiki/display/CodeExchange/Use+of+Change+documents http://help.sap.com/saphelp_nw70ehp2/helpdata/en/b8/686150ed102f1ae10000000a44176f/content.htm ABAP – Change Documents
  • 37. 37www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Description Value Enabled by default Yes Physical location of the log file(s) Tables CDHDR, CDPOS Limit of the log file No limit Action performed after reaching log limit No limit Centralized logging capabilities Not possible How to access log(s) contents Report RSSCD200 ABAP – Change Documents: Summary
  • 38. 38www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Detouring Payments SAP Forensics
  • 39. 39www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Attacks on SAP Gateways – i.e. “EvilTwin” ID=SWIFT-IFACE01 ID=SWIFT-IFACE01 - Legimate External RFC Server registers at SAP R/3 Gateway. - Innocent lamb connection establishment... - Client performs RFC call and Server answers politely. RESPONSE - An external RFC malicious client/server appears in scene... (don’t be afraid, it’s controlled) - The attacker connects with the original RFC server, preventing him from serving requests from other clients. - Now, the same malicious client/server connects with the SAP R/3 Gateway, registering itself with the same ID as the original external server - All future connections to the REG1 server will be attended by the evil one. RCF Call SAP GW
  • 40. 40www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics S Wed Oct 10 2007 11:09:19:974 reginfo accepted server: TP=IGS.WDFD00146227A, HOST=appserver01.company.com (10.18.94.4) S Wed Oct 10 2007 11:10:24:975 reginfo accepted server: TP=IGS.WDFD00146227A, HOST=appserver01.company.com (10.18.94.4) S Wed Oct 10 2007 11:11:29:976 reginfo accepted server: TP=SWIFT-IFACE01, HOST=swift.company.com (10.18.94.4) S Sat Oct 13 2007 23:20:29:976 reginfo accepted server: TP=SWIFT-IFACE01, HOST=101.205.120.45 (101.205.120.45) Detecting Eviltwins on SAP Gateways Gateway log:
  • 41. 41www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Gateway Logging Useful to detect the following events: • Start of external RFC servers • Registration of malicious RFC servers • Execution of monitor commands • Change in security configuration Information retrieved: • Request contents are determined by the ACTION key. • Date & time • Attacker’s source IP • Activity being performed (starting/registering server, monitor command being executed, etc)
  • 42. 42www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Gateway Logs: Summary Description Value Enabled by default No Physical location of the log file(s) / usr/sap/<SID>/<INSTANCE>/work/<f ile_name> <file_name> is defined by key LOGFILE Limit of the log file Specified by MAXSIZEKB (kb) Action performed after reaching log limit Defined by FILEWRAP and SWITCHTF Centralized logging capabilities No How to access log(s) contents Transaction SMGW
  • 43. 43www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Technical logs and traces SAP Forensics
  • 44. 44www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics System Trace ● What kind of information do we get from the System Trace events? ● Timestamp ● Username and client ● RFC/Table information ● Transaction/program ● Duration ● Detailed individual fields The SAP system trace registers internal SAP activity such as database queries, authorization checks and execution of kernel and RFC functions, among other things.
  • 45. 45www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics System Trace: Summary Description Value Enabled by default No. Activated upon user request Physical location of the log file(s) / usr/sap/<SID>/<INSTANCE>/lo g/TRACE Limit of the log file By default: 16 Mb per file, 10 files = 160 Mb. Action performed after reaching log limit Overwrites the new files if limits are reached. Centralized logging capabilities Not possible How to access log(s) contents Transaction ST01 -> Analysis
  • 46. 46www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Developer Traces The developer trace is aimed to register technical activity of each SAP service. The information registered is highly-dependent on the service: ● RFC information ● Memory information ● Configuration information ● Error information ======> CPIC-CALL: 'ThSAPOCMINIT' : cmRc=20 thRc=236 SAP gateway connection failed. Is SAP gateway started? ABAP Programm: /BDL/SAPLBDL11 (Transaction: ) Called function module: RFC_PING User: ZONAPSIS (Client: 001) Destination: SM_TSMCLNT001_BACK (handle: 7, , {513DB0C7-AE8D-37F0-E100-0000C0A800C1}) SERVER> RFC Server Session (handle: 1, 14445002, {513DB4E0-AE30-37EF-E100-0000C0A800C1}) SERVER> Caller host: SERVER> Caller transaction code: (Caller Program: /BDL/SAPLBDL11) SERVER> Called function module: /BDL/RFC_CHECK Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 2323 CPIC-CALL: 'ThSAPOCMINIT' : cmRc=20 thRc=236 SAP gateway connection failed. Is SAP gateway started? HOST =192.168.0.197 SERV =sapdp00 A Mon Mar 11 08:21:18 2013 A *GENER* starting inline generation: /1BCDWB/DBUSH12 (reason: program touched by own LUW). A A Mon Mar 11 08:21:30 2013 A *GENER* request remote generation: SAPICDT_. A A Mon Mar 11 08:21:47 2013 A *GENER* starting inline generation: /1BCDWB/DBUSH04 (reason: program touched by own LUW). A A Mon Mar 11 08:26:13 2013 A *GENER* request remote generation: SBAL_DISPLAY. A *GENER* request remote generation: SAPLSLG3. M M Mon Mar 11 08:49:23 2013 M ThIUsrDel: th_rollback_usrdelentry = 1
  • 47. 47www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Developer Traces The trace level is a numeric value that can be configured from different sources (even received remotely): ● Profile parameter rdisp/TRACE ● Configured on table RFCDES (T=Y) ● Profile parameters to accept remote trace (enabled by default) ● rdisp/accept_remote_trace_level ● gw/accept_remote_trace_level ● Environmental variables ● CPIC_TRACE ● RFC_TRACE ● Configured in the saprfc.ini or even at command line (-t) [1] http://wiki.sdn.sap.com/wiki/display/ABAPConn/RFC+Trace+files+Increasing+in+Size [2] https://service.sap.com/sap/support/notes/573800
  • 48. 48www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Developer Traces Each SAP service generates a trace file containing technical information Component File Name Dispatcher dev_disp Work Process dev_w<n> n is the work process number. Dynp (screen processor), Roll, Paging, DB interface, ABAP processor, Enqueue (lock), Logging, Enqueue (lock), Logging dev_dy<n>, dev_ro<n>, dev_pg<n>, dev_db<n>, dev_ab<n>, dev_eq<n>, dev_lg<n>, dev_eq<n>, dev_lg<n> Message Server dev_ms SAPGUI (presentation) dev_st<logon name> APPC-server (CPIC gateway) dev_appc RFC (Remote Function Call) facility dev_rfc, dev_rfc<n> Gateway dev_rd
  • 49. 49www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Developer Traces: Summary Description Value Enabled by default Yes. TRACE level = 1 Physical location of the log file(s) Depends on the service. Files are located in the following directory: / usr/sap/<SID>/<INSTANCE>/w ork/ Limit of the log file By default: 16 Mb per file, 10 files = 160 Mb. Action performed after reaching log limit No limit if TRACE_LOGGING not active. 20 Mb by default per file. Centralized logging capabilities Not possible How to access log(s) contents Transaction ST11
  • 50. 50www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics SQL Audit The SQL Audit logs all OPEN SQL SELECT statements to certain tables in dialog work processes. The statements are written into sequential files in the file system of the application server. The SQL Audit is not available from BASIS version 8.0 onwards. There might be a considerable impact on performance (check SAP Note 115224).
  • 51. 51www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Description Value Enabled by default No Physical location of the log file(s) / usr/sap/<SID>/<INSTANCE>/lo g/SQL_++++++++.AUD Limit of the log file By default 645 Mb (cd-rom size) Action performed after reaching log limit Creates a new file Centralized logging capabilities Not possible How to access log(s) contents No transaction available SQL Audit: Summary
  • 52. 52www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics System Log From the SAP system log we can get technical information regarding program errors and problems containing: ● Client ● Username ● Transaction ● Program ● Error details
  • 53. 53www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Description Value Enabled by default Yes Physical location of the log file(s) / usr/sap/<SID>/<INSTANCE>/lo g/SLOG<SYSNR> Limit of the log file 100000 = 1 Mb (specified by profile parameter rslg/max_diskspace/local) Action performed after reaching log limit Overwrites from the beginning Centralized logging capabilities Disabled by default. Not possible for Windows-based application servers How to access log(s) contents Transaction SM21 System Log: Summary
  • 54. 54www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications ConclusionsConclusions SAP Forensics
  • 55. 55www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Conclusions ● It is impossible to cover this topic in a 1-hour talk! We had to leave several logging mechanisms out :( ● SAP is shipped with several features that can be used to support forensics analysis. However, most of them are disabled by default and must be explicitly enabled by the administrators. ● It is important to understand the limitations and characteristics of each feature to ensure we are logging the necessary information. Moreover, the performance impact of enabling them should be properly analyzed and understood. ● If it is already difficult to know whether an SAP platform has been compromised, not recording user and technical activities makes it impossible. SAP Forensics
  • 56. 56www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedAttacks to SAP Web Applications Questions?Questions? Stay tuned! @onapsis @marianonunezdc @jp_pereze SAP Forensics
  • 57. 57www.onapsis.com – © 2013 Onapsis , Inc. – All rights reservedSAP Forensics Thank you!Thank you!