SAP Attack Methodology
Dmitry Gutsko
Security expert
Positive Technologies
PHDays III
Agenda
SAP: Typical three-tier architecture
SAP: Attack vectors
Dmitry Gutsko. SAP Attack Methodology
Where to begin?
― Scan ports
β€’ 32xx
β€’ 33xx
β€’ 36xx
― Gather information about the system
β€’ Find available clients
β€’ Check for default passwords
β€’ Identify a database server
― Tools:
β€’ MaxPatrol (PenTest)
β€’ sapyto
β€’ console bruter by PT
Clients
SAP Application server
Client 000 Client 001 Client 066 Client 800
Clients
SAP Application server
Client 000 Client 001 Client 066 Client 800
Clients
SAP Application server
Client 000 Client 001 Client 066 Client 800
Default passwords
User account Default
password
Statistics
SAP* 06071992
PASS
0%
25%
DDIC 19920706 0%
TMSADM PASSWORD
$1Pawd2&
25%
12,5%
EARLYWATCH SUPPORT 0%
SAPCPIC ADMIN 25%
Default passwords
User account Default
password
Бтатистика использования
SAP* 06071992
PASS
0%
25%(сбСр,Π“Π°Π·
DDIC 19920706 0%
TMSADM PASSWORD
$1Pawd2&
25%(Ом,сбСр
12,5%(Π“Π°Π·
EARLYWATCH SUPPORT 0%
SAPCPIC ADMIN 25%(Π“Π°Π·, сбСр
Additional information
(RFC_SYSTEM_INFO)
Dmitry Gutsko. SAP Attack Methodology
Direct access to Oracle
database
― Remote_OS_Authentication:
β€’ User authentication by OS login
― SAPSR3 user password is stored in table
OPS$<SID>ADM.SAPUSER
― Password could be recovered
Direct access to Oracle
database
― ΠœΠ΅Ρ…Π°Π½ΠΈΠ·ΠΌ Remote_OS_Authentication
β€’ АутСнтификация ΠΏΠΎ ΠΈΠΌΠ΅Π½ΠΈ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Ρ Π² ОБ
― ΠŸΠ°Ρ€ΠΎΠ»ΡŒ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Ρ SAPSR3 хранится Π² Ρ‚Π°Π±Π»ΠΈΡ†Π΅
OPS$<SID>ADM.SAPUSER
― ΠŸΠ°Ρ€ΠΎΠ»ΡŒ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ Ρ€Π°ΡΡˆΠΈΡ„Ρ€ΠΎΠ²Π°Ρ‚ΡŒ
Dmitry Gutsko. SAP Attack Methodology
Password Hijacking via
a Network
― Protocols: DIAG, RFC, HTTP
― Tools: Wireshark, SAP DIAG
plugin for Wireshark,
Cain&Abel, SapCap
DIAG protocol
RFC protocol
Dmitry Gutsko. SAP Attack Methodology
Hacking Passwords
― Algorithms: A, B, D, E, F, G, H, I (CODVN field)
― Tables: USR02, USH02, USRPWDHISTORY
― Tools: John the Ripper
― Profile parameters:
login/password_downwards_compatibility,
login/password_charset
Cryptographic algorithms
BCODE
field
PASSCODE
field
PWDSALTHEDHASH
field
A 8, upper, ASCII, username salt X
B MD5, 8, upper, ASCII, username salt X
D MD5, 8, upper, UTF-8, username
salt
X
E MD5, 8 , upper, UTF-8, username
salt
X
F SHA1, 40, UTF-8, username salt X
G X X
H SHA1,40, UTF-8, random salt X
I X X X
USR02 table
BNAME, BCODE, PASSCODE Fields
John the Ripper
Dmitry Gutsko. SAP Attack Methodology
Client Bypass
― Use transaction ST04
― Use transaction SM49/SM69
― Create your own ABAP program
Transaction ST04
Transaction ST04
Transaction ST04
Transaction SM49/SM69
Transaction SM49/SM69
ABAP program
― Source code:
― Report results:
Dmitry Gutsko. SAP Attack Methodology
Access to other SAPs
― Decrypt authentication data of RFC connection (0-day)
β€’ RSECTAB, RFCDES tables
Access to other SAPs
Access to other SAPs
Access to other SAPs
Access to other SAPs
No data is shown by SE16
Access to other SAPs
Access to other SAPs
Access to other SAPs
Access to other SAPs
Dmitry Gutsko. SAP Attack Methodology
Hiding the Evidence of High Privileges
(profile SAP_ALL)
― Report RSUSR002 (transaction SUIM)
β€’ Use Reference User
β€’ Create a new profile ~ SAP_ALL,
Profile1 + Profile2 + Profile3 ~ SAP_ALL
β€’ Create user ………… (0 day)
β€’ Change ABAP code of report RSUSR002
β€’ Update table UST04
Reference User
Reference User
Reference User
No user TEST1
Create a new profile
Create a new profile
Create a new profile
SAP_0 = SAP_ALL
Create a new profile
No user TEST4
User ………… (0 day)
― ABAP code of RSUSR002 report:
User ………… (0 day)
― ABAP code of RSUSR002 report:
User ………… (0 day)
― ABAP code of RSUSR002 report:
No user …………
Modification of RSUSR002 ABAP code
― Insert a new string:
DELETE userlist WHERE bname = β€˜<USERNAME>’
Deletion of Profile Assignment from
UST04 table
Assignig profile SAP_ALL:
Deletion of Profile Assignment from
UST04 table
Assignig profile SAP_ALL:
Deletion of Profile Assignment from
UST04 table
Assignig profile SAP_ALL:
No user TEST0
Deletion of Profile Assignment from
UST04 table
Assignig profile SAP_ALL:
Thank you for your attention!
Dmitry Gutsko
dgutsko@ptsecurity.ru

More Related Content

PDF
PT - Siemens WinCC Flexible Security Hardening Guide
Β 
PDF
ICS/SCADA/PLC Google/Shodanhq Cheat Sheet
Β 
PPTX
ERP Π“Π»Π°Π·Π°ΠΌΠΈ Π—Π»ΠΎΡƒΠΌΡ‹ΡˆΠ»Π΅Π½Π½ΠΈΠΊΠ°
PDF
2016 10 pt kz ΠΊΠ°Ρ‡Π°Π»ΠΈΠ½
PDF
Π‘ΠΎΠ²Ρ€Π΅ΠΌΠ΅Π½Π½Ρ‹Π΅ российскиС срСдства Π·Π°Ρ‰ΠΈΡ‚Ρ‹ ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ
PDF
Биография сСтСвого ΠΏΠ΅Ρ€ΠΈΠΌΠ΅Ρ‚Ρ€Π° Π² ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ°Ρ…
PPT
Knowledge translation: a brief introduction
PDF
Π’Π΅Π±ΠΈΠ½Π°Ρ€ Π˜Π‘ АБУ ВП NON-STOP. БСрия β„–11
PT - Siemens WinCC Flexible Security Hardening Guide
Β 
ICS/SCADA/PLC Google/Shodanhq Cheat Sheet
Β 
ERP Π“Π»Π°Π·Π°ΠΌΠΈ Π—Π»ΠΎΡƒΠΌΡ‹ΡˆΠ»Π΅Π½Π½ΠΈΠΊΠ°
2016 10 pt kz ΠΊΠ°Ρ‡Π°Π»ΠΈΠ½
Π‘ΠΎΠ²Ρ€Π΅ΠΌΠ΅Π½Π½Ρ‹Π΅ российскиС срСдства Π·Π°Ρ‰ΠΈΡ‚Ρ‹ ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ
Биография сСтСвого ΠΏΠ΅Ρ€ΠΈΠΌΠ΅Ρ‚Ρ€Π° Π² ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ°Ρ…
Knowledge translation: a brief introduction
Π’Π΅Π±ΠΈΠ½Π°Ρ€ Π˜Π‘ АБУ ВП NON-STOP. БСрия β„–11

Viewers also liked (16)

PDF
Sap testing to c
PPT
0101 sap introduction
PDF
Π’Π΅Π±ΠΈΠ½Π°Ρ€ Π˜Π‘ АБУ ВП NON-STOP_БСрия β„–10
PPT
SAP Testing Services
PDF
Sap sd overview and config
PPT
Penetration testing, What’s this?
PDF
Pricing Routine In Vofm
PDF
Sap mm sd pp fico relations.
PDF
Sap testing
PDF
SAP Testing
PDF
SAP ATP check for Sales Order
PPT
Sap sales and distribution
PDF
Tapping into the core
PPTX
SAP BADI Implementation Learning for Functional Consultant
PDF
Step by-step creation of a bapi in detailed steps with scr…
DOCX
Here are the 16 pricing elements in pricing procedure and description for each
Sap testing to c
0101 sap introduction
Π’Π΅Π±ΠΈΠ½Π°Ρ€ Π˜Π‘ АБУ ВП NON-STOP_БСрия β„–10
SAP Testing Services
Sap sd overview and config
Penetration testing, What’s this?
Pricing Routine In Vofm
Sap mm sd pp fico relations.
Sap testing
SAP Testing
SAP ATP check for Sales Order
Sap sales and distribution
Tapping into the core
SAP BADI Implementation Learning for Functional Consultant
Step by-step creation of a bapi in detailed steps with scr…
Here are the 16 pricing elements in pricing procedure and description for each
Ad

Similar to Dmitry Gutsko. SAP Attack Methodology (20)

PDF
All your SAP passwords belong to us
PDF
Sitnl erp sec-2011
PDF
Securing SAP in 5 steps
PDF
Short introduction to SAP security research (sitNL)
PDF
An easy way into your sap systems v3.0
PDF
EAS-SEC: Framework for securing business applications
PDF
GRC 2013 Preventing Cyber Attacks for SAP - Onapsis Presentation
PDF
Architecture vulnerabilities inΒ SAPΒ platforms
PDF
CONFidence 2014: Dimitriy Chastuhin: All your sap p@$$w0яd z belong to us
PPTX
SAP hands on lab_en
PDF
Breaking, forensicating and anti-forensicating SAP Portal and J2EE Engine
PDF
Simple SAP Security Breach !!
PDF
SAP SDM Hacking
PDF
Top 10 most interesting vulnerabilities and attacks in SAP
PDF
Introduction to SAP Security
PPTX
SAP (In)Security: New and Best
PPTX
Introduction to SAP-Jaipur-30 July 2015.pptx
PDF
Assess and monitor SAP security
PDF
Implementing SAP security in 5 steps
PDF
All your SAP passwords belong to us
Sitnl erp sec-2011
Securing SAP in 5 steps
Short introduction to SAP security research (sitNL)
An easy way into your sap systems v3.0
EAS-SEC: Framework for securing business applications
GRC 2013 Preventing Cyber Attacks for SAP - Onapsis Presentation
Architecture vulnerabilities inΒ SAPΒ platforms
CONFidence 2014: Dimitriy Chastuhin: All your sap p@$$w0яd z belong to us
SAP hands on lab_en
Breaking, forensicating and anti-forensicating SAP Portal and J2EE Engine
Simple SAP Security Breach !!
SAP SDM Hacking
Top 10 most interesting vulnerabilities and attacks in SAP
Introduction to SAP Security
SAP (In)Security: New and Best
Introduction to SAP-Jaipur-30 July 2015.pptx
Assess and monitor SAP security
Implementing SAP security in 5 steps
Ad

More from Positive Hack Days (20)

PPTX
Π˜Π½ΡΡ‚Ρ€ΡƒΠΌΠ΅Π½Ρ‚ ChangelogBuilder для автоматичСской ΠΏΠΎΠ΄Π³ΠΎΡ‚ΠΎΠ²ΠΊΠΈ Release Notes
PPTX
Как ΠΌΡ‹ собираСм ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Ρ‹ Π² Π²Ρ‹Π΄Π΅Π»Π΅Π½Π½ΠΎΠΌ ΠΎΠΊΡ€ΡƒΠΆΠ΅Π½ΠΈΠΈ Π² Windows Docker
PPTX
Виповая сборка ΠΈ Π΄Π΅ΠΏΠ»ΠΎΠΉ ΠΏΡ€ΠΎΠ΄ΡƒΠΊΡ‚ΠΎΠ² Π² Positive Technologies
PPTX
Аналитика Π² ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°Ρ…: TFS + Qlik
PPTX
ИспользованиС Π°Π½Π°Π»ΠΈΠ·Π°Ρ‚ΠΎΡ€Π° ΠΊΠΎΠ΄Π° SonarQube
PPTX
Π Π°Π·Π²ΠΈΡ‚ΠΈΠ΅ сообщСства Open DevOps Community
PPTX
ΠœΠ΅Ρ‚ΠΎΠ΄ΠΈΠΊΠ° опрСдСлСния Π½Π΅ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌΡ‹Ρ… рСсурсов Π²ΠΈΡ€Ρ‚ΡƒΠ°Π»ΡŒΠ½Ρ‹Ρ… машин ΠΈ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·Π°Ρ†ΠΈ...
PPTX
Автоматизация построСния ΠΏΡ€Π°Π²ΠΈΠ» для Approof
PDF
ΠœΠ°ΡΡ‚Π΅Ρ€-класс Β«Π’Ρ€ΡƒΡ‰ΠΎΠ±Ρ‹ Application SecurityΒ»
PDF
Π€ΠΎΡ€ΠΌΠ°Π»ΡŒΠ½Ρ‹Π΅ ΠΌΠ΅Ρ‚ΠΎΠ΄Ρ‹ Π·Π°Ρ‰ΠΈΡ‚Ρ‹ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ
PDF
ЭвристичСскиС ΠΌΠ΅Ρ‚ΠΎΠ΄Ρ‹ Π·Π°Ρ‰ΠΈΡ‚Ρ‹ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ
PDF
ВСорСтичСскиС основы Application Security
PPTX
ΠžΡ‚ ΡΠΊΡΠΏΠ΅Ρ€ΠΈΠΌΠ΅Π½Ρ‚Π°Π»ΡŒΠ½ΠΎΠ³ΠΎ программирования ΠΊ ΠΏΡ€ΠΎΠΌΡ‹ΡˆΠ»Π΅Π½Π½ΠΎΠΌΡƒ: ΠΏΡƒΡ‚ΡŒ Π΄Π»ΠΈΠ½ΠΎΠΉ Π² 10 Π»Π΅Ρ‚
PDF
УязвимоС Android-ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅: N ΠΏΡ€ΠΎΠ²Π΅Ρ€Π΅Π½Π½Ρ‹Ρ… способов Π½Π°ΡΡ‚ΡƒΠΏΠΈΡ‚ΡŒ Π½Π° Π³Ρ€Π°Π±Π»ΠΈ
PPTX
ВрСбования ΠΏΠΎ бСзопасности Π² Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Π΅ ПО
PDF
Π€ΠΎΡ€ΠΌΠ°Π»ΡŒΠ½Π°Ρ вСрификация ΠΊΠΎΠ΄Π° Π½Π° языкС Π‘ΠΈ
PPTX
ΠœΠ΅Ρ…Π°Π½ΠΈΠ·ΠΌΡ‹ прСдотвращСния Π°Ρ‚Π°ΠΊ Π² ASP.NET Core
PDF
SOC для КИИ: ΠΈΠ·Ρ€Π°ΠΈΠ»ΡŒΡΠΊΠΈΠΉ ΠΎΠΏΡ‹Ρ‚
PDF
Honeywell Industrial Cyber Security Lab & Services Center
PDF
Credential stuffing ΠΈ брутфорс-Π°Ρ‚Π°ΠΊΠΈ
Π˜Π½ΡΡ‚Ρ€ΡƒΠΌΠ΅Π½Ρ‚ ChangelogBuilder для автоматичСской ΠΏΠΎΠ΄Π³ΠΎΡ‚ΠΎΠ²ΠΊΠΈ Release Notes
Как ΠΌΡ‹ собираСм ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Ρ‹ Π² Π²Ρ‹Π΄Π΅Π»Π΅Π½Π½ΠΎΠΌ ΠΎΠΊΡ€ΡƒΠΆΠ΅Π½ΠΈΠΈ Π² Windows Docker
Виповая сборка ΠΈ Π΄Π΅ΠΏΠ»ΠΎΠΉ ΠΏΡ€ΠΎΠ΄ΡƒΠΊΡ‚ΠΎΠ² Π² Positive Technologies
Аналитика Π² ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°Ρ…: TFS + Qlik
ИспользованиС Π°Π½Π°Π»ΠΈΠ·Π°Ρ‚ΠΎΡ€Π° ΠΊΠΎΠ΄Π° SonarQube
Π Π°Π·Π²ΠΈΡ‚ΠΈΠ΅ сообщСства Open DevOps Community
ΠœΠ΅Ρ‚ΠΎΠ΄ΠΈΠΊΠ° опрСдСлСния Π½Π΅ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌΡ‹Ρ… рСсурсов Π²ΠΈΡ€Ρ‚ΡƒΠ°Π»ΡŒΠ½Ρ‹Ρ… машин ΠΈ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·Π°Ρ†ΠΈ...
Автоматизация построСния ΠΏΡ€Π°Π²ΠΈΠ» для Approof
ΠœΠ°ΡΡ‚Π΅Ρ€-класс Β«Π’Ρ€ΡƒΡ‰ΠΎΠ±Ρ‹ Application SecurityΒ»
Π€ΠΎΡ€ΠΌΠ°Π»ΡŒΠ½Ρ‹Π΅ ΠΌΠ΅Ρ‚ΠΎΠ΄Ρ‹ Π·Π°Ρ‰ΠΈΡ‚Ρ‹ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ
ЭвристичСскиС ΠΌΠ΅Ρ‚ΠΎΠ΄Ρ‹ Π·Π°Ρ‰ΠΈΡ‚Ρ‹ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ
ВСорСтичСскиС основы Application Security
ΠžΡ‚ ΡΠΊΡΠΏΠ΅Ρ€ΠΈΠΌΠ΅Π½Ρ‚Π°Π»ΡŒΠ½ΠΎΠ³ΠΎ программирования ΠΊ ΠΏΡ€ΠΎΠΌΡ‹ΡˆΠ»Π΅Π½Π½ΠΎΠΌΡƒ: ΠΏΡƒΡ‚ΡŒ Π΄Π»ΠΈΠ½ΠΎΠΉ Π² 10 Π»Π΅Ρ‚
УязвимоС Android-ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅: N ΠΏΡ€ΠΎΠ²Π΅Ρ€Π΅Π½Π½Ρ‹Ρ… способов Π½Π°ΡΡ‚ΡƒΠΏΠΈΡ‚ΡŒ Π½Π° Π³Ρ€Π°Π±Π»ΠΈ
ВрСбования ΠΏΠΎ бСзопасности Π² Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Π΅ ПО
Π€ΠΎΡ€ΠΌΠ°Π»ΡŒΠ½Π°Ρ вСрификация ΠΊΠΎΠ΄Π° Π½Π° языкС Π‘ΠΈ
ΠœΠ΅Ρ…Π°Π½ΠΈΠ·ΠΌΡ‹ прСдотвращСния Π°Ρ‚Π°ΠΊ Π² ASP.NET Core
SOC для КИИ: ΠΈΠ·Ρ€Π°ΠΈΠ»ΡŒΡΠΊΠΈΠΉ ΠΎΠΏΡ‹Ρ‚
Honeywell Industrial Cyber Security Lab & Services Center
Credential stuffing ΠΈ брутфорс-Π°Ρ‚Π°ΠΊΠΈ

Recently uploaded (20)

PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
UiPath Agentic Automation session 1: RPA to Agents
PPTX
Build Your First AI Agent with UiPath.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
STKI Israel Market Study 2025 version august
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Five Habits of High-Impact Board Members
PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Architecture types and enterprise applications.pdf
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
TEXTILE technology diploma scope and career opportunities
Flame analysis and combustion estimation using large language and vision assi...
Improvisation in detection of pomegranate leaf disease using transfer learni...
A review of recent deep learning applications in wood surface defect identifi...
Module 1.ppt Iot fundamentals and Architecture
UiPath Agentic Automation session 1: RPA to Agents
Build Your First AI Agent with UiPath.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
STKI Israel Market Study 2025 version august
Taming the Chaos: How to Turn Unstructured Data into Decisions
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
A contest of sentiment analysis: k-nearest neighbor versus neural network
Chapter 5: Probability Theory and Statistics
Five Habits of High-Impact Board Members
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
Zenith AI: Advanced Artificial Intelligence
Consumable AI The What, Why & How for Small Teams.pdf
Final SEM Unit 1 for mit wpu at pune .pptx
Architecture types and enterprise applications.pdf

Dmitry Gutsko. SAP Attack Methodology