<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx</link><description>I don't know why it's there but it doesn't work.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6762205</link><pubDate>Thu, 13 Dec 2007 18:28:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6762205</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Sounds like The Daily WTF material. &amp;nbsp;Seriously, is there even one legitimate use for this?&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6762450</link><pubDate>Thu, 13 Dec 2007 18:58:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6762450</guid><dc:creator>Stefan Kuhr</dc:creator><description>&lt;p&gt;John: Using this registry value it is very easy to automatically inject your code into lots of processes on the user's desktop (virtually all that load user32.dll). Otherwise you would need a separate process that injects DLLs into users' processes. So at least there is a use case for this registry value.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6762963</link><pubDate>Thu, 13 Dec 2007 19:48:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6762963</guid><dc:creator>cmov</dc:creator><description>&lt;p&gt;Since the KB article says &amp;quot;The AppInit_DLLs value is found in the following registry key: HKEY_LOCAL_MACHINE\...&amp;quot; and even explicitly states &amp;quot;Typically, only the Administrators group and the LocalSystem account have write access to the key that contains the AppInit_DLLs value.&amp;quot;, the malware argument is moot. There are worse things a program can do when it's run with such privileges.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6763333</link><pubDate>Thu, 13 Dec 2007 20:37:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6763333</guid><dc:creator>DriverDude</dc:creator><description>&lt;p&gt;&amp;quot;Typically, only the Administrators group and the LocalSystem account have write access to the key that contains the AppInit_DLLs value.&amp;quot;, the malware argument is moot.&amp;quot;&lt;/p&gt;
&lt;p&gt;That would be the case if users didn't run with admin privs all the time (pre-Vista) and vendors did their part writing software to runs with minimal privs.&lt;/p&gt;
&lt;p&gt;Vista's UAC is annoying but if it forces developers to think seperation of privs, then all the better.&lt;/p&gt;
&lt;p&gt;Actually, this ranks up there as a pretty sneaky attack, at least when it was discovered. Do spyware scanners check this now?&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6763413</link><pubDate>Thu, 13 Dec 2007 20:44:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6763413</guid><dc:creator>mikeb</dc:creator><description>&lt;p&gt;&amp;gt;&amp;gt; That would be the case if users didn't run with admin privs all the time (pre-Vista) and vendors did their part writing software to runs with minimal privs.&lt;/p&gt;
&lt;p&gt;What cmov is saying is that in that case you don't need AppInit_DLLs to perform an exploit - why not just install a service or a device driver? &amp;nbsp;It's just another example of Raymond's &amp;quot;It rather involved being on the other side of this airtight hatchway&amp;quot; set of 'exploits'.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6763604</link><pubDate>Thu, 13 Dec 2007 21:01:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6763604</guid><dc:creator>Ben Hutchings</dc:creator><description>&lt;p&gt;It's like the ELF dynamic linker's LD_PRELOAD, only implemented in the wrong place. LD_PRELOAD may be used for good or evil, but it can be made reliable (in so far as injection of code into another process can be).&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6763918</link><pubDate>Thu, 13 Dec 2007 21:40:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6763918</guid><dc:creator>Doug</dc:creator><description>&lt;p&gt;This just extends the insanity that can happen in DllInit functions. &amp;nbsp;I don't know why it wasn't just removed, rather than limited. &amp;nbsp;The above mentioned &amp;quot;use case&amp;quot; is not a strong enough reason to allow this.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6764619</link><pubDate>Thu, 13 Dec 2007 23:23:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6764619</guid><dc:creator>Mike Dimmick</dc:creator><description>&lt;p&gt;I recently discovered that some shovelware shipped with my Dell laptop uses AppInit_DLLs to hook itself into the file APIs. See my blog entry &amp;quot;Calling out EMBASSY Trust Suite&amp;quot; at &lt;a rel="nofollow" target="_new" href="http://mikedimmick.blogspot.com/2007/12/calling-out-embassy-trust-suite.html"&gt;http://mikedimmick.blogspot.com/2007/12/calling-out-embassy-trust-suite.html&lt;/a&gt;, with apologies for the bad language.&lt;/p&gt;</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6764693</link><pubDate>Thu, 13 Dec 2007 23:34:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6764693</guid><dc:creator>GreaseMonkey</dc:creator><description>&lt;P&gt;The moral of the story: make sure that your team doesn't add stupid crap without checking first.&lt;/P&gt;
&lt;DIV class=post&gt;[&lt;I&gt;That's not particularly helpful advice since nobody considers what they're doing to be "stupid crap". -Raymond&lt;/I&gt;]&lt;/DIV&gt;</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6764809</link><pubDate>Thu, 13 Dec 2007 23:51:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6764809</guid><dc:creator>poochner</dc:creator><description>&lt;p&gt;Nobody may consider what they're doing &amp;quot;stupid crap,&amp;quot; but adding features to Windows NT that don't support long file names should have raised an eyebrow or two.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6764879</link><pubDate>Fri, 14 Dec 2007 00:00:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6764879</guid><dc:creator>John</dc:creator><description>&lt;p&gt;&amp;gt; The moral of the story: make sure that your team doesn't add stupid crap without checking first.&lt;/p&gt;
&lt;p&gt;&amp;gt; [That's not particularly helpful advice since nobody considers what they're doing to be &amp;quot;stupid crap&amp;quot;. -Raymond]&lt;/p&gt;
&lt;p&gt;Actually, it's quite easy. &amp;nbsp;Just ask Raymond. &amp;nbsp;If he says it's stupid crap, the odds are quite good that it's stupid crap. &amp;nbsp;On the other hand, Raymond would probably lose his voice after 15 minutes of telling people how stupid their crap is.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6764925</link><pubDate>Fri, 14 Dec 2007 00:09:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6764925</guid><dc:creator>Triangle</dc:creator><description>&lt;p&gt;&amp;gt; [That's not particularly helpful advice since nobody considers what they're doing to be &amp;quot;stupid crap&amp;quot;. -Raymond]&lt;/p&gt;
&lt;p&gt;That's what peer review was created for.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6765222</link><pubDate>Fri, 14 Dec 2007 00:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6765222</guid><dc:creator>meh</dc:creator><description>&lt;p&gt;Even peer reviews don't include time machines. Trinagle, why are you reading this blog anyway? I've seen nothing but what others would call trolling from you.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6765520</link><pubDate>Fri, 14 Dec 2007 01:36:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6765520</guid><dc:creator>Dean Harding</dc:creator><description>&lt;p&gt;&amp;quot;That's what peer review was created for.&amp;quot;&lt;/p&gt;
&lt;p&gt;Peer reviews do not catch every possible problem.&lt;/p&gt;
&lt;p&gt;I'm sure at the time, the feature WAS peer-reviewed, and the developer who wanted the feature included probably argued vehemently for his (or her) feature, perhaps eventually winning out over the &amp;quot;detractors&amp;quot;.&lt;/p&gt;
&lt;p&gt;With properly constructed DLLs, AppInit_DLLs should work without problems. You just need to craft your DLL *knowing* that it will be included in the AppInit_DLLs registry key, and be very careful about what dependencies you drag in (e.g. kernel32 and nothing else).&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6765538</link><pubDate>Fri, 14 Dec 2007 01:39:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6765538</guid><dc:creator>AJ</dc:creator><description>&lt;p&gt;&amp;quot;Sounds like The Daily WTF material. &amp;nbsp;Seriously, is there even one legitimate use for this?&amp;quot;&lt;/p&gt;
&lt;p&gt;The Wise Installer products (formerly of Wise Solutions, then Altiris, now Symantec) use this to monitor installation processes in-memory to capture machine changes without using the more traditional method of machine snapshots. &amp;nbsp;Whether this is legitimate or not is up for debate. &amp;nbsp;I have found that is causes more problems than anything else, so I would say no.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6765717</link><pubDate>Fri, 14 Dec 2007 02:05:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6765717</guid><dc:creator>Dan</dc:creator><description>&lt;P&gt;&lt;FONT color=red&gt;Program A&lt;/FONT&gt; and &lt;FONT color=red&gt;Program B&lt;/FONT&gt; are the two legitimate programs I know of that use Appinit DLLs. &lt;FONT color=red&gt;Program A&lt;/FONT&gt; probably hooks file operations or something, &lt;FONT color=red&gt;Program B&lt;/FONT&gt; likely uses it to inject a window-painting DLL.&lt;/P&gt;</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6765723</link><pubDate>Fri, 14 Dec 2007 02:07:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6765723</guid><dc:creator>Dan</dc:creator><description>&lt;P&gt;Oh yeah... and I recall once when &lt;FONT color=red&gt;Program B&lt;/FONT&gt;'s DLL, when injected into &lt;FONT color=red&gt;Program A&lt;/FONT&gt;, ate up 2gb memory (which was all I had at the time including swap space) and hung my computer.&lt;/P&gt;
&lt;P&gt;It was probably &lt;FONT color=red&gt;Program B&lt;/FONT&gt;'s fault, but it didn't happen with the next version of &lt;FONT color=red&gt;Program A&lt;/FONT&gt;.&lt;/P&gt;</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6765950</link><pubDate>Fri, 14 Dec 2007 02:38:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6765950</guid><dc:creator>Tyler</dc:creator><description>&lt;p&gt;Injecting code into arbitrary processes that with WriteProcessMemory is hardly safe either, is it?&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6766356</link><pubDate>Fri, 14 Dec 2007 03:36:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6766356</guid><dc:creator>Igor Levicki</dc:creator><description>&lt;p&gt;Tyler, AppInit mechanism automatically injects your DLL in _every_ running process which imports from user32.dll.&lt;/p&gt;
&lt;p&gt;That means if your DLL goes down, whole system goes down with it.&lt;/p&gt;
&lt;p&gt;I really do not see any legitimate uses for this feature. It can be easily emulated by other means anyway so nobody will miss it, especially not the malware writers.&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6768295</link><pubDate>Fri, 14 Dec 2007 10:09:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6768295</guid><dc:creator>poef</dc:creator><description>&lt;P&gt;IIRC, &lt;FONT color=red&gt;Program B&lt;/FONT&gt; adds a DLL which depends on 2 more DLL's of its own. It can totally break common controls, and nags you to return the favor by registering.&lt;/P&gt;</description></item><item><title>It probably made sense at the time</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6768917</link><pubDate>Fri, 14 Dec 2007 12:29:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6768917</guid><dc:creator>Steve Loughran</dc:creator><description>&lt;p&gt;I have to defend the AppInit team here- it probably did help some fancy things like plug-in themed GUIs. Furthermore, they were working in a pre-internet era when malware was kind of hard to get on. So in a scale of design errors where activeX is at 10, Sun's NFS is at 8 (unsecured LAN filesharing), appinit is probably a 5. It doesnt help malware onto the system, just provides a way for it to live.&lt;/p&gt;
&lt;p&gt;but if you want to lock down everything, what about all those CBT hooks?&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6769599</link><pubDate>Fri, 14 Dec 2007 14:48:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6769599</guid><dc:creator>Omega Red</dc:creator><description>&lt;p&gt;You can even nicely BSOD the machine/prevent it from booting using this key:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.openrce.org/blog/view/966/Null_pointer_dereference_in_win32k"&gt;http://www.openrce.org/blog/view/966/Null_pointer_dereference_in_win32k&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6770709</link><pubDate>Fri, 14 Dec 2007 18:54:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6770709</guid><dc:creator>Marc Sherman</dc:creator><description>
&lt;p&gt;"... and typically manifests itself in some DLL crashing trying to use an object (often a critical section) that it is supposed to have initialized in its DLL_PROCESS_ATTACH handler. It crashed because the loader got tricked into initializing DLLs out of order. The dependent DLL received its DLL_PROCESS_ATTACH before the prerequisite DLL."&lt;/p&gt;

