Geekery

Oct. 3rd, 2002 03:29 pm
lnr: Halloween 2023 (Default)
[personal profile] lnr
Making myself cross-eyed peering at viruses and system filters this afternoon.

Most things with an executable attachment we bounce, in case they're viruses, with a message saying to zip it up and try again if they really wanted to send it. Klez and various other viruses forge the sender though, and we don't want to go round sending bounces to forged senders who will either be confused about it or will just bounce back again. So we want to try and freeze any of them that actually look like Klez. So gradually our system filter turns into not-very-good virus detection software. It really would be better if we could find the manpower to sort out a real one instead.

Anyone who's actually using something with exim already do feel free to let me know what it is and how easy it is to set up :-) I think we investigated something in the past but it fell down because we couldn't get it to send bounces as the error sender, this is before my time though.

Re: exim 3 or 4?

Date: 2002-10-04 03:14 am (UTC)
simont: A picture of me in 2016 (Default)
From: [personal profile] simont
The way I tell they're Windows executables is by examining the magic numbers in the attachment itself:
  • A Windows executable starts with the letters "MZ".
  • At file offset 0x3C there's a little-endian 4-byte number X.
  • At file offset X there are the letters "PE".
These are fundamental properties of the Windows executable file format, incredibly unlikely to be fulfilled by accident by some other type of file. (Well, actually they also match Windows bitmap font files because Windows uses the executable format as a container for those, but that doesn't usually seem to be a problem. If it did start to be a problem I'm fairly sure I could concoct a slightly more elaborate criterion that only fired on files which had at least one code section.)

I don't even try to work out what sorts of executable are safe and what sorts are viruses. That way lies virus checker software, which means you need to update it whenever a new strain comes out, and I haven't got the time :-)

July 2025

S M T W T F S
  12345
678 9101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 31st, 2025 10:16 pm
Powered by Dreamwidth Studios