SlideShare a Scribd company logo
Exploiting new default accounts in SAP systems
Introduction
Something about SAP security
Unknown default accounts
Impact
Exploitation: combination with other vulnerabilities
Research
Solutions
Concluding
Agenda
Introduction
Who is ERP-SEC
• Company specialised in securing SAP systems and infrastructures
• Regular presenters on SAP Security
• Research: Reported and credited for dozens of SAP vulnerabilities
• Developer Protect4S – SAP Certified Security Analyser for SAPTM
• SAP Development Partner
• Our mission is to raise the security of mission–critical SAP platforms with minimal
impact on day–to–day business.
Who am I
• SAP Technology enthusiast
• SAP security researcher (1395)
• Co-founder ERP-SEC
• 15+ years background in SAP technology / SAP security (SAP basis)
Something about SAP
• Market leader in enterprise application software
• ~ 300.000 customers worldwide
• SAP customers include:
– 87% of the Forbes Global 2000 companies
– 98% of the 100 most valued brands
• Headquarters: Walldorf, Germany, offices in more than 130 countries
• Founded April 1, 1972
• Over 75.000 employees worldwide
• 74% of the world’s transaction revenue touches an SAP system
• Bottomline: Interesting Target!
Source: http://www.sap.com/bin/sapcom/en_us/downloadasset.2016-01-jan-26-01.SAP-Corporate-Fact-Sheet-En-20160126-pdf.bypassReg.html
Something about SAP
Switzerland – IPv4 scanning for SAProuter, SAP RFC Gateway and SAP Diag ports
Something about SAP
http://zonums.com/iptools/ipmapper.php
SAP Security
General state of SAP security
• We see more awareness at customers for SAP security but from awareness to action is
still not the default
• The bigger the company, the more SAP security they do
• Still a large part of customers lack basic security measures, especially the ones outside
the Fortune 2000
• SAP is working hard to improve security for years now. See for example the SAP
Security Baseline. Now it’s up to customers to take action…
• In 100% of our SAP Security assessments we found SAP default accounts.
SAP Security
When doing SAP Security assessments…
No need to explain: most easy way in via username & password
Who needs buffer overflows, DEP/ASLR bypass, XSS, SQLi when you have credentials
Two big attack vectors in every SAP system:
• SAP Default accounts
• SAP RFC gateway (and from there RFC pivoting …)
Owning SAP systems often comes down to getting access to credentials.
Sniff / social engineer / phish for accounts
Easiest option: Default accounts!!!
Default accounts and IoT
Default accounts - Mirai
http://www.csoonline.com/article/3126924/security/here-are-the-61-passwords-that-powered-the-mirai-iot-botnet.html
Default SAP accounts
Publically known SAP default accounts
RISK USER PASSWORD CLIENT REMARK
Very High SAP* 06071992 / PASS 001,066,etc… Hardcoded kernel user
Very High IDEADM admin
Almost all IDES
clients Only in IDES systems
Very High DDIC 19920706 000,001,… User has SAP_ALL
High CTB_ADMIN sap123 N.A. Java user
High EARLYWATCH SUPPORT 066
Has rights to get password hash for SAP*
from USR02 table and sometimes OS
execution
Medium TMSADM
PASSWORD /
$1Pawd2&
000, sometimes
copied to others
A new default password as the old one was
too well known?
Medium /
Low SAPCPIC ADMIN 000,001
Can be used for information retrieval and in
some cases for vulnerabilities where only
authentication is needed
Default SAP accounts
Accounts with a previously unknown SAP default password
Let’s meet some new default accounts*:
*The list does not include the more recent users like for example SM_<SM-SID> that are created with a custom password
CVE-2016-4033
RISK USER TYPE PASSWORD SOLMAN SATELLITE
HIGH SMD_ADMIN System init1234 X
HIGH SMD_BI_RFC System init1234 X
HIGH SMD_RFC System init1234 X
HIGH SOLMAN_ADMIN Dialog init1234 X
HIGH SOLMAN_BTC System init1234 X
HIGH SAPSUPPORT Dialog init1234 X X
HIGH SOLMAN<SID><CLNT> Dialog init1234 X
MED/HIGH SMDAGENT_<SID> System init1234 X X
MED CONTENTSERV System init1234 X
MED SMD_AGT System init1234 X
How do these users get created?
Every customer has a SAP Solution Manager.
Transaction SOLMAN_SETUP starts wizards for basic system setup and additional scenario’s
How do these users get created?
Class CL_SISE_CONSTANTS contains default attributes for the password
Why do these users get created?
• The SAP Solution Manager supports many scenario’s for managing the SAP landscape
• When scenario’s are activated, specific users are created per scenario
• Some examples of scenario’s:
– Technical monitoring
– Data volume management
– Custom code management
Where do they get created?
• Most user get created in Solution Manager,
• SMDAGENT_<SID> user also in satellite systems for Solution Manager Diagnostics
scenario
USER TYPE PASSWORD SOLMAN SATELLITE
SMD_ADMIN System init1234 X
SMD_BI_RFC System init1234 X
SMD_RFC System init1234 X
SOLMAN_ADMIN Dialog init1234 X
SOLMAN_BTC System init1234 X
SAPSUPPORT Dialog init1234 X X
SOLMAN<SID><CLNT> Dialog init1234 X
SMD_AGT System init1234 X
CONTENTSERV System init1234 X
SMDAGENT_<SID> System init1234 X X
Impact
SAP Solution Manager, right in the middle of your business systems…
• The SAP Solution Manager is the heart of your SAP landscape and connects to the
other SAP systems
• Often seen as the ‘Spider in the web’ or the ‘Active Directory’ of SAP landscapes
• Leaves the entire SAP landscape at risk when compromised.
Impact
So how bad is this…
• If those users exist with the default password? BAD!
• Some of these users have broad authorisations. In some cases profile
SAP_J2EE_ADMIN was added.
• The SAP Solution Manager is often seen as a technical system, authorisations
handled by the basis team (not their core business).
• See the SAP Security guide for all created users and roles.
Exploitation
(Combined with other Vulnerabilities) these users can do
• Native SQL execution
• SMB relay
• OS command execution
• Creating new SAP users
• Retreival and bruteforcing of password hashes
• Etc, etc…
All leading to a Full business compromise!
Exploitation
Exploitation Example 1
• Dialog user SAPSUPPORT / init1234
• Has many roles, amongst which ZSAP_SM_SA38  execute any ABAP program:
• Use program RSSAA_CALLEXTERN to inject OS commands
Exploitation
Exploitation
Exploitation Example 2: Snagging SAP credentials
• System user SMDAGENT_<SID>
• Exists in Sol. Manager AND connected systems!
• Combines remote FM (/SDF/GEN_PROXY ) that
acts as wrapper to call local FM
(/SDF/RBE_NATSQL_SELECT ) to execute SQL
• Retreive ANY DB table content.
• Example: PW hashes --> bruteforce offline
Exploitation
Exploitation
Exploitation Example 3
• System user SOLMAN_BTC / init1234
• Can be used to execute OS commands via Function Module SXPG_STEP_XPG_START
• And from there use the implicit trust relation to the Database to create an SAP user
directly in the SAP database with SAP_ALL (no application level audit).
Exploitation
Exploitation
Exploitation Example 4: Metasploit command shell
• System user SOLMAN_BTC / init1234
• Use Metasploit (also see @nmonkee his MWR modules!)
• For example:
Exploitation
Exploitation
Exploitation Example 5: POST-EXPLOITATION: PoC SAP ransomware
• Why not take a complete business for ransom?
• That’s where the money is and a sense of urgency to pay
• Personal prediction: Similar things seen in the wild within couple of years
Research
How we discovered this
• Found by indexing ABAP sourcecode with SOLR (Credits to Martin Ceronio)
• RTFM: SAP Solution Manager 7.0 EHP1 End-to-End Root Cause Analysis – User
Administration guide
Research
How we discovered this
• SAP note 1265580
Solutions
How to protect?
Use the free tooling from our website
to detect if mentioned users exist with
a default password in your SAP systems.
Alternatively use SAP Security hero
Martin Gallo his PySAP tooling.
https://github.com/CoreSecurity/pysap
Solutions
How to protect?
• See SAP Security note 2293011 for help
• Check and change passwords of before mentioned users
• Delete user SMD_ADMIN if you operate SAP Solution Manager 7.1 SP10 or higher.
• Also see SAP notes
– 1985387 - Potential information disclosure relating to SAP Solution Manager
– 2119627 - Change the Password for the Diagnostics Agent Connection User in SAP Solution Manager
– 1774432 - Missing authorization check in ST-PI
– 1727914 - Missing authorization checks in ST-PI
– 1535611 - Missing authorization check in ST-PI
– 2248735 - Code injection vulnerability in System Administration Assistant
– 1416085 - PFCG: Authorization maintenance for object S_RFCACL
• Do not use “*” values for authorisation objects S_RFC and S_RFCACL
• Setup honeytokens for users that are not needed for operations
• Freshly installed SAP Solution Manager 7.1 and 7.2 systems are not concerned 
Consider installing fresh system instead of upgrade (depending on configuration)
Future work
More research needed in some areas:
• Get better insight in exact amount of affected systems
• Get better understanding of all individual users and roles they have and how these
evolved over time
• Get better understanding as of which particular versions users where created with
default passwords
Concluding
Wrapping up:
• Do not solely trust on Segregation of Duties, but remember SAP Security is also about
your SAP Application, Operating system, Database, Network components, Frontends…
• Check and change passwords of all default accounts in all clients in all systems
• Patch, patch, patch
• Involve other teams
• Do periodic reviews of code, authorizations and platform/infrastructure security
(tooling can help)
• Read the documentation
References
For more information please refer to:
SAP Security notes:
2293011- Upgrade Information: Default Users within SAP Solution Manager
2253549 - The SAP Security Baseline Template
1985387 - Potential information disclosure relating to SAP Solution Manager
2119627 - Change the Password for the Diagnostics Agent Connection User in SAP Solution Manager
1774432 - Missing authorization check in ST-PI
1727914 - Missing authorization checks in ST-PI
1535611 - Missing authorization check in ST-PI
2248735 - Code injection vulnerability in System Administration Assistant
1416085 - PFCG: Authorization maintenance for object S_RFCACL
SAP Security guide for the SAP Solution Manager
Metasploit framework SAP user extract module
ABAP Indexing via SOLR
MWR Metasploit modules
ERP-SEC free tooling
CoreSecurity PySAP
Questions
“When a bug finally makes itself known, it can be
exhilarating, like you just unlocked something. A grand
opportunity waiting to be taken advantage of.”
Source: Mr Robot S01E03 d3bug
?
SAP, R/3, ABAP, SAP GUI, SAP NetWeaver and other SAP products and services mentioned herein as
well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and
other countries.
All other product and service names mentioned are the trademarks of their respective companies.
Data contained in this document serves informational purposes only.
The authors assume no responsibility for errors or omissions in this document. The authors do not
warrant the accuracy or completeness of the information, text, graphics, links, or other items
contained within this material. This document is provided without a warranty of any kind, either
express or implied, including but not limited to the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement.
The authors shall have no liability for damages of any kind including without limitation direct, special,
indirect, or consequential damages that may result from the use of this document.
SAP AG is neither the author nor the publisher of this publication and is not responsible for its
content, and SAP Group shall not be liable for errors or omissions with respect to the materials.
No part of this document may be reproduced without the prior written permission of ERP Security BV.
© 2016 ERP Security BV.
Disclaimer
An easy way into your sap systems v3.0

