Jump to content

.vbs script zero day


Go to solution Solved by Nightowl,

Recommended Posts

  • Most Valued Members

Hello , please check this sample , I sent also from my email

https://www.virustotal.com/gui/file/ce0e2c758444ae6e3be95b83e0f53990e722472e75113d57b18a19cb8e397ca9?nocache=1

 

[TRACK#64EAFA9300F7].

 

EDIT : Support answered.

Edited by Nightowl
Link to comment
Share on other sites

  • Most Valued Members
  • Solution

Solved

image.png

Edited by Nightowl
Link to comment
Share on other sites

  • Most Valued Members

Is there anyway to prevent *.VBS and *.PIF from being downloaded , received from Skype/Whatsapp etc ?

Link to comment
Share on other sites

I don't know about download prevention via Eset. But based on this posting: https://superuser.com/questions/1582309/received-a-possible-malware-vbs-on-skype-and-ran-it , these .vbs scripts are being run via Powershell.

If you are employing Eset recommended anti-ransomware HIPS rules, one of those is to block any script startup from PowerShell. Also, these rules include blocking any child process startup from wscript.exe.

Finally, this SuperUser posting examle might be invoking wscript via PowerShell .Net subassembly capability. That is prevented by setting PowerShell to Constrained Language mode.

As far as restricting what file types can be downloaded by Skype, it would be great if Eset had this feature: https://knowledge.broadcom.com/external/article/158783/prevent-exe-downloads-from-skype-using-a.html .

Edited by itman
Link to comment
Share on other sites

  • Most Valued Members
18 hours ago, itman said:

I don't know about download prevention via Eset. But based on this posting: https://superuser.com/questions/1582309/received-a-possible-malware-vbs-on-skype-and-ran-it , these .vbs scripts are being run via Powershell.

If you are employing Eset recommended anti-ransomware HIPS rules, one of those is to block any script startup from PowerShell. Also, these rules include blocking any child process startup from wscript.exe.

Finally, this SuperUser posting examle might be invoking wscript via PowerShell .Net subassembly capability. That is prevented by setting PowerShell to Constrained Language mode.

As far as restricting what file types can be downloaded by Skype, it would be great if Eset had this feature: https://knowledge.broadcom.com/external/article/158783/prevent-exe-downloads-from-skype-using-a.html .

I will try to do it through Fortinet filters.(hardware firewall)

Thank you bro.

 

 

18 hours ago, itman said:

If you are employing Eset recommended anti-ransomware HIPS rules, one of those is to block any script startup from PowerShell. Also, these rules include blocking any child process startup from wscript.exe.

 

I will try to google for best practices/hardening and take a look

Thanks for suggestions

Should also block Python,Firefox,Chrome,VLC,7zip,rar from running from AppData/TEMP or creating new applications from there like that remcos variant that brought it's vulnerable exes with it

I think in first place , since powershell , cmd is prevented , the next step of the vulnerable exes shouldn't come , but who knows

Anyone have suggestion?

Edited by Nightowl
Link to comment
Share on other sites

Here's something else you can explore; Software Restriction Policies (SRP).

SRP is already preconfigured to block most Windows executable format and additional file extensions can be added as needed. Also PIF extension is already including in the list.

Eset_GP_1.png.3432ee719c82dbb2cdf22a7c82c0d94f.png

Next is these restrictions apply to designated Windows directories. The below screen shot shows I am applying these restrictions to %Temp% directory via disallowing them;

Eset_GP_2.png.854f799a97de73c48660bf5102cce576.png

As to applying the above in regards to your Skype ,vbs issue and for that matter, all other executable code downloads, perform the following.

1. It appears the default download location for Skype is the Downloads directory. Create a new directory/folder to be used for Skype downloads.

2 Change the default Skype download directory to the new directory you created as shown here: https://www.technobezz.com/how-to-change-a-default-download-folder-on-skype/ .

3. Create a new SRP path rule specifying the full path specification for the new directory you created. Set its Security Level to Disallowed.

I assume the same capability to change default download location also exists WhatsApp, etc..

Also, SRP saved my butt when some .cmd script attempted to run at Win logon time; apparently from the registry;

Eset_SRP.png.bf9a4337daa19b21e7f188136ad1879c.png

Of note is I have an Eset HIPS rule to monitor all cmd.exe startuo and it didn't catch this.

Edited by itman
Link to comment
Share on other sites

  • Most Valued Members
11 hours ago, itman said:

Here's something else you can explore; Software Restriction Policies (SRP).

SRP is already preconfigured to block most Windows executable format and additional file extensions can be added as needed. Also PIF extension is already including in the list.

Eset_GP_1.png.3432ee719c82dbb2cdf22a7c82c0d94f.png

Next is these restrictions apply to designated Windows directories. The below screen shot shows I am applying these restrictions to %Temp% directory via disallowing them;

Eset_GP_2.png.854f799a97de73c48660bf5102cce576.png

As to applying the above in regards to your Skype ,vbs issue and for that matter, all other executable code downloads, perform the following.

1. It appears the default download location for Skype is the Downloads directory. Create a new directory/folder to be used for Skype downloads.

2 Change the default Skype download directory to the new directory you created as shown here: https://www.technobezz.com/how-to-change-a-default-download-folder-on-skype/ .

3. Create a new SRP path rule specifying the full path specification for the new directory you created. Set its Security Level to Disallowed.

I assume the same capability to change default download location also exists WhatsApp, etc..

Also, SRP saved my butt when some .cmd script attempted to run at Win logon time; apparently from the registry;

Eset_SRP.png.bf9a4337daa19b21e7f188136ad1879c.png

Of note is I have an Eset HIPS rule to monitor all cmd.exe startuo and it didn't catch this.

I was looking at it yesterday (SRP) , but your explanation is better than what I was reading , I will give this one a try , and apply it to specific folders like Downloads , TEMP etc. and will see what happens

About Downloads location , I bet I can keep it there , I just put the wanted extentions to be blocked

Thank you bro.

Edited by Nightowl
Link to comment
Share on other sites

If you decide to use SRP, I strongly advise you read this article: https://4sysops.com/archives/mitigating-powershell-risks-with-constrained-language-mode/ . In a nutshell, you add PS1 and PSM1 to the list file extensions SRP monitors for.

Many are currently deploying the registry environment variable hack to set PowerShell to Constrained Language. As the article notes, its trivial for a hacker to bypass this hack method.

Link to comment
Share on other sites

  • Most Valued Members
11 hours ago, itman said:

If you decide to use SRP, I strongly advise you read this article: https://4sysops.com/archives/mitigating-powershell-risks-with-constrained-language-mode/ . In a nutshell, you add PS1 and PSM1 to the list file extensions SRP monitors for.

Many are currently deploying the registry environment variable hack to set PowerShell to Constrained Language. As the article notes, its trivial for a hacker to bypass this hack method.

Thanks for your assistance ITMAN

I will check it out.

I wish I had an easier route rather than messing with Microsoft's GPO  :D

Link to comment
Share on other sites

  • 1 month later...
  • Most Valued Members

VBS wıll be dıscontınued by Mıcrosoft due to the risk and due to discontinuing Internet Explorer

Quote

"VBScript is being deprecated. In future releases of Windows, VBScript will be available as a feature on demand before its removal from the operating system,"

I think we will see more and more of Powershell attacks instead of VBS

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...