SlideShare una empresa de Scribd logo
1 de 24
What’s new in Sudo 1.8?
Pluggable modules for Sudo
Introduction to Sudo
•Sudo allows a system administrator to give
users the ability to run commands as the super
user without having to run a root shell, or su.
•Sudo logs each command run.
•Command to be run are prefixed with “sudo”.
•The file that determines who can run what is
called the sudoers file.
Brief History of Sudo
•1980: First version from SUNY/Buffalo
•1985: Updated version posted to net.sources
•1986: CU-Boulder version
–Unix System Administration Handbook
•1991: Root Group version
•1994: I start making releases derived from the
Root Group Sudo
Sudo 1.8 Modular Architecture
•Two types of plugins
1.Policy plugins
•Determine who can do what
•Only one policy plugin may be loaded
2.I/O log plugins
•Record the session
•tty input/output
•stdin, stdout, stderr
What is this stuff good for?
•In the past, if an organization needed to use a
different security policy for root access, users
had to use the utilities provided with that policy.
–I.E. replace sudo with something else
•Now, a policy plugin can be used instead
–No longer need to stop using sudo
•Your workflow doesn’t have to change
•Sudo behaves just like it always did
What is this stuff good for?
•Organizations may have a requirement to audit
root access sessions
–SOX, HIPPA, etc
•I/O logging since Sudo 1.7.3
–Logged to a local file
•Replay logs via sudoreplay
•Syslog unsuitable due to large amount of traffic
–If local logs are not enough, a plugin can be
used
What if I like sudoers?
•Nothing changes
–Sudoers (file or LDAP) is the default policy
plugin
•Visudo works the way it always has
•No changes to logging, etc
–Sudoers I/O log plugin logs to the local host,
just like in Sudo 1.7
•Sessions can be replayed with sudoreplay
•Compressed with zlib by default (gzip)
Plugin API Design Decisions
Two main approaches to modules:
• Fine grained – lots of hooks
–Logging, authentication, policy sources, etc
–Pros
•Easier to replace only certain parts of sudo
•Simple modules might be smaller
–Cons
•Much more complicated API
•harder to plug in a totally foreign policy server
Plugin API Design Decisions
•Coarse grained – module does most things
•Pros:
–Simpler API
–Architecture less limiting
•Cons:
–modules may duplicate existing sudoers
functionality
We have it both ways!
•The current plugin API is coarse-grained with a
small number of entry points.
•Sudoers plugin already somewhat modular
–Sudoers file vs. LDAP using nsswitch.conf
•Could support pluggable sudoers sources
–if there is demand for it…
–Non-Unix group provider plugin API
•Active Directory groups, alternate group file
•Details later…
Who Benefits?
•Just our corporate overlords?
–No!
•Several open source plugins in development
–FreeIPA security server
–University of Colorado extended LDAP plugin
–I/O module for sslogger
–I plan to work on a revamped sudoers format
/etc/sudo.conf
•Configures plugins and plugin-agnostic paths
•Plugin plugin_symbol plugin_path
–Plugin sudoers_policy sudoers.so
–Plugin sudoers_io /usr/libexec/sudoers.so
–The “plugin_symbol” is the variable holding
the policy_plugin or io_plugin struct
–If “plugin_path” not fully qualified, it is relative
to the libexec dir
/etc/sudo.conf
•Path name pathname
–Currently only used to specify the askpass GUI
prompter.
•Path askpass /usr/X11R6/bin/ssh-askpass
•Path askpass /usr/libexec/ssh/gnome-ssh-askpass
–In Sudo 1.7 the askpass path was set in sudoers
–Because user interaction is via the main sudo
driver, not a plugin, askpass must be specified in
sudo.conf
Sudo 1.8 Flow of Control
•Sudo parses command line options
•Reads /etc/sudo.conf
•Initializes plugins with user info and command
line options
•Sudo queries plugin with command
–User interaction via conversation function
–Plugin returns yes, no, or error answer
–Also sets up the execution environment
Sudo 1.8 Flow of Control
•Sudo runs the command
–Changes UID/GID, CWD, environment, etc
–If logging I/O
•Command runs in a pty
•I/O passed to I/O plugins for logging
–I/O plugin can also terminate the command
–When command exits, sudo calls plugin close()
functions with the exit status (or error value)
Changes to Sudoers File
•askpass setting moved to sudo.conf
–Sudoers module does not prompt user directly
•New iolog_file and iolog_dir settings
–Where to put I/O logs and how to name them
–Supports escape sequences that expand to
user, group, runas_user, runas_group,
hostname, command, as well as strftime()
escapes.
•Group provider plugin
Sudoers Group Provider Plugin
•Allows sudoers to support non-Unix groups
–Can be useful to work around 16 group limit
•Simple API: init, query, cleanup functions
•Syntax:
–Explicit: %:groupname
•Only the group provider queried
–Implicit: %groupname
•Only queried if no Unix group by that name
exists
Plugin API Walk Through
•Interface described in sudo_plugin.h header
•Plugin writer’s guide bundled with Sudo 1.8 in
POD and man formats. Html version at:
http://www.sudo.ws/sudo_plugin.man.html
•Switch to shell to talk through sudo_plugin.h
Demo Time!
•Demo to show Sudo 1.7.5 vs. 1.8.0
–Works the same
•Edit sudo.conf file to change plugin
•Run commands using custom plugin
•Show I/O logging and tty signal proxying
•Demo session replay using sudoreplay
Debunking the FUD
•A certain vendor has put out a “How Secure is
Your Sudo” whitepaper advertised in Linux
Magazine and others.
•Let’s debunk a few of their claims…
Debunking the FUD
•Claim: Sudo doesn’t support remote logging or
protect the integrity of the logs
•Reality: Sudo logs via syslog which can log
remotely
– A number of syslog daemons exist that use
TLS and/or support encrypted, signed log files.
Because sudo uses a standard log method, you
can use a log daemon that suits your needs.
–OS audit support on Linux, Solaris, MacOS, …
Debunking the FUD
•Claim: Sudo allows a user to run a shell, after
which nothing is logged
•Reality: The intended use of sudo is to run
commands without resorting to a root shell.
The “noexec” feature can be used to disable
shell escapes and “sudoedit” allows for safe
editing of text files. When a shell is required,
I/O logging can be used to record the session.
Debunking the FUD
•Claim: Lack of QA testing
•Reality: QA happens in several places
–The amount of QA I do myself is increasing
•Currently adding more regression and unit tests
–Vendors that ship Sudo do QA of their
packages
–Open source means anyone can audit the code
–Legitimate bugs get handled fairly quickly
Where To Get It?
•http://www.sudo.ws
•Source and binary packages available
•When third-party plugins are available I will
maintain a list on the Sudo web site.

