SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
Hardening Principles
Copyright © 2000-2013 Liferay, Inc.
All Rights Reserved.
No material may be reproduced electronically or in print, duplicated,
copied, sold, resold, or otherwise exploited for any commercial purpose
without express written consent of Liferay, Inc.
Time for
DEMO!
Let's d0 s0me hacking
Time for
DEMO!
Let's d0 s0me hacking
WHAT IS HARDENING?
“Hardening refers to providing various means of protection in a computer system.
Protection is provided in various layers and is often referred to as defense in depth.
Protecting in layers means to protect at the host level, the application level, the
operating system level, the user level, the physical level and all the sublevels in
between. Each level requires a unique method of security.”
- http://www.techopedia.com/definition/24833/hardening
“In computing, hardening is usually the process of securing a system by reducing its
surface of vulnerability. A system has a larger vulnerability surface the more that it does;
in principle a single-function system is more secure than a multipurpose one. Reducing
available vectors of attack typically includes the removal of unnecessary software,
unnecessary usernames or logins and the disabling or removal of unnecessary services.”
- http://en.wikipedia.org/wiki/Hardening_(computing)
LAYERS OF HARDENING
NETWORK
SERVER
APPLICATION
NETWORK
Usually Liferay Portal's
operating environment has
been spread out to multiple
servers.
NETWORK - HARDENING
Think which connections are
needed?
Allow Liferay server should
access only servers that is
required. Database, Solr, Disk-
share, Web-services, staging live
server..
Liferay Portal should not have direct
Internet connection
Connections through HTTP server
Connecting to internet through
Proxy
Image: wikipedia.org
SERVER
Liferay running at server
Image: wikipedia.org
SERVER - HARDENING
Server administration (Unix, Linux)
No root level access, only SUDO
Administrators should use own personal user id's to administer
Block unnecessary ports with Firewall
Disable unwanted services
All the applications and services should run with their respective operating
system user account.
Separate disk spaces for the system, application, data, logs and temp files
chroot the Application server installation
APPLICATION
Liferay
specific hardening principles
APPLICATION – LIFERAY #1
Remove demo data!
(if exists)
APPLICATION – LIFERAY #2
Disable and change default administrative
accounts. Change the username / email /
password
portal.properties ( default value )
default.admin.screen.name=test
default.admin.password=test
default.admin.email.address.prefix=test
portal.properties ( default value )
default.admin.screen.name=test
default.admin.password=test
default.admin.email.address.prefix=test
APPLICATION – LIFERAY #3
Keep you Liferay system patched!
APPLICATION – LIFERAY #4
Disable create account if registration is not
required!
portal.properties ( default value )
company.security.strangers=true
# Also good to disable open.id auth
open.id.auth.enabled=true
portal.properties ( default value )
company.security.strangers=true
# Also good to disable open.id auth
open.id.auth.enabled=true
APPLICATION – LIFERAY #5
Make sure that password are stored securely!
portal.properties ( default value )
passwords.encryption.algorithm=SHA
## SHOULD BE SSHA or better
portal.properties ( default value )
passwords.encryption.algorithm=SHA
## SHOULD BE SSHA or better
APPLICATION – LIFERAY #6
Design permission scheme for Portal users!
NEVER
RUN PORTAL USER
WITH
ADMINISTRATION
ROLE
APPLICATION – LIFERAY #7
Do not show portlets if user do not have
permission!
portal.properties ( default value )
layout.show.portlet.access.denied=true
portal.properties ( default value )
layout.show.portlet.access.denied=true
APPLICATION – LIFERAY #8
Change
authentication token / shared secret
portal.properties ( default value )
auth.token.shared.secret=BAHyWOT9TbPB
portal.properties ( default value )
auth.token.shared.secret=BAHyWOT9TbPB
APPLICATION – LIFERAY #9
Do not change touch p_auth and p_p_auth
tokens settings!
portal.properties ( default value )
auth.token.check.enabled=true
portlet.add.default.resource.check.enabled=true
portal.properties ( default value )
auth.token.check.enabled=true
portlet.add.default.resource.check.enabled=true
APPLICATION – LIFERAY #10
Disabling autologin functionality that is not required!
portal.properties ( default value )
## SET NOT REQUIRED FALSE
com.liferay.portal.servlet.filters.autologin.AutoLoginFilter=true
com.liferay.portal.servlet.filters.sso.cas.CASFilter=true
com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter=true
com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter=true
com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter=true
com.liferay.portal.sharepoint.SharepointFilter=true
## REMOVE REQUIRED
auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin...
auto.login.ignore.hosts=
auto.login.ignore.paths=
portal.properties ( default value )
## SET NOT REQUIRED FALSE
com.liferay.portal.servlet.filters.autologin.AutoLoginFilter=true
com.liferay.portal.servlet.filters.sso.cas.CASFilter=true
com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter=true
com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter=true
com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter=true
com.liferay.portal.sharepoint.SharepointFilter=true
## REMOVE REQUIRED
auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin...
auto.login.ignore.hosts=
auto.login.ignore.paths=
APPLICATION – LIFERAY #11
HTTP / HTTPS ?
APPLICATION – LIFERAY #12
Disable Liferay remote services that are not used!
portal.properties ( default value )
spring.remoting.servlet.hosts.allowed=127.0.0.1,SERVER_IP
spring.remoting.servlet.https.required=false
tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP
tunnel.servlet.https.required=false
axis.servlet.hosts.allowed=127.0.0.1,SERVER_IP
axis.servlet.https.required=false
atom.servlet.hosts.allowed=127.0.0.1,SERVER_IP
atom.servlet.https.required=false
webdav.servlet.hosts.allowed=
webdav.servlet.https.required=false
json.servlet.hosts.allowed=
json.servlet.https.required=false
jsonws.servlet.hosts.allowed=
jsonws.servlet.https.required=false
portal.properties ( default value )
spring.remoting.servlet.hosts.allowed=127.0.0.1,SERVER_IP
spring.remoting.servlet.https.required=false
tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP
tunnel.servlet.https.required=false
axis.servlet.hosts.allowed=127.0.0.1,SERVER_IP
axis.servlet.https.required=false
atom.servlet.hosts.allowed=127.0.0.1,SERVER_IP
atom.servlet.https.required=false
webdav.servlet.hosts.allowed=
webdav.servlet.https.required=false
json.servlet.hosts.allowed=
json.servlet.https.required=false
jsonws.servlet.hosts.allowed=
jsonws.servlet.https.required=false
APPLICATION – LIFERAY #13
Disable core-portlets or just functionality that you are
not ever going to use!
StrutsActionHooks can be
used to disable functionality
Modify liferay-porlet-ext.xml with Ext-plugin:
StrutsActionHooks can be
used to disable functionality
Modify liferay-porlet-ext.xml with Ext-plugin:
liferay-portlet-ext.xml
<portlet>
<portlet-name>...</portlet-name>
<include>false</include>
</portlet>
liferay-portlet-ext.xml
<portlet>
<portlet-name>...</portlet-name>
<include>false</include>
</portlet>
APPLICATION – LIFERAY #14
Change Company encryption key size and
algorithm
portal.properties ( default value )
company.encryption.key.size=56
company.encryption.algorithm=DES
portal.properties ( default value )
company.encryption.key.size=56
company.encryption.algorithm=DES
APPLICATION – LIFERAY #15
Security Manager - PACL!
portal.properties
#
# NOTE: This is default setting
#
portal.security.manager.strategy=smart
portal.properties
#
# NOTE: This is default setting
#
portal.security.manager.strategy=smart
liferay-plugin-package.properties
security-manager-enabled=true
# The make work easier
liferay-plugin-package.properties
security-manager-enabled=true
# The make work easier
APPLICATION – LIFERAY #16
Antisamy Plugin
APPLICATION – LIFERAY #17
Audit Plugin!
APPLICATION – LIFERAY #18
Log rotation!
PLUGIN DEVELOPMENT
OWASP 10
Use frameworks that helps you to avoid XSS.
Use Liferay API's to escape where ever necessary
HTMLUtil.escape (..) etc.
Liferay tags, make sure that escapeModel=true
Use Lifeay permission framework
ServiceBuilder: Remember to write permission checks in the remote
services
Support Security Manager / PACL!
RECOVERING!
Make disaster recovery plan
Step by step instructions to rebuild new system
How to buildup system again from backups?
How long time this will take?
Test the plan!
WHAT ELSE?
Liferay portal is only one component of your Liferay installation.
Give a hardening though also to:
Http server
Apache: https://www.google.fi/search?q=hardening+apache2
Application server
Tomcat: https://www.owasp.org/index.php/Securing_tomcat
Database
MySql: https://www.google.fi/search?q=hardening+mysql
Other services
Thanks guys!
Questions!

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

