Learn Python & Ethical Hacking From Scratch
Welcome this great course where you’ll learn python programming and ethical hacking at the same time, the course assumes you have NO prior knowledge in any of these topics, and by the end of it you’ll be at a high intermediate level being able to combine both of these skills and write python programs to hack into computer systems exactly the same way that black hat hackers do, and use the programming skills you learn to write any program even if it has nothing to do with hacking.
This course is highly practical but it won’t neglect the theory, we’ll start with basics on ethical hacking and python programming, installing the needed software and then we’ll dive and start programming straight away. From here onwards you’ll learn everything by example, by writing useful hacking programs, so we’ll never have any boring dry programming lectures.
The course is divided into a number of sections, each aims to achieve a specific goal, the goal is usually to hack into a certain system, so we’ll start by learning how this system work and its weaknesses, and then you’ll lean how to write a python program to exploit these weaknesses and hack the system, as we write the program I will teach you python programming from scratch covering one topic at a time, so by the end of the course you’re going to have a number of ethical hacking programs written by yourself (see below) from backdoors, keyloggers, credential harvesters, network hacking tools, website hacking tools and the list goes on. You’ll also have a deep understanding on how computer systems work, how to model problems, design an algorithm to solve problems and implement the solution using python.
As mentioned in this course you will learn both ethical hacking and programming at the same time, so here are some of the topics that will be covered in the course:
Writing programs for python 2 and 3.
Using modules and libraries.
Variables, types …etc.
Handling user input.
Reading and writing files.
Object oriented programming.
Packet manipulation using scapy.
Compiling programs to binary executables.
Sending & receiving HTTP requests.
Basics of network hacking / penetration testing.
Changing MAC address & bypassing filtering.
ARP Spoofing – redirect the flow of packets in a network.
DNS Spoofing – redirect requests from one website to another.
Spying on any client connected to the network – see usernames, passwords, visited urls ….etc.
Inject code in pages loaded by any computer connected to the same network.
Replace files on the fly as they get downloaded by any computer on the same network.
Detect ARP spoofing attacks.
Create malware for Windows, OS X and Linux.
Create trojans for Windows, OS X and Linux.
Hack Windows, OS X and Linux using custom backdoor.
Bypass Anti-Virus programs.
Use fake login prompt to steal credentials.
Display fake updates.
Use own keylogger to spy on everything typed on a Windows & Linux.
Learn the basics of website hacking / penetration testing.
Discover hidden files and directories in a website.
Run wordlist attacks to guess login information.
Discover and exploit XSS vulnerabilities.
Discover weaknesses in websites using own vulnerability scanner.
Programs you’ll build in this course:
You’ll learn all the above by implementing the following hacking programs
mac_changer – changes MAC Address to anything we want.
network_scanner – scans network and discovers the IP and MAC address of all connected clients.
arp_spoofer – runs an arp spoofing attack to redirect the flow of packets in the network allowing us to intercept data.
packet_sniffer – filters intercepted data and shows usernames, passwords, visited links ….etc
dns_spoofer – redirects DNS requests, eg: redirects requests to from one domain to another.
file_interceptor – replaces intercepted files with any file we want.
code_injector – injects code in intercepted HTML pages.
arpspoof_detector – detects ARP spoofing attacks.
execute_command payload – executes a system command on the computer it gets executed on.
execute_and_report payload – executes a system command and reports result via email.
download_and_execute payload – downloads a file and executes it on target system.
download_execute_and_report payload – downloads a file, executes it, and reports result by email.
reverse_backdoor – gives remote control over the system it gets executed on, allows us to
Access file system.
Execute system commands.
Download & upload files
keylogger – records key-strikes and sends them to us by email.
crawler – discovers hidden paths on a target website.
discover_subdomains – discovers subdomains on target website.
spider – maps the whole target website and discovers all files, directories and links.
guess_login – runs a wordlist attack to guess login information.
vulnerability_scanner – scans a target website for weaknesses and produces a report with all findings.
As you build the above you’ll learn:
Setting up a penetration testing lab to practice hacking safely.
Installing Kali Linux and Windows as virtual machines inside ANY operating system.
Linux terminal basics.
How networks work.
How clients communicate in a network.
Address Resolution Protocol – ARP.
Domain Name System – DNS.
Hypertext Transfer Protocol – HTTP.
How anti-virus programs work.
Connecting devices over TCP.
Transferring data over TCP.
How website work.
GET & POST requests.
By the end of the course you’re going to have programming skills to write any program even if it has nothing to do with hacking, but you’ll learn programming by programming hacking tools!
With this course you’ll get 24/7 support, so if you have any questions you can post them in the Q&A section and we’ll respond to you within 15 hours.
This course is created for educational purposes only and all the attacks are launched in my own lab or against devices that I have permission to test.
This course is totally a product of Zaid Sabih & zSecurity, no other organisation is associated with it or a certification exam. Although, you will receive a Course Completion Certification from Udemy, apart from that NO OTHER ORGANISATION IS INVOLVED.
This a teaser lecture to give you a taste of what you'll be able to do by the end of the course.
I will show you some of the tools we'll build later on in the course, you'll see how to:
1. Use the arp_spoof and packet_sniffer programs to steal usernames and passwords entered by any computer on the same network.
2. Use the backdoor to remotely hack a Windows machine.
3. Use the vulnerability_scanner program we'll write to discover weaknesses in a website.
This lecture will give you an introduction of how the course is structured, the different sections in the course, and what you'll learn in it.
This lecture will introduce you to the two main topics of the course, ethical hacking and python programming and will explain why they are related and why you might want to learn both at the same time.
In this course, we will be using a number of operating systems, Kali for hacking and 2 other target machines, in this section you will learn how to install all of these machines as virtual machines inside your current operating system, this allow use to use all of the machines at the same time, it also completely isolates these machines from your main machine therefore your main machine will not be affected if anything goes wrong.
This lecture will give you an overview of the lab that we will need to set up for this course.
This lecture will give you an overview of the software you need to for this course, how to install it and how to install Kali Linux as a virtual machine.
Kali Linux is an Linux distro that is designed for hackers.
In this lecture we will have a basic look on Kali linux just to get you comfortable with it.
You will learn how to use its main applications, browse files, connect to the internet ....etc.
In this lecture you will learn how to interact with the linux terminal and run linux commands.
This lecture will explain the differences between Python 2 and Python 3, you'll also write your first program here.
This lecture will teach you how to install a python interactive development environment (IDE), and how to use this IDE to write python programs.
Writing a MAC Address Changer - Python Basics
MAC address (Media Access Control) - is a unique identifier assigned to network interfaces.
In this lecture you'll learn what is is, how its used, and how to change it using Kali Linux.
This lecture will teach you how to use Python modules, as an example you'll learn how to use the subprocess module to execute system commands from Python.
In this lecture we'll write a very basic program to change the MAC address.
This lecture will introduce you to Python variables and strings, how initialise them and use them in code.
In this lecture you'll see how to use variables in our mac_changer to set the interface name and use a variable value for the mac address.
In this lecture you'll learn how to use python to ask the user to input values, and use this value to initialise a variable.
In this lecture you'll see how to use values entered by the user in our python program.
In this lecture you will learn how to implement command-line arguments in your python program.
In this lecture you'll learn how to use the arguments given by the user in our python program.
A function is a number of statements that does a specific task.
This lecture will introduce you to functions in python.
In this lecture you'll learn how to return values from functions, and use them in your python program.
This lecture will introduce you to decision making in python, you'll learn the different types of if statements that can be used to make decisions at run time and control the program flow.
In this section you'll see an example of using decision making to control program flow.
MAC Changer - Algorithm Design
An algorithm is a set of instructions to solve a problem.
This lecture will introduce you to algorithm design, as an example we'll design an algorithm to check if the mac address changes after the execution of our program and display an appropriate message to the user.
In this lecture you'll learn how to execute system command and read its result using Python.
Regular expressions are used to define search patters.
This lecture will introduce you to Python Regular Expressions (Regex).
As an example we'll learn how to use regex to extract a substring from a larger string.
In this lecture you'll learn how to use regex to extract a substring from a larger string.
We'll spend this lecture tidying up our program, making sure its readable and extendable.
In this lecture we'll put everything learned in this subsection in practice and implement the algorithm we designed at the first lecture to check if the mac address did change to the one the user requested and display an appropriate message.
In this lecture you will learn how to test Python 2 programs with Python 3 and fix conflicts to get them to properly work with Python 3.
Programming a Network Scanner
This lecture will give you an introduction to this section, explain what we want to achieve, and show you a teaser of a program that we want to mimc.
In this lecture you will learn how to set up a windows virtual machine so that we can try and hack into it to practice penetration testing.
Address Resolution Protocol (ARP) is used to discover the physical address (link layer address) of devices on the network.
This lecture will introduce you to ARP, how it works and it can be used to discover devices on the network.
In this lecture we'll use what we learned about ARP to design an algorithm to discover clients connected to the same network.
In this lecture you'll learn how to use Scapy to create an ARP request.
This lecture will teach you how to send a broadcast request using Scapy to discover clients connected to the same network.
In this lecture you'll learn how to use Scapy in Python to send an ARP packet, and receive its response.
This lecture will introduce you to the list data structure in Python, as an example you'll learn how to store the discovered clients in a list.
In this lecture you'll learn how to use a loop to iterate over list entries.
This lecture will teach you how to access values in a list, and use escape characters to display values nicely.
A dictionary is an unordered collection of data in which each element has a key (to access the element) and a value.
In this lecture you'll be introduced to dictionaries and learn how they work and how to use them.
As an example we'll use a dictionary to store data about the discovered clients.
This lecture will you give you an example of using nested data structures; we'll use a list of dictionaries to organise the discovered clients, and their related information.
In this lecture you'll learn some programming practices to keep the code clean, readable, and extendable.
This lecture will highlight some of the changes that you need to be aware of when using Scapy with python 3.
Writing an ARP Spoofer
ARP spoofing is a very dangerous attack that allows hackers to intercept the flow of packets in the network, allowing them to spy on any connected device or even modify data on the fly.
In this lecture you'll learn what arp spoofing attack is, why is it possible, and what it can be used to do ?
In this lecture you'll learn how to run an ARP spoofing attack using Kali Linux.
This lecture will teach you how to create an ARP Response using Scapy in Python.
This lecture will teach you how to send the responses we created in the previous section, and redirect the flow of packets to flow through our computer.
In this lecture you'll learn how to use python extract the MAC address value from ARP Responses.
A loop defines a block of code to run as long as a condition is valid.
This lecture will introduce you to loops in Python.
In this lecture we'll use an infinite loop to send arp spoofing responses and prominently intercept packets in the network.
This lecture will teach you more about printing, strings, and special characters to dynamically print data on screen.
Exceptions happen when something goes wrong during execution.
This lecture will teach you how to handle exceptions properly in Python.
In this lecture we'll implement a restore function to restore the arp table of targets when we quit the program.
In this lecture you'll learn how to invoke the restore function we wrote earlier when the user presses CTRL + C.
Writing a Packet Sniffer
The goal in this section is to write a packet sniffer, a program that can capture packets and analyse them to extract useful data such as visited websites, usernames, passwords....etc
This lecture will introduce you to this idea, and show you the program in action so you know exactly what's the end product that we are trying to get to.
This lecture will teach you how to sniff / capture packets using Scapy in Python.
This lecture will teach you how to filter sniffed packets and extract data sent over the HTTP layer.
This lecture will teach you how to access specific field values in packet layers.
In this lecture you'll learn how to extract data from specific fields, as an example you'll see how to extract sent passwords.
In this lecture we'll continue building our sniffer and you'll learn how to extract urls and display them on screen.
In this lecture we'll use our arp_spoof program to intercept packets, and the sniffer that we programmed in this section to filter the intercepted packets and display usernames, passwords and visited urls.
This lecture highlights one of the main changes that Python 3 brought; the separation between Bytes and Strings. So in this lecture you will learn the implications of this, and how convert strings to bytes and vice versa.
Writing a DNS Spoofer
This lecture will teach you how to create a proxy using Python, this allows us to intercepted packets, modify them and then forward them to their destination.
In this lecture you'll learn how to convert the intercepted packets to Scapy packets, so we can modify them later on.
DNS Spoofing allows hackers to redirect requests to domain names (eg: www.google.com) to any destination they want.
This lecture will explain to you what DNS Spoofing is, why is it possible, and how we'll implement a DNS Spoofer in Python.
In this lecture you'll learn how to analyse responses in general, as an example we'll be analysing DNS responses.
In this lecture you'll learn how to create a custom DNS response using Scapy in Python.
In this lecture we'll modify intercepted DNS responses and replace them with the one we created in the previous lecture.
In this lecture we'll use the program we built in this section with the arp_spoofer to redirect requests from bing.com to our own web server!
Writing a File Interceptor
The goal of this section is to write a Python program to replace downloads on the network.
This lecture will give you a general idea of what we want to achieve by the end of this section, and it will show you a teaser of the program that we'll build so you understand what we want to achieve by the end of this section.
In this lecture you'll learn how to filter Scapy packets based on the port they are sent from/to.
In this lecture, you'll learn how to analyse requests in general, as an example we'll analyse HTTP requests that request a file to download and see how we can exploit these requests to replace files.
In this lecture you'll learn how to modify HTTP requests on the fly.
In this lecture we'll put what we learned so far in practice and use our program to replace downloads on the fly.
In this lecture we'll use the program we wrote to replace files downloaded by any user with any file we want.
Writing a Code Injector
The goal of this section is to build a Python program to inject code in web pages loaded by computers on the same network.
This lecture will give you a general idea of what we want to achieve by the end of this section, and will show you a teaser of the program we want to build so you have a clear idea of what we want to achieve at the end of this section.
In this lecture you'll learn how to analyse HTTP responses to see how to exploit them to inject code.
In this lecture you'll learn more about regex and how to use it to replace a substring within a bigger string.
Some websites return encoded HTTP responses, in this lecture you'll learn how to decode HTTP responses so we can read them and modify them.
In this lecture we'll cover some programming practices to keep the code nice and tidy, so that its readable and extendable.
In this lecture we'll debug some issues in our code_injector and discuss how they can be fixed.
In this lecture you'll learn even more about regex in Python and how to use none capturing groups.
In this lecture you'll learn how to re-calculate the content length after modifying the page code.
BeEF is a browser exploitation framework that allows us to run a large number of commands on hooked browser.
In this lecture we will have an overview of the interface, how to start the framework and how to create a hook page and hook targets to it.
This lecture will show you how to use the program we made in this section to automatically hook browsers to BeEF.