More Related Content

PDF
iOS malware: what's the risk and how to reduce it
PDF
Corporations - the new victims of targeted ransomware
PDF
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
PPTX
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
PDF
Easy public-private-keys-strong-authentication-using-u2 f
PDF
Operation emmental appsec
PPTX
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014
PDF
Zeronights 2015 - Big problems with big data - Hadoop interfaces security
iOS malware: what's the risk and how to reduce it
Corporations - the new victims of targeted ransomware
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Easy public-private-keys-strong-authentication-using-u2 f
Operation emmental appsec
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014
Zeronights 2015 - Big problems with big data - Hadoop interfaces security

What's hot (20)

PDF
1.3. (In)security Software
PDF
Defcon 22-david-wyde-client-side-http-cookie-security
PDF
Introduction to Mobile Application Security - Techcity 2015 (Vilnius)
PDF
Advanced SQL Injection Attack & Defenses
PPT
iOS Application Pentesting
PPTX
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
PPTX
Ten Commandments of Secure Coding
PPTX
Mirai botnet
ODT
Kioptrix 2014 5
PPT
Freeware Security Tools You Need
PDF
Racf psw enhancement
PDF
[OWASP Poland Day] Web App Security Architectures
PPTX
BlueHat 2014 - The Attacker's View of Windows Authentication and Post Exploit...
PPT
Denis Baranov: Root via XSS
PDF
Android Application Security
PDF
SSL Pinning and Bypasses: Android and iOS
PDF
Web Intrusion Detection
PPTX
Hacked? Pray that the Attacker used PowerShell
PDF
Хакеры хотят ваш банк больше, чем ваших клиентов
PDF
Top 10 secure boot mistakes
1.3. (In)security Software
Defcon 22-david-wyde-client-side-http-cookie-security
Introduction to Mobile Application Security - Techcity 2015 (Vilnius)
Advanced SQL Injection Attack & Defenses
iOS Application Pentesting
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
Ten Commandments of Secure Coding
Mirai botnet
Kioptrix 2014 5
Freeware Security Tools You Need
Racf psw enhancement
[OWASP Poland Day] Web App Security Architectures
BlueHat 2014 - The Attacker's View of Windows Authentication and Post Exploit...
Denis Baranov: Root via XSS
Android Application Security
SSL Pinning and Bypasses: Android and iOS
Web Intrusion Detection
Hacked? Pray that the Attacker used PowerShell
Хакеры хотят ваш банк больше, чем ваших клиентов
Top 10 secure boot mistakes
Ad

