New security risks, continuously evolving regulation and increasing security standards have created new and growing needs for secure internal information transfers, which SSH provides. This book addresses these new trends in depth, offering the most up-to-date information on the integration of SSH into a security environment. It covers the newest features and applications of SSH-2 (which received Proposed Standard status from the IETF in 2006). SSH2 is more secure than previous versions and has many expanded uses on a wider variety of computing platforms. Another particular note driving new SSH2 adoption are the requirements of recent legislation (PCI/HIPAA/SOX/FISMA). SSH 2 has become an even more valuable tool, as it provides communications security compliance with the latest standards. This book offers the most up-to-date information on SSH2 in a practical, hands-on, tutorial-style reference that goes well beyond UNIX implementation. It concentrates on the latest version of SSH 2 with all new information.
- Discover why SSH2 offers more robust security than SSH1 and how to incorporate it into your network administration software toolbox
Inhaltsverzeichnis
1;Front Cover;1 2;Next Generation SSH2 Impementation: Securing Data in Motion;4 3;Lead Author and Technical Editor;6 4;Contributing Authors;7 5;Contents;12 6;Acknowledgments;22 7;Chapter 1: Introduction;24 7.1;Introduction;25 7.2;Why Is There a Need To Use SSH?;25 7.3;What SSH Does and Does Not Do;27 7.4;Comparison Between SSH and SSHv2;28 7.4.1;Encryption Standards;29 7.5;What Is SCP and SFTP?;30 7.6;SSH and the C-I-A Triad;31 7.7;Summary;34 7.8;Solutions Fast Track;34 7.9;Frequently Asked Questions;36 8;Chapter 2: OSI Model and Then Some;38 8.1;Introduction;39 8.2;50,000 Foot View of the OSI Model;39 8.2.1;Application Layer (7);41 8.2.2;Presentation Layer (6);42 8.2.3;Session Layer (5);43 8.2.4;Transport Layer (4);43 8.2.5;Network Layer (3);44 8.2.6;Data Link Layer (2);45 8.2.7;Physical Layer (1);45 8.3;Using the OSI Model to Troubleshoot;46 8.4;Applying the OSI Model to Forensics;52 8.5;Summary;60 8.6;Solutions Fast Track;60 8.7;Frequently Asked Questions;62 9;Chapter 3: An Introduction To Cryptography;64 9.1;What is Cryptography?;65 9.2;Cryptography and Information Security;65 9.2.1;Confidentiality;65 9.2.2;Integrity;66 9.2.3;Authentication;67 9.2.4;Non-Repudiation;68 9.3;Cryptographic Protocols and Applications;68 9.3.1;Domain Name Server Security Extensions;68 9.3.2;Secure Sockets Layer/Transport Layer Security;68 9.3.3;Secure Hypertext Transfer Protocol;69 9.3.4;Secure Shell Protocol;69 9.3.5;Internet Protocol Security;69 9.4;Cryptographic Systems;69 9.4.1;Symmetric Key Cryptosystems;71 9.4.2;Asymmetric Key Cryptosystems;72 9.5;Introducing Cryptographic Algorithms and Ciphers;73 9.5.1;Block Ciphers;73 9.5.1.1;Electronic Code Book Mode;74 9.5.1.2;Cipher Block Chaining Mode;74 9.5.1.3;Output Feedback Mode;74 9.5.1.4;Cipher Feedback Mode;74 9.5.2;Stream Ciphers;74 9.5.2.1;Synchronous Stream Ciphers;75 9.5.2.2;Asynchronous Stream Ciphers;75 9.6;Cryptographic Key Management;75 9.6.1;Internet Security Association and Key Management Protocol;76 9.6.2;DiffieHellman K
ey Exchange Protocol;76 9.7;Cryptographic Functions;77 9.7.1;Basic Cryptographic Functions;77 9.7.2;One-way Functions;77 9.7.3;Cryptographic Hash Functions;77 9.7.3.1;Message Digest Algorithm 5;78 9.7.3.2;Secure Hash Algorithm;78 9.7.3.3;RACE Integrity Primitives Evaluation Message Digest;78 9.7.4;Message Authentication Codes;78 9.8;Digital Signatures;79 9.9;Attacks on Cryptosystems;79 9.9.1;Plaintext-Based Attacks;80 9.9.2;Ciphertext-Based Attacks;80 9.10;Cryptography and SSH;81 9.10.1;Transport Layer;81 9.10.2;User Authentication Layer;81 9.10.3;Connection Layer;81 9.10.4;SSH Key Exchange;81 9.10.5;Encryption Algorithms Supported by SSH;82 9.11;Summary;83 9.12;Solutions Fast Track;83 9.13;Frequently Asked Questions;86 10;Chapter 4: SSH Features;88 10.1;Introduction to SSH;89 10.2;SSH Standards;90 10.2.1;SSH Message Types;92 10.2.1.1;SSH-TRANS;93 10.2.1.2;SSH-USERAUTH;94 10.2.1.3;SSH-CONNECT;96 10.3;SSH vs. Telnet/Rlogin;100 10.4;SSH Client/Server Overview;102 10.5;Packet Capture Detection;103 10.6;Summary;106 10.7;Solutions Fast Track;107 10.8;Frequently Asked Questions;109 11;Chapter 5: SSH Shortcomings;110 11.1;Introduction;111 11.2;Attacking SSL: Hacking the User;111 11.2.1;Concepts of Attacking the User with Social Engineering;111 11.2.1.1;Getting the Request to the Target: Physical Attack;111 11.2.1.1.1;Attacking with Technology;112 11.2.1.1.2;Attacking in person;112 11.2.1.1.3;Blending attacks;113 11.2.1.2;Attacking the Psyche;113 11.2.1.3;Giving Away the Farm;114 11.2.1.4;Methods of Attacking;114 11.2.1.4.1;E-mail;114 11.2.1.4.2;Phishing;114 11.2.1.4.3;Spear Phishing;115 11.2.1.4.4;Site Redirection;115 11.2.1.5;Key Loggers;115 11.2.1.5.1;Hardware;115 11.2.1.6;Trojans;116 11.3;Recognizing an SE Attack;117 11.3.1;How Do You Know if Youre Under an SE Attack?;117 11.3.2;SE Tripwires;118 11.4;Responding to an SE Event;118 11.4.1;Having Front Line Staff Respond;119 11.4.2;IT Responses;119 11.4.3;Management Response;120 11.4.3.1;Legal Response;121 11.5;Defending A
gainst Social Engineering Attacks;121 11.5.1;Whats Currently Working?;121 11.5.2;Covering More in Awareness;123 11.5.2.1;Actually Looking at the Browser Training;123 11.5.2.2;Two Factor Methods;124 11.5.2.3;Policy and Procedures for SE Attack;124 11.6;Social Engineering Scenarios for Awareness Training;126 11.6.1;Ill Have You Fired!;126 11.6.2;Youre So Wonderful!;126 11.6.3;Wed Like to Check Your Connections;127 11.6.4;Please Help Me Save My Job!;127 11.7;Summary;128 11.8;Solutions Fast Track;128 11.9;Frequently Asked Questions;130 12;Chapter 6: SSH Client Basics;132 12.1;Introduction;133 12.2;Understanding Network Encryption;133 12.3;Using OpenSSH to Encrypt Network Traffic Between Two Hosts;133 12.3.1;The OpenSSH Suite;134 12.4;Installing OpenSSH;137 12.5;Configuring SSH;138 12.5.1;How SSH Works;138 12.5.2;Insecure r-command Authentication;138 12.5.3;Secure SSH Authentication;140 12.6;Implementing SSH to Secure Data;142 12.7;Distributing the Public Key;145 12.8;The SSH Client;149 12.8.1;SSH Extended Options;151 12.9;Summary;155 12.10;Solutions Fast Track;155 12.11;Frequently Asked Questions;158 13;Chapter 7: The SSH Server Basics;160 13.1;The Components That Make Up the SSH Server;161 13.2;Protocols in Use;162 13.2.1;SSH Authentication Protocol;164 13.2.2;SSH Transport Layer Protocol;166 13.2.3;Connection Protocol;168 13.3;Randomness of Cryptography;169 13.4;Which Communication Is Protected with SSH;171 13.4.1;X11 Forwarding;171 13.4.2;Pipes;172 13.4.3;Portforwarding;173 13.4.4;Telescopic Tunnel;173 13.4.5;PPP over SSH;173 13.5;F-Secure SSH Server;174 13.5.1;Reflection for Secure IT Protocol;174 13.5.2;Reflection for Secure IT Authentication;175 13.5.3;Reflection for Secure IT Logging;176 13.6;Other SSH Server Types;177 13.6.1;OpenSSH;177 13.6.2;SSH1 e SSH2;178 13.6.3;OpenSSH Features;179 13.6.4;Dropbear SSH Server and Client;179 13.7;Compiling SSH;180 13.7.1;WAN LAN Connections;180 13.7.2;TCP-Wrappers;181 13.7.3;X Forwarding;181 13.7.4;Port Forwarding;181 13.7.5;
Encryption Algorithms;181 13.7.6;Authentications;181 13.8;Server Options;182 13.9;Running the Server;186 13.9.1;Basic Server Configuration;188 13.10;Authentication;189 13.11;Summary;192 13.12;Solutions Fast Track;192 13.13;Frequently Asked Questions;195 14;Chapter 8: SSH on Windows;196 14.1;Introduction;197 14.2;Using Windows SSH Clients;197 14.2.1;SSH Tectia;197 14.2.2;PuTTY;199 14.2.3;OpenSSH;203 14.3;Selecting an SSH Server for Windows;203 14.3.1;Windows and POSIX;203 14.3.2;Interix, SFU, and SUA;204 14.3.3;Cygwin;205 14.3.4;Win32;205 14.4;Using SUA SSH Servers;207 14.4.1;Installing SUA/SFU;207 14.4.1.1;Windows 2000, Windows XP, or Windows Server 2003;207 14.4.1.2;Windows Server 2003 R2, Windows Vista (Enterprise or Ultimate), or Windows Server 2008;208 14.4.2;Installing the SUA SDK and Utilities;209 14.4.3;Installing the Software;210 14.5;Using Cygwin SSH Servers;211 14.5.1;Installing Cygwin and OpenSSH;211 14.5.2;COPSSH;213 14.6;Using Native Windows SSH Servers;214 14.6.1;SSH Tectia;214 14.6.2;freeSSHd;215 14.7;Summary;218 14.8;Solutions Fast Track;218 14.9;Frequently Asked Questions;219 15;Chapter 9: Linux SSH;220 15.1;Introduction;221 15.2;Installing OpenSSH Server;221 15.2.1;Installing OpenSSH Using a Package Manager;221 15.3;Controlling Your SSH server;223 15.3.1;Using the Start and Stop Commands;224 15.4;Configuring SSH to Ease Your Paranoia;225 15.4.1;Editing the SSH Configuration File;226 15.4.1.1;Configuring SSH Protocols;226 15.4.1.2;Restricting root Access;226 15.4.1.3;Changing the Default Listening Port;226 15.4.2;Allowing and Denying Connections Using hosts Files;227 15.4.2.1;Binding to a Specific Address;228 15.4.2.2;More Changes to the sshd_config File;229 15.5;Using SSH;229 15.5.1;Logging into Remote Systems Securely;229 15.5.2;File Transfer Using SSH;230 15.5.3;Executing Secure Commands Remotely;231 15.5.4;Connecting to Your SSH Server from Windows;232 15.6;Additional Avenues of Approach;233 15.7;Summary;234 15.8;Solutions Fast Track;234 15.9;Fr
equently Asked Questions;236 15.10;Note;236 16;Chapter 10: Mac SSH;238 16.1;Introduction;239 16.2;Using SSH on a Mac;239 16.2.1;Connecting Securely to a Remote Server;240 16.2.1.1;Transferring Files Securely with SCP and SFTP;240 16.2.2;Configuring Your Mac for Remote Access;242 16.2.3;X11 Forwarding;243 16.2.3.1;Establishing an X11 Forwarding Session with a Remote Computer;244 16.2.3.2;X11 Forwarding from a Mac to a Remote X Server;245 16.3;Simplifying Key Management with the SSH Agent;246 16.4;Scripting Securely with SSH;248 16.4.1;Using Spotlight;249 16.4.1.1;Searching for Documents that Include the Words SSH, Mac, and Book;249 16.4.1.2;Searching for Documents with the Word fish or the Word Chips;249 16.4.2;Working with Disk Images;250 16.4.2.1;Mounting a DMG Disk Image;250 16.4.2.2;Ejecting a Mounted Disk Image;250 16.4.3;Managing Local Disks;250 16.4.3.1;Enumerating Available Disks and Their Partitions;251 16.4.3.2;Obtaining Disk Details;251 16.4.3.3;Verifying Permissions;251 16.4.4;Accessing System Configuration;252 16.4.4.1;Controlling the Computers Sleep Timer;252 16.4.4.2;Enabling Wake on Network Access;252 16.4.4.3;Printing Mac OS X Version Information;252 16.4.5;For Everything Else, There Is AppleScript;253 16.4.5.1;Accessing Your Personal Information;253 16.4.5.1.1;Recovering Phone Numbers;253 16.4.5.1.2;Recovering Addresses;253 16.4.5.2;Having Fun with Multimedia;253 16.4.5.2.1;Recording Video Remotely (or Checking in on the Kids;254 16.4.5.2.2;Recording Audio Remotely (or Bugging the Living Room;254 16.4.5.2.3;Spooking Your In-Laws;254 16.5;Summary;256 16.6;Solutions Fast Track;256 16.7;Frequently Asked Questions;257 17;Chapter 11: SSH Command Line and Advanced Client Use;260 17.1;Introduction;261 17.2;Client Configuration;261 17.3;Verbose Medium;271 17.4;Secure Copy;276 17.4.1;plink Command Line Link Utility;277 17.4.2;PuTTY Pageant Key Management Utility;277 17.4.3;PuTTY psftp Secure FTP Utility;278 17.4.4;PuTTY pscp Secure Copy Utility;281 17.5;Summ
ary;284 17.6;Solutions Fast Track;284 17.7;Frequently Asked Questions;286 18;Chapter 12: SSH Server Advanced Use;288 18.1;Introduction;289 18.2;Allowing SSH Connections;289 18.2.1;Controlling Access Using ACLs;289 18.2.1.1;Configuring the Windows Firewall;290 18.2.1.2;Configuring the Linux Firewall;291 18.2.2;Using TCP Wrappers;292 18.2.3;Using sshd_config Options;293 18.2.4;Using Host Keys for Authentication;294 18.3;Maintaining System Time;296 18.4;Configuring the Warning Banner;297 18.5;Securing User Home Directories;298 18.6;Controlling Session Timeouts;299 18.7;Logging Options;300 18.7.1;Logging Using sshd;300 18.7.2;Logging Using TCP Wrappers;301 18.7.3;Logging Using Netfilter;301 18.7.4;Security Considerations of Logging;302 18.8;Additional SSH Server Options;303 18.9;Debugging SSH;303 18.10;Summary;305 18.11;Solutions Fast Track;305 18.12;Frequently Asked Questions;308 19;Chapter 13: SSH Port Forwarding;310 19.1;Introduction;311 19.2;SSH Port Forwarding Commands;311 19.3;Securing E-mail with SSH Local L Port Forwarding;313 19.4;Bypassing Firewalls with SSH Remote R Port Forwarding;317 19.5;Using SSH SOCKS Proxy D To Tunnel Your HTTP/DNS Traffic;320 19.6;Summary;325 19.7;Solutions Fast Track;325 19.8;Frequently Asked Questions;327 20;Index;328