<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ads on Woolnough</title>
    <link>http://woolnough.com.au/tags/ads/</link>
    <description>Recent content in Ads on Woolnough</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>Copyright (c) 2015, Matthew Woolnough; all rights reserved.</copyright>
    <lastBuildDate>Sat, 01 Feb 2014 00:00:00 +0000</lastBuildDate>
    <atom:link href="http://woolnough.com.au/tags/ads/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Unblocking DLLs</title>
      <link>http://woolnough.com.au/code/unblock-dlls/</link>
      <pubDate>Sat, 01 Feb 2014 00:00:00 +0000</pubDate>
      
      <guid>http://woolnough.com.au/code/unblock-dlls/</guid>
      <description>&lt;p&gt;NTFS Alternate Data Streams (ADS) provides the mechanism for MS to block the execution of DLLs.  This is a security mechanism that was first introduced in XP SP2 &amp;amp; Windows 2003 SP1. More info &lt;a href=&#34;http://community.bartdesmet.net/blogs/bart/archive/2005/08/19/3485.aspx&#34;&gt;here&lt;/a&gt;.
Alternate data streams is also a popular way for hackers to &lt;a href=&#34;http://www.irongeek.com/i.php?page=security/altds&#34;&gt;hide files from administrators&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The typical method used to remove the offending ADS, is by right clicking the DLL selecting properties and then clicking Unblock.
This can become tedious if there are a lot of DLLs to unblock, or if it needs to be done frequently.&lt;/p&gt;

&lt;p&gt;One well known method of removing ADS requires a binary called &lt;a href=&#34;http://technet.microsoft.com/en-au/sysinternals/bb897440.aspx&#34;&gt;streams.exe&lt;/a&gt; by Sysinternals&lt;/p&gt;

&lt;p&gt;&lt;code&gt;streams.exe -s -d  &amp;quot;*.*&amp;quot;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The new scriptomatic way of removing this ADS became available with PowerShell v3.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Get-ChildItem *.* | ForEach-Object { Remove-Item $_ -Stream Zone.Identifier }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will throw an error similar to below if there is no ADS, but this is to be expected.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Remove-Item : Could not open the alternate data stream &#39;Zone.Identifier&#39; of the file c:\somedir\file.dll&lt;/code&gt;&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>