Viewers also liked (20)

PDF
Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2
PPTX
What's new in SAP HANA SPS 11 Security
PDF
Aplicacion escritorio web
PPTX
Trulia Metro Movers Report - Fall 2011
PPT
How to find and close more business (without spending a thing)
PPT
The reference collection
PPT
พลังประชาชน ที่บุรีรัมย์
PPS
Planificacion de Su Seguridad Económica 2012
PPTX
TDD for Testers
PPTX
ECHA Website Customer Insight Study Summary Report
DOC
Zaragoza turismo-55
PDF
1 samuel 20 commentary
PPT
關中麥客
PPT
Университет в кармане
PDF
1 samuel 14 commentary
PDF
Press Festival Via011
PDF
Helsinki Spark Meetup Nov 20 2015
PDF
Deloitte Tech Trends 2014 Technical Debt
PDF
1 samuel 19 commentary
PDF
Unidad Didáctica Integrada. Joaquín Llamas
Erp security joris-van_de_vis_sap_security_sitnl_2015_v0.2
What's new in SAP HANA SPS 11 Security
Aplicacion escritorio web
Trulia Metro Movers Report - Fall 2011
How to find and close more business (without spending a thing)
The reference collection
พลังประชาชน ที่บุรีรัมย์
Planificacion de Su Seguridad Económica 2012
TDD for Testers
ECHA Website Customer Insight Study Summary Report
Zaragoza turismo-55
1 samuel 20 commentary
關中麥客
Университет в кармане
1 samuel 14 commentary
Press Festival Via011
Helsinki Spark Meetup Nov 20 2015
Deloitte Tech Trends 2014 Technical Debt
1 samuel 19 commentary
Unidad Didáctica Integrada. Joaquín Llamas
Ad

