SlideShare a Scribd company logo
SERVER
HARDENING
METHEDOLOGIES
BY: SHREYA POHEKAR
TABLE OF
CONTENTS
What is Server Hardening
Why Server Hardening
Linux Servers Hardening
Luks Encryption and NBDE
Filesystem configuration
AIDE
Users
Introduction to OpenSCAP
What is Server Hardening?
Server Hardening is the process of enhancing server security through a
variety of means which results in a much more secure server operating
environment.
What to harden?
1 Hardware Security
Encrypting the hard disks of the
whole infrastructure
2 Software Securtiy
Having in place, the right configurations
and exercising best security practices.
DISK ENCRYPTION
WITH LUKS
It stands for Linux Unified Key Setup-on-
disk-format
LUKS provides passphrase strengthening
LUKS devices contain multiple key slots,
allowing backup keys/passphrases.
USING CRYPTSETUP
cryptsetup is used to
conveniently setup dm-
crypt managed device-
mapper mappings.
# fdisk /dev/vdb
# cryptsetup luksFormat /dev/vdb1
# cryptsetup luksOpen /dev/vdb1 secure
# mkfs.ext4 /dev/mapper/secure
# mount /dev/mapper/secure /mnt
# partprobe
PERMANENT MOUNTING
# vim /etc/fstab
/dev/mapper/secure /mnt ext4 defaults 0 0
# vim /etc/crypttab
secure /dev/vdb1 -
The Network-Bound Disk Encryption (NBDE) allows the user to
encrypt root volumes of hard drives on physical and virtual
machines without requiring to manually enter a password when
systems are restarted.
Controlling file system decryption using
NBDE (Network Bound Disk Encryption)
Server hardening methedologies
CONFIGURING
TANG SERVER
# yum install tang
# systemctl enable tangd.socket -
-now
[enabling socket activation]
# firewall-cmd --zone=public --
add-service=http --permanent
[setting up the firewall]
# firewall-cmd --reload
CONFIGURING
CLEVIS
What's in a Name?
In NBDE, Clevis provides automated
unlocking of LUKS volumes.
C L E V I S
C L E V I S - L U K S
C L E V I S - D R A C U T
PACKAGES
Configuring clevis
# yum  install clevis clevis-luks clevis-dracut -y
# cfg = $'{"t"=1,"pins":{"tang":[{"url":"http://192.168.0.5"}]}}'
# clevis luks bind -d /dev/vdb1 sss "$cfg"
or #clevis bind luks -d /dev/vdb1 tang '{"url":"http://tang.srv"}'
# systemctl enable clevis-luks-askpass.path
# vim /etc/crypttab
encryptedvdb1 /dev/vdb1 none _netdev
# vim /etc/fstab
/dev/mapper/encryptedvdb1 /encrypt xfs _netdev 1 2
Configurational settings
Filesystem
Check for the
suid on different
partitions
AIDE
AIDE takes a
filesystem snapshot
that can be used to
check for any
modifications
Users and
Groups
Ensure 0 is UID
of root. User
should own
their home dir.
Logging
Configure logging
on a remote server
so that any system
compromise can be
reviewed
File System Configurations
Ensure that /tmp is a separate partition.
nosuid and noexec is set on /tmp
Ensure separate partition exist for /var
Ensure nodev, noexec, nosuid is set on /dev/shm
Disable USB storage
Ensure sticky bit is set on world-writable directories
# yum install aide
Custom Rules be added in
Configuration file : /etc/aide.conf
Commands:
# aide --init
# aide --update
# aide --check
AIDE (Advanced Intrusion
Detection Environment)
USERS SETTINGS
Be careful while assigning suid to a binary
Ensure root is the only UID 0 account
Ensure user's home directory permission is 750 or more
restricitve
Ensure no user have .forward files
Security with SeLinux
# semanage login -l
# semanage login -m -s user_u -r s0 __default__
# setsebool -P user_exec_content off
------------------------------------------------------------------------------
Selinux offers user mapping to restrict what an user can do
BUT THAT
SEEMS A LOT
OF WORK!!!
The Solution
is
OpenSCAP
INTRODUCTION
TO OPENSCAP
OpenSCAP tool lets you  check
security configuration settings of a
system, and examine the system for
signs of a compromise by using rules
based on standards and
specifications.
S C A P - S E C U R I T Y - G U I D E
Scap security guide is a collection of security policies for linux
system in the form of scap docs
# yum install scap-security-guide
FEATURES
cost-effective
and flexible
implementation
of security
compliance
tools for
automated
vulnerability
checking
Available for
cross platform.
OpenSCAP tools
1 OpenSCAP base
Command line tool for
configuration and
vulnerability scans
3
SCAP workbench
Graphical tool for
configuration and
vulnerability scans
2 OpenSCAP daemon
Service that runs in background
to ensure your machines are
evaluated according to the
schedule
4 SCAP Timony
It is a middleware that
stores SCAP results
USING THE SCAP
WORKBENCH
Package
# yum install scap-workbench -y
# scap-workbench
REFERENCES
.. https://access.redhat.com/documentation/en-
us/red_hat_enterprise_linux/7/html/security_guide/sec-encryption#sec-
Using_LUKS_Disk_Encryption
https://access.redhat.com/documentation/en-
US/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Network-
Bound_Disk_Encryption.html
https://www.cisecurity.org/benchmark/red_hat_linux/
https://access.redhat.com/documentation/en-
us/red_hat_enterprise_linux/7/html/security_guide/sec-using-aide

