WEBVTT
Kind: captions
Language: en

00:00:00.000 --> 00:00:01.830 align:start position:0%
 
One<00:00:00.320><c> question</c><00:00:00.720><c> I</c><00:00:00.800><c> often</c><00:00:01.120><c> get</c><00:00:01.360><c> asked</c><00:00:01.600><c> on</c><00:00:01.680><c> this</c>

00:00:01.830 --> 00:00:01.840 align:start position:0%
One question I often get asked on this
 

00:00:01.840 --> 00:00:03.430 align:start position:0%
One question I often get asked on this
channel<00:00:02.240><c> is</c><00:00:02.400><c> how</c><00:00:02.560><c> do</c><00:00:02.680><c> you</c><00:00:02.840><c> actually</c><00:00:03.200><c> learn</c>

00:00:03.430 --> 00:00:03.440 align:start position:0%
channel is how do you actually learn
 

00:00:03.440 --> 00:00:05.110 align:start position:0%
channel is how do you actually learn
hacking<00:00:03.880><c> and</c><00:00:04.040><c> how</c><00:00:04.200><c> do</c><00:00:04.320><c> you</c><00:00:04.440><c> write</c><00:00:04.680><c> your</c><00:00:04.800><c> very</c>

00:00:05.110 --> 00:00:05.120 align:start position:0%
hacking and how do you write your very
 

00:00:05.120 --> 00:00:07.190 align:start position:0%
hacking and how do you write your very
first<00:00:05.480><c> exploit?</c><00:00:06.120><c> We've</c><00:00:06.320><c> covered</c><00:00:06.600><c> many</c><00:00:06.840><c> topics</c>

00:00:07.190 --> 00:00:07.200 align:start position:0%
first exploit? We've covered many topics
 

00:00:07.200 --> 00:00:09.350 align:start position:0%
first exploit? We've covered many topics
here<00:00:07.400><c> relating</c><00:00:07.800><c> to</c><00:00:08.000><c> iOS</c><00:00:08.320><c> security,</c><00:00:09.000><c> kernel</c>

00:00:09.350 --> 00:00:09.360 align:start position:0%
here relating to iOS security, kernel
 

00:00:09.360 --> 00:00:10.790 align:start position:0%
here relating to iOS security, kernel
exploitation,<00:00:10.120><c> and</c><00:00:10.360><c> vulnerability</c>

00:00:10.790 --> 00:00:10.800 align:start position:0%
exploitation, and vulnerability
 

00:00:10.800 --> 00:00:12.550 align:start position:0%
exploitation, and vulnerability
analysis,<00:00:11.640><c> but</c><00:00:11.760><c> today</c><00:00:12.000><c> in</c><00:00:12.080><c> this</c><00:00:12.200><c> video</c><00:00:12.480><c> we're</c>

00:00:12.550 --> 00:00:12.560 align:start position:0%
analysis, but today in this video we're
 

00:00:12.560 --> 00:00:14.390 align:start position:0%
analysis, but today in this video we're
going<00:00:12.680><c> to</c><00:00:12.760><c> go</c><00:00:12.880><c> back</c><00:00:13.120><c> to</c><00:00:13.200><c> basics</c><00:00:13.720><c> and</c><00:00:13.880><c> revisit</c><00:00:14.320><c> a</c>

00:00:14.390 --> 00:00:14.400 align:start position:0%
going to go back to basics and revisit a
 

00:00:14.400 --> 00:00:16.070 align:start position:0%
going to go back to basics and revisit a
topic<00:00:14.760><c> that</c><00:00:14.920><c> I</c><00:00:15.000><c> covered</c><00:00:15.320><c> many</c><00:00:15.560><c> years</c><00:00:15.760><c> ago</c><00:00:15.960><c> on</c>

00:00:16.070 --> 00:00:16.080 align:start position:0%
topic that I covered many years ago on
 

00:00:16.080 --> 00:00:17.790 align:start position:0%
topic that I covered many years ago on
this<00:00:16.200><c> channel.</c><00:00:16.880><c> How</c><00:00:17.000><c> to</c><00:00:17.160><c> hack</c><00:00:17.360><c> your</c><00:00:17.520><c> first</c>

00:00:17.790 --> 00:00:17.800 align:start position:0%
this channel. How to hack your first
 

00:00:17.800 --> 00:00:19.990 align:start position:0%
this channel. How to hack your first
program<00:00:18.360><c> by</c><00:00:18.520><c> exploiting</c><00:00:19.120><c> your</c><00:00:19.280><c> first</c><00:00:19.720><c> buffer</c>

00:00:19.990 --> 00:00:20.000 align:start position:0%
program by exploiting your first buffer
 

00:00:20.000 --> 00:00:21.830 align:start position:0%
program by exploiting your first buffer
overflow<00:00:20.400><c> vulnerability.</c><00:00:21.280><c> Take</c><00:00:21.480><c> a</c><00:00:21.520><c> look</c><00:00:21.720><c> at</c>

00:00:21.830 --> 00:00:21.840 align:start position:0%
overflow vulnerability. Take a look at
 

00:00:21.840 --> 00:00:23.990 align:start position:0%
overflow vulnerability. Take a look at
the<00:00:21.960><c> following</c><00:00:22.400><c> C</c><00:00:22.640><c> program.</c><00:00:23.480><c> This</c><00:00:23.640><c> will</c><00:00:23.760><c> be</c>

00:00:23.990 --> 00:00:24.000 align:start position:0%
the following C program. This will be
 

00:00:24.000 --> 00:00:25.590 align:start position:0%
the following C program. This will be
our<00:00:24.160><c> vulnerable</c><00:00:24.560><c> target</c><00:00:24.880><c> program</c><00:00:25.280><c> for</c><00:00:25.400><c> this</c>

00:00:25.590 --> 00:00:25.600 align:start position:0%
our vulnerable target program for this
 

00:00:25.600 --> 00:00:28.470 align:start position:0%
our vulnerable target program for this
exercise.<00:00:26.560><c> Here</c><00:00:26.840><c> we</c><00:00:27.000><c> take</c><00:00:27.280><c> in</c><00:00:27.520><c> a</c><00:00:27.600><c> file</c><00:00:27.960><c> path</c><00:00:28.320><c> as</c>

00:00:28.470 --> 00:00:28.480 align:start position:0%
exercise. Here we take in a file path as
 

00:00:28.480 --> 00:00:30.470 align:start position:0%
exercise. Here we take in a file path as
the<00:00:28.640><c> first</c><00:00:29.000><c> command</c><00:00:29.320><c> line</c><00:00:29.520><c> argument</c><00:00:30.200><c> and</c><00:00:30.320><c> we</c>

00:00:30.470 --> 00:00:30.480 align:start position:0%
the first command line argument and we
 

00:00:30.480 --> 00:00:32.630 align:start position:0%
the first command line argument and we
open<00:00:30.720><c> a</c><00:00:30.800><c> handle</c><00:00:31.200><c> to</c><00:00:31.280><c> that</c><00:00:31.480><c> file.</c><00:00:32.080><c> We</c><00:00:32.200><c> then</c><00:00:32.360><c> pass</c>

00:00:32.630 --> 00:00:32.640 align:start position:0%
open a handle to that file. We then pass
 

00:00:32.640 --> 00:00:34.710 align:start position:0%
open a handle to that file. We then pass
that<00:00:32.840><c> file</c><00:00:33.040><c> descriptor</c><00:00:33.520><c> into</c><00:00:33.840><c> this</c><00:00:34.040><c> function,</c>

00:00:34.710 --> 00:00:34.720 align:start position:0%
that file descriptor into this function,
 

00:00:34.720 --> 00:00:36.030 align:start position:0%
that file descriptor into this function,
which<00:00:34.920><c> we'll</c><00:00:35.080><c> call</c><00:00:35.400><c> our</c><00:00:35.600><c> vulnerable</c>

00:00:36.030 --> 00:00:36.040 align:start position:0%
which we'll call our vulnerable
 

00:00:36.040 --> 00:00:38.190 align:start position:0%
which we'll call our vulnerable
function.<00:00:37.040><c> This</c><00:00:37.320><c> vulnerable</c><00:00:37.640><c> function</c><00:00:38.040><c> is</c>

00:00:38.190 --> 00:00:38.200 align:start position:0%
function. This vulnerable function is
 

00:00:38.200 --> 00:00:40.230 align:start position:0%
function. This vulnerable function is
designed<00:00:38.680><c> to</c><00:00:38.800><c> simply</c><00:00:39.200><c> read</c><00:00:39.480><c> the</c><00:00:39.560><c> data</c><00:00:40.000><c> from</c>

00:00:40.230 --> 00:00:40.240 align:start position:0%
designed to simply read the data from
 

00:00:40.240 --> 00:00:42.670 align:start position:0%
designed to simply read the data from
this<00:00:40.440><c> file.</c><00:00:41.120><c> It</c><00:00:41.240><c> allocates</c><00:00:41.640><c> a</c><00:00:41.720><c> buffer</c><00:00:42.160><c> of</c><00:00:42.320><c> size</c>

00:00:42.670 --> 00:00:42.680 align:start position:0%
this file. It allocates a buffer of size
 

00:00:42.680 --> 00:00:45.070 align:start position:0%
this file. It allocates a buffer of size
32<00:00:43.160><c> bytes</c><00:00:43.920><c> and</c><00:00:44.040><c> then</c><00:00:44.120><c> it</c><00:00:44.200><c> gets</c><00:00:44.360><c> the</c><00:00:44.440><c> total</c><00:00:44.760><c> size</c>

00:00:45.070 --> 00:00:45.080 align:start position:0%
32 bytes and then it gets the total size
 

00:00:45.080 --> 00:00:47.470 align:start position:0%
32 bytes and then it gets the total size
of<00:00:45.160><c> the</c><00:00:45.280><c> file</c><00:00:45.760><c> and</c><00:00:45.880><c> it</c><00:00:45.960><c> calls</c><00:00:46.360><c> fgets</c><00:00:46.960><c> to</c><00:00:47.160><c> read</c>

00:00:47.470 --> 00:00:47.480 align:start position:0%
of the file and it calls fgets to read
 

00:00:47.480 --> 00:00:49.550 align:start position:0%
of the file and it calls fgets to read
that<00:00:47.680><c> number</c><00:00:47.960><c> of</c><00:00:48.080><c> bytes</c><00:00:48.520><c> from</c><00:00:48.760><c> the</c><00:00:48.880><c> file</c><00:00:49.280><c> into</c>

00:00:49.550 --> 00:00:49.560 align:start position:0%
that number of bytes from the file into
 

00:00:49.560 --> 00:00:51.470 align:start position:0%
that number of bytes from the file into
the<00:00:49.640><c> buffer.</c><00:00:50.400><c> Then</c><00:00:50.560><c> it</c><00:00:50.680><c> prints</c><00:00:50.920><c> the</c><00:00:50.960><c> contents</c>

00:00:51.470 --> 00:00:51.480 align:start position:0%
the buffer. Then it prints the contents
 

00:00:51.480 --> 00:00:53.310 align:start position:0%
the buffer. Then it prints the contents
on<00:00:51.600><c> the</c><00:00:51.640><c> screen</c><00:00:52.080><c> and</c><00:00:52.280><c> returns.</c><00:00:53.000><c> So,</c><00:00:53.160><c> what</c>

00:00:53.310 --> 00:00:53.320 align:start position:0%
on the screen and returns. So, what
 

00:00:53.320 --> 00:00:55.350 align:start position:0%
on the screen and returns. So, what
could<00:00:53.440><c> possibly</c><00:00:53.800><c> go</c><00:00:53.960><c> wrong?</c><00:00:54.760><c> This</c><00:00:55.000><c> function</c>

00:00:55.350 --> 00:00:55.360 align:start position:0%
could possibly go wrong? This function
 

00:00:55.360 --> 00:00:56.750 align:start position:0%
could possibly go wrong? This function
is<00:00:55.520><c> vulnerable</c><00:00:55.880><c> to</c><00:00:56.000><c> what</c><00:00:56.160><c> is</c><00:00:56.280><c> known</c><00:00:56.560><c> as</c><00:00:56.680><c> a</c>

00:00:56.750 --> 00:00:56.760 align:start position:0%
is vulnerable to what is known as a
 

00:00:56.760 --> 00:00:58.710 align:start position:0%
is vulnerable to what is known as a
stack<00:00:57.200><c> buffer</c><00:00:57.480><c> overflow</c><00:00:57.840><c> bug,</c><00:00:58.360><c> one</c><00:00:58.520><c> of</c><00:00:58.560><c> the</c>

00:00:58.710 --> 00:00:58.720 align:start position:0%
stack buffer overflow bug, one of the
 

00:00:58.720 --> 00:01:00.430 align:start position:0%
stack buffer overflow bug, one of the
oldest<00:00:59.040><c> security</c><00:00:59.400><c> vulnerabilities</c><00:00:59.840><c> around.</c>

00:01:00.430 --> 00:01:00.440 align:start position:0%
oldest security vulnerabilities around.
 

00:01:00.440 --> 00:01:02.230 align:start position:0%
oldest security vulnerabilities around.
The<00:01:00.560><c> issue</c><00:01:00.880><c> is</c><00:01:01.040><c> very</c><00:01:01.280><c> simple.</c><00:01:01.680><c> The</c><00:01:01.800><c> program</c>

00:01:02.230 --> 00:01:02.240 align:start position:0%
The issue is very simple. The program
 

00:01:02.240 --> 00:01:04.869 align:start position:0%
The issue is very simple. The program
allocates<00:01:02.840><c> a</c><00:01:02.960><c> 32-byte</c><00:01:03.800><c> buffer</c><00:01:04.239><c> to</c><00:01:04.400><c> store</c><00:01:04.760><c> the</c>

00:01:04.869 --> 00:01:04.879 align:start position:0%
allocates a 32-byte buffer to store the
 

00:01:04.879 --> 00:01:07.190 align:start position:0%
allocates a 32-byte buffer to store the
file<00:01:05.160><c> contents,</c><00:01:06.000><c> but</c><00:01:06.160><c> the</c><00:01:06.240><c> program</c><00:01:06.640><c> is</c><00:01:06.800><c> using</c>

00:01:07.190 --> 00:01:07.200 align:start position:0%
file contents, but the program is using
 

00:01:07.200 --> 00:01:09.110 align:start position:0%
file contents, but the program is using
the<00:01:07.280><c> size</c><00:01:07.640><c> of</c><00:01:07.760><c> the</c><00:01:07.840><c> file</c><00:01:08.200><c> directly</c><00:01:08.840><c> in</c><00:01:09.040><c> the</c>

00:01:09.110 --> 00:01:09.120 align:start position:0%
the size of the file directly in the
 