Similar to An easy way into your sap systems v3.0 (20)

PDF
Practical SAP pentesting workshop (NullCon Goa)
PDF
Practical SAP pentesting (B-Sides San Paulo)
PDF
Annual OktCyberfest 2019
PDF
Short introduction to SAP security research (sitNL)
PDF
SAP portal: breaking and forensicating
PPT
ciso-platform-annual-summit-2013-New Framework for ERP Security
PDF
Breaking, forensicating and anti-forensicating SAP Portal and J2EE Engine
PDF
Attacks Based on Security Configurations
PPTX
SAST Managed Services for SAP [Webinar]
PDF
Practical pentesting of ERPs and business applications
PDF
EAS-SEC: Framework for securing business applications
PDF
Exploiting Critical Attack Vectors to Gain Control of SAP Systems
PDF
SAP security made easy
PDF
Implementing SAP security in 5 steps
PPTX
Oracle apps scm online training
PPTX
Sap security online training
PDF
Představení Oracle SPARC Miniclusteru
PDF
Attacking SAP users with sapsploit
PDF
sap in one day Activites fir basis person
Practical SAP pentesting workshop (NullCon Goa)
Practical SAP pentesting (B-Sides San Paulo)
Annual OktCyberfest 2019
Short introduction to SAP security research (sitNL)
SAP portal: breaking and forensicating
ciso-platform-annual-summit-2013-New Framework for ERP Security
Breaking, forensicating and anti-forensicating SAP Portal and J2EE Engine
Attacks Based on Security Configurations
SAST Managed Services for SAP [Webinar]
Practical pentesting of ERPs and business applications
EAS-SEC: Framework for securing business applications
Exploiting Critical Attack Vectors to Gain Control of SAP Systems
SAP security made easy
Implementing SAP security in 5 steps
Oracle apps scm online training
Sap security online training
Představení Oracle SPARC Miniclusteru
Attacking SAP users with sapsploit
sap in one day Activites fir basis person

