Bypassing_AV_EDR_part-2_118
Bypassing_AV_EDR_part-2_118
John 8:32
3
Now, let’s jump to practical. We will use the same malware code we created in Part 1 of this serie-
s.
But before we deal with this code, I will create another Batch file “named “hc.bat” with code
“start powershell.exe” to explain obfuscation to you clearly.
6
As you might already know, executing this Batch file opens a PowerShell window as shown below
7
Now, let’s try obfuscating this payload. The method of obfuscation I am going to show you has
been used by popular malware known as SeroXen RAT in its BATcloak engine to make itself
FUD (Fully UnDetectable) in 2023.
Do you know Batch Script has variables? Let’s set some variables using the “set” command in
Batch. Here it is. I set values “start” and “powershell.exe” to variables “a” and “b” respectively.
We can call this variable by enclosing them in “percentile” sign after setting the variables. I save
and execute it.
The result is same. It opens a PowerShell window as shown in above image. But the code can be
easily understood. Let’s obfuscate it further.
Malware authors usually use a combination of encryption and obfuscation techniques
to create a Fully UnDetectable payload.
8
Well, as you can see, the detection rate is now zero. Before obfuscation, its detection rate was
17/58.
Here it is. A completely Fully UnDetectable (FUD) payload. Now, let’s have a look at our encrypt
-ed payloads we created in Part 1 of this series. Here is Xen_FUD_payload.ps1.
The purpose of Obfuscation is to make the code of a program difficult to understand
or detect by both humans and computers without making any
changes to how the program works. It intends to
hide the presence of malicious intention
completely.
11
12
USEFUL RESOURCES
https://haveibeenpwned.com