SlideShare ist ein Scribd-Unternehmen logo
1 von 60
SAP Attack Methodology
Dmitry Gutsko
Security expert
Positive Technologies
PHDays III
Agenda
SAP: Typical three-tier architecture
SAP: Attack vectors
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)
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
― Пароль возможно расшифровать
Password Hijacking via
a Network
― Protocols: DIAG, RFC, HTTP
― Tools: Wireshark, SAP DIAG
plugin for Wireshark,
Cain&Abel, SapCap
DIAG protocol
RFC protocol
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
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:
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
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

Weitere ähnliche Inhalte

Andere mochten auch

0101 sap introduction
0101 sap introduction0101 sap introduction
0101 sap introduction
vkyecc1
 
SAP Testing Services
SAP Testing ServicesSAP Testing Services
SAP Testing Services
r_shanki
 
Sap sd overview and config
Sap sd overview and configSap sd overview and config
Sap sd overview and config
Ben Kumar
 
Penetration testing, What’s this?
Penetration testing, What’s this?Penetration testing, What’s this?
Penetration testing, What’s this?
Dmitry Evteev
 
Step by-step creation of a bapi in detailed steps with scr…
Step by-step creation of a bapi in detailed steps with scr…Step by-step creation of a bapi in detailed steps with scr…
Step by-step creation of a bapi in detailed steps with scr…
sapsarath612
 
Here are the 16 pricing elements in pricing procedure and description for each
Here are the 16 pricing elements in pricing procedure and description for eachHere are the 16 pricing elements in pricing procedure and description for each
Here are the 16 pricing elements in pricing procedure and description for each
vishalsap84
 

Andere mochten auch (16)

Sap testing to c
Sap testing to cSap testing to c
Sap testing to c
 
0101 sap introduction
0101 sap introduction0101 sap introduction
0101 sap introduction
 
Вебинар ИБ АСУ ТП NON-STOP_Серия №10
Вебинар ИБ АСУ ТП NON-STOP_Серия №10Вебинар ИБ АСУ ТП NON-STOP_Серия №10
Вебинар ИБ АСУ ТП NON-STOP_Серия №10
 
SAP Testing Services
SAP Testing ServicesSAP Testing Services
SAP Testing Services
 
Sap sd overview and config
Sap sd overview and configSap sd overview and config
Sap sd overview and config
 
Penetration testing, What’s this?
Penetration testing, What’s this?Penetration testing, What’s this?
Penetration testing, What’s this?
 
Pricing Routine In Vofm
Pricing Routine In VofmPricing Routine In Vofm
Pricing Routine In Vofm
 
Sap mm sd pp fico relations.
Sap mm sd pp fico relations.Sap mm sd pp fico relations.
Sap mm sd pp fico relations.
 
Sap testing
Sap testingSap testing
Sap testing
 
SAP Testing
SAP TestingSAP Testing
SAP Testing
 
SAP ATP check for Sales Order
SAP ATP check for Sales OrderSAP ATP check for Sales Order
SAP ATP check for Sales Order
 
Sap sales and distribution
Sap sales and distribution Sap sales and distribution
Sap sales and distribution
 
Tapping into the core
Tapping into the coreTapping into the core
Tapping into the core
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional Consultant
 
Step by-step creation of a bapi in detailed steps with scr…
Step by-step creation of a bapi in detailed steps with scr…Step by-step creation of a bapi in detailed steps with scr…
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
Here are the 16 pricing elements in pricing procedure and description for eachHere are the 16 pricing elements in pricing procedure and description for each
Here are the 16 pricing elements in pricing procedure and description for each
 

Ähnlich wie Dmitry Gutsko. SAP Attack Methodology

Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
Sidney Chen
 

Ähnlich wie Dmitry Gutsko. SAP Attack Methodology (20)

Indice
IndiceIndice
Indice
 
SAP SDM Hacking
SAP SDM HackingSAP SDM Hacking
SAP SDM Hacking
 
sap basis transaction codes
sap basis transaction codessap basis transaction codes
sap basis transaction codes
 
Big Data Analytics with MariaDB ColumnStore
Big Data Analytics with MariaDB ColumnStoreBig Data Analytics with MariaDB ColumnStore
Big Data Analytics with MariaDB ColumnStore
 
Injecting evil code in your SAP J2EE systems. Security of SAP Software Deploy...
Injecting evil code in your SAP J2EE systems. Security of SAP Software Deploy...Injecting evil code in your SAP J2EE systems. Security of SAP Software Deploy...
Injecting evil code in your SAP J2EE systems. Security of SAP Software Deploy...
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
 