00:01:09.120 --> 00:01:11.550 align:start position:0%
the size of the file directly in the
copy<00:01:09.400><c> operation.</c><00:01:10.080><c> It</c><00:01:10.200><c> does</c><00:01:10.400><c> no</c><00:01:10.640><c> validation</c><00:01:11.360><c> on</c>

00:01:11.550 --> 00:01:11.560 align:start position:0%
copy operation. It does no validation on
 

00:01:11.560 --> 00:01:13.750 align:start position:0%
copy operation. It does no validation on
this<00:01:11.760><c> size</c><00:01:12.080><c> value.</c><00:01:12.800><c> So,</c><00:01:12.960><c> if</c><00:01:13.080><c> the</c><00:01:13.200><c> user</c><00:01:13.600><c> has</c>

00:01:13.750 --> 00:01:13.760 align:start position:0%
this size value. So, if the user has
 

00:01:13.760 --> 00:01:15.750 align:start position:0%
this size value. So, if the user has
decided<00:01:14.200><c> to</c><00:01:14.360><c> provide</c><00:01:14.760><c> a</c><00:01:14.840><c> file</c><00:01:15.160><c> path</c><00:01:15.520><c> that</c>

00:01:15.750 --> 00:01:15.760 align:start position:0%
decided to provide a file path that
 

00:01:15.760 --> 00:01:18.310 align:start position:0%
decided to provide a file path that
holds<00:01:16.120><c> more</c><00:01:16.400><c> than</c><00:01:16.560><c> 32</c><00:01:16.960><c> bytes</c><00:01:17.240><c> worth</c><00:01:17.440><c> of</c><00:01:17.560><c> data,</c>

00:01:18.310 --> 00:01:18.320 align:start position:0%
holds more than 32 bytes worth of data,
 

00:01:18.320 --> 00:01:20.030 align:start position:0%
holds more than 32 bytes worth of data,
we're<00:01:18.440><c> going</c><00:01:18.560><c> to</c><00:01:18.640><c> run</c><00:01:18.880><c> into</c><00:01:19.120><c> a</c><00:01:19.200><c> problem.</c><00:01:19.880><c> The</c>

00:01:20.030 --> 00:01:20.040 align:start position:0%
we're going to run into a problem. The
 

00:01:20.040 --> 00:01:21.950 align:start position:0%
we're going to run into a problem. The
fgets<00:01:20.480><c> function</c><00:01:20.840><c> here,</c><00:01:21.160><c> responsible</c><00:01:21.720><c> for</c>

00:01:21.950 --> 00:01:21.960 align:start position:0%
fgets function here, responsible for
 

00:01:21.960 --> 00:01:23.710 align:start position:0%
fgets function here, responsible for
reading<00:01:22.240><c> the</c><00:01:22.320><c> bytes</c><00:01:22.640><c> into</c><00:01:22.880><c> the</c><00:01:22.960><c> buffer,</c><00:01:23.560><c> is</c>

00:01:23.710 --> 00:01:23.720 align:start position:0%
reading the bytes into the buffer, is
 

00:01:23.720 --> 00:01:25.390 align:start position:0%
reading the bytes into the buffer, is
not<00:01:23.920><c> performing</c><00:01:24.440><c> any</c><00:01:24.640><c> validation</c><00:01:25.200><c> on</c><00:01:25.280><c> the</c>

00:01:25.390 --> 00:01:25.400 align:start position:0%
not performing any validation on the
 

00:01:25.400 --> 00:01:27.310 align:start position:0%
not performing any validation on the
size,<00:01:25.720><c> either.</c><00:01:26.200><c> It</c><00:01:26.400><c> expects</c><00:01:26.800><c> the</c><00:01:26.880><c> programmer</c>

00:01:27.310 --> 00:01:27.320 align:start position:0%
size, either. It expects the programmer
 

00:01:27.320 --> 00:01:28.910 align:start position:0%
size, either. It expects the programmer
to<00:01:27.440><c> know</c><00:01:27.600><c> exactly</c><00:01:28.040><c> what</c><00:01:28.160><c> they're</c><00:01:28.280><c> doing</c><00:01:28.800><c> and</c>

00:01:28.910 --> 00:01:28.920 align:start position:0%
to know exactly what they're doing and
 

00:01:28.920 --> 00:01:30.750 align:start position:0%
to know exactly what they're doing and
so<00:01:29.040><c> it</c><00:01:29.160><c> blindly</c><00:01:29.560><c> starts</c><00:01:30.000><c> copying</c><00:01:30.280><c> the</c><00:01:30.400><c> bytes</c>

00:01:30.750 --> 00:01:30.760 align:start position:0%
so it blindly starts copying the bytes
 

00:01:30.760 --> 00:01:32.550 align:start position:0%
so it blindly starts copying the bytes
from<00:01:30.920><c> the</c><00:01:31.040><c> file</c><00:01:31.400><c> into</c><00:01:31.640><c> the</c><00:01:31.720><c> buffer</c><00:01:32.320><c> and</c><00:01:32.440><c> it</c>

00:01:32.550 --> 00:01:32.560 align:start position:0%
from the file into the buffer and it
 

00:01:32.560 --> 00:01:34.350 align:start position:0%
from the file into the buffer and it
won't<00:01:32.760><c> stop</c><00:01:33.080><c> until</c><00:01:33.320><c> it's</c><00:01:33.440><c> exhausted</c><00:01:34.040><c> every</c>

00:01:34.350 --> 00:01:34.360 align:start position:0%
won't stop until it's exhausted every
 

00:01:34.360 --> 00:01:36.230 align:start position:0%
won't stop until it's exhausted every
byte<00:01:34.720><c> in</c><00:01:34.880><c> the</c><00:01:34.960><c> supplied</c><00:01:35.320><c> file.</c><00:01:35.920><c> So,</c><00:01:36.080><c> what</c>

00:01:36.230 --> 00:01:36.240 align:start position:0%
byte in the supplied file. So, what
 

00:01:36.240 --> 00:01:37.990 align:start position:0%
byte in the supplied file. So, what
happens<00:01:36.520><c> to</c><00:01:36.640><c> all</c><00:01:36.800><c> of</c><00:01:36.840><c> these</c><00:01:37.040><c> excess</c><00:01:37.400><c> bytes?</c>

00:01:37.990 --> 00:01:38.000 align:start position:0%
happens to all of these excess bytes?
 

00:01:38.000 --> 00:01:39.990 align:start position:0%
happens to all of these excess bytes?
They<00:01:38.240><c> overflow</c><00:01:39.080><c> out</c><00:01:39.280><c> of</c><00:01:39.400><c> the</c><00:01:39.520><c> allocated</c>

00:01:39.990 --> 00:01:40.000 align:start position:0%
They overflow out of the allocated
 

00:01:40.000 --> 00:01:42.230 align:start position:0%
They overflow out of the allocated
32-byte<00:01:40.640><c> buffer</c><00:01:41.120><c> and</c><00:01:41.280><c> get</c><00:01:41.480><c> written</c><00:01:41.840><c> into</c><00:01:42.120><c> the</c>

00:01:42.230 --> 00:01:42.240 align:start position:0%
32-byte buffer and get written into the
 

00:01:42.240 --> 00:01:44.150 align:start position:0%
32-byte buffer and get written into the
adjacent<00:01:42.720><c> memory,</c><00:01:43.360><c> corrupting</c><00:01:43.920><c> other</c>

00:01:44.150 --> 00:01:44.160 align:start position:0%
adjacent memory, corrupting other
 

00:01:44.160 --> 00:01:46.190 align:start position:0%
adjacent memory, corrupting other
potentially<00:01:44.680><c> important</c><00:01:45.080><c> data.</c><00:01:45.720><c> This</c><00:01:45.920><c> data</c>

00:01:46.190 --> 00:01:46.200 align:start position:0%
potentially important data. This data
 

00:01:46.200 --> 00:01:47.910 align:start position:0%
potentially important data. This data
corruption<00:01:46.680><c> is</c><00:01:46.840><c> what</c><00:01:47.000><c> can</c><00:01:47.120><c> be</c><00:01:47.240><c> leveraged</c><00:01:47.720><c> by</c>

00:01:47.910 --> 00:01:47.920 align:start position:0%
corruption is what can be leveraged by
 

00:01:47.920 --> 00:01:50.310 align:start position:0%
corruption is what can be leveraged by
us<00:01:48.280><c> as</c><00:01:48.440><c> the</c><00:01:48.560><c> exploit</c><00:01:48.920><c> developer</c><00:01:49.600><c> to</c><00:01:49.760><c> influence</c>

00:01:50.310 --> 00:01:50.320 align:start position:0%
us as the exploit developer to influence
 

00:01:50.320 --> 00:01:52.150 align:start position:0%
us as the exploit developer to influence
how<00:01:50.440><c> the</c><00:01:50.560><c> program</c><00:01:50.960><c> works</c><00:01:51.440><c> and</c><00:01:51.640><c> take</c><00:01:51.800><c> control</c>

00:01:52.150 --> 00:01:52.160 align:start position:0%
how the program works and take control
 

00:01:52.160 --> 00:01:53.870 align:start position:0%
how the program works and take control
of<00:01:52.280><c> it.</c><00:01:52.600><c> So,</c><00:01:52.760><c> what</c><00:01:52.960><c> kind</c><00:01:53.120><c> of</c><00:01:53.200><c> important</c><00:01:53.600><c> data</c>

00:01:53.870 --> 00:01:53.880 align:start position:0%
of it. So, what kind of important data
 

00:01:53.880 --> 00:01:55.670 align:start position:0%
of it. So, what kind of important data
can<00:01:54.040><c> we</c><00:01:54.160><c> expect</c><00:01:54.560><c> to</c><00:01:54.640><c> corrupt</c><00:01:55.200><c> with</c><00:01:55.360><c> the</c><00:01:55.440><c> buffer</c>

00:01:55.670 --> 00:01:55.680 align:start position:0%
can we expect to corrupt with the buffer
 

00:01:55.680 --> 00:01:57.270 align:start position:0%
can we expect to corrupt with the buffer
overflow<00:01:56.000><c> vulnerability?</c><00:01:56.920><c> Let's</c><00:01:57.120><c> take</c><00:01:57.240><c> a</c>

00:01:57.270 --> 00:01:57.280 align:start position:0%
overflow vulnerability? Let's take a
 

00:01:57.280 --> 00:01:58.910 align:start position:0%
overflow vulnerability? Let's take a
step<00:01:57.520><c> back</c><00:01:57.800><c> and</c><00:01:57.960><c> understand</c><00:01:58.440><c> what</c><00:01:58.560><c> is</c><00:01:58.680><c> really</c>

00:01:58.910 --> 00:01:58.920 align:start position:0%
step back and understand what is really
 

00:01:58.920 --> 00:02:00.790 align:start position:0%
step back and understand what is really
going<00:01:59.160><c> on</c><00:01:59.360><c> in</c><00:01:59.520><c> memory</c><00:02:00.080><c> during</c><00:02:00.320><c> the</c><00:02:00.400><c> program's</c>

00:02:00.790 --> 00:02:00.800 align:start position:0%
going on in memory during the program's
 

00:02:00.800 --> 00:02:02.910 align:start position:0%
going on in memory during the program's
execution.<00:02:01.800><c> As</c><00:02:01.960><c> you're</c><00:02:02.040><c> probably</c><00:02:02.280><c> aware,</c><00:02:02.640><c> C</c>

00:02:02.910 --> 00:02:02.920 align:start position:0%
execution. As you're probably aware, C
 

00:02:02.920 --> 00:02:05.190 align:start position:0%
execution. As you're probably aware, C
code<00:02:03.280><c> gets</c><00:02:03.480><c> compiled</c><00:02:04.040><c> down</c><00:02:04.400><c> to</c><00:02:04.520><c> machine</c><00:02:04.880><c> code</c>

00:02:05.190 --> 00:02:05.200 align:start position:0%
code gets compiled down to machine code
 

00:02:05.200 --> 00:02:06.990 align:start position:0%
code gets compiled down to machine code
before<00:02:05.480><c> it</c><00:02:05.560><c> can</c><00:02:05.640><c> be</c><00:02:05.720><c> executed.</c><00:02:06.560><c> And</c><00:02:06.680><c> in</c><00:02:06.840><c> our</c>

00:02:06.990 --> 00:02:07.000 align:start position:0%
before it can be executed. And in our
 

00:02:07.000 --> 00:02:09.389 align:start position:0%
before it can be executed. And in our
case,<00:02:07.280><c> on</c><00:02:07.400><c> this</c><00:02:07.640><c> M1</c><00:02:08.080><c> MacBook</c><00:02:08.479><c> Pro,</c><00:02:09.080><c> this</c><00:02:09.280><c> will</c>

00:02:09.389 --> 00:02:09.399 align:start position:0%
case, on this M1 MacBook Pro, this will
 

00:02:09.399 --> 00:02:11.990 align:start position:0%
case, on this M1 MacBook Pro, this will
be<00:02:09.640><c> ARM64</c><00:02:10.440><c> machine</c><00:02:10.759><c> code.</c><00:02:11.320><c> We</c><00:02:11.440><c> can</c><00:02:11.600><c> view</c><00:02:11.840><c> the</c>

00:02:11.990 --> 00:02:12.000 align:start position:0%
be ARM64 machine code. We can view the
 

00:02:12.000 --> 00:02:14.150 align:start position:0%
be ARM64 machine code. We can view the
ARM64<00:02:12.720><c> assembly</c><00:02:13.160><c> language</c><00:02:13.520><c> instructions</c>

00:02:14.150 --> 00:02:14.160 align:start position:0%
ARM64 assembly language instructions
 

00:02:14.160 --> 00:02:15.750 align:start position:0%
ARM64 assembly language instructions
that<00:02:14.320><c> make</c><00:02:14.640><c> up</c><00:02:14.880><c> our</c><00:02:15.000><c> vulnerable</c><00:02:15.400><c> target</c>

00:02:15.750 --> 00:02:15.760 align:start position:0%
that make up our vulnerable target
 

00:02:15.760 --> 00:02:18.590 align:start position:0%
that make up our vulnerable target
program<00:02:16.320><c> in</c><00:02:16.600><c> LLDB.</c><00:02:17.560><c> At</c><00:02:17.680><c> the</c><00:02:17.800><c> low</c><00:02:17.920><c> level,</c><00:02:18.440><c> when</c>

00:02:18.590 --> 00:02:18.600 align:start position:0%
program in LLDB. At the low level, when
 

00:02:18.600 --> 00:02:20.510 align:start position:0%
program in LLDB. At the low level, when
a<00:02:18.640><c> program</c><00:02:19.120><c> is</c><00:02:19.280><c> running</c><00:02:19.640><c> on</c><00:02:19.760><c> your</c><00:02:19.880><c> system,</c><00:02:20.440><c> the</c>

