Blogs

The Case of the Unknown Autostart

  • Comments 25
  • Likes

A few weeks ago I installed an update to a popular Internet Explorer media-player ActiveX control on one of my systems. I knew from past experience that the plugin’s updates always configure an autostart, (an executable configured to automatically launch during boot, login or with another process) that I don’t believe serves any useful purpose, so as I had in the past, I launched Sysinternals Autoruns, set both Verify Code Signatures and Hide Signed Microsoft Entries in the options menu, pressed Refresh, found the autostart and deleted it. However, as I was about to close the window another entry caught my eye and caused my heart to stop:

The entry, IECheck, has all the characteristics of malware: it has no icon, description, or company name, and it’s located in the Windows directory. Further, Autoruns’ Search Online feature, which executes a Web search, yielded no information on the suspicious executable.

I needed to investigate further to determine if the entry was a sign of a malware infection, so I turned to the Sysinternals Strings utility. Image files often contain plain-text strings that contain clues that can connect it with an application. For example, if a program reads configuration information from the registry, the registry path is embedded in the executable and usually includes the name of the vendor or application. Strings scans a file for printable strings (both Unicode and Ascii) and prints them, so my next step was to open a command prompt and dump those in IECheck.exe. Sometimes the output is so verbose that it’s easier to pipe the output to a text file and study the results with Notepad, but this time I spotted some interesting text as it scrolled past:

Sure enough, the executable had string references to other executables that are probably part of the same application, and they revealed the name of the application, IconEdit2, as well the vendor, WinAppsPlanet.  I then remembered that I had just downloaded IconEdit a few days earlier to edit hi-resolution Vista-style icons and so I was able to classify the incident as a false alarm and close the case. My heart returned to its normal rhythm.

This example highlights a few practices that software vendors should follow for reliability and to prevent the confusion I faced.  First is the use of environment variables and Shell special paths instead of hard-coded strings. IECheck (which I presume stands for Icon Editor Check) references the Program Files directory by name, which is only valid on English installations of Windows, so if installed on a foreign system, IECheck would fail to find the executables it looks for. Instead, it should locate the Program Files directory by using the %PROGRAMFILES% environment variable, or call ShGetFolderPath with CSIDL_PROGRAM_FILES for the folder parameter. 