OCI Overview
OCI OverviewOCI Overview
OCI Overview
 
An Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - WebinarAn Introduction to the AWS Well Architected Framework - Webinar
An Introduction to the AWS Well Architected Framework - Webinar
 
Azure vnet
Azure vnetAzure vnet
Azure vnet
 
Validate your entities with symfony validator and entity validation api
Validate your entities with symfony validator and entity validation apiValidate your entities with symfony validator and entity validation api
Validate your entities with symfony validator and entity validation api
 
Armeriaworkshop2019 openchat julie
Armeriaworkshop2019 openchat julieArmeriaworkshop2019 openchat julie
Armeriaworkshop2019 openchat julie
 
INTERFACE by apidays 2023 - The Swiss Cheese Model of Layered API Security, L...
INTERFACE by apidays 2023 - The Swiss Cheese Model of Layered API Security, L...INTERFACE by apidays 2023 - The Swiss Cheese Model of Layered API Security, L...
INTERFACE by apidays 2023 - The Swiss Cheese Model of Layered API Security, L...
 
Introduction to serverless compute with azure functions
Introduction to serverless compute with azure functionsIntroduction to serverless compute with azure functions
Introduction to serverless compute with azure functions
 
Introduction to AWS IAM
Introduction to AWS IAMIntroduction to AWS IAM
Introduction to AWS IAM
 
