Module 04 of 10

Scripting for Security

Lessons

About This Module

Security work is full of repetitive tasks: scanning many hosts, sorting through logs, testing lists of inputs. Scripting lets you hand that work to a computer so you can focus on the parts that need your judgement. It is also how most security tools are built, so learning to script helps you understand and customise the tools you use.

You'll start with Bash scripting, turning the commands from the last module into reusable scripts with variables, conditions, loops, and functions. Then you'll learn Python fundamentals, the most popular language in security. Finally you'll see Python for pentesting in action and build a simple port scanner of your own using sockets.

Only run the scripts you write against systems you own or have written permission to test, such as your own lab machines. Once you can script, you'll be ready for the next module, Reconnaissance & Scanning, where you'll gather information about targets using tools like Nmap.

Lessons

4 videos
01

Bash Scripting Tutorial for Beginners

Write your first Bash script and learn variables, conditions, loops, functions, and exit codes to automate everyday command line tasks.

02

Learn Python: Full Course for Beginners

A full introduction to Python covering variables, lists, loops, functions, classes, and the core concepts you need before writing security tools.

03

Python3 for Pentesting: Introduction

An introduction to using Python for penetration testing, including why it is so popular for building custom security tools.

04

Write a Port Scanner in Python in 5 Minutes

Follow along in a Linux terminal and build a basic port scanner with Python sockets that checks which ports are open on a host.