00:02:20.510 --> 00:02:20.520 align:start position:0%
a program is running on your system, the
 

00:02:20.520 --> 00:02:23.030 align:start position:0%
a program is running on your system, the
CPU<00:02:21.040><c> is</c><00:02:21.200><c> simply</c><00:02:21.640><c> executing</c><00:02:22.160><c> instructions</c><00:02:22.880><c> in</c>

00:02:23.030 --> 00:02:23.040 align:start position:0%
CPU is simply executing instructions in
 

00:02:23.040 --> 00:02:25.230 align:start position:0%
CPU is simply executing instructions in
the<00:02:23.120><c> process</c><00:02:23.520><c> memory</c><00:02:24.000><c> in</c><00:02:24.160><c> sequential</c><00:02:24.640><c> order.</c>

00:02:25.230 --> 00:02:25.240 align:start position:0%
the process memory in sequential order.
 

00:02:25.240 --> 00:02:26.790 align:start position:0%
the process memory in sequential order.
Each<00:02:25.440><c> instruction</c><00:02:25.960><c> is</c><00:02:26.120><c> doing</c><00:02:26.360><c> some</c><00:02:26.520><c> kind</c><00:02:26.680><c> of</c>

00:02:26.790 --> 00:02:26.800 align:start position:0%
Each instruction is doing some kind of
 

00:02:26.800 --> 00:02:29.110 align:start position:0%
Each instruction is doing some kind of
calculation<00:02:27.600><c> on</c><00:02:27.760><c> a</c><00:02:27.800><c> register</c><00:02:28.480><c> or</c><00:02:28.760><c> reading</c><00:02:29.040><c> or</c>

00:02:29.110 --> 00:02:29.120 align:start position:0%
calculation on a register or reading or
 

00:02:29.120 --> 00:02:31.270 align:start position:0%
calculation on a register or reading or
writing<00:02:29.480><c> to</c><00:02:29.560><c> memory,</c><00:02:30.000><c> etc.</c><00:02:30.760><c> We'll</c><00:02:30.960><c> save</c><00:02:31.200><c> the</c>

00:02:31.270 --> 00:02:31.280 align:start position:0%
writing to memory, etc. We'll save the
 

00:02:31.280 --> 00:02:33.710 align:start position:0%
writing to memory, etc. We'll save the
specific<00:02:31.640><c> details</c><00:02:32.440><c> ARM64</c><00:02:32.960><c> assembly</c><00:02:33.360><c> language</c>

00:02:33.710 --> 00:02:33.720 align:start position:0%
specific details ARM64 assembly language
 

00:02:33.720 --> 00:02:35.390 align:start position:0%
specific details ARM64 assembly language
for<00:02:33.840><c> another</c><00:02:34.040><c> time.</c><00:02:34.800><c> One</c><00:02:35.040><c> thing</c><00:02:35.200><c> that</c><00:02:35.320><c> is</c>

00:02:35.390 --> 00:02:35.400 align:start position:0%
for another time. One thing that is
 

00:02:35.400 --> 00:02:36.750 align:start position:0%
for another time. One thing that is
important<00:02:35.760><c> to</c><00:02:35.800><c> know,</c><00:02:36.000><c> however,</c><00:02:36.360><c> is</c><00:02:36.520><c> that</c><00:02:36.640><c> the</c>

00:02:36.750 --> 00:02:36.760 align:start position:0%
important to know, however, is that the
 

00:02:36.760 --> 00:02:39.910 align:start position:0%
important to know, however, is that the
program<00:02:37.320><c> counter</c><00:02:37.800><c> or</c><00:02:38.040><c> PC</c><00:02:38.520><c> register</c><00:02:39.440><c> holds</c><00:02:39.800><c> the</c>

00:02:39.910 --> 00:02:39.920 align:start position:0%
program counter or PC register holds the
 

00:02:39.920 --> 00:02:41.990 align:start position:0%
program counter or PC register holds the
memory<00:02:40.280><c> address</c><00:02:40.680><c> of</c><00:02:40.840><c> the</c><00:02:41.000><c> next</c><00:02:41.400><c> instruction</c>

00:02:41.990 --> 00:02:42.000 align:start position:0%
memory address of the next instruction
 

00:02:42.000 --> 00:02:44.150 align:start position:0%
memory address of the next instruction
to<00:02:42.120><c> execute.</c><00:02:43.120><c> After</c><00:02:43.440><c> executing</c><00:02:43.920><c> each</c>

00:02:44.150 --> 00:02:44.160 align:start position:0%
to execute. After executing each
 

00:02:44.160 --> 00:02:45.990 align:start position:0%
to execute. After executing each
instruction,<00:02:44.840><c> the</c><00:02:44.960><c> value</c><00:02:45.440><c> of</c><00:02:45.600><c> the</c><00:02:45.680><c> program</c>

00:02:45.990 --> 00:02:46.000 align:start position:0%
instruction, the value of the program
 

00:02:46.000 --> 00:02:48.070 align:start position:0%
instruction, the value of the program
counter<00:02:46.400><c> gets</c><00:02:46.680><c> automatically</c><00:02:47.440><c> incremented</c>

00:02:48.070 --> 00:02:48.080 align:start position:0%
counter gets automatically incremented
 

00:02:48.080 --> 00:02:50.110 align:start position:0%
counter gets automatically incremented
by<00:02:48.240><c> four</c><00:02:48.960><c> so</c><00:02:49.080><c> that</c><00:02:49.200><c> it</c><00:02:49.320><c> points</c><00:02:49.680><c> to</c><00:02:49.760><c> the</c><00:02:49.880><c> next</c>

00:02:50.110 --> 00:02:50.120 align:start position:0%
by four so that it points to the next
 

00:02:50.120 --> 00:02:51.870 align:start position:0%
by four so that it points to the next
instruction.<00:02:51.040><c> And</c><00:02:51.280><c> this</c><00:02:51.440><c> repeats</c>

00:02:51.870 --> 00:02:51.880 align:start position:0%
instruction. And this repeats
 

00:02:51.880 --> 00:02:53.870 align:start position:0%
instruction. And this repeats
indefinitely.<00:02:52.800><c> If</c><00:02:52.920><c> a</c><00:02:52.960><c> program</c><00:02:53.320><c> wants</c><00:02:53.520><c> to</c><00:02:53.600><c> call</c>

00:02:53.870 --> 00:02:53.880 align:start position:0%
indefinitely. If a program wants to call
 

00:02:53.880 --> 00:02:55.230 align:start position:0%
indefinitely. If a program wants to call
another<00:02:54.160><c> function,</c><00:02:54.680><c> it</c><00:02:54.840><c> needs</c><00:02:55.080><c> to</c>

00:02:55.230 --> 00:02:55.240 align:start position:0%
another function, it needs to
 

00:02:55.240 --> 00:02:56.710 align:start position:0%
another function, it needs to
temporarily<00:02:55.880><c> jump</c><00:02:56.120><c> away</c><00:02:56.480><c> from</c><00:02:56.640><c> the</c>

00:02:56.710 --> 00:02:56.720 align:start position:0%
temporarily jump away from the
 

00:02:56.720 --> 00:02:57.870 align:start position:0%
temporarily jump away from the
instructions<00:02:57.280><c> that</c><00:02:57.400><c> it's</c><00:02:57.520><c> currently</c>

00:02:57.870 --> 00:02:57.880 align:start position:0%
instructions that it's currently
 

00:02:57.880 --> 00:03:00.030 align:start position:0%
instructions that it's currently
executing<00:02:58.720><c> and</c><00:02:58.880><c> execute</c><00:02:59.280><c> the</c><00:02:59.400><c> other</c><00:02:59.600><c> function</c>

00:03:00.030 --> 00:03:00.040 align:start position:0%
executing and execute the other function
 

00:03:00.040 --> 00:03:01.990 align:start position:0%
executing and execute the other function
first.<00:03:00.760><c> Then,</c><00:03:01.040><c> once</c><00:03:01.280><c> that</c><00:03:01.440><c> function</c><00:03:01.760><c> has</c><00:03:01.880><c> been</c>

00:03:01.990 --> 00:03:02.000 align:start position:0%
first. Then, once that function has been
 

00:03:02.000 --> 00:03:04.350 align:start position:0%
first. Then, once that function has been
successfully<00:03:02.600><c> executed,</c><00:03:03.560><c> execution</c><00:03:04.200><c> can</c>

00:03:04.350 --> 00:03:04.360 align:start position:0%
successfully executed, execution can
 

00:03:04.360 --> 00:03:06.470 align:start position:0%
successfully executed, execution can
resume<00:03:04.800><c> back</c><00:03:05.040><c> where</c><00:03:05.200><c> it</c><00:03:05.280><c> left</c><00:03:05.560><c> off.</c><00:03:06.160><c> In</c><00:03:06.320><c> the</c>

00:03:06.470 --> 00:03:06.480 align:start position:0%
resume back where it left off. In the
 

00:03:06.480 --> 00:03:08.390 align:start position:0%
resume back where it left off. In the
ARM64<00:03:07.080><c> instruction</c><00:03:07.560><c> set,</c><00:03:07.840><c> function</c><00:03:08.160><c> calls</c>

00:03:08.390 --> 00:03:08.400 align:start position:0%
ARM64 instruction set, function calls
 

00:03:08.400 --> 00:03:10.430 align:start position:0%
ARM64 instruction set, function calls
are<00:03:08.480><c> typically</c><00:03:08.840><c> performed</c><00:03:09.320><c> using</c><00:03:09.680><c> a</c><00:03:09.800><c> BL</c>

00:03:10.430 --> 00:03:10.440 align:start position:0%
are typically performed using a BL
 

00:03:10.440 --> 00:03:12.230 align:start position:0%
are typically performed using a BL
instruction,<00:03:11.160><c> which</c><00:03:11.320><c> stands</c><00:03:11.600><c> for</c><00:03:11.760><c> branch</c>

00:03:12.230 --> 00:03:12.240 align:start position:0%
instruction, which stands for branch
 

00:03:12.240 --> 00:03:14.230 align:start position:0%
instruction, which stands for branch
with<00:03:12.440><c> link.</c><00:03:13.160><c> This</c><00:03:13.360><c> instruction</c><00:03:13.840><c> basically</c>

00:03:14.230 --> 00:03:14.240 align:start position:0%
with link. This instruction basically
 

00:03:14.240 --> 00:03:16.630 align:start position:0%
with link. This instruction basically
branches<00:03:14.840><c> to</c><00:03:15.040><c> a</c><00:03:15.080><c> new</c><00:03:15.280><c> location</c><00:03:15.960><c> specified</c><00:03:16.520><c> by</c>

00:03:16.630 --> 00:03:16.640 align:start position:0%
branches to a new location specified by
 

00:03:16.640 --> 00:03:18.950 align:start position:0%
branches to a new location specified by
the<00:03:16.760><c> memory</c><00:03:17.080><c> address</c><00:03:17.440><c> given</c><00:03:17.920><c> as</c><00:03:18.080><c> its</c><00:03:18.280><c> argument</c>

00:03:18.950 --> 00:03:18.960 align:start position:0%
the memory address given as its argument
 

00:03:18.960 --> 00:03:20.990 align:start position:0%
the memory address given as its argument
and<00:03:19.080><c> execution</c><00:03:19.600><c> will</c><00:03:19.720><c> continue</c><00:03:20.240><c> over</c><00:03:20.400><c> there.</c>

00:03:20.990 --> 00:03:21.000 align:start position:0%
and execution will continue over there.
 

00:03:21.000 --> 00:03:22.550 align:start position:0%
and execution will continue over there.
Internally,<00:03:21.600><c> this</c><00:03:21.760><c> is</c><00:03:21.880><c> basically</c><00:03:22.280><c> just</c>

00:03:22.550 --> 00:03:22.560 align:start position:0%
Internally, this is basically just
 

00:03:22.560 --> 00:03:24.270 align:start position:0%
Internally, this is basically just
changing<00:03:23.040><c> the</c><00:03:23.120><c> value</c><00:03:23.600><c> of</c><00:03:23.760><c> the</c><00:03:23.880><c> program</c>

00:03:24.270 --> 00:03:24.280 align:start position:0%
changing the value of the program
 

00:03:24.280 --> 00:03:26.190 align:start position:0%
changing the value of the program
counter<00:03:24.600><c> register</c><00:03:25.240><c> to</c><00:03:25.400><c> point</c><00:03:25.800><c> to</c><00:03:25.880><c> the</c><00:03:26.040><c> other</c>

00:03:26.190 --> 00:03:26.200 align:start position:0%
counter register to point to the other
 

00:03:26.200 --> 00:03:28.110 align:start position:0%
counter register to point to the other
function.<00:03:27.000><c> As</c><00:03:27.160><c> the</c><00:03:27.240><c> program</c><00:03:27.520><c> counter</c><00:03:27.800><c> always</c>

00:03:28.110 --> 00:03:28.120 align:start position:0%
function. As the program counter always
 

00:03:28.120 --> 00:03:29.550 align:start position:0%
function. As the program counter always
holds<00:03:28.520><c> the</c><00:03:28.640><c> address</c><00:03:29.040><c> of</c><00:03:29.160><c> the</c><00:03:29.240><c> next</c>

00:03:29.550 --> 00:03:29.560 align:start position:0%
holds the address of the next
 

00:03:29.560 --> 00:03:32.070 align:start position:0%
holds the address of the next
instruction<00:03:30.000><c> to</c><00:03:30.080><c> execute.</c><00:03:30.960><c> The</c><00:03:31.240><c> link</c><00:03:31.560><c> part</c><00:03:31.920><c> of</c>

00:03:32.070 --> 00:03:32.080 align:start position:0%
instruction to execute. The link part of
 

00:03:32.080 --> 00:03:33.590 align:start position:0%
instruction to execute. The link part of
the<00:03:32.240><c> branch</c><00:03:32.600><c> with</c><00:03:32.760><c> link</c><00:03:32.920><c> instruction</c>

00:03:33.590 --> 00:03:33.600 align:start position:0%
the branch with link instruction
 

00:03:33.600 --> 00:03:35.270 align:start position:0%
the branch with link instruction
actually<00:03:33.960><c> means</c><00:03:34.200><c> that</c><00:03:34.360><c> upon</c><00:03:34.680><c> jumping</c><00:03:35.080><c> to</c><00:03:35.200><c> the</c>

00:03:35.270 --> 00:03:35.280 align:start position:0%
actually means that upon jumping to the
 

00:03:35.280 --> 00:03:37.230 align:start position:0%
actually means that upon jumping to the
new<00:03:35.440><c> function,</c><00:03:35.960><c> we</c><00:03:36.080><c> actually</c><00:03:36.400><c> first</c><00:03:36.760><c> save</c><00:03:37.120><c> the</c>