Azure Stack Fundamentals
Azure Stack FundamentalsAzure Stack Fundamentals
Azure Stack Fundamentals
 
Getting Started with Amazon Inspector
Getting Started with Amazon InspectorGetting Started with Amazon Inspector
Getting Started with Amazon Inspector
 
AWS 101 - An Introduction to the Amazon Cloud
AWS 101  - An Introduction to the Amazon CloudAWS 101  - An Introduction to the Amazon Cloud
AWS 101 - An Introduction to the Amazon Cloud
 
Introduction to Amazon Elastic File System (EFS)
Introduction to Amazon Elastic File System (EFS)Introduction to Amazon Elastic File System (EFS)
Introduction to Amazon Elastic File System (EFS)
 
IAM Introduction and Best Practices
IAM Introduction and Best PracticesIAM Introduction and Best Practices
IAM Introduction and Best Practices
 
AWS re:Invent 2016: Get the Most from AWS KMS: Architecting Applications for ...
AWS re:Invent 2016: Get the Most from AWS KMS: Architecting Applications for ...AWS re:Invent 2016: Get the Most from AWS KMS: Architecting Applications for ...
AWS re:Invent 2016: Get the Most from AWS KMS: Architecting Applications for ...
 
AWS Webcast - Introduction to EBS
AWS Webcast - Introduction to EBS AWS Webcast - Introduction to EBS
AWS Webcast - Introduction to EBS
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning
 
AWS Account Best Practices
AWS Account Best PracticesAWS Account Best Practices
AWS Account Best Practices
 
Compute Services con AWS
Compute Services con AWSCompute Services con AWS
Compute Services con AWS
 
Fundamentals of AWS Security
Fundamentals of AWS SecurityFundamentals of AWS Security
Fundamentals of AWS Security
 
Landing Zones - Creating a Foundation for Your AWS Migrations
Landing Zones - Creating a Foundation for Your AWS MigrationsLanding Zones - Creating a Foundation for Your AWS Migrations
Landing Zones - Creating a Foundation for Your AWS Migrations
 

Andere mochten auch

Advanced liferay architecture clustering and high availability
Advanced liferay architecture clustering and high availabilityAdvanced liferay architecture clustering and high availability
Advanced liferay architecture clustering and high availability
Bordin Kijsirijareonchai
 
2011.10 Liferay European Symposium. Alistair Oldfield
2011.10 Liferay European Symposium. Alistair Oldfield2011.10 Liferay European Symposium. Alistair Oldfield
2011.10 Liferay European Symposium. Alistair Oldfield
Emeldi Group
 
Microservices: The OSGi way A different vision on microservices
Microservices: The OSGi way A different vision on microservicesMicroservices: The OSGi way A different vision on microservices
Microservices: The OSGi way A different vision on microservices
Miguel Pastor
 

Andere mochten auch (14)

EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiEclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
 
Liferay on docker
Liferay on dockerLiferay on docker
Liferay on docker
 
