万本电子书0元读

万本电子书0元读

顶部广告

SELinux System Administration - Second Edition电子书

售       价:¥

20人正在读 | 0人评论 6.2

作       者:Sven Vermeulen

出  版  社:Packt Publishing

出版时间:2016-12-01

字       数:214.4万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Ward off traditional security permissions and effectively secure your Linux systems with SELinux About This Book Leverage SELinux to improve the secure state of your Linux system A clear approach to adopting SELinux within your organization Essential skills and techniques to help further your system administration career Who This Book Is For This book is for Linux administrators who want to control the secure state of their systems. It’s packed with the latest information on SELinux operations and administrative procedures so you’ll be able to further harden your system through mandatory access control (MAC) – a security strategy that has been shaping Linux security for years. What You Will Learn Analyze SELinux events and selectively enable or disable SELinux enforcement Manage Linux users and associate them with the right role and permission set Secure network communications through SELinux access controls Tune the full service flexibility by dynamically assigning resource labels Handle SELinux access patterns enforced through the system Query the SELinux policy in depth In Detail Do you have the crucial job of protecting your private and company systems from malicious attacks and undefined application behaviorAre you looking to secure your Linux systems with improved access controlsLook no further, intrepid administrator! This book will show you how to enhance your system’s secure state across Linux distributions, helping you keep application vulnerabilities at bay. This book covers the core SELinux concepts and shows you how to leverage SELinux to improve the protection measures of a Linux system. You will learn the SELinux fundamentals and all of SELinux’s configuration handles including conditional policies, constraints, policy types, and audit capabilities. These topics are paired with genuine examples of situations and issues you may come across as an administrator. In addition, you will learn how to further harden the virtualization offering of both libvirt (sVirt) and Docker through SELinux. By the end of the book you will know how SELinux works and how you can tune it to meet your needs. Style and approach This book offers a complete overview of SELinux administration and how it integrates with other components on a Linux system. It covers the majority of SELinux features with a mix of real life scenarios, de*ions, and examples. This book contains everything an administrator needs to customize SELinux.
目录展开

SELinux System Administration - Second Edition

SELinux System Administration - Second Edition

Credits

About the Author

About the Reviewers

www.PacktPub.com

Why subscribe?

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Errata

Piracy

Questions

1. Fundamental SELinux Concepts

Providing more security to Linux

Using Linux security modules

Extending regular DAC with SELinux

Restricting root privileges

Reducing the impact of vulnerabilities

Enabling SELinux support

Labeling all resources and objects

Dissecting the SELinux context

Enforcing access through types

Granting domain access through roles

Limiting roles through users

Controlling information flow through sensitivities

Defining and distributing policies

Writing SELinux policies

Distributing policies through modules

Bundling modules in a policy store

Distinguishing between policies

Supporting MLS

Dealing with unknown permissions

Supporting unconfined domains

Limiting cross-user sharing

Incrementing policy versions

Different policy content

Summary

2. Understanding SELinux Decisions and Logging

Switching SELinux on and off

Setting the global SELinux state

Switching to permissive (or enforcing) mode

Using kernel boot parameters

Disabling SELinux protections for a single service

Understanding SELinux-aware applications

SELinux logging and auditing

Following audit events

Uncovering more logging

Configuring Linux auditing

Configuring the local system logger

Reading SELinux denials

Other SELinux-related event types

USER_AVC

SELINUX_ERR

MAC_POLICY_LOAD

MAC_CONFIG_CHANGE

MAC_STATUS

NetLabel events

Labeled IPsec events

Using ausearch

Getting help with denials

Troubleshooting with setroubleshoot

Sending e-mails when SELinux denials occur

Using audit2why

Interacting with systemd-journal

Using common sense

Summary

3. Managing User Logins

User-oriented SELinux contexts

Understanding domain complexity

Querying for unconfined domains

SELinux users and roles

Listing SELinux user mappings

Mapping logins to SELinux users

Customizing logins towards services

Creating SELinux users

Listing accessible domains

Managing categories

Handling SELinux roles

Defining allowed SELinux contexts

Validating contexts with getseuser

Switching roles with newrole

Managing role access through sudo

Reaching other domains using runcon

Switching to the system role

SELinux and PAM

Assigning contexts through PAM

Prohibiting access during permissive mode

Polyinstantiating directories

Summary

4. Process Domains and File-Level Access Controls

About SELinux file contexts

Getting context information

Interpreting SELinux context types

Keeping or ignoring contexts

Inheriting the default context

Querying transition rules

Copying and moving files

Temporarily changing file contexts

Placing categories on files and directories

Using multilevel security on files

Backing up and restoring extended attributes

Using mount options to set SELinux contexts

SELinux file context expressions

Using context expressions

Registering file context changes

Using customizable types

Compiling the different file_contexts files