00:03:37.230 --> 00:03:37.240 align:start position:0%
new function, we actually first save the
 

00:03:37.240 --> 00:03:39.470 align:start position:0%
new function, we actually first save the
address<00:03:37.800><c> of</c><00:03:37.960><c> where</c><00:03:38.080><c> we</c><00:03:38.200><c> need</c><00:03:38.400><c> to</c><00:03:38.480><c> go</c><00:03:38.640><c> back</c><00:03:38.960><c> to</c>

00:03:39.470 --> 00:03:39.480 align:start position:0%
address of where we need to go back to
 

00:03:39.480 --> 00:03:40.990 align:start position:0%
address of where we need to go back to
once<00:03:39.720><c> this</c><00:03:39.960><c> function's</c><00:03:40.320><c> execution</c><00:03:40.840><c> has</c>

00:03:40.990 --> 00:03:41.000 align:start position:0%
once this function's execution has
 

00:03:41.000 --> 00:03:42.550 align:start position:0%
once this function's execution has
finished.<00:03:41.720><c> In</c><00:03:41.840><c> other</c><00:03:42.000><c> words,</c><00:03:42.280><c> we</c><00:03:42.440><c> are</c>

00:03:42.550 --> 00:03:42.560 align:start position:0%
finished. In other words, we are
 

00:03:42.560 --> 00:03:44.350 align:start position:0%
finished. In other words, we are
recording<00:03:43.120><c> the</c><00:03:43.240><c> address</c><00:03:43.720><c> right</c><00:03:44.040><c> here</c>

00:03:44.350 --> 00:03:44.360 align:start position:0%
recording the address right here
 

00:03:44.360 --> 00:03:46.630 align:start position:0%
recording the address right here
directly<00:03:44.840><c> following</c><00:03:45.280><c> the</c><00:03:45.400><c> BL</c><00:03:45.680><c> instruction</c><00:03:46.520><c> so</c>

00:03:46.630 --> 00:03:46.640 align:start position:0%
directly following the BL instruction so
 

00:03:46.640 --> 00:03:48.110 align:start position:0%
directly following the BL instruction so
that<00:03:46.720><c> we</c><00:03:46.840><c> can</c><00:03:46.960><c> remember</c><00:03:47.360><c> where</c><00:03:47.560><c> to</c><00:03:47.680><c> jump</c><00:03:47.920><c> back</c>

00:03:48.110 --> 00:03:48.120 align:start position:0%
that we can remember where to jump back
 

00:03:48.120 --> 00:03:50.590 align:start position:0%
that we can remember where to jump back
to<00:03:48.400><c> afterwards.</c><00:03:49.240><c> So,</c><00:03:49.480><c> where</c><00:03:49.840><c> exactly</c><00:03:50.320><c> do</c><00:03:50.480><c> we</c>

00:03:50.590 --> 00:03:50.600 align:start position:0%
to afterwards. So, where exactly do we
 

00:03:50.600 --> 00:03:51.790 align:start position:0%
to afterwards. So, where exactly do we
record<00:03:50.960><c> this</c><00:03:51.120><c> address,</c><00:03:51.480><c> you</c><00:03:51.560><c> might</c><00:03:51.680><c> be</c>

00:03:51.790 --> 00:03:51.800 align:start position:0%
record this address, you might be
 

00:03:51.800 --> 00:03:53.470 align:start position:0%
record this address, you might be
wondering.<00:03:52.440><c> The</c><00:03:52.600><c> answer</c><00:03:52.960><c> is</c><00:03:53.080><c> that</c><00:03:53.200><c> it</c><00:03:53.280><c> gets</c>

00:03:53.470 --> 00:03:53.480 align:start position:0%
wondering. The answer is that it gets
 

00:03:53.480 --> 00:03:55.590 align:start position:0%
wondering. The answer is that it gets
placed<00:03:53.880><c> on</c><00:03:54.000><c> the</c><00:03:54.120><c> stack.</c><00:03:54.880><c> The</c><00:03:54.960><c> stack</c><00:03:55.320><c> is</c><00:03:55.480><c> a</c>

00:03:55.590 --> 00:03:55.600 align:start position:0%
placed on the stack. The stack is a
 

00:03:55.600 --> 00:03:57.350 align:start position:0%
placed on the stack. The stack is a
region<00:03:55.880><c> of</c><00:03:56.000><c> memory</c><00:03:56.280><c> that</c><00:03:56.440><c> functions</c><00:03:56.880><c> can</c><00:03:57.080><c> use</c>

00:03:57.350 --> 00:03:57.360 align:start position:0%
region of memory that functions can use
 

00:03:57.360 --> 00:03:59.430 align:start position:0%
region of memory that functions can use
to<00:03:57.520><c> hold</c><00:03:57.920><c> local</c><00:03:58.200><c> variables</c><00:03:58.800><c> and</c><00:03:59.080><c> return</c>

00:03:59.430 --> 00:03:59.440 align:start position:0%
to hold local variables and return
 

00:03:59.440 --> 00:04:01.430 align:start position:0%
to hold local variables and return
addresses.<00:04:00.160><c> When</c><00:04:00.400><c> we</c><00:04:00.520><c> enter</c><00:04:00.800><c> a</c><00:04:00.840><c> function,</c><00:04:01.240><c> we</c>

00:04:01.430 --> 00:04:01.440 align:start position:0%
addresses. When we enter a function, we
 

00:04:01.440 --> 00:04:03.470 align:start position:0%
addresses. When we enter a function, we
push<00:04:01.720><c> the</c><00:04:01.800><c> return</c><00:04:02.080><c> address</c><00:04:02.360><c> onto</c><00:04:02.680><c> the</c><00:04:02.760><c> stack</c>

00:04:03.470 --> 00:04:03.480 align:start position:0%
push the return address onto the stack
 

00:04:03.480 --> 00:04:04.550 align:start position:0%
push the return address onto the stack
and<00:04:03.600><c> when</c><00:04:03.720><c> the</c><00:04:03.800><c> function</c><00:04:04.160><c> is</c><00:04:04.280><c> ready</c><00:04:04.440><c> to</c>

00:04:04.550 --> 00:04:04.560 align:start position:0%
and when the function is ready to
 

00:04:04.560 --> 00:04:06.350 align:start position:0%
and when the function is ready to
return,<00:04:05.120><c> it</c><00:04:05.320><c> pops</c><00:04:05.640><c> that</c><00:04:05.840><c> saved</c><00:04:06.080><c> return</c>

00:04:06.350 --> 00:04:06.360 align:start position:0%
return, it pops that saved return
 

00:04:06.360 --> 00:04:08.190 align:start position:0%
return, it pops that saved return
address<00:04:06.640><c> back</c><00:04:06.920><c> off</c><00:04:07.080><c> the</c><00:04:07.160><c> stack</c><00:04:07.720><c> and</c><00:04:07.920><c> jumps</c>

00:04:08.190 --> 00:04:08.200 align:start position:0%
address back off the stack and jumps
 

00:04:08.200 --> 00:04:10.270 align:start position:0%
address back off the stack and jumps
directly<00:04:08.600><c> to</c><00:04:08.800><c> it</c><00:04:09.000><c> by</c><00:04:09.160><c> setting</c><00:04:09.560><c> the</c><00:04:09.640><c> value</c><00:04:10.120><c> of</c>

00:04:10.270 --> 00:04:10.280 align:start position:0%
directly to it by setting the value of
 

00:04:10.280 --> 00:04:12.430 align:start position:0%
directly to it by setting the value of
the<00:04:10.360><c> PC</c><00:04:10.680><c> register.</c><00:04:11.600><c> This</c><00:04:11.840><c> is</c><00:04:11.960><c> how</c><00:04:12.080><c> function</c>

00:04:12.430 --> 00:04:12.440 align:start position:0%
the PC register. This is how function
 

00:04:12.440 --> 00:04:14.430 align:start position:0%
the PC register. This is how function
calls<00:04:12.720><c> and</c><00:04:12.840><c> returns</c><00:04:13.280><c> work</c><00:04:13.600><c> at</c><00:04:13.720><c> the</c><00:04:13.800><c> low</c><00:04:13.960><c> level</c>

00:04:14.430 --> 00:04:14.440 align:start position:0%
calls and returns work at the low level
 

00:04:14.440 --> 00:04:16.949 align:start position:0%
calls and returns work at the low level
in<00:04:14.680><c> ARM64</c><00:04:15.320><c> assembly.</c><00:04:16.400><c> So,</c><00:04:16.640><c> let's</c><00:04:16.799><c> now</c>

00:04:16.949 --> 00:04:16.959 align:start position:0%
in ARM64 assembly. So, let's now
 

00:04:16.959 --> 00:04:18.470 align:start position:0%
in ARM64 assembly. So, let's now
consider<00:04:17.320><c> this</c><00:04:17.519><c> in</c><00:04:17.640><c> the</c><00:04:17.720><c> context</c><00:04:18.200><c> of</c><00:04:18.320><c> the</c>

00:04:18.470 --> 00:04:18.480 align:start position:0%
consider this in the context of the
 

00:04:18.480 --> 00:04:20.190 align:start position:0%
consider this in the context of the
buffer<00:04:18.760><c> overflow</c><00:04:19.120><c> vulnerability</c><00:04:19.840><c> and</c><00:04:20.040><c> see</c>

00:04:20.190 --> 00:04:20.200 align:start position:0%
buffer overflow vulnerability and see
 

00:04:20.200 --> 00:04:22.470 align:start position:0%
buffer overflow vulnerability and see
how<00:04:20.359><c> it</c><00:04:20.480><c> plays</c><00:04:20.720><c> out</c><00:04:20.880><c> in</c><00:04:21.000><c> our</c><00:04:21.120><c> target</c><00:04:21.480><c> program.</c>

00:04:22.470 --> 00:04:22.480 align:start position:0%
how it plays out in our target program.
 

00:04:22.480 --> 00:04:23.990 align:start position:0%
how it plays out in our target program.
When<00:04:22.680><c> the</c><00:04:22.760><c> program</c><00:04:23.120><c> first</c><00:04:23.480><c> calls</c><00:04:23.680><c> into</c><00:04:23.920><c> the</c>

00:04:23.990 --> 00:04:24.000 align:start position:0%
When the program first calls into the
 

00:04:24.000 --> 00:04:25.670 align:start position:0%
When the program first calls into the
vulnerable<00:04:24.320><c> function,</c><00:04:24.880><c> the</c><00:04:25.000><c> return</c><00:04:25.400><c> address</c>

00:04:25.670 --> 00:04:25.680 align:start position:0%
vulnerable function, the return address
 

00:04:25.680 --> 00:04:28.070 align:start position:0%
vulnerable function, the return address
back<00:04:26.040><c> to</c><00:04:26.160><c> main</c><00:04:26.680><c> gets</c><00:04:26.920><c> pushed</c><00:04:27.360><c> onto</c><00:04:27.720><c> the</c><00:04:27.840><c> new</c>

00:04:28.070 --> 00:04:28.080 align:start position:0%
back to main gets pushed onto the new
 

00:04:28.080 --> 00:04:30.790 align:start position:0%
back to main gets pushed onto the new
stack<00:04:28.440><c> frame</c><00:04:28.800><c> for</c><00:04:29.080><c> this</c><00:04:29.240><c> function.</c><00:04:30.120><c> Then</c><00:04:30.600><c> that</c>

00:04:30.790 --> 00:04:30.800 align:start position:0%
stack frame for this function. Then that
 

00:04:30.800 --> 00:04:33.110 align:start position:0%
stack frame for this function. Then that
function<00:04:31.160><c> goes</c><00:04:31.440><c> on</c><00:04:31.600><c> to</c><00:04:31.800><c> allocate</c><00:04:32.240><c> the</c><00:04:32.320><c> 32-byte</c>

00:04:33.110 --> 00:04:33.120 align:start position:0%
function goes on to allocate the 32-byte
 

00:04:33.120 --> 00:04:35.310 align:start position:0%
function goes on to allocate the 32-byte
buffer<00:04:33.880><c> and</c><00:04:34.000><c> this</c><00:04:34.200><c> also</c><00:04:34.520><c> gets</c><00:04:34.720><c> stored</c><00:04:35.080><c> on</c><00:04:35.240><c> the</c>

00:04:35.310 --> 00:04:35.320 align:start position:0%
buffer and this also gets stored on the
 

00:04:35.320 --> 00:04:37.310 align:start position:0%
buffer and this also gets stored on the
stack<00:04:35.760><c> somewhere</c><00:04:36.120><c> above</c><00:04:36.560><c> the</c><00:04:36.680><c> saved</c><00:04:37.040><c> return</c>

00:04:37.310 --> 00:04:37.320 align:start position:0%
stack somewhere above the saved return
 

00:04:37.320 --> 00:04:39.270 align:start position:0%
stack somewhere above the saved return
address.<00:04:37.920><c> We</c><00:04:38.040><c> then</c><00:04:38.240><c> go</c><00:04:38.400><c> on</c><00:04:38.520><c> to</c><00:04:38.680><c> perform</c><00:04:39.120><c> the</c>

00:04:39.270 --> 00:04:39.280 align:start position:0%
address. We then go on to perform the
 

00:04:39.280 --> 00:04:41.350 align:start position:0%
address. We then go on to perform the
read<00:04:39.520><c> operation</c><00:04:40.040><c> from</c><00:04:40.280><c> the</c><00:04:40.360><c> file,</c><00:04:40.880><c> copying</c>

00:04:41.350 --> 00:04:41.360 align:start position:0%
read operation from the file, copying
 

00:04:41.360 --> 00:04:43.430 align:start position:0%
read operation from the file, copying
each<00:04:41.640><c> byte</c><00:04:42.040><c> into</c><00:04:42.400><c> the</c><00:04:42.480><c> buffer.</c><00:04:43.200><c> As</c><00:04:43.400><c> I</c>

00:04:43.430 --> 00:04:43.440 align:start position:0%
each byte into the buffer. As I
 

00:04:43.440 --> 00:04:45.310 align:start position:0%
each byte into the buffer. As I
mentioned<00:04:43.760><c> before,</c><00:04:44.200><c> if</c><00:04:44.360><c> we</c><00:04:44.440><c> supply</c><00:04:44.880><c> a</c><00:04:44.960><c> file</c>

00:04:45.310 --> 00:04:45.320 align:start position:0%
mentioned before, if we supply a file
 

00:04:45.320 --> 00:04:47.030 align:start position:0%
mentioned before, if we supply a file
that<00:04:45.440><c> contains</c><00:04:45.920><c> more</c><00:04:46.120><c> than</c><00:04:46.280><c> 32</c><00:04:46.680><c> bytes</c><00:04:46.920><c> of</c>