Black box security testing
Black box security testingBlack box security testing
Black box security testing
 
Advanced liferay architecture clustering and high availability
Advanced liferay architecture clustering and high availabilityAdvanced liferay architecture clustering and high availability
Advanced liferay architecture clustering and high availability
 
2011.10 Liferay European Symposium. Alistair Oldfield
2011.10 Liferay European Symposium. Alistair Oldfield2011.10 Liferay European Symposium. Alistair Oldfield
2011.10 Liferay European Symposium. Alistair Oldfield
 
2013.devcon3 liferay and google authenticator integration rafik_harabi
2013.devcon3 liferay and google authenticator integration rafik_harabi2013.devcon3 liferay and google authenticator integration rafik_harabi
2013.devcon3 liferay and google authenticator integration rafik_harabi
 
Liferay Configuration and Customization
Liferay Configuration and CustomizationLiferay Configuration and Customization
Liferay Configuration and Customization
 
Polyglot
PolyglotPolyglot
Polyglot
 
Microservices: The OSGi way A different vision on microservices
Microservices: The OSGi way A different vision on microservicesMicroservices: The OSGi way A different vision on microservices
Microservices: The OSGi way A different vision on microservices
 
System Hardening Using Ansible
System Hardening Using AnsibleSystem Hardening Using Ansible
System Hardening Using Ansible
 
AWS re:Invent 2016: Embracing DevSecOps while Improving Compliance and Securi...
AWS re:Invent 2016: Embracing DevSecOps while Improving Compliance and Securi...AWS re:Invent 2016: Embracing DevSecOps while Improving Compliance and Securi...
AWS re:Invent 2016: Embracing DevSecOps while Improving Compliance and Securi...
 
La Migration As A Service - Offres Infrastructures Services
La Migration As A Service - Offres Infrastructures ServicesLa Migration As A Service - Offres Infrastructures Services
La Migration As A Service - Offres Infrastructures Services
 
Book référence Gfi - Liferay 2016
Book référence Gfi - Liferay 2016Book référence Gfi - Liferay 2016
Book référence Gfi - Liferay 2016
 
(SEC402) Enterprise Cloud Security via DevSecOps 2.0
(SEC402) Enterprise Cloud Security via DevSecOps 2.0(SEC402) Enterprise Cloud Security via DevSecOps 2.0
(SEC402) Enterprise Cloud Security via DevSecOps 2.0
 

Ähnlich wie Liferay hardening principles

Break it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure softwareBreak it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure software
Leigh Honeywell
 

Ähnlich wie Liferay hardening principles (20)

Rails Security
Rails SecurityRails Security
Rails Security
 
Applications secure by default
Applications secure by defaultApplications secure by default
Applications secure by default
 
Applications secure by default
Applications secure by defaultApplications secure by default
Applications secure by default
 
Tips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management ProgramTips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management Program
 
Duck Hunter - The return of autorun
Duck Hunter - The return of autorunDuck Hunter - The return of autorun
Duck Hunter - The return of autorun
 
Nimrod duck hunter copy
Nimrod duck hunter   copyNimrod duck hunter   copy
Nimrod duck hunter copy
 
Automated Detection of Session Fixation Vulnerabilities
Automated Detection of Session Fixation VulnerabilitiesAutomated Detection of Session Fixation Vulnerabilities
Automated Detection of Session Fixation Vulnerabilities
 
Android App Security Fundamentals
Android App Security FundamentalsAndroid App Security Fundamentals
Android App Security Fundamentals
 
Drupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal DevelopmentDrupal campleuven: Secure Drupal Development
Drupal campleuven: Secure Drupal Development
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10
 
Top Ten Settings that Leave your IBM i Vulnerable
Top Ten Settings that Leave your IBM i VulnerableTop Ten Settings that Leave your IBM i Vulnerable
Top Ten Settings that Leave your IBM i Vulnerable
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental Edition
 
Cloud patterns applied
Cloud patterns appliedCloud patterns applied
Cloud patterns applied
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applications
 
Break it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure softwareBreak it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure software
 
Hardening Your Config Management - Security and Attack Vectors in Config Mana...
Hardening Your Config Management - Security and Attack Vectors in Config Mana...Hardening Your Config Management - Security and Attack Vectors in Config Mana...
Hardening Your Config Management - Security and Attack Vectors in Config Mana...
 
