Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:04,730 --> 00:00:08,369
[Music]
2
00:00:09,559 --> 00:00:12,420
hello all welcome back to another video
3
00:00:12,420 --> 00:00:14,280
for this video we will be walking
4
00:00:14,280 --> 00:00:16,139
through how we can bypass the latest
5
00:00:16,139 --> 00:00:19,320
Windows Defender with C plus plus as
6
00:00:19,320 --> 00:00:21,240
shown in the screen we will be using
7
00:00:21,240 --> 00:00:24,359
this GitHub repository and making use of
8
00:00:24,359 --> 00:00:26,460
the source code available in this
9
00:00:26,460 --> 00:00:28,439
project over here so in this project
10
00:00:28,439 --> 00:00:31,140
there are a lot of useful references and
11
00:00:31,140 --> 00:00:32,820
we'll be showing how we can make use of
12
00:00:32,820 --> 00:00:35,280
it to bypass Windows Defender on my
13
00:00:35,280 --> 00:00:37,500
channel there's a playlist specifically
14
00:00:37,500 --> 00:00:41,160
on bypassing Windows Defender most of it
15
00:00:41,160 --> 00:00:44,100
will not work anymore whenever a tool or
16
00:00:44,100 --> 00:00:46,040
technique gets publicized like this
17
00:00:46,040 --> 00:00:48,840
Windows Defender will be quick to pick
18
00:00:48,840 --> 00:00:51,000
it up and build detection around it to
19
00:00:51,000 --> 00:00:53,100
prevent it from working the goal of
20
00:00:53,100 --> 00:00:55,379
sharing all of this knowledge and tools
21
00:00:55,379 --> 00:00:58,440
is to create awareness and hopefully you
22
00:00:58,440 --> 00:01:00,300
will be able to build your own custom
23
00:01:00,300 --> 00:01:02,940
loader that can bypass Windows Defender
24
00:01:02,940 --> 00:01:05,220
there are many useful references showed
25
00:01:05,220 --> 00:01:07,200
in this playlist so be sure to check
26
00:01:07,200 --> 00:01:11,840
them out this is one of them in C sharp
27
00:01:13,260 --> 00:01:16,260
all right let's get back to the video so
28
00:01:16,260 --> 00:01:17,880
as shown in the screen this is our
29
00:01:17,880 --> 00:01:19,920
Windows 10 machine this is fully updated
30
00:01:19,920 --> 00:01:22,140
and all of the features and protections
31
00:01:22,140 --> 00:01:23,820
are turned on and also there are no
32
00:01:23,820 --> 00:01:26,159
exclusions configured this will be our
33
00:01:26,159 --> 00:01:28,259
Target Windows 10 machine that we will
34
00:01:28,259 --> 00:01:31,500
be testing our payload on the very first
35
00:01:31,500 --> 00:01:33,840
project is just a simple loader which
36
00:01:33,840 --> 00:01:35,939
will execute Shell Code into memory
37
00:01:35,939 --> 00:01:38,939
directly so this is very typical it uses
38
00:01:38,939 --> 00:01:41,100
virtual a lot to allocate some memory
39
00:01:41,100 --> 00:01:43,079
and then it will move the Shell Code
40
00:01:43,079 --> 00:01:45,360
into the memory following which it will
41
00:01:45,360 --> 00:01:47,640
use Virtual protect to change the memory
42
00:01:47,640 --> 00:01:49,740
permissions to execute and read
43
00:01:49,740 --> 00:01:51,780
initially it is only read and write
44
00:01:51,780 --> 00:01:53,700
because you only need to move the Shell
45
00:01:53,700 --> 00:01:55,680
Code into the memory space but since we
46
00:01:55,680 --> 00:01:57,180
are going to execute the shell code is
47
00:01:57,180 --> 00:01:58,860
necessary to change the permission to
48
00:01:58,860 --> 00:02:01,020
allow execution and subsequently the
49
00:02:01,020 --> 00:02:02,759
Shell Code in the memory will then be
50
00:02:02,759 --> 00:02:04,860
executed this is the standard process
51
00:02:04,860 --> 00:02:06,840
injection technique so let's copy the
52
00:02:06,840 --> 00:02:08,759
code and paste it over to our Kali
53
00:02:08,759 --> 00:02:09,620
machine
54
00:02:09,620 --> 00:02:13,719
[Music]
55
00:02:13,879 --> 00:02:17,340
let's generate a TCP reverse shell using
56
00:02:17,340 --> 00:02:19,319
msf Venom
57
00:02:19,319 --> 00:02:21,480
so this is the byte array that is
58
00:02:21,480 --> 00:02:23,520
generated and we will need to paste it
59
00:02:23,520 --> 00:02:26,900
over into the source code
60
00:02:31,020 --> 00:02:33,180
we will need to change the name of the
61
00:02:33,180 --> 00:02:35,280
variable as well to match the remaining
62
00:02:35,280 --> 00:02:37,319
of the source code so let's change it to
63
00:02:37,319 --> 00:02:39,860
payload
64
00:02:41,720 --> 00:02:44,060
[Music]
65
00:02:44,060 --> 00:02:46,620
we are going to compile the C plus plus
66
00:02:46,620 --> 00:02:48,900
code on our Kali machine it will be
67
00:02:48,900 --> 00:02:51,420
cross compilation and we can use the
68
00:02:51,420 --> 00:02:54,239
Ming W compiler to do so we will need to
69
00:02:54,239 --> 00:02:57,180
change the windows W from Capital to
70
00:02:57,180 --> 00:02:59,220
small letter and this should fix the
71
00:02:59,220 --> 00:03:01,580
error
72
00:03:03,000 --> 00:03:05,940
awesome now we have the exe payload file
73
00:03:05,940 --> 00:03:07,860
let's transfer it over to our Windows 10
74
00:03:07,860 --> 00:03:10,260
machine and see if it works this should
75
00:03:10,260 --> 00:03:12,120
definitely trigger a detection because
76
00:03:12,120 --> 00:03:14,459
there is a raw Shell Code in the source
77
00:03:14,459 --> 00:03:16,680
code itself as expected Windows Defender
78
00:03:16,680 --> 00:03:19,940
was able to pick it up
79
00:03:21,420 --> 00:03:23,700
let's hop over to our Kali machine and
80
00:03:23,700 --> 00:03:25,739
modify the code let's clear out the
81
00:03:25,739 --> 00:03:27,120
payload and set it to something
82
00:03:27,120 --> 00:03:30,019
non-malicious
83
00:03:30,599 --> 00:03:34,640
let's recompile the source code again
84
00:03:39,720 --> 00:03:41,760
foreign
85
00:03:41,760 --> 00:03:43,680
as shown in the screen there is no
86
00:03:43,680 --> 00:03:45,540
detection now what this means is that
87
00:03:45,540 --> 00:03:47,400
the process injection technique used in
88
00:03:47,400 --> 00:03:49,560
the source code is fine it is not
89
00:03:49,560 --> 00:03:51,840
detected by Microsoft Defender however
90
00:03:51,840 --> 00:03:54,599
the msf Venom generated payload is being
91
00:03:54,599 --> 00:03:56,519
detected
92
00:03:56,519 --> 00:03:58,739
let's remove the get Char function so
93
00:03:58,739 --> 00:04:02,599
that it will not wait for user input
94
00:04:03,900 --> 00:04:05,879
let's try and recompile it again and
95
00:04:05,879 --> 00:04:09,620
transfer it to our Windows 10 machine
96
00:04:09,720 --> 00:04:12,180
okay so it works we are able to transfer
97
00:04:12,180 --> 00:04:14,159
the file and execute the file so the
98
00:04:14,159 --> 00:04:16,079
technique used for the process injection
99
00:04:16,079 --> 00:04:18,120
is definitely okay it's just that the
100
00:04:18,120 --> 00:04:20,100
payload is being detected now let's take
101
00:04:20,100 --> 00:04:21,900
a look at another project available in
102
00:04:21,900 --> 00:04:23,280
this GitHub project there is this
103
00:04:23,280 --> 00:04:26,040
founder shellcode.cpp and basically what
104
00:04:26,040 --> 00:04:28,199
this does is to create a Windows socket
105
00:04:28,199 --> 00:04:30,300
and it will fetch a payload remotely
106
00:04:30,300 --> 00:04:33,000
from a HTTP server instead of having the
107
00:04:33,000 --> 00:04:34,860
payload hard coded into the source code
108
00:04:34,860 --> 00:04:37,320
of the program since we already have a
109
00:04:37,320 --> 00:04:39,419
working process injection technique from
110
00:04:39,419 --> 00:04:41,400
the simple loader source code we will
111
00:04:41,400 --> 00:04:43,500
only need the function that will help us
112
00:04:43,500 --> 00:04:45,780
download the payload file remotely from
113
00:04:45,780 --> 00:04:48,000
a server so this is the Get Shell Code
114
00:04:48,000 --> 00:04:49,979
run function let's copy the Get Shell
115
00:04:49,979 --> 00:04:51,900
Code run function and place it into our
116
00:04:51,900 --> 00:04:54,740
source code file
117
00:04:58,440 --> 00:05:00,320
foreign
118
00:05:00,320 --> 00:05:03,910
[Music]
119
00:05:06,600 --> 00:05:09,000
we will also need to include all of the
120
00:05:09,000 --> 00:05:11,460
necessary header files as well as the
121
00:05:11,460 --> 00:05:13,320
libraries let's copy and paste all the
122
00:05:13,320 --> 00:05:16,940
necessary lines into our code
123
00:05:19,919 --> 00:05:21,840
we will also need to copy the main
124
00:05:21,840 --> 00:05:23,580
function so the main function will
125
00:05:23,580 --> 00:05:25,440
execute the Get Shell Code run function
126
00:05:25,440 --> 00:05:27,840
and our original main function we will
127
00:05:27,840 --> 00:05:29,940
need to copy all of it and paste it into
128
00:05:29,940 --> 00:05:32,039
the part whereby it will execute the
129
00:05:32,039 --> 00:05:34,520
Shell Code
130
00:05:35,940 --> 00:05:37,919
so this is the Run Shell Code function
131
00:05:37,919 --> 00:05:39,419
we don't need this run Shell Code
132
00:05:39,419 --> 00:05:41,100
function we will use our original
133
00:05:41,100 --> 00:05:43,440
process injection technique that we have
134
00:05:43,440 --> 00:05:45,539
verified that is not detected by Windows
135
00:05:45,539 --> 00:05:47,400
Defender let's replace the Run Shell
136
00:05:47,400 --> 00:05:49,080
Code function with our own process
137
00:05:49,080 --> 00:05:52,680
injection technique instead
138
00:05:52,680 --> 00:05:55,199
so the receive buffer is our payload
139
00:05:55,199 --> 00:05:57,300
variable let's change all of our payload
140
00:05:57,300 --> 00:05:59,460
variable to match the receive buffer
141
00:05:59,460 --> 00:06:01,320
variable name what this means is that
142
00:06:01,320 --> 00:06:03,780
our program now will fetch the payload
143
00:06:03,780 --> 00:06:06,060
remotely from a HTTP server directly
144
00:06:06,060 --> 00:06:08,280
into memory and execute it instead of
145
00:06:08,280 --> 00:06:10,740
having the payload as a byte array in
146
00:06:10,740 --> 00:06:13,080
the source code file directly let's give
147
00:06:13,080 --> 00:06:15,560
it a try
148
00:06:15,600 --> 00:06:17,759
it seems that we are missing the default
149
00:06:17,759 --> 00:06:20,160
buff length definition we should be able
150
00:06:20,160 --> 00:06:22,380
to fix this error by including it let's
151
00:06:22,380 --> 00:06:24,860
do that
152
00:06:29,220 --> 00:06:32,780
let's check out this error
153
00:06:33,240 --> 00:06:34,680
it seems that we are missing some
154
00:06:34,680 --> 00:06:37,319
compilation Flex to include the socket
155
00:06:37,319 --> 00:06:40,500
Library into the program let's do that
156
00:06:40,500 --> 00:06:42,900
all right we managed to fix the error
157
00:06:42,900 --> 00:06:44,940
there are only warnings now which we can
158
00:06:44,940 --> 00:06:47,900
just disregard
159
00:06:48,360 --> 00:06:51,240
we are able to generate our template.exe
160
00:06:51,240 --> 00:06:53,759
payload file now let's transfer it over
161
00:06:53,759 --> 00:06:55,919
to our Windows machine and see if it
162
00:06:55,919 --> 00:06:58,020
works as shown in the screen there is no
163
00:06:58,020 --> 00:07:00,240
detection from Windows Defender we are
164
00:07:00,240 --> 00:07:02,039
able to execute the template payload
165
00:07:02,039 --> 00:07:03,479
file as well
166
00:07:03,479 --> 00:07:06,479
now let's generate our payload file we
167
00:07:06,479 --> 00:07:07,979
will need to Output our payload
168
00:07:07,979 --> 00:07:10,800
generator by msf Venom into a file let's
169
00:07:10,800 --> 00:07:13,319
name it beacon.bin let's set up the
170
00:07:13,319 --> 00:07:16,560
listener on Port 8443
171
00:07:16,560 --> 00:07:19,020
we will also need to set up a web server
172
00:07:19,020 --> 00:07:21,419
so that our template payload file can
173
00:07:21,419 --> 00:07:23,520
download the beacon.bin payload file
174
00:07:23,520 --> 00:07:25,800
from the web server we can do it with
175
00:07:25,800 --> 00:07:27,780
python
176
00:07:27,780 --> 00:07:30,120
let's execute it we will need to specify
177
00:07:30,120 --> 00:07:32,580
the web server Port which is 8 000 as
178
00:07:32,580 --> 00:07:34,259
well as the name of the payload file
179
00:07:34,259 --> 00:07:37,120
which is beacon.bin
180
00:07:37,120 --> 00:07:40,610
[Music]
181
00:07:40,919 --> 00:07:42,840
as shown in the screen we are able to
182
00:07:42,840 --> 00:07:44,819
successfully get a reverse shell with
183
00:07:44,819 --> 00:07:47,039
Windows Defender all turned on this is
184
00:07:47,039 --> 00:07:49,080
pretty impressive we are able to bypass
185
00:07:49,080 --> 00:07:51,060
Windows Defender by making use of
186
00:07:51,060 --> 00:07:52,979
publicly available source code and
187
00:07:52,979 --> 00:07:56,160
mixing it together oh no after executing
188
00:07:56,160 --> 00:07:57,960
some commands it seems that Windows
189
00:07:57,960 --> 00:08:00,000
Defender is able to pick it up this is
190
00:08:00,000 --> 00:08:02,220
very likely because we are using a
191
00:08:02,220 --> 00:08:04,500
reverse TCP Shell Code instead of a
192
00:08:04,500 --> 00:08:07,319
encrypted https payload we can try and
193
00:08:07,319 --> 00:08:10,199
bypass this detection by making use of
194
00:08:10,199 --> 00:08:12,720
https payload instead this means that
195
00:08:12,720 --> 00:08:15,000
the traffic sent and received by the
196
00:08:15,000 --> 00:08:17,160
reverse shell will be encrypted Instead
197
00:08:17,160 --> 00:08:19,020
This Will very likely help to bypass
198
00:08:19,020 --> 00:08:21,120
Windows Defender let's try and do that
199
00:08:21,120 --> 00:08:23,699
we can generate a https encrypted
200
00:08:23,699 --> 00:08:27,660
payload file with msf Venom
201
00:08:27,660 --> 00:08:30,539
let's execute msf console and set the
202
00:08:30,539 --> 00:08:33,539
payload to the metaprita https encrypted
203
00:08:33,539 --> 00:08:36,200
payload Channel
204
00:08:36,599 --> 00:08:38,760
as shown in the advanced option we
205
00:08:38,760 --> 00:08:40,919
should be able to set our Handler SSL
206
00:08:40,919 --> 00:08:43,500
set to something custom one problem with
207
00:08:43,500 --> 00:08:45,779
using the metabritter reverse https
208
00:08:45,779 --> 00:08:48,420
payload is that the default Metasploit
209
00:08:48,420 --> 00:08:50,640
web server that is started by this
210
00:08:50,640 --> 00:08:53,399
payload is heavily signatured by Windows
211
00:08:53,399 --> 00:08:55,680
Defender one way that we can bypass this
212
00:08:55,680 --> 00:08:57,860
detection is to create our own
213
00:08:57,860 --> 00:09:00,959
self-signed SSL certificate and use that
214
00:09:00,959 --> 00:09:03,420
instead of the default Metasploit SSL
215
00:09:03,420 --> 00:09:04,740
certificate it should be quite
216
00:09:04,740 --> 00:09:07,080
straightforward to create our own SSL
217
00:09:07,080 --> 00:09:09,300
certificate we are able to create our
218
00:09:09,300 --> 00:09:13,260
own tem SSL certificate now let's set
219
00:09:13,260 --> 00:09:16,080
our metabritter payload to use our own
220
00:09:16,080 --> 00:09:18,600
self-created certificate instead of the
221
00:09:18,600 --> 00:09:20,220
default methods plot in one this should
222
00:09:20,220 --> 00:09:22,500
be able to help us bypass detection we
223
00:09:22,500 --> 00:09:24,779
will also need to set the Stager to
224
00:09:24,779 --> 00:09:27,600
verify the SSL certificate we can set it
225
00:09:27,600 --> 00:09:29,910
to true
226
00:09:29,910 --> 00:09:32,100
[Music]
227
00:09:32,100 --> 00:09:35,040
we are now using our own self-signed
228
00:09:35,040 --> 00:09:37,740
self-created SSL certificate instead of
229
00:09:37,740 --> 00:09:39,660
the default Metasploit certificate when
230
00:09:39,660 --> 00:09:41,820
we are generating the payload with msf
231
00:09:41,820 --> 00:09:43,860
Venom we will also need to specify the
232
00:09:43,860 --> 00:09:46,740
Handler SSL cert option as well as the
233
00:09:46,740 --> 00:09:51,019
Stager verified SSL set option
234
00:09:53,760 --> 00:09:55,920
we will need to make some changes to our
235
00:09:55,920 --> 00:09:58,260
source code and recompile it so that the
236
00:09:58,260 --> 00:09:59,940
check sum of the file will be different
237
00:09:59,940 --> 00:10:02,220
since Microsoft Windows Defender was
238
00:10:02,220 --> 00:10:04,620
able to pick it up previously alright
239
00:10:04,620 --> 00:10:08,000
now let's recompile it
240
00:10:14,760 --> 00:10:16,920
let's transfer the template exe file
241
00:10:16,920 --> 00:10:19,510
over to our Windows machine
242
00:10:19,510 --> 00:10:21,240
[Music]
243
00:10:21,240 --> 00:10:23,220
now let's try and execute our meta
244
00:10:23,220 --> 00:10:27,560
printer reverse https payload file
245
00:10:32,700 --> 00:10:35,459
weird that didn't work oh no there is a
246
00:10:35,459 --> 00:10:38,339
typo it should be Port 8000 instead of
247
00:10:38,339 --> 00:10:41,459
8443 because that is where our python
248
00:10:41,459 --> 00:10:43,500
web server is running hosting the
249
00:10:43,500 --> 00:10:46,260
beacon.bin payload file let's execute it
250
00:10:46,260 --> 00:10:48,440
again
251
00:10:49,200 --> 00:10:51,360
awesome we are able to get a working
252
00:10:51,360 --> 00:10:54,060
metaprita reverse shell this is great as
253
00:10:54,060 --> 00:10:55,680
shown in the screen there is no
254
00:10:55,680 --> 00:10:58,260
detection on our Windows Defender we are
255
00:10:58,260 --> 00:11:00,240
also able to perform a quick scan to
256
00:11:00,240 --> 00:11:02,220
verify that it is indeed bypassing
257
00:11:02,220 --> 00:11:05,959
Windows Defender completely
258
00:11:06,060 --> 00:11:08,700
now the moment of truth let's execute
259
00:11:08,700 --> 00:11:10,770
some commands to see if it works
260
00:11:10,770 --> 00:11:12,540
[Music]
261
00:11:12,540 --> 00:11:15,000
awesome we are able to execute the get
262
00:11:15,000 --> 00:11:17,459
uid command and we can see that this is
263
00:11:17,459 --> 00:11:19,500
indeed a functional metabritter reverse
264
00:11:19,500 --> 00:11:21,360
shell this is great let's hop over to
265
00:11:21,360 --> 00:11:23,279
our Windows 10 machine
266
00:11:23,279 --> 00:11:25,260
there is still no detections and no
267
00:11:25,260 --> 00:11:27,240
alerts we have successfully bypassed
268
00:11:27,240 --> 00:11:29,579
Windows Defender obtaining a metabritter
269
00:11:29,579 --> 00:11:32,519
reverse shell this is possible by using
270
00:11:32,519 --> 00:11:35,459
publicly available references as well as
271
00:11:35,459 --> 00:11:37,980
creating our own self-signed SSL
272
00:11:37,980 --> 00:11:40,019
certificate used by the metabrita
273
00:11:40,019 --> 00:11:42,720
reverse https payload all of the
274
00:11:42,720 --> 00:11:45,120
references used in this video will be
275
00:11:45,120 --> 00:11:47,399
provided in the video's description so
276
00:11:47,399 --> 00:11:49,380
be sure to check it out it is highly
277
00:11:49,380 --> 00:11:51,360
recommended to go through the references
278
00:11:51,360 --> 00:11:53,399
you should be able to build your own
279
00:11:53,399 --> 00:11:56,579
custom bypass by mixing the files and
280
00:11:56,579 --> 00:11:58,740
maybe even creating your own function
281
00:11:58,740 --> 00:12:00,660
within the source code I hope you all
282
00:12:00,660 --> 00:12:02,880
have enjoyed the video please help to
283
00:12:02,880 --> 00:12:04,500
like the video and subscribe to the
284
00:12:04,500 --> 00:12:06,360
channel it will really help out the
285
00:12:06,360 --> 00:12:08,579
channel a lot thanks all I will see you
286
00:12:08,579 --> 00:12:12,440
all soon in the next video bye19919
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.