Author Topic: Technical question about webshield  (Read 5837 times)

0 Members and 1 Guest are viewing this topic.

Offline Tonanet

  • Sr. Member
  • ****
  • Posts: 353
  • I'm a llama!
Technical question about webshield
« on: July 19, 2007, 08:40:16 PM »
Hello avast people.

I was wondering, lets say that you configure webshield to block the download of files with dangerous extensions as : .exe, .scr, .pif, .com, .bat, etc...
If you enter in a site with an exploit to the browser that you are using, and this exploit allows the site to download a file to your computer, without user intervention (i.e download dialog box), will web shield intercept this download? Or the exploits that allows files to be downloaded ignore webshield for some reason?

My bet is that webshield would block it, but no warning would be show... I guess as the exploit would use http connections to download the file, web shield would verify the .exe going throught it and would block it...

Am I right?

Thanks for your time,

Elminster

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89053
  • No support PMs thanks
Re: Technical question about webshield
« Reply #1 on: July 19, 2007, 09:39:48 PM »
I only have *.pif in my URL Blocking section, the wildcard is important as it could appear in a URL string. When I set this up I believe I tested it by using a test file. and you could do the same.

I couldn't get this to work in a test I just did because the test files were just txt files witf a changed file type not a true .pif or .vbs file. I also tried using an .exe file on a file sharing site but that too failed to alert and arrived in my downloads folder. So all I can assume that it didn't come down using http port 80 as it didn't appear on the web shield details of files as they were scanned.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.3.6108 (build 24.3.8975.762) UI 1.0.801/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline Tonanet

  • Sr. Member
  • ****
  • Posts: 353
  • I'm a llama!
Re: Technical question about webshield
« Reply #2 on: July 19, 2007, 09:52:23 PM »
Hello!

Thanks for your answer.

Yes, I set up using *.exe, and from my test I know that it blocked all download attempts, in the traditonal way (click on the download link).
But I couldnt test it against an exploit that auto downloads a exe file to the computer, because I dont know where I can find some site with this exploit, and problaby my system is already patched against the know ones...

Thanks for your time,

Elminster

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89053
  • No support PMs thanks
Re: Technical question about webshield
« Reply #3 on: July 19, 2007, 09:58:49 PM »
No problem, though I wouldn't try testing this using a known exploited site, you might catch cold. But I would have thought it wouldn't matter if it was a user requested download or a background download provided it came through the http port 80 proxy.

