Results 1 to 30 of 40

Thread: Gah! Need better anti-bug stuff

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The very model of a modern Moderator Xiahou's Avatar
    Join Date
    Aug 2002
    Location
    in the cloud.
    Posts
    9,007

    Default Re: Gah! Need better anti-bug stuff

    Just avoid backing up executables or configuration files. If you stick to things like documents, photos, ect, you're probably safer. Still- scanning them can't hurt.
    "Don't believe everything you read online."
    -Abraham Lincoln

  2. #2
    Member Member Sevis's Avatar
    Join Date
    Oct 2009
    Location
    Netherlands
    Posts
    165

    Default Re: Gah! Need better anti-bug stuff

    I would suggest getting an Ubuntu live-boot CD, booting from that, then inserting and formatting a USB (with gparted, it's fairly straightforward), before copying over whatever files you want to keep. For scanning, you can use either Avast! or ClamAV, they may even happen to be in the repositories.

    All files with the extensions .jpg, .jpeg, .png, .gif, .mp3, .ogg, .mp4, .wma, .avi and .mkv are safe to copy over without scanning. I am not quite sure about .pdf - probably safe. .doc, .xls and .ppt, as well as any other Office files are possible to infect with various rather nasty scripts - either scan those, or open them in OpenOffice and save as .html (and hope that the translation borks the malware). .exes can generally be assumed to be infected, so I'd advise not taking those at all, even if scans show them as clean.

    EDIT: Oh, and if your computer can run it, go for Win7.
    Last edited by Sevis; 12-06-2009 at 09:43.

  3. #3
    Tree Killer Senior Member Beirut's Avatar
    Join Date
    May 2003
    Location
    Quebec, Canada
    Posts
    8,168

    Default Re: Gah! Need better anti-bug stuff

    Thank you, all.
    Unto each good man a good dog

  4. #4

    Default Re: Gah! Need better anti-bug stuff

    Quote Originally Posted by Sevis View Post
    All files with the extensions .jpg, .jpeg, .png, .gif, .mp3, .ogg, .mp4, .wma, .avi and .mkv are safe to copy over without scanning. I am not quite sure about .pdf - probably safe. .doc, .xls and .ppt, as well as any other Office files are possible to infect with various rather nasty scripts - either scan those, or open them in OpenOffice and save as .html (and hope that the translation borks the malware). .exes can generally be assumed to be infected, so I'd advise not taking those at all, even if scans show them as clean.
    I do not know where you got that idea from. But in short: it is wrong. First of all: many of those are container formats (thus: containing fairly arbitrary data by design). Secondly some of these formats (e.g. GIF) are actually a relatively well-known attack factor: these formats can act as a mask for download scripts for instance.

    But even if the other 2 arguments are not a concern: by design a file on an NTFS partition contains an *arbitrary* amount of *arbitrary* data streams. You can access them socket-style: \\path\to\file:streamId. So it is the easiest thing in the world for a piece of malware to simply attach another, arbitrary data stream to given data.

    This is the actual reason why it would indeed be a bad thing to copy DLL's or EXE files. Not because those file formats themselves are so insecure (indeed, these formats take more data-integrity precautions than most; embedding checksums for instance) but because these formats contain executable code -- which combined with the NTFS idea of a file means that it becomes possible to inject *executable* code in other files. A decent AV kit should check for such attached data streams though.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  5. #5
    Tree Killer Senior Member Beirut's Avatar
    Join Date
    May 2003
    Location
    Quebec, Canada
    Posts
    8,168

    Default Re: Gah! Need better anti-bug stuff

    So what, be it freeware or payware, is the uber-anti-virus/spyware program?
    Unto each good man a good dog

  6. #6
    Headless Senior Member Pannonian's Avatar
    Join Date
    Apr 2005
    Posts
    7,978

    Default Re: Gah! Need better anti-bug stuff

    Out of interest, how does this site look to you?

  7. #7
    Tree Killer Senior Member Beirut's Avatar
    Join Date
    May 2003
    Location
    Quebec, Canada
    Posts
    8,168

    Default Re: Gah! Need better anti-bug stuff

    Quote Originally Posted by Pannonian View Post
    Out of interest, how does this site look to you?
    6 on 6 good.

    At least that's something.
    Unto each good man a good dog

  8. #8
    Member Member Sevis's Avatar
    Join Date
    Oct 2009
    Location
    Netherlands
    Posts
    165

    Default Re: Gah! Need better anti-bug stuff

    Quote Originally Posted by Tellos Athenaios View Post
    I do not know where you got that idea from. But in short: it is wrong. First of all: many of those are container formats (thus: containing fairly arbitrary data by design). Secondly some of these formats (e.g. GIF) are actually a relatively well-known attack factor: these formats can act as a mask for download scripts for instance.

    But even if the other 2 arguments are not a concern: by design a file on an NTFS partition contains an *arbitrary* amount of *arbitrary* data streams. You can access them socket-style: \\path\to\file:streamId. So it is the easiest thing in the world for a piece of malware to simply attach another, arbitrary data stream to given data.

    This is the actual reason why it would indeed be a bad thing to copy DLL's or EXE files. Not because those file formats themselves are so insecure (indeed, these formats take more data-integrity precautions than most; embedding checksums for instance) but because these formats contain executable code -- which combined with the NTFS idea of a file means that it becomes possible to inject *executable* code in other files. A decent AV kit should check for such attached data streams though.
    The fact they are container formats - and thus they are supposed to contain arbitrary data - is a reason to consider them safe. They are not supposed to be executed under any conditions. A viewer that runs any sort of script from a .gif is highly insecure and should not be used, period.

    I didn't know about the NTFS data streams (and I still see very little point in such a function), but what would trigger those streams? Are they opened at the same time as the main file (in which case, they can do as much damage as the file itself - thus, in the case of a .dll or .exe, lots, but none as a plain text), or must they be called separately? And, if they must indeed be called separately, what would call them on a freshly installed system?

    EDIT: And would copying the files over to the tmpfs, before moving them over to a FAT32 not get rid of these streams? Does FAT32 even support them?
    Last edited by Sevis; 12-07-2009 at 09:59.

  9. #9
    Tree Killer Senior Member Beirut's Avatar
    Join Date
    May 2003
    Location
    Quebec, Canada
    Posts
    8,168

    Default Re: Gah! Need better anti-bug stuff

    Sevis,

    Sounds like you have the tech-stuff down cold. What's the best anti-everything setup to have, freeware and/or payware, in your opinion?
    Unto each good man a good dog

  10. #10
    Member Member Sevis's Avatar
    Join Date
    Oct 2009
    Location
    Netherlands
    Posts
    165

    Default Re: Gah! Need better anti-bug stuff

    Beirut,

    That's actually not really my field of specialisation, seeing as I've using things other than Windows for some time now. My general setup whenever I install XP to play games or whatnot is:
    • Avast!
    • Firefox
      • Adblock
      • NoScript
      • CookieSafe
    • No flash


    I am behind a router, which acts as a firewall, and I've not had any viruses with it for quite a while - however, this is with very sane browsing. Whether such a system could hold up to a stress-test is hard to say.

    There is a method that I intend to try out next time I install, which works by "freezing" your files into the state they are, and only allowing the changes you want to actually be saved. For instance, any changes to .exe files can immediately be considered bad - those files just aren't meant to be modified.

  11. #11
    Backordered Member CrossLOPER's Avatar
    Join Date
    Sep 2006
    Location
    Brass heart.
    Posts
    2,414

    Default Re: Gah! Need better anti-bug stuff

    Quote Originally Posted by Sevis View Post
    • Avast!
    • Firefox
      • Adblock
      • NoScript
      • CookieSafe
    • No flash
    Apart from CookieSafe, this is pretty much my set up. No flash is a bit annoying, but it has its uses. I can't imagine why people still use IE, let alone look at me like I'm a freak when I suggest Firefox.
    Last edited by CrossLOPER; 12-07-2009 at 16:32.
    Requesting suggestions for new sig.

    -><- GOGOGO GOGOGO WINLAND WINLAND ALL HAIL TECHNOVIKING!SCHUMACHER!
    Spoiler Alert, click show to read: 
    WHY AM I NOT BEING PAID FOR THIS???

  12. #12

    Default Re: Gah! Need better anti-bug stuff

    Quote Originally Posted by Sevis View Post
    The fact they are container formats - and thus they are supposed to contain arbitrary data - is a reason to consider them safe. They are not supposed to be executed under any conditions. A viewer that runs any sort of script from a .gif is highly insecure and should not be used, period.
    Actually the container formats often do contain arbitrary code (DVD menu's are scripts) or can serve as attack vector for such (MP3's can trigger download of ‘album art’ and such). In fact this is why Microsoft Office documents can be a potential risk: these too are container formats and can play ‘host’ to VB script.

    The problem with the GIF is that it's data format is pretty much the same as an ASCII text file. So is a batch script. Windows trusts that what you download is a GIF file. Perhaps unfounded...

    I didn't know about the NTFS data streams (and I still see very little point in such a function),
    The point probably was/is that you can attach meta data to a file stream. But anyways...

    but what would trigger those streams? Are they opened at the same time as the main file (in which case, they can do as much damage as the file itself - thus, in the case of a .dll or .exe, lots, but none as a plain text), or must they be called separately? And, if they must indeed be called separately, what would call them on a freshly installed system?
    ... As I said the streams can be specifically opened. The problem is not *that* there are streams; but the problem is that by default Windows has a laissez-faire attitude towards what is executable and what is not; which is why the batch script as GIF file trick works in the first place (e.g. try to execute your average GIF file under a Unix environment and you will probably find it complains about not being permitted to execute the file).

    Now about the streams they can be specifically looked up by a program (and modern [decent] AV kit should scan for streams). The reason why DLL files in particular are a danger is that they tend to be loaded early and by ‘trusted’ programs. E.g. your Microsoft Office will load riched.dll (a library for the Office rich text editor), so any malware that wants to load its main (malevolent) payload would simply attempt to inject this into such a DLL file. Now its payload can be effectively obscured because the malware can simply wait until Word, Excel or similar is loaded.

    The ‘classic’ example of this would be the User32.dll file which is loaded during log-on since it contains user-account handling code. Again AV makers learned this lessons the hard way in the early days of NTFS.

    EDIT: And would copying the files over to the tmpfs, before moving them over to a FAT32 not get rid of these streams? Does FAT32 even support them?
    Streams are not supported by FAT32 but you may simply end up with a bunch of files if you try to copy an NTFS file that contains more than just 1 stream: I am not sure, I've never had a reason to try that.

    At any rate we are veering off into the realm of the academical arguments. My point is that you cannot trust a file based on (false) assumptions on the file type.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  13. #13
    Member Member Sevis's Avatar
    Join Date
    Oct 2009
    Location
    Netherlands
    Posts
    165

    Default Re: Gah! Need better anti-bug stuff

    To review my original description:

    Safe:
    • .jpg
    • .jpeg
    • .png
    • .gif
    • .mp3
    • .ogg
    • .mp4
    • .wma
    • .avi
    • .mkv
    • .pdf (?)

    Unsafe:
    • .doc
    • .xls
    • .ppt
    • .exe
    I haven't considered the album-art download script. Whether those can be dangerous is a good question - are they really file-side? I was assuming the player searched using the meta-data available within a trusted resource... MS Office documents, I most certainly agree, should not be copied. As to DVD-menus - I don't remember any of the file types I listed supporting it. WMA and MP4, maybe? Never liked those...

    The problem with the GIF is that it's data format is pretty much the same as an ASCII text file. So is a batch script. Windows trusts that what you download is a GIF file. Perhaps unfounded...
    I'll test this later (giving an executable a .gif extension) - do you perhaps mean the hidden extension "feature" in Explorer? Whoever thought that thing up deserves no compassion.

    The problem is not *that* there are streams; but the problem is that by default Windows has a laissez-faire attitude towards what is executable and what is not;
    The reason why DLL files in particular are a danger is that they tend to be loaded early and by ‘trusted’ programs. E.g. your Microsoft Office will load riched.dll (a library for the Office rich text editor), so any malware that wants to load its main (malevolent) payload would simply attempt to inject this into such a DLL file.
    I didn't mention .dll files due to those being unnecessary for an average user to transfer between computers, but they certainly fall in the same category. However, if I understand this correctly, the injection would have to be in the main file (riched.dll, not riched.dll:malware.dll), making streams irrelevant to that specific case.

    Also, I looked it up, and copying a stream over to a filesystem that does not support it (or generally doing anything with it with a program that is unaware of it) will destroy it.

    At any rate we are veering off into the realm of the academical arguments. My point is that you cannot trust a file based on (false) assumptions on the file type.
    Indeed we have, but I truly am curious how wrong my advice was. To adjust it, Beirut: Make sure that the files you copy contain what you expect them to contain (are valid images, music, etc.) and that their extension really is what you expect it to be. If you're unsure, Linux (and Unix, probably) has a "file" command, which allows you to check what type a file is, detecting it even if the extension is wrong/missing. If you don't mind spending time on it, also check the metadata - I'll check if there's an easy way to do that.

  14. #14
    Tree Killer Senior Member Beirut's Avatar
    Join Date
    May 2003
    Location
    Quebec, Canada
    Posts
    8,168

    Default Re: Gah! Need better anti-bug stuff

    Quote Originally Posted by Sevis View Post
    Indeed we have, but I truly am curious how wrong my advice was. To adjust it, Beirut: Make sure that the files you copy contain what you expect them to contain (are valid images, music, etc.) and that their extension really is what you expect it to be. If you're unsure, Linux (and Unix, probably) has a "file" command, which allows you to check what type a file is, detecting it even if the extension is wrong/missing. If you don't mind spending time on it, also check the metadata - I'll check if there's an easy way to do that.
    Though I am an unqualified genius, I am also a bear of very little brain. The easy way, for me, is always the best way.

    I'll probably have to re-install XP for at least a few months. Don't think I have Win7 cash right now, not with kids and Christmas three-weeks away.

    I guess the best I can do is reload, stuff in as much anti-everything as I can, scan everything I want to put back in and use my router(!), which I have not been using of late, and sure as shoot, "of late" is when this machine got bombed.

    I'm still curious if it's worth paying for a "better" anti-virus or is the free stuff just as good.
    Unto each good man a good dog

  15. #15

    Default Re: Gah! Need better anti-bug stuff

    Quote Originally Posted by Sevis View Post
    I'll test this later (giving an executable a .gif extension) - do you perhaps mean the hidden extension "feature" in Explorer? Whoever thought that thing up deserves no compassion.
    Try this:
    (On a Unix like system, e.g. Linux)
    1. Open GIMP or similar editor. Create a 1x1 px file
    2. Save As GIF (e.g. test.gif)
    3. Include the following comment while exporting:
      ; echo "Hello, $USER: how do you like your GIF?";

    Run as:
    Code:
    sh test.gif 2>/dev/null
    Now imagine doing a similar thing but instead of including POSIX sh compatible code like that; include some DOS code such as
    ; del *.*;
    and naming your file test.gif.bat.

    An unwary user can be easily tricked like that: a legitimate GIF picture can double as host for a malicious payload via this double extension trick; which when opened via explorer (double click) would typically result an inexplicable DOS prompt; a bunch of errors in it and much more room on your hard disk. The reason is shells don't abort scripts on error.

    The real problem is of course that GIF files and other such containers can be used to inject pretty much arbitrary data. And that by design parsers must *ignore* such data if they do not understand it -- this is essentially the deal with forward-compatibility. And that some OS'es *cough* Windows *cough* have no sensible defaults.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO