Networking and Security with Linux

by
Steven Gordon
School of Engineering and Technology
CQUniversity Australia
This book is available as:
HTML: sandilands.info/nsl/
PDF: sandilands.info/nsl/nsl.pdf
NSL 19.03
1 March 2019 (r1671)

Contents
List of Figures
List of Figures
List of Tables
List of Tables
Glossary
Glossary
1 Introduction
 1.1 Purpose of This Book
 1.2 Using This Book
 1.3 Recognition
2 Linux, Ubuntu and VirtualBox
 2.1 What is Ubuntu Linux?
 2.2 Installing Ubuntu Linux
 2.3 Virtualisation and VirtualBox
3 Virtual Networking with Linux and VirtualBox
 3.1 Virtual Networking and virtnet
 3.2 Getting Started
 3.3 Using virtnet
 3.4 Troubleshooting virtnet
4 Linux Command Line
 4.1 Prerequisites
 4.2 Entering Commands
 4.3 Directory and File Operations
 4.4 Viewing and Editing Files
 4.5 Shortcuts in Bash
 4.6 Pipes and Redirection
 4.7 Processes and Jobs
 4.8 Searching for Files
 4.9 Processing Text Files
 4.10 More Examples
5 The Internet and Applications
 5.1 The Internet
 5.2 Clients, Servers and Addressing
 5.3 Web Browsing
 5.4 Remote Login
6 Automating Tasks with Scripts
 6.1 Prerequisites
 6.2 Introduction to Scripts
 6.3 More Scripting Examples
7 Users and Permissions
 7.1 Prerequisites
 7.2 Users and Permissions in Linux
 7.3 Commands for Managing Users and Permissions
 7.4 Users and Permissions by Example
 7.5 Passwords, Hashes and Rainbow Tables
8 Cryptography in Linux
 8.1 Prerequisites
 8.2 OpenSSL
 8.3 Using Classical Ciphers with pycipher
9 Networking Tools
 9.1 Prerequisites
 9.2 Operating Systems and Tool Interfaces
 9.3 Viewing and Changing Network Interface Information
 9.4 Viewing Ethernet Interface Details
 9.5 Testing Network Connectivity
 9.6 Testing a Route
 9.7 Converting Between Domain Names and IP Addresses
 9.8 Viewing the Routing Table
 9.9 Converting IP Addresses to Hardware Addresses
 9.10 Network Statistics
 9.11 Useful Networking Files
 9.12 Application and Performance Testing
10 Routing in Linux
 10.1 Prerequisites
 10.2 Routers
 10.3 Networking Setup Example
11 Packet Capture
 11.1 Prerequisites
 11.2 Packet Capture Concepts
 11.3 Capturing and Filtering with tcpdump
 11.4 Viewing and Analysing Packets with Wireshark
 11.5 Capture Examples
12 Web Server with Apache
 12.1 Prerequisites
 12.2 Installing and Running Apache Web Server
 12.3 HTTPS and Certificates
13 Firewalls with iptables
 13.1 Prerequisites
 13.2 Firewall Concepts
 13.3 iptables Concepts
 13.4 General Examples of iptables
 13.5 Stateful Packet Inspection Concept and Examples
14 DHCP Server for Automatic IP Addresses
 14.1 Prerequisites
 14.2 Automatic IP Address Configuration
 14.3 Installing a DHCP Server
 14.4 Using a DHCP Client
 14.5 Monitoring a DHCP Server
 14.6 More Resources on DHCP
15 Distributed Version Control with git
 15.1 Prerequisites
 15.2 Version Control Concepts
 15.3 Setup a Git Repository
 15.4 Using Git
16 Attacks on Web Applications
 16.1 Prerequisites
 16.2 Setup Demonstration Web Sites
 16.3 MyUni Grading Website
 16.4 Cookie Stealing Attack
 16.5 Unvalidated Redirect Attack
 16.6 SQL Injection Attack
 16.7 CSRF Attack
 16.8 Next Steps
17 Denial of Service Attacks
 17.1 Prerequisites
 17.2 Address Spoofing
 17.3 Ping Flooding DoS Attack
 17.4 NTP DDoS Attack
18 Private Networking with OpenVPN and Tor
19 Custom Applications with Sockets
 19.1 Prerequisites
 19.2 Programming with Sockets
 19.3 TCP Sockets in C
 19.4 UDP Sockets in C
 19.5 TCP Sockets in Python
 19.6 UDP Sockets in Python
 19.7 Raw Sockets in Python
20 Wireless Security in Linux
 20.1 Prerequisites
 20.2 Wireless LANs
 20.3 Capturing Wireless LAN Packets in Monitor Mode with iw
 20.4 Decrypting Captured Wireless LAN Packets
A Packet Formats and Constants
 A.1 Packet Formats
 A.2 Port Numbers and Status Codes
B Statistics for Communications and Security
 B.1 Binary Values
 B.2 Counting
 B.3 Permutations and Combinations
 B.4 Probability
 B.5 Collisions
C Cryptography Assumptions and Principles
 C.1 Assumptions
 C.2 Principles
D Versions of this Book
Index