00:04:47.030 --> 00:04:47.040 align:start position:0%
that contains more than 32 bytes of
 

00:04:47.040 --> 00:04:49.430 align:start position:0%
that contains more than 32 bytes of
data,<00:04:47.760><c> the</c><00:04:47.920><c> excess</c><00:04:48.320><c> bytes</c><00:04:48.640><c> begin</c><00:04:49.000><c> writing</c>

00:04:49.430 --> 00:04:49.440 align:start position:0%
data, the excess bytes begin writing
 

00:04:49.440 --> 00:04:51.190 align:start position:0%
data, the excess bytes begin writing
into<00:04:49.720><c> the</c><00:04:49.800><c> memory</c><00:04:50.120><c> directly</c><00:04:50.600><c> following</c><00:04:51.000><c> that</c>

00:04:51.190 --> 00:04:51.200 align:start position:0%
into the memory directly following that
 

00:04:51.200 --> 00:04:53.510 align:start position:0%
into the memory directly following that
buffer<00:04:51.680><c> out</c><00:04:51.880><c> of</c><00:04:52.000><c> bounds</c><00:04:52.720><c> and</c><00:04:52.840><c> we</c><00:04:52.960><c> can</c><00:04:53.080><c> see</c><00:04:53.280><c> now</c>

00:04:53.510 --> 00:04:53.520 align:start position:0%
buffer out of bounds and we can see now
 

00:04:53.520 --> 00:04:54.910 align:start position:0%
buffer out of bounds and we can see now
that<00:04:53.680><c> this</c><00:04:53.880><c> would</c><00:04:54.040><c> actually</c><00:04:54.320><c> corrupt</c><00:04:54.840><c> the</c>

00:04:54.910 --> 00:04:54.920 align:start position:0%
that this would actually corrupt the
 

00:04:54.920 --> 00:04:57.350 align:start position:0%
that this would actually corrupt the
value<00:04:55.480><c> of</c><00:04:55.720><c> the</c><00:04:55.840><c> saved</c><00:04:56.160><c> return</c><00:04:56.480><c> address.</c><00:04:57.160><c> This</c>

00:04:57.350 --> 00:04:57.360 align:start position:0%
value of the saved return address. This
 

00:04:57.360 --> 00:04:59.030 align:start position:0%
value of the saved return address. This
turns<00:04:57.680><c> out</c><00:04:57.800><c> to</c><00:04:57.920><c> actually</c><00:04:58.200><c> be</c><00:04:58.320><c> very</c><00:04:58.560><c> powerful</c>

00:04:59.030 --> 00:04:59.040 align:start position:0%
turns out to actually be very powerful
 

00:04:59.040 --> 00:05:00.790 align:start position:0%
turns out to actually be very powerful
because<00:04:59.360><c> we</c><00:04:59.480><c> know</c><00:04:59.800><c> the</c><00:05:00.040><c> when</c><00:05:00.200><c> this</c><00:05:00.400><c> vulnerable</c>

00:05:00.790 --> 00:05:00.800 align:start position:0%
because we know the when this vulnerable
 

00:05:00.800 --> 00:05:02.950 align:start position:0%
because we know the when this vulnerable
function<00:05:01.160><c> returns,</c><00:05:01.880><c> it</c><00:05:02.040><c> will</c><00:05:02.240><c> use</c><00:05:02.520><c> that</c><00:05:02.720><c> saved</c>

00:05:02.950 --> 00:05:02.960 align:start position:0%
function returns, it will use that saved
 

00:05:02.960 --> 00:05:04.990 align:start position:0%
function returns, it will use that saved
return<00:05:03.200><c> address</c><00:05:03.640><c> as</c><00:05:03.840><c> the</c><00:05:03.960><c> place</c><00:05:04.280><c> to</c><00:05:04.440><c> jump</c><00:05:04.720><c> back</c>

00:05:04.990 --> 00:05:05.000 align:start position:0%
return address as the place to jump back
 

00:05:05.000 --> 00:05:07.350 align:start position:0%
return address as the place to jump back
to.<00:05:05.760><c> And</c><00:05:06.000><c> since</c><00:05:06.240><c> we</c><00:05:06.400><c> now</c><00:05:06.520><c> have</c><00:05:06.720><c> the</c><00:05:06.800><c> ability</c><00:05:07.200><c> to</c>

00:05:07.350 --> 00:05:07.360 align:start position:0%
to. And since we now have the ability to
 

00:05:07.360 --> 00:05:09.150 align:start position:0%
to. And since we now have the ability to
modify<00:05:07.800><c> it,</c><00:05:08.160><c> we</c><00:05:08.240><c> can</c><00:05:08.400><c> actually</c><00:05:08.680><c> choose</c><00:05:09.040><c> the</c>

00:05:09.150 --> 00:05:09.160 align:start position:0%
modify it, we can actually choose the
 

00:05:09.160 --> 00:05:10.630 align:start position:0%
modify it, we can actually choose the
memory<00:05:09.440><c> address</c><00:05:09.800><c> of</c><00:05:09.960><c> where</c><00:05:10.120><c> the</c><00:05:10.240><c> program</c>

00:05:10.630 --> 00:05:10.640 align:start position:0%
memory address of where the program
 

00:05:10.640 --> 00:05:12.350 align:start position:0%
memory address of where the program
should<00:05:10.840><c> jump</c><00:05:11.080><c> to</c><00:05:11.200><c> next,</c><00:05:11.840><c> effectively</c>

00:05:12.350 --> 00:05:12.360 align:start position:0%
should jump to next, effectively
 

00:05:12.360 --> 00:05:14.510 align:start position:0%
should jump to next, effectively
controlling<00:05:12.960><c> its</c><00:05:13.120><c> execution.</c><00:05:14.200><c> Let's</c><00:05:14.400><c> see</c>

00:05:14.510 --> 00:05:14.520 align:start position:0%
controlling its execution. Let's see
 

00:05:14.520 --> 00:05:16.510 align:start position:0%
controlling its execution. Let's see
this<00:05:14.680><c> happening</c><00:05:15.040><c> live</c><00:05:15.360><c> in</c><00:05:15.520><c> the</c><00:05:15.600><c> debugger.</c><00:05:16.440><c> We</c>

00:05:16.510 --> 00:05:16.520 align:start position:0%
this happening live in the debugger. We
 

00:05:16.520 --> 00:05:18.310 align:start position:0%
this happening live in the debugger. We
can<00:05:16.680><c> enter</c><00:05:16.920><c> a</c><00:05:17.000><c> file</c><00:05:17.280><c> path</c><00:05:17.560><c> here,</c><00:05:17.800><c> which</c><00:05:18.080><c> I</c><00:05:18.160><c> have</c>

00:05:18.310 --> 00:05:18.320 align:start position:0%
can enter a file path here, which I have
 

00:05:18.320 --> 00:05:20.150 align:start position:0%
can enter a file path here, which I have
filled<00:05:18.640><c> with</c><00:05:18.760><c> a</c><00:05:18.840><c> bunch</c><00:05:19.200><c> of</c><00:05:19.440><c> random</c><00:05:19.840><c> marker</c>

00:05:20.150 --> 00:05:20.160 align:start position:0%
filled with a bunch of random marker
 

00:05:20.160 --> 00:05:22.630 align:start position:0%
filled with a bunch of random marker
values<00:05:20.920><c> and</c><00:05:21.080><c> it</c><00:05:21.160><c> exceeds</c><00:05:21.680><c> the</c><00:05:21.840><c> 32-byte</c>

00:05:22.630 --> 00:05:22.640 align:start position:0%
values and it exceeds the 32-byte
 

00:05:22.640 --> 00:05:24.430 align:start position:0%
values and it exceeds the 32-byte
amount.<00:05:23.440><c> Now,</c><00:05:23.560><c> when</c><00:05:23.680><c> we</c><00:05:23.800><c> first</c><00:05:24.080><c> enter</c><00:05:24.280><c> this</c>

00:05:24.430 --> 00:05:24.440 align:start position:0%
amount. Now, when we first enter this
 

00:05:24.440 --> 00:05:26.190 align:start position:0%
amount. Now, when we first enter this
function<00:05:24.840><c> and</c><00:05:24.960><c> create</c><00:05:25.240><c> the</c><00:05:25.280><c> buffer,</c><00:05:25.960><c> we</c><00:05:26.080><c> can</c>

00:05:26.190 --> 00:05:26.200 align:start position:0%
function and create the buffer, we can
 

00:05:26.200 --> 00:05:27.790 align:start position:0%
function and create the buffer, we can
see<00:05:26.360><c> that</c><00:05:26.520><c> there's</c><00:05:26.720><c> just</c><00:05:26.920><c> some</c><00:05:27.080><c> empty</c><00:05:27.360><c> space</c>

00:05:27.790 --> 00:05:27.800 align:start position:0%
see that there's just some empty space
 

00:05:27.800 --> 00:05:30.550 align:start position:0%
see that there's just some empty space
on<00:05:27.960><c> the</c><00:05:28.040><c> stack</c><00:05:28.560><c> reserved</c><00:05:29.160><c> for</c><00:05:29.360><c> the</c><00:05:29.440><c> 32</c><00:05:29.920><c> bytes</c>

00:05:30.550 --> 00:05:30.560 align:start position:0%
on the stack reserved for the 32 bytes
 

00:05:30.560 --> 00:05:32.430 align:start position:0%
on the stack reserved for the 32 bytes
and<00:05:30.880><c> some</c><00:05:31.040><c> other</c><00:05:31.200><c> miscellaneous</c><00:05:31.760><c> values</c><00:05:32.240><c> and</c>

00:05:32.430 --> 00:05:32.440 align:start position:0%
and some other miscellaneous values and
 

00:05:32.440 --> 00:05:34.270 align:start position:0%
and some other miscellaneous values and
then<00:05:32.600><c> the</c><00:05:32.720><c> saved</c><00:05:33.080><c> return</c><00:05:33.440><c> address</c><00:05:33.680><c> value.</c>

00:05:34.270 --> 00:05:34.280 align:start position:0%
then the saved return address value.
 

00:05:34.280 --> 00:05:35.990 align:start position:0%
then the saved return address value.
Again,<00:05:34.600><c> this</c><00:05:34.800><c> saved</c><00:05:35.080><c> return</c><00:05:35.320><c> address</c><00:05:35.640><c> is</c><00:05:35.760><c> just</c>

00:05:35.990 --> 00:05:36.000 align:start position:0%
Again, this saved return address is just
 

00:05:36.000 --> 00:05:37.950 align:start position:0%
Again, this saved return address is just
a<00:05:36.080><c> location</c><00:05:36.800><c> in</c><00:05:36.960><c> the</c><00:05:37.040><c> main</c><00:05:37.320><c> function</c><00:05:37.760><c> that</c><00:05:37.880><c> we</c>

00:05:37.950 --> 00:05:37.960 align:start position:0%
a location in the main function that we
 

00:05:37.960 --> 00:05:39.990 align:start position:0%
a location in the main function that we
need<00:05:38.160><c> to</c><00:05:38.240><c> go</c><00:05:38.440><c> back</c><00:05:38.760><c> to</c><00:05:39.240><c> after</c><00:05:39.600><c> the</c><00:05:39.680><c> vulnerable</c>

00:05:39.990 --> 00:05:40.000 align:start position:0%
need to go back to after the vulnerable
 

00:05:40.000 --> 00:05:42.150 align:start position:0%
need to go back to after the vulnerable
function<00:05:40.440><c> completes</c><00:05:40.880><c> execution.</c><00:05:41.760><c> Now,</c><00:05:42.040><c> we</c>

00:05:42.150 --> 00:05:42.160 align:start position:0%
function completes execution. Now, we
 

00:05:42.160 --> 00:05:44.390 align:start position:0%
function completes execution. Now, we
can<00:05:42.320><c> continue</c><00:05:42.800><c> to</c><00:05:43.080><c> read</c><00:05:43.320><c> the</c><00:05:43.400><c> file</c><00:05:43.720><c> data</c><00:05:44.200><c> and</c>

00:05:44.390 --> 00:05:44.400 align:start position:0%
can continue to read the file data and
 

00:05:44.400 --> 00:05:46.710 align:start position:0%
can continue to read the file data and
copy<00:05:44.680><c> it</c><00:05:44.880><c> into</c><00:05:45.160><c> the</c><00:05:45.240><c> buffer.</c><00:05:46.000><c> If</c><00:05:46.200><c> we</c><00:05:46.320><c> inspect</c>

00:05:46.710 --> 00:05:46.720 align:start position:0%
copy it into the buffer. If we inspect
 

00:05:46.720 --> 00:05:48.790 align:start position:0%
copy it into the buffer. If we inspect
the<00:05:46.800><c> memory</c><00:05:47.120><c> contents</c><00:05:47.560><c> of</c><00:05:47.720><c> the</c><00:05:47.840><c> stack</c><00:05:48.240><c> again,</c>

00:05:48.790 --> 00:05:48.800 align:start position:0%
the memory contents of the stack again,
 

00:05:48.800 --> 00:05:50.510 align:start position:0%
the memory contents of the stack again,
we<00:05:48.960><c> now</c><00:05:49.160><c> see</c><00:05:49.360><c> that</c><00:05:49.520><c> a</c><00:05:49.560><c> buffer</c><00:05:49.880><c> has</c><00:05:50.040><c> been</c><00:05:50.200><c> filled</c>

00:05:50.510 --> 00:05:50.520 align:start position:0%
we now see that a buffer has been filled
 

00:05:50.520 --> 00:05:52.430 align:start position:0%
we now see that a buffer has been filled
with<00:05:50.640><c> our</c><00:05:50.760><c> data</c><00:05:51.560><c> and</c><00:05:51.800><c> the</c><00:05:51.880><c> saved</c><00:05:52.120><c> return</c>

00:05:52.430 --> 00:05:52.440 align:start position:0%
with our data and the saved return
 

00:05:52.440 --> 00:05:54.110 align:start position:0%
with our data and the saved return
address<00:05:52.800><c> has</c><00:05:53.000><c> been</c><00:05:53.120><c> replaced</c><00:05:53.720><c> with</c><00:05:53.880><c> these</c>

00:05:54.110 --> 00:05:54.120 align:start position:0%
address has been replaced with these
 

00:05:54.120 --> 00:05:55.950 align:start position:0%
address has been replaced with these
bytes<00:05:54.440><c> right</c><00:05:54.680><c> here,</c><00:05:55.240><c> which</c><00:05:55.400><c> are</c><00:05:55.480><c> the</c><00:05:55.640><c> ASCII</c>

00:05:55.950 --> 00:05:55.960 align:start position:0%
bytes right here, which are the ASCII
 