Some sites like download.com, snapfiles, majorgeeks, etc. have a link that you click to download a file (which isn't a direct link to the file) to initiate the download, you could try it on one of those with a small program.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.3.6108 (build 24.3.8975.762) UI 1.0.801/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Technical question about webshield
« Reply #4 on: July 20, 2007, 03:42:29 AM »
Yes, I set up using *.exe, and from my test I know that it blocked all download attempts, in the traditonal way (click on the download link).
Yeah... this is how it works... You can use the other rare extensions for a download (.scr, .pif, .com, .bat, etc.).

But I couldnt test it against an exploit that auto downloads a exe file to the computer, because I dont know where I can find some site with this exploit, and problaby my system is already patched against the know ones...
If you find such a site, please, don't post here a live link to it 8)
The best things in life are free.

Offline RejZoR

  • Polymorphic Sheep
  • Serious Graphoman
  • *****
  • Posts: 9406
  • We are supersheep, resistance is futile!
    • RejZoR's Flock of Sheep
Re: Technical question about webshield
« Reply #5 on: July 20, 2007, 10:02:09 AM »
Such URL blocking only works when filename is located in actual URL address (for example http://testvirus.com/virus.pif ). If the URL is called like this (http://testvirus.com/index.php?action=download ) it won't be blocked (ive made up the last one, usually they don't look like this).
Visit my webpage Angry Sheep Blog

Offline lukor

  • Administrator
  • Super Poster
  • ***
  • Posts: 1884
    • AVAST Software
Re: Technical question about webshield
« Reply #6 on: July 20, 2007, 10:47:41 AM »
RejZoR is right, the blocked string must be in the URL, that somewhat limits it's usage. Other methods include checking the actual content - a thats what an antivirus in WebShield does :-)

The download method does not really matters. WebShield does not care if the browser will display the returned blocked page, or if it just blocks the download silently. However, some page is returned - avast! blocked content - and the silent downloader may even consider it to be the downloaded file so the HTML text might actually end up saved somewhere on the disk.

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89053
  • No support PMs thanks
Re: Technical question about webshield
« Reply #7 on: July 20, 2007, 03:13:35 PM »
What confuses me is that the URL Blocker allows for the use of wildcards, * and ? now based on that *.pif or *.exe would surely be a valid string ?

Yet as I said I tested downloading an exe file from rapidshare (small one which I uploaded) and the web shield didn't bat an eyelid, so I can only assume the download somehow evaded the web shield proxy.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.3.6108 (build 24.3.8975.762) UI 1.0.801/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline lukor

  • Administrator
  • Super Poster
  • ***
  • Posts: 1884
    • AVAST Software
Re: Technical question about webshield
« Reply #8 on: July 22, 2007, 09:35:56 AM »
Yet as I said I tested downloading an exe file from rapidshare (small one which I uploaded) and the web shield didn't bat an eyelid, so I can only assume the download somehow evaded the web shield proxy.

Does the url on rapidshare really ends with the extension (.exe in your case). I thought they use some strange ID numbers in URLs. If you have such a case when you think the download skips WebShield, please post it here.

Offline RejZoR

  • Polymorphic Sheep
  • Serious Graphoman
  • *****
  • Posts: 9406
  • We are supersheep, resistance is futile!
    • RejZoR's Flock of Sheep
Re: Technical question about webshield
« Reply #9 on: July 22, 2007, 09:45:13 AM »
It's related to my explanation. Rapidshare doesn't give browser a direct URL with file but rather a redirection.
Web Shield scans it (it's just a regular HTTP transfer), but blocker won't block it based on your extension block rule.
Visit my webpage Angry Sheep Blog

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89053
  • No support PMs thanks
Re: Technical question about webshield
« Reply #10 on: July 22, 2007, 03:35:37 PM »
Yet as I said I tested downloading an exe file from rapidshare (small one which I uploaded) and the web shield didn't bat an eyelid, so I can only assume the download somehow evaded the web shield proxy.

Does the url on rapidshare really ends with the extension (.exe in your case). I thought they use some strange ID numbers in URLs. If you have such a case when you think the download skips WebShield, please post it here.

This is the page that does the redirect/download the file, so I guess the .html invalidates the *.exe wildcard URL, I was hoping that even so the file would be coming down through the web shield proxy as mirror.exe. I monitored the web shield Last scanned: field but mirror.exe didn't feature.
Code: [Select]
http://rapidshare.com/files/44355971/Mirror.exe.html

The above file is just a DOS backup tool that mirrors target and destination files/folders/partitions etc. it requires a batch file to run the mirror commands so in itself it is inert.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.3.6108 (build 24.3.8975.762) UI 1.0.801/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline lukor

  • Administrator
  • Super Poster
  • ***
  • Posts: 1884
    • AVAST Software
Re: Technical question about webshield
« Reply #11 on: July 25, 2007, 11:50:59 AM »
what about this wildcard:

*.exe.* ?

(I must admit, I am not sure if this works or not)

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89053
  • No support PMs thanks
Re: Technical question about webshield
« Reply #12 on: July 25, 2007, 03:48:57 PM »
I don't know, but I wouldn't use that way as the exe.* would be likely to block some security sites that display virus information of files associated with a virus as some use the file_name.exe as the page name with .html tagged on at the end file_name.exe.html and the *.exe.* would assuming it worked trap that as well.

What I'm confused with, when the file arrives on my HDD it is saved as mirror.exe (the file I uploaded), so it must surely come down the pipe associated with that file name, see image. Regardless if that is correct or not, even assuming it wasn't an exe file, it wasn't scanned by the web shield 'at all.'

So this type of download is bypassing the web shield completely and could be a potential entry point for malware using the same delivery method, whilst this isn't serious if you are paying attention firefox asks what action to take. I don't know the inner workings of how rapid share achieves the download, if it doesn't use port 80 or not but the file wasn't scanned by the web shield. Because I was monitoring the web shield details I didn't see if the standard shield scan a newly created file (which I assume it did).
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.3.6108 (build 24.3.8975.762) UI 1.0.801/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security