Más contenido relacionado

La actualidad más candente

Fuse- Filesystem in User space
Fuse- Filesystem in User space Fuse- Filesystem in User space
Fuse- Filesystem in User space Danny Tseng
 
Device drivers Introduction
Device drivers IntroductionDevice drivers Introduction
Device drivers Introductionvijay selva
 
Unix lecture1
Unix lecture1Unix lecture1
Unix lecture1dolleyj
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basicsSankar Suriya
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1NAILBITER
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoSherif Mousa
 
FUSE (Filesystem in Userspace) on OpenSolaris
FUSE (Filesystem in Userspace) on OpenSolarisFUSE (Filesystem in Userspace) on OpenSolaris
FUSE (Filesystem in Userspace) on OpenSolariselliando dias
 
Writing flexible filesystems in FUSE-Python
Writing flexible filesystems in FUSE-PythonWriting flexible filesystems in FUSE-Python
Writing flexible filesystems in FUSE-PythonAnurag Patel
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentalsBimal Jain
 
Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land Ahmed El-Arabawy
 
Unix Internals OS Architecture
Unix Internals OS ArchitectureUnix Internals OS Architecture
Unix Internals OS ArchitectureKhader Shaik
 
FUSE Developing Fillesystems in userspace
FUSE Developing Fillesystems in userspaceFUSE Developing Fillesystems in userspace
FUSE Developing Fillesystems in userspaceelliando dias
 
Fuse'ing python for rapid development of storage efficient FS
Fuse'ing python for rapid development of storage efficient FSFuse'ing python for rapid development of storage efficient FS
Fuse'ing python for rapid development of storage efficient FSChetan Giridhar
 
Introduction to Linux Kernel
Introduction to Linux KernelIntroduction to Linux Kernel
Introduction to Linux KernelStryker King
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in LinuxSiddhesh Palkar
 

La actualidad más candente (20)

Fuse- Filesystem in User space
Fuse- Filesystem in User space Fuse- Filesystem in User space
Fuse- Filesystem in User space
 
