SlideShare a Scribd company logo
YahiaKandeel
GCIH,GSEC, RHCE,CEH, CCNA, MCP
IPBackbone Security Engineer
Etisalat
 DiscretionaryAccessControls
 SeLinux
 TCPWrappers
 Xinetd
 IPTables
 PluggableAuthenticationModule
 Application AccessControl
 Historically..
 Each program had its own way of authenticating
users ..
 PAM
 Pluggable, modular architecture
 Affords the system administrator a great deal of
flexibilityin setting authentication policies for the
system.
 Centralized authentication mechanism
 /etc/pam.d/ contains the PAM configuration files for each
PAM-awareapplication
 All supported PAM Modules under /lib/security/ directory
 auth
 This module authenticates users against database
 account
 This module verifies that access is allowed. (e.g it checks
expiration and time restrictions)
 password
 This module is used for changing user passwords.
 session
 This module configures and manages user sessions (e.g
mounting a user's home directory and making the user's
mailbox available.)
 An individual module can provide any or all module interfaces. For
instance, pam_unix.so provides all four module interfaces.
 Module interface directives can be stacked, or placed upon one
another, so that multiple modules are used together for one purpose.
 Each PAM modules generate a success or failure result when called.
 Controlflags tell PAM what to do with the result.
 Ordering is very Important ..
 /etc/pam.d/system-auth:
 Acommon interface for all applications and service daemons calling into the
PAMlibrary.
 Required
 Ifsuccess continue checking, if fail continue with failure
 Requisite
 Ifsuccess continue checking, if fail abort with failure
 Sufficient
 Ifsuccess grant access immediately, if fail ignore
 Optional
 The module result is ignored.
 Include
 Interpret the given file.All lines in the given file are treated as they
were present in this configuration file
Name Description
pam_unix Modulefor traditional password authentication
pam_rootok Gainonly root access
pam_permit The promiscuous module
pam_nologin Prevent non root uses
pam_listfile denyor allow services based on an arbitrary file
pam_tally2 The login counter (tallying) module
pam_succeed_if test account characteristics
pam_deny The locking
pam_limits PAMmodule to limit resources
pam_timestamp Auth using cached successfulauth attempts
pam_time PAMmodule for time control access
pam_cracklib Checkthe password against dictionary words
 Test account characteristics ..
 Synopsis: pam_succeed_if.so [flag...] [condition...]
 Flags:
 Conditions:
auth required pam_succeed_if.so use_uiduser ingroup wheel
use_uid
Evaluate conditions using the account of the user whose UID the
application is running under instead of the user being authenticated.
quiet Don´t log failure or success to the system log.
Field Test Value
user ingroup Wheel
uid >= 500
 Authenticate using cached successful authentication
attempts.
 Synopsis: pam_timestamp.so[timestamp_timeout=number]
 The auth and session module types are provided.
auth sufficient pam_timestamp.so
auth required pam_unix.so
session required pam_unix.so
session optional pam_timestamp.so
/etc/pam.d/wireshark
 Wireshark
 Timestamp
 Only for specific users
 Deny or allow using services based on an arbitraryfile
 Synopsis:
pam_listfile.soitem=[user|rhost|group|shell]sense=[allow|deny]
file=/path/filename onerr=[succeed|fail]
auth required pam_listfile.soitem=user onerr=fail
file=/etc/ssh.allowsense=allow
item What is listed in the file and should be checked for.
sense Action to take if found in file
onerr What to do if something weird happens like being unable to open the file
/etc/pam.d/sshd
 Enable or disable TTY auditing for specified users.
 Synopsis: pam_tty_audit.so[disable=patterns][enable=patterns]
 To view the data that was logged by the kernel to audit use
the command #aureport --tty.
session required pam_tty_audit.sodisable=*enable=root
/etc/pam.d/sshd
 The login counter.
 Synopsis:
pam_tally2.so[onerr=[fail|succeed]][even_deny_root] [deny=n]
[unlock_time=n][root_unlock_time=n] [audit]
 To view the status for locked users run this command
