Linux Basics For Hackers: Getting Started With Networking, Scripting, And Security In Kali [1st Edition] 1593278551, 9781593278557, 159327856X, 9781593278564, 159327856X, 9781593278564

This practical, tutorial-style book uses the Kali Linux distribution to teach Linux basics with a focus on how hackers w

8,771 741 8MB

English Pages 250 Year 2018

Report DMCA / Copyright

DOWNLOAD FILE

Linux Basics For Hackers: Getting Started With Networking, Scripting, And Security In Kali [1st Edition]
 1593278551,  9781593278557,  159327856X,  9781593278564,  159327856X,  9781593278564

  • Commentary
  • TruePDF

Table of contents :
Brief Contents......Page 11
Contents in Detail......Page 13
Acknowledgments......Page 21
Introduction......Page 23
Military and Espionage......Page 25
The Future Belongs to Linux/Unix......Page 26
Downloading Kali Linux......Page 27
Installing VirtualBox......Page 28
Setting Up Your Virtual Machine......Page 29
Installing Kali on the VM......Page 31
Setting Up Kali......Page 33
Introductory Terms and Concepts......Page 39
A Tour of Kali......Page 41
The Linux Filesystem......Page 42
Basic Commands in Linux......Page 43
Navigating the Linux Filesystem......Page 44
Getting Help......Page 46
Finding Stuff......Page 47
Finding Binaries in the PATH Variable with which......Page 48
Performing More Powerful Searches with find......Page 49
Filtering with grep......Page 50
Creating Files......Page 51
Renaming a File......Page 53
Removing a Directory......Page 54
Exercises......Page 55
Chapter 2: Text Manipulation......Page 57
Taking the Head......Page 58
Grabbing That Tail......Page 59
Filtering Text with grep......Page 60
Using sed to Find and Replace......Page 61
Viewing Files with more and less......Page 62
Displaying and Filtering with less......Page 63
Summary......Page 64
Exercises......Page 65
Analyzing Networks with ifconfig......Page 67
Checking Wireless Network Devices with iwconfig......Page 68
Changing Your IP Address......Page 69
Assigning New IP Addresses from the DHCP Server......Page 70
Examining DNS with dig......Page 71
Changing Your DNS Server......Page 72
Mapping Your Own IP Addresses......Page 74
Exercises......Page 75
Chapter 4: Adding and Removing Software......Page 77
Adding Software......Page 78
Removing Software......Page 79
Upgrading Packages......Page 80
Adding Repositories to Your sources.list File......Page 81
Using a GUI-based Installer......Page 83
Installing Software with git......Page 84
Exercises......Page 85
Chapter 5: Controlling File and Directory Permissions......Page 87
Granting Ownership to an Individual User......Page 88
Checking Permissions......Page 89
Changing Permissions with Decimal Notation......Page 90
Changing Permissions with UGO......Page 92
Giving Root Execute Permission on a New Tool......Page 93
Setting More Secure Default Permissions with Masks......Page 94
Granting Temporary Root Permissions with SUID......Page 95
Special Permissions, Privilege Escalation, and the Hacker......Page 96
Exercises......Page 98
Chapter 6: Process Management......Page 99
Viewing Processes......Page 100
Filtering by Process Name......Page 101
Managing Processes......Page 102
Changing Process Priority with nice......Page 103
Killing Processes......Page 104
Moving a Process to the Foreground......Page 106
Scheduling Processes......Page 107
Exercises......Page 108
Chapter 7: Managing User Environment Variables......Page 109
Viewing All Environment Variables......Page 110
Changing Variable Values for a Session......Page 111
Making Variable Value Changes Permanent......Page 112
Changing Your Shell Prompt......Page 113
Adding to the PATH Variable......Page 114
Creating a User-Defined Variable......Page 115
Summary......Page 116
Exercises......Page 117
Chapter 8: Bash Scripting......Page 119
Your First Script: “Hello, Hackers-Arise!”......Page 120
Setting Execute Permissions......Page 121
Adding Functionality with Variables and User Input......Page 122
Our Task......Page 124
A Simple Scanner......Page 125
Improving the MySQL Scanner......Page 126
Common Built-in Bash Commands......Page 128
Exercises......Page 129
What Is Compression?......Page 131
Tarring Files Together......Page 132
Compressing with gzip......Page 134
Compressing with compress......Page 135
Creating Bit-by-Bit or Physical Copies of Storage Devices......Page 136
Exercises......Page 137
Chapter 10: Filesystem and Storage Device Management......Page 139
The Device Directory /dev......Page 140
Drive Partitions......Page 141
List Block Devices and Information with lsblk......Page 143
Mounting Storage Devices Yourself......Page 144
Getting Information on Mounted Disks......Page 145
Checking for Errors......Page 146
Exercises......Page 147
Chapter 11: The Logging System......Page 149
The rsyslog Configuration File......Page 150
The rsyslog Logging Rules......Page 151
Automatically Cleaning Up Logs with logrotate......Page 153
Removing Evidence......Page 155
Disabling Logging......Page 156
Exercises......Page 157
Chapter 12: Using and Abusing Services......Page 159
Creating an HTTP Web Server with the Apache Web Server......Page 160
Starting with Apache......Page 161
Adding Some HTML......Page 162
OpenSSH and the Raspberry Spy Pi......Page 163
Building the Raspberry Spy Pi......Page 164
Configuring the Camera......Page 165
Starting to Spy......Page 167
Starting MySQL......Page 168
Setting a MySQL Password......Page 169
Accessing a Remote Database......Page 170
Connecting to a Database......Page 171
Database Tables......Page 172
PostgreSQL with Metasploit......Page 173
Summary......Page 175
Exercises......Page 176
Chapter 13: Becoming Secure and Anonymous......Page 177
How the Internet Gives Us Away......Page 178
How Tor Works......Page 179
Security Concerns......Page 180
Proxy Servers......Page 181
Setting Proxies in the Config File......Page 182
Some More Interesting Options......Page 184
Virtual Private Networks......Page 186
Encrypted Email......Page 188
Exercises......Page 189
Chapter 14: Understanding and Inspecting Wireless Networks......Page 191
Basic Wireless Commands......Page 192
Wi-Fi Recon with aircrack-ng......Page 195
Detecting and Connecting to Bluetooth......Page 197
Bluetooth Scanning and Reconnaissance......Page 198
Exercises......Page 202
Chapter 15: Managing the Linux Kernel and Loadable Kernel Modules......Page 203
What Is a Kernel Module?......Page 204
Kernel Tuning with sysctl......Page 205
Managing Kernel Modules......Page 207
Adding and Removing Modules with modprobe......Page 208
Summary......Page 209
Exercises......Page 210
Chapter 16: Automating Tasks with Job Scheduling......Page 211
Scheduling an Event or Job to Run on an Automatic Basis......Page 212
Scheduling a Backup Task......Page 214
Using crontab to Schedule Your MySQLscanner......Page 215
Using rc Scripts to Run Jobs at Startup......Page 216
Adding Services to rc.d......Page 217
Adding Services to Your Bootup via a GUI......Page 218
Exercises......Page 219
Chapter 17: Python Scripting Basics for Hackers......Page 221
Using pip......Page 222
Installing Third-Party Modules......Page 223
Getting Started Scripting with Python......Page 224
Variables......Page 225
Functions......Page 228
Lists......Page 229
Object-Oriented Programming (OOP)......Page 230
Building a TCP Client......Page 232
Creating a TCP Listener......Page 233
Control Statements......Page 235
Loops......Page 236
Improving Our Hacking Scripts......Page 237
Exceptions and Password Crackers......Page 239
Exercises......Page 241
Index......Page 243

Polecaj historie