00:05:55.960 --> 00:05:57.910 align:start position:0%
bytes right here, which are the ASCII
code<00:05:56.240><c> representation</c><00:05:57.280><c> of</c><00:05:57.520><c> some</c><00:05:57.720><c> of</c><00:05:57.840><c> the</c>

00:05:57.910 --> 00:05:57.920 align:start position:0%
code representation of some of the
 

00:05:57.920 --> 00:06:00.070 align:start position:0%
code representation of some of the
characters<00:05:58.480><c> from</c><00:05:58.680><c> the</c><00:05:58.840><c> input</c><00:05:59.200><c> file.</c><00:05:59.880><c> And</c><00:06:00.000><c> the</c>

00:06:00.070 --> 00:06:00.080 align:start position:0%
characters from the input file. And the
 

00:06:00.080 --> 00:06:02.030 align:start position:0%
characters from the input file. And the
program<00:06:00.440><c> will</c><00:06:00.560><c> now</c><00:06:00.760><c> crash</c><00:06:01.200><c> with</c><00:06:01.360><c> an</c><00:06:01.440><c> exception</c>

00:06:02.030 --> 00:06:02.040 align:start position:0%
program will now crash with an exception
 

00:06:02.040 --> 00:06:03.910 align:start position:0%
program will now crash with an exception
bad<00:06:02.400><c> access,</c><00:06:02.920><c> which</c><00:06:03.120><c> is</c><00:06:03.240><c> basically</c><00:06:03.680><c> an</c>

00:06:03.910 --> 00:06:03.920 align:start position:0%
bad access, which is basically an
 

00:06:03.920 --> 00:06:06.030 align:start position:0%
bad access, which is basically an
invalid<00:06:04.440><c> memory</c><00:06:04.720><c> address</c><00:06:05.040><c> exception.</c><00:06:05.960><c> The</c>

00:06:06.030 --> 00:06:06.040 align:start position:0%
invalid memory address exception. The
 

00:06:06.040 --> 00:06:07.710 align:start position:0%
invalid memory address exception. The
debugger<00:06:06.480><c> is</c><00:06:06.640><c> telling</c><00:06:07.000><c> us</c><00:06:07.120><c> that</c><00:06:07.240><c> the</c><00:06:07.320><c> program</c>

00:06:07.710 --> 00:06:07.720 align:start position:0%
debugger is telling us that the program
 

00:06:07.720 --> 00:06:09.470 align:start position:0%
debugger is telling us that the program
tried<00:06:08.040><c> to</c><00:06:08.160><c> jump</c><00:06:08.480><c> to</c><00:06:08.600><c> an</c><00:06:08.760><c> invalid</c><00:06:09.200><c> memory</c>

00:06:09.470 --> 00:06:09.480 align:start position:0%
tried to jump to an invalid memory
 

00:06:09.480 --> 00:06:11.310 align:start position:0%
tried to jump to an invalid memory
address<00:06:10.160><c> and</c><00:06:10.280><c> of</c><00:06:10.360><c> course</c><00:06:10.600><c> this</c><00:06:10.760><c> address</c><00:06:11.120><c> is</c>

00:06:11.310 --> 00:06:11.320 align:start position:0%
address and of course this address is
 

00:06:11.320 --> 00:06:13.110 align:start position:0%
address and of course this address is
the<00:06:11.440><c> bytes</c><00:06:11.760><c> that</c><00:06:11.920><c> we</c><00:06:12.040><c> control</c><00:06:12.600><c> coming</c><00:06:12.920><c> from</c>

00:06:13.110 --> 00:06:13.120 align:start position:0%
the bytes that we control coming from
 

00:06:13.120 --> 00:06:15.350 align:start position:0%
the bytes that we control coming from
our<00:06:13.240><c> input</c><00:06:13.600><c> file.</c><00:06:14.160><c> The</c><00:06:14.320><c> PC</c><00:06:14.640><c> register</c><00:06:15.040><c> has</c><00:06:15.200><c> been</c>

00:06:15.350 --> 00:06:15.360 align:start position:0%
our input file. The PC register has been
 

00:06:15.360 --> 00:06:16.990 align:start position:0%
our input file. The PC register has been
set<00:06:15.640><c> to</c><00:06:15.720><c> this</c><00:06:15.920><c> value</c><00:06:16.360><c> when</c><00:06:16.560><c> the</c><00:06:16.640><c> vulnerable</c>

00:06:16.990 --> 00:06:17.000 align:start position:0%
set to this value when the vulnerable
 

00:06:17.000 --> 00:06:18.870 align:start position:0%
set to this value when the vulnerable
function<00:06:17.400><c> tried</c><00:06:17.640><c> to</c><00:06:17.760><c> return</c><00:06:18.520><c> and</c><00:06:18.680><c> so</c><00:06:18.800><c> the</c>

00:06:18.870 --> 00:06:18.880 align:start position:0%
function tried to return and so the
 

00:06:18.880 --> 00:06:20.710 align:start position:0%
function tried to return and so the
program<00:06:19.240><c> has</c><00:06:19.400><c> then</c><00:06:19.520><c> tried</c><00:06:19.760><c> to</c><00:06:19.880><c> jump</c><00:06:20.240><c> there,</c>

00:06:20.710 --> 00:06:20.720 align:start position:0%
program has then tried to jump there,
 

00:06:20.720 --> 00:06:22.350 align:start position:0%
program has then tried to jump there,
but<00:06:20.960><c> crashed</c><00:06:21.440><c> as</c><00:06:21.600><c> obviously</c><00:06:21.880><c> this</c><00:06:22.040><c> is</c><00:06:22.160><c> not</c>

00:06:22.350 --> 00:06:22.360 align:start position:0%
but crashed as obviously this is not
 

00:06:22.360 --> 00:06:24.150 align:start position:0%
but crashed as obviously this is not
really<00:06:22.640><c> an</c><00:06:22.760><c> address,</c><00:06:23.280><c> it's</c><00:06:23.440><c> just</c><00:06:23.680><c> characters</c>

00:06:24.150 --> 00:06:24.160 align:start position:0%
really an address, it's just characters
 

00:06:24.160 --> 00:06:25.750 align:start position:0%
really an address, it's just characters
from<00:06:24.360><c> our</c><00:06:24.480><c> input</c><00:06:24.800><c> file.</c>

00:06:25.750 --> 00:06:25.760 align:start position:0%
from our input file.
 

00:06:25.760 --> 00:06:27.510 align:start position:0%
from our input file.
So<00:06:26.000><c> now,</c><00:06:26.320><c> to</c><00:06:26.480><c> actually</c><00:06:26.800><c> turn</c><00:06:27.120><c> this</c><00:06:27.280><c> into</c>

00:06:27.510 --> 00:06:27.520 align:start position:0%
So now, to actually turn this into
 

00:06:27.520 --> 00:06:29.070 align:start position:0%
So now, to actually turn this into
something<00:06:27.840><c> useful</c><00:06:28.320><c> and</c><00:06:28.480><c> complete</c><00:06:28.960><c> our</c>

00:06:29.070 --> 00:06:29.080 align:start position:0%
something useful and complete our
 

00:06:29.080 --> 00:06:31.150 align:start position:0%
something useful and complete our
exploit,<00:06:30.000><c> what</c><00:06:30.160><c> if</c><00:06:30.280><c> we</c><00:06:30.360><c> were</c><00:06:30.480><c> to</c><00:06:30.560><c> put</c><00:06:30.800><c> a</c><00:06:30.880><c> real</c>

00:06:31.150 --> 00:06:31.160 align:start position:0%
exploit, what if we were to put a real
 

00:06:31.160 --> 00:06:33.190 align:start position:0%
exploit, what if we were to put a real
address<00:06:31.560><c> in</c><00:06:31.800><c> place</c><00:06:32.240><c> of</c><00:06:32.400><c> the</c><00:06:32.480><c> return</c><00:06:32.800><c> address</c>

00:06:33.190 --> 00:06:33.200 align:start position:0%
address in place of the return address
 

00:06:33.200 --> 00:06:35.350 align:start position:0%
address in place of the return address
and<00:06:33.440><c> redirect</c><00:06:34.000><c> code</c><00:06:34.200><c> execution</c><00:06:34.760><c> somewhere</c><00:06:35.200><c> of</c>

00:06:35.350 --> 00:06:35.360 align:start position:0%
and redirect code execution somewhere of
 

00:06:35.360 --> 00:06:37.950 align:start position:0%
and redirect code execution somewhere of
our<00:06:35.520><c> choosing?</c><00:06:36.400><c> This</c><00:06:36.800><c> is</c><00:06:37.000><c> the</c><00:06:37.160><c> real</c><00:06:37.400><c> magic</c><00:06:37.800><c> of</c>

00:06:37.950 --> 00:06:37.960 align:start position:0%
our choosing? This is the real magic of
 

00:06:37.960 --> 00:06:39.390 align:start position:0%
our choosing? This is the real magic of
memory<00:06:38.200><c> corruption</c><00:06:38.560><c> vulnerabilities</c><00:06:39.160><c> like</c>

00:06:39.390 --> 00:06:39.400 align:start position:0%
memory corruption vulnerabilities like
 

00:06:39.400 --> 00:06:41.230 align:start position:0%
memory corruption vulnerabilities like
this.<00:06:39.960><c> We</c><00:06:40.080><c> have</c><00:06:40.200><c> the</c><00:06:40.280><c> power</c><00:06:40.560><c> to</c><00:06:40.640><c> choose</c><00:06:41.000><c> any</c>

00:06:41.230 --> 00:06:41.240 align:start position:0%
this. We have the power to choose any
 

00:06:41.240 --> 00:06:42.750 align:start position:0%
this. We have the power to choose any
memory<00:06:41.520><c> address</c><00:06:41.800><c> we</c><00:06:41.920><c> like,</c><00:06:42.280><c> which</c><00:06:42.440><c> means</c><00:06:42.680><c> we</c>

00:06:42.750 --> 00:06:42.760 align:start position:0%
memory address we like, which means we
 

00:06:42.760 --> 00:06:45.150 align:start position:0%
memory address we like, which means we
can<00:06:42.920><c> make</c><00:06:43.160><c> the</c><00:06:43.280><c> program</c><00:06:43.840><c> jump</c><00:06:44.200><c> to</c><00:06:44.400><c> any</c><00:06:44.640><c> code</c><00:06:45.040><c> we</c>

00:06:45.150 --> 00:06:45.160 align:start position:0%
can make the program jump to any code we
 

00:06:45.160 --> 00:06:46.990 align:start position:0%
can make the program jump to any code we
want<00:06:45.680><c> just</c><00:06:45.880><c> by</c><00:06:46.000><c> preparing</c><00:06:46.480><c> our</c><00:06:46.600><c> malicious</c>

00:06:46.990 --> 00:06:47.000 align:start position:0%
want just by preparing our malicious
 

00:06:47.000 --> 00:06:48.470 align:start position:0%
want just by preparing our malicious
file<00:06:47.280><c> with</c><00:06:47.400><c> the</c><00:06:47.520><c> correct</c><00:06:47.800><c> data</c><00:06:48.160><c> ahead</c><00:06:48.360><c> of</c>

00:06:48.470 --> 00:06:48.480 align:start position:0%
file with the correct data ahead of
 

00:06:48.480 --> 00:06:50.470 align:start position:0%
file with the correct data ahead of
time.<00:06:49.000><c> So,</c><00:06:49.280><c> as</c><00:06:49.400><c> an</c><00:06:49.520><c> example,</c><00:06:50.000><c> there</c><00:06:50.160><c> happens</c>

00:06:50.470 --> 00:06:50.480 align:start position:0%
time. So, as an example, there happens
 

00:06:50.480 --> 00:06:52.470 align:start position:0%
time. So, as an example, there happens
to<00:06:50.560><c> be</c><00:06:50.640><c> another</c><00:06:50.960><c> function</c><00:06:51.440><c> named</c><00:06:51.880><c> winner</c><00:06:52.360><c> in</c>

00:06:52.470 --> 00:06:52.480 align:start position:0%
to be another function named winner in
 

00:06:52.480 --> 00:06:54.030 align:start position:0%
to be another function named winner in
the<00:06:52.560><c> program</c><00:06:52.920><c> source</c><00:06:53.200><c> code.</c><00:06:53.760><c> The</c><00:06:53.840><c> winner</c>

00:06:54.030 --> 00:06:54.040 align:start position:0%
the program source code. The winner
 

00:06:54.040 --> 00:06:55.750 align:start position:0%
the program source code. The winner
function<00:06:54.520><c> is</c><00:06:54.680><c> actually</c><00:06:54.920><c> never</c><00:06:55.200><c> used</c><00:06:55.560><c> by</c><00:06:55.640><c> the</c>

00:06:55.750 --> 00:06:55.760 align:start position:0%
function is actually never used by the
 

00:06:55.760 --> 00:06:57.950 align:start position:0%
function is actually never used by the
program<00:06:56.160><c> under</c><00:06:56.360><c> normal</c><00:06:56.640><c> circumstances,</c><00:06:57.720><c> but</c>

00:06:57.950 --> 00:06:57.960 align:start position:0%
program under normal circumstances, but
 

00:06:57.960 --> 00:06:59.990 align:start position:0%
program under normal circumstances, but
it<00:06:58.080><c> still</c><00:06:58.240><c> gets</c><00:06:58.440><c> compiled</c><00:06:58.960><c> into</c><00:06:59.240><c> the</c><00:06:59.320><c> binary.</c>

00:06:59.990 --> 00:07:00.000 align:start position:0%
it still gets compiled into the binary.
 

00:07:00.000 --> 00:07:01.710 align:start position:0%
it still gets compiled into the binary.
And<00:07:00.200><c> we</c><00:07:00.280><c> can</c><00:07:00.440><c> see</c><00:07:00.600><c> its</c><00:07:00.760><c> code</c><00:07:01.160><c> and</c><00:07:01.280><c> its</c><00:07:01.440><c> memory</c>

00:07:01.710 --> 00:07:01.720 align:start position:0%
And we can see its code and its memory
 

00:07:01.720 --> 00:07:03.710 align:start position:0%
And we can see its code and its memory
address<00:07:02.040><c> inside</c><00:07:02.600><c> the</c><00:07:02.680><c> debugger.</c><00:07:03.400><c> Since</c>

00:07:03.710 --> 00:07:03.720 align:start position:0%
address inside the debugger. Since
 

00:07:03.720 --> 00:07:05.670 align:start position:0%
address inside the debugger. Since
winner<00:07:04.040><c> is</c><00:07:04.200><c> never</c><00:07:04.400><c> actually</c><00:07:04.760><c> called</c><00:07:05.160><c> or</c><00:07:05.360><c> used</c>