RIoT (Raiding Internet of Things) by Jacob Holcomb
RIoT  (Raiding Internet of Things)  by Jacob HolcombRIoT  (Raiding Internet of Things)  by Jacob Holcomb
RIoT (Raiding Internet of Things) by Jacob Holcomb
 
Introduction to Mobile Application Security - Techcity 2015 (Vilnius)
Introduction to Mobile Application Security - Techcity 2015 (Vilnius)Introduction to Mobile Application Security - Techcity 2015 (Vilnius)
Introduction to Mobile Application Security - Techcity 2015 (Vilnius)
 
Owasp web security
Owasp web securityOwasp web security
Owasp web security
 
Intrusion Techniques
Intrusion TechniquesIntrusion Techniques
Intrusion Techniques
 

Mehr von Ambientia

Mehr von Ambientia (20)

Itms atlassian way-final-2017-10
Itms atlassian way-final-2017-10Itms atlassian way-final-2017-10
Itms atlassian way-final-2017-10
 
Dev ops atlassianway-final-2017-10
Dev ops atlassianway-final-2017-10Dev ops atlassianway-final-2017-10
Dev ops atlassianway-final-2017-10
 
Insight Asset Management for JIRA Service Desk
Insight Asset Management for JIRA Service DeskInsight Asset Management for JIRA Service Desk
Insight Asset Management for JIRA Service Desk
 
APIen hallinnalla uutta liiketoimintaa
APIen hallinnalla uutta liiketoimintaaAPIen hallinnalla uutta liiketoimintaa
APIen hallinnalla uutta liiketoimintaa
 
Miten API management toimii
Miten API management toimiiMiten API management toimii
Miten API management toimii
 
Tunnistamalla asiakaspolut tehostat asiakaspalvelusi toimintaa
Tunnistamalla asiakaspolut tehostat asiakaspalvelusi toimintaaTunnistamalla asiakaspolut tehostat asiakaspalvelusi toimintaa
Tunnistamalla asiakaspolut tehostat asiakaspalvelusi toimintaa
 
OpenShift-webinaari 31.1. / Ambientian esitykset
OpenShift-webinaari 31.1. / Ambientian esityksetOpenShift-webinaari 31.1. / Ambientian esitykset
OpenShift-webinaari 31.1. / Ambientian esitykset
 
ITSM & JIRA Service Desk
ITSM & JIRA Service DeskITSM & JIRA Service Desk
ITSM & JIRA Service Desk
 
Ambientia Service Design -työpaja SYTYKE
Ambientia Service Design -työpaja SYTYKEAmbientia Service Design -työpaja SYTYKE
Ambientia Service Design -työpaja SYTYKE
 
Liferayn rooli Valtorin palveluvalikoimassa
Liferayn rooli Valtorin palveluvalikoimassaLiferayn rooli Valtorin palveluvalikoimassa
Liferayn rooli Valtorin palveluvalikoimassa
 
Digitaalinen asiakaskokemus ja palvelumuotoilu
Digitaalinen asiakaskokemus ja palvelumuotoiluDigitaalinen asiakaskokemus ja palvelumuotoilu
Digitaalinen asiakaskokemus ja palvelumuotoilu
 
Liferay Audience Targeting
Liferay Audience TargetingLiferay Audience Targeting
Liferay Audience Targeting
 
Case Procountor: Zephyr test tool deployment
Case Procountor: Zephyr test tool deploymentCase Procountor: Zephyr test tool deployment
Case Procountor: Zephyr test tool deployment
 
JIRA Portfolio
JIRA PortfolioJIRA Portfolio
JIRA Portfolio
 
Case Containerships JIRA Service Desk
Case Containerships JIRA Service DeskCase Containerships JIRA Service Desk
Case Containerships JIRA Service Desk
 
Jira 7
Jira 7Jira 7
Jira 7
 
Liferay Road Show Sosiaali- ja terveysministeriö
Liferay Road Show Sosiaali- ja terveysministeriöLiferay Road Show Sosiaali- ja terveysministeriö
Liferay Road Show Sosiaali- ja terveysministeriö
 
Liferay Road Show Responsiivinen suunnittelu
Liferay Road Show Responsiivinen suunnitteluLiferay Road Show Responsiivinen suunnittelu
Liferay Road Show Responsiivinen suunnittelu
 
Liferay Road Show Linnunmaa LEX
 Liferay Road Show Linnunmaa LEX Liferay Road Show Linnunmaa LEX