Device drivers Introduction
Device drivers IntroductionDevice drivers Introduction
Device drivers Introduction
 
Arch linux
Arch linuxArch linux
Arch linux
 
Unix lecture1
Unix lecture1Unix lecture1
Unix lecture1
 
Sudo`
Sudo`Sudo`
Sudo`
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basics
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to Yocto
 
FUSE (Filesystem in Userspace) on OpenSolaris
FUSE (Filesystem in Userspace) on OpenSolarisFUSE (Filesystem in Userspace) on OpenSolaris
FUSE (Filesystem in Userspace) on OpenSolaris
 
Writing flexible filesystems in FUSE-Python
Writing flexible filesystems in FUSE-PythonWriting flexible filesystems in FUSE-Python
Writing flexible filesystems in FUSE-Python
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
 
3. introduction of centos
3. introduction of centos3. introduction of centos
3. introduction of centos
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land
 
Unix Internals OS Architecture
Unix Internals OS ArchitectureUnix Internals OS Architecture
Unix Internals OS Architecture
 
FUSE Developing Fillesystems in userspace
FUSE Developing Fillesystems in userspaceFUSE Developing Fillesystems in userspace
FUSE Developing Fillesystems in userspace
 
Fuse'ing python for rapid development of storage efficient FS
Fuse'ing python for rapid development of storage efficient FSFuse'ing python for rapid development of storage efficient FS
Fuse'ing python for rapid development of storage efficient FS
 
Introduction to Linux Kernel
Introduction to Linux KernelIntroduction to Linux Kernel
Introduction to Linux Kernel
 
Order of boot process in Linux
Order of boot process in LinuxOrder of boot process in Linux
Order of boot process in Linux
 

Similar a What’s new in Sudo 1.8?

Linux privilege escalation 101
Linux privilege escalation 101Linux privilege escalation 101
Linux privilege escalation 101Rashid feroz
 
Sudo – Giving access while staying in control
Sudo – Giving access while staying in controlSudo – Giving access while staying in control
Sudo – Giving access while staying in controlAll Things Open
 
Installation of Odoo 16 on Ubuntu 20.04 LTS | Cybrosys
Installation of Odoo 16 on Ubuntu 20.04 LTS | CybrosysInstallation of Odoo 16 on Ubuntu 20.04 LTS | Cybrosys
Installation of Odoo 16 on Ubuntu 20.04 LTS | CybrosysCeline George
 
How to Install Odoo 11 on Ubuntu 16.04?
How to Install Odoo 11 on Ubuntu 16.04?How to Install Odoo 11 on Ubuntu 16.04?
How to Install Odoo 11 on Ubuntu 16.04?Celine George
 
Gentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingGentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingDonnie Berkholz
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management Duressa Teshome
 
Rootless Kubernetes
Rootless KubernetesRootless Kubernetes
Rootless KubernetesAkihiro Suda
 
Presentation for git jira and linux
Presentation for git jira and linuxPresentation for git jira and linux
Presentation for git jira and linuxdkylko1
 
How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7VCP Muthukrishna
 
Suricata: A Decade Under the Influence (of packet sniffing)
Suricata: A Decade Under the Influence (of packet sniffing)Suricata: A Decade Under the Influence (of packet sniffing)
Suricata: A Decade Under the Influence (of packet sniffing)Jason Williams
 
Process Management Operating Systems .pptx
Process Management        Operating Systems .pptxProcess Management        Operating Systems .pptx
Process Management Operating Systems .pptxSAIKRISHNADURVASULA2
 
Ex 1 chapter11-configure-network-tony_chen
Ex 1 chapter11-configure-network-tony_chenEx 1 chapter11-configure-network-tony_chen
Ex 1 chapter11-configure-network-tony_chenĐô GiẢn
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Seungha Son
 

Similar a What’s new in Sudo 1.8? (20)

Linux Security Crash Course
Linux Security Crash CourseLinux Security Crash Course
Linux Security Crash Course
 
Linux privilege escalation 101
Linux privilege escalation 101Linux privilege escalation 101
Linux privilege escalation 101
 
Sudo – Giving access while staying in control
Sudo – Giving access while staying in controlSudo – Giving access while staying in control
Sudo – Giving access while staying in control
 