All your SAP passwords belong to us
All your SAP passwords belong to usAll your SAP passwords belong to us
All your SAP passwords belong to us
 
MariaDB 10.0 Query Optimizer
MariaDB 10.0 Query OptimizerMariaDB 10.0 Query Optimizer
MariaDB 10.0 Query Optimizer
 
Applied Detection and Analysis Using Flow Data - MIRCon 2014
Applied Detection and Analysis Using Flow Data - MIRCon 2014Applied Detection and Analysis Using Flow Data - MIRCon 2014
Applied Detection and Analysis Using Flow Data - MIRCon 2014
 
Advanced Query Optimizer Tuning and Analysis
Advanced Query Optimizer Tuning and AnalysisAdvanced Query Optimizer Tuning and Analysis
Advanced Query Optimizer Tuning and Analysis
 
An easy way into your sap systems v3.0
An easy way into your sap systems v3.0An easy way into your sap systems v3.0
An easy way into your sap systems v3.0
 
Sap sd-srinivas-naidu
Sap sd-srinivas-naiduSap sd-srinivas-naidu
Sap sd-srinivas-naidu
 
Sap sd
Sap sdSap sd
Sap sd
 
Streaming ETL - from RDBMS to Dashboard with KSQL
Streaming ETL - from RDBMS to Dashboard with KSQLStreaming ETL - from RDBMS to Dashboard with KSQL
Streaming ETL - from RDBMS to Dashboard with KSQL
 
SSRF vs. Business-critical applications. Part 2. New vectors and connect-back...
SSRF vs. Business-critical applications. Part 2. New vectors and connect-back...SSRF vs. Business-critical applications. Part 2. New vectors and connect-back...
SSRF vs. Business-critical applications. Part 2. New vectors and connect-back...
 
SAP hands on lab_en
SAP hands on lab_enSAP hands on lab_en
SAP hands on lab_en
 
Percona Live 2019 - MySQL Security
Percona Live 2019 - MySQL SecurityPercona Live 2019 - MySQL Security
Percona Live 2019 - MySQL Security
 
SAP BASIS Daily Monitoring T - codes
SAP BASIS Daily Monitoring T - codesSAP BASIS Daily Monitoring T - codes
SAP BASIS Daily Monitoring T - codes
 
Data Con LA 2019 - Hybrid Transactional Analytical Processing (HTAP) with Mar...
Data Con LA 2019 - Hybrid Transactional Analytical Processing (HTAP) with Mar...Data Con LA 2019 - Hybrid Transactional Analytical Processing (HTAP) with Mar...
Data Con LA 2019 - Hybrid Transactional Analytical Processing (HTAP) with Mar...
 
SAP Solution Manager - Netweaver on HANA Monitoring Setup Part 1 of 3 (Prepar...
SAP Solution Manager - Netweaver on HANA Monitoring Setup Part 1 of 3 (Prepar...SAP Solution Manager - Netweaver on HANA Monitoring Setup Part 1 of 3 (Prepar...
SAP Solution Manager - Netweaver on HANA Monitoring Setup Part 1 of 3 (Prepar...
 

Mehr von Positive Hack Days

Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
Positive Hack Days
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
Positive Hack Days
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Positive Hack Days
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
Positive Hack Days
 

Mehr von Positive Hack Days (20)

Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesИнструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerКак мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows Docker
 
Типовая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesТиповая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive Technologies
 
Аналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikАналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + Qlik
 
Использование анализатора кода SonarQube
Использование анализатора кода SonarQubeИспользование анализатора кода SonarQube
Использование анализатора кода SonarQube
 
Развитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityРазвитие сообщества Open DevOps Community
Развитие сообщества Open DevOps Community
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
 
Автоматизация построения правил для Approof
Автоматизация построения правил для ApproofАвтоматизация построения правил для Approof
Автоматизация построения правил для Approof
 
Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
 
Формальные методы защиты приложений
Формальные методы защиты приложенийФормальные методы защиты приложений
Формальные методы защиты приложений
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
 
Теоретические основы Application Security
Теоретические основы Application SecurityТеоретические основы Application Security
Теоретические основы Application Security
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летОт экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 лет
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
 
Требования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОТребования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПО
 
Формальная верификация кода на языке Си
Формальная верификация кода на языке СиФормальная верификация кода на языке Си
Формальная верификация кода на языке Си
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
 
SOC для КИИ: израильский опыт
SOC для КИИ: израильский опытSOC для КИИ: израильский опыт
SOC для КИИ: израильский опыт
 
Honeywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterHoneywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services Center
 
Credential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиCredential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атаки
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Dmitry Gutsko. SAP Attack Methodology