Liferay Road Show Linnunmaa LEX
 
Liferay Road Show Rolf van der Steen
Liferay Road Show Rolf van der SteenLiferay Road Show Rolf van der Steen
Liferay Road Show Rolf van der Steen
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 

Liferay hardening principles

  • 1. Hardening Principles Copyright © 2000-2013 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print, duplicated, copied, sold, resold, or otherwise exploited for any commercial purpose without express written consent of Liferay, Inc.
  • 2.
  • 3. Time for DEMO! Let's d0 s0me hacking Time for DEMO! Let's d0 s0me hacking
  • 4. WHAT IS HARDENING? “Hardening refers to providing various means of protection in a computer system. Protection is provided in various layers and is often referred to as defense in depth. Protecting in layers means to protect at the host level, the application level, the operating system level, the user level, the physical level and all the sublevels in between. Each level requires a unique method of security.” - http://www.techopedia.com/definition/24833/hardening “In computing, hardening is usually the process of securing a system by reducing its surface of vulnerability. A system has a larger vulnerability surface the more that it does; in principle a single-function system is more secure than a multipurpose one. Reducing available vectors of attack typically includes the removal of unnecessary software, unnecessary usernames or logins and the disabling or removal of unnecessary services.” - http://en.wikipedia.org/wiki/Hardening_(computing)
  • 6. NETWORK Usually Liferay Portal's operating environment has been spread out to multiple servers.
  • 7. NETWORK - HARDENING Think which connections are needed? Allow Liferay server should access only servers that is required. Database, Solr, Disk- share, Web-services, staging live server.. Liferay Portal should not have direct Internet connection Connections through HTTP server Connecting to internet through Proxy Image: wikipedia.org
  • 8. SERVER Liferay running at server Image: wikipedia.org
  • 9. SERVER - HARDENING Server administration (Unix, Linux) No root level access, only SUDO Administrators should use own personal user id's to administer Block unnecessary ports with Firewall Disable unwanted services All the applications and services should run with their respective operating system user account. Separate disk spaces for the system, application, data, logs and temp files chroot the Application server installation
  • 11. APPLICATION – LIFERAY #1 Remove demo data! (if exists)
  • 12. APPLICATION – LIFERAY #2 Disable and change default administrative accounts. Change the username / email / password portal.properties ( default value ) default.admin.screen.name=test default.admin.password=test default.admin.email.address.prefix=test portal.properties ( default value ) default.admin.screen.name=test default.admin.password=test default.admin.email.address.prefix=test
  • 13. APPLICATION – LIFERAY #3 Keep you Liferay system patched!
  • 14. APPLICATION – LIFERAY #4 Disable create account if registration is not required! portal.properties ( default value ) company.security.strangers=true # Also good to disable open.id auth open.id.auth.enabled=true portal.properties ( default value ) company.security.strangers=true # Also good to disable open.id auth open.id.auth.enabled=true
  • 15. APPLICATION – LIFERAY #5 Make sure that password are stored securely! portal.properties ( default value ) passwords.encryption.algorithm=SHA ## SHOULD BE SSHA or better portal.properties ( default value ) passwords.encryption.algorithm=SHA ## SHOULD BE SSHA or better
  • 16. APPLICATION – LIFERAY #6 Design permission scheme for Portal users! NEVER RUN PORTAL USER WITH ADMINISTRATION ROLE
  • 17. APPLICATION – LIFERAY #7 Do not show portlets if user do not have permission! portal.properties ( default value ) layout.show.portlet.access.denied=true portal.properties ( default value ) layout.show.portlet.access.denied=true
  • 18. APPLICATION – LIFERAY #8 Change authentication token / shared secret portal.properties ( default value ) auth.token.shared.secret=BAHyWOT9TbPB portal.properties ( default value ) auth.token.shared.secret=BAHyWOT9TbPB
  • 19. APPLICATION – LIFERAY #9 Do not change touch p_auth and p_p_auth tokens settings! portal.properties ( default value ) auth.token.check.enabled=true portlet.add.default.resource.check.enabled=true portal.properties ( default value ) auth.token.check.enabled=true portlet.add.default.resource.check.enabled=true
  • 20. APPLICATION – LIFERAY #10 Disabling autologin functionality that is not required! portal.properties ( default value ) ## SET NOT REQUIRED FALSE com.liferay.portal.servlet.filters.autologin.AutoLoginFilter=true com.liferay.portal.servlet.filters.sso.cas.CASFilter=true com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter=true com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter=true com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter=true com.liferay.portal.sharepoint.SharepointFilter=true ## REMOVE REQUIRED auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin... auto.login.ignore.hosts= auto.login.ignore.paths= portal.properties ( default value ) ## SET NOT REQUIRED FALSE com.liferay.portal.servlet.filters.autologin.AutoLoginFilter=true com.liferay.portal.servlet.filters.sso.cas.CASFilter=true com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter=true com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter=true com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter=true com.liferay.portal.sharepoint.SharepointFilter=true ## REMOVE REQUIRED auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin... auto.login.ignore.hosts= auto.login.ignore.paths=
  • 21. APPLICATION – LIFERAY #11 HTTP / HTTPS ?
  • 22. APPLICATION – LIFERAY #12 Disable Liferay remote services that are not used! portal.properties ( default value ) spring.remoting.servlet.hosts.allowed=127.0.0.1,SERVER_IP spring.remoting.servlet.https.required=false tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP tunnel.servlet.https.required=false axis.servlet.hosts.allowed=127.0.0.1,SERVER_IP axis.servlet.https.required=false atom.servlet.hosts.allowed=127.0.0.1,SERVER_IP atom.servlet.https.required=false webdav.servlet.hosts.allowed= webdav.servlet.https.required=false json.servlet.hosts.allowed= json.servlet.https.required=false jsonws.servlet.hosts.allowed= jsonws.servlet.https.required=false portal.properties ( default value ) spring.remoting.servlet.hosts.allowed=127.0.0.1,SERVER_IP spring.remoting.servlet.https.required=false tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP tunnel.servlet.https.required=false axis.servlet.hosts.allowed=127.0.0.1,SERVER_IP axis.servlet.https.required=false atom.servlet.hosts.allowed=127.0.0.1,SERVER_IP atom.servlet.https.required=false webdav.servlet.hosts.allowed= webdav.servlet.https.required=false json.servlet.hosts.allowed= json.servlet.https.required=false jsonws.servlet.hosts.allowed= jsonws.servlet.https.required=false
  • 23. APPLICATION – LIFERAY #13 Disable core-portlets or just functionality that you are not ever going to use! StrutsActionHooks can be used to disable functionality Modify liferay-porlet-ext.xml with Ext-plugin: StrutsActionHooks can be used to disable functionality Modify liferay-porlet-ext.xml with Ext-plugin: liferay-portlet-ext.xml <portlet> <portlet-name>...</portlet-name> <include>false</include> </portlet> liferay-portlet-ext.xml <portlet> <portlet-name>...</portlet-name> <include>false</include> </portlet>
  • 24. APPLICATION – LIFERAY #14 Change Company encryption key size and algorithm portal.properties ( default value ) company.encryption.key.size=56 company.encryption.algorithm=DES portal.properties ( default value ) company.encryption.key.size=56 company.encryption.algorithm=DES
  • 25. APPLICATION – LIFERAY #15 Security Manager - PACL! portal.properties # # NOTE: This is default setting # portal.security.manager.strategy=smart portal.properties # # NOTE: This is default setting # portal.security.manager.strategy=smart liferay-plugin-package.properties security-manager-enabled=true # The make work easier liferay-plugin-package.properties security-manager-enabled=true # The make work easier
  • 26. APPLICATION – LIFERAY #16 Antisamy Plugin
  • 27. APPLICATION – LIFERAY #17 Audit Plugin!
  • 28. APPLICATION – LIFERAY #18 Log rotation!
  • 29. PLUGIN DEVELOPMENT OWASP 10 Use frameworks that helps you to avoid XSS. Use Liferay API's to escape where ever necessary HTMLUtil.escape (..) etc. Liferay tags, make sure that escapeModel=true Use Lifeay permission framework ServiceBuilder: Remember to write permission checks in the remote services Support Security Manager / PACL!
  • 30. RECOVERING! Make disaster recovery plan Step by step instructions to rebuild new system How to buildup system again from backups? How long time this will take? Test the plan!
  • 31. WHAT ELSE? Liferay portal is only one component of your Liferay installation. Give a hardening though also to: Http server Apache: https://www.google.fi/search?q=hardening+apache2 Application server Tomcat: https://www.owasp.org/index.php/Securing_tomcat Database MySql: https://www.google.fi/search?q=hardening+mysql Other services