Installation of Odoo 16 on Ubuntu 20.04 LTS | Cybrosys
Installation of Odoo 16 on Ubuntu 20.04 LTS | CybrosysInstallation of Odoo 16 on Ubuntu 20.04 LTS | Cybrosys
Installation of Odoo 16 on Ubuntu 20.04 LTS | Cybrosys
 
How to Install Odoo 11 on Ubuntu 16.04?
How to Install Odoo 11 on Ubuntu 16.04?How to Install Odoo 11 on Ubuntu 16.04?
How to Install Odoo 11 on Ubuntu 16.04?
 
Linux
Linux Linux
Linux
 
Gentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingGentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile Everything
 
Basic orientation to Linux
Basic orientation to LinuxBasic orientation to Linux
Basic orientation to Linux
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management
 
Rootless Kubernetes
Rootless KubernetesRootless Kubernetes
Rootless Kubernetes
 
Presentation for git jira and linux
Presentation for git jira and linuxPresentation for git jira and linux
Presentation for git jira and linux
 
How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7
 
Odoo V8 Installation
Odoo V8 InstallationOdoo V8 Installation
Odoo V8 Installation
 
Node modules
Node modulesNode modules
Node modules
 
Adhocr T-dose 2012
Adhocr T-dose 2012Adhocr T-dose 2012
Adhocr T-dose 2012
 
Suricata: A Decade Under the Influence (of packet sniffing)
Suricata: A Decade Under the Influence (of packet sniffing)Suricata: A Decade Under the Influence (of packet sniffing)
Suricata: A Decade Under the Influence (of packet sniffing)
 
Process Management Operating Systems .pptx
Process Management        Operating Systems .pptxProcess Management        Operating Systems .pptx
Process Management Operating Systems .pptx
 
3 technical-dns-workshop-day2
3 technical-dns-workshop-day23 technical-dns-workshop-day2
3 technical-dns-workshop-day2
 
Ex 1 chapter11-configure-network-tony_chen
Ex 1 chapter11-configure-network-tony_chenEx 1 chapter11-configure-network-tony_chen
Ex 1 chapter11-configure-network-tony_chen
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기
 