To avoid scaring security-conscious users, all executables should have a version resource with a company name and a description that clearly identifies the executable’s purpose. Further, vendors should obtain a code signing certificate to digitally sign their code.  Windows relies more and more on signature information to help users make trust decisions, and users can leverage tools like Process Explorer, Autoruns, and Sigcheck to verify that executables are what they advertise instead of malware. I’ve contacted the author of IconEdit2 and he’ll be updating his application to follow this guidance. All vendors need to do their part to avoid this kind of needless scare.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • But why does an icon editor need an autostart?  It may not be malware, but it certainly doesn't seem like goodware.

  • I must waste maybe an hour or two each week tracking down unknowns like this. I should be happy, in the end, I suppose, that the conclusion is a legitimate app or process, but usually I'm just pissed that the vendor didn't make their app's presence/purpose more readily discernible on the system

  • And why put it in %windir% in the first place, whats wrong with program files (Maybe they can't handle a space in the path :)

    I hate programs that "know" that their little app is the best thing in the world and therefor you will never use anything else so they help you out by stealing back file exstensions and recreate shortcuts and all that crap

  • "I hate programs that "know" that their little app is the best thing in the world and therefor you will never use anything else so they help you out by stealing back file exstensions and recreate shortcuts and all that crap"  -- quote from ac

    Is that confirmed what this program is doing?  Is it reseting file extensions and icons?  If so, then the programmer needs to consider more then just including some versioning but the proper way to request from the user if they want these changes applied and only request at the launch of their program with a way to disable the feature.  

    I can think of a few other commercial software that misuse the autorun for everything from checking for updates, to the dubious quick launch.

    As always Mr. Russinovich a good read.

  • Amazing. The year is 2007, and people still let random applications silently write to %windir% and silently add things to their autostart lists!

  • "Amazing. The year is 2007, and OPERATING SYSTEMS still let random applications silently write to %windir% and silently add things to their autostart lists!"

    Windows lacks a strong application installation model.

    Windows uses an aggregation rather than a synthesis model. It favors scripting instead of declaration. This is the primary source of configuration decay.

    Effectively the system configuration is the sum of all modifications applied by all install programs. The alternative is a system where registered applications declare their interactions with the system and the system builds the system state. This can even be done per user where appropriate.

    Imagine that Word declared that it only needs to be able to modify .docx files (an oversimplification). The system could then trap modifications to other file types (allowing for the lack of strong file typing).

    Imagine that applications are presented a synthetic view of the file system with only those areas that are appropriate (its own application files, user config, user data areas). The app wouldn't even see operating system file areas it has no business interacting with.

    Now, things like SoftGrid are interesting. In particular, the way they provide a bridge for many older applications by capturing the modifications and virtualizing system interactions. It would be nice if VS produced a SoftGrid package automatically. Perhaps this is the direction we need to move in.

  • > Strings scans a file for printable strings

    > (both Unicode and Ascii)

    Push that on the stack for a moment.

    > references the Program Files directory by

    > name, which is only valid on English

    > installations of Windows, so if installed on

    > a foreign system, IECheck would fail to find

    > the executables

    Now pop the stack.  In principle, if IECheck were installed on either a Japanese system or a foreign system other than US, then Strings would fail to find the strings naming the executables (except if IECheck is compiled in Unicode).

    Strings is freeware and I have no complaint about its limitations.  But if you think about whether you might want to check for strings in a non-US environment, you might want yourself in the future to take the code page into consideration.

    Monday, May 21, 2007 4:38 PM by Grew-Dan Boll

    > people still let random applications silently

    > write to %windir% and silently add things to

    > their autostart lists!

    That's why you have to be administrator in order to install a program.  That's why Vista doesn't even ask the administrator whether or not to elevate the installer; Vista *knows*.

  • Quicktime is another example of this type of app.  it is an immensley overbloated program that dumps files everywhere, adds a key to the RUN key in the registry, sticks icons in the systray that i never asked for, takes over files associations and who knows what else.

    All that to be able to view a fairly minor file type.  When will Apple get it into their head that the .MOV format is not the only format in existence?  They have this same mentality with iTunes, but I don't want to rant about that!

  • PingBack from http://www.andrewhay.ca/archives/126

  • I can understand what you were scared... the IE in IECheck definitely looks suspicious, among all the other things (no version resource, etc...)

    I'm still surprised that people hardcode strings like this.

    Actually, %ProgramFiles% is called "Program Files" on all the languages versions I've been given an occasion to work with (that said, I'm far to pretend I've touched all the localized versions of Windows yet).

    In French, it is called "Program Files" as well, and I think it is the same on dutch systems. So goes for the "Documents and Settings" and "Application Data" folder.

    I guess that Microsoft made this as a countermesure against bad practices of some people.

    Some translated folders include Favorites and mysteriously %CommonFiles% (which is a bit odd  as it is usually a subfolder of %ProgramFiles%...)

    Contrarily, I've seen one or two software who assumed that Program Files was translated in a different language (say, french) and translated "Program Files" to "Fichiers Programmes", which didn't exist because on french systems %ProgramFiles% is "Program Files" too... as a result, things worked, but a needless folder (the localized one) was created only for this program.

    So many difficulties these programmers created for themselves by not properly reading the documentation...

    That said, internationalized paths or not, it would have failed on an english system as well if my system drive was D: and not C: (which happens sometimes when the Windows installer affects a different letter to a partition you thought it would give, but in this case, I restart the whole process as I know so many programs are so poorly designed in that aspect).

    Glad to see you're back in more frequent blogging again, Mark, (it's a bit less advanced than before, but it can't always be call stack-level troubleshooting and is always a good read nevertheless).

    Thanks,

    JC.

  • Well, in German Windows the "Program files" is called "Programme" - which enabled some bad-developed Windows programs to work on German Windows because "Programme" has no blanks.

    The most other shell directories also have different names in German.

    In Windows Vista the Shell folders have English names and there are symbolic links placed to those folders in both English an localized versions - it looks a bit messed up compared to older Windows versions. In addition applications writing to their exe path under Vista get their files redirected to the users Application data, so it is difficult to find out the real storage location for newly created files (even Applications where writing to the own directory is denied can do that under Vista).

    It would be a nice thing to enable the old (Windows 2000) style access mechanism for Vista, so when the Application directory is read-only, the Application fails to write there - ist not nice, but it is safe.

  • Please protest HR 1525 this bill supposedly to prevent spyware looks like it was written by a spyware company. Why do I say this? It prevents people from sueing companies like sony who's infamous rootkit scandal got them sued, by many of the victims. This bill would allow the Government to set a fine (less than the cost of a lawsuit) . Now think about this.. If the government fines sony lets say $10,000.00 or even $100,000.00 thats far less than the law suits that sony had to settle for, this becomes a bill that makes it a cost of doing business for sony, not a risk for spying on customers. This Bill is insidious as it takes the Constitutional rights to seek compensation by the victims of such a crime.  This bill will make it afordable for Sony to violate your privacy and rights. And who benefits? only the Government as it becomes nothing more than a Spyware tax and licence to continue the behavior. This Bill is a scam in itself. It's no surprise it was written by a congresswoman in Silicon Valley, I wonder how much she was paid to write this bill. Let's see who she gets a consulting job from after she leaves Congress.

  • "Actually, %ProgramFiles% is called "Program Files" on all the languages versions I've been given an occasion to work with"

    On my XP system it is "c:\programs", because spaces in paths are _still_ a headache (dunno if this is fixed in Vista). Open a command window and type "start c:\windows" (or winnt or whatever the path is), and you will open an explorer window looking at that directory. In at least XP and earlier, open a command window and type 'start "c:\program files"', and you will open up... another command window. (The problem here is the quotation mark, not the spaces, but that makes the spaces unfixable.)

    As to Mark's original scenario, I run StartupMonitor to catch most cases of programs running needless startup things when it happens, rather than after the fact. Recommended, at least until there's a sysinternals equivalent.

  • 'start "" "C:\program files"' gets you the Explorer window.

    start /? indicates the first quoted param is the "Title to display in  window title bar".

  • The Sysinternals AutoRuns tool is all that is needed to track down this type of questionable program.

    As a Network Administrator, I can run this very small application and uncheck all those programs stealing my resources in less than two minutes.

    If I can suggest anything here, it is to inform users to stop installing software and updates under the "typical" setup. Simply check the "custom" setup and save yourself a lot of time. Adobe, Java and several others will add all sorts of extra programs when using the "typical" setup.

    I think this should be considered hiddenware at the very least! If I wanted the toolbar or other program they are pushing, I would install it!!

    Good thing I have Sysinternals AutoRuns to level the playing field. This app is awesome!!!