logo资料库

Kali-Linux-Revealed-1st-edition..pdf

第1页 / 共341页
第2页 / 共341页
第3页 / 共341页
第4页 / 共341页
第5页 / 共341页
第6页 / 共341页
第7页 / 共341页
第8页 / 共341页
资料共341页,剩余部分请下载后查看
1. About Kali Linux
A Bit of History
Relationship with Debian
The Flow of Packages
Managing the Difference with Debian
Purpose and Use Cases
Main Kali Linux Features
A Live System
Forensics Mode
A Custom Linux Kernel
Completely Customizable
A Trustable Operating System
Usable on a Wide Range of ARM Devices
Kali Linux Policies
Single Root User by Default
Network Services Disabled by Default
A Curated Collection of Applications
Summary
2. Getting Started with Kali Linux
Downloading a Kali ISO Image
Where to Download
What to Download
Verifying Integrity and Authenticity
Relying on the TLS-Protected Website
Relying on PGP's Web of Trust
Copying the Image on a DVD-ROM or USB Key
Creating a Bootable Kali USB Drive on Windows
Creating a Bootable Kali USB Drive on Linux
Creating a Bootable Kali USB Drive on OS X/macOS
Booting a Kali ISO Image in Live Mode
On a Real Computer
In a Virtual Machine
Preliminary Remarks
VirtualBox
VMware
Summary
3. Linux Fundamentals
What Is Linux and What Is It Doing?
Driving Hardware
Unifying File Systems
Managing Processes
Rights Management
The Command Line
How To Get a Command Line
Command Line Basics: Browsing the Directory Tree and Managing Files
The File System
The Filesystem Hierarchy Standard
The User's Home Directory
Useful Commands
Displaying and Modifying Text Files
Searching for Files and within Files
Managing Processes
Managing Rights
Getting System Information and Logs
Discovering the Hardware
Summary
4. Installing Kali Linux
Minimal Installation Requirements
Step by Step Installation on a Hard Drive
Plain Installation
Booting and Starting the Installer
Selecting the Language
Selecting the Country
Selecting the Keyboard Layout
Detecting Hardware
Loading Components
Detecting Network Hardware
Configuring the Network
Root Password
Configuring the Clock
Detecting Disks and Other Devices
Partitioning
Copying the Live Image
Configuring the Package Manager (apt)
Installing the GRUB Boot Loader
Finishing the Installation and Rebooting
Installation on a Fully Encrypted File System
Introduction to LVM
Introduction to LUKS
Setting Up Encrypted Partitions
End of the Guided Partitioning with Encrypted LVM
Unattended Installations
Preseeding Answers
With Boot Parameters
With a Preseed File in the Initrd
With a Preseed File in the Boot Media
With a Preseed File Loaded from the Network
Creating a Preseed File
ARM Installations
Troubleshooting Installations
Summary
5. Configuring Kali Linux
Configuring the Network
On the Desktop with NetworkManager
On the Command Line with Ifupdown
On the Command Line with systemd-networkd
Managing Unix Users and Unix Groups
Creating User Accounts
Modifying an Existing Account or Password
Disabling an Account
Managing Unix Groups
Configuring Services
Configuring a Specific Program
Configuring SSH for Remote Logins
Configuring PostgreSQL Databases
Connection Type and Client Authentication
Creating Users and Databases
Managing PostgreSQL Clusters
Configuring Apache
Configuring Virtual Hosts
Common Directives
Managing Services
Summary
6. Helping Yourself and Getting Help
Documentation Sources
Manual Pages
Info Documents
Package-Specific Documentation
Websites
Kali Documentation at docs.kali.org
Kali Linux Communities
Web Forums on forums.kali.org
#kali-linux IRC Channel on Freenode
Filing a Good Bug Report
Generic Recommendations
How to Communicate
What to Put in the Bug Report
Miscellaneous Tips
Where to File a Bug Report
How to File a Bug Report
Filing a Bug Report in Kali
Filing a Bug Report in Debian
Filing a Bug Report in another Free Software Project
Summary
7. Securing and Monitoring Kali Linux
Defining a Security Policy
Possible Security Measures
On a Server
On a Laptop
Securing Network Services
Firewall or Packet Filtering
Netfilter Behavior
Syntax of iptables and ip6tables
Commands
Rules
Creating Rules
Installing the Rules at Each Boot
Monitoring and Logging
Monitoring Logs with logcheck
Monitoring Activity in Real Time
Detecting Changes
Auditing Packages with dpkg --verify
Monitoring Files: AIDE
Summary
8. Debian Package Management
Introduction to APT
Relationship between APT and dpkg
Understanding the sources.list File
Kali Repositories
The Kali-Rolling Repository
The Kali-Dev Repository
The Kali-Bleeding-Edge Repository
The Kali Linux Mirrors
Basic Package Interaction
Initializing APT
Installing Packages
Installing Packages with dpkg
Installing Packages with APT
Upgrading Kali Linux
Removing and Purging Packages
Inspecting Packages
Querying dpkg's Database and Inspecting .deb Files
Querying the Database of Available Packages with apt-cache and apt
Troubleshooting
Handling Problems after an Upgrade
The dpkg Log File
Reinstalling Packages with apt --reinstall and aptitude reinstall
Leveraging --force-* to Repair Broken Dependencies
Frontends: aptitude and synaptic
Aptitude
Synaptic
Advanced APT Configuration and Usage
Configuring APT
Managing Package Priorities
Working with Several Distributions
Tracking Automatically Installed Packages
Leveraging Multi-Arch Support
Enabling Multi-Arch
Multi-Arch Related Changes
Validating Package Authenticity
Package Reference: Digging Deeper into the Debian Package System
The control File
Dependencies: the Depends Field
Pre-Depends, a More Demanding Depends
Recommends, Suggests, and Enhances Fields
Conflicts: the Conflicts Field
Incompatibilities: the Breaks Field
Provided Items: the Provides Field
Replacing Files: The Replaces Field
Configuration Scripts
Installation and Upgrade Script Sequence
Package Removal
Checksums, Conffiles
Summary
9. Advanced Usage
Modifying Kali Packages
Getting the Sources
Installing Build Dependencies
Making Changes
Applying a Patch
Tweaking Build Options
Packaging a New Upstream Version
Starting the Build
Recompiling the Linux Kernel
Introduction and Prerequisites
Getting the Sources
Configuring the Kernel
Compiling and Building the Package
Building Custom Kali Live ISO Images
Installing Pre-Requisites
Building Live Images with Different Desktop Environments
Changing the Set of Installed Packages
Using Hooks to Tweak the Contents of the Image
Adding Files in the ISO Image or in the Live Filesystem
Adding Persistence to the Live ISO with a USB Key
The Persistence Feature: Explanations
Setting Up Unencrypted Persistence on a USB Key
Setting Up Encrypted Persistence on a USB Key
Using Multiple Persistence Stores
Summary
Summary Tips for Modifying Kali Packages
Summary Tips for Recompiling the Linux Kernel
Summary Tips for Building Custom Kali Live ISO Images
10. Kali Linux in the Enterprise
Installing Kali Linux Over the Network (PXE Boot)
Leveraging Configuration Management
Setting Up SaltStack
Executing Commands on Minions
Salt States and Other Features
Extending and Customizing Kali Linux
Forking Kali Packages
Creating Configuration Packages
Creating a Package Repository for APT
Summary
11. Introduction to Security Assessments
Kali Linux in an Assessment
Types of Assessments
Vulnerability Assessment
Likelihood of Occurrence
Impact
Overall Risk
In Summary
Compliance Penetration Test
Traditional Penetration Test
Application Assessment
Formalization of the Assessment
Types of Attacks
Denial of Service
Memory Corruption
Web Vulnerabilities
Password Attacks
Client-Side Attacks
Summary
12. Conclusion: The Road Ahead
Keeping Up with Changes
Showing Off Your Newly Gained Knowledge
Going Further
Towards System Administration
Towards Penetration Testing
Index
Kali Linux Revealed   Mastering the Penetration Testing Distribution
Kali Linux Revealed   Mastering the Penetration Testing Distribution by Raphaël Hertzog, Jim O’Gorman, and Mati Aharoni
Kali Linux Revealed Copyright © 2017 Raphaël Hertzog, Jim O’Gorman, and Mati Aharoni This book is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Ł http://creativecommons.org/licenses/by-sa/3.0/ Some sections of this book borrow content from the “Debian Administrator’s Handbook, Debian Jessie from Discovery to Mastery” written by Raphaël Hertzog and Roland Mas, which is available here: Ł https://debian-handbook.info/browse/stable/ For the purpose of the CC-BY-SA license, Kali Linux Revealed is an Adaptation of the Debian Administrator’s Handbook. “Kali Linux” is a trademark of Offensive Security. Any use or distribution of this book, modified or not, must comply with the trademark policy defined here: Ł https://www.kali.org/trademark-policy/ All Rights Not Explicitly Granted Above Are Reserved. ISBN: 978-0-9976156-0-9 (paperback) Offsec Press 19701 Bethel Church Road, #103-253 Cornelius NC 28031 USA www.offensive-security.com Library of Congress Control Number: 2017905895 The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the authors nor Offsec Press shall have any liabil- ity to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it. Because of the dynamic nature of the Internet, any Web addresses or links contained in this book may have changed since publication and may no longer be valid. Printed in the United States of America.
Table of Contents 1. About Kali Linux 1.2.1 The Flow of Packages 1.2.2 Managing the Difference with Debian 1.5.1 Single Root User by Default 1.5.2 Network Services Disabled by Default 1.5.3 A Curated Collection of Applications 1.1 A Bit of History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Relationship with Debian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Purpose and Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4 Main Kali Linux Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.1 A Live System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.2 Forensics Mode 1.4.3 A Custom Linux Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.4 Completely Customizable 1.4.5 A Trustable Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.4.6 Usable on a Wide Range of ARM Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 4 4 4 5 7 8 8 8 9 9 9 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.1.1 Where to Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.1.2 What to Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.1.3 Verifying Integrity and Authenticity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Relying on the TLS-Protected Website Relying on PGP’s Web of Trust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Creating a Bootable Kali USB Drive on Linux Creating a Bootable Kali USB Drive on OS X/macOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.2 Booting a Kali ISO Image in Live Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.2.1 On a Real Computer 2.2.2 In a Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.1.4 Copying the Image on a DVD-ROM or USB Key Creating a Bootable Kali USB Drive on Windows 1.5 Kali Linux Policies 1.6 Summary 2. Getting Started with Kali Linux 2.1 Downloading a Kali ISO Image
2.3 Summary 3. Linux Fundamentals 3.1.1 Driving Hardware 3.1.2 Unifying File Systems 3.1.3 Managing Processes 3.1.4 Rights Management 3.2.1 How To Get a Command Line 3.1 What Is Linux and What Is It Doing? 3.2.2 Command Line Basics: Browsing the Directory Tree and Managing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Preliminary Remarks VirtualBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 VMware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 47 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 3.2 The Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 . . . . . . . . . . . . . . . . . . 52 3.3 The File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 3.3.1 The Filesystem Hierarchy Standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 3.3.2 The User’s Home Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.4 Useful Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.4.1 Displaying and Modifying Text Files 3.4.2 Searching for Files and within Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 3.4.3 Managing Processes 3.4.4 Managing Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 3.4.5 Getting System Information and Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.4.6 Discovering the Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 65 4.1 Minimal Installation Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.2 Step by Step Installation on a Hard Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.2.1 Plain Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Selecting the Language Selecting the Country . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Selecting the Keyboard Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Configuring the Network Root Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Configuring the Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Detecting Hardware Loading Components Detecting Disks and Other Devices Booting and Starting the Installer Detecting Network Hardware 3.5 Summary 4. Installing Kali Linux Partitioning IV Kali Linux Revealed
4.3.1 Preseeding Answers With Boot Parameters With a Preseed File in the Initrd 4.3 Unattended Installations 4.4 ARM Installations 4.5 Troubleshooting Installations 4.6 Summary Copying the Live Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Configuring the Package Manager (apt) Installing the GRUB Boot Loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Finishing the Installation and Rebooting 4.2.2 Installation on a Fully Encrypted File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Introduction to LVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Introduction to LUKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Setting Up Encrypted Partitions End of the Guided Partitioning with Encrypted LVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 With a Preseed File in the Boot Media With a Preseed File Loaded from the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 4.3.2 Creating a Preseed File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 103 5.1 Configuring the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 5.1.1 On the Desktop with NetworkManager 5.1.2 On the Command Line with Ifupdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 5.1.3 On the Command Line with systemd-networkd 5.2 Managing Unix Users and Unix Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 5.2.1 Creating User Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 5.2.2 Modifying an Existing Account or Password 5.2.3 Disabling an Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5.2.4 Managing Unix Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5.3.1 Configuring a Specific Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 5.3.2 Configuring SSH for Remote Logins 5.3.3 Configuring PostgreSQL Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Connection Type and Client Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Creating Users and Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Configuring Virtual Hosts Common Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5.4 Managing Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 5.5 Summary 5. Configuring Kali Linux 5.3 Configuring Services Managing PostgreSQL Clusters 5.3.4 Configuring Apache Table of Contents V
6. Helping Yourself and Getting Help 6.2 Kali Linux Communities 123 6.1 Documentation Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 6.1.1 Manual Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.1.2 Info Documents 6.1.3 Package-Specific Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.1.4 Websites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 6.1.5 Kali Documentation at docs.kali.org . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6.2.1 Web Forums on forums.kali.org . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6.2.2 #kali-linux IRC Channel on Freenode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6.3 Filing a Good Bug Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 6.3.1 Generic Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 How to Communicate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 What to Put in the Bug Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 6.3.2 Where to File a Bug Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 6.3.3 How to File a Bug Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Filing a Bug Report in Kali Filing a Bug Report in Debian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Filing a Bug Report in another Free Software Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 149 7.1 Defining a Security Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 7.2 Possible Security Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 7.2.1 On a Server 7.2.2 On a Laptop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 7.3 Securing Network Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 7.4 Firewall or Packet Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 7.5 Monitoring and Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 7.5.1 Monitoring Logs with logcheck 7.5.2 Monitoring Activity in Real Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 7.5.3 Detecting Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Auditing Packages with dpkg --verify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Monitoring Files: AIDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 7.4.1 Netfilter Behavior 7.4.2 Syntax of iptables and ip6tables 7.4.3 Creating Rules 7.4.4 Installing the Rules at Each Boot Commands Rules Miscellaneous Tips 6.4 Summary 7. Securing and Monitoring Kali Linux 7.6 Summary VI Kali Linux Revealed
分享到:
收藏