#pam_tally -u username
auth required pam_tally2.so deny=4
even_deny_root unlock_time=1200
/etc/pam.d/sshd
 PAM module to limit resources
 Synopsis: pam_limits.so[change_uid][conf=/path/to/limits.conf]
 By default limits are taken from the /etc/security/limits.conf
session required pam_limits.so
/etc/pam.d/sshd
<domain> <type> <item> <value>
student - maxlogins 1
/etc/security/limits.conf
CPU
Maxlogin
Priority
Memlock
Hard
Soft
-
Username
@Group
uid:uid
*
 PAM module for time control access
 Synopsis: pam_time.so [noaudit]
 The time access rules are taken from /etc/security/time.conf
account required pam_time.so
/etc/pam.d/sshd
services; ttys; users; times
sshd; * ; !root ; Wk0800-1700
/etc/security/time.conf
Users
Groups
tty
ttyp*
*
sshd
login
 SSHD:
 Limit # of concurrent sessions
 At specific time
 For specific users
 Max number of failed
logins
 Audit user activities
 SU:
 OnlySpecific users can escalate their priviledges
 References:
 http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-
pam.html
 http://www.informit.com/articles/article.aspx?p=20968
 Linuxman pages
 Contacts:
 Eng.Qandeel@gmail.com

More Related Content

What's hot

OAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerOAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPower
Shiu-Fun Poon
 
Identity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibilityIdentity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibility
Ryan Dawson
 
What should a hacker know about WebDav?
What should a hacker know about WebDav?What should a hacker know about WebDav?
What should a hacker know about WebDav?
Mikhail Egorov
 
An Introduction to OAuth 2
An Introduction to OAuth 2An Introduction to OAuth 2
An Introduction to OAuth 2
Aaron Parecki
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with Keycloak
Julien Pivotto
 
HTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versionsHTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versions
neexemil
 
Nmap scripting engine
Nmap scripting engineNmap scripting engine
Nmap scripting engine
n|u - The Open Security Community
 
Cloud App Security Customer Presentation.pdf
Cloud App Security Customer Presentation.pdfCloud App Security Customer Presentation.pdf
Cloud App Security Customer Presentation.pdf
ErikHof4
 
OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)
Michael Furman
 
Introduction to SSH
Introduction to SSHIntroduction to SSH
Introduction to SSHHemant Shah
 
Wfuzz for Penetration Testers
Wfuzz for Penetration TestersWfuzz for Penetration Testers
Wfuzz for Penetration Testers
Christian Martorella
 
Demystifying OAuth 2.0
Demystifying OAuth 2.0Demystifying OAuth 2.0
Demystifying OAuth 2.0
Karl McGuinness
 
Virtual private network
Virtual private network Virtual private network
Virtual private network
Parth Akbari
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
Uwe Friedrichsen
 
User Management - Brief Overview
User Management - Brief OverviewUser Management - Brief Overview
User Management - Brief Overview
sgillihan
 
Owl: The New Odoo UI Framework
Owl: The New Odoo UI FrameworkOwl: The New Odoo UI Framework
Owl: The New Odoo UI Framework
Odoo
 
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programsAEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
Mikhail Egorov
 
A story of the passive aggressive sysadmin of AEM
A story of the passive aggressive sysadmin of AEMA story of the passive aggressive sysadmin of AEM
A story of the passive aggressive sysadmin of AEM
Frans Rosén
 
Wireless Cracking using Kali
Wireless Cracking using KaliWireless Cracking using Kali
Wireless Cracking using Kali
n|u - The Open Security Community
 
XSS Magic tricks
XSS Magic tricksXSS Magic tricks
XSS Magic tricks
GarethHeyes
 

What's hot (20)

OAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerOAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPower
 
Identity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibilityIdentity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibility
 
What should a hacker know about WebDav?
What should a hacker know about WebDav?What should a hacker know about WebDav?
What should a hacker know about WebDav?
 
An Introduction to OAuth 2
An Introduction to OAuth 2An Introduction to OAuth 2
An Introduction to OAuth 2
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with Keycloak
 
HTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versionsHTTP Request Smuggling via higher HTTP versions
HTTP Request Smuggling via higher HTTP versions
 
