alexey tyurin - hr hacking — bugs in peoplesoft

36
Invest in security to secure investments HR Hacking – bugs in PeopleSoft Alexey Tyurin Director of consulting department in ERPScan

Upload: defconrussia

Post on 20-Aug-2015

2.078 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Invest in securityto secure investments

HR Hacking – bugs in PeopleSoftAlexey Tyurin Director of consulting department in ERPScan

Page 2: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Alexey Tyurin

• Director of consulting in ERPScan• XML/WEB/Win/Network security fun• Hacked a lot of online banking systems• Co-Organizer of Defcon Russia Group • Editor of “EasyHack” column for the “Xakep” magazine

@antyurin

erpscan.com 2ERPScan — invest in security to secure investments

Page 3: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

What is it?

• Oracle PeopleSoft Apps: HRMS, FMS, SCM, CRM, EPM• Can work as one big portal or separately• Many implementations

erpscan.com 3ERPScan — invest in security to secure investments

Page 4: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft Internet Architecture

• Many applications, but they have one architecture• PeopleSoft Internet Architecture

– Internet oriented since version 8

• Based on several special core technologies

erpscan.com 4ERPScan — invest in security to secure investments

Page 5: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft Internet Architecture

PeopleTools:• Technology• Developer tools• Framework• PeopleCode

All of the applications are created using PeopleTools.

erpscan.com 5ERPScan — invest in security to secure investments

Page 6: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft Internet Architecture

erpscan.com 6ERPScan — invest in security to secure investments

Page 7: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft Internet Architecture

• Web server WebLogic /WebSphere PS Servlets Forwards request from a browser to an App Server

• Application server – PS Services + Tuxedo + Jolt – Business logic, SQL transaction management, Transport

• Database server– System Tables, PeopleTools metadata , PeopleSoft application data

erpscan.com 7ERPScan — invest in security to secure investments

Page 8: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft Internet Architecture

Another view:

erpscan.com 8ERPScan — invest in security to secure investments

Page 9: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft Internet Architecture

• Users (web browser) – All common web technologies– A single escalation point for common and administrative goals

• Developers (PeopleTools)– 2-Tier – direct connection to DBMS– 3-Tier – connection through Application Server. Special ports WSH, WSL. Essentially, basic SQL requests which are forwarded to DBMS by Application Server

• External systems– Different web services (SOAP, XML) for a cross-system integration

erpscan.com 9ERPScan — invest in security to secure investments

Page 10: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft Internet Architecture

erpscan.com 10ERPScan — invest in security to secure investments

Page 11: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft Internet Architecture

Authentication process and terms:• User logs in with their User ID and password.• Application Server uses Connect ID to connect to DBMS.

– This account has limited rights in DBMS. It is used to retrieve the u=User ID and password, which are then compared to the user’s input

• If successful, the system takes Symbolic ID (associated with) User ID.

• The system uses Symbolic ID to find in PSACCESSPRFL the necessary Access ID and the password. This account is privileged.

• The system reconnects to DBMS using Access ID.

* Passwords are encrypted.

erpscan.com 11ERPScan — invest in security to secure investments

Page 12: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft Vulns

Some vulns every year, some talks about, but no info for pentesting…

erpscan.com 12ERPScan — invest in security to secure investments

Page 13: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Google Dorks

• filetype:GBL peoplesoft

• peoplesoft inurl:cmd=login

• intitle:"PeopleSoft Enterprise Sign-in"

• intitle:"WebLogic Server" intitle:"Console Login" inurl:console

• "Welcome to Weblogic Application Server" PeopleSoft

erpscan.com 13ERPScan — invest in security to secure investments

Page 14: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Google Dorks

erpscan.com 14ERPScan — invest in security to secure investments

Page 15: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Detect

• PS can be “hidden” very well and look totally unlike itself

– Filetype: GBL

– A lot of JavaScripts with version information

– Cookie with PORTAL-PSJSESSIONID

– Cookie PSTOKEN

– Cookie PSLOGINLIST

erpscan.com 15ERPScan — invest in security to secure investments

Page 16: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Ports

erpscan.com 16ERPScan — invest in security to secure investments

Page 17: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Default ports

• 80, 443 – both ports – WebLogic / PeopleSoft• 3050 – Tuxedo (not used in PS)• 7000 – WSL – distributes connections on WSH• 7001-7005 – WSH – a port on the application server for

developers (3-tier)• 7180, 7143 – PS REN server (Real-time EventNotification)• 9000 – JSL – distributes connections on JSH (jolt)• 9001-9005 – a port on the application server for Jolt

connections from the web server • 9500 – PS Debugging port – a port on the application server

(non default)• 9100 – Jolt relay (non default)

erpscan.com 17ERPScan — invest in security to secure investments

Page 18: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Default inputs

• A lot of input spots. Scan them!

erpscan.com 18ERPScan — invest in security to secure investments

Page 19: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Default accounts

Some of them:• people:peop1e – DB• PS:PS – super PS user (also VP1:VP1)• “password” for many web services • “dayoff” for a Portal servlet

Ex: psp/[site]/?cmd=viewconfig&pwd=dayoff – to see configs

Different way: non-standard Weblogic accounts:• system: Passw0rd (password) – main administrator• operator: password – operator role• monitor: password – monitor role

* The password of “system” is often changed to that of “PS”