More from Cyber Security Alliance (20)

PDF
Bug Bounty @ Swisscom
PDF
Robots are among us, but who takes responsibility?
PDF
Why huntung IoC fails at protecting against targeted attacks
PDF
Blockchain for Beginners
PDF
Le pentest pour les nuls #cybsec16
PDF
Introducing Man in the Contacts attack to trick encrypted messaging apps
PDF
Understanding the fundamentals of attacks
PDF
Rump : iOS patch diffing
PDF
Reverse engineering Swisscom's Centro Grande Modem
PDF
Offline bruteforce attack on wi fi protected setup
PDF
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
PDF
Killing any security product … using a Mimikatz undocumented feature
PDF
Rump attaque usb_caralinda_fabrice
PDF
Hacking the swisscom modem
PDF
Colt sp sec2014_appsec-nf-vfinal
PDF
Asfws2014 tproxy
PDF
Asfws 2014 slides why .net needs ma-cs and other serial(-ization) tales_v2.0
PDF
Appsec rump reverse-i_os_machook
PDF
Appsecforum2014 nov14-bk-cryptool-rump
PDF
Appsec obfuscator reloaded
Bug Bounty @ Swisscom
Robots are among us, but who takes responsibility?
Why huntung IoC fails at protecting against targeted attacks
Blockchain for Beginners
Le pentest pour les nuls #cybsec16
Introducing Man in the Contacts attack to trick encrypted messaging apps
Understanding the fundamentals of attacks
Rump : iOS patch diffing
Reverse engineering Swisscom's Centro Grande Modem
Offline bruteforce attack on wi fi protected setup
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
Killing any security product … using a Mimikatz undocumented feature
Rump attaque usb_caralinda_fabrice
Hacking the swisscom modem
Colt sp sec2014_appsec-nf-vfinal
Asfws2014 tproxy
Asfws 2014 slides why .net needs ma-cs and other serial(-ization) tales_v2.0
Appsec rump reverse-i_os_machook
Appsecforum2014 nov14-bk-cryptool-rump
Appsec obfuscator reloaded

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
assetexplorer- product-overview - presentation
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
System and Network Administration Chapter 2
PDF
medical staffing services at VALiNTRY
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Odoo POS Development Services by CandidRoot Solutions
Navsoft: AI-Powered Business Solutions & Custom Software Development
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
assetexplorer- product-overview - presentation
Operating system designcfffgfgggggggvggggggggg
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
How to Choose the Right IT Partner for Your Business in Malaysia
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Reimagine Home Health with the Power of Agentic AI​
Softaken Excel to vCard Converter Software.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Design an Analysis of Algorithms I-SECS-1021-03
System and Network Administration Chapter 2
medical staffing services at VALiNTRY
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Wondershare Filmora 15 Crack With Activation Key [2025
Upgrade and Innovation Strategies for SAP ERP Customers
Odoo POS Development Services by CandidRoot Solutions

An easy way into your sap systems v3.0

  • 1. Exploiting new default accounts in SAP systems
  • 2. Introduction Something about SAP security Unknown default accounts Impact Exploitation: combination with other vulnerabilities Research Solutions Concluding Agenda
  • 3. Introduction Who is ERP-SEC • Company specialised in securing SAP systems and infrastructures • Regular presenters on SAP Security • Research: Reported and credited for dozens of SAP vulnerabilities • Developer Protect4S – SAP Certified Security Analyser for SAPTM • SAP Development Partner • Our mission is to raise the security of mission–critical SAP platforms with minimal impact on day–to–day business. Who am I • SAP Technology enthusiast • SAP security researcher (1395) • Co-founder ERP-SEC • 15+ years background in SAP technology / SAP security (SAP basis)
  • 4. Something about SAP • Market leader in enterprise application software • ~ 300.000 customers worldwide • SAP customers include: – 87% of the Forbes Global 2000 companies – 98% of the 100 most valued brands • Headquarters: Walldorf, Germany, offices in more than 130 countries • Founded April 1, 1972 • Over 75.000 employees worldwide • 74% of the world’s transaction revenue touches an SAP system • Bottomline: Interesting Target! Source: http://www.sap.com/bin/sapcom/en_us/downloadasset.2016-01-jan-26-01.SAP-Corporate-Fact-Sheet-En-20160126-pdf.bypassReg.html Something about SAP
  • 5. Switzerland – IPv4 scanning for SAProuter, SAP RFC Gateway and SAP Diag ports Something about SAP http://zonums.com/iptools/ipmapper.php
  • 6. SAP Security General state of SAP security • We see more awareness at customers for SAP security but from awareness to action is still not the default • The bigger the company, the more SAP security they do • Still a large part of customers lack basic security measures, especially the ones outside the Fortune 2000 • SAP is working hard to improve security for years now. See for example the SAP Security Baseline. Now it’s up to customers to take action… • In 100% of our SAP Security assessments we found SAP default accounts.
  • 7. SAP Security When doing SAP Security assessments… No need to explain: most easy way in via username & password Who needs buffer overflows, DEP/ASLR bypass, XSS, SQLi when you have credentials Two big attack vectors in every SAP system: • SAP Default accounts • SAP RFC gateway (and from there RFC pivoting …) Owning SAP systems often comes down to getting access to credentials. Sniff / social engineer / phish for accounts Easiest option: Default accounts!!!
  • 8. Default accounts and IoT Default accounts - Mirai http://www.csoonline.com/article/3126924/security/here-are-the-61-passwords-that-powered-the-mirai-iot-botnet.html
  • 9. Default SAP accounts Publically known SAP default accounts RISK USER PASSWORD CLIENT REMARK Very High SAP* 06071992 / PASS 001,066,etc… Hardcoded kernel user Very High IDEADM admin Almost all IDES clients Only in IDES systems Very High DDIC 19920706 000,001,… User has SAP_ALL High CTB_ADMIN sap123 N.A. Java user High EARLYWATCH SUPPORT 066 Has rights to get password hash for SAP* from USR02 table and sometimes OS execution Medium TMSADM PASSWORD / $1Pawd2& 000, sometimes copied to others A new default password as the old one was too well known? Medium / Low SAPCPIC ADMIN 000,001 Can be used for information retrieval and in some cases for vulnerabilities where only authentication is needed
  • 10. Default SAP accounts Accounts with a previously unknown SAP default password Let’s meet some new default accounts*: *The list does not include the more recent users like for example SM_<SM-SID> that are created with a custom password CVE-2016-4033 RISK USER TYPE PASSWORD SOLMAN SATELLITE HIGH SMD_ADMIN System init1234 X HIGH SMD_BI_RFC System init1234 X HIGH SMD_RFC System init1234 X HIGH SOLMAN_ADMIN Dialog init1234 X HIGH SOLMAN_BTC System init1234 X HIGH SAPSUPPORT Dialog init1234 X X HIGH SOLMAN<SID><CLNT> Dialog init1234 X MED/HIGH SMDAGENT_<SID> System init1234 X X MED CONTENTSERV System init1234 X MED SMD_AGT System init1234 X
  • 11. How do these users get created? Every customer has a SAP Solution Manager. Transaction SOLMAN_SETUP starts wizards for basic system setup and additional scenario’s
  • 12. How do these users get created? Class CL_SISE_CONSTANTS contains default attributes for the password
  • 13. Why do these users get created? • The SAP Solution Manager supports many scenario’s for managing the SAP landscape • When scenario’s are activated, specific users are created per scenario • Some examples of scenario’s: – Technical monitoring – Data volume management – Custom code management
  • 14. Where do they get created? • Most user get created in Solution Manager, • SMDAGENT_<SID> user also in satellite systems for Solution Manager Diagnostics scenario USER TYPE PASSWORD SOLMAN SATELLITE SMD_ADMIN System init1234 X SMD_BI_RFC System init1234 X SMD_RFC System init1234 X SOLMAN_ADMIN Dialog init1234 X SOLMAN_BTC System init1234 X SAPSUPPORT Dialog init1234 X X SOLMAN<SID><CLNT> Dialog init1234 X SMD_AGT System init1234 X CONTENTSERV System init1234 X SMDAGENT_<SID> System init1234 X X
  • 15. Impact SAP Solution Manager, right in the middle of your business systems… • The SAP Solution Manager is the heart of your SAP landscape and connects to the other SAP systems • Often seen as the ‘Spider in the web’ or the ‘Active Directory’ of SAP landscapes • Leaves the entire SAP landscape at risk when compromised.
  • 16. Impact So how bad is this… • If those users exist with the default password? BAD! • Some of these users have broad authorisations. In some cases profile SAP_J2EE_ADMIN was added. • The SAP Solution Manager is often seen as a technical system, authorisations handled by the basis team (not their core business). • See the SAP Security guide for all created users and roles.
  • 17. Exploitation (Combined with other Vulnerabilities) these users can do • Native SQL execution • SMB relay • OS command execution • Creating new SAP users • Retreival and bruteforcing of password hashes • Etc, etc… All leading to a Full business compromise!
  • 18. Exploitation Exploitation Example 1 • Dialog user SAPSUPPORT / init1234 • Has many roles, amongst which ZSAP_SM_SA38  execute any ABAP program: • Use program RSSAA_CALLEXTERN to inject OS commands
  • 20. Exploitation Exploitation Example 2: Snagging SAP credentials • System user SMDAGENT_<SID> • Exists in Sol. Manager AND connected systems! • Combines remote FM (/SDF/GEN_PROXY ) that acts as wrapper to call local FM (/SDF/RBE_NATSQL_SELECT ) to execute SQL • Retreive ANY DB table content. • Example: PW hashes --> bruteforce offline
  • 22. Exploitation Exploitation Example 3 • System user SOLMAN_BTC / init1234 • Can be used to execute OS commands via Function Module SXPG_STEP_XPG_START • And from there use the implicit trust relation to the Database to create an SAP user directly in the SAP database with SAP_ALL (no application level audit).
  • 24. Exploitation Exploitation Example 4: Metasploit command shell • System user SOLMAN_BTC / init1234 • Use Metasploit (also see @nmonkee his MWR modules!) • For example:
  • 26. Exploitation Exploitation Example 5: POST-EXPLOITATION: PoC SAP ransomware • Why not take a complete business for ransom? • That’s where the money is and a sense of urgency to pay • Personal prediction: Similar things seen in the wild within couple of years
  • 27. Research How we discovered this • Found by indexing ABAP sourcecode with SOLR (Credits to Martin Ceronio) • RTFM: SAP Solution Manager 7.0 EHP1 End-to-End Root Cause Analysis – User Administration guide
  • 28. Research How we discovered this • SAP note 1265580
  • 29. Solutions How to protect? Use the free tooling from our website to detect if mentioned users exist with a default password in your SAP systems. Alternatively use SAP Security hero Martin Gallo his PySAP tooling. https://github.com/CoreSecurity/pysap
  • 30. Solutions How to protect? • See SAP Security note 2293011 for help • Check and change passwords of before mentioned users • Delete user SMD_ADMIN if you operate SAP Solution Manager 7.1 SP10 or higher. • Also see SAP notes – 1985387 - Potential information disclosure relating to SAP Solution Manager – 2119627 - Change the Password for the Diagnostics Agent Connection User in SAP Solution Manager – 1774432 - Missing authorization check in ST-PI – 1727914 - Missing authorization checks in ST-PI – 1535611 - Missing authorization check in ST-PI – 2248735 - Code injection vulnerability in System Administration Assistant – 1416085 - PFCG: Authorization maintenance for object S_RFCACL • Do not use “*” values for authorisation objects S_RFC and S_RFCACL • Setup honeytokens for users that are not needed for operations • Freshly installed SAP Solution Manager 7.1 and 7.2 systems are not concerned  Consider installing fresh system instead of upgrade (depending on configuration)
  • 31. Future work More research needed in some areas: • Get better insight in exact amount of affected systems • Get better understanding of all individual users and roles they have and how these evolved over time • Get better understanding as of which particular versions users where created with default passwords
  • 32. Concluding Wrapping up: • Do not solely trust on Segregation of Duties, but remember SAP Security is also about your SAP Application, Operating system, Database, Network components, Frontends… • Check and change passwords of all default accounts in all clients in all systems • Patch, patch, patch • Involve other teams • Do periodic reviews of code, authorizations and platform/infrastructure security (tooling can help) • Read the documentation
  • 33. References For more information please refer to: SAP Security notes: 2293011- Upgrade Information: Default Users within SAP Solution Manager 2253549 - The SAP Security Baseline Template 1985387 - Potential information disclosure relating to SAP Solution Manager 2119627 - Change the Password for the Diagnostics Agent Connection User in SAP Solution Manager 1774432 - Missing authorization check in ST-PI 1727914 - Missing authorization checks in ST-PI 1535611 - Missing authorization check in ST-PI 2248735 - Code injection vulnerability in System Administration Assistant 1416085 - PFCG: Authorization maintenance for object S_RFCACL SAP Security guide for the SAP Solution Manager Metasploit framework SAP user extract module ABAP Indexing via SOLR MWR Metasploit modules ERP-SEC free tooling CoreSecurity PySAP
  • 34. Questions “When a bug finally makes itself known, it can be exhilarating, like you just unlocked something. A grand opportunity waiting to be taken advantage of.” Source: Mr Robot S01E03 d3bug ?
  • 35. SAP, R/3, ABAP, SAP GUI, SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. The authors assume no responsibility for errors or omissions in this document. The authors do not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. The authors shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of this document. SAP AG is neither the author nor the publisher of this publication and is not responsible for its content, and SAP Group shall not be liable for errors or omissions with respect to the materials. No part of this document may be reproduced without the prior written permission of ERP Security BV. © 2016 ERP Security BV. Disclaimer