Exchanging local modifications

Modifying file contexts

Using setfiles, rlpkg, and fixfiles

Relabeling the entire file system

Automatically setting contexts with restorecond

The context of a process

Getting a process context

Transitioning towards a domain

Verifying a target context

Other supported transitions

Querying initial contexts

Limiting the scope of transitions

Sanitizing environments on transition

Disabling unconstrained transitions

Using Linux's NO_NEW_PRIVS

Types, permissions, and constraints

Understanding type attributes

Querying domain permissions

Learning about constraints

Summary

5. Controlling Network Communications

From IPC to TCP and UDP sockets

Using shared memory

Communicating locally through pipes

Conversing over UNIX domain sockets

Understanding netlink sockets

Dealing with TCP and UDP sockets

Listing connection contexts

Linux netfilter and SECMARK support

Introducing netfilter

Implementing security markings

Assigning labels to packets

Labeled networking

Fallback labeling with NetLabel

Limiting flows based on the network interface

Accepting peer communication from selected hosts

Verifying peer-to-peer flow

Using old-style controls

Labeled IPsec

Setting up regular IPsec

Enabling labeled IPsec

Using Libreswan

NetLabel/CIPSO

Configuring CIPSO mappings

Adding domain-specific mappings

Using local CIPSO definitions

Supporting IPv6 CALIPSO

Summary

6. sVirt and Docker Support

SELinux-secured virtualization

Introducing virtualization

Reviewing the risks of virtualization

Using nondynamic security models

Reusing existing virtualization domains

Understanding MCS

libvirt SELinux support

Differentiating between shared and dedicated resources

Assessing the libvirt architecture

Configuring libvirt for sVirt

Using static labels

Customizing labels

Using different storage pool locations

Interpreting output-only label information

Controlling available categories

Limiting supported hosts in a cluster

Modifying default contexts

Securing Docker containers

Understanding container security

Controlling non-sVirt Docker SELinux integration

Aligning Docker security with sVirt

Limiting container capabilities

Using different SELinux contexts

Relabeling volume mounts

Lowering SELinux controls for specific containers

Modifying default contexts

Summary

7. D-Bus and systemd

The system daemon (systemd)

Service support in systemd

Understanding unit files

Setting the SELinux context for a service

Using transient services

Requiring SELinux for a service

Relabeling files during service startup

Using socket-based activation

Governing unit operations access

Logging with systemd

Retrieving SELinux-related information

Querying logs given a SELinux context

Using setroubleshoot integration with journal

Using systemd containers

Initializing a systemd container

Using a specific SELinux context

Handling device files

Using udev rules

Setting a SELinux label on a device node

D-Bus communication

Understanding D-Bus

Controlling service acquisition with SELinux

Governing message flows

Summary

8. Working with SELinux Policies

SELinux booleans

Listing SELinux booleans

Changing boolean values

Inspecting the impact of a boolean

Enhancing SELinux policies

Listing policy modules

Loading and removing policy modules

Creating policies using audit2allow

Using sensible module names

Using refpolicy macros with audit2allow

Using selocal

Creating custom modules

Building SELinux native modules

Building reference policy modules

Building CIL policy modules

Adding file context definitions

Creating roles and user domains

Creating the pgsql_admin.te file

Creating the user rights

Granting interactive shell access

Generating skeleton user policy files

Creating new application domains

Creating the mojomojo.* files

Creating policy interfaces

Generating skeleton application policy files

Replacing existing policies

Replacing RHEL policies

Replacing Gentoo policies

Other uses of policy enhancements

Creating customized SECMARK types

Auditing access attempts

Creating customizable types

Summary

9. Analyzing Policy Behavior

Single-step analysis

Using different SELinux policy files

Displaying policy object information

Understanding sesearch

Querying allow rules

Querying type transition rules

Querying other type rules

Querying role related rules

Browsing with apol

Domain transition analysis

Using apol for domain transition analysis

Using sedta for domain transition analysis

Information flow analysis

Using apol for information flow analysis

Using seinfoflow for information flow analysis

Other policy analysis

Comparing policies with sediff

Analyzing policies with sepolicy

Summary

10. SELinux Use Cases

Hardening web servers

Describing the situation

Configuring for a multi-instance setup

Creating the SELinux categories

Choosing the right contexts

Enabling administrative accounts

Handling web server behavior

Dealing with content updates

Tuning the network and firewall rules

Securing shell services

Splitting SSH over multiple instances

Updating the network rules

Configuring for chrooted access

Associating SELinux mappings based on access

Tuning SSH SELinux rules

Enabling multi-tenancy on the user level

File sharing through NFS

Setting up basic NFS

Enabling NFS support

Tuning the NFS SELinux rules

Using context mounts

Working with labeled NFS

Comparing Samba with NFS

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部