<?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>Positive Security</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/positivesecurity/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/positivesecurity/feed.xml</link>
    <description>Making sense in the world of all things cyber.</description>
    <lastBuildDate>Mon, 15 Oct 2018 21:15:28 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>A necessary component to any IR: Containment</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/a-necessary-compontent-to-any-ir-containment</link>
      <pubDate>Fri, 02 Mar 2018 13:25:21 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=1575</guid>
      <description><![CDATA[This blog is updated at https://ciberesponce.com
Incident Response and Containment
Anyone who does...]]></description>
      <content:encoded><![CDATA[<span style="color: #ff0000"><strong>This blog is updated at https://ciberesponce.com</strong></span>
<h3>Incident Response and Containment</h3>
Anyone who does Incident Response (IR), or any Digital Forensics Incident Response (DFIR) process knows that collecting Indicators of Compromise (IOC) is only half the story.  <em>Eventually</em>, you'll need to recover the environment, which inherently means you best have confidence in the IOCs and have a plan to <em>evict the adversary</em>.

<img width="300" height="136" class="alignleft size-medium wp-image-1585" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/03/used-shipping-container-premium-3-300x136.jpg" />Before we go into detail on just how to do that, it is paramount to talk about <em>containment</em>.  Anytime a recovery team comes in and takes intel from the IR team, a plan must be executed while being sensitive to the control-plane an adversary <em>should have </em>after a step has been executed.  For example, if Exchange environment and the general Users population gets compromised, one should not just cleanup the Exchange environment, but they should also protect it from being re-contaminated by potentially other compromised areas of the environment.

So, we do this very important task via <em>Identity-containment methodologies</em>.  What you will find, though, is that this doesn't just give us containment but also gives us higher assurances that we discovered the IOCs against a particular actor(s).  This additional detection mechanism can give any response team the greenlight to either get the IR team back involved as adversarial activities are still being discovered after an eviction attempt or identity potentially dangerously configured applications (or perhaps an admin who exposed the wrong cred to the wrong system).
<h3><a></a>How to build containment</h3>
An often-underutilized policy that allows us to dictate who can logon to what system is <em>User Rights Assignments</em>.  In addition, <em>User Rights Assignments </em>are only useful if we can target machines, which is where Organizational Units (OUs) come into play.  Lastly, Security Groups come in handy to group various users (and potentially other Security Groups) together, so we can assign policy to them.

Every “container” we want to make, needs an OU.  For example, we need an OU for Tier-0.  We would then assign policy, via User Rights Assignments, so only Tier-0 credentials can logon to those machines; it would be <em>denied</em> from authenticating against the other OUs.

That said, for every container we need:
<ul>
 	<li>An OU (to target <em>computers</em>)</li>
 	<li>A Security Group (to bundle users/Groups together)</li>
 	<li>A <em>User Rights Assignment </em>policy properly linked and configured</li>
</ul>
Since <em>Denys </em>take precedence over <em>Allows</em> in ACLs, not only do we want to allow Tier-0 accounts to log into Tier-0 machines (identified via an OU), we want to also <em>deny </em>them from logging in to the other OUs.

This is the premise of containment, <em>at the Identity level</em>.  There are other methods of containment, including Network, however, network containment is often not enough in the world of credential harvesting.

A last note about Containment.  Once we put these policies in place, we can actually see adversaries try to break out of our newly built containers using technologies like Azure Security Center.  Once we collect all these events, we can look at Event ID 4625 and look for particular “Failure Reason”.
<blockquote>Note again that these actions shouldn’t be done until the IR team has finished its investigation.  This doesn’t mean the “hunt” is over; many times, during the recovery, additional IOCs can be discovered as containment methodologies and hardening guidance are put into place.</blockquote>
Any Failure Reason with the value "%%2308", or in English, "The user has not been granted the requested logon type (aka logon right) at this machine", should be a red flare in the sky.  It should be followed up on, in coordination with the IT staff.

Lastly, containment methodologies can and should be applied to service accounts as well as local accounts.
<h4><em>Service accounts</em></h4>
Since service accounts are also harvestable, and typically have privileges across multiple computers, they are prime targets for adversaries to laterally move.  Besides using <a href="https://aka.ms/aatp"><u>Azure ATP</u></a> to detect anomalous behavior of such accounts, User Rights Assignments can also be used to ensure Service accounts act like Service accounts; that is, they can’t be used to RDP or any other interactive logon.

<em>User Rights Assignments can also help drastically increase visibility into an environment <strong>during the IR</strong>.  If you are unable to still find how the adversary is in, but there are indications they are still in, use these to pinpoint exactly where they are and continuously harden the environment.  Eventually you’ll pinpoint the location of the adversary while at the same time executing critical Tactical Recovery steps.</em>

Any breaks from this policy either means foobar happened (or a bad application using a service account interactively) or an adversary is actively trying to break out of the credential containers URA’s help create.

One should use Azure Security Center and Log Analytics to peer into these events.<a></a>
<h4><em>Local Accounts</em></h4>
You should ensure Local Accounts that are Members of the Local Admin Group (S-1-5-114) cannot be used to laterally move.  Local accounts should only be used in Break Glass scenarios.

Refer to Aaron Margosis’ blog on this topic: <a href="https://blogs.technet.microsoft.com/secguide/2014/09/02/blocking-remote-use-of-local-accounts/">https://blogs.technet.microsoft.com/secguide/2014/09/02/blocking-remote-use-of-local-accounts/</a>
<blockquote><em>Note that this doesn’t prevent local admins from logging on remotely, it just means the accounts can’t be used to ‘hop’ after the initial logon.  In addition, this only pertains to Windows 7+ as the new SID wasn’t backported to all Operating Systems.</em></blockquote>
When this approach is used, Local Accounts can’t be used to laterally move—forcing the adversary to use other means, such as domain accounts.  This increases our Return of Investment (ROI) on technologies such as <a href="https://aka.ms/aatp"><u>Azure ATP</u></a>, which log domain user activities.

&nbsp;

Now you have a building block to build a more confident recovery effort.  Of course, prevention (which provides additional detection/awareness and visibility as well) isn't a be-it-all solution.  A perfect complement to containment is continuous monitoring capabilities looking for malicious activity based on behavior, specific Azure ATP and Windows Defender ATP.  These solutions should be used starting from the IR and throughout the Recovery process (and ultimately passed that to prevent this from happening again!).

&nbsp;

Happy hunting!

Andrew]]></content:encoded>
    </item>
    <item>
      <title>Setting up Kali Linux in Docker on Windows 10</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/setting-up-kali-linux-in-docker-on-windows-10</link>
      <pubDate>Fri, 01 Sep 2017 15:54:08 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=1565</guid>
      <description><![CDATA[This blog is updated at https://ciberesponce.com

&nbsp;

A few times now, I find myself...]]></description>
      <content:encoded><![CDATA[<span style="color: #ff0000"><strong>This blog is updated at https://ciberesponce.com</strong></span>

&nbsp;

A few times now, I find myself wondering why I need a full blown VM. I <span style="text-decoration: line-through">like</span> need to quickly get my tools up and running on any hardware I find myself on. Most of the time that is a fresh installed Windows 10 on my Surface Book—I like messing things up to a point of no return… what can I say?

As I illustrated the beauty of "<a href="https://msdn.microsoft.com/en-us/commandline/wsl/about">Bash on Ubuntu on Windows</a>" in the Azure Security Center's <a href="https://aka.ms/ascplaybooksqli">SQL-Injection Playbook</a>, I realized there really must be a better way to bring Kali Linux over to Windows as well. As many know, Kali is a customized Linux distribution, based on Debian. I could, in theory, install Ubuntu and install the Kali repositories and go from there—in addition, I like to stay away from multiple repositories from multiple parties on the same packages. Possible, but a configuration nightmare to maintain and troubleshoot. <a href="https://docs.kali.org/general-use/kali-linux-sources-list-repositories">Kali's official documentation</a> seems to agree with me.

The next best thing is Containers. In the Windows world, this requires Windows 10 Anniversary Edition+. You'll be able to enable Containers, Install Docker, and pull a Kali Linux image all in 10 minutes or less (download speeds may vary ).
<h2>Installing the Containers Feature and Installing Docker</h2>
First, we must enable the "Containers" feature. Run (ctrl+r) "optionalfeatures".
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/090117_2053_SettingupKa1.png" /></p>
And make sure this "Containers" option is checked off.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/090117_2053_SettingupKa2.png" /></p>
Once that completes, follow these instructions to install docker: <a href="https://docs.docker.com/docker-for-windows/install/">https://docs.docker.com/docker-for-windows/install/</a>. Grab the<strong> Stable </strong>channel Windows MSI and install it. Once you get it to install, you need to log out and log back in. <em>NOTE: Although Docker stated it just needed a log-out/log-in, in order for the Docker service to run on my machine it required a reboot.
</em>
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/090117_2053_SettingupKa3.png" /></p>
After logging back in, in your notifications, you should get a "Docker is starting…".
<h2>Pull <em>Official </em>Kali Linux Docker Image</h2>
We will be following the guidance here: <a href="https://www.kali.org/news/official-kali-linux-docker-images/">https://www.kali.org/news/official-kali-linux-docker-images/</a>

Open up your favorite command line interface (CLI). Then type "docker pull kalilinux/kali-linux-docker". This will pull the image from the Docker Store.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/090117_2053_SettingupKa4.png" /></p>
Now, let us enter an interactive bash session with that image by typing "docker run -t -I kalilinux/kali-linux-docker /bin/bash"
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/090117_2053_SettingupKa5.png" /></p>
We are now in our fresh install of Kali. Since this install is meant to be the <em>minimal</em>, you need to grab the packages you actually care about. This helps keep the image small but does require a good Internet connection to get up and running.

Before installing any package, let's upgrade our Kali Linux and remove all packages we no longer need via "apt update &amp;&amp; apt full-upgrade &amp;&amp; apt auto-remove &amp;&amp; apt-autoclean"
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/090117_2053_SettingupKa6.png" /></p>

<h2>Installing the Metasploit Framework</h2>
Lastly, let us install the go-to package for most pentesters… Metasploit. A simple command of "apt install metasploit-framework ruby" will do the trick.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/090117_2053_SettingupKa7.png" /><span style="background-color: yellow">
</span></p>
Just start up the PostgresSQL database that Metasploit uses, initialize the database, and to msfconsole we go!
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/090117_2053_SettingupKa8.png" /></p>
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/09/090117_2053_SettingupKa9.png" /></p>
Happy Hunting,

Andrew (@ciberesponce)]]></content:encoded>
    </item>
    <item>
      <title>WMI Queries: ReturnValue vs uValue (and some Remote Registry)</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/wmi-queries-returnvalue-vs-uvalue-and-some-remote-registry</link>
      <pubDate>Thu, 24 Aug 2017 12:44:42 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=1495</guid>
      <description><![CDATA[This blog is updated at https://ciberesponce.com

&nbsp;

Interestingly, when querying a...]]></description>
      <content:encoded><![CDATA[<span style="color: #ff0000"><strong>This blog is updated at https://ciberesponce.com</strong></span>

&nbsp;

Interestingly, when querying a registry setting in Windows via WMI, <em>through PowerShell</em>, it isn't as straight forward as previously thought. When developing the <a href="https://aka.ms/ataauditingblog">Audit Policy settings tool</a>, which uses WMI through PowerShell explicitly to avoid dependencies on Windows Remote Management (WinRM) or even the Remote Registry service, we hit a bug in our logic.

What we discovered can be summarized here:

<strong>uValue</strong> will give you the <em>raw</em> value.  Does the key exist or not, and if it does, whats the value? Seems straight forward... but how do you know what the default OS setting is--which also could mean the key doesn't even exist!? <strong></strong>That is where <strong><em></em>ReturnValue</strong> comes in--<em>even if the key doesn't exist</em>, it will return the default OS setting.  What makes this confusing is, if you explicitly create the key, even if it mimics the default OS value, <strong>ReturnValue </strong><em>changes!</em>

So, what did we need to do to get around this?
<h1>Reproducing the bug</h1>
<h2>Default Behavior</h2>
By default, Server 2008+ has Advanced Audit Policies <em>Enforced</em>. That means, even without the "<span style="color: #032f62;font-family: Consolas;font-size: 9pt">SYSTEM\CurrentControlSet\Control\Lsa\scenoapplylegacyauditpolicy" </span>registry key, the system will give it a value of 1. When you query the DC without this value (meaning the default value of the OS), you get:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/082417_1744_WMIQueriesR1.png" /></p>
For the Property "ReturnValue", we get a 1. For the "uValue" we get a 0.
<h2>Explicitly setting value to 1 (Enforced is enabled, same effect as no value/OS-default)</h2>
However, when we explicitly set the policy with a 1 (meaning still enforced), we get these results:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/082417_1744_WMIQueriesR2.png" /></p>
<strong><em>ReturnValue</em></strong> now has a value of '0'. However, <strong><em>uValue</em></strong> has a value of '1'. Well this is interesting…
<h2>Explicitly setting value to 0 (disabling it; <em>not a security best practice</em>)</h2>
Now, for testing purposes, lets explicitly disable the Enforcement of Advanced Audit settings by setting the "<span style="color: #032f62;font-family: Consolas;font-size: 9pt">scenoapplylegacyauditpolicy</span>" value to '0'. Here is the result we get this time:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/082417_1744_WMIQueriesR3.png" /></p>
This time neither value is 1.
<h1>Our new logic…</h1>
Based on the above, we need to update our logic; "ReturnValue" property is no longer as useful to us anymore. I could have checked either property to see if they are "1" and if so, all is good. However, by just taking the uValue, I can:
<ul>
 	<li>If uValue == 0: Enforcement is disabled</li>
 	<li>Else (1 or nul): Enforcement is enabled</li>
</ul>
<h1>What about Remote Registry</h1>
Remote Registry, through testing, will always give you the "uValue".

&nbsp;

&nbsp;

<strong>Special thanks to Kurt Falde (whose <a href="https://github.com/kurtfalde/Get-Auditpol"><span style="color: #0563c1;text-decoration: underline">GitHub Audit checker</span></a> I used as a reference for part of this), Brian Mahaffey and Jon Stevenson.</strong>

&nbsp;

Happy hunting (or in this case, measuring compliance so you <em>can effectively </em>hunt)!

Andrew (@ciberesponce)]]></content:encoded>
    </item>
    <item>
      <title>ATA Auditing (AuditPol, Advanced Audit Settings Enforcement, Lightweight Gateway Service discovery)</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/ata-auditing-auditpol-advanced-audit-settings-enforcement-lightweight-gateway-service-discovery</link>
      <pubDate>Fri, 18 Aug 2017 13:38:43 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=1455</guid>
      <description><![CDATA[This blog is updated at https://ciberesponce.com
&nbsp;

NOTE: This blog and code was updated to...]]></description>
      <content:encoded><![CDATA[<span style="color: #ff0000"><strong>This blog is updated at https://ciberesponce.com</strong></span>
<blockquote>&nbsp;

NOTE: This blog and code was updated to include a new targeting feature so only 1 domain/child-domain can be targeted for assessment.  This will still <em>discover all DCs in the Forest</em>, however, only the DCs in the targeted domain will be assessed.</blockquote>
&nbsp;

Advanced Threat Analytics (ATA) v1.8 added new capabilities to monitor suspicious and anomalous activity within an Active Directory domain. This increased the number of Event ID's ATA requires.

Customizing the Domain Controller's Audit Settings could stop the Domain Controller from auditing activities required by ATA. This customization is common in many organizations and can have a negative impact on ATA. Additionally, many Cyber shops are not aware of their Domain Controller's current audit policy settings nor the level of effort (LOE) changes in ATA v1.8 with Gateways vs. Lightweight Gateways (LWGWs).

Starting in ATA 1.8 the LWGWs' event ID's are <em>automatically </em>read and required data is extracted. Meanwhile for Gateways, event IDs still must manually be forwarded or sent to the ATA Gateway.

In previous versions of ATA, the only event required was event ID 4776. In ATA v1.8, ATA requires the following event IDs <a href="https://docs.microsoft.com/en-us/advanced-threat-analytics/install-ata-step6">4732, 4733, 4728, 4729, 4756, 4757 in addition to 4776</a>.

This script will help make sense of the above variables to ensure you are in good status.
<h2>About the script</h2>
First off, the script is located here: <a href="https://aka.ms/AtaAuditing">https://aka.ms/AtaAuditing</a>

In this script, we:
<ol>
 	<li>Discover all Domain Controllers (DC)</li>
 	<li><strong>Via WMI</strong>, enumerate if Audit Policy settings are enforced (a Microsoft best practice; on by default)</li>
 	<li><strong>Via WMI</strong>, enumerate the Audit Policy settings per DC</li>
 	<li><strong>Via WMI</strong>, discover if the DC has the ATA Lightweight Gateway (LWGW) installed or not</li>
 	<li>Compares the outputs above and provides a high-level status</li>
</ol>
We chose WMI since it is always on for Domain Controllers and is a much more reliable method than Windows Remote Management (WinRM). In addition, just like the ATA Sizing Tool, it is very light weight. Further, this allows you, our customer, to test that ATA v1.8 can detect WMI Execution against the Domain Controller <span style="font-family: Segoe UI Emoji">😊</span>. Eventually, we will push this script into the <a href="https://aka.ms/atasizingtool">ATA Sizing Tool</a> script, which uses the same WMI protocol. The script will be officially "supported" by Microsoft when it is merged into the ATA sizing Tool. In the meantime, we didn't want to wait – so we decided to publish early!
<h2>Running the script</h2>
The script requires Domain Admin (or equivalent) privileges to execute. This can be done from the Domain Controller itself or from an admin workstation <em>where such credentials can be exposed </em>(i.e. "Admin Workstation"). If running from a Domain Controller, the script ensures that we only query 10 other DCs at a time, thus throttling the script.

To run the script, simply download the script and its supporting files and execute from the path ".\Measure-AtaDeployment.ps1". Again, by default, this will throttle the script to 10 DCs at one time, and will assess the environment against ATA v1.8 requirements. If you have multiple Domains in a single Forest, ensure the script is executed with Enterprise Admin (or equivalent) privileges.

However, if you are running this from a non-DC, or don't want to be limited by the built-in throttling, you can execute the script using the "RunJobsThrottle" parameter:
<p style="text-align: center"><img class="aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/081817_1837_ATAAuditing2.png" /></p>
And, for whatever reason you are still on ATA v1.7, use the "AtaVersion" parameter to set this to "1.7":
<p style="text-align: center"><img class="aligncenter" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/081817_1837_ATAAuditing3.png" /></p>
<p style="text-align: left">To target just a particular domain/child-domain, use the "Fqdn" parameter.  In this example, we will only target the "child.contoso.com" domain.  Note that the script will still discover <em>all domain controllers in the Forest</em>, but it will only do the assessment against the DCs in the provided domain.  In addition, this parameter is not required and thus, by default, the assessment will be at the Forest and all respective Domain Controllers.</p>
<p style="text-align: left"><img width="665" height="298" class="aligncenter wp-image-1475 " alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/ata-auditing_fqdn.png" /></p>

<h2>Results</h2>
The results are provided back in both the PowerShell console and exported as CSV, in a "Results" folder in the same location as where the script is when executed. Because we believe in "run once, use many", we decided to preserve the raw Audit Policy results for each DC. If you have no other use-case for these, simply ignore them and only look at the "Assessment-{date}" file. However, you might find other great information in those files…
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/081817_1837_ATAAuditing4.png" /></p>
The Assessment Results are in a CSV file and will nicely show you which DCs are LWGW, which have the right policy settings, and if something failed, it will show you where it failed:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/081817_1837_ATAAuditing5.png" /></p>

<h2>Fixing Issues</h2>
If advanced audit setting policies are enforced, remediation of any issues is trivial.

However, if issues are identified, use the following resources to help remediate:
<ul>
 	<li>For more information on Force audit policy subcategories: <a href="https://technet.microsoft.com/en-us/library/dd772710(v=ws.10).aspx">https://technet.microsoft.com/en-us/library/dd772710(v=ws.10).aspx</a></li>
 	<li>For enabling a audit policy subcategory: <a href="https://docs.microsoft.com/en-us/windows/device-security/auditing/advanced-security-audit-policy-settings">https://docs.microsoft.com/en-us/windows/device-security/auditing/advanced-security-audit-policy-settings</a></li>
</ul>
<h2>What about that WMI Code Execution detection in ATA v1.8?</h2>
In the above example, we can see each DC's FQDN, their overall Status and the specific assessment results. You can see that even if all the assessment results come back good, we make a friendly reminder for all non-LWGWs to ensure events are manually being forwarded to the ATA Center. For more on that, please refer <a href="https://docs.microsoft.com/en-us/advanced-threat-analytics/install-ata-step6">here</a>; note that we support Windows Event Forwarding (WEF) and Windows Event Collector (WEC); instructions <a href="https://blogs.technet.microsoft.com/enterprisemobility/2016/11/04/advanced-threat-analytics-event-log-collection/">here</a>.

And, as promised, ATA v1.8 detects WMI Execution against the DC. Since this script is doing just that, executing very specific commands on the DCs via the WMI protocol, ATA detects this. In my lab environment, thanks to ATA, you know exactly from where the Post Deployment script was ran (and by who).
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/081817_1837_ATAAuditing6.png" /></p>
To further test ATA's detection capabilities, we recommend you head to the <a href="https://aka.ms/ataplaybook">ATA SA Playbook</a>.
<h2>Getting Help</h2>
Until this fully merges into the ATA Sizing tool, any issues or questions can be sent to <a href="mailto:aharri@microsoft.com">aharri@microsoft.com</a> and <a href="mailto:askcesec@microsoft.com">askcesec@microsoft.com</a>. If having issues, please do attach the <em>transcript</em>, located in the "Transcript" folder.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/081817_1837_ATAAuditing7.png" /></p>
Happy hunting!

Andrew (<a href="https://twitter.com/ciberesponce">@cibereponce</a>)

&nbsp;

Reviewers:
Gershon (<a href="https://twitter.com/gman4626">@gman4626</a>)
Marie (<a href="https://twitter.com/mariegroover">@mariegroover</a>)]]></content:encoded>
    </item>
    <item>
      <title>ATA + OMS</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/ata-oms</link>
      <pubDate>Thu, 08 Jun 2017 20:23:44 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=1355</guid>
      <description><![CDATA[This blog is updated at https://ciberesponce.com

&nbsp;

Installing Operational Management...]]></description>
      <content:encoded><![CDATA[<span style="color: #ff0000"><strong>This blog is updated at https://ciberesponce.com</strong></span>

&nbsp;

Installing Operational Management Suite (OMS) on top of Advanced Threat Analytics (ATA) is dead simple. It is even more simple if your ATA Center is installed in Azure as deploying the OMS agent on Azure VMs is one click.

OMS continues to gain momentum as it provides a single-pane-of-glass. It's integration into things like Azure Automation allow for very wide and interesting use-cases. Fusion with the Microsoft Security Graph (provided by source from Microsoft and its third parties where we spend over <strong>$10M USD/year</strong>) makes it all that much powerful.

This blog will build on the previous blogpost on this topic, located <a href="https://blogs.technet.microsoft.com/msoms/2017/03/09/microsoft-advanced-threat-analytics-support-in-oms-security/">here</a>. In this referenced blog, <a href="https://blogs.technet.microsoft.com/msoms/2017/03/09/microsoft-advanced-threat-analytics-support-in-oms-security/">The Scripting Guys</a> discuss in detail on why Syslog is better then both SMTP and the Windows Event Log route. Note that we aren't saying turn off Windows Event Log/Windows Event Forwarding <strong><em>into</em></strong> ATA Center, this is specific to getting events <strong><em>out of</em></strong> the ATA Center.

Let's get started.
<h2>Configure ATA</h2>
Once you get ATA installed (whether on-prem or in Azure, as long as it's up and running and has Gateways), we need to configure it's <strong>syslog. </strong>From the ATA Console, on the top right, select the options button, then "Configuration" button.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060917_0127_ATAOMS1.png" /></p>
In the Syslog navigation pane, use the following settings:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060917_0127_ATAOMS2.png" /></p>
The "Syslog server endpoint" should be <strong>127.0.0.7</strong> with the port <strong>5114</strong>. Note that <strong>127.0.0.7 </strong>is not a typo, this is another dedicated IP for <strong>localhost</strong>. Once we insert these values, press the blue button at the bottom, "Send test syslog message".

That is literally all that is needed to be configured with ATA. The OMS installation is just as easy…
<h2>Create OMS Workspace (if needed)</h2>
From the Azure Portal, if you already have an existing OMS/Log Analytics Portal, great, use that one. If not, select the Log Analytics Button:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060917_0127_ATAOMS3.png" /></p>
Then, let's go ahead and select "Add" and fill out the respective data.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060917_0127_ATAOMS4.png" /></p>
Great, we are almost done.
<h2>Connect ATA Center to OMS Workspace</h2>
If you decided to install the ATA Center in Azure, you are a few clicks away from connecting the VM to your workspace.

Under the "<strong>Workspace data sources</strong>" section, select "<strong>Virtual Machines</strong>" and find your ATA Center VM in the list. Then press the "Connect" button. That's it!
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060917_0127_ATAOMS5.png" /></p>
If you decided to install ATA Center on-prem, no worries, your install is almost just as easy. Follow this guide here: <a href="https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-windows-agents#download-the-agent-setup-file-from-oms">https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-windows-agents#download-the-agent-setup-file-from-oms</a>
<h2>Test the connection</h2>
Once you see the connection successful, let's get bits on the wire and see them show up. The quickest way is to run the very first attack we introduce in the <a href="https://aka.ms/ataplaybook">ATA Playbook</a>. Attempting to do a Zone Transfer from a machine against the Domain/DNS-server will trigger an alert.

From any computer, perform the following <strong>nslookup </strong>command to attempt to dump the contents of the DNS server:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060917_0127_ATAOMS6.png" /></p>
As you see the "Query refused", go back to OMS and wait for it to show up. You won't wait too long. Back in the OMS Portal, in the "<strong>Security And Audit</strong>" view, we should see the new "<strong>SecurityDetection</strong>" alert. Clicking on the alert, our Log Search view opens up where we can start doing all sorts of great queries against this and all other OMS data sources!
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060917_0127_ATAOMS7.png" /></p>
We now OMS integration on our ATA—tested and approved.

&nbsp;

Happy hunting!

Andrew]]></content:encoded>
    </item>
    <item>
      <title>Setting up Damn Vulnerable Web App (DVWA) on Ubuntu in Azure</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/setting-up-damn-vulnerable-web-app-dvwa-on-ubuntu-in-azure</link>
      <pubDate>Thu, 01 Jun 2017 22:04:06 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=895</guid>
      <description><![CDATA[This blog is updated at https://ciberesponce.com

&nbsp;

Getting familiar with attacks is step...]]></description>
      <content:encoded><![CDATA[<span style="color: #ff0000"><strong>This blog is updated at https://ciberesponce.com</strong></span>

&nbsp;

Getting familiar with attacks is step one of knowing what you're up against. One way to do that is getting a vulnerable application to hit against and sharpen your skills. Nothing beats Damn Vulnerable Web App (DVWA).

Here are the steps to get Damn Vulnerable Web App up and running in the Azure environment, all done via SSH (no RDP required).
<h3>Deploy Ubuntu 16.04 LTS</h3>
As you should always use the latest Ubuntu version, it's also important to stay 'stable'. To that end, we recommend sticking with the Long Term Support (LTS) versions of Ubuntu to get the best support.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa13.png" /></p>

<h3>SSH into machine once deployed</h3>
I typically recommend Bash for Windows, installing SSH. Alternative is a PowerShell SSH <a href="https://github.com/PowerShell/Win32-OpenSSH"><span style="color: blue;text-decoration: underline">here</span></a>.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa21.png" /></p>

<h3>Add repository to get php5.6</h3>
Run the following command to add the repository to get PHP 5.6 to work on Ubuntu 16.04. DVWA requires this version of PHP as it was written for it. The DVWA app itself would need to be rewritten for later versions of PHP; thus in the meantime, do this.
<ul>
 	<li>sudo add-apt-repository ppa:ondrej/php</li>
</ul>
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa31.png" /></p>

<h3>Update and install</h3>
After installing the new repo, let's update what packages apt-get will discover and install the necessary packages for PHP5.6
<ul>
 	<li>sudo apt-get update</li>
 	<li>sudo apt-get install php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-gd</li>
</ul>
<h3>Install mysql</h3>
Time to install MySQL
<ul>
 	<li>sudo apt-get install mysql-server</li>
</ul>
<span style="color: black"><strong>Remember password for root of mysql (we use it later)
</strong></span>
<h3>Install Git (to pull down DVWA)</h3>
We will use Git to pull down DVWA via GitHub, so first, of course, we need git!
<ul>
 	<li>sudo apt-get install git</li>
</ul>
<h3>Clone DVWA against GitHub</h3>
Now let's pull down the bits…
<ul>
 	<li>cd /var/www/html</li>
 	<li>sudo git clone <a href="https://github.com/ethicalhack3r/DVWA"><span style="color: blue;text-decoration: underline">https://github.com/ethicalhack3r/DVWA</span></a></li>
</ul>
<h3>Modify DVWA settings for MySQL permissions</h3>
Time to configure DVWA to know about our MySQL settings
<ul>
 	<li>cd DVWA/</li>
 	<li>sudo vi config/config.inc.php.dist</li>
</ul>
Modify 'db_password' parameter for MySQL password (from step 5):
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa41.png" /></p>

<h3>Modify permissions to give Apache privileges to traverse directory</h3>
In order for Apache to have permissions to present or even execute any of the PHP code (the DVWA itself!), we need to give it permissions. Since this is "damn vulnerable", let's make it even more so with a chmod 777
<ul>
 	<li>sudo chmod -R 777 /var/www/html/DVWA</li>
</ul>
<h3>Move the PHP Config file</h3>
Now let's move our configured DVWA file to a file that makes it of value… (done by the DVWA folks on purpose…):
<ul>
 	<li>cp config/config.inc.php.dist config/config.inc.php</li>
</ul>
<h3>Set apache's Server Name</h3>
We need Apache to stop complaining about not knowing its Fully Qualified Domain Name (FQDN). Let's give it just what it wants…
<ul>
 	<li>sudo vi /etc/apache2/apache2.conf</li>
</ul>
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa51.png" /></p>

<h3>Configure PHP to enable Apache URL Includes</h3>
Configure to enable PHP to support "allow_url_encodes". This is necessary for the DVWA to work.
<ul>
 	<li>sudo vi /etc/php/5.6/apache2/php.ini</li>
 	<li>Find "allow_url_include" parameter and set it to "On" (line 835)</li>
</ul>
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa61.png" /></p>

<h3>Restart Apache</h3>
Now that we made changes, specifically around PHP and the permissions in the DVWA folder, we should restart the Apache service.
<ul>
 	<li>sudo /etc/init.d/apache2 restart</li>
</ul>
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa71.png" /></p>

<h3>Ensure Azure NSG can forward HTTP traffic to this machine</h3>
All should be good. Now we just need to configure Azure to make this HTTP endpoint routable via the Network Security Group of the VM. Go to the NSG mapped to this VM and make the following changes:
<ul>
 	<li>Add to inbound security rules for HTTP traffic</li>
</ul>
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa81.png" /></p>
Your inbound rule policies should now look like this:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa91.png" /></p>

<h3>Traverse in browser to public IP of Ubuntu machine</h3>
Almost done, now we just need to head to the location we just configured everything. Go to the site's URL, adding /DVWA to it. It will forward you to the setup.php url below (knowing the application needs to be setup still).
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa101.png" /></p>
Press "Create / Reset Database". Watch all the successes happen :)
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa111.png" /></p>

<h3>Login and one last configuration…</h3>
Hard part is done. Now we login…

User: admin
Pass: password

In DVWA Security tab, make DVWA go to "Low" settings (i.e. Vulnerable)
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/06/060217_1516_SettingupDa121.png" /></p>
Happy hacking!

Andrew]]></content:encoded>
    </item>
    <item>
      <title>SmartCard and Pass-the-Hash</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/smartcard-and-pass-the-hash</link>
      <pubDate>Wed, 17 May 2017 16:05:08 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=765</guid>
      <description><![CDATA[On a pretty consistent basis, SmartCard and Multi-factor Authentication (MFA) technologies are...]]></description>
      <content:encoded><![CDATA[On a pretty consistent basis, SmartCard and Multi-factor Authentication (MFA) technologies are brought up when discussing Pass-the-Hash/Pass-the-Ticket with customers. Many customers believe they do not need to worry about such attacks as they have non-repudiation.

However, <strong>what Smartcard was set to solve was before Pass-the-Hash/Ticket (or Overpass-the-Hash) was a real thing</strong>! At that time, preventing users from providing their cleartext password to a fake website (i.e. waterhole attack) was the goal--how could we prevent that from happening? Here, hardware-backed authentication was born. There was <strong>no password</strong> to leak, as the user himself/herself didn't know it either! They simply had a pin, backed with hardware public key encryption.

But one small issue...

At that time, the <strong>threat was really loss of a plaintext password</strong>.  On the backend, a random NTLM hash was given to the user.  The NTLM hash stays the same--until the user changes their password. But if the user doesn't know their password, how would they change it? There lies part of the problem... but there was a larger previously unknown threat evolving...
<blockquote>"What Smartcard was set to solve was before Pass-the-Hash/Ticket (or Overpass-the-Hash) was a real thing"</blockquote>
Then, <strong>Pass-the-Hash became a thing</strong> which <strong>Mimikatz</strong> and <strong>Windows Credential Editor (WCE)</strong> made popular. Here, the adversary <em>doesn't even care anymore about the entropy</em> of the NTLM hash (or that the user doesn't even technically have a known cleartext password), they simply harvest the credentials in memory (NTLM hash, Kerberos TGT) and use it to inject it in other processes to masquerade as that user. But without a smartcard, how is that possible? Well, SmartCard Required for Interactive Logon (SCRIL) has two very important words in it: "Interactive Logon". Interactive Logons are only 2 types of logons that can occur:

<img width="594" height="322" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/05/051717_2052_SmartCardan1.png" />

What does this mean? I can steal the NTLM hash and move laterally with that credential via the other logon types! Don't try to prevent SCRIL-enabled users from only doing these two logons either—this will break things like allowing them to manage devices and be productive employees by automating some of their own tasks. Better yet, lets focus on the problem.

What a better way to do that then a quick video? :)
<div style="height: 0;padding-bottom: 45%"><iframe width="640" height="360" src="https://www.youtube.com/embed/hxS30UZLKVA?ecver=2" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div>
So now what do we do with this, knowing the <em>actual</em> risk?

