<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Blog du Tristank</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/tristank/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/tristank/feed.xml</link>
    <description>Migrating to https://blog.tristank.com/ . And still so terrific that 3 of 4 readers rated it &amp;quot;soporific&amp;quot;</description>
    <lastBuildDate>Tue, 18 Jun 2019 12:31:12 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Surface Go: Fonts look a little heavy? Don't forget ClearType tuning!</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/surface-go-fonts-look-heavy-adjust-cleartype</link>
      <pubDate>Thu, 18 Oct 2018 12:35:34 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6285</guid>
      <description><![CDATA[The title kinda says it all.

If you, like me, are the owner of a brand-new Surface Go, but also...]]></description>
      <content:encoded><![CDATA[The title kinda says it all.

If you, like me, are the owner of a brand-new Surface Go, but also own another Surface Pro, you might find that the font weight is a little heavy by default when switching between side-by-side devices.

To fix that, just hit Start, type ClearType (OK, "Clear" is often enough) and run the <em>ClearType text tuner</em>. Then squint and/or answer honestly :)

It's not something everyone needs to do - my Mum doesn't have competing devices on a day-to-day basis - but it's worthwhile to do the "ClearType eye test" for whatever eye-distance at which you actually use your new Surface buddy!

&nbsp;

(This post brought to you by someone that noticed BGR on my RGB display while reading <a href="https://techreport.com/review/34058/the-death-of-windows-media-center-and-the-five-stages-of-htpc-grief">this</a>!) Hint: Ctrl+Win+= zooms in Magnifier, and Ctrl+Win+- zooms out again... No extra software needed...]]></content:encoded>
    </item>
    <item>
      <title>How SLAM retrieves the computer's Local Admin password</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/how-slam-retrieves-the-computer-password</link>
      <pubDate>Tue, 25 Sep 2018 22:26:51 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6275</guid>
      <description><![CDATA[Simple: SLAM doesn't retrieve the computer's Local Admin password - LAPS does!

SLAM is a Premier...]]></description>
      <content:encoded><![CDATA[Simple: <a href="http://download.microsoft.com/download/5/1/6/516F59A7-91EE-4463-8612-C85FD3BEBDC7/pop-securing-lateral-account-movement.pdf"></a><strong><a href="http://download.microsoft.com/download/5/1/6/516F59A7-91EE-4463-8612-C85FD3BEBDC7/pop-securing-lateral-account-movement.pdf">SLAM</a> <em>doesn't</em> retrieve the computer's Local Admin password - <a href="https://www.microsoft.com/en-us/download/details.aspx?id=46899">LAPS</a> does!</strong>

<a href="http://download.microsoft.com/download/5/1/6/516F59A7-91EE-4463-8612-C85FD3BEBDC7/pop-securing-lateral-account-movement.pdf">SLAM</a> is a Premier Operations Program offering (POP) for <a href="http://download.microsoft.com/download/5/1/6/516F59A7-91EE-4463-8612-C85FD3BEBDC7/pop-securing-lateral-account-movement.pdf">Securing Lateral Account Movement</a>. It workshops <a href="https://www.microsoft.com/en-us/download/details.aspx?id=36036">credential theft mitigation</a> (CTM) and counters lateral traversal with logon restrictions and firewall rules (among other protections)... but one key feature is deployment of <a href="https://www.microsoft.com/en-us/download/details.aspx?id=46899">LAPS</a>, the <a href="https://technet.microsoft.com/en-us/mt227395.aspx">Local Admin Password Solution</a>.

So SLAM includes LAPS, and searching for how SLAM does something with passwords might not yield a result. (Hopefully "Until now..."). LAPS is quite well-documented, though, so answers are likely available.

<a href="http://download.microsoft.com/download/5/1/6/516F59A7-91EE-4463-8612-C85FD3BEBDC7/pop-securing-lateral-account-movement.pdf">POP-SLAM</a> has been recently complemented by <a href="https://serviceshub.microsoft.com/blog/2018/03/29/release-announcement-onboarding-accelerator-securing-lateral-account-movement-slam-premium-march-2018/">OA-SLAM</a> (OA = Onboarding Accelerator), which is a more "let's do it all in production"-style Microsoft Services offering.]]></content:encoded>
    </item>
    <item>
      <title>How To (quickly) Tell If You're 5 Years Out Of Date On Security Updates</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/6236securityupdatesilentfailures</link>
      <pubDate>Tue, 12 Sep 2017 12:41:09 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6236</guid>
      <description><![CDATA[There's a fun indicator you can use to quickly evaluate whether you've been missing security updates...]]></description>
      <content:encoded><![CDATA[There's a fun indicator you can use to quickly evaluate whether you've been missing security updates for the last five years (ish) on older Operating Systems (i.e. <strong>Win2008-2008 R2</strong>), and it's the <strong>build number</strong>. Not infallible, but then not often wrong.
<h3>Helpful Table Of Problem Versions</h3>
If you'd rather skip my rambling - and let's face it, you should - here's the list of build number indicators which <em>might mean you have an update problem.</em>
<ul>
 	<li>10.0.14393.<strong>0</strong> - Windows Server 2016 ships with a broken <a href="https://support.microsoft.com/en-au/help/4039473/windows-update-stuck-at-0-percent-on-windows-10-and-windows-server-201?locale=en">servicing stack which can't talk to WSUS</a>. (15 months out of date)</li>
 	<li>6.3.9600.<strong>16xxx</strong> - (18xxx is current) means Windows Server 2012 R2 or Windows 8.1 <strong>without</strong> <a href="https://support.microsoft.com/en-au/help/2919355/windows-rt-8-1--windows-8-1--and-windows-server-2012-r2-update-april-2">2919355</a> applied (~3 years missing updates)</li>
 	<li>7.6.<strong>7600</strong> - Windows Server 2008 R2 or Windows 7 without Service Pack 1 (5 years missing updates)</li>
 	<li>6.2.<strong>6001</strong> - Windows Server 2008 Service Pack 1 (5 years missing updates)</li>
</ul>
By comparison, <strong>good build numbers</strong> (as of Sep 2017) are:
<ul>
 	<li>10.0.14393.<strong>1670</strong> - Win10 or Win 2016 with Sep 2017 CU (anything later than .187 is probably OK)</li>
 	<li>6.3.9600.<strong>18xxx</strong> - Win2012 R2 post-2919355</li>
 	<li>7.6.<strong>7601</strong> - Win2008 R2 SP1 / Win7 SP1</li>
 	<li>6.2.<strong>6002</strong> - Win2008 SP2</li>
</ul>
You can use the WSUS console (yes, even if you're using SCCM, though you probably have cooler methods available) to quickly evaluate build numbers across your fleet.
In a pinch, you can use AD Users and Computers if you're just evaluating the third number in the sequence (i.e. doesn't work for 2919355 or for Windows 2016 boxes).
<h3>Back In The Day, Build Numbers Were Even More Useful</h3>
Very helpfully, the Windows Vista era introduced incremental build numbers for Operating System versions when Service Packs were applied. So when it shipped, <strong>Windows Vista</strong> - which you'll recall came out almost a year ahead of the server equivalent, Windows Server 2008 - shipped with the build number <strong>6000</strong>.

<strong>Windows Server 2008</strong> shipped with "Windows Vista" <strong>Service Pack 1 inbuilt</strong>, as it were, and so Vista SP1 and Windows Server 2008 SP1 (i.e. RTM) have the same build number,<strong> 6001</strong>.

<strong>Service Pack 2</strong> followed, again incrementing the build number for both to <strong>6002</strong>.

For the <strong>Windows 7 era</strong>, things were a bit more straightforward.<strong> Windows 7 and Windows Server 2008 R2</strong> shipped at about the same time, as build<strong> 7600.</strong>

When <strong>Service Pack 1</strong> was released for both, the build number incremented to <strong>7601.</strong>

Quite a few of our Premier Security Assessments pull OS information using WMI from targets, and I sort by the self-reported build number to quickly identify groups of hosts which might not have a Service Pack. It's very, very infrequently wrong. You could equally do the same by whether "Service Pack X" appears in the CSDVersion, but the build number is a nice, straightforward way of identifying this if you're collecting it widely.

(AD Computer objects track what appears to be the same information, so querying AD might be a viable option if you're reasonably certain that the computer objects there are still "live").
<h3>What can you do with this information?</h3>
Well, you can say for sure that <em>anything which self-reports as being build 7600</em> - i.e. not 7601 - <em><strong>probably hasn't had any Windows security updates since about 2013</strong></em>.

The Support Lifecycle site notes that <a href="https://support.microsoft.com/en-us/lifecycle/search?alpha=windows%20server%202008%20r2">without SP1, Windows Server 2008 R2 (7600) exited support in April 2013</a>. That's the point after which security updates stop applying, because they require SP1 (7601), which isn't installed.

Likewise, if you've a <a href="https://support.microsoft.com/en-us/lifecycle/search?alpha=Windows%20Server%202008%20Standard">Windows Server 2008 (6001) Server, it hit End Of Support at the same time </a>(and Service Pack 2 (6002) is required for any updates beyond that point).

If you haven't got the relevant Service Pack approved in WSUS (or SCCM), the computers won't even see updates beyond this point as being applicable. So it might seem like you've a bunch of completely updated and compliant servers, (on closer inspection finding lots of updates aren't applicable to them) but if they haven't taken the Service Pack, they're only as updated as they self-report. And they know the newer updates aren't for them.

In this case, "newer" means "pretty much everything since mid 2013"
<h3>What should you do?</h3>
So here's what to do: Pull a report of the OS versions reported by servers within your environment. Clients too, if you think it's possible some don't have Win7 SP1.

You could do something like:
<ul>
 	<li><strong>Start, Run, WinVer</strong> on a suspect PC (if it doesn't say Service Pack X, problem)</li>
 	<li>PS:   <strong>get-adcomputer -Filter '(OperatingSystemVersion -like "*7600*") -or (OperatingSystemV</strong>
<strong> ersion -like "*6001*")' -Properties OperatingSystemVersion,OperatingSystemServicePack | export-csv NoServicePack.csv</strong>           #  (a blank NoServicePack.csv = good)</li>
 	<li>Or    <strong>wmic /node:servername os get version    </strong> - if WMI (RPC) is enabled to the target (in which case, extra bonus security points lost unless you're using a PAW or management host - you should be firewalling!)</li>
 	<li>Or <strong>use WSUS</strong>: Turn on the Version column in the All Computers view in the WSUS console, then Group By (or just Sort by) Version and look at the build numbers reported. (Don't forget to filter by Any)</li>
</ul>
If there are <strong>7600</strong>s or <strong>6001</strong>s found, check a few out, and just confirm that they're not relevant-Service-Pack-less. (Best-case outcome: they're being misreported.) If they <em>are</em>, try to work out and address the root cause - for eg, the Service Pack update wasn't approved, or the WSUS catalog doesn't include the update, or the PC isn't in the right SCCM update group, or... whatever it is.

As a note, if you're in that bucket, you're likely to have many updates to apply, which will likely take some time and disk space to chew through. (If it's simpler to redeploy an OS with a current build than update an older one, consider that).
<h3><strong>And</strong></h3>
And if you've found some unpatched boxes as a result of reading this, a) <strong><em>phew</em></strong>, lucky we found them <em>now</em>, and b) <em>really think</em> about that root cause. Mistakes in any human-driven process are predictable: does your process allow for mistakes and have any built-in correction for them? Update management isn't always easy, but many update policies are geared towards fragility and failure, due to excessive process being required for an update to make it to the target box. A process failure without a corrective phase might result in updates being missed for years.

In some cases, what we hear is that some set of updates are initially rejected (or "deferred") due to issues or concerns, which is fair enough - but then the decision doesn't get revisited for months or years afterwards - sometimes never, until the update state is compared with Windows Update. If you don't look back and check your assumptions - <em>really test</em> what updates are deployed and what you're still vulnerable to - then things can rapidly and near-invisibly deteriorate, until <em>suddenly</em>, one day you're looking back at 5 years of unpatched systems.

Core question: <em>If the participants in your existing update process/policy had "just" been pointed directly at Windows Update and set to update weekly, how many Critical and Important updates might have been applied in the interim? Would the outcomes have been better?</em>
<h3>And And: an afterthought for 2012 R2</h3>
I haven't got into <a href="https://support.microsoft.com/kb/2919355/">2919355</a> yet, but it's the 2012 R2 (and Windows 8.1) equivalent of a Service Pack, and as of late 2014, it became <em>the</em> mandatory update on which all other 2012 R2 (and 8.1) updates depended.
<div class="container">
<div class="row">
<div class="col-xs-24">
<div class="ng-scope" role="presentation">
<div class="ng-scope">
<div class="ng-scope">
<div class="content-article spacer-32-top col-lg-16 col-lg-offset-4 col-md-20 col-md-offset-2 ng-scope">
<div class="ng-isolate-scope">
<div class="content-article">
<div class="ng-scope">
<div class="ng-scope ng-isolate-scope">
<div class="ng-scope">
<div class="ng-isolate-scope"><section class="section ng-scope">
<div class="container section-body ng-scope">
<div class="row">
<div class="ng-scope col-xs-24">
<div class="ng-isolate-scope">
<blockquote><em><strong><span class="text-base">Important</span></strong> All future security and nonsecurity updates for Windows RT 8.1, Windows 8.1, and Windows Server 2012 R2 require this update to be installed. We recommend that you install this update on your Windows RT 8.1-based, Windows 8.1-based, or Windows Server 2012 R2-based computer in order to receive continued future updates.</em></blockquote>
</div>
</div>
</div>
</div>
</section></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
If you haven't installed it, as with the older OSes above, updated would have stopped in - let's say 2015. So you may be a couple of years behind by now.

<strong>I don't know</strong> if it's as simple as a build check for that one (it might be visible though the detailed build reported by  the WSUS console - I don't have one to check right now), but it's the other key update we find missing when evaluating update state using MBSA manually.

From a quick bit of KB spelunking, I figure there <em>might</em> be a way to tell from the WSUS reported client version (but it'd always be a "soft" confirmation) - check out the difference between the file information in the pre- and post-2919355 articles for the same update (while still in the grace period)

<a href="https://support.microsoft.com/kb/2965161/">Pre</a> (i.e. the version for computers <em>without</em> 2919355)
<blockquote>For all supported x64-based versions of Windows 8.1 and Windows Server 2012 R2</blockquote>
<div class="container">
<div class="row">
<div class="col-xs-24">
<div class="ng-scope" role="presentation">
<div class="ng-scope">
<div class="ng-scope">
<div class="content-article spacer-32-top col-lg-16 col-lg-offset-4 col-md-20 col-md-offset-2 ng-scope">
<div class="ng-isolate-scope">
<div class="content-article">
<div class="ng-scope">
<div class="ng-scope ng-isolate-scope">
<div class="ng-scope">
<div class="ng-isolate-scope"><section class="section ng-scope">
<div class="container section-body ng-scope">
<div class="row">
<div class="ng-scope col-xs-24">
<div class="ng-isolate-scope">
<div class="kb-moreinformation-section section ng-scope">
<div class="faq-section ng-isolate-scope">
<div class="faq-panel ng-scope ng-isolate-scope">
<div class="faq-panel-body ng-isolate-scope">
<div class="kb-collapsible kb-collapsible-collapsed">
<blockquote>
<div class="table-responsive">
<table class="sbody-table table">
<tbody>
<tr class="sbody-tr">
<th class="sbody-th">File name</th>
<th class="sbody-th">File version</th>
<th class="sbody-th">File size</th>
<th class="sbody-th">Date</th>
<th class="sbody-th">Time</th>
<th class="sbody-th">Platform</th>
</tr>
<tr class="sbody-tr">
<td class="sbody-td">Fntcache.dll</td>
<td class="sbody-td">6.3.9600.<strong>16662</strong></td>
<td class="sbody-td">1,348,608</td>
<td class="sbody-td">30-Apr-2014</td>
<td class="sbody-td">14:12</td>
<td class="sbody-td">x64</td>
</tr>
<tr class="sbody-tr">
<td class="sbody-td">Dwrite.dll</td>
<td class="sbody-td">6.3.9600.<strong>16662</strong></td>
<td class="sbody-td">1,945,088</td>
<td class="sbody-td">30-Apr-2014</td>
<td class="sbody-td">14:24</td>
<td class="sbody-td">x64</td>
</tr>
<tr class="sbody-tr">
<td class="sbody-td">Dwrite.dll</td>
<td class="sbody-td">6.3.9600.<strong>16662</strong></td>
<td class="sbody-td">1,496,576</td>
<td class="sbody-td">30-Apr-2014</td>
<td class="sbody-td">13:29</td>
<td class="sbody-td">x86</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="https://support.microsoft.com/kb/2964718/">Post</a> (i.e. the version information for computers <em>with</em> 2919355 installed already)
<blockquote>For all supported x64-based versions of Windows 8.1 and Windows Server 2012 R2</blockquote>
<div class="container">
<div class="row">
<div class="col-xs-24">
<div class="ng-scope" role="presentation">
<div class="ng-scope">
<div class="ng-scope">
<div class="content-article spacer-32-top col-lg-16 col-lg-offset-4 col-md-20 col-md-offset-2 ng-scope">
<div class="ng-isolate-scope">
<div class="content-article">
<div class="ng-scope">
<div class="ng-scope ng-isolate-scope">
<div class="ng-scope">
<div class="ng-isolate-scope"><section class="section ng-scope">
<div class="container section-body ng-scope">
<div class="row">
<div class="ng-scope col-xs-24">
<div class="ng-isolate-scope">
<div class="kb-summary-section section ng-scope">
<div class="faq-section ng-isolate-scope">
<div class="faq-panel ng-scope ng-isolate-scope">
<div class="faq-panel-body ng-isolate-scope">
<div class="kb-collapsible kb-collapsible-collapsed">
<blockquote>
<div class="table-responsive">
<table class="sbody-table table">
<tbody>
<tr class="sbody-tr">
<th class="sbody-th">File name</th>
<th class="sbody-th">File version</th>
<th class="sbody-th">File size</th>
<th class="sbody-th">Date</th>
<th class="sbody-th">Time</th>
<th class="sbody-th">Platform</th>
</tr>
<tr class="sbody-tr">
<td class="sbody-td">Fntcache.dll</td>
<td class="sbody-td">6.3.9600.<strong>17111</strong></td>
<td class="sbody-td">1,345,536</td>
<td class="sbody-td">30-Apr-2014</td>
<td class="sbody-td">04:26</td>
<td class="sbody-td">x64</td>
</tr>
<tr class="sbody-tr">
<td class="sbody-td">Dwrite.dll</td>
<td class="sbody-td">6.3.9600.<strong>17111</strong></td>
<td class="sbody-td">1,975,296</td>
<td class="sbody-td">30-Apr-2014</td>
<td class="sbody-td">04:43</td>
<td class="sbody-td">x64</td>
</tr>
<tr class="sbody-tr">
<td class="sbody-td">Dwrite.dll</td>
<td class="sbody-td">6.3.9600.<strong>17111</strong></td>
<td class="sbody-td">1,509,888</td>
<td class="sbody-td">30-Apr-2014</td>
<td class="sbody-td">03:47</td>
<td class="sbody-td">x86</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
So I'll hazard an ultra-hazardous guess, which is that if you have computers self-reporting in WSUS as being 6.3.9600.<strong>16</strong>xxx , they might have stalled at pre-2919355, so need 2919355 (or a descendent or prerequisite) approved, and then<em> I assume</em> the build number will be 17xxx or higher. MBSA can help you identify what Windows Update would think was missing, so you can search WSUS for approval states by KB ID.]]></content:encoded>
    </item>
    <item>
      <title>Conditional Formatting Text in Excel from PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/conditional-formatting-text-in-excel-from-powershell</link>
      <pubDate>Tue, 29 Aug 2017 07:20:51 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6216</guid>
      <description><![CDATA[Hopefully a helpful note, as this had me confused for a while…  I wanted to add text-based...]]></description>
      <content:encoded><![CDATA[<p>Hopefully a helpful note, as this had me confused for a while…</p> <p><br></p> <p>I wanted to add text-based conditional formatting to an Excel sheet I was creating from PowerShell – so I could colour one of the columns automatically depending on the values.</p> <p>I used the technique any self-respecting dabbler would: I recorded a macro in Excel VBA and then tried to convert it over.</p> <p><br></p> <p>But no matter what I tried, I couldn’t get the !&amp;$^$^@ FormatConditions.Add function to work.</p> <p>After debugging the idiot-level mistakes (null variables; debugging without parameters :| ) out of the script, I was left with:</p> <p><br></p> <blockquote> <p>Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))<br>At C:\Users\tristank\Desktop\excelfmt.ps1:201 char:1<br>+ $newthing=$ActionColumn.FormatConditions.Add($xlTextString, $cond, $x ...<br>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>&nbsp;&nbsp;&nbsp; + CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : OperationStopped: (:) [], COMException<br>&nbsp;&nbsp;&nbsp; + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException</p></blockquote> <p><br></p> <p>Soo… not enough arguments, then?</p> <p>The <a href="https://msdn.microsoft.com/VBA/Excel-VBA/articles/formatconditions-add-method-excel">VBA reference</a> which comes up first in Bing (and Google for that matter) wasn’t helpful – 4 arguments and I’d tried every combination of arguments I could conceive. The count seemed fine. But no FormatConditions object…</p> <p>But debugging from the command line (thanks ISE), I tried punching in $ActionColumn.FormatConditions.Add( , and was stunned to see 7 arguments in the tooltip.</p> <p>I added $null to all of them (natch) – and it worked! (Or at least I had a rule with the right conditions and formatting, but the condition was in the wrong spot).</p> <p>So, armed with this new knowledge, I found the Excel Interop Object Reference for <a href="https://msdn.microsoft.com/en-us/library/ff590906.aspx">FormatConditions.Add</a> … and there ya go. 7 arguments.</p> <blockquote> <p>Object Add( XlFormatConditionType Type, Object Operator, Object Formula1, Object Formula2, Object String, Object TextOperator, Object DateOperator, Object ScopeType )</p></blockquote> <p>As I’d already been experimenting by the time I found the documentation, it seems like several bits might be interchangeable. I don’t know what I’m doing; I can’t warrant that this will work under any conditions except my own.</p> <p>But to save someone else the time, here’s mine:</p> <blockquote> <p>$ActionColumn = $worksheet.Range("G:G")<br>$xlTextString = [Microsoft.Office.Interop.Excel.XlFormatConditionType]::xlTextString<br>$xlContains = [Microsoft.Office.Interop.Excel.XlContainsOperator]::xlContains<br>$cond = "ACTION"<br>$newthing=$ActionColumn.FormatConditions.Add($xlTextString, "", $xlContains , $cond, $cond, 0, 0) # hacky dodgy hacky hack / works</p> <p>$fcs=$ActionColumn.FormatConditions.Count<br>$ActionColumn.FormatConditions.item($fcs).SetFirstPriority()<br>$ActionColumn.FormatConditions[$fcs].Font.ThemeColor = [Microsoft.Office.Interop.Excel.XlThemeColor]::xlThemeColorDark1<br>$ActionColumn.FormatConditions[$fcs].Font.TintAndShade = 0<br>$ActionColumn.FormatConditions[$fcs].Interior.Color = 255<br>$ActionColumn.FormatConditions[$fcs].Interior.TintAndShade = 0<br>$ActionColumn.FormatConditions[$fcs].StopIfTrue = $false;<br>&nbsp;&nbsp;&nbsp; </p></blockquote> <p>And yes, I was naughty and used two indexing operators (during my “long script debugging” phase, when I was troubleshooting an uninitialized object and didn’t know it).</p> <p>Sigh. And hope that helps!</p>]]></content:encoded>
    </item>
    <item>
      <title>Note: Surface Pro Volume-Up Reset</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/note-surface-pro-volume-up-reset</link>
      <pubDate>Sun, 26 Feb 2017 22:32:07 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6175</guid>
      <description><![CDATA[I once experienced a problem with my Surface Pro 3 where the keyboard (and screen rotation) stopped...]]></description>
      <content:encoded><![CDATA[<p>I once experienced a problem with my Surface Pro 3 where the keyboard (and screen rotation) stopped working while I was working in another State.</p> <p>I can never find the instructions I used to fix it, so I thought I’d post them here.</p> <p>Note: For Surface Pro devices only. </p> <p>Hold <strong>Power and Volume Up</strong> for <strong>15 seconds</strong>. The screen may do things (turn off, turn on. weird clown images appearing) during this time, but just keep pressing and holding.</p> <p>After 15 seconds, <strong>release the buttons</strong>, and then press the <strong>Power</strong> button to boot the Surface again.</p> <p>And check to see how things are…</p>]]></content:encoded>
    </item>
    <item>
      <title>The RDP Ghost is real.</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/the-rdp-ghost-is-real</link>
      <pubDate>Sat, 18 Feb 2017 06:56:34 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6165</guid>
      <description><![CDATA[Recently, when connecting to a reasonably-sleepy Windows system, I’ve seen the RDP Ghost. An 8 bit...]]></description>
      <content:encoded><![CDATA[<p>Recently, when connecting to a reasonably-sleepy Windows system, I’ve seen the RDP Ghost.</p> <p>An 8 bit rendition of a scary, scary ghost. It scared me.</p> <p>If you’ve seen it, you’re not alone. It’s a thing.</p> <p>I hope - one day - to capture a screenshot of this apparition.</p> <p>The Rules appear to be that you can never be ready for a screenshot when RDP Ghost appears.</p> <p><strong>Update 22/04/17</strong>: I WAS READY! Kinda. And caught enough that I can understand the cause and the effect.</p> <p>The good news is, you’re probably not hacked by a supernatural force. Probably. It’s just Windows trying to draw the sign-in guy before it’s ready!</p> <p><a href="https://msdnshared.blob.core.windows.net/media/2017/04/image661.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;margin: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/04/image_thumb650.png" width="244" height="233"></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Krebs’ Immutable Truths of Data Breaches</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/krebs-immutable-truths-of-data-breaches</link>
      <pubDate>Mon, 09 Jan 2017 22:35:23 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6155</guid>
      <description><![CDATA[A rationale for more stringent risk assessment. Or indeed any risk assessment for internet connected...]]></description>
      <content:encoded><![CDATA[<p>A rationale for more stringent risk assessment. Or indeed any risk assessment for internet connected assets, regardless of size or perceived value to others.</p> <p><a title="Krebs&rsquo;s Immutable Truths About Data Breaches" href="https://krebsonsecurity.com/2017/01/krebss-immutable-truths-about-data-breaches/">Krebs’s Immutable Truths About Data Breaches</a></p> <blockquote> <p>“There are some fairly simple, immutable truths that each of us should keep in mind, truths that apply equally to political parties, organizations and corporations alike: <p>-If you connect it to the Internet, someone will try to hack it. <p>-If what you put on the Internet has value, someone will invest time and effort to steal it. <p>-Even if what is stolen does not have immediate value to the thief, he can easily find buyers for it. <p>-The price he secures for it will almost certainly be a tiny slice of its true worth to the victim. <p>-Organizations and individuals unwilling to spend a small fraction of what those assets are worth to secure them against cybercrooks can expect to eventually be relieved of said assets.”</p></blockquote>]]></content:encoded>
    </item>
    <item>
      <title>Website Security Suggestion: Get rid of cruft! (script included)</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/website-security-suggestions</link>
      <pubDate>Thu, 24 Nov 2016 08:12:33 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6146</guid>
      <description><![CDATA[Right: One of my pet hates is cruft on a production website.

Cruft is stuff - files - which has...]]></description>
      <content:encoded><![CDATA[Right: One of my pet hates is <strong><em>cruft</em></strong> on a production website.

<em>Cruft</em> is stuff - files - which has accumulated because nobody’s paying attention. <em>Cruft</em> includes <em>sampleware</em>. Developer experiments. <em>Readmes</em>. Sample configs. Backups of files which never get cleaned up. Just general accumulated stuff. It’s website navel lint. Hypertext hairballs.

<strong>Cruft. Has. No. Place. On. A. Production. Website!</strong>

Worst-case, it might actually expose security-sensitive information. (That's the worst type of cruft!).

Want to <em>find</em> cruft? Well, easiest way to start is:
<blockquote>D:\WebContent&gt; dir /s *.txt</blockquote>
That’s a good start. For every Readme.txt, add 10 points. For every web.config.txt, add 1000 points (why? That's a potentially huge problem - .config is blocked by Request Filtering by default (with certain exceptions), but .config.txt: no problem! Download away.)

If you score more than 10 points, you need to <em>rethink your strategy</em>.
<ul>
 	<li>There is <strong>no reason</strong> for files like <strong>readme.txt</strong> to exist within your production website
<ul>
 	<li>Okay, there’s <strong>one</strong> reason and that’s when you’re providing one you know about, and have vetted, for download.
<ul>
 	<li>I mean, obviously if the site is there to provide readme.txt s for apps people are downloading, great! But if it's the readme for some developer library which has been included wholesale, <em>bad</em> pussycat.</li>
</ul>
</li>
</ul>
</li>
 	<li>There is <strong>no reason</strong> for files like <strong>web.config.bak</strong> to exist within your production website.
<ul>
 	<li>Luckily, .bak files aren't servable with the default StaticFileHandler behaviour. But that doesn't mean an app (or * scriptmap...) can't be convinced to hand you one...</li>
</ul>
</li>
 	<li>If you have <strong>web.config.bak.txt</strong> files, you’re asking for trouble.
<ul>
 	<li><span style="font-size: xx-small"><strong>Change your operational process. </strong>Don’t risk leaking usernames and passwords this way.</span></li>
</ul>
</li>
</ul>
<h3>The Core Rationale</h3>
<strong>Web developers and site designers</strong> should be able to <strong>explain the presence</strong> of <strong>every single file</strong> on your website.

I don’t care if it’s IIS or Apache or nginx or SuperCoolNewTechnologyX… the developers should be responsible for every <strong>single file</strong> deployed to production.

And before the admins (Hi!) get smug and self-satisfied (you still can, you just need to check you’re not doing the next thing…), just check that when you deploy new versions of Site X, you’re not backing up the <em>last version of Site X</em> to a servable content area within the new version of Site X.

For example, your content is in F:\<strong>Websites</strong>\CoolNewSite\ with the website pointed to that location…
<ul>
 	<li>It’s safe to back up to F:\<strong>Backups</strong>\CoolNewSite\2016-11-13 because it’s outside the servable website</li>
 	<li>It’s <strong>not cool</strong> to back up to F:\Websites\CoolNewSite\2016-11-13 because that’s <em>part of the website</em>.</li>
</ul>
<h2>How Do I Know If I’m Crufty?</h2>
As I do, I started typing this rant a while ago, and then thought: You know what? I should script that!

I had a bunch of DIR commands I was using, and sure, could’ve just made a CMD, but who does that these days? (Says my friend. (Singular))

Then {stuff}… but it finally bubbled to the top of my to-do list… So I wrote a first draft <strong>Get-CruftyWebFiles</strong> script.

I’ve lots of enhancement ideas from here, but wanted to get something which basically worked. I think this basically works!

Sure, there’s potential duplication if sites and apps overlap (i.e. the same file might be listed repeatedly) (which is fine; I figure you weed that out in post production), and if your site is self-referential it might get caught in a loop (hit Ctrl+C if you think/know that’s you, and *stop doing that*)

So, feel free if you want to see how crufty your IIS 7.5+ (assumed? Tested on 8.5) sites are:

<strong>The Script</strong>: <a href="https://github.com/TristankMS/IIS-Junk" title="https://github.com/TristankMS/IIS-Junk">https://github.com/TristankMS/IIS-Junk</a>

Usage (roughly):

Copy to target web server. Then from an Admin PS prompt:
<ul>
 	<li>.\Get-CruftyWebFiles.ps1   # scans all web content folders linked from Sites, and outputs to .\crufty.csv</li>
 	<li>.\Get-CruftyWebFiles.ps1 -WebSiteName "Default Web Site"     # limits to just the one website.</li>
 	<li>.\Get-CruftyWebFiles.ps1 -DomainName "YOURDOMAIN"    # checks for that text string used in txt / xml files as well</li>
</ul>
Pull the CSV into Excel, Format as Table, and get sorting and filtering. Severity works on a lower-is-more-critical basis. Look at anything with a zero first.

Todo: Cruft Scoring (severity’s already in there), more detections/words, general fit and finish. Also considering building a cruft module for a security scanner, or just for the script, to check what's findable on a website given some knowledge of the structure.

* oh! No I’m not]]></content:encoded>
    </item>
    <item>
      <title>Sunsetting TMG 2010 with some (free!) Best Practices</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/sunsetting-tmg-with-some-free-best-practices</link>
      <pubDate>Fri, 14 Oct 2016 02:41:06 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6135</guid>
      <description><![CDATA[Long and boring post ahead. So: KITTENS! There. Fluffy now.

As one of the Premier Field Engineers...]]></description>
      <content:encoded><![CDATA[Long and boring post ahead. So: <em>KITTENS!</em> There. Fluffy now.

As one of the Premier Field Engineers performing ISA Server Health Checks and then Threat Management Gateway (TMG) configuration reviews (by default, from my <em>long</em> association with Proxy 2.0 and then ISA), I was reviewing a document I put together for a customer just before shredding it, and thought:

<strong>You know what? <em>Everyone</em> should do these things!</strong> These recommendations are <em>common enough</em> that I seem to make them every time I see a TMG box… so why not generalize and recommend them here? Put them out into the wild. Get them shouted down. Give them their time in the sun.

So on the <em>off-chance</em> you’re a survivor of the <a href="http://social.technet.microsoft.com/wiki/contents/articles/2316.forefront-threat-management-gateway-tmg-2010-survival-guide.aspx">TMG Survival Guide</a> and you’re looking for some last-minute <em>as-seen-in-the-real-world</em> TMG corrective advice – and by “last minute”, I mean:
<ul>
 	<li>You know the base product is in <strong>Extended Support until 2020</strong>, then it’s going away. (sniff!)</li>
 	<li>You understand that <strong>Malware Scanning and Network Inspection System</strong> are already <strong>frozen at their last update level</strong>.</li>
 	<li>You know <strong>URL Categorization</strong> (Filtering) <strong>got turned off already</strong> so any rules using it <strong>might fail-open</strong> (or fail-closed)…</li>
</ul>
And in terms of pre-migration work
<ul>
 	<li>You’ve also been through your rule set, and tested that everything’s Least Privilege-compliant,
<ul>
 	<li>i.e. No broad “everyone can access anything/TMG/anywhere with any protocol” rules or anything like that.
<ul>
 	<li>No really, if you can connect to TMG via SMB, that’s usually not a good sign… You’re at least using Windows Update for patches, though, right?</li>
</ul>
</li>
</ul>
</li>
 	<li>Maybe you’ve performed an ISAINFO (and/or TMGBPA) export of your rule set so that you can <strong>ease the process of recreating them</strong> on the next egress device you pick? :)</li>
</ul>
…Because these are all fantastic first steps on the long migration path between proxies. If you haven't done them, do put them on the list.

So before you shut down TMG that final time, and repurpose the boxes for Quake servers (or whatever you kids use spare boxes for these days)…

What best practices are available to you do in the meantime? Glad you asked!

Here's the short list, the detail follows.

<strong>Proactively Protect The Box</strong>
<ul>
 	<li>Install the latest Windows Updates</li>
 	<li>Install the latest TMG Rollup Hotfix (SP2 UR5, potentially + .650 or later)</li>
 	<li>(Install any updates for <em>any other software</em> on the box)</li>
</ul>
<strong>Operating System Protection</strong>
<ul>
 	<li>Firewalling</li>
 	<li>De-Adminning</li>
 	<li>Attack Surface Reduction</li>
 	<li>AV exclusions</li>
</ul>
<strong>TMG Health and Perf</strong>
<ul>
 	<li>Check Tracing isn't enabled</li>
 	<li>Disable/Relax Flood Prevention</li>
</ul>
And now the details...
<h2>Proactively Protect The Box</h2>
<em>“It’s a <strong>firewall</strong>, it <strong>doesn’t need patching!</strong>” <span style="font-size: xx-small">(just for clarity: that’s </span></em><span style="font-size: xx-small"><strong>not</strong> true<em>)</em></span>
<h3>Install the latest Windows Updates</h3>
<ul>
 	<li>If you’re not <strong>installing Windows updates</strong>, um, I don’t know what to tell you?</li>
</ul>
You understand that unpatched vulnerabilities <em>win</em> over security settings, permissions and antivirus, right? Any on-box control is potentially circumvent-able by an unpatched (bad) vuln?

And you’re still thinking it’s <em>optional</em>? Well! That’s nice! I hope you’ve a mitigation strategy in place, and an incident response plan for when that one fails.

TMG defends itself pretty heavily against network attack ( (a: by default) (b:to an extent; it still leverages OS components for certain chunks of functionality)), but lots of people end up creating rules which – paraphrased – allow the Internal network to hit <em>any port</em> on the TMG computer. Because <em>reasons</em>!

This is the same pathology which leads people to <a href="https://blogs.technet.microsoft.com/tristank/2016/04/28/tip-check-that-your-offline-root-ca-is-actually-offline-mmkay/">not patch their CAs</a>, or not to use firewalling between hosts on their internal network – it’s the <em>opposite</em> of a defence in depth approach!

Anyway, back to updates:
<ul>
 	<li>When I check the update state of a box, I do so by running MBSACLI (the command-line version of <a href="http://www.microsoft.com/download/details.aspx?id=7558">MBSA</a>) using the <a href="http://go.microsoft.com/fwlink/?LinkID=74689">current WindowsUpdate CAB</a> if the box doesn’t have Internet connectivity.</li>
</ul>
<blockquote><span style="font-family: Consolas">mbsacli /xmlout /nvc /nd /wi /catalog .\wsusscn2.cab /unicode &gt; %computername%-MBSA.xml</span></blockquote>
<ul>
 	<li style="list-style-type: none">
<ul>
 	<li>I actively avoid using the default customer WSUS catalog, because it’s completely possible to be 100% compliant with the WSUS approval policy and have unapproved updates missing from five years ago, which were skipped for a good reason, but then that decision was never revisited.</li>
</ul>
</li>
 	<li>It is <em>uncommon</em> in my experience to find that servers are up to date. For a <em>security appliance</em> at the <em>edge of the network</em>, used as an ingress or egress point by <em>thousands</em> of clients, this is <em><strong>suboptimal</strong></em>.</li>
</ul>
&nbsp;
<h4>Windows Server 2008 R2 Service Pack 1 is needed for Security Updates</h4>
Keep in mind that some updates require the presence of a Service Pack or other major update.
<ul>
 	<li>So the first thing I’d check is <strong>WinVer</strong>.</li>
 	<li>If WinVer says you’re on <strong>Windows 2008 R2</strong> version <strong>7600</strong> and doesn’t mention a Service Pack, <strong>you need to get to 7601 (Service Pack 1) <em>pronto</em></strong>, and then start applying all the updates which have required SP1 - say, the last 4-5 years’ worth, which includes many Critical updates.</li>
 	<li><strong>Windows 2008</strong> should be at <strong>SP2</strong>. If it’s not at SP2, same thing applies as above.</li>
</ul>
This, again, is sadly not uncommon.

&nbsp;
<h4>If You Found You Had Something Missing: Why Not Just Use Windows Update?</h4>
<ul>
 	<li>If you find they’re missing updates because <em>{ ¯\_(ツ)_/¯ },</em> my standard remediation suggestion is: <strong>just point them at public WindowsUpdate and specify your schedule</strong>. Let them pop out through a proxy, or go direct if they’re edge devices.</li>
</ul>
Yep. I’m serious. Better a security-sensitive device which is <em>up to date by automatic patching at 3am on a Thursday</em> than one which is<em> out of date at all times by policy</em>.

See also: Least Privilege Rule Set. If an attacker can’t hit the vulnerable port, you don’t have that problem.

&nbsp;
<h3>Install the latest TMG Rollup Hotfix</h3>
Now, don’t misunderstand me: TMG <strong>isn’t</strong> the simplest thing in the universe to update (unlike its predecessor ISA Server, which was a positive <em>dream</em> by comparison). But if you’re reading this, you <em>probably</em> work in IT, so that’s not <em>actually</em> an excuse <em>not to do it! :)</em>

Yes, it’s a <strong><em>pain</em></strong> going from RTM to SP1 to SP1 + U1 to SP2 to SP2 Rollup 5, but… you <em>should</em> do it. You <em>need</em> to do it. If you’re one rollup behind, you’re actually 12-18 months of updates out of date. With hundreds of builds in between. Many issues have been fixed over the years, including hangs, crashes, and possibly a security update or two, if memory serves.
<ul>
 	<li>The <a href="https://blogs.technet.microsoft.com/isablog/2009/02/24/isatmg-server-build-numbers/">latest rollup version I’m aware of</a> is <strong>TMG Service Pack 2 with Update Rollup 5</strong>. If Help/About in the TMG MMC shows you a version earlier than <strong>7.0.9193.644</strong>, well – that update was from 2014.</li>
 	<li>There’s one post-rollup hotfix I’ve seen (which is for SNI websites with HTTPS inspection enabled, but it provides a version bump to .650 for many core components too) which gets us to April 2015: <a href="https://support.microsoft.com/en-us/kb/3058679" title="https://support.microsoft.com/en-us/kb/3058679">https://support.microsoft.com/en-us/kb/3058679</a> .</li>
</ul>
&nbsp;
<h3>Operating System Protection</h3>
<h4>Lifecycle and post-Lifecycle Firewalling</h4>
In April 2020, <a href="https://support.microsoft.com/en-us/lifecycle/search?sort=PN&amp;alpha=Microsoft%20Forefront%20Threat%20Management%20Gateway%202010&amp;Filter=FilterNO&amp;forceorigin=esmc">TMG exits Extended Support</a> and is no more.

But by a quirk of the Support Lifecycle, <a href="https://support.microsoft.com/en-us/lifecycle/search?sort=PN&amp;alpha=Windows%20Server%202008&amp;Filter=FilterNO&amp;forceorigin=esmc">Windows Server 2008 (and R2) actually exits Extended Support in <em>January</em> 2020</a>, <strong>so a TMG box <em>running down the clock</em> will potentially be partially unprotected from an OS security updates perspective between January and April</strong>. (Unless a Custom Support Agreement is available, but it’s probably more costly than the alternative). <strong>So it’s not a <em>terrible</em> assumption that you’ve <em>basically</em> got until Dec 31, 2019 to get everything sorted out.</strong>
<ul>
 	<li>I don’t mind restating the obvious, so I will: <strong><em>You should have migrated away from TMG before the end of 2019. Please!</em></strong>
<ul>
 	<li>That’s still <strong>3 years</strong> from now to plan and execute your migration</li>
 	<li>So <strong>if you <em>haven’t</em> already started</strong>, please <strong>add it to your</strong> “<strong>To Do: 2017</strong>” list now.</li>
</ul>
</li>
 	<li>If you do still have some TMG kicking around at that point, consider hardening the TMG Firewall policies (including the System policies) to <strong>limit all nonessential connectivity to the TMG hosts</strong> by any other computer.
<ul>
 	<li>In fact, <strong>think about doing that anyway</strong>, <em>particularly</em> if you actually had work items pending from the “Install Windows Updates” item above. Because that's an <em>attack surface exposure</em> compounded with <em>known vulnerabilities</em>. That's a poor combination for a security device.</li>
</ul>
</li>
</ul>
<strong>If you’re planning to run beyond the end of support, <em>don’t!</em></strong>

But if you do find yourself there: also think about <em>defence in depth</em> approaches. The sort you’d want to take with a Windows 2000 machine on your network if some business unit decided it needed to be added <em>this year:</em> <strong>isolate</strong>, put <strong>external firewalls</strong> <strong>in front of and behind it</strong>, so you <em>seriously limit</em> the ingress and egress paths available to it in case of compromise. Yes, TMG’s a firewall, but trusting {the actions of an on-box firewall which isn’t receiving security updates any more (in 2020)} on {an <em>operating system</em> which <em>also</em> isn’t receiving security updates any more} seems like it’s a <strong>bad bet</strong> compared to an external security device which is presumably still getting updates. Yah?

&nbsp;
<h4>De-Adminning</h4>
<ul>
 	<li>Just check the membership of any groups who have Admin permission to the box.</li>
 	<li>Then eliminate any local admins except one (if you don’t fully de-admin boxes), and remove any Domain groups you can.</li>
</ul>
Then, unless you’re <strong><em>sure</em></strong> (I mean <em>certain</em>, i.e. you've <em>checked</em>, not <em>“I assume it’s quite unlikely”</em>) that a) there's only one local Admin account, and b) the password for that local Admin account is already <em>unique</em> and <em>not known to anyone unauthorized</em>, <strong>reset the remaining Admin password to a unique value</strong> (unless you’re already a LAPS shop, or use other password management tools… but please, <em>check</em> whether TMG’s part of the LAPS group, don’t just assume it is… that’s how SUS patching doesn’t work too!)

&nbsp;
<h4>Basic Attack Surface Reduction</h4>
Most TMG boxes seem to have management agents for something or another installed on them. Actually, as a related observation, it's not uncommon for me to find servers with multiple management agents for multiple generations of monitoring systems on them. Often disused ones. These are pure attack surface additions, and often running with privileged access levels. Very often with known vulnerabilities.

In short: Either kill ‘em, or at least make sure they can’t be contacted over the network (using Firewall policy).
<ul>
 	<li>If you <em>have</em> looked at them in the last 6 months, you can be excused from this item.</li>
 	<li>If not, check to see what the file dates of the EXEs are. If they’re over 3 years old, they’re probably a liability and almost certainly aren’t being updated, and simply represent an increased attack surface, so consider removing them.</li>
</ul>
&nbsp;
<h4>Antivirus</h4>
Observe the <a href="https://technet.microsoft.com/en-us/library/cc707727.aspx">exclusions needed for Antivirus</a> when running on a TMG host. If you don’t exclude the right stuff, it can get a bit jammed up.

&nbsp;
<h3>TMG Health</h3>
<h4>Tracing?</h4>
This one’s <em>much</em> less common than the above few.
<ul>
 	<li>Run RESMON for a short while, look at the Disk IO area, and sort by Bytes Total/sec. Note any files which have lots of IO over a 2 minute period.
<ul>
 	<li>(The idea is to try to minimize IO where possible)</li>
</ul>
</li>
 	<li>If activity to <strong>ISALOG.BIN</strong> is chewing through <strong>a megabyte or more per second</strong>, TMG may be tracing something
<ul>
 	<li>or <em>still</em> tracing something - this has been seen when TMGBPA is used to run a diagnostic trace but for whatever reason it doesn’t terminate cleanly.</li>
 	<li>It might also indicate a diagnostic logging session is in progress (just check the console under Troubleshooting –&gt; Diagnostic logging and hit Disable if it isn’t already disabled).</li>
</ul>
</li>
</ul>
Note that in my experience, some minimal isalog.bin activity (say under 64K/sec) is normal.

If that’s the case, run the ISA Data Packager again, and open the tracing options, then untick everything.

&nbsp;
<h4>Flood Mitigation</h4>
Going to say something a bit controversial here: You might want to experiment with turning off or massively increasing the defaults for flood prevention, particularly for outbound scenarios.

The defaults for this feature haven’t changed since it was introduced in 2004, but <em>wow</em>, Internet surfing patterns sure have.

So I say:
<ul>
 	<li>Try a 10X increase in the numbers, particularly for HTTP and TCP connections, and see how you go.
<ul>
 	<li>If it stops the constant alerting about “infected clients”, and you’ve got burnout from chasing them down only to find it was Bruce in Marketing opening eighteen instances of FireFox to their brand new multi-pronged CDN-driven site manually, it might be a welcome change, and reduce grumbling (nothing like a paused connection to cause a user to get grumpy about “the )(@$&amp; Proxy”)…</li>
</ul>
</li>
</ul>
&nbsp;

And that, believe it or not, covers the most common TMG practices I’d suggest. Minimal TMG, maximal patching and defence in depth.

So there you have it. The most common Stuff I’ve seen over the years with TMG. Now go work out how you’re going to migrate egress to something else… (I assume Azure AD App Proxy will take care of the HTTP stuff, and/or Load Balancer Of The Year for the non-http bits…)]]></content:encoded>
    </item>
    <item>
      <title>Simple IIS Kerberos Q&amp;A</title>
      <link>https://docs.microsoft.com/archive/blogs/tristank/simple-iis-kerberos-qa</link>
      <pubDate>Wed, 27 Jul 2016 21:36:37 GMT</pubDate>
      <dc:creator><![CDATA[Tristan K]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tristank/?p=6125</guid>
      <description><![CDATA[Posting a hopefully-useful tidbit.  Hi Tristan, Do you have by any chance a guide on how to set up...]]></description>
      <content:encoded><![CDATA[<p>Posting a hopefully-useful tidbit.</p> <blockquote> <p>Hi Tristan,</p> <p>Do you have by any chance a guide on how to set up IIS for kerberos auth? I'm helping my customer and I'm a beginner with IIS.</p> <p>It is a farm of 6 IIS servers, they will be using a service acct.</p> <p>DNS is configured to do the following resolution:</p> <p>Websvr -&gt; CNAME -&gt; IP</p> <p>So for instance the web site is webapp.example.net and points to a CName. The CName obviously is an fqdn (app-prod-vip.example.net) that points to an IP.</p> <p>The IP points to the VIP of a load balancer that ultimately connects to the IIS server farm.</p> <p>When setting the SPN do we use the websvr or the CName?</p> <p>Also, does it matter the browser I'm using on the client for kerberos auth (such as chrome)</p> <p>Anything special on the web server, besides configuring Windows authentication?</p> <p>Thank you!</p></blockquote> <p>&nbsp;</p> <p>Here’s what I replied with:</p> <p>&nbsp;</p> <p>Hola!</p> <p>Couple of moving parts there – it (a different name, i.e. the load balancer name) won’t work with the default configuration.</p> <p>You’ll need to ensure that the SPN for the CNAME is <i>only</i> assigned to the service account running the App Pool. If it’s on more than one account, it’s broken.</p> <p>A DA needs to run:</p> <blockquote> <p><font face="Consolas">SetSPN -S http/cname-of-app.fqdn.com DOMAIN\AppPoolAccountName</font></p></blockquote> <p>Where DOMAIN\AppPoolAccountName is the <strong>service account</strong> you set up for the application.</p> <p>And that should get kerb where it needs to be from an SPN perspective. If other SPNs have been tried already, they need to be removed (and SetSPN -S should tell you that).</p> <p>(Once you’ve established an SPN for the account, the <em>Delegation</em> tab should appear for it in ADUC. This allows you to configure constraints or delegation, which you might not be doing, so we’ll cover that last.)</p> <p>Next, you need to ensure the <em>App Pool Account</em> is set to DOMAIN\AppPoolAccountName (i.e. the same “custom” domain account) on all the boxes. (ApplicationPoolIdentity or NetworkService or LocalSystem or anything other than a Domain account won’t work for load-balanced Kerberos authentication.)</p> <p>Then, you need to either</p> <ul> <li>disable Kernel-mode authentication, or</li> <li>set useAppPoolCredentials=true</li></ul> <p>on them all.</p> <p>There’s a tickbox for K-mode auth under Windows Authentication in IIS; or <em>useAppPoolCredentials</em> goes (I think) in <em>web.config</em> so might be preferable. What either of these does is to move from using the box identity (machine account) to validate tickets, to using the<em> App Pool Account</em> to validate tickets. This is required for a farm scenario, but for a single-box scenario, it’s not necessary (only SPN registration).</p> <p>Once that’s done, Kerb should work to the websites, which can be validated with a network trace, or by looking at logs. (let’s throw in a reboot after k-mode auth is toggled off for good measure) (<a href="https://blogs.technet.microsoft.com/tristank/2006/08/02/two-easy-ways-to-pick-kerberos-from-ntlm-in-an-http-capture/">Picking Kerb in logs</a> – short version: single 401 www-auth:negotiate/request with long ticket/200 is Kerb, 401/401/200 is NTLM).</p> <p>I’d always test with IE, I *<b>think</b>* if IE works then Chrome has a good chance. If it doesn’t, no chance <img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none;border-left-style: none;border-bottom-style: none;border-right-style: none" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/2016/07/wlEmoticon-smile8.png"></p> <p>Always test from a remote box (avoids reflection protection), and use klist purge (and a closed browser) to reset between tests.</p> <p>If Kerb works to the site, you can then configure the App Pool Account in ADUC for <em>constrained delegation</em> to the next hop in the same way. Hit Add, browse for the <em>process identity</em> it’s connecting to (i.e. often the <em>service account</em> if the process is running as a domain identity, not the box name, but if not, the box name) and then pick the right SPN from the list.</p> <p>HTH!</p>]]></content:encoded>
    </item>
  </channel>
</rss>