&lt;p&gt;As long as your dll is not dependent on any other in the AppInit_DLLs list, it's fine to create synchronization objects such as critical sections in your DllMain and then use them later in the *same* dll.&lt;/p&gt;
&lt;div class="post"&gt;[&lt;i&gt;As noted in the article, the crash was in some other DLL, not in the AppInit DLL. -Raymond&lt;/i&gt;]&lt;/div&gt;</description></item><item><title>re: AppInit_DLLs should be renamed Deadlock_Or_Crash_Randomly_DLLs</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6771208</link><pubDate>Fri, 14 Dec 2007 20:10:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6771208</guid><dc:creator>Michiel</dc:creator><description>&lt;P&gt;I'll have to second &lt;FONT color=red&gt;Mike Dimmick's&lt;/FONT&gt; rant. [&lt;I&gt;Remainder of comment deleted as off topic; feel free to respond to Mike's rant on his blog.&lt;/I&gt;]&lt;/P&gt;</description></item><item><title>FYI&amp;#8230; &amp;laquo; IANAL</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#6785069</link><pubDate>Mon, 17 Dec 2007 02:08:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6785069</guid><dc:creator>FYI… « IANAL</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://ianal.wordpress.com/2007/12/16/fyi/"&gt;http://ianal.wordpress.com/2007/12/16/fyi/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>How it Works:  DLL Injection</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/12/13/6648400.aspx#8626164</link><pubDate>Fri, 20 Jun 2008 21:02:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8626164</guid><dc:creator>Microsoft Advanced Windows Debugging and Troubleshooting</dc:creator><description>&lt;p&gt;Introduction Hi everyone, this is Bob again. I recently worked on an issue where the interaction of two&lt;/p&gt;
</description></item></channel></rss>