More Related Content

ODP
Linux permissions
PPTX
Introduction to linux1
PPT
3. introduction of centos
PDF
Getting Started on Packaging Apps with Open Build Service
PPT
Tutorial 2
PDF
Self2013
PDF
Asiabsdcon15
PDF
Optical Disc Archive Install memo
Linux permissions
Introduction to linux1
3. introduction of centos
Getting Started on Packaging Apps with Open Build Service
Tutorial 2
Self2013
Asiabsdcon15
Optical Disc Archive Install memo

What's hot (20)

PPT
Linuxppt
PPTX
Arch linux
PDF
Freenas Tutorial EuroBSDCon 2012
PDF
Dockerの準備
PPTX
Introduction to linux day1
PPT
Introduction To Unix
PPTX
Red hat enterprise linux 7 (rhel 7)
PPTX
Centos
PPTX
Linux security
DOC
Restricting unix users
PDF
Rhce syllabus
PDF
7 unixsecurity
PPTX
08.file system
PDF
Recipe of a linux Live CD (archived)
PPT
Centos operating system
PDF
Asiabsdcon14
PDF
Introduction to FreeBSD commands(beta)
PPT
Unix Security
PPT
4. Centos Administration
Linuxppt
Arch linux
Freenas Tutorial EuroBSDCon 2012
Dockerの準備
Introduction to linux day1
Introduction To Unix
Red hat enterprise linux 7 (rhel 7)
Centos
Linux security
Restricting unix users
Rhce syllabus
7 unixsecurity
08.file system
Recipe of a linux Live CD (archived)
Centos operating system
Asiabsdcon14
Introduction to FreeBSD commands(beta)
Unix Security
4. Centos Administration
Ad

Similar to Server hardening methedologies (20)

ODP
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
PDF
Hardening Linux, introducing Securix GNU/Linux
PDF
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
PDF
Docker dDessi november 2015
ODP
Sanjay and Ganesh Work Report 25.06.09
ODP
Presentation_On_25June09
PPT
PPTX
Ansible as configuration management tool for devops
PPTX
DevOpsDays InSpec Workshop
PDF
24HOP Introduction to Linux for SQL Server DBAs
PDF
Security best practices for informix
ODP
Practical Tips for Novell Cluster Services
PDF
Hardening Linux and introducing Securix Linux
PDF
Linux Hardening - nullhyd
PPTX
Linux basics part 1
PDF
Rh202 q&a-demo-cert magic
PPTX
Presentation linux on power
PDF
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
PDF
RH302 Exam-Red Hat Linux Certification
PDF
RH302 Exam-Red Hat Linux Certification
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Hardening Linux, introducing Securix GNU/Linux
RH-302 Exam-Red Hat Certified Engineer on Redhat Enterprise Linux 4 (Labs)
Docker dDessi november 2015
Sanjay and Ganesh Work Report 25.06.09
Presentation_On_25June09
Ansible as configuration management tool for devops
DevOpsDays InSpec Workshop
24HOP Introduction to Linux for SQL Server DBAs
Security best practices for informix
Practical Tips for Novell Cluster Services
Hardening Linux and introducing Securix Linux
Linux Hardening - nullhyd
Linux basics part 1
Rh202 q&a-demo-cert magic
Presentation linux on power
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
RH302 Exam-Red Hat Linux Certification
RH302 Exam-Red Hat Linux Certification
Ad

More from Shreya Pohekar (8)

PDF
Road map to getting your first cve
PDF
Getting started with google kubernetes engine
PDF
How to get into infosec
PPTX
Router pwning using bus pirate
PPTX
The arduino and iot
PPTX
Releasemyad internship
PPTX
releasemyad app
PPTX
Iot(security)
Road map to getting your first cve
Getting started with google kubernetes engine
How to get into infosec
Router pwning using bus pirate
The arduino and iot
Releasemyad internship
releasemyad app
Iot(security)

Recently uploaded (20)

PPTX
The various Industrial Revolutions .pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PPTX
observCloud-Native Containerability and monitoring.pptx
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
project resource management chapter-09.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Architecture types and enterprise applications.pdf
PDF
August Patch Tuesday
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
The various Industrial Revolutions .pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
observCloud-Native Containerability and monitoring.pptx
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Module 1.ppt Iot fundamentals and Architecture
cloud_computing_Infrastucture_as_cloud_p
project resource management chapter-09.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Chapter 5: Probability Theory and Statistics
NewMind AI Weekly Chronicles – August ’25 Week III
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
OMC Textile Division Presentation 2021.pptx
NewMind AI Weekly Chronicles - August'25-Week II
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Architecture types and enterprise applications.pdf
August Patch Tuesday
A novel scalable deep ensemble learning framework for big data classification...
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game

Server hardening methedologies