erpscan.com 19ERPScan — invest in security to secure investments

Page 20: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

WebLogic

• WebLogic admin “/console” • On the same port with PeopleSoft application by default• Anyone can try to access the inside with default accounts

erpscan.com 20ERPScan — invest in security to secure investments

Page 21: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Default inf disclosure

• Some of them:

erpscan.com 21ERPScan — invest in security to secure investments

Page 22: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Another classic attack

• Most administrative tasks are fulfilled by administrators through the portal. XSS is a beautiful attack!

• Ex. 1 (until PT 8.51). PSOL Full Text Search: XSS in every entry field

erpscan.com 22ERPScan — invest in security to secure investments

Page 23: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Another classic attack

• Ex. 2 (PT 8.53): CVE-2013-3818Patched in CPU 16 July 2013 (cpujul2013)

http://172.16.0.79/CfgOCIReturn.html?&debug=true&domain=aaa%27%3Cimg%20src%3D%22zz%22%20onerror%3Dalert%28%22XSS%22%29%3E

erpscan.com 23ERPScan — invest in security to secure investments

Page 24: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Strange UDDI explorer

One of input spots:

• We can scan internal network via SSRF (time-based)

• We can steal the password of administrator

* But who uses this strange thing?

erpscan.com 24ERPScan — invest in security to secure investments

Page 25: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

erpscan.com 25ERPScan — invest in security to secure investments

DEMO

Page 26: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

PeopleSoft DoS

erpscan.com 26ERPScan — invest in security to secure investments

• old research • buffer overflow in login process!!!• we can control the return address• but stack cookie… so only DoS

* Do you think it is secure Java? No, there are too many crashes

Page 27: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

True DoS

• One of input points is Business Interlink

• No authentication • Simple request• PeopleSoft сrashes (Java, to be precise ;))

erpscan.com 27ERPScan — invest in security to secure investments

Page 28: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

erpscan.com 28ERPScan — invest in security to secure investments

DEMO

Page 29: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

XXEs

• Some of input points: PSIGW/*, Business Interlink, SyncServ

• !!!No authentication !!!

• Common XXE injection impact:– We can read plain text files (not all)– SSRF – SSRF+gopher (if JDK <= 1.6)– SSRF+grab NTLM hashes/SMBRelay (if JDK <= 1.6 and OS = Windows)– Classic entities DoS?+ we can list directories and read XML files! (no binary)

CVE-2013-3800, CVE-2013-3819, CVE-2013-3821Patched in CPU on the 16th July 2013 (cpujul2013)

erpscan.com 29ERPScan — invest in security to secure investments

Page 30: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Encryption

Encryption of password in config files:• Some passwords of PeopleSoft are stored in plaintext• Some – DES• Some – 3DES• Some – AES (Weblogic)

DES• The key for DES is hardcoded• Was used for encryption in the older systems• Has no ID at the beginning (such as “{V1.1}”)

erpscan.com 30ERPScan — invest in security to secure investments

Page 31: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Encryption

3DES• The key for 3DES is standard by default.• You can check it. The string “{V1.1}” before an encrypted

password shows the key is default.• After each key regeneration, the number is changed (1.2, 1.3…).• Do you regenerate it?

AES• If you want to decrypt with AES, you need

SerializedSystemIni.dat.• You can understand that it is AES by the “{AES}” string in the

beginning of an encrypted password.

erpscan.com 31ERPScan — invest in security to secure investments

Page 32: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Whatever do we read?

• Configuration files that can store plaintext passwords:hcmss.dms, create_accessid.sql , connect_2005.sql, psprcs.cfg, hcengl.log, dbsetup.xml, psappsrv.cfg, resetpswd.dms, hcora.dms, connect.sql, pswinclt.cfg

* They mostly belong to Connection ID. But there are some PS too.

• Configuration files that can store encrypted passwords (DES, 3DES, AES):configuration.properties, gatewayUserProfile.xml, integrationGateway.properties, config.xml, security.xml, DefaultAuthenticatorInit.ldif, boot.properties, nm_password.properties

* They mostly belong to web service. But they can fit forPS too.

erpscan.com 32ERPScan — invest in security to secure investments

Page 33: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Whatever do we read? Issues

• Not all of the listed files can be read by reading data from the web server

• Passwords from WebLogic accounts are AES-encrypted, the key is in the binary file

• If the administrator re-generated keys to 3DES ({V1.2},{V1.3 …), the key is also in a binary file which cannot be read through XXE

• Theoretically, the private SSL key can be read and used for MitM attacks, but it has to be stored in plain-text. By default, it is stored in Java storage (binary)

erpscan.com 33ERPScan — invest in security to secure investments

Page 34: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Attack!

1) Read Connection ID and attack through the database. It is possible to download user hashes and bruteforce them, for example.

2) From the multitude of configuration files, we can retrieve various accounts (in the case of v. 1.1 or an old PT version with DES) and use it to find the password for the PS acount in Portal.

3) We can read the file nm_password.properties of WebLogic, which stores the hash of the node manager password (similar to the password of the user “system” in WebLogic by default).

erpscan.com 34ERPScan — invest in security to secure investments

Page 35: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

erpscan.com 35ERPScan — invest in security to secure investments

DEMO

Page 36: Alexey Tyurin - HR Hacking — bugs in PeopleSoft

Greetz to our crew who helped