00:07:05.670 --> 00:07:05.680 align:start position:0%
winner is never actually called or used
 

00:07:05.680 --> 00:07:07.430 align:start position:0%
winner is never actually called or used
by<00:07:05.760><c> the</c><00:07:05.880><c> program</c><00:07:06.240><c> in</c><00:07:06.360><c> any</c><00:07:06.520><c> way,</c><00:07:07.040><c> it</c><00:07:07.160><c> kind</c><00:07:07.360><c> of</c>

00:07:07.430 --> 00:07:07.440 align:start position:0%
by the program in any way, it kind of
 

00:07:07.440 --> 00:07:09.430 align:start position:0%
by the program in any way, it kind of
serves<00:07:07.760><c> as</c><00:07:07.880><c> a</c><00:07:07.920><c> nice</c><00:07:08.280><c> secret</c><00:07:08.680><c> function,</c><00:07:09.240><c> which</c>

00:07:09.430 --> 00:07:09.440 align:start position:0%
serves as a nice secret function, which
 

00:07:09.440 --> 00:07:11.150 align:start position:0%
serves as a nice secret function, which
we<00:07:09.520><c> can</c><00:07:09.720><c> use</c><00:07:09.960><c> in</c><00:07:10.080><c> this</c><00:07:10.280><c> proof</c><00:07:10.480><c> of</c><00:07:10.560><c> concept</c><00:07:11.040><c> to</c>

00:07:11.150 --> 00:07:11.160 align:start position:0%
we can use in this proof of concept to
 

00:07:11.160 --> 00:07:13.070 align:start position:0%
we can use in this proof of concept to
demonstrate<00:07:11.880><c> how</c><00:07:12.040><c> we</c><00:07:12.160><c> can</c><00:07:12.320><c> force</c><00:07:12.560><c> the</c><00:07:12.680><c> program</c>

00:07:13.070 --> 00:07:13.080 align:start position:0%
demonstrate how we can force the program
 

00:07:13.080 --> 00:07:15.310 align:start position:0%
demonstrate how we can force the program
to<00:07:13.280><c> jump</c><00:07:13.600><c> to</c><00:07:13.720><c> any</c><00:07:13.920><c> memory</c><00:07:14.200><c> address.</c><00:07:15.000><c> We</c><00:07:15.200><c> can</c>

00:07:15.310 --> 00:07:15.320 align:start position:0%
to jump to any memory address. We can
 

00:07:15.320 --> 00:07:16.830 align:start position:0%
to jump to any memory address. We can
take<00:07:15.560><c> the</c><00:07:15.640><c> bytes</c><00:07:16.040><c> that</c><00:07:16.240><c> represent</c><00:07:16.720><c> the</c>

00:07:16.830 --> 00:07:16.840 align:start position:0%
take the bytes that represent the
 

00:07:16.840 --> 00:07:18.990 align:start position:0%
take the bytes that represent the
address<00:07:17.360><c> of</c><00:07:17.560><c> the</c><00:07:17.640><c> winner</c><00:07:17.840><c> function</c><00:07:18.480><c> and</c><00:07:18.640><c> place</c>

00:07:18.990 --> 00:07:19.000 align:start position:0%
address of the winner function and place
 

00:07:19.000 --> 00:07:20.910 align:start position:0%
address of the winner function and place
these<00:07:19.200><c> bytes</c><00:07:19.520><c> exactly</c><00:07:20.040><c> at</c><00:07:20.160><c> the</c><00:07:20.240><c> position</c><00:07:20.720><c> in</c>

00:07:20.910 --> 00:07:20.920 align:start position:0%
these bytes exactly at the position in
 

00:07:20.920 --> 00:07:23.190 align:start position:0%
these bytes exactly at the position in
our<00:07:21.080><c> input</c><00:07:21.440><c> file</c><00:07:21.720><c> data,</c><00:07:22.440><c> which</c><00:07:22.640><c> we</c><00:07:22.760><c> know</c>

00:07:23.190 --> 00:07:23.200 align:start position:0%
our input file data, which we know
 

00:07:23.200 --> 00:07:24.990 align:start position:0%
our input file data, which we know
overwrites<00:07:23.800><c> the</c><00:07:23.880><c> saved</c><00:07:24.200><c> return</c><00:07:24.480><c> address</c><00:07:24.840><c> on</c>

00:07:24.990 --> 00:07:25.000 align:start position:0%
overwrites the saved return address on
 

00:07:25.000 --> 00:07:27.150 align:start position:0%
overwrites the saved return address on
the<00:07:25.080><c> stack.</c><00:07:25.920><c> Then,</c><00:07:26.280><c> if</c><00:07:26.440><c> all</c><00:07:26.560><c> goes</c><00:07:26.760><c> to</c><00:07:26.840><c> plan,</c>

00:07:27.150 --> 00:07:27.160 align:start position:0%
the stack. Then, if all goes to plan,
 

00:07:27.160 --> 00:07:28.710 align:start position:0%
the stack. Then, if all goes to plan,
the<00:07:27.320><c> buffer</c><00:07:27.600><c> overflow</c><00:07:27.960><c> should</c><00:07:28.120><c> occur,</c><00:07:28.600><c> the</c>

00:07:28.710 --> 00:07:28.720 align:start position:0%
the buffer overflow should occur, the
 

00:07:28.720 --> 00:07:30.310 align:start position:0%
the buffer overflow should occur, the
saved<00:07:29.080><c> return</c><00:07:29.360><c> address</c><00:07:29.640><c> on</c><00:07:29.720><c> the</c><00:07:29.800><c> stack</c><00:07:30.200><c> will</c>

00:07:30.310 --> 00:07:30.320 align:start position:0%
saved return address on the stack will
 

00:07:30.320 --> 00:07:32.310 align:start position:0%
saved return address on the stack will
be<00:07:30.520><c> overwritten</c><00:07:31.160><c> with</c><00:07:31.320><c> the</c><00:07:31.440><c> address</c><00:07:31.960><c> of</c><00:07:32.160><c> the</c>

00:07:32.310 --> 00:07:32.320 align:start position:0%
be overwritten with the address of the
 

00:07:32.320 --> 00:07:34.470 align:start position:0%
be overwritten with the address of the
secret<00:07:32.840><c> winner</c><00:07:33.080><c> function</c><00:07:33.960><c> and</c><00:07:34.080><c> then</c><00:07:34.240><c> when</c><00:07:34.400><c> the</c>

00:07:34.470 --> 00:07:34.480 align:start position:0%
secret winner function and then when the
 

00:07:34.480 --> 00:07:36.110 align:start position:0%
secret winner function and then when the
vulnerable<00:07:34.800><c> function</c><00:07:35.120><c> tries</c><00:07:35.400><c> to</c><00:07:35.480><c> return,</c><00:07:36.000><c> it</c>

00:07:36.110 --> 00:07:36.120 align:start position:0%
vulnerable function tries to return, it
 

00:07:36.120 --> 00:07:37.670 align:start position:0%
vulnerable function tries to return, it
should<00:07:36.320><c> jump</c><00:07:36.680><c> right</c><00:07:37.040><c> into</c><00:07:37.320><c> that</c><00:07:37.520><c> winner</c>

00:07:37.670 --> 00:07:37.680 align:start position:0%
should jump right into that winner
 

00:07:37.680 --> 00:07:40.030 align:start position:0%
should jump right into that winner
function.<00:07:38.680><c> And</c><00:07:38.920><c> as</c><00:07:39.000><c> you</c><00:07:39.080><c> can</c><00:07:39.200><c> see,</c><00:07:39.520><c> passing</c><00:07:39.920><c> in</c>

00:07:40.030 --> 00:07:40.040 align:start position:0%
function. And as you can see, passing in
 

00:07:40.040 --> 00:07:42.110 align:start position:0%
function. And as you can see, passing in
this<00:07:40.200><c> crafted</c><00:07:40.680><c> file</c><00:07:41.040><c> achieves</c><00:07:41.440><c> exactly</c><00:07:41.920><c> that</c>

00:07:42.110 --> 00:07:42.120 align:start position:0%
this crafted file achieves exactly that
 

00:07:42.120 --> 00:07:44.270 align:start position:0%
this crafted file achieves exactly that
outcome.<00:07:43.080><c> Instead</c><00:07:43.560><c> of</c><00:07:43.640><c> crashing</c><00:07:44.040><c> with</c><00:07:44.160><c> an</c>

00:07:44.270 --> 00:07:44.280 align:start position:0%
outcome. Instead of crashing with an
 

00:07:44.280 --> 00:07:45.710 align:start position:0%
outcome. Instead of crashing with an
invalid<00:07:44.640><c> memory</c><00:07:44.880><c> address,</c><00:07:45.280><c> we</c><00:07:45.440><c> are</c><00:07:45.480><c> now</c>

00:07:45.710 --> 00:07:45.720 align:start position:0%
invalid memory address, we are now
 

00:07:45.720 --> 00:07:47.790 align:start position:0%
invalid memory address, we are now
presented<00:07:46.200><c> a</c><00:07:46.280><c> message</c><00:07:46.720><c> coming</c><00:07:47.000><c> directly</c><00:07:47.520><c> from</c>

00:07:47.790 --> 00:07:47.800 align:start position:0%
presented a message coming directly from
 

00:07:47.800 --> 00:07:49.670 align:start position:0%
presented a message coming directly from
the<00:07:47.880><c> winner</c><00:07:48.120><c> function</c><00:07:48.960><c> and</c><00:07:49.080><c> a</c><00:07:49.160><c> shell</c><00:07:49.400><c> command</c>

00:07:49.670 --> 00:07:49.680 align:start position:0%
the winner function and a shell command
 

00:07:49.680 --> 00:07:51.350 align:start position:0%
the winner function and a shell command
is<00:07:49.760><c> also</c><00:07:50.000><c> executed</c><00:07:50.600><c> to</c><00:07:50.840><c> give</c><00:07:50.960><c> us</c><00:07:51.080><c> something</c>

00:07:51.350 --> 00:07:51.360 align:start position:0%
is also executed to give us something
 

00:07:51.360 --> 00:07:53.270 align:start position:0%
is also executed to give us something
cool<00:07:51.560><c> to</c><00:07:51.640><c> look</c><00:07:51.800><c> at.</c><00:07:52.560><c> At</c><00:07:52.760><c> this</c><00:07:52.920><c> point,</c><00:07:53.160><c> we've</c>

00:07:53.270 --> 00:07:53.280 align:start position:0%
cool to look at. At this point, we've
 

00:07:53.280 --> 00:07:55.070 align:start position:0%
cool to look at. At this point, we've
successfully<00:07:53.880><c> written</c><00:07:54.240><c> a</c><00:07:54.320><c> very</c><00:07:54.680><c> basic</c>

00:07:55.070 --> 00:07:55.080 align:start position:0%
successfully written a very basic
 

00:07:55.080 --> 00:07:57.350 align:start position:0%
successfully written a very basic
exploit<00:07:55.480><c> and</c><00:07:55.560><c> managed</c><00:07:55.880><c> to</c><00:07:56.040><c> hijack</c><00:07:56.560><c> control</c><00:07:57.160><c> of</c>

00:07:57.350 --> 00:07:57.360 align:start position:0%
exploit and managed to hijack control of
 

00:07:57.360 --> 00:07:59.150 align:start position:0%
exploit and managed to hijack control of
the<00:07:57.480><c> vulnerable</c><00:07:57.840><c> program</c><00:07:58.480><c> and</c><00:07:58.640><c> call</c><00:07:58.960><c> any</c>

00:07:59.150 --> 00:07:59.160 align:start position:0%
the vulnerable program and call any
 

00:07:59.160 --> 00:08:01.030 align:start position:0%
the vulnerable program and call any
function<00:07:59.520><c> we</c><00:07:59.640><c> wanted</c><00:07:59.880><c> to.</c><00:08:00.480><c> I</c><00:08:00.640><c> know</c><00:08:00.760><c> what</c><00:08:00.880><c> many</c>

00:08:01.030 --> 00:08:01.040 align:start position:0%
function we wanted to. I know what many
 

00:08:01.040 --> 00:08:02.710 align:start position:0%
function we wanted to. I know what many
of<00:08:01.120><c> you</c><00:08:01.160><c> may</c><00:08:01.280><c> be</c><00:08:01.400><c> thinking</c><00:08:01.760><c> at</c><00:08:01.840><c> this</c><00:08:02.000><c> point.</c><00:08:02.600><c> In</c>

00:08:02.710 --> 00:08:02.720 align:start position:0%
of you may be thinking at this point. In
 

00:08:02.720 --> 00:08:05.070 align:start position:0%
of you may be thinking at this point. In
the<00:08:02.800><c> big</c><00:08:03.000><c> year</c><00:08:03.240><c> of</c><00:08:03.360><c> 2026,</c><00:08:04.400><c> surely</c><00:08:04.760><c> this</c><00:08:04.960><c> is</c>

00:08:05.070 --> 00:08:05.080 align:start position:0%
the big year of 2026, surely this is
 

00:08:05.080 --> 00:08:07.390 align:start position:0%
the big year of 2026, surely this is
just<00:08:05.320><c> way</c><00:08:05.440><c> too</c><00:08:05.600><c> simplistic.</c><00:08:06.520><c> ASLR</c><00:08:07.120><c> would</c><00:08:07.280><c> have</c>

00:08:07.390 --> 00:08:07.400 align:start position:0%
just way too simplistic. ASLR would have
 

00:08:07.400 --> 00:08:09.030 align:start position:0%
just way too simplistic. ASLR would have
prevented<00:08:07.800><c> us</c><00:08:07.920><c> knowing</c><00:08:08.240><c> the</c><00:08:08.320><c> address</c><00:08:08.760><c> of</c><00:08:08.960><c> the</c>

00:08:09.030 --> 00:08:09.040 align:start position:0%
prevented us knowing the address of the
 

00:08:09.040 --> 00:08:10.870 align:start position:0%
prevented us knowing the address of the
winner<00:08:09.240><c> function</c><00:08:10.160><c> and</c><00:08:10.520><c> pointer</c>

00:08:10.870 --> 00:08:10.880 align:start position:0%
winner function and pointer
 

00:08:10.880 --> 00:08:12.230 align:start position:0%
winner function and pointer
authentication<00:08:11.560><c> would</c><00:08:11.680><c> have</c><00:08:11.800><c> stopped</c><00:08:12.120><c> us</c>

00:08:12.230 --> 00:08:12.240 align:start position:0%
authentication would have stopped us
 

00:08:12.240 --> 00:08:14.390 align:start position:0%
authentication would have stopped us
jumping<00:08:12.640><c> to</c><00:08:12.760><c> a</c><00:08:12.840><c> control</c><00:08:13.160><c> address</c><00:08:13.480><c> anyway.</c><00:08:14.240><c> And</c>

