How do these hacks stand up? Comment on a hack from the book by choosing the associated "Discuss" link below. You can also view the code from any of the hacks by clicking on the "Listing" or "Code" links. A number of hacks have been selected to be featured online in their entirety; you may view those hacks by clicking on the hack titles that are linked.
Protect Your Logs from Tampering Use file attributes to prevent intruders from
removing traces of their break-in
[Discuss (0) | Link to this hack]
HACK #6
Delegate Administrative Roles Let others do your work for you without giving
away root privileges
[Discuss (0) | Link to this hack]
HACK #7
Automate Cryptographic Signature Verification Use scripting and key servers to automate the
chore of checking software authenticity
[Discuss (0) | Link to this hack]
HACK #8
Check for Listening Services Find out whether unneeded services are
listening and looking for possible backdoors
[Discuss (0) | Link to this hack]
HACK #9
Prevent Services from Binding to an Interface Keep services from listening on a port instead
of firewalling them
[Discuss (0) | Link to this hack]
HACK #10
Restrict Services with Sandboxed Environments Mitigate system damage by keeping service
compromises contained
[Discuss (0) | Link to this hack]
HACK #11
Use proftp with a MySQL Authentication Source Make sure that your database
system's OS is running as efficiently as possible
with these tweaks
[Discuss (0) | Link to this hack]
HACK #12
Prevent Stack-Smashing Attacks Learn how to prevent stack-based buffer
overflows
[Discuss (0) | Link to this hack]
HACK #13
Lock Down Your Kernel with grsecurity Harden your system against attacks with the
grsecurity kernel patch
[Discuss (0) | Link to this hack]
HACK #14
Restrict Applications with grsecurity Use Linux capabilities and
grsecurity's ACLs to restrict applications on your
system
[Discuss (0) | Link to this hack]
HACK #15
Restrict System Calls with Systrace Keep your programs from performing tasks they
weren't meant to do
[Discuss (0) | Link to this hack]
HACK #16
Automated Systrace Policy Creation Let Systrace's automated mode
do your work for you
[Discuss (0) | Link to this hack]
HACK #17
Control Login Access with PAM Seize fine-grained control of when and where
your users can access your system
[Discuss (0) | Link to this hack]
HACK #18
Restricted Shell Environments Keep your users from shooting themselves (and
you) in the foot
[Discuss (0) | Link to this hack]
HACK #19
Enforce User and Group Resource Limits Make sure resource-hungry users
don't bring down your entire system
[Discuss (0) | Link to this hack]
HACK #20
Automate System Updates Patch security holes in a timely manner to
prevent intrusions
[Discuss (0) | Link to this hack]
Windows Host Security
HACK #21
Check Servers for Applied Patches Make sure your Windows servers have the latest
patches installed
[Discuss (0) | Link to this hack]
HACK #22
Get a List of Open Files and Their Owning Processes Look for suspicious activity by monitoring file
accesses
[Discuss (0) | Link to this hack]
HACK #23
List Running Services and Open Ports Check for remotely accessible services the
Windows way
[Discuss (0) | Link to this hack]
Clear the Paging File at Shutdown Prevent information leaks by automatically
clearing the swap file before shutting down
[Discuss (0) | Link to this hack]
HACK #30
Restrict Applications Available to Users Prevent your users from running potentially
dangerous applications
[Discuss (0) | Link to this hack]
Network Security
HACK #31
Detect ARP Spoofing Find out if there's a
"man in the middle" impersonating
your server
[Discuss (0) | Link to this hack]
HACK #32
Create a Static ARP Table Use static ARP table entries to combat spoofing
and other nefarious activities
[Discuss (0) | Link to this hack]
HACK #33
Firewall with Netfilter Protect your network with
Linux's powerful firewalling features
[Discuss (0) | Link to this hack]
HACK #34
Firewall with OpenBSD's PacketFilter Use OpenBSD's firewalling
features to protect your network
[Discuss (0) | Link to this hack]
HACK #35
Create an Authenticated Gateway Use PF to keep unauthorized users off the
network
[Discuss (0) | Link to this hack]
Keep Your Network Self-Contained Use egress filtering to mitigate attacks and
information leaks coming from your network
[Discuss (0) | Link to this hack]
HACK #38
Test Your Firewall Find out if your firewall really works the way
you think it should
[Discuss (0) | Link to this hack]
HACK #39
MAC Filtering with Netfilter Keep unwanted machines off your network with
MAC address whitelisting
[Discuss (0) | Link to this hack]
Fool Remote Operating System Detection Software Evade remote OS detection attempts by
disguising your TCP/IP stack
[Discuss (0) | Link to this hack]
HACK #42
Keep an Inventory of Your Network Use Nmap to keep track of the devices and
services on your network
[Discuss (0) | Link to this hack]
HACK #43
Scan Your Network for Vulnerabilities Use Nessus to quickly and easily scan your
network for services that are vulnerable to attack
[Discuss (0) | Link to this hack]
HACK #44
Keep Server Clocks Synchronized Make log analysis easier by keeping the time on
your systems in sync
[Discuss (0) | Link to this hack]
HACK #45
Create Your Own Certificate Authority Sign your own certificates to use in securing
your network
[Discuss (0) | Link to this hack]
HACK #46
Distribute Your CA to Clients Be sure all of your clients trust your new
Certificate Authority
[Discuss (0) | Link to this hack]
HACK #47
Encrypt IMAP and POP with SSL Keep your email safe from prying eyes while
also protecting your POP and IMAP passwords
[Discuss (0) | Link to this hack]
HACK #48
Set Up TLS-Enabled SMTP Protect your users' in-transit
email from eavesdroppers
[Discuss (0) | Link to this hack]
HACK #49
Detect Ethernet Sniffers Remotely Detect potential spies on your network without
having to trust compromised machines
[Discuss (0) | Link to this hack]
HACK #50
Install Apache with SSL and suEXEC Help secure your web applications with mod_ssl
and suEXEC
[Discuss (0) | Link to this hack]
HACK #51
Secure BIND Lock down your BIND setup to help contain
potential security problems
[Discuss (0) | Link to this hack]
Run ntop for Real-Time Network Stats See who's doing what on your
network over time with ntop
[Discuss (0) | Link to this hack]
HACK #64
Audit Network Traffic Use Argus to monitor your network and to keep
an audit trail of your traffic
[Discuss (0) | Link to this hack]
HACK #65
Collect Statistics with Firewall Rules Make your firewall ruleset do the work for you
when you want to collect statistics
[Discuss (0) | Link to this hack]
PPTP Tunneling Set up quick and easy VPN access using the
Point-to-Point Tunneling Protocol
[Discuss (0) | Link to this hack]
HACK #71
Opportunistic Encryption with FreeS/WAN Use FreeS/WAN and DNS TXT records to
automatically create encrypted connections between
machines
[Discuss (0) | Link to this hack]
HACK #72
Forward and Encrypt Traffic with SSH Keep network traffic to arbitrary ports secure
with ssh port forwarding
[Discuss (0) | Link to this hack]
HACK #73
Quick Logins with SSH Client Keys Use SSH keys instead of password authentication
to speed up and automate logins
[Discuss (0) | Link to this hack]
HACK #74
Squid Proxy over SSH Secure your web traffic from prying
eyes—and improve performance in the process
[Discuss (0) | Link to this hack]
HACK #75
Use SSH as a SOCKS Proxy Protect your web traffic using the basic VPN
functionality built into SSH itself
[Discuss (0) | Link to this hack]
HACK #76
Encrypt and Tunnel Traffic with SSL Use stunnel to add SSL encryption to any
network service
[Discuss (0) | Link to this hack]
HACK #77
Tunnel Connections Inside HTTP Break through draconian firewalls by using
httptunnel
[Discuss (0) | Link to this hack]
HACK #78
Tunnel with VTun and SSH Connect two networks using VTun and a single
SSH connection
[Discuss (0) | Link to this hack]
HACK #79
Automatic vtund.conf Generator Generate a vtund.conf on the fly to match
changing network conditions
[Discuss (0) | Link to this hack]
Detect Intrusions with Snort Use one of the most powerful (and free) network
intrusion detection systems available to help you keep an eye on your
network
[Discuss (0) | Link to this hack]
Prevent and Contain Intrusions with Snort_inline Install Snort_inline on your firewall to
contain intrusions, or to stop them as they're
happening
[Discuss (0) | Link to this hack]
HACK #88
Automated Dynamic Firewalling with SnortSam Use SnortSam to prevent intrusions by putting
dynamic firewall rules in place to stop in-progress
attacks
[Discuss (0) | Link to this hack]
HACK #89
Detect Anomalous Behavior Detect attacks and intrusions by monitoring
your network for abnormal traffic, regardless of the actual
content
[Discuss (0) | Link to this hack]
HACK #90
Automatically Update Snort's Rules Keep your Snort rules up-to-date with
Oinkmaster
[Discuss (0) | Link to this hack]
HACK #91
Create a Distributed Stealth Sensor Network Keep your IDS sensors safe from attack, while
still giving yourself access to their data
[Discuss (0) | Link to this hack]
HACK #92
Use Snort in High-Performance Environments with Barnyard Decouple Snort's output stage
so it can keep pace with the packets
[Discuss (0) | Link to this hack]
HACK #93
Detect and Prevent Web Application Intrusions Protect your web server and dynamic content
from intrusions
[Discuss (0) | Link to this hack]
HACK #94
Simulate a Network of Vulnerable Hosts Use honeyd to fool would-be attackers into
chasing ghosts
[Discuss (0) | Link to this hack]
HACK #95
Record Honeypot Activity Keep track of everything that happens on your
honeypot
[Discuss (0) | Link to this hack]
Recovery and Response
HACK #96
Image Mounted Filesystems Make a bit-for-bit copy of your
system's disk for forensic analysis
[Discuss (0) | Link to this hack]
HACK #97
Verify File Integrity and Find Compromised Files Use Tripwire to alert you to compromised files
or verify file integrity in the event of a compromise
[Discuss (0) | Link to this hack]
HACK #98
Find Compromised Packages with RPM Verify operating system installed files in an
RPM-based distribution
[Discuss (0) | Link to this hack]