Buffer Overflows Made Easy - Part 1: Introduction
Key Takeaways
The video introduces the concept of buffer overflows and covers the anatomy of memory and the stack, with a focus on cybersecurity and penetration testing using tools like fuzzing and shellcode generation.
Full Transcript
what's up everybody welcome to this course titled buffer overflows made easy brought to you by me the cyber mentor in this course I'm going to be teaching you how to perform a 32-bit Windows buffer overflow attack and make it seem easy in the process so this is going to be a hands-on course we're going to be using windows and kali linux and we're not going to be doing any death by powerpoint outside of a little bit in this first video so we're going to break it down step by step into individual videos and by the end of it you should be able to perform a 32-bit windows buffer overflow attack on your own so let's talk about some of the things that we're going to be seeing so we're going to cover quickly anatomy of memory anatomy of the stack and then we're going to talk about the buffer overflow walkthrough but we're going to be doing that in the hands-on portion so let's talk about anatomy of memory so when we talk about anatomy of memory we have the kernel at the top and we've got text at the bottom so if you think of your kernel think of your command line you can also think about this as a bunch of ones and your text you can think about as you read only code and you can think about that as a bunch of zeros so this is only for informational purposes but we can also call this the kernel the top the text the bottom where we're really going to be focused on though is going to be the stack so if we dive into this memory here and we dive even deeper and we go into the stack it's kind of similar so we have these registers here and I'll provide links down below on how to brush up on some of these registers if you're not familiar but the important thing is what we need to know for this lesson is that you have the ESP you have your buffer space your EBP and your AIP so we can think about this again as the ESP sitting at the top and the EBP sitting as the bottom so what happens is you have this buffer space and this buffer space fills up with characters so the buffer space is going to go downward what should happen is if you're properly your buffer space then if you send a bunch of characters at it and say a bunch of A's for example like this you should reach the EBP but stop the buffer space should be able to contain the characters that you're sending now however if you have a buffer overflow attack then you actually overflow the buffer space you're using and reach over the EBP and into something called the EIP now the EIP is where things get interesting this is a pointer address or a return address so what we can do is we can use this address to point to directions that we instruct now these directions are actually going to be malicious code that gives us a reverse shell so we're going to learn that later on in future videos as we go step by step so this doesn't have to seem very logical right now you just have to very very base level understand that what's happening and the stack is that you're overflowing buffer space so if you can write over the buffer space and write down all the way to the EIP you can control the stack and you can control the pointer and eventually you can have a reverse shell which will lead to route so it's going to make a lot more sense when we dive in a hands-on there's just some more of a theoretical thing so let's talk about really quick the steps to conduct a buffer overflow so the first step we're going to cover is called spiking so spiking is going to be a method that we use to find a vulnerable part of a program once we find the vulnerable part of the program we're gonna do fuzzing which is kind of similar to spiking so fuzzy we're gonna send a bunch of characters at a program and see if we can break it if we do break it we want to find out at what point we can we did break it right so we want to find something called the offset and we use that offset to overwrite the IP the pointer address that we're talking about once we have the EIP controlled we need to do a few house cleanup things one is called finding bad characters the other is called finding the right module this doesn't need to make sense right now but once we do that and we have this information from steps five and six we can generate shellcode this malicious shellcode that will allow us to get this reversed shell so we're going to use that we're going to point that AI P to our malicious shellcode and hopefully we're going to gain root so again this will all make sense as we dive into the future videos and we get hands on so if you look at these videos these are the videos that are gonna come so our next video is going to be on spiking second one's gonna be on fuzzing and so on so if you have trouble with one area in particular you can watch that area specifically and not have to look through a long video and hopefully break this down into little nuggets so last thing we're gonna do is we're gonna talk about the tools we're gonna be using in this course so I have a victim machine I'm sitting on Windows 10 Pro you do not have to be on Windows 10 Pro you could be on a different type of machine but Windows is critical for this as Voland server runs on Windows so if you're running Windows 7 that's fine your return address may be different than mine but if you follow the steps in what I tell you through the course you should have no issue getting root so as I've mentioned before we're gonna be using something called Vohland server that is our vulnerable software they're gonna be running on Windows this is what's going to allow us to exploit and attack the software and gain root so our attacker machine is going to be Kali Linux you do not have to use Kali Linux it is what is I'm going to be using through the course I do recommend any sort of virtual machine that you have it could be Ubuntu or some form of Linux or something you're comfortable with writing Python in and lastly on our Windows machine as well the victim machine we're gonna be running something called immunity debugger so all of these tools are going to be your homework to be installed let's go ahead and just talk about them real quick I'm gonna open up Internet Explorer here or actually edge and what we're gonna do is I've just pulled up the Google and I'm just gonna kind of show you here what we're gonna do so for vault and server if you google vole and server you're gonna go to the grey corner you click on the grey corner you scroll down just a little bit I want you to download this Volant server zip and extract it to a folder from there on we're going to be running bold and server repeatedly so make sure you know where this is that same goes for immunity to bugger you can download it here if you see download the latest immunity to bugger here there's gonna be this register page what you have to do you could put in fake information if you're not comfortable giving your real information it'll still download regardless so all you need to do here is download immunity and install it on your Windows machine so again we're gonna have the bone server and the immunity on the Windows machine if you want to follow along with what I'm doing on the VM side of the house then I am using VMware pro but pro does cost money so you can use a workstation so what you can do is you can say VMware Workstation download and just look for VMware Workstation player right here you can click this link and go into the download page again you'll be running that on your base machine so if that's Windows then this is what you're gonna run it on and you can do this in Reverse so if you're running a Windows on a VM that's fine just understand that I'm running Windows as a base ok so once you have your desired workstation installed in your VM installed you can download Kali Linux if you'd like so don't go to the official Kali Linux download page I actually prefer the Kali Linux custom image page if you scroll a little bit down and you click on this page here what's nice is that they give you the VMware or if your VirtualBox person you can get the VirtualBox image as well so we do the VMware image if you have a torrent software go ahead and click torrent if not you're gonna have to download torrent software I recommend you torrent or BitTorrent go ahead torrent that download this and get Kali up and running should be pretty straightforward on that the default password is tor as you see here and of course root is the default user so once you have all of this set up let's go ahead and join me in the next video [Music] you [Music]
Original Description
Write-up: https://tcm-sec.com/2019/05/25/buffer-overflows-made-easy/
This video presents the material that will be covered in my course, Buffer Overflows Made Easy. I also highlight important aspects, such as the anatomy of memory and the anatomy of the stack. In future course videos, we will be covering:
1. Spiking
2. Fuzzing
3. Finding the Offset
4. Overwriting the EIP
5. Finding Bad Characters
6. Finding the Right Module
7. Generating Shellcode
8. Root!
Timestamps:
0:06 - Introduction
0:45 - What We Will Cover
0:57 - Anatomy of Memory
1:36 - Anatomy of the Stack
3:33 - Steps to Conduct a Buffer Overflow
5:06 - Tools to be Used
Quick Guide to Registers: https://inst.eecs.berkeley.edu/~cs161/sp15/discussions/dis06-assembly.pdf
❓Info❓
___________________________________________
Need a Pentest?: https://tcm-sec.com
Learn to Hack: https://academy.tcm-sec.com
🔹The Cyber Mentor Merch🔹
___________________________________________
https://teespring.com/stores/the-cyber-mentor
📱Social Media📱
___________________________________________
Website: https://thecybermentor.com
Twitter: https://twitter.com/thecybermentor
Twitch: https://www.twitch.tv/thecybermentor
Discord: https://tcm-sec.com/discord
LinkedIn: https://www.linkedin.com/in/heathadams
💸Donate💸
___________________________________________
Like the channel? Please consider supporting me on Patreon:
https://www.patreon.com/thecybermentor
Support the stream (one-time): https://streamlabs.com/thecybermentor
Hacker Books:
Penetration Testing: A Hands-On Introduction to Hacking: https://amzn.to/31GN7iX
The Hacker Playbook 3: https://amzn.to/34XkIY2
Hacking: The Art of Exploitation: https://amzn.to/2VchDyL
The Web Application Hacker's Handbook: https://amzn.to/30Fj21S
Real-World Bug Hunting: A Field Guide to Web Hacking: https://amzn.to/2V9srOe
Social Engineering: The Science of Human Hacking: https://amzn.to/31HAmVx
Linux Basics for Hackers: https://amzn.to/34WvcXP
Python Crash Course, 2nd Edition: https:/
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from The Cyber Mentor · The Cyber Mentor · 1 of 60
← Previous
Next →
▶
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Buffer Overflows Made Easy - Part 1: Introduction
The Cyber Mentor
Buffer Overflows Made Easy - Part 2: Spiking
The Cyber Mentor
Buffer Overflows Made Easy - Part 3: Fuzzing
The Cyber Mentor
Buffer Overflows Made Easy - Part 4: Finding the Offset
The Cyber Mentor
Buffer Overflows Made Easy - Part 5: Overwriting the EIP
The Cyber Mentor
Buffer Overflows Made Easy - Part 6: Finding Bad Characters
The Cyber Mentor
Buffer Overflows Made Easy - Part 7: Finding the Right Module
The Cyber Mentor
Buffer Overflows Made Easy - Part 8: Generating Shellcode and Gaining Shells
The Cyber Mentor
HackTheBox - Sunday Walkthrough (Re-Up)
The Cyber Mentor
Networking for Ethical Hackers - TCP, UDP, and the Three-Way Handshake (Re-Up)
The Cyber Mentor
Networking for Ethical Hackers - Network Subnetting (Re-Up)
The Cyber Mentor
Networking for Ethical Hackers - Network Subnetting Part 2: The Challenge (Re-Up)
The Cyber Mentor
Networking for Ethical Hackers - Building A Basic Network with Cisco Packet Tracer (Re-Up)
The Cyber Mentor
HackTheBox - Fighter Walkthrough (Re-Up)
The Cyber Mentor
Beginner Linux for Ethical Hackers - Navigating the File System
The Cyber Mentor
Beginner Linux for Ethical Hackers - Users and Privileges
The Cyber Mentor
Beginner Linux for Ethical Hackers - Common Network Commands
The Cyber Mentor
Beginner Linux for Ethical Hackers - Viewing, Creating, and Editing Files
The Cyber Mentor
Beginner Linux for Ethical Hackers - Controlling Kali Services
The Cyber Mentor
Beginner Linux for Ethical Hackers - Scripting with Bash
The Cyber Mentor
Beginner Linux for Ethical Hackers - Installing and Updating Tools
The Cyber Mentor
Cracking Linux Password Hashes with Hashcat
The Cyber Mentor
Reminder: Twitch Hacking Live Stream Tonight! 2/26/19 at 8PM EST
The Cyber Mentor
Hacking Live Stream: Episode 1 - Kioptrix Level 1, HackTheBox Jerry, and Career Q&A / AMA
The Cyber Mentor
Hacking Live Stream: Episode 2 - HackTheBox Active, Vulnserver Buffer Overflow, and Career Q&A / AMA
The Cyber Mentor
Hacking Live Stream: Episode 3 - Hack The Box Blue, Devel, and Career Q&A / AMA
The Cyber Mentor
New Zero to Hero Pentest Course, New Website, and 2K Subs?!
The Cyber Mentor
Zero to Hero Pentesting: Episode 1 - Course Introduction, Notekeeping, Introductory Linux, and AMA
The Cyber Mentor
Zero to Hero Pentesting: Episode 2 - Python 101
The Cyber Mentor
Zero to Hero Pentesting: Episode 3 - Python 102, Building a Terrible Port Scanner, and a Giveaway
The Cyber Mentor
Zero to Hero Pentesting: Episode 4 - Five Phases of Hacking + Passive OSINT
The Cyber Mentor
Zero to Hero Pentesting: Episode 5 - Scanning Tools (Nmap, Nessus, BurpSuite, etc.) & Tactics
The Cyber Mentor
Zero to Hero Pentesting: Episode 6 - Enumeration (Kioptrix & Hack The Box)
The Cyber Mentor
Zero to Hero Pentesting: Episode 7 - Exploitation, Shells, and Some Credential Stuffing
The Cyber Mentor
Installing Windows Server 2016 on VMWare in 5 Minutes
The Cyber Mentor
Zero to Hero: Week 8 - Building an AD Lab, LLMNR Poisoning, and NTLMv2 Cracking with Hashcat
The Cyber Mentor
A Day in the Life of an Ethical Hacker / Penetration Tester
The Cyber Mentor
Active Directory Exploitation - LLMNR/NBT-NS Poisoning
The Cyber Mentor
Zero to Hero: Week 9 - NTLM Relay, Token Impersonation, Pass the Hash, PsExec, and more
The Cyber Mentor
Zero to Hero: Episode 10 - MS17-010/EternalBlue, GPP/cPasswords, and Kerberoasting
The Cyber Mentor
Writing a Pentest Report
The Cyber Mentor
Zero to Hero: Week 11 - File Transfers, Pivoting, and Reporting Writing
The Cyber Mentor
The Complete Linux for Ethical Hackers Course for 2019
The Cyber Mentor
Full Ethical Hacking Course - Beginner Network Penetration Testing (2019)
The Cyber Mentor
Popping a Shell with SMB Relay and Empire
The Cyber Mentor
Pentesting for n00bs: Episode 1 - Legacy (hackthebox)
The Cyber Mentor
Pentesting for n00bs: Episode 2 - Lame
The Cyber Mentor
Pentesting for n00bs: Episode 3 - Blue
The Cyber Mentor
Web App Testing: Episode 1 - Enumeration
The Cyber Mentor
Pentesting for n00bs: Episode 4 - Devel
The Cyber Mentor
Pentesting for n00bs: Episode 5 - Jerry
The Cyber Mentor
Web App Testing: Episode 2 - Enumeration, XSS, and UI Bypassing
The Cyber Mentor
Pentesting for n00bs: Episode 6 - Nibbles
The Cyber Mentor
Web App Testing: Episode 3 - XSS, SQL Injection, and Broken Access Control
The Cyber Mentor
How NOT to Approach a Cybersecurity Mentor
The Cyber Mentor
Web App Testing: Episode 4 - XXE, Input Validation, Broken Access Control, and More XSS
The Cyber Mentor
Pentesting for n00bs: Episode 7 - Optimum (hackthebox)
The Cyber Mentor
Pentesting for n00bs: Episode 8 - Bashed (hackthebox)
The Cyber Mentor
Pentesting for n00bs: Episode 9 - Grandpa
The Cyber Mentor
Top 5 Internal Pentesting Methods
The Cyber Mentor
More on: Security Basics
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
Security Belongs on the Blueprint
Medium · Cybersecurity
# A 4-Line HTML File Stole the Admin’s Secret — Intigriti LeakyJar CTF Writeup
Medium · Cybersecurity
The Digital Gateway to Arabic Cybersecurity
Medium · Cybersecurity
Cybersecurity vs Cloud Computing – Which Career Will Dominate 2026? ☁️
Medium · Cybersecurity
Chapters (6)
0:06
Introduction
0:45
What We Will Cover
0:57
Anatomy of Memory
1:36
Anatomy of the Stack
3:33
Steps to Conduct a Buffer Overflow
5:06
Tools to be Used
🎓
Tutor Explanation
DeepCamp AI