Well first, first step is <strong>knowledge</strong>.  Next step, lets see how we can <strong>roll those NTLM hashes</strong>.  We will provide two solutions below.  And of course, we fully recommend our customers and anyone focused on targeted attacks to leverage <a href="http://aka.ms/ataeval">Advanced Threat Analytics!</a>
<h3>PowerShell Script</h3>
Here, a script is provided that discovers your Smartcard Required Interactive Logon (SCRIL) users, and turns the SCRIL-bit off and on. It is this time when the NTLM-hash is randomized.
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/05/051717_2052_SmartCardan2.png" />

<a href="https://blogs.technet.microsoft.com/poshchap/2015/05/08/security-focus-resetting-smart-card-is-required-for-interactive-logon/"><span style="color: black;font-family: Segoe UI;font-size: 10pt">https://blogs.technet.microsoft.com/poshchap/2015/05/08/security-focus-resetting-smart-card-is-required-for-interactive-logon/</span></a><span style="font-family: Segoe UI;font-size: 10pt">
</span>
<h3>Domain Functional Level 2016</h3>
<strong>Domain Functional Level (DFL) 2016</strong> includes a new feature to help get past some of the limitations of the PowerShell script. This is fully supported by Microsoft and we recommend anyone who is using Smartcard Required for Interactive Logon (SCRIL) to turn this bit on!

For more on this:
<a href="https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/whats-new-in-credential-protection">https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/whats-new-in-credential-protection</a>

<img width="300" height="124" class="alignnone size-medium wp-image-776" alt="dfl2012_feature" src="https://msdnshared.blob.core.windows.net/media/2017/05/DFL2012_feature-300x124.png" />

&nbsp;

Welp, that is the quick and dirty on this topic.  Please do check out Advanced Threat Analytics to discover this and other attacks in your environment by focusing on Identity.  Leave questions in the comments!]]></content:encoded>
    </item>
    <item>
      <title>Ubuntu RDP in Azure</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/ubuntu-rdp-in-azure</link>
      <pubDate>Fri, 17 Mar 2017 18:01:40 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=465</guid>
      <description><![CDATA[Many times, I get a question on how do you RDP into a Linux machine created in Azure. So, instead of...]]></description>
      <content:encoded><![CDATA[Many times, I get a question on how do you RDP into a Linux machine created in Azure. So, instead of having the same conversation over and over, I'll blog about it and point folks here . And going one step further, I figured now was a good time to also test out <strong>OpenSSH-Win32</strong>. In addition, this will show you how to do this via the new Azure Portal (vs the Classic Azure portal); managing endpoints is slightly different between the two UIs.

First, if you are on a Windows box, grab OpenSSH-Win32 <a href="https://github.com/PowerShell/Win32-OpenSSH/releases">here</a>. Note that this is still a preview feature as Microsoft continues to port the OpenSSH client to the Windows world, through PoweShell. If you missed this pretty wild announcement, check the announcement <a href="https://blogs.msdn.microsoft.com/powershell/2015/06/03/looking-forward-microsoft-support-for-secure-shell-ssh/">here</a>.

Traverse to where you extracted the files, and connect to the IP address of your Ubuntu server in Azure. As you will see, this is real OpenSSH:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin1.png" /></p>
<p style="text-align: center"><span style="color: #44546a;font-size: 9pt"><em>Figure 1: OpenSSH-Win32
</em></span></p>
Cool! Now we got SSH on Windows and we are connected to our system.
<h2>Ubuntu Configurations</h2>
Now, let's get two things installed:
<ul>
 	<li>xubuntu-desktop (xrdp does not support gnome desktop for Ubuntu in versions <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-linux-classic-remote-desktop">12.04LTS or higher</a>).</li>
 	<li>xrdp (rdp server)</li>
</ul>
Easy…
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin2.png" /></p>
<p style="text-align: center"><span style="color: #44546a;font-size: 9pt"><em>Figure 2: sudo apt-get install xubuntu-desktop
</em></span></p>
And…
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin3.png" /></p>
<p style="text-align: center"><span style="color: #44546a;font-size: 9pt"><em>Figure 3: sudo apt-get install xrdp
</em></span></p>
All that is left is starting the xrdp server (in theory this should start with Ubuntu by default but I like the "trust no one" philosophy… worst case it will yell and tell me the service is already starting!):
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin4.png" /></p>
And now we must ensure the xfce4 (xubuntu) is enabled.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin5.png" /></p>
<p style="text-align: center"><span style="color: #44546a;font-size: 9pt"><em>Figure 4: xfce4-session &gt; ~/.xsession; Note, if you are enabling this for another user, add the user then do this for their home profile instead
</em></span></p>
Next, edit the /etc/xrdp/startwm.sh script, via:

"sudo vi /etc/xrdp/startwm.sh"

The file should look something like this when you are done (insert the "xfce4-session" line before the ". /etc/x11/xsession" line).
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin6.png" /></p>
Then we just need to restart xrdp <img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin7.png" />

We now have what we need installed and configured on Ubuntu.
<h2>Azure Configurations</h2>
Now we need to add the Endpoint to Azure on this machine. Without modifying this, we wouldn't have the right NSG rules on the Azure side to allow the RDP traffic to the VM. Go to the associated <strong>Network Security Group</strong> (NSG) for this VM, which should be created by default when configuring the VM. From the NSG blade for this resource, we can then add the endpoint. We could also do this via PowerShell if we so choose.

Click the add button to the inbound rules, and go ahead and configure this:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin8.png" /></p>
We now have two endpoints on this system, again which is managed via the NSG for the VM:
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin9.png" /></p>

<h2>Make the RDP Connection</h2>
Notice that when we configured RDP it had to be port 3389. That deserves a separate blog at a different time, including what can be done via Azure Security Center and <a href="https://docs.microsoft.com/en-us/azure/security-center/security-center-detection-capabilities">detecting threats on this port</a>.

We can now use our handy dandy <a href="http://www.microsoft.com/en-us/download/details.aspx?id=44989">RDP Connection Manager</a> and make the RDP session.
<p style="text-align: center"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/03/031717_2301_UbuntuRDPin10.png" /></p>
Now, time to make this a vulnerable web application and show the power of <a href="https://docs.microsoft.com/en-us/azure/security-center/security-center-intro">Azure Security Center (ASC)…</a> which shall be another blog post for another day.

Andrew]]></content:encoded>
    </item>
    <item>
      <title>cpassword – MS14-025</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/cpassword-ms14-025</link>
      <pubDate>Thu, 23 Feb 2017 18:40:15 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=406</guid>
      <description><![CDATA[Microsoft announced MS14-025 on 13 May, 2014. However, it continues to be an issue for many IT...]]></description>
      <content:encoded><![CDATA[Microsoft announced MS14-025 on 13 May, 2014. However, it continues to be an issue for many IT organizations, <em>even when patched</em>. I repeat, by simply installing the KB you have not fully remediated the vulnerability (elevate of privileges!) unless you ran the provided PowerShell code to ensure you don't have any existing cpassword Group Policies.

For starters… just how bad is MS14-025? Well, I'm glad you asked. It allows an adversary to jump from regular user and directly become local admin if they can discover a vulnerable policy in SYSVOL. How can this be done? Well, any domain entity has the ability to read from SYSVOL, which is how Group Policies are disseminated across an Enterprise! This means, that even a spearphish email campaign can lead to local admin rights to the adversary, even if you spent <strong><em>tons </em></strong>of time ensuring your users don't run as local admin. <span style="background-color: yellow">I repeat, all that work is for nothing unless you do this and run this script—the KB/patch simply ensures you can no longer create bad policies, it doesn't disable/delete the existing ones!</span> Not only this, but many times this policy manages a local admin account <em>across computers</em>, meaning it can be used to laterally move as well, drastically increasing the likelihood an adversary will find the keys to the kingdom, a domain admin or other highly privileged domain account (or any of these accounts with <a href="http://aka.ms/tier0">Tier-0 equivalency</a>).

<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/02/022317_2342_cpasswordMS1.png" />

Our guidance remains <a href="https://support.microsoft.com/en-us/help/2962486/ms14-025-vulnerability-in-group-policy-preferences-could-allow-elevation-of-privilege-may-13,-2014">here</a>.

Hackers are taking advantage of this for years and unfortunately are very successful via this still. Tools like PowerSploit automatically discover these and reverse the symmetrically encrypted password (that Microsoft was forced to publish, <a href="https://msdn.microsoft.com/en-us/library/cc422924.aspx">which is/has been on MSDN giving attackers such access</a>), giving the attacker the plaintext password.

However, for Incident Responders and those who want to go further than just checking for these policies but to truly understand what is at stake if/when they are discovered, I've developed one that extends our previous guidance. It can be found here: <a href="http://aka.ms/cpasswordscript">http://aka.ms/cpasswordscript</a>. As the screenshot shows, policies can be complex, including possibly even having the account disabled! Knowing this information could really help drive the urgency if/when such policies are discovered… you should certainly always delete these and transition to our <strong><em>free </em></strong>Local Account Password Solution (LAPS; <a href="http://aka.ms/LAPS">http://aka.ms/LAPS</a>, which leverages Group Policy Objects Client Side Extensions (CSE)!), but obviously we know there are many other actions an IT team has, many of which are priority. And of course, IR teams should run this whenever they head to a customer… without running this, you potentially are missing a massive gap.

<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/02/022317_2342_cpasswordMS2.png" />

My script above keeps provides relevant data to make relevant decisions, so you:
<ul>
 	<li>Can quickly tell if the policy has the account disabled</li>
 	<li>Can quickly see impacted user</li>
 	<li>Can quickly assess the exact Path of the where the policy is</li>
 	<li>Can quickly identify the exact GP Global Unique ID (GUID) (this can easily be used to remove such policies if ran with the right privileges)</li>
</ul>
The script doesn't give you the plaintext password, purely to prevent potential liability if your team is external to the customer whom you are providing a service to. However, just know, its <a href="https://msdn.microsoft.com/en-us/library/cc422924.aspx">easily decrypted</a> which is why this vulnerability exists in the first place.

Hopefully this helps someone and stop another Fortune 500 or major government entity from being completely compromised because of a single Group Policy they didn't know existed…

And do let us know if you have discovered such policies in your environment or if you have any questions on the above.

Andrew]]></content:encoded>
    </item>
    <item>
      <title>ATA Playbook Released</title>
      <link>https://docs.microsoft.com/archive/blogs/positivesecurity/ata-playbook-released</link>
      <pubDate>Wed, 15 Feb 2017 04:11:42 GMT</pubDate>
      <dc:creator><![CDATA[kplaxmaster]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/positivesecurity/?p=245</guid>
      <description><![CDATA[The Advanced Threat Analytics Playbook is released.

It includes a breakdown of how to test (and...]]></description>
      <content:encoded><![CDATA[The Advanced Threat Analytics Playbook is released.

It includes a breakdown of how to test (and therefor learn!) ATA and the real-world research tools that are available on the public Internet. The goal here was simple:
<ul>
 	<li>Debunk some myths around pass-the-hash (i.e. SmartCards)</li>
 	<li>Show how these research tools work (and just how easy it is and what they can do)</li>
 	<li>Learn what to do about it so your environment isn't a victim of this!</li>
</ul>
The playbook walks through lab setup to picking up these research tools to showing you how to think like an attacker. All for free

Check it out here: <a href="http://aka.ms/ataplaybook">http://aka.ms/ataplaybook</a>
Evaluate ATA: <a href="http://aka.ms/ataeval">http://aka.ms/ataeval</a>

Leave comments here if you have questions or suggestions!

Cheers,

Andrew]]></content:encoded>
    </item>
  </channel>
</rss>