Último

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Último (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

What’s new in Sudo 1.8?

  • 1. What’s new in Sudo 1.8? Pluggable modules for Sudo
  • 2. Introduction to Sudo •Sudo allows a system administrator to give users the ability to run commands as the super user without having to run a root shell, or su. •Sudo logs each command run. •Command to be run are prefixed with “sudo”. •The file that determines who can run what is called the sudoers file.
  • 3. Brief History of Sudo •1980: First version from SUNY/Buffalo •1985: Updated version posted to net.sources •1986: CU-Boulder version –Unix System Administration Handbook •1991: Root Group version •1994: I start making releases derived from the Root Group Sudo
  • 4. Sudo 1.8 Modular Architecture •Two types of plugins 1.Policy plugins •Determine who can do what •Only one policy plugin may be loaded 2.I/O log plugins •Record the session •tty input/output •stdin, stdout, stderr
  • 5. What is this stuff good for? •In the past, if an organization needed to use a different security policy for root access, users had to use the utilities provided with that policy. –I.E. replace sudo with something else •Now, a policy plugin can be used instead –No longer need to stop using sudo •Your workflow doesn’t have to change •Sudo behaves just like it always did
  • 6. What is this stuff good for? •Organizations may have a requirement to audit root access sessions –SOX, HIPPA, etc •I/O logging since Sudo 1.7.3 –Logged to a local file •Replay logs via sudoreplay •Syslog unsuitable due to large amount of traffic –If local logs are not enough, a plugin can be used
  • 7. What if I like sudoers? •Nothing changes –Sudoers (file or LDAP) is the default policy plugin •Visudo works the way it always has •No changes to logging, etc –Sudoers I/O log plugin logs to the local host, just like in Sudo 1.7 •Sessions can be replayed with sudoreplay •Compressed with zlib by default (gzip)
  • 8. Plugin API Design Decisions Two main approaches to modules: • Fine grained – lots of hooks –Logging, authentication, policy sources, etc –Pros •Easier to replace only certain parts of sudo •Simple modules might be smaller –Cons •Much more complicated API •harder to plug in a totally foreign policy server
  • 9. Plugin API Design Decisions •Coarse grained – module does most things •Pros: –Simpler API –Architecture less limiting •Cons: –modules may duplicate existing sudoers functionality
  • 10. We have it both ways! •The current plugin API is coarse-grained with a small number of entry points. •Sudoers plugin already somewhat modular –Sudoers file vs. LDAP using nsswitch.conf •Could support pluggable sudoers sources –if there is demand for it… –Non-Unix group provider plugin API •Active Directory groups, alternate group file •Details later…
  • 11. Who Benefits? •Just our corporate overlords? –No! •Several open source plugins in development –FreeIPA security server –University of Colorado extended LDAP plugin –I/O module for sslogger –I plan to work on a revamped sudoers format
  • 12. /etc/sudo.conf •Configures plugins and plugin-agnostic paths •Plugin plugin_symbol plugin_path –Plugin sudoers_policy sudoers.so –Plugin sudoers_io /usr/libexec/sudoers.so –The “plugin_symbol” is the variable holding the policy_plugin or io_plugin struct –If “plugin_path” not fully qualified, it is relative to the libexec dir
  • 13. /etc/sudo.conf •Path name pathname –Currently only used to specify the askpass GUI prompter. •Path askpass /usr/X11R6/bin/ssh-askpass •Path askpass /usr/libexec/ssh/gnome-ssh-askpass –In Sudo 1.7 the askpass path was set in sudoers –Because user interaction is via the main sudo driver, not a plugin, askpass must be specified in sudo.conf
  • 14. Sudo 1.8 Flow of Control •Sudo parses command line options •Reads /etc/sudo.conf •Initializes plugins with user info and command line options •Sudo queries plugin with command –User interaction via conversation function –Plugin returns yes, no, or error answer –Also sets up the execution environment
  • 15. Sudo 1.8 Flow of Control •Sudo runs the command –Changes UID/GID, CWD, environment, etc –If logging I/O •Command runs in a pty •I/O passed to I/O plugins for logging –I/O plugin can also terminate the command –When command exits, sudo calls plugin close() functions with the exit status (or error value)
  • 16. Changes to Sudoers File •askpass setting moved to sudo.conf –Sudoers module does not prompt user directly •New iolog_file and iolog_dir settings –Where to put I/O logs and how to name them –Supports escape sequences that expand to user, group, runas_user, runas_group, hostname, command, as well as strftime() escapes. •Group provider plugin
  • 17. Sudoers Group Provider Plugin •Allows sudoers to support non-Unix groups –Can be useful to work around 16 group limit •Simple API: init, query, cleanup functions •Syntax: –Explicit: %:groupname •Only the group provider queried –Implicit: %groupname •Only queried if no Unix group by that name exists
  • 18. Plugin API Walk Through •Interface described in sudo_plugin.h header •Plugin writer’s guide bundled with Sudo 1.8 in POD and man formats. Html version at: http://www.sudo.ws/sudo_plugin.man.html •Switch to shell to talk through sudo_plugin.h
  • 19. Demo Time! •Demo to show Sudo 1.7.5 vs. 1.8.0 –Works the same •Edit sudo.conf file to change plugin •Run commands using custom plugin •Show I/O logging and tty signal proxying •Demo session replay using sudoreplay
  • 20. Debunking the FUD •A certain vendor has put out a “How Secure is Your Sudo” whitepaper advertised in Linux Magazine and others. •Let’s debunk a few of their claims…
  • 21. Debunking the FUD •Claim: Sudo doesn’t support remote logging or protect the integrity of the logs •Reality: Sudo logs via syslog which can log remotely – A number of syslog daemons exist that use TLS and/or support encrypted, signed log files. Because sudo uses a standard log method, you can use a log daemon that suits your needs. –OS audit support on Linux, Solaris, MacOS, …
  • 22. Debunking the FUD •Claim: Sudo allows a user to run a shell, after which nothing is logged •Reality: The intended use of sudo is to run commands without resorting to a root shell. The “noexec” feature can be used to disable shell escapes and “sudoedit” allows for safe editing of text files. When a shell is required, I/O logging can be used to record the session.
  • 23. Debunking the FUD •Claim: Lack of QA testing •Reality: QA happens in several places –The amount of QA I do myself is increasing •Currently adding more regression and unit tests –Vendors that ship Sudo do QA of their packages –Open source means anyone can audit the code –Legitimate bugs get handled fairly quickly
  • 24. Where To Get It? •http://www.sudo.ws •Source and binary packages available •When third-party plugins are available I will maintain a list on the Sudo web site.