00:08:14.390 --> 00:08:14.400 align:start position:0%
jumping to a control address anyway. And
 

00:08:14.400 --> 00:08:16.790 align:start position:0%
jumping to a control address anyway. And
even<00:08:14.640><c> more</c><00:08:14.800><c> recently,</c><00:08:15.280><c> the</c><00:08:15.400><c> addition</c><00:08:15.840><c> of</c><00:08:16.040><c> MTE</c>

00:08:16.790 --> 00:08:16.800 align:start position:0%
even more recently, the addition of MTE
 

00:08:16.800 --> 00:08:18.150 align:start position:0%
even more recently, the addition of MTE
would<00:08:16.920><c> have</c><00:08:17.040><c> prevented</c><00:08:17.480><c> the</c><00:08:17.560><c> whole</c><00:08:17.800><c> thing</c><00:08:18.080><c> at</c>

00:08:18.150 --> 00:08:18.160 align:start position:0%
would have prevented the whole thing at
 

00:08:18.160 --> 00:08:20.310 align:start position:0%
would have prevented the whole thing at
the<00:08:18.280><c> point</c><00:08:18.640><c> of</c><00:08:18.760><c> the</c><00:08:18.920><c> overflow</c><00:08:19.320><c> occurring.</c>

00:08:20.310 --> 00:08:20.320 align:start position:0%
the point of the overflow occurring.
 

00:08:20.320 --> 00:08:22.150 align:start position:0%
the point of the overflow occurring.
These<00:08:20.720><c> are</c><00:08:20.840><c> all</c><00:08:20.960><c> very</c><00:08:21.240><c> valid</c><00:08:21.520><c> points</c><00:08:21.960><c> and</c>

00:08:22.150 --> 00:08:22.160 align:start position:0%
These are all very valid points and
 

00:08:22.160 --> 00:08:25.110 align:start position:0%
These are all very valid points and
completely<00:08:22.600><c> true.</c><00:08:23.320><c> Exploitation</c><00:08:24.040><c> in</c><00:08:24.160><c> 2026</c><00:08:24.960><c> is</c>

00:08:25.110 --> 00:08:25.120 align:start position:0%
completely true. Exploitation in 2026 is
 

00:08:25.120 --> 00:08:26.830 align:start position:0%
completely true. Exploitation in 2026 is
obviously<00:08:25.480><c> not</c><00:08:25.720><c> nearly</c><00:08:26.040><c> as</c><00:08:26.160><c> simple</c><00:08:26.560><c> as</c><00:08:26.720><c> the</c>

00:08:26.830 --> 00:08:26.840 align:start position:0%
obviously not nearly as simple as the
 

00:08:26.840 --> 00:08:28.830 align:start position:0%
obviously not nearly as simple as the
demonstration<00:08:27.560><c> shown</c><00:08:27.800><c> in</c><00:08:27.920><c> this</c><00:08:28.080><c> video.</c><00:08:28.680><c> This</c>

00:08:28.830 --> 00:08:28.840 align:start position:0%
demonstration shown in this video. This
 

00:08:28.840 --> 00:08:30.630 align:start position:0%
demonstration shown in this video. This
is<00:08:28.960><c> one</c><00:08:29.080><c> of</c><00:08:29.160><c> the</c><00:08:29.200><c> most</c><00:08:29.440><c> classic</c><00:08:29.800><c> examples</c><00:08:30.440><c> of</c>

00:08:30.630 --> 00:08:30.640 align:start position:0%
is one of the most classic examples of
 

00:08:30.640 --> 00:08:32.750 align:start position:0%
is one of the most classic examples of
software<00:08:31.000><c> hacking,</c><00:08:31.560><c> dating</c><00:08:31.880><c> back</c><00:08:32.080><c> nearly</c><00:08:32.400><c> 30</c>

00:08:32.750 --> 00:08:32.760 align:start position:0%
software hacking, dating back nearly 30
 

00:08:32.760 --> 00:08:34.469 align:start position:0%
software hacking, dating back nearly 30
years.<00:08:33.520><c> However,</c><00:08:33.880><c> I'd</c><00:08:34.000><c> argue</c><00:08:34.280><c> that</c><00:08:34.400><c> the</c>

00:08:34.469 --> 00:08:34.479 align:start position:0%
years. However, I'd argue that the
 

00:08:34.479 --> 00:08:36.110 align:start position:0%
years. However, I'd argue that the
concepts<00:08:35.039><c> outlined</c><00:08:35.440><c> here</c><00:08:35.719><c> are</c><00:08:35.840><c> still</c>

00:08:36.110 --> 00:08:36.120 align:start position:0%
concepts outlined here are still
 

00:08:36.120 --> 00:08:37.909 align:start position:0%
concepts outlined here are still
absolutely<00:08:36.599><c> foundational</c><00:08:37.320><c> in</c><00:08:37.440><c> developing</c>

00:08:37.909 --> 00:08:37.919 align:start position:0%
absolutely foundational in developing
 

00:08:37.919 --> 00:08:40.110 align:start position:0%
absolutely foundational in developing
the<00:08:38.000><c> skill</c><00:08:38.320><c> set</c><00:08:38.599><c> of</c><00:08:38.840><c> exploit</c><00:08:39.159><c> development</c><00:08:39.919><c> or</c>

00:08:40.110 --> 00:08:40.120 align:start position:0%
the skill set of exploit development or
 

00:08:40.120 --> 00:08:43.830 align:start position:0%
the skill set of exploit development or
hacking<00:08:40.800><c> even</c><00:08:41.120><c> in</c><00:08:41.280><c> 2026.</c><00:08:42.599><c> The</c><00:08:42.800><c> core</c><00:08:43.120><c> ideas</c><00:08:43.640><c> and</c>

00:08:43.830 --> 00:08:43.840 align:start position:0%
hacking even in 2026. The core ideas and
 

00:08:43.840 --> 00:08:45.870 align:start position:0%
hacking even in 2026. The core ideas and
principles,<00:08:44.520><c> such</c><00:08:44.840><c> as</c><00:08:45.080><c> a</c><00:08:45.160><c> missing</c><00:08:45.600><c> length</c>

00:08:45.870 --> 00:08:45.880 align:start position:0%
principles, such as a missing length
 

00:08:45.880 --> 00:08:47.870 align:start position:0%
principles, such as a missing length
check,<00:08:46.520><c> the</c><00:08:46.640><c> corruption</c><00:08:47.160><c> of</c><00:08:47.280><c> some</c><00:08:47.440><c> data</c><00:08:47.760><c> in</c>

00:08:47.870 --> 00:08:47.880 align:start position:0%
check, the corruption of some data in
 

00:08:47.880 --> 00:08:50.590 align:start position:0%
check, the corruption of some data in
memory,<00:08:48.640><c> and</c><00:08:48.920><c> a</c><00:08:49.000><c> pointer</c><00:08:49.360><c> overwrite,</c><00:08:50.240><c> are</c><00:08:50.440><c> all</c>

00:08:50.590 --> 00:08:50.600 align:start position:0%
memory, and a pointer overwrite, are all
 

00:08:50.600 --> 00:08:52.470 align:start position:0%
memory, and a pointer overwrite, are all
building<00:08:51.000><c> blocks</c><00:08:51.320><c> that</c><00:08:51.440><c> we</c><00:08:51.560><c> still</c><00:08:51.880><c> see</c><00:08:52.240><c> in</c>

00:08:52.470 --> 00:08:52.480 align:start position:0%
building blocks that we still see in
 

00:08:52.480 --> 00:08:54.750 align:start position:0%
building blocks that we still see in
modern<00:08:52.760><c> software</c><00:08:53.080><c> exploits</c><00:08:53.480><c> today,</c><00:08:54.280><c> albeit</c>

00:08:54.750 --> 00:08:54.760 align:start position:0%
modern software exploits today, albeit
 

00:08:54.760 --> 00:08:56.870 align:start position:0%
modern software exploits today, albeit
in<00:08:54.880><c> much</c><00:08:55.120><c> more</c><00:08:55.280><c> complex</c><00:08:55.680><c> scenarios.</c>

00:08:56.870 --> 00:08:56.880 align:start position:0%
in much more complex scenarios.
 

00:08:56.880 --> 00:08:58.590 align:start position:0%
in much more complex scenarios.
So,<00:08:57.080><c> for</c><00:08:57.200><c> any</c><00:08:57.360><c> new</c><00:08:57.560><c> hackers</c><00:08:57.880><c> out</c><00:08:58.000><c> there,</c><00:08:58.280><c> in</c><00:08:58.440><c> my</c>

00:08:58.590 --> 00:08:58.600 align:start position:0%
So, for any new hackers out there, in my
 

00:08:58.600 --> 00:09:00.230 align:start position:0%
So, for any new hackers out there, in my
opinion,<00:08:59.040><c> it</c><00:08:59.120><c> is</c><00:08:59.200><c> still</c><00:08:59.400><c> a</c><00:08:59.440><c> great</c><00:08:59.640><c> exercise</c><00:09:00.120><c> to</c>

00:09:00.230 --> 00:09:00.240 align:start position:0%
opinion, it is still a great exercise to
 

00:09:00.240 --> 00:09:02.390 align:start position:0%
opinion, it is still a great exercise to
experiment<00:09:00.880><c> with</c><00:09:01.040><c> these</c><00:09:01.240><c> super</c><00:09:01.680><c> old</c><00:09:01.920><c> types</c><00:09:02.280><c> of</c>

00:09:02.390 --> 00:09:02.400 align:start position:0%
experiment with these super old types of
 

00:09:02.400 --> 00:09:04.390 align:start position:0%
experiment with these super old types of
buffer<00:09:02.680><c> overflow</c><00:09:03.000><c> exploits</c><00:09:03.800><c> to</c><00:09:03.960><c> build</c><00:09:04.280><c> out</c>

00:09:04.390 --> 00:09:04.400 align:start position:0%
buffer overflow exploits to build out
 

00:09:04.400 --> 00:09:06.110 align:start position:0%
buffer overflow exploits to build out
that<00:09:04.600><c> base</c><00:09:04.840><c> of</c><00:09:04.960><c> knowledge</c><00:09:05.720><c> rather</c><00:09:05.960><c> than</c>

00:09:06.110 --> 00:09:06.120 align:start position:0%
that base of knowledge rather than
 

00:09:06.120 --> 00:09:07.790 align:start position:0%
that base of knowledge rather than
trying<00:09:06.360><c> to</c><00:09:06.480><c> jump</c><00:09:06.760><c> into</c><00:09:07.000><c> the</c><00:09:07.080><c> deep</c><00:09:07.360><c> end</c><00:09:07.600><c> and</c>

00:09:07.790 --> 00:09:07.800 align:start position:0%
trying to jump into the deep end and
 

00:09:07.800 --> 00:09:09.990 align:start position:0%
trying to jump into the deep end and
exploiting<00:09:08.400><c> something</c><00:09:08.760><c> like</c><00:09:08.960><c> the</c><00:09:09.160><c> iOS</c><00:09:09.480><c> 26</c>

00:09:09.990 --> 00:09:10.000 align:start position:0%
exploiting something like the iOS 26
 

00:09:10.000 --> 00:09:12.750 align:start position:0%
exploiting something like the iOS 26
kernel<00:09:10.760><c> in</c><00:09:10.920><c> all</c><00:09:11.080><c> of</c><00:09:11.160><c> its</c><00:09:11.280><c> mitigation</c><00:09:11.840><c> glory.</c>

00:09:12.750 --> 00:09:12.760 align:start position:0%
kernel in all of its mitigation glory.
 

00:09:12.760 --> 00:09:13.910 align:start position:0%
kernel in all of its mitigation glory.
Let<00:09:12.960><c> me</c><00:09:13.040><c> know</c><00:09:13.200><c> what</c><00:09:13.320><c> you</c><00:09:13.400><c> thought</c><00:09:13.640><c> of</c><00:09:13.720><c> this</c>

00:09:13.910 --> 00:09:13.920 align:start position:0%
Let me know what you thought of this
 

00:09:13.920 --> 00:09:15.870 align:start position:0%
Let me know what you thought of this
video<00:09:14.200><c> in</c><00:09:14.320><c> the</c><00:09:14.440><c> comments</c><00:09:14.840><c> down</c><00:09:15.000><c> below</c><00:09:15.560><c> and</c><00:09:15.760><c> if</c>

00:09:15.870 --> 00:09:15.880 align:start position:0%
video in the comments down below and if
 

00:09:15.880 --> 00:09:17.230 align:start position:0%
video in the comments down below and if
you'd<00:09:15.960><c> be</c><00:09:16.080><c> curious</c><00:09:16.480><c> to</c><00:09:16.560><c> see</c><00:09:16.720><c> more</c><00:09:16.960><c> of</c><00:09:17.040><c> these</c>

00:09:17.230 --> 00:09:17.240 align:start position:0%
you'd be curious to see more of these
 

00:09:17.240 --> 00:09:18.950 align:start position:0%
you'd be curious to see more of these
back<00:09:17.440><c> to</c><00:09:17.520><c> basic</c><00:09:17.880><c> style</c><00:09:18.120><c> videos</c><00:09:18.600><c> or</c><00:09:18.760><c> if</c><00:09:18.880><c> you</c>

00:09:18.950 --> 00:09:18.960 align:start position:0%
back to basic style videos or if you
 

00:09:18.960 --> 00:09:20.510 align:start position:0%
back to basic style videos or if you
prefer<00:09:19.240><c> the</c><00:09:19.360><c> more</c><00:09:19.640><c> in-depth</c><00:09:20.080><c> real</c><00:09:20.240><c> world</c>

00:09:20.510 --> 00:09:20.520 align:start position:0%
prefer the more in-depth real world
 

00:09:20.520 --> 00:09:22.510 align:start position:0%
prefer the more in-depth real world
exploit<00:09:20.840><c> analysis</c><00:09:21.320><c> content.</c><00:09:22.160><c> Thanks</c><00:09:22.440><c> for</c>

00:09:22.510 --> 00:09:22.520 align:start position:0%
exploit analysis content. Thanks for
 

00:09:22.520 --> 00:09:24.030 align:start position:0%
exploit analysis content. Thanks for
watching<00:09:22.880><c> and</c><00:09:23.040><c> I</c><00:09:23.120><c> will</c><00:09:23.200><c> see</c><00:09:23.440><c> you</c><00:09:23.600><c> in</c><00:09:23.720><c> the</c><00:09:23.800><c> next</c>

00:09:24.030 --> 00:09:24.040 align:start position:0%
watching and I will see you in the next
 

00:09:24.040 --> 00:09:26.280 align:start position:0%
watching and I will see you in the next
one.

