exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

txt-rant.txt

txt-rant.txt
Posted Aug 24, 2004
Authored by Geoff Vass

A bit of a rant about how Microsoft and Virus scanners fail to properly pay attention to .txt file extensions and how they can be used by attackers to fall into the background.

tags | paper, virus
systems | windows
SHA-256 | 229dfa0b0c78a9b80ce0ca073eee096c97a84c01ed37e967a28cc0d2f6cc95f2

txt-rant.txt

Change Mirror Download
A while ago I "discovered" that CMD.EXE would launch renamed executables. I
felt that this was a security problem because until fairly recently most
virus scanners would be checking .exe, .com, .pif etc for viruses but would
not bother scanning .txt files, and of course email attachment filtering
would not generally block a .txt file. So I had an email conversation with
the fellas at secure@microsoft.com and they felt it was not a problem and
would not be changing the behaviour.

Coincidentally, shortly after MS issued KB811528 which says that CMD.EXE
looks at the header of the file and because it is an executable, executes it
and that you should only run code from trusted sources (blah blah blah).

I still think they focused too much on the fact that to demonstrate the
issue is basically a user-initiated client-side process, ie, you go to the
command prompt and type "malcode.txt" and malcode will run. And so
everybody thinks a user that does this is an idiot.

But the real issue to my mind is that if you are a hacker and you have
infiltrated a system a great way to hide your malcode would be to rename it
all to .txt or .tmp and launch it when required using "cmd /c malcode.tmp".
Of course you can say, the system has already been compromised and the
hacker could have simply used .exe files. But if you have ever tried to
clean an infected system or look for a possible compromise you know the
first thing you are looking for is funny .exe files. If the files have been
"hidden" by renaming them it is so much harder.

Consider also that tools such as Sysinternals' Autoruns, which now has a
function to show code not signed by Microsoft, would skip over an autorun
entry starting with cmd.exe because cmd.exe is a legitimate part of Windows.

I think it's a problem because we have a section of the operating system
that behaves totally counter-intuitively, considering that every other part
of the operating system looks at the file extension and not the contents. If
you rename an .exe to .txt and double-click, Notepad opens. Yet CMD.EXE
executes it. And now we have this new functionality in the shell which
remembers which zone a file was downloaded from and prompts you according to
its safety level yet CMD.EXE totally ignores it. And this from a company
that went so far as to alter the DLL search order behaviour to block certain
types of DLL spoofing, which is another obscure type of attack that assumes
the malcode is already in your system.

So considering all the tweaking that took place in Windows XP for SP2 it's a
bit peculiar that this obscure and counter-intuitive behaviour has remained
intact.

OK, sure, it's not a vulnerability. It's completely useless until the
malcode gets into your system and the breathless media attention to this
issue has been ill-informed and panicky. But to a hacker it's a useful bit
of misbehaviour that can be handy if you're trying to avoid detection. It
really ought to be "fixed".

Geoff Vass
Australia
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close