Nmap scripting engine
Nmap scripting engineNmap scripting engine
Nmap scripting engine
 
Cloud App Security Customer Presentation.pdf
Cloud App Security Customer Presentation.pdfCloud App Security Customer Presentation.pdf
Cloud App Security Customer Presentation.pdf
 
OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)
 
Introduction to SSH
Introduction to SSHIntroduction to SSH
Introduction to SSH
 
Wfuzz for Penetration Testers
Wfuzz for Penetration TestersWfuzz for Penetration Testers
Wfuzz for Penetration Testers
 
Demystifying OAuth 2.0
Demystifying OAuth 2.0Demystifying OAuth 2.0
Demystifying OAuth 2.0
 
Virtual private network
Virtual private network Virtual private network
Virtual private network
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
User Management - Brief Overview
User Management - Brief OverviewUser Management - Brief Overview
User Management - Brief Overview
 
Owl: The New Odoo UI Framework
Owl: The New Odoo UI FrameworkOwl: The New Odoo UI Framework
Owl: The New Odoo UI Framework
 
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programsAEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
AEM hacker - approaching Adobe Experience Manager webapps in bug bounty programs
 
A story of the passive aggressive sysadmin of AEM
A story of the passive aggressive sysadmin of AEMA story of the passive aggressive sysadmin of AEM
A story of the passive aggressive sysadmin of AEM
 
Wireless Cracking using Kali
Wireless Cracking using KaliWireless Cracking using Kali
Wireless Cracking using Kali
 
XSS Magic tricks
XSS Magic tricksXSS Magic tricks
XSS Magic tricks
 

Similar to Pluggable authentication modules

Chapter 09
Chapter 09Chapter 09
Chapter 09
cclay3
 
Linux Security Crash Course
Linux Security Crash CourseLinux Security Crash Course
Linux Security Crash Course
UTD Computer Security Group
 
7 unixsecurity
7 unixsecurity7 unixsecurity
7 unixsecurityricharddxd
 
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara
 
System Administeration Basics
System Administeration  BasicsSystem Administeration  Basics
System Administeration Basics
Bahaa Salama
 
Asecurity-guidelines_and_best_practices_for_retail_online_and_business_online
Asecurity-guidelines_and_best_practices_for_retail_online_and_business_onlineAsecurity-guidelines_and_best_practices_for_retail_online_and_business_online
Asecurity-guidelines_and_best_practices_for_retail_online_and_business_online
wardell henley
 
Dell Quest TPAM Privileged Access Control
Dell Quest TPAM Privileged Access ControlDell Quest TPAM Privileged Access Control
Dell Quest TPAM Privileged Access Control
Aidy Tificate
 
Linux advanced privilege escalation
Linux advanced privilege escalationLinux advanced privilege escalation
Linux advanced privilege escalation
Jameel Nabbo
 
Introduction to SAP Security
Introduction to SAP SecurityIntroduction to SAP Security
Introduction to SAP Security
Nasir Gondal
 
e-DMZ Products Overview
e-DMZ Products Overviewe-DMZ Products Overview
e-DMZ Products Overview
Dell
 
Pluggable Authentication Module
Pluggable Authentication ModulePluggable Authentication Module
Pluggable Authentication ModuleSinarShebl
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceohadlevy
 
006.itsecurity bcp v1
006.itsecurity bcp v1006.itsecurity bcp v1
006.itsecurity bcp v1
Mohammad Ashfaqur Rahman
 
SELinux Kernel Internals and Architecture - FOSS.IN/2005
SELinux Kernel Internals and Architecture - FOSS.IN/2005SELinux Kernel Internals and Architecture - FOSS.IN/2005
SELinux Kernel Internals and Architecture - FOSS.IN/2005
James Morris
 
ID304 - Lotus® Connections 3.0 TDI, SSO, and User Life Cycle Management: What...
ID304 - Lotus® Connections 3.0 TDI, SSO, and User Life Cycle Management: What...ID304 - Lotus® Connections 3.0 TDI, SSO, and User Life Cycle Management: What...
ID304 - Lotus® Connections 3.0 TDI, SSO, and User Life Cycle Management: What...
Luis Benitez
 
MySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench IntegrationMySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench IntegrationMario Beck
 
Apache2 BootCamp : Restricting Access
Apache2 BootCamp : Restricting AccessApache2 BootCamp : Restricting Access
Apache2 BootCamp : Restricting AccessWildan Maulana
 
MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014
Lars Thalmann
 
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
MITRE ATT&CK
 

Similar to Pluggable authentication modules (20)

Download It
Download ItDownload It
Download It
 
Chapter 09
Chapter 09Chapter 09
Chapter 09
 
Linux Security Crash Course
Linux Security Crash CourseLinux Security Crash Course
Linux Security Crash Course
 
7 unixsecurity
7 unixsecurity7 unixsecurity
7 unixsecurity
 
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
 
System Administeration Basics
System Administeration  BasicsSystem Administeration  Basics
System Administeration Basics
 
Asecurity-guidelines_and_best_practices_for_retail_online_and_business_online
Asecurity-guidelines_and_best_practices_for_retail_online_and_business_onlineAsecurity-guidelines_and_best_practices_for_retail_online_and_business_online
Asecurity-guidelines_and_best_practices_for_retail_online_and_business_online
 
Dell Quest TPAM Privileged Access Control
Dell Quest TPAM Privileged Access ControlDell Quest TPAM Privileged Access Control
Dell Quest TPAM Privileged Access Control
 
Linux advanced privilege escalation
Linux advanced privilege escalationLinux advanced privilege escalation
Linux advanced privilege escalation
 
Introduction to SAP Security
Introduction to SAP SecurityIntroduction to SAP Security
Introduction to SAP Security
 
e-DMZ Products Overview
e-DMZ Products Overviewe-DMZ Products Overview
e-DMZ Products Overview
 
Pluggable Authentication Module
Pluggable Authentication ModulePluggable Authentication Module
Pluggable Authentication Module
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conference
 
006.itsecurity bcp v1
006.itsecurity bcp v1006.itsecurity bcp v1
006.itsecurity bcp v1
 
SELinux Kernel Internals and Architecture - FOSS.IN/2005
SELinux Kernel Internals and Architecture - FOSS.IN/2005SELinux Kernel Internals and Architecture - FOSS.IN/2005
SELinux Kernel Internals and Architecture - FOSS.IN/2005
 
ID304 - Lotus® Connections 3.0 TDI, SSO, and User Life Cycle Management: What...
ID304 - Lotus® Connections 3.0 TDI, SSO, and User Life Cycle Management: What...ID304 - Lotus® Connections 3.0 TDI, SSO, and User Life Cycle Management: What...
ID304 - Lotus® Connections 3.0 TDI, SSO, and User Life Cycle Management: What...
 
MySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench IntegrationMySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench Integration
 
Apache2 BootCamp : Restricting Access
Apache2 BootCamp : Restricting AccessApache2 BootCamp : Restricting Access
Apache2 BootCamp : Restricting Access
 
MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014MySQL Fabric Tutorial, October 2014
MySQL Fabric Tutorial, October 2014
 
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
 

Recently uploaded

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 

Recently uploaded (20)

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 

Pluggable authentication modules

  • 1. YahiaKandeel GCIH,GSEC, RHCE,CEH, CCNA, MCP IPBackbone Security Engineer Etisalat
  • 2.
  • 3.  DiscretionaryAccessControls  SeLinux  TCPWrappers  Xinetd  IPTables  PluggableAuthenticationModule  Application AccessControl
  • 4.
  • 5.  Historically..  Each program had its own way of authenticating users ..  PAM  Pluggable, modular architecture  Affords the system administrator a great deal of flexibilityin setting authentication policies for the system.
  • 6.  Centralized authentication mechanism  /etc/pam.d/ contains the PAM configuration files for each PAM-awareapplication  All supported PAM Modules under /lib/security/ directory
  • 7.  auth  This module authenticates users against database  account  This module verifies that access is allowed. (e.g it checks expiration and time restrictions)  password  This module is used for changing user passwords.  session  This module configures and manages user sessions (e.g mounting a user's home directory and making the user's mailbox available.)
  • 8.  An individual module can provide any or all module interfaces. For instance, pam_unix.so provides all four module interfaces.  Module interface directives can be stacked, or placed upon one another, so that multiple modules are used together for one purpose.  Each PAM modules generate a success or failure result when called.  Controlflags tell PAM what to do with the result.  Ordering is very Important ..  /etc/pam.d/system-auth:  Acommon interface for all applications and service daemons calling into the PAMlibrary.
  • 9.  Required  Ifsuccess continue checking, if fail continue with failure  Requisite  Ifsuccess continue checking, if fail abort with failure  Sufficient  Ifsuccess grant access immediately, if fail ignore  Optional  The module result is ignored.  Include  Interpret the given file.All lines in the given file are treated as they were present in this configuration file
  • 10. Name Description pam_unix Modulefor traditional password authentication pam_rootok Gainonly root access pam_permit The promiscuous module pam_nologin Prevent non root uses pam_listfile denyor allow services based on an arbitrary file pam_tally2 The login counter (tallying) module pam_succeed_if test account characteristics pam_deny The locking pam_limits PAMmodule to limit resources pam_timestamp Auth using cached successfulauth attempts pam_time PAMmodule for time control access pam_cracklib Checkthe password against dictionary words
  • 11.  Test account characteristics ..  Synopsis: pam_succeed_if.so [flag...] [condition...]  Flags:  Conditions: auth required pam_succeed_if.so use_uiduser ingroup wheel use_uid Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated. quiet Don´t log failure or success to the system log. Field Test Value user ingroup Wheel uid >= 500
  • 12.  Authenticate using cached successful authentication attempts.  Synopsis: pam_timestamp.so[timestamp_timeout=number]  The auth and session module types are provided. auth sufficient pam_timestamp.so auth required pam_unix.so session required pam_unix.so session optional pam_timestamp.so /etc/pam.d/wireshark
  • 13.  Wireshark  Timestamp  Only for specific users
  • 14.  Deny or allow using services based on an arbitraryfile  Synopsis: pam_listfile.soitem=[user|rhost|group|shell]sense=[allow|deny] file=/path/filename onerr=[succeed|fail] auth required pam_listfile.soitem=user onerr=fail file=/etc/ssh.allowsense=allow item What is listed in the file and should be checked for. sense Action to take if found in file onerr What to do if something weird happens like being unable to open the file /etc/pam.d/sshd
  • 15.  Enable or disable TTY auditing for specified users.  Synopsis: pam_tty_audit.so[disable=patterns][enable=patterns]  To view the data that was logged by the kernel to audit use the command #aureport --tty. session required pam_tty_audit.sodisable=*enable=root /etc/pam.d/sshd
  • 16.  The login counter.  Synopsis: pam_tally2.so[onerr=[fail|succeed]][even_deny_root] [deny=n] [unlock_time=n][root_unlock_time=n] [audit]  To view the status for locked users run this command #pam_tally -u username auth required pam_tally2.so deny=4 even_deny_root unlock_time=1200 /etc/pam.d/sshd
  • 17.  PAM module to limit resources  Synopsis: pam_limits.so[change_uid][conf=/path/to/limits.conf]  By default limits are taken from the /etc/security/limits.conf session required pam_limits.so /etc/pam.d/sshd <domain> <type> <item> <value> student - maxlogins 1 /etc/security/limits.conf CPU Maxlogin Priority Memlock Hard Soft - Username @Group uid:uid *
  • 18.  PAM module for time control access  Synopsis: pam_time.so [noaudit]  The time access rules are taken from /etc/security/time.conf account required pam_time.so /etc/pam.d/sshd services; ttys; users; times sshd; * ; !root ; Wk0800-1700 /etc/security/time.conf Users Groups tty ttyp* * sshd login
  • 19.  SSHD:  Limit # of concurrent sessions  At specific time  For specific users  Max number of failed logins  Audit user activities  SU:  OnlySpecific users can escalate their priviledges
  • 20.  References:  http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch- pam.html  http://www.informit.com/articles/article.aspx?p=20968  Linuxman pages  Contacts:  Eng.Qandeel@gmail.com