<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chapter8 on Medium]]></title>
        <description><![CDATA[Stories by Chapter8 on Medium]]></description>
        <link>https://medium.com/@chapter8?source=rss-23276cd5f18b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sioOVc8auCHVZB--PcKxbQ.png</url>
            <title>Stories by Chapter8 on Medium</title>
            <link>https://medium.com/@chapter8?source=rss-23276cd5f18b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:31:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chapter8/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Purple Team “War” Story IV — Blue wins]]></title>
            <link>https://chapter8.medium.com/purple-team-war-story-iv-blue-wins-4e142178c07f?source=rss-23276cd5f18b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e142178c07f</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[purple-team]]></category>
            <category><![CDATA[cooperation]]></category>
            <category><![CDATA[teamwork]]></category>
            <dc:creator><![CDATA[Chapter8]]></dc:creator>
            <pubDate>Wed, 01 Feb 2023 19:31:09 GMT</pubDate>
            <atom:updated>2023-02-06T08:04:20.330Z</atom:updated>
            <content:encoded><![CDATA[<h3>Purple Team “War” Story — №4: Blue wins</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mewulzaoeVk73Iervw6pcg.jpeg" /><figcaption>The first ever Chapter8 coin!</figcaption></figure><blockquote>We hand out our Chapter8 coin only if we are convinced a security posture is mature enough. If the Red Team couldn’t obtain any crown jewels. Simply put; if the Blue team won the sparring match (and thus the entire team because, you know, Purple).</blockquote><p>This is the story of an IT provider we met a few times during some of our missions and how they vastly improved their customers’ security.</p><p>Enough with the Red Team success stories. Done with Domain-Admin-before-lunch. Be gone, credentials in cleartext files in world-readable directories. Lack of multi-factor authentication. Legacy systems in the corner of a network. The scales <em>can</em> shift and we have this Story to prove it.</p><p>The main ingredients for this Blue Team success are: leftovers from a previous can of whoop-ass, a cup of cooperation, a scoop of learning curve, two ounces of sparring and a large dose of willingness to learn. One does not simply hand out a Chapter8 coin!</p><p>Let’s set some context and dive right in.</p><p><strong>Disclaimer<br></strong>At Chapter8, most of our Missions take place at the highest levels of the Dutch public and/or private sector. That is why we are very careful about presenting client-related information. Being fictional in context, but true in tech, these stories are the way to get the gist of a <em>train-as-they-fight</em> Purple Team Mission across and contribute to your security mentality.</p><p><strong><em>Chapter one: humble beginnings.</em></strong></p><p>Early 2021 we set out on a Mission. The high-profile client uses a third party as their IT infrastructure provider. The infrastructure is remotely managed and part of our Mission is — in our true Purple style — the evaluation of detective measures and forensic readiness.</p><p>We’ll be outright honest: the Blue Team got its butt kicked. We could plug in our Whisperbox implant without problems, run <a href="https://github.com/SpiderLabs/Responder">Responder</a>, get a few NTML-hashes before lunch, one of which was Administrator@DOMAIN which was used as a service account and had a password that started with a capital G, consisted of a word in the standard Dutch dictionary, and ended with the well-known !.</p><p>From there on, it was a hop and a skip towards the organization’s crown jewels, because domain admin is nice but crown jewels are nicer (and often do not require domain admin privileges) and a completely backdoored IT infrastructure was the icing on the cake.</p><p>The IT provider did a great job at keeping stuff running, but had no proper forensic readiness: there was no central logging and monitoring and incident handling procedures were not in place. Good thing we brought our Hunterbox, an open-source SOC-in-a-box to show them what visibility they’d missed. Also, the client was supposed to have a few honeypots hidden in the network. We tried very hard to find and fire them, but to no avail 🤷‍♂.</p><p>The lack of password policy enforcement and network access controls did not help this physically nearly unaccessible environment. Do I hear you say “Watermelon!”? Yes, you are right. This was the epitome of a hard shell and a soft inside.</p><p>So far, a pretty standard Red Team assignment.</p><blockquote>Oftentimes we get this question after a Purple Team Mission: “How do we perform, related to other clients?”. And our standard answer is “On average.” Does “on average” mean “a sufficient grade”?</blockquote><blockquote>No. The sad truth is that the average cybersecurity posture is low.</blockquote><p>What stood out from the beginning was the Blue Team’s eagerness to learn. Of course, they went through the stages of denial, anger and grief but they got to the acceptance-phase pretty quickly; we’d like to think that this has a direct correlation with a purple team approach instead of a red team/penetration test approach, but we lack empirical proof for that assumption.</p><p><strong><em>Chapter two: the learning curve </em></strong><em>📈</em><strong><em>.</em></strong></p><p>Fast forward one year and a bit. The client challenges us to re-test their infrastructure. A keen bit of our recommendations had been followed up and both client and IT provider felt they were ready for a rematch. Gloves on. In the Red corner: Chapter8. In the Blue corner: client, IT provider and … Chapter8!</p><p>And the progress was palpable! No more plugging-in-rogue-devices, but pNAC. No more watermelon-mush, but segmentation. No more playing around on a VDI without getting noticed by the Blue Team (user-and-entity-based analytics (UEBA) is a really, really good defensive measure).</p><p>Alas, the Red Team got the better of the Blue Team by “living off the land” — using the information that was readily available from the low-privileged account that served as a starting point. While there was unmistakenbly a lot of progress on the technical level, the amount of readable credentials in files remained tremendous. Not that all that information was available from the get-go. But using one set of credentials led to access to more information, leading to more credentials, leading to… you get the point.</p><p>So did the Blue Team and what started out as a technical learning curve grew into a cultural learning curve. Educating the population, so to speak. A very different ballgame. But one that could be focussed on right now, because of all the technical progress the Blue Team had made. Security, it is a continuous process.</p><p><strong><em>Chapter three: get over here!</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*ytdvN7O_bneb5jSX" /><figcaption>Scorpion — Mortal Kombat © Midway</figcaption></figure><p>Let’s fast forward a few months again. We get a call from the IT provider.</p><blockquote>“Look, we’ve got this other client. They want their security posture tested. We built their network with the lessons from our previous encounters in mind. Are you up for the challenge?”</blockquote><p>Wait whut? Are you kidding? Born ready!</p><p>And what a sparring session this became. The Red Team started, as usual, with low privileged accounts on standard workstations. These were thin clients and even though the BIOS password was not changed from the default, it proved impossible to escalate privileges or gain more network access due to hard disk encryption and a very, very segmented network.</p><p>The low privileged accounts proved to be exactly that. No information to live off the land was available. The VDIs proved to be not only hardened but also tightened with <a href="https://learn.microsoft.com/en-us/azure/sentinel/identify-threats-with-entity-behavior-analytics">UEBA</a>, so the Blue Team had a blast seeing the Red Team struggle. No open network shares. Man, what a change of pace. Even the internal documentation platforms did not contain information that could be used as a stepping stone.</p><p>Was everything perfect? No, every environment is prone to recommendations, albeit with low to medium impact on the crown jewels.</p><p>And there was more.</p><p>The Blue Team trapped the Red Team.</p><p>Through the use of a honeytoken…</p><p>…which they did not mention in the intake, the sneaky sneaks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0_b15IA8zDqfg2MKLHt5BQ.jpeg" /><figcaption>Honeytoken much?</figcaption></figure><p>By suggesting the presence of a plain text, temporary password in the description field of one of the Active Directory-accounts, they lured the Red Team into testing these credentials. The login attempt alerted the Blue Team to the presence of the Red Team and from that point, the incident handling procedures kicked in. And although there was room for improvement around these procedures and the overall forensic readiness of client and IT provider, they did not fall prone to panic and focussed on situational awareness instead. Good job Blue Team!</p><p>Firing that honeytoken enticed much joy, even so with the Red team, because pulling off this feat really showed how far the IT provider had come. In fact, apart from some minor findings, the only real improvements for this client were based around an insider-threat-scenario.</p><p>Needless to say that coming back like this from the first two encounters is pretty bad-ass.</p><p><strong><em>Chapter four: blue wins! Now what?</em></strong></p><p>Of course, &lt;marketing mode&gt;the real winner of this Purple Team “CTF” was the client&lt;/marketing mode&gt;. The Walkthroughs — the final presentations of the results to tactical and c-level — were of a different tone than usual. Both client and IT provider got the first ever Chapter8 Coin.</p><blockquote>The coin says on one side: <em>Exercitati exercitum tuum</em>, which roughly translates to “We trained your defenders”. On the other side it says: <em>Hoc probamus</em>, wich translates to “we approve of this”. Pretty cool, huh!</blockquote><p>When their Active Directory and O365 configuration was audited by Microsoft recently, they scored a 3.5 out of 4, which positively surprised the software giant. That small IT provider is now one of our preferred partners and if you want to get in touch with these beautiful badasses, <a href="https://chapter8.com/contact">reach out to us</a> (they’d rather not be named here because, you know, #opsec).</p><p>To conclude this “War” Story: we’re happy that our vision on Purple Teaming turned out to be a supporting vector in the learning curve of both client and provider. This is ultimately why we do what we do. To enhance forensic readiness with teamwork, because teamwork...</p><p>well…</p><p>…despite it being corny as hell…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b94dg0nuqRaaN5TZjHfqXA.jpeg" /><figcaption>That.</figcaption></figure><p>And on that note, we’d like to conclude this narrative.</p><p><strong><em>Wrapping it up.</em></strong></p><p>Many thanks for keeping with us until the end of this story. If you want to know more about Purple Teaming, please visit <a href="https://chapter8.com/">https://chapter8.com</a> to meet our team and read about our Mission to make cyber safer from the inside.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e142178c07f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Patching Intel’s SFP+ driver for …]]></title>
            <link>https://medium.com/chapter8/patching-intels-sfp-driver-for-4b5f1a6b400f?source=rss-23276cd5f18b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b5f1a6b400f</guid>
            <category><![CDATA[finisar]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[sfp]]></category>
            <category><![CDATA[intel]]></category>
            <category><![CDATA[ixgbe]]></category>
            <dc:creator><![CDATA[Chapter8]]></dc:creator>
            <pubDate>Thu, 26 Aug 2021 13:09:30 GMT</pubDate>
            <atom:updated>2022-02-10T15:51:42.098Z</atom:updated>
            <content:encoded><![CDATA[<h3>Patching Intel’s SFP+ driver for …</h3><p>…well, to make things work, honestly. Not for fun nor profit.</p><blockquote>TL;DR: Intel’s ixgbe-driver sees our Finisar 10Gb SPF+ cards as 1Gb, and therefor loading these drivers will fail. But this patch by <a href="https://crypt0jan.medium.com/">Crypt0jan</a> will make them work and spare you his headaches, anger and frustration. You’re welcome.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0nTVeJ26-JaYyDB--NeO6A.png" /><figcaption>Photo by <a href="https://unsplash.com/@elisa_ventur?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Elisa Ventur</a> on <a href="https://unsplash.com/s/photos/frustration?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><pre>Tested with:</pre><pre>OS: Ubuntu 20.04.02 LTS</pre><pre>HPE Ethernet 10Gb 2P 560FLR-SFP+ 665243-B21:   <br> * <a href="https://www.creoserver.com/hp-560flp-da2-dual-port-10gbit">https://www.creoserver.com/hp-560flp-da2-dual-port-10gbit</a><br> * SFP+ Module: 2x Finisar 10G SFP+ Transceivers FTLF8528P3BNV</pre><pre>HP 560SFP+ 2x 10GBE Adapter PCI-E 669279–001:<br> * <a href="https://www.creoserver.com/hp-560flp-da2-dual-port-10gbit-pcie">https://www.creoserver.com/hp-560flp-da2-dual-port-10gbit-pcie</a><br> * SFP+ Module: 2x Finisar 10G SFP+ Transceivers FTLF8528P3BNV</pre><p>So, we desperately needed SPF+ 10Gb interfaces for one of our larger <a href="https://chapter8.com/assignments">assignments</a>. We bought a fat server and all the hardware, but up came this issue: it seems that the Finisar 10G SFP+ adapters are considered 1G instead of 10G by Intel’s driver. This leads to these messages in the kernel:</p><pre>[ 1561.382364] ixgbe 0000:08:00.1 0000:08:00.1 (uninitialized): ixgbe_check_options: FCoE Offload feature enabled<br>[ 1561.382366] ixgbe 0000:08:00.1 0000:08:00.1 (uninitialized): allow_unsupported_sfp Enabled<br>[ 1561.392421] ixgbe 0000:08:00.1: failed to load because an unsupported SFP+ or QSFP module type was detected.<br>[ 1561.392453] ixgbe 0000:08:00.1: Reload the driver after installing a supported module.</pre><p>As you can see, we already tried to enable the option allow_unsupported_sfp, but that did not have the desired effect. Now, let&#39;s get these to work.</p><p><strong>Step 1: Download latest driver from Intel</strong></p><p>At the moment of writing this, the latest version is 5.12.5. To be downloaded from here: <a href="https://www.intel.com/content/www/us/en/download/14302/14687/intel-network-adapter-driver-for-pcie-intel-10-gigabit-ethernet-network-connections-under-linux.html">https://www.intel.com/content/www/us/en/download/14302/14687/intel-network-adapter-driver-for-pcie-intel-10-gigabit-ethernet-network-connections-under-linux.html</a></p><p><strong>Step 2: Patch the driver</strong></p><p>After downloading the tarball, unpack it and look for file ixgbe-5.12.5/src/ixgbe_phy.c. Open it with your favorite text editor and go to line 1478. There should be a code block looking like this:</p><pre>/* Verify supported 1G SFP modules */<br>if (comp_codes_10g == 0 &amp;&amp;<br>    !(hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) {<br>        <strong>hw-&gt;phy.type = ixgbe_phy_sfp_unsupported;<br>        status = IXGBE_ERR_SFP_NOT_SUPPORTED;</strong><br>        goto out;<br>}</pre><p>We’re going to change it to become like this:</p><pre>/* Verify supported 1G SFP modules */<br>if (comp_codes_10g == 0 &amp;&amp;<br>    !(hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||<br>      hw-&gt;phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) {<br>        <strong>printk(&quot; -- sfp_type did not match, custom driver patched applied! \n&quot;);<br>        hw-&gt;phy.type = ixgbe_phy_sfp_intel;<br>        status = IXGBE_SUCCESS;</strong><br>        goto out;<br>}</pre><p><strong>Step 3: </strong><strong>make install</strong></p><p>Run this: $ cd ixgbe-5.12.5/src/; sudo make install. This will create the new module and put it inside the directory: /lib/modules/&lt;KERNEL_VERSION&gt;/updates/drivers/net/ethernet/intel/ixgbe/ixgbe.ko</p><p>Then:</p><ul><li>Unload the old (Ubuntu) module: sudo modprobe -r ixgbe</li><li>Load your shiny new module: sudo modprobe ixgbe</li><li>Take a look at dmesg to see if the interfaces show up: <br>$ dmesg | grep ixgbe</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3uNd-dphsSj5gnPm.png" /><figcaption>Great success!</figcaption></figure><h3>EXTRAS</h3><h4>NETPLAN CONFIG</h4><p>Need your SFP+ devices in Netplan? Add this under the last interface but before version to /etc/netplan/00-installer-config.yaml (mind the indentation):</p><pre>    ens1f0:<br>      dhcp4: true<br>      optional: true<br>    ens1f1:<br>      dhcp4: true<br>      optional: true<br>    ens2f0:<br>      dhcp4: true<br>      optional: true<br>    ens2f1:<br>      dhcp4: true<br>      optional: true</pre><h3>Credits</h3><p><a href="https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/page-2#post-281941">https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/page-2#post-281941</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b5f1a6b400f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chapter8/patching-intels-sfp-driver-for-4b5f1a6b400f">Patching Intel’s SFP+ driver for …</a> was originally published in <a href="https://medium.com/chapter8">Chapter8</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Purple Team War Stories — №3]]></title>
            <link>https://medium.com/chapter8/purple-team-war-stories-3-8e14ac63fb45?source=rss-23276cd5f18b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e14ac63fb45</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[war-stories]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cyber]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Chapter8]]></dc:creator>
            <pubDate>Fri, 13 Aug 2021 13:34:42 GMT</pubDate>
            <atom:updated>2022-08-22T12:20:13.257Z</atom:updated>
            <content:encoded><![CDATA[<h3>Purple Team War Stories — №3</h3><h4>Hacking and defending a hospital, part one</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*paKeHUx5k8gRx7OtTUB5_g.png" /><figcaption>Photo by <a href="https://unsplash.com/@gpiron?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Piron Guillaume</a> on <a href="https://unsplash.com/s/photos/hospital-intensive-care?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Wow, dear readers. It took us a while to come up with another war story, because we were so busy! Because this <a href="https://chapter8.com/assignments">Assignment</a> was quite intensive, we have split the tale into several parts.</p><p>This Assignment was a Mission that took us to an industry that has been — and still is — under enormous pressure: healthcare. Needless to say that this Mission needed to be as non-invasive as possible. Although we are used to working in high pressure environments, there was extra pressure on the non-intrusiveness this time. No penetration testing waiver in the world covers for putting people’s health at risk.</p><p>But we are used to moving stealthy and not breaking things, so we picked up the glove. No crown jewels were explicitly mentioned for this Mission. “Just see how far you can come”, we were told.</p><p>Did that CISO just smirk?</p><p>Okay.</p><h4>Disclaimer</h4><p>At Chapter8, many of our Missions take place at the highest levels of the Dutch digital security industry, dealing with confidential information. That is why we are very careful about presenting client-related information. Being fictional in context, but true in tech, our war stories are a way to get the technical gist of a <em>train-as-they-fight</em> Purple Team mission across and contribute to your security mentality.</p><h4>But, what is a Purple Team Mission again?</h4><p><em>Security testing usually involves an outside-in penetration test after which a list of vulnerabilities is presented to the client as a ‘to-do-list’. When done like this, the security benefits for the client will only be visible after the recommendations have been adopted. In a medium-sized company, this process could take months.</em></p><p><em>You don’t have the luxury of postponing security benefits for months.</em></p><p><em>A Purple Team Mission starts from within the network (</em><a href="https://chapter8.com/mission"><em>Assume Breach</em></a><em>) and does not solely focus on </em><a href="https://itlaw.wikia.org/wiki/Red_teaming"><em>red teaming</em></a><em>. It brings together the expertise of hackers (</em><a href="https://csrc.nist.gov/glossary/term/Red_Team"><em>Red team</em></a><em>) and hunters (</em><a href="https://csrc.nist.gov/glossary/term/Blue_Team"><em>Blue team</em></a><em>) in one ‘Squadron’ led by a healer (</em><a href="https://csrc.nist.gov/glossary/term/White_Team"><em>White team</em></a><em>), cooperating with the client during the Mission. This close-knit team works in a way that results in mutual improvement.</em></p><p><em>Now, visible security benefits will take days, if not real-time.</em></p><h4>Day 1 — Setting up shop</h4><p>By now, dear reader of our war stories, you know that every Mission starts with extensive reconnaissance and personal contact with the parties involved.</p><p>Hunter got himself familiar with the hospital’s ‘blue team’, which was outsourced to a <a href="https://www.gartner.com/en/information-technology/glossary/mssp-managed-security-service-provider">managed security service provider</a> (MSSP). Although he came to the online call in peace, he was not greeted with much enthusiasm. As it turned out, the hospital’s CISO had not informed his security suppliers about the purple aspect of the Mission. So the MSSP expected “just another red team exercise” and was not prepared to have to work <em>together</em>. Later, we learned that this omission was on purpose: an ominous sign on how the relations between CISO and supplier were at the time. And to be honest, it is pretty challenging for a MSSP with many clients to focus attention on one and at the meantime accept a third party taking a peek into their kitchen.</p><p>Hacker started his Mission connecting to the public Wi-Fi from outside the building. The obvious starting point since we were in a (semi)public place. The Wi-Fi was set up pretty well, using a captive portal to prevent unauthorized internet access and client isolation. The client isolation prevented Hacker from using his standard attacks to gain credentials. Bonus points for the hospital there. However, keep in mind that some Wi-Fi setups do not force client isolation while the client devices are connected, but not yet authenticated with the portal! This still leaves a (small) window of opportunity for attackers to attack these devices.</p><p>Wi-Fi sniffing revealed the presence of some hidden Wi-Fi networks. But Hacker quickly found out their names. (NOTE: we’ll write the more technical parts of the war story with slightly different formatting from now on, so you can easily choose to skip these parts)</p><blockquote>Sniffing the 2.4Ghz-band with <a href="https://www.bettercap.org/">bettercap</a> revealed the presence of hidden Wi-Fi networks. These networks do not include their network names (or ESSIDs) in their beacon frames, so they will not show up by default if you scan for Wi-Fi networks from your phone or device. A client that wishes to connect to a hidden Wi-Fi network must know the ESSID to send a successful association request frame. And this is where the attack vector lies. For one, you could just keep sniffing the wireless traffic until a client wants to connect to the hidden access point. If the ESSID in the association request frame is correct, the network will respond with an association response frame containing an acceptance and confirmation of the ESSID. Since these frames are unencrypted, analyzing a successful association request will reveal the hidden network’s name.</blockquote><blockquote>But why wait? If the hidden network has at least one client connected to it, we can perform a <a href="https://en.wikipedia.org/wiki/Wi-Fi_deauthentication_attack">de-authentication attack</a>: forcing the client to disconnect from the wireless network, will force the(re)associationprocess between client and Wi-Fi network. And these packets will — again — contain the ESSID.</blockquote><blockquote>As a bonus, we can <a href="https://www.cyberpunk.rs/capturing-wpa-wpa2-handshake">capture the authentication packets</a> themselves: these are called the WPA 4-way handshake and any attacker within reach of the Wi-Fi network can get their dirty hands on them.</blockquote><p>So within minutes he had the ESSID name: {{HIDDEN WI-FI A}} and the authentication packets. Remember our previous war story about long, but dumb passwords? We developed a special <a href="https://hashcat.net/hashcat/">hashcatrule</a> for these and lo and behold: within an hour we also cracked the password using this rule and a smart wordlist based on, well, what the client is and does.</p><p>Hacker connected to the hidden Wi-Fi and found a network printer.</p><p>With a default password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iLWVec48tc88OgAtWCd8eA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@caleb_woods?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Caleb Woods</a> on <a href="https://unsplash.com/s/photos/shame?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Healer’s sigh could probably be heard halfway around the world, when he found out about the printer with the default password. Many Missions share the same characteristics, because many ICT infrastructures share the same basic problems. And again, network equipment was installed out of the box, plugged in and forgotten, leading to one of the most widely used stepping stones for attackers. Essentially easy to prevent, pretty pesky to remediate after the fact and hard as hell for Hunters to detect abuse on.</p><p>So, day one already provided Healer with ammunition to talk to CISO about three points:</p><ol><li>Implementing some more serious and up-to-date Wi-Fi hardware, which could spot and prevent these kind of attacks — by enabling the <a href="https://en.wikipedia.org/wiki/IEEE_802.11w-2009">802.11w</a>-standard for Protected Management Frames for example.</li><li>Hiding an access point’s BSSID does not equal security. Although security by obscurity has its place and time, this is not it.</li><li>Passwords should be strong ánd smart. More on this further on!</li></ol><p>On with the story, then, since the printer had an <a href="https://nl.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol">LDAP</a> connection page to lookup domain users. Pretty handy. Especially if one can change the LDAP server the printer authenticates against to, let’s say, Hacker’s loadout. Since LDAP is a cleartext protocol, it takes only seconds to capture the printer’s service account credentials. Alas for Hacker, the captured account does not seem to be allowed interactive logon via Remote Desktop Protocol — kudos for the administrators! We oftentimes see service accounts during our Missions that ARE allowed to use these logon types.</p><p>Using the service account’s credentials, Hacker requests a list of all domain users, groups and computers from the domain controller and maps his access to network shares in the network. This could be done by using scripts like smbclient.py from the <a href="https://github.com/SecureAuthCorp/impacket">Impacket</a> stack, but where’s the fun in that! Those scripts are oftentimes detected by an MSSP, because they are so widely used and therefore often already fingerprinted. It’s much more challenging for the blue team if Hacker uses some ‘living off the land’-techniques. These are much harder — although not impossible — to detect. Custom use cases you need there, young Skywalker.</p><p>Alas, the file shares do not contain anything useful.</p><p>But, wait. It seems this Wi-Fi network does <em>not</em> have client isolation. Because it’s hidden and trusted, right? Let’s fire up our trusted <a href="https://attack.mitre.org/techniques/T1557/001/">LLMNR</a> attack, because that seems to work almost every time.</p><p>Oh boy.</p><p>It appears that many hospital staff are using this Wi-Fi with their personal devices.</p><p>Luckily the hospital’s MSSP logs a lot. Hunter especially likes to delve into <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4825">failed RDP logins</a>. Combining these with a list of Active Directory service accounts makes for a good hunting strategy, because service accounts are <a href="https://www.securitymagazine.com/articles/90946-what-are-hacker-preferences-when-targeting-privileged-credentials">attractive targets for hackers</a>, for one reason because service accounts seldom have their password changed.</p><blockquote>There is a solution for this: <a href="https://docs.microsoft.com/en-us/windows-server/security/group-managed-service-accounts/group-managed-service-accounts-overview">Group Managed Service Accounts (GMSAs) </a>provide more security because the password is managed by AD and automatically changed.</blockquote><p>So, our hacker was spotted again by the Blue Team, giving away his position in the network and his level of access. This led to much rejoicing. Slowly the ice between them thawed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UzPqv6YLk0qj-tuOYGDfwQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@erol?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Erol Ahmed</a> on <a href="https://unsplash.com/s/photos/ice-melt?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Hospital personnel — any personnel — has an implicit right to internet access provided by their employer these days. Healer had seen different times, when internet access from the workspace was still considered a special privilege. Those days are long gone, gramps. But there is a difference between internet access for office services and internet access for TikTok. Separating the former from the latter in a production network is sadly still not commonplace and <a href="https://digitalguardian.com/blog/ultimate-guide-byod-security-overcoming-challenges-creating-effective-policies-and-mitigating">BYOD</a> is a rampant risk these days.</p><p>Healer spoke to the CISO, asking his point of view on employees spreading infections they got at home to the hospital’s workplace. “Not a good idea, we have very strict procedures for sick employees not coming into work”. Upon this statement, Healer said that <a href="https://en.wikipedia.org/wiki/Bring_your_own_device">BYOD</a> on a production network is generally considered a Bad Idea[tm], for the very same reason. Eureka. The case for Wi-Fi client isolation on the ‘trusted Wi-Fi’ and segmentation between employee internet and production was crystal clear and added to the list of recommendations.</p><p>While CISO was discussing these changes and planning a roadmap with his team, Hacker forced the re-authentication of some wireless devices and because he chose for a quite noisy combination of ntlmrelayx and Man-in-the-Middle, those devices reconnected to domain services like network shares and remote desktop sessions. Hacker got some extra domain account hashes. On top of that he caught clear text credentials for — at this point unknown — internal services.</p><p>Of course, some of the passwords were simple enough to crack within minutes. And because the hospital uses the Microsoft365 suite without multi-factor authentication, Hacker now had access to some employee mailboxes. Not interesting for now, but maybe a crucial pivot point for the attack or exfiltration plans later?</p><p>Both <a href="https://resources.infosecinstitute.com/topic/mitre-attck-spotlight-pass-the-hash/">Pass-the-Hash</a> and the credentials themselves seem to work on the domain controllers, but only show default file shares like NETLOGON and SYSVOL. Now, where are those file servers?</p><p>Meanwhile, cracking of the other (hidden) Wi-Fi WPA handshakes is taking forever…</p><p>The noisy actions of Hacker stood out as an anomaly and because they came from the same IP-address as the earlier service account RDP logon attempts, Hunter and the MSSP kicked Hacker’s device off the wireless network — and they were caught smiling while doing it. This was quickly turning into a <a href="https://koth.cs.umd.edu/">King of the Hill</a>!</p><p>Blocking an attacker on IP and MAC level is of course a half-hearted countermeasure, because changing both is trivial. A possibly unwanted side effect is that the attacker knows he has been seen. Fine for a Purple Team Mission, but not so much in a real-life crisis situation. Advanced attackers will dive deeper if they feel they are being watched, possibly to depths that make them almost impossible to find again. So, depending on the perceived level of sophistication of an attacker, it might all too well be the best choice to <a href="https://apnews.com/article/hacking-russia-bafff5557a8941aa1a5ef239d36c4e28">completely burn a network to the ground</a> and build it all again from scratch, to make sure Elvis has really, really left the building.</p><p>Imagine that in a hospital environment. #nightmare</p><p>Ah yes, passwords. We have a mantra about them. “They may look strong, but they might be dumb”. During our Assignments, we encounter many passwords that look strong at first sight, but are based on predictable human behavior. The consequence is that although a password is not crackable with a brute force attack, it <em>is</em> guessable by applying a mix of several rules and smarty-pants tricks.</p><p>For example: what is the most often used “special character” and where do people put it?</p><p>…</p><p>…</p><p>Indeed, the exclamation mark ! — at the end of the password. The same goes for so-called <a href="https://en.wikipedia.org/wiki/Leet"><em>leet</em></a><em> speak</em>. Although it is perfectly fine to use it, using it consistently in a password makes that password weaker rather than stronger.</p><p>Consider the following passwords: Wir3l3ss2020! and W!r3le$s!2020. Both are considered unbreakable by brute force and wordlists won’t help (much) because of the leet speak. They are strong passwords.</p><p>But — making the leet speak consistent (all e’s become 3&#39;s), adding the year (2020) and the infamous <a href="https://www.youtube.com/watch?v=aHaBH4LqGsI">exclamation-mark-at-the-end</a> makes the first password dumb and the second one smart(er). At Chapter8, we <em>will</em> figure out the first one, but we’ll have more problems guessing the second one.</p><p>But, don’t take our word for it. Read <a href="https://www.ncsc.gov.uk/blog-post/the-logic-behind-three-random-words">this excellent post</a> by NCSC-UK — quite an organization with a deep knowledge of security, since they are directly linked to <a href="https://www.gchq.gov.uk/section/mission/overview">GHCQ</a>. In a nutshell, NCSC-UK promotes choosing three random words for a password and concatenating them. As an addition, we would advise to concatenate them using a — instead of “just” concatenating them. smart-phish-stew is much harder to crack than smartfishstew. But both of them are far better than Pa55word!.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zf6HNFsnmTWBoQhh7R8-ew.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@souvenirpixels?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">James Wheeler</a> on <a href="https://unsplash.com/s/photos/ruin-ancient?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Taking over the domain controller seems to be the only route to the other internal networks. But using an attack like ZeroLogon would cripple the network and be way too intrusive. Hacker needs to find another way through. Maybe it’s possible to plug in a physical device?</p><p>Since hospitals are semi-public places, we can easily walk around and recon the building, even on this early evening (did we mention this was turning out to be a long day?). And during our walkabout, Healer found an active network outlet near a television screen in a waiting room. Using the extra port on the outlet we discover more televisions, some printers, some network switches, some VOIP devices and…</p><p>Wait, whut?</p><p>Is that…</p><p>Wow…</p><p>You rarely see one of those in the wild anymore…</p><p>A real Windows XP machine! File sharing is open, but EternalBlue does not work out of the box. Luckily, we have seen this before and a custom send_and_execute.py-script neatly delivers our reverse shell. Now we elevate privileges using ‘Named Pipe Impersonation’ via <a href="https://en.wikipedia.org/wiki/Metasploit_Project">Meterpreter</a> command: getsystem.</p><p>This Windows XP machine seems to be a ‘powerpoint machine’ with auto-login. This feature comes with the &#39;feature&#39; that the computer’s registry shows the clear text username/password autologin combination. New credentials in the pocket!</p><p>Since using the network outlet next to the television gains us some hard stares from hospital staff (which is a Good Thing and we were actually expecting to be apprehended), we switch our modus operandi to something a bit more stealthy. We modify our meterpreterreverse shell on the XP relic to connect back to our loadout over the internet. This way, we can set up an encrypted command and control channel using regular internet access and a non-suspect domain. And because of the backconnect and some extra magic, this is a pretty inconspicuous way to regain access if the connection is dropped.</p><p>Okay, we’re set up to work remotely! Time to unplug from the wall socket and go home. Did we mention this turned out to be a long day?</p><blockquote>Are these wall-outlet attacks easily detected or mitigated? Well, yes to both. With a little effort and lots of standard operating procedures. <a href="https://gomindsight.com/insights/blog/network-access-controls-why-you-need/">Network Access Control</a> (NAC) is a very powerful tool to enhance endpoint visibility and control and there are several versions of this tool available. The simplest being hard-coding equipmentMAC-addresses into white-lists on a managed switch. On larger networks, this is a pain to manage though. A more sophisticated way is the adoption of <a href="https://www.securew2.com/solutions/802-1x">802.1x</a>which comes in two flavors: credentials-based (username/password) or certificate-based. The latter is better, because it forces end users to go through an enrollment process to ensure their devices are set up correctly. But, not every network device supports this standard and it is quite an undertaking for IT to implement this standard thoroughly. Therefor, the adoption rate of 802.1xis still relatively low. There are <a href="https://www.researchgate.net/publication/327402715_Bypassing_Port_Security_In_2018_-_Defeating_MACsec_and_8021x-2010">known attacks</a> on this standard and its extension 802.1x-2010, although these still rely on an attacker being able to place a custom made rogue device between a target supplicant and the switch.</blockquote><blockquote>Besides implementing NAC, unused physical ports should be disabled completely. Standard Operating Procedures, yes?</blockquote><p>Luckily for Hunter, the hospital has two things: a naming convention for the devices they allow access to the network and a MSSP who has a use case for deviations to that convention. Hacker’s loadout was noticed in the DHCP-logs and recognized as malicious. His machine was blocked (again), albeit too late (again).</p><p>Healer knew hospital staff was suspicious about the behavior they noticed around the TV set. He asked CISO where staff could report such behavior. The answer was not quite clear and one of the recommendations became to create a “tip line” for staff. Combined with a security awareness program on insider threat, an organization creates a powerful way to enhance staff involvement in security. Staff are important eyes and ears on the work floor and can be invaluable in detecting suspicious behavior and preventing insecure situations.</p><p>What a first day. Exhausted, we go to a hotel in the vicinity of the hospital to be able to start early for day two. This was a good day, making friends with the client’s security suppliers, helping CISO out and just experiencing the fun of being on the road again. Time for a good night’s rest. But first…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dhC13rxvrr1OgObdn_yguA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@thadorio?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Thais Do Rio</a> on <a href="https://unsplash.com/s/photos/beer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><blockquote>Thank you for reading and stay tuned for part Two!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e14ac63fb45" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chapter8/purple-team-war-stories-3-8e14ac63fb45">Purple Team War Stories — №3</a> was originally published in <a href="https://medium.com/chapter8">Chapter8</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Purple Team War Stories — №1]]></title>
            <link>https://medium.com/chapter8/purple-team-war-stories-1-c61b365e9f52?source=rss-23276cd5f18b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c61b365e9f52</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[war-stories]]></category>
            <category><![CDATA[cyber]]></category>
            <dc:creator><![CDATA[Chapter8]]></dc:creator>
            <pubDate>Sun, 30 May 2021 15:51:49 GMT</pubDate>
            <atom:updated>2022-08-22T12:18:17.773Z</atom:updated>
            <content:encoded><![CDATA[<h3>Purple Team War Stories — №1</h3><h4>Hacking a hosting provider</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r-JY2XlE9Wbnoi_oDWlE0w.png" /><figcaption>Photo by <a href="https://unsplash.com/@fantasyflip?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Philipp Katzenberger</a> on <a href="https://unsplash.com/s/photos/cyber?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><blockquote>“Prove you can reach the mailbox of the CEO!”</blockquote><p>The quote above is from the CISO of a hosting provider. He was (overly) confident that with expensive equipment and best-practice security measures alone he could counter any hack against their infrastructure and ensured that their customer data would remain safe at all times. After this Purple Team Mission, he learned that security is a mindset and does not equal expensive equipment.</p><p>Every war story starts with asking: “What do you need to protect the most?”. As you can see from the introduction, this time our target was very tangible. The CEO mailbox.</p><p>Mission accepted.</p><h4>Disclaimer</h4><p>At Chapter8, many of our Missions take place at the highest levels of the Dutch digital security industry, dealing with confidential information. That is why we are very careful about presenting client-related information. Being fictional in context, but true in tech, our war stories are a way to get the technical gist of a <em>train-as-they-fight</em> Purple Team mission across and contribute to your security mentality.</p><h3>What is a Purple Team Mission?</h3><p>Before we start our war story, let’s take a few seconds to explain what a Purple Team Mission is:</p><p><em>Security testing usually involves an outside-in penetration test after which a list of vulnerabilities is presented to the client as a ‘to-do-list’. When done like this, the security benefits for the client will only be visible after the red team recommendations have been understood, vetted, adopted and implemented by the blue team. In medium-sized companies, this iteration has proven to take months.</em></p><p><em>We don’t think you have the luxury of postponing security benefits for months.</em></p><p><em>A Purple Team Mission starts from within the network (</em><a href="https://chapter8.com/mission"><em>Assume Breach</em></a><em>) and does not solely focus on </em><a href="https://itlaw.wikia.org/wiki/Red_teaming"><em>red teaming</em></a><em>. It brings together the expertise of hackers (</em><a href="https://csrc.nist.gov/glossary/term/Red_Team"><em>Red team</em></a><em>) and hunters (</em><a href="https://csrc.nist.gov/glossary/term/Blue_Team"><em>Blue team</em></a><em>) in one ‘Squadron’ led by a healer (</em><a href="https://csrc.nist.gov/glossary/term/White_Team"><em>White team</em></a><em>). They work in a close-knit team and in a way that results in mutual improvement.</em></p><p><em>Now, visible security benefits will take days, if not real-time.</em></p><h3>Reconnaissance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*MD2B8779vNCUSymA" /></figure><h4>Day 1 — Reconnaissance</h4><p>We ‘Assume Breach’, because we’d rather help you with protecting your crown jewels since we know from experience that <em>there’s always a way in. </em>However, we started the first day of this Purple Team Mission with an extensive inventory of the external attack surface as a special requirement from our client.</p><p>Hacker started his reconnaissance by visiting several Open Source Intelligence (<a href="https://en.wikipedia.org/wiki/Open-source_intelligence"><em>OSINT</em></a>) services like <a href="https://bgp.he.net/"><em>bgp.he.net</em></a> and <a href="https://viewdns.info/"><em>viewdns.info</em></a> to identify various network segments ranging from shared hosting to internal use. This led to several interesting targets. And because we have some aces up our sleeve, like access to passive DNS, we can spice up the OSINT recon just enough to find some forgotten network niches.</p><p>Hunter worked actively with the client to determine the current security posture, especially around the crown jewels, while Hacker did his recon. Security posture includes, but is not limited to: an inventory of digital assets, network diagrams, logging facilities, data flow insight, access- and credential management. And logging. Incident response procedures and mandates. Inventory of outsourced security measures. Did we mention logging yet? He makes sure he knows who to talk to when stuff happens and that key players are available when needed. Also, logging.</p><p>Healer keept track of the Team’s progress and is in close contact with the client’s C-level/CISO during the Mission. This payed off, since we found an old internet facing Flash application during recon, which was accessible with default credentials. This application was so old, the underlying operating system required to run the application, was severely outdated too. It might even have been vulnerable to <a href="https://blog.bjornweb.nl/2017/08/flash-remote-sandbox-escape-windows-user-credentials-leak/">this credential leak</a>. When Hacker finds holes like this — and he often does — he immediately warns Healer and Healer warns CISO. Real-time security benefits #ftw.</p><h3>Assessment</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*9zfyBOuAr-dLtkdh" /></figure><h4>Day 2 — Assessment</h4><p>Hacker found an unprotected file upload on the early morning of day 2, amongst the thousands of websites on one of the shared hosts’ web servers. After a while, he noticed that the webserver was not set up to run PHP files. Instead, it seemed to only handle HTML/CSS/JavaScript and .NET programming languages like ASP. In earlier port scans, this server was marked as Windows Server 2008, so after uploading a directory listing script written in ASP, he was able to click through most directories on the Windows server.</p><p>In the Program Files directory, he found a world-readable folder belonging to a non-Windows-native FTP service. It contained the credentials to a PostgreSQL database in which the FTP service stores the usernames, password hashes and user directories.</p><p>Again, using an ASP script on the Windows server, the Hacker now connected to the PostgreSQL database to retrieve a list of FTP users and their (SHA-1 hashed) passwords. However, there was no need to crack any password hash right away, as he spotted an interesting username along the list of users: “admin”. By simply changing the SHA-1 password hash for an SHA-1 password hash of his own, he was able to log on via FTP as the local Administrator. And because the administrative FTP user had read/write access to the entire system, it was easy to upload a batch script via FTP to the Startup folder of the Administrator containing the commands to connect back to the Hacker’s loadout system. After that, it was easy to escalate privileges to the SYSTEM user and have full access to the system.</p><blockquote>For the sake of this war story, we skipped a few hours of heads banging against the office wall while figuring out a way to execute the batch script in other ways as well as uploading malicious executables and waiting for a system administrator to log on to the server.</blockquote><p>By utilizing these newly obtained privileges, the Hacker was able to use this server as a stepping stone and retrieve the Administrator’s password of the Windows account using applications like Procdump and Mimikatz. Unfortunately, none of the Windows servers in the shared hosting segment were domain joined so he did not have domain access and was not able to find any <a href="https://attack.mitre.org/techniques/T1134/">impersonation tokens</a>.</p><p>He tried to log on to a Linux server in the same subnet but was only able to access a few other Windows servers dedicated to shared hosting with this user-password combination. To get access to a Linux server, the Hacker decided to start day 3 with cracking the FTP credentials found earlier.</p><p>Hunter, meanwhile, spotted the Hacker on the network by collaborating with the client’s <a href="https://en.wikipedia.org/wiki/Information_security_operations_center">Security Operations Center</a> (SOC). The SOC did not act upon the (stealthy) recon or the tinkering on the web server. Hunter proposed to check the web hosts for anomalies, like recently added accounts with administrative rights. The Windows web server that was taken over by Hacker pretty much stood out like a sore thumb. After checking with IT about the server, hearing it was Windows Server 2008 (which has been deprecated for a while and contains many vulnerabilities), Hunter became concerned.</p><p>Having found this weakness in the network, Hunter advised the SOC to do a new risk assessment. He wanted to know from them what they would do as a hacker. He also asked some pivotal questions like: how is the network connected to other internal networks, what security measures are in place, and do the assets there send their log files to the <a href="https://en.wikipedia.org/wiki/Security_information_and_event_management">SIEM</a>? The answers were not satisfactory at best. On day 1, Hunter already identified that existing risk assessments were old and no one dared to place a bet on the correctness of the network diagrams.</p><p>Healer followed these developments with great interest. Several longer term recommendations could already be relayed to the CISO. SHA-1? Really? The CISO was not aware that this <a href="https://en.wikipedia.org/wiki/SHA-1">long-deprecated</a> hashing algorithm was still in use in some parts of his network. Also, the third-party FTP service apparently did not <a href="https://auth0.com/blog/adding-salt-to-hashing-a-better-way-to-store-passwords/">salt passwords</a>, because Hacker could simply switch hashes. And Hunter was not satisfied by the SOC not being able to react appropriately to the addition of accounts with administrative privileges.</p><p>Also, Hacker used run-of-the-mill attack software this time. If unstealthy hackers can get away undetected, what about more advanced attackers that would not use Mimikatz? This client needed to up his game in logging and incident response. And while Hunter worked on the low-hanging fruit with the SOC, Healer had some long talks with the CISO to help him get this message across for the board in a later stage.</p><p>Healer learned from the CISO that the 2008-servers were “due to be phased out”, along with the third-party FTP service. As we see often, the due date of that phasing out was, well, overdue.</p><h4>Day 3 — Assessment</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*7YZ7BFWZ1iyGPwIw" /></figure><p>This would prove to be a hefty day for the whole team. By now, the Mission was well on its way. Hacker had warmed up and a pretty good picture of the network, Hunter was working in unison with the SOC — which always takes a few days, because Hunter is often seen as a job security threat instead of a helping hand — and Healer had good oversight, running from red to blue and keeping in close touch with the CISO.</p><p>Meanwhile, people in the company close to the teams also started to notice something was going on. There was a buzz of energy in the air. Hunter, CISO and SOC grew closer together now that they had a common enemy.</p><p>Hacker started day 3 as planned with cracking the SHA-1 hashes of the passwords found on day 2. Since SHA-1 is fast to crack and the (original) password of user “admin” was neither very strong nor very smart, within minutes the password hash was cracked. This password was different from the password of the Windows account he found on day 2 but proved to be valid for FTP access after a login attempt on one of the Linux hosts in the shared hosting network.</p><p>Because of the privileges of this administrator account, the Hacker was able to upload a <em>reverse shell</em> to one of the web directories and gain access to the server. After spending some time on escalating privileges, he had gained <em>root access</em> to the web server. This enabled him to monitor system processes and potentially read the system administrator’s <a href="https://en.wikipedia.org/wiki/SSH_(Secure_Shell)">SSH</a> password the moment he logs onto the server.</p><p>Because the Hacker obtained root access on the Linux host without a password and had to wait for a system administrator to log on, he used the Linux host as a new stepping stone to start a light reconnaissance of the newly discovered internal network so as not to arouse suspicion. This took the better part of day 3.</p><p>Hunter spent his day putting out fires, writing incident response recommendations and SIEM use cases while Hacker was making progress. Because logging was inconsistent in time and network coverage, and no use cases for the external network were implemented in the SIEM, the team had to manually look for intrusion in the log files. Given the sheer amount of information, this soon proved to be quite a headache although Hunter knew where to find Hacker.</p><p>SOC and Hunter assessed the happy path Hacker could take into the company’s internal network and extra measures were taken. Knowing a hacker would need a stepping stone and elevated privileges, it was decided that additional logging would be turned on and use cases would be implemented to monitor admin account use. Also, SOC and CISO decided in conjunction to implement extra logging on the Linux servers hoping to stop to all illegitimate admin use and to detect the intruder. Unfortunately, this course of action had a very unwanted side effect…</p><h4>Day 4 — Assessment</h4><p>After two exciting days you would expect a setback. However, day 4 started again with excitement because one of the system administrators had logged on to the compromised Linux server to turn on extra logging as requested by the CISO and SOC the evening before. This gave Hacker the current Linux administrative password and finally, this new-found password seemed to be the key to the kingdom!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*HlnApah8ZgKWMn0A" /></figure><p>The Hacker was able to log on to one of the major firewalls as administrative user, mask his internal recon traffic from now on and add routes to other (internal) networks.</p><p>Quick sum-up: <br>• Windows Administrator password in the pocket.<br>• Linux Administrator password in the pocket.<br>• Persistence on at least three hosts in the shared hosting network by either a username/password combination or a backdoor.</p><blockquote>“Okay, we’re inside. How do we proceed?”</blockquote><p>The Hacker spent the rest of the morning on stealthily inventorying internal networks and writing down interesting hosts and attack paths. He identified several database servers, a chat server and internal dashboards like Grafana, employee intranet and a custom host inventory.</p><p>Getting access to the database servers was not that hard since the administrative passwords were exactly the same as or a variation upon the credentials found earlier. And although the data looked very promising, the target of this Mission was the CEO’s mailbox. Instead of digging through the data, the Hacker focused on the custom host inventory and the chat server.</p><p>Via credential reuse he was able to access the custom host inventory which showed even more network locations, both internal and external.</p><p><strong>Chat server ? Gold mine!</strong></p><p>More interesting was the chat server since none of the credentials provided access to the server. The Hacker, thorough as he is, tried the default password of the publicly available OVA file (Open Virtual Appliance) of the chat service and within minutes he obtained root access to the server!</p><p>The chat software in question makes use of an <a href="https://www.elastic.co/what-is/elasticsearch"><em>Elasticsearch</em></a> service to store its data. So, by setting up a <a href="https://www.elastic.co/what-is/kibana"><em>Kibana</em></a> instance on his load-out PC, the Hacker had access to the entire chat history including a live feed of the chat conversations between system administrators throughout the client’s organization. Imagine the amount of sensitive information system administrators share using an ‘internal only’ chat service…</p><p>Credentials for all the hosts and services were shared/reminded, even for the VMWare vCenter environment which hosts ALL virtual servers for this hosting provider.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*XTRbj_y-dFLHbfqa" /></figure><p>As managers in general like to rise above any rules and policies put in place for the entire organization, it was common for this client’s management team to request a password reset of their mailbox directly from the system administrators. We did not even have to hack the email server because the password of the CEO’s mailbox was also found in the chat history.</p><p>Hunter, CISO and SOC were basically 2 steps behind for the rest of the day after giving the Hacker exactly what he needed. Knowing they would have been able to stop the hacker using this path with proper basic cyber hygiene in place, they conveyed their findings to the Healer and together assessed their performance to learn from and do better next time.</p><p>Healers get grumpy when they discover environments which promote a false sense of security, combined with predictable human behaviour. Be wary of company chat functions. They are notorious pits of personal and confidential information. Want to map out the social network inside an office? Analyse the company’s chat metadata. Want to put extortion pressure on someone? Search for extra marital relations in the company chat. Want access to documents that are shared ‘for easy review’ or to circumvent that pesky file access control? Search that same company chat function.</p><p>This time, again, perfectly explainable human behaviour gave Hacker what he wanted. A perfect talking point for the CISO to take up with his SOC. Another talking point was the ability of Hacker to log in for administrative tasks using only username/password combinations. Using <a href="https://www.ssh.com/ssh/key/">key-based authentication</a> this happy path would have been thwarted.</p><h3>Cooling down</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UfVP9lWq-M9vzVZUICS6PA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@zachhagy?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Zachariah Hagy</a> on <a href="https://unsplash.com/s/photos/couch-drinks?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Day 5 — Cooling down</h4><p>While it was essentially game over for the client in terms of red teaming, our Missions are not done after reaching the crown jewels. Day 5 was used by Hacker, Healer and the CISO to prepare a Walkthrough for the SOC and the board. Hunter spent more time with the SOC to enhance standard operating procedures.</p><p>Although a Mission reads like a capture-the-flag between Red and Blue, the learning effect and teamwork within the client’s organization is the real goal. Handling the aftermath of a Mission well is essential for their security posture and motivation. In this phase, hurt egos have to be put aside. Much like after a hefty round of sparring for a boxing match. We train as criminals fight, so you are bound to get hurt a bit.</p><p>This is where the Healer’s experience with groups and different personalities comes in to play most. Preparing documentation, recommendations and presentations WITH the client and not FOR the client helps. Later on, the CISO, SOC and the CEO were invited to a COVID-proof meeting in which they could talk about the Mission results. Some time after the meeting, Healer did another presentation for the board. This helped the CISO to gain additional budget to enhance the company’s security posture over the coming years.</p><p>We are invited to re-run the Mission after additional measures have been implemented. Since Chapter8 is NOT a <a href="https://en.wikipedia.org/wiki/Managed_security_service">Managed Security Service Provider</a> (MSSP), we will be able to run the Mission without being the auditor that marks his own paper. Zero Bullshit Consultancy.</p><h4>Wrap-up</h4><p>This Mission took place in an extremely large network environment so our expectations about intrusion detection and time needed to get to the crown jewels were high. However, we did not need to use any public <a href="https://en.wikipedia.org/wiki/Exploit_(computer_security)"><em>exploit</em></a> to get to the crown jewels.</p><p>We were able to get access to the crown jewel with highest priority (the mailbox of the CEO) within four days, through unanticipated streets and back-alleys. How expectations can be off sometimes…</p><blockquote>Thank you for reading!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c61b365e9f52" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chapter8/purple-team-war-stories-1-c61b365e9f52">Purple Team War Stories — №1</a> was originally published in <a href="https://medium.com/chapter8">Chapter8</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TL;DR — Purple Teaming]]></title>
            <link>https://medium.com/chapter8/tl-dr-purple-teaming-96c883fe77ee?source=rss-23276cd5f18b------2</link>
            <guid isPermaLink="false">https://medium.com/p/96c883fe77ee</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[purple-teaming]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Chapter8]]></dc:creator>
            <pubDate>Sun, 30 May 2021 15:48:18 GMT</pubDate>
            <atom:updated>2022-02-10T15:50:58.320Z</atom:updated>
            <content:encoded><![CDATA[<h3>TL;DR — Purple Teaming</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R4J1HxDFQjGxP2vQ0jyvfg.png" /><figcaption>Photo by <a href="https://unsplash.com/@marvelous?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Marvin Meyer</a> on <a href="https://unsplash.com/s/photos/team?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><ol><li>What is Purple Teaming?</li><li>What is a Purple Team Mission?</li><li>What does a Mission look like?</li></ol><h3>1 — What is Purple Teaming?</h3><p>Traditionally, cyber security tests were carried out from the perspective of the attacker, or the Red Team. The Blue Team, or defender perspective, was only added as an afterthought.</p><p>This one-sided thinking only produced partial results. It didn’t leave you as secure as you could be, because it didn’t address your organization’s structural security posture.</p><p>Now, if you combine the skills and perspectives of both Red and Blue Teams, the result — a Purple Team — is worth more than the sum of its parts. This team will bring about the real change of mindset needed to improve your security over time by engaging Red and Blue together in a real-life cyber security Mission.</p><h3>2 — What is a Purple Team Mission?</h3><p>A Purple Team Mission really is the next generation of cyber security testing. Instead of starting with a penetration test and handing the blue team a report with <em>to-dos </em>when done, a Purple Team Mission brings Red and Blue together to create a powerful team.</p><p>By continuously communicating the steps taken and the decisions made that led to (countering) a successful penetration, both Red and Blue team become smarter and better attuned to each other what results in being able to almost instantly respond to the other’s actions.</p><p>A Purple Team Mission typically consists of four phases; <strong>intake</strong>, <strong>reconnaissance</strong>, <strong>assessment</strong>, and <strong>reporting </strong>which are set out below.</p><h3>3 — What does a Mission look like?</h3><h4>Phase 1 — Intake</h4><p>Every Mission starts with an intake on-site with the client. It is mandatory to not only have responsible infrastructure and network security employees attending the meeting, but also C-level employees.</p><p>Together with the client, the most valuable assets in the entire network are identified next to the current level of intrusion detection, the endpoint protection, whether there are regularly scheduled penetration tests, and if a network overview is available.</p><h4>Phase 2 — Reconnaissance</h4><p>Phase 2 starts with Blue team going over the security measures already in place and matching the network overview to the devices and services actually online in the network. Meanwhile, Red team starts ‘peeling the onion’ from the outside of the network.</p><p>This really is a data gathering phase. Mapping out network segments, servers and services, the email solution used, interesting personal devices (if any), domain names in use, and so on. It’s necessary to know the online footprint of the organization, because even with proper <a href="https://en.wikipedia.org/wiki/Open-source_intelligence">OSINT</a> a hacker is often able to find small pieces of information that lead to a quick but sophisticated hack.</p><h4>Phase 3 — Assessment</h4><p>Phase 3 is by far the most exciting of all. It’s when Red team and Blue team engage in a real-life CTF (<a href="https://en.wikipedia.org/wiki/Wargame_(hacking)">Capture The Flag</a>) which means that Red team tries to reach the client’s crown jewels without Blue team noticing or even blocking the attack.</p><p>A huge difference when it comes to a Purple Team Mission in relation to popular CTF’s amongst the hacking community is the communication between Red team and Blue team during the assessment.</p><blockquote>Do you see me now?</blockquote><p>Next to finding weaknesses in the client’s network, the objective is to provide the client with tools, skills and awareness and leave them smarter and more secure than they were before the Mission. That’s why Red team and Blue team notify each other of everything they find and every decision they make along the way.</p><blockquote>What about now?</blockquote><p>This helps to not only increase the understanding of each team’s tactics which makes a stronger Purple Team with every Mission, but it also enables the Blue team to quickly pinpoint weaknesses that would not have shown up by only using automated security monitoring.</p><h4>Phase 4 — Reporting</h4><p>A Purple Team Mission report typically consists of the steps taken by Red team that led up to a successful penetration, the decisions and actions of Blue team to counter or monitor an attack, and recommendations to patch a vulnerability (if any).</p><p>On an operational level, if any weaknesses have been found, the client has to know what software to patch, what ports to close for external access and what default admin passwords to change.</p><p>On a strategic level, the state of security is translated from the technical domain to the leadership domain, in order to base future decisions on these results.</p><h3>More information</h3><p>To learn more about Purple Teaming, visit <a href="https://chapter8.com/">this website</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96c883fe77ee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chapter8/tl-dr-purple-teaming-96c883fe77ee">TL;DR — Purple Teaming</a> was originally published in <a href="https://medium.com/chapter8">Chapter8</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Purple Team War Stories — №2]]></title>
            <link>https://medium.com/chapter8/purple-team-war-stories-2-adc37c2eb404?source=rss-23276cd5f18b------2</link>
            <guid isPermaLink="false">https://medium.com/p/adc37c2eb404</guid>
            <category><![CDATA[cyber]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[war-stories]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Chapter8]]></dc:creator>
            <pubDate>Tue, 09 Feb 2021 13:50:27 GMT</pubDate>
            <atom:updated>2022-08-22T12:19:53.166Z</atom:updated>
            <content:encoded><![CDATA[<h3>Purple Team War Stories — №2</h3><h4>Hacking a bank</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrrddK705R7SRiWUkniOQg.png" /><figcaption>Photo by <a href="https://unsplash.com/@tjevans?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Tim Evans</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Don’t you just love those movies containing high-speed chases, explosions and sophisticated bank robberies? The lives of us cybersecurity folks is like that, um…in no way.</p><p>This Purple Team War Story is about a real-life (legally approved) bank robbery in which no people were hurt and we didn’t even had to blow up our car or physically break into a vault 😉.</p><h4>Disclaimer</h4><p>At Chapter8, many of our Missions take place at the highest levels of the Dutch digital security industry, dealing with confidential information. That is why we are very careful about presenting client-related information. Being fictional in context, but true in tech, our war stories are a way to get the technical gist of a <em>train-as-they-fight</em> Purple Team mission across and contribute to your security mentality.</p><h4>What is a Purple Team Mission?</h4><p>Before we start our war story, let’s take a few seconds to explain what a Purple Team Mission is:</p><p><em>Security testing usually involves an outside-in penetration test after which a list of vulnerabilities is presented to the client as a ‘to-do-list’. When done like this, the security benefits for the client will only be visible after the recommendations have been adopted. In a medium-sized company, this process could take months.</em></p><p><em>You don’t have the luxury of postponing security benefits for months.</em></p><p><em>A Purple Team Mission starts from within the network (</em><a href="https://chapter8.com/mission"><em>Assume Breach</em></a><em>) and does not solely focus on </em><a href="https://itlaw.wikia.org/wiki/Red_teaming"><em>red teaming</em></a><em>. It brings together the expertise of hackers (</em><a href="https://csrc.nist.gov/glossary/term/Red_Team"><em>Red team</em></a><em>) and hunters (</em><a href="https://csrc.nist.gov/glossary/term/Blue_Team"><em>Blue team</em></a><em>) in one ‘Squadron’ led by a healer (</em><a href="https://csrc.nist.gov/glossary/term/White_Team"><em>White team</em></a><em>). They work in a close-knit team and in a way that results in mutual improvement.</em></p><p><em>Now, visible security benefits will take days, if not real-time.</em></p><h4>Day 1 — Reconnaissance</h4><p>As with most of our Missions, we started from within the network with an inventory of the digital landscape to determine the (private) bank’s attack surface. From within the network? Yes. Recent history has mercilessly shown that attackers will always find a way in at some point, so this not-so-new cybersecurity principle is getting traction outside the nerdy bubble we live in.</p><p>As for the team, this relatively small organization had a GISO (Global Information Security Officer), who had to juggle multiple roles — privacy officer, CISO and supplier contract manager. More often than not, she had the first incident responder role as well. A super ambitious and knowledgeable woman, albeit more than a bit overworked. As we had seen this before and since we are familiar with the stress and time management that comes with so many job duties, one of our own Mission goals became to devise a workable way forward for her.</p><p>Hacker<br>After a few hours of mapping out different network segments, the Hacker had identified two interesting subnets. One contained systems like mail servers, file servers and an <a href="https://en.wikipedia.org/wiki/Network_video_recorder"><em>NVR</em></a>, while the other contained mostly <a href="https://en.wikipedia.org/wiki/Rich_client"><em>fat clients</em></a> (workstations) of bank employees.</p><p>The reason that the second subnet in particular was interesting, was that the hostnames of those fat clients were made up of employee names. A quick <a href="https://en.wikipedia.org/wiki/Open-source_intelligence"><em>OSINT</em></a> lookup showed the Hacker that amongst the targets were bank managers and the director…</p><p>A device most organizations forget to secure: the printer. Every time, including this Mission, a printer proves to be a source of useful information such as an address book containing email addresses, a link to the Domain Controller and the possibility to store scanned documents. The rest of the day was spent on host and service enumeration, evaluation and creating a plan for day two: Assessment.</p><p>Hunter <br>Knowing your assets. It’s such an important check that so few companies actually perform. Pressure of day to day duties always takes priority over proper documentation. Due to budgets being routed from IT to physical security, some pending contracts for products that would have provided much needed situational awareness had to be cancelled. From the bank’s C-level point of view this might be a logical decision, however the fallout was very decisive for the rest of our story. Partly because of this, hunter needed the better part of the first day to get to know the network and its security measures.</p><p>One of the first recommendations already was having an up-to-date CMDB and network drawings. At the end of this day at least Hunter had a general idea of the network. What stood out for him as well, was that the workstation names were made up of employee names. That’s generally not a good idea — the same goes for usernames. Because the bank didn’t really do logging and monitoring in their digital infrastructure (<a href="https://www.acronymfinder.com/We-Know-Right-(WKR).html">WKR</a>!), we decided with the GISO to roll out an Open Source monitoring solution and provide the client computers and core servers with a necessary software agent. Together with a strategically chosen Suricata, Moloch and Zeek instance, Hunter now had some insight in hosts and the network.</p><p>Healer<br>Printers… sigh. So many are deployed with default (or empty) credentials to the administration interface that they are a major source of possibilities for security improvement every single time. Our Hacker always seems to find one, somewhere in the back-alley of a large, otherwise well-managed network. Especially with international companies and many branch offices, a new printer is easily hooked up to the network and given an account with some domain privileges. Some printers use outdated protocols like LDAP to authenticate against a domain controller. Redirecting that authentication process towards us yields valuable account credentials at near-zero effort. Changing default credentials and using modern protocols are near-zero efforts to reduce this attack surface. But it takes company procedures and adherence to these procedures to implement these constantly. This was one to report immediately, along with the not-so-smart DNS employee mapping.</p><p>Security by obscurity has a bad name, but it is not downright useless. If usernames and workstations are made up out of non-descriptive strings (a124ab / F77123 / …) it is much harder for an attacker to map out interesting persons or infrastructure.</p><p>Open Source monitoring software is usable in situations where you need some insight into an infrastructure as soon as possible where there is none. But often it does not scale well and it is not recommended as a long term solution without having a dedicated blue team. This initial setup did however form a stepping stone for a medium term solution, which will enable our GISO to make an informed long term decision. More about that later in our story.</p><p>Day one , value added. Not bad for a day’s work.</p><figure><img alt="&lt;span&gt;Photo by &lt;a href=”https://unsplash.com/@ikukevk?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyT" src="https://cdn-images-1.medium.com/max/1024/1*kSw-njRsFwVlqbTElIX8oQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@ikukevk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Kevin Ku</a> on <a href="https://unsplash.com/s/photos/focus?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Day 2 — Assessment</h4><p>The second day of the Mission started with frustration.</p><p>Hacker noticed that the bank’s IT team did a great job by keeping servers and fat clients up-to-date and by swapping out default passwords for strong(er) passwords. There was no easy way in by using exploits like <a href="https://en.wikipedia.org/wiki/EternalBlue"><em>EternalBlue</em></a><em> </em>so the Hacker started this day with working on network traffic analysis. By using an <a href="https://attack.mitre.org/techniques/T1557/001/"><em>LLMNR attack</em></a><em> </em>in combination with <a href="https://blog.fox-it.com/2018/01/11/mitm6-compromising-ipv4-networks-via-ipv6/"><em>mitm6</em></a>, he was able to get his hands on usernames and NTLMv2 hashes of Windows systems and cleartext credentials for a database server. The latter was pure luck as we learned later that one of the developers apparently installed a script on his workstation that was scheduled to run every X minutes. Instead of writing ‘<em>localhost</em>’ in the script he wrote ‘<em>localhots</em>’. Because of this, his workstation sent a request to a nearby DNS server (now the Hacker’s <a href="https://www.urbandictionary.com/define.php?term=loadout"><em>loadout</em></a> because of mitm6) to resolve ‘<em>localhots</em>’ and forward the request to the appropriate server.</p><p>Now, there were several options to explore at this point. An attacker can try to use the NTLMv2 hashes in a <a href="https://attack.mitre.org/techniques/T1550/002/"><em>Pass the Hash</em></a> (PtH) attack which is a method of authenticating as a user without having access to the user’s cleartext password. Another option is to crack the password hash using a cluster of graphics cards which provide enough power to test the hash against a known passwords list, permutated with our own special sauce. But since the Hacker also got his hands on cleartext credentials for a database server, he decided to test those first.</p><p>Using the cleartext credentials, he got access to the corresponding MSSQL database service which hosted over 30 databases. Unfortunately, the data in the databases seemed for testing purposes only as it was hosted on the workstation of a developer. The Hacker performed a quick network scan in search of other MSSQL servers and found that the credentials also seemed to work on production servers!</p><p>Hunter<br>What is one of the main objectives for a hacker after he gained access to the network? First is to obtain and maintain persistence and second is to acquire credentials, preferably (domain) admin credentials. As this was mainly a Windows network, Hunter watched for Windows logon events that did not have the Domain Controller as a destination. That might be a sign of malicious activity to find NTLMv2 hashes. During the day he saw several of those events and decided to watch user activity in the network more closely, especially the use of domain administrative accounts. He also asked the IT department to limit any actions which require such privileges to quickly spot anomalies.</p><p>Having strokes of luck as a Hacker is a fact of life Healers and Hunters need to accept. The typo in the login script was a perfectly innocent human error. Reusing administrative database credentials from production servers in a development environment, under the assumption that ‘localhost’ will stay internal “so there is no risk there” however, is not an innocent error. <a href="https://en.wikipedia.org/wiki/Development,_testing,_acceptance_and_production">DTAP</a> environments are snake pits in almost every IT landscape we see. Shortcuts between development and production are widely known and notorious. This finding was reported immediately and placed on the shortlist of Things To Fix.</p><p>Key here is to report the finding, while being careful not to damage the position of the developer. We will always have findings that pose a threat to someone’s position within the organization. You might miss the word ‘unfortunately’ in that sentence, but it was left out on purpose. Human behaviour that poses a threat to your security posture will be reported, but factual, without judgment and preferably with a big wink. Zero bullshit consultancy is what we call that principal.</p><p>Thing is, you — as an organization — need to be able to trust the auditors. In our first year, we have been accused of leaving backdoors for later use during a Mission “because of our background”, long term social engineering prior to a Mission “because we cannot believe you cracked this password so fast”, and triggering incidents after a Mission “to be able to make more money”. Because we already have considerable experience with responses to the results of our audits or forensics in previous jobs, we aren’t offended easily. Statements like these generally undermine the staters credibility and do not require much effort to counter. These are human reactions to bad-news-messages and in most cases, these reactions change from denial through (outright) anger to acceptance. And sometimes people lose their jobs, because being unable to see your own faults is simply unacceptable in a security position.</p><p>Luckily, none of these were applicable to our current client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OqowO57kxsx4NmOT5Smonw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@brett_jordan?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Brett Jordan</a> on <a href="https://unsplash.com/s/photos/error?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Day 3 — Assessment</h4><p>The benefit of having a team is that you can divide tasks and therefore work more efficient. While our Healer continued digging through interesting data on the database server, the Hacker started researching the possibilities of gaining control over the database server.</p><p>Hacker<br>Using a <a href="https://www.rapid7.com/db/modules/exploit/windows/local/ms16_075_reflection_juicy"><em>MS16–075</em></a> Net-NTLMv2 reflection attack, the Hacker was able to escalate privileges from the ‘<em>mssqlserver</em>’ user to ‘<em>SYSTEM</em>’ which gave him administrative control over the database server. But the Hacker did not stop there because his end goal was to get administrative control over the entire domain; Domain Administrator.</p><p>The steps taken to reach that end goal after getting SYSTEM privileges on the database server were:</p><ul><li>Run incognito mode in <a href="https://www.offensive-security.com/metasploit-unleashed/about-meterpreter/"><em>Meterpreter</em></a><em>:</em></li></ul><pre>meterpreter &gt; use incognito<br>Loading extension incognito...success.</pre><ul><li>List delegation tokens:</li></ul><pre>meterpreter &gt; list_tokens -u</pre><pre>Delegation Tokens Available<br>========================================<br>NT AUTHORITY\LOCAL SERVICE<br>NT AUTHORITY\NETWORK SERVICE<br>NT AUTHORITY\SYSTEM<br>BANK\Administrator</pre><ul><li>Impersonate the bank’s domain administrator account:</li></ul><pre>meterpreter &gt; impersonate_token BANK\\Administrator<br>The [+] Delegation token available<br>[+] Successfully impersonated user BANK\Administrator</pre><pre>meterpreter &gt; getuid<br>Server username: BANK\Administrator</pre><ul><li>Start <a href="https://en.wikipedia.org/wiki/Cmd.exe"><em>cmd</em></a><em> </em>as the impersonated administrator:</li></ul><pre>meterpreter &gt; execute -f cmd.exe -i -t</pre><ul><li>Start a remote cmd session on the Domain Controller:</li></ul><pre>C:\WINDOWS\system32&gt; winrs -r:DOMAINCONTROLLER cmd</pre><ul><li>Create a Chapter8 user:</li></ul><pre>C:\WINDOWS\system32&gt; net user /add Chapter8 mysupersecurepassword</pre><ul><li>Add the Chapter8 user to the Domain Admins group:</li></ul><pre>C:\WINDOWS\system32&gt; net group &quot;Domain Admins&quot; Chapter8 /ADD /DOMAIN</pre><ul><li>Aaaaaand, we’re Domain Admin!</li></ul><p>Before lunch, the Hacker had accomplished his primary objective. The only thing left to do after that was to add the new administrative user to the appropriate groups to gain access to all file shares and domain joined systems, and record proof of access to the financial systems.</p><p>The Hacker was also able to dump the password hashes of all domain users, after which he was able to crack several of the hashes and use those users’ password to covertly log on to the financial systems and make payments while posing as a bank employee.</p><p>Hunter<br>At some point during the day the monitoring solution send some alerts:</p><blockquote>Successful Domain Admin logon detected!</blockquote><blockquote>Windows Account Created!</blockquote><p>Hunter quickly checked with the IT department if someone there was using a Domain Admin account. That was not the case, so he was pretty sure that something malicious was going on. Since this is a Purple Team Exercise, Hunter asked Hacker if he just now gained Domain Admin credentials. Surprised that he was found out rather quickly, he begrudgingly said “yes”. Happy to have found the Hacker, Hunter also knew he didn’t prevent Hacker from getting those credentials and he did not know yet what else the Hacker had been doing on the netwerk. There was still a lot more stuff to be done.</p><p>Healer dug through the production server databases, following the path Hacker found. Since this was a banking environment, there was a lot to work with. Crown jewels like customer data records and customer loyalty program records were readily accessible. All kinds of stuff that you don’t want exfiltrated and get extorted for. The strength of the database passwords (yes, multiple service accounts for multiple databases) was pretty fierce. There was just no way that we could have recovered those passwords using brute force and smart-guessing techniques. This was also a finding that Healer relayed to the client, because it is important to note the positives also. Was it not for the typo the developer made, we would have been in the blind regarding the database servers. A weaker point in the network setup was that access to financial systems was tied to Windows logon credentials. Ideally, you want seperate accounts and/or multi-factor authentication for these kinds of systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3MWZt8yzCL6Onp_19UW3PQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@sigmund?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Sigmund</a> on <a href="https://unsplash.com/s/photos/error?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Days 4–5: Kind of blue</h4><p>Since Hacker’s job was kind of done on day three, he spent the last few days in close cooperation with the client and the blue team to enhance their defenses. Key here is to build a <a href="https://taosecurity.blogspot.com/2008/01/defensible-network-architecture-20.html">defensible network architecture</a>, a term that was coined by cyber guru Richard Bejtlich as early as 2008. It is quite saddening that the reality is that 12 years after that great book, The Tao of Network Security Monitoring, the common state of network architectures is…well, not so defensible still.</p><p>But the situation here was not <em>un</em>defensible. There were quite a lot of (relatively) quick wins to improve detection and response, as well as implementing some information security best practices. For example, we recommended implementing the most critical <a href="https://www.cisecurity.org/controls/">CIS Controls</a>. We also further improved logging, started rolling out risk-based use cases to <a href="https://www.elastic.co/products/">Elastic Stack,</a> set up NetFlow and fine tuned the <a href="https://en.wikipedia.org/wiki/Intrusion_detection_system">IDS</a>. And to the liking of the GISO, everything could be done with Open Source software, reducing cost and thus having less stress on the IT budget. This is what we call a “Bootcamp” — evaluating an organization from zero insight through short-term insight, to medium-term insight and some kind of intrusion detection, which the organization can run and maintain themselves.</p><p>This “Bootcamp” is in no way a substitution for a Managed Security Service Provider. We know very well that organizations mostly lack the resources to handle their own IDS full-time. But contracting an MSSP without internal knowledge of the infrastructure is not a smart business decision. Choosing and contracting an MSSP is not a process to be taken lightly, because you are talking about a long term commitment with a supplier who will have a foothold in the very core of your infrastructure. Better to make an informed decision, right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Em_pmyl1YhE5FwiIxKGyfQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@john_cameron?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">John Cameron</a> on <a href="https://unsplash.com/s/photos/bootcamp-training?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Wrap-up</h4><p>Security testing is not a one-time thing. Many organizations, even banks with large sums of money at their fingertips, dread an annual security check. We understand! These things take time, energy, money and most of the time the results yell “You are not doing their job well enough!”. This is mostly because your digital landscape has to change so fast that more often than not, you’ll lag behind (that is why visibility in your network is so, so important). In our opinion, security testing should be a constant and at least performed in a different scenario once every six months so changes and adaptation are minimal.</p><p>A Purple Team Mission saves time and leaves your organization with less to worry about. Vulnerabilities are identified and forwarded to the security department the moment they are found and exploited. At the same time, we will help you interpret and plan the fixes to harden your organization’s attack surface before we leave the building.</p><blockquote>Thank you for reading!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adc37c2eb404" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chapter8/purple-team-war-stories-2-adc37c2eb404">Purple Team War Stories — №2</a> was originally published in <a href="https://medium.com/chapter8">Chapter8</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>