<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>offensive security Archives -</title>
	<atom:link href="https://barriersec.com/tag/offensive-security/feed/" rel="self" type="application/rss+xml" />
	<link>https://barriersec.com/tag/offensive-security/</link>
	<description></description>
	<lastBuildDate>Wed, 20 Sep 2023 16:14:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.15</generator>

<image>
	<url>https://barriersec.com/wp-content/uploads/cropped-Monochrome-on-Transparent-32x32.png</url>
	<title>offensive security Archives -</title>
	<link>https://barriersec.com/tag/offensive-security/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Jumpcloud and Security : tidbit for Attack and Detect</title>
		<link>https://barriersec.com/2023/09/jumpcloud-and-security-tidbit-for-attack-and-detect/</link>
		
		<dc:creator><![CDATA[goutham madhwaraj]]></dc:creator>
		<pubDate>Tue, 19 Sep 2023 21:29:09 +0000</pubDate>
				<category><![CDATA[Attack & Detect]]></category>
		<category><![CDATA[adversary simulation]]></category>
		<category><![CDATA[jumpcloud]]></category>
		<category><![CDATA[offensive security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[security monitoring]]></category>
		<guid isPermaLink="false">https://barriersec.com/?p=836</guid>

					<description><![CDATA[<p>Intention: JumpCloud(link), a cloud directory service, shares many similarities with Active Directory and offers efficient capabilities. In this post, we&#8230;</p>
<p>The post <a rel="nofollow" href="https://barriersec.com/2023/09/jumpcloud-and-security-tidbit-for-attack-and-detect/">Jumpcloud and Security : tidbit for Attack and Detect</a> appeared first on <a rel="nofollow" href="https://barriersec.com"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<h4 class="p1"><b>Intention: </b></h4>
<p>JumpCloud(<a href="http://jumpcloud.com">link</a>), a cloud directory service, shares many similarities with Active Directory and offers efficient capabilities. In this post, we aim to provide clarity on a pressing question:</p>
<h6><strong>How quickly can we detect a compromised JumpCloud Administrator API token or Admin account, and why is it crucial?</strong></h6>
<p>Recent events, such as JumpCloud&#8217;s own security breach [<a href="https://www.mandiant.com/resources/blog/north-korea-supply-chain">link</a>], have underscored the importance of early detection and monitoring in such scenarios. During their breach incident, it was revealed that their internal commands framework had been compromised, leading to the deployment of a malicious script into customer environments.(<a href="https://jumpcloud.com/blog/security-update-june-20-incident-details-and-remediation">here</a>) , based on the incident details provided by JumpCloud &amp; Mandiant, we could infer Jumpcloud Internal Employee who had access to production database was compromised via spear phishing ,abusing his access, several malicious command jobs were scheduled on handful of JC customers organisation&#8217;s endpoints via database injection which finally resulted in infection of victims. This incident serves as a stark reminder for customers to enhance their monitoring of the JumpCloud network.</p>
<p>Furthermore, the growing trend of threat actors exploiting legitimate tools for command and control makes it imperative for the broader security community to be informed about ways to monitor such tools effectively.</p>
<p>This post is structured to provide insights for both offensive and defensive teams. It offers an overview of JumpCloud (JC) network, insights into the attacker&#8217;s perspective, and guidance on building monitoring capabilities for defenders.</p>
<p>Below are my personal notes and key takeaways from a recent engagement I participated in to help Detection team build monitoring around JumpCloud acting as an adversary.</p>
<h4><strong>Introduction:</strong></h4>
<p>JumpCloud&#8217;s similarity to Active Directory is notable. A JumpCloud Admin account can be equated to a Domain Admin Account in an Active Directory environment, granting extensive access to the entire JumpCloud network. The longer a threat actor remains undetected within the network, the more damage they can inflict. Therefore, it is of utmost importance to establish robust monitoring systems around JumpCloud to promptly identify and contain any anomalous behaviour.</p>
<p>To simplify the components and workflow of JumpCloud(JC) in comparison to traditional AD, there are several key elements:</p>
<ol>
<li><strong>User Objects:</strong> These represent individual users and their credentials.</li>
<li><strong>System Objects:</strong> These represent machines or devices that are enrolled in JumpCloud.</li>
<li><strong>User Groups:</strong> These are collections of users grouped together for various purposes, such as &#8220;devs,&#8221; &#8220;sysadmins,&#8221; or &#8220;marketing.&#8221;</li>
<li><strong>System/Device Groups:</strong> These are collections of systems or devices, like servers or end-user machines, organised for management purposes.</li>
<li><strong>Policy Objects:</strong> These are policies that can be applied to a system group or individual system to enforce specific configurations or security settings.</li>
<li><strong>Policy Groups:</strong> These consist of multiple policies grouped together and associated with a device or system.</li>
<li><strong>Command Object:</strong> This allows for the execution of individual commands on a system or system group for administrative purposes.</li>
</ol>
<p>In summary, JumpCloud involves managing user and system objects, organising users and systems into groups, applying policies to enforce configurations, and executing commands as needed.</p>
<p class="p1">System administrators enroll devices in JumpCloud by installing the JumpCloud agent. This agent acts as an initialisation service, facilitating communication with JumpCloud&#8217;s servers. Once enrolled, administrators can manage devices using either the JumpCloud console or APIs, and JumpCloud&#8217;s cross-platform compatibility ensures it works seamlessly across different operating systems, including Windows, Mac, and Linux.</p>
<p class="p1">JumpCloud (JC) APIs consist of three distinct sets of APIs. When a threat actor possesses a JC API token, achieving persistence and enumeration becomes relatively straightforward due to the APIs&#8217; accessibility over the public internet.</p>
<h5 class="p1"><b>Directory Insights API</b></h5>
<p class="p3">Directory Insights API allows you to query directory events at your organization. It provides event logs of activity within your directory and monitors user authentications to the console, SSO, RADIUS, and LDAP. Shine a light on your audit trails leading up to critical events. This is the backbone of our monitoring around JC. each operation done by an administrator or a user on JC generate specific event types, using which we can build our monitoring.Feeding the Jumpcloud directory insights event logs to SIEM systems is a must.</p>
<p class="p3"><strong>Note: Access to Directory insights is only available on selective plans.</strong>(<a href="https://jumpcloud.com/pricing">here</a>)<strong>We either can use directory insights API for monitoring JC events / use a third SIEM tools ( like Splunk) to ingest JC logs and build monitoring around it.</strong></p>
<h6 class="p3"><strong>version 1: <a href="https://docs.jumpcloud.com/api/insights/directory/1.0/index.html">https://docs.jumpcloud.com/api/insights/directory/1.0/index.html</a></strong></h6>
<h5 class="p2"><b>JumpCloud API</b></h5>
<p class="p1">JumpCloud currently utilises two versions of APIs. Depending on the type of integration, it may be required to use both V1 and V2 APIs.</p>
<h6 class="p1"><strong>version 1 : </strong><a href="https://docs.jumpcloud.com/api/1.0/index.html">JumpCloud API Docs</a></h6>
<h6 class="p1"><strong>version 2: </strong><a href="https://docs.jumpcloud.com/api/2.0/index.html">JumpCloud API Docs</a></h6>
<p>To conclude, directory insight events can be used to build detection &amp; monitoring around jumpcloud. JumpCloud API can be used to emulate threat actor actions.</p>
<h4><strong>Scenario:</strong></h4>
<p>let&#8217;s delve into the exciting aspect: a non-exhaustive list of JumpCloud (JC) events that can be triggered by a threat actor once they&#8217;ve infiltrated the compromised JC network. In this scenario, we&#8217;ll assume a threat actor has executed the following actions, and we&#8217;ll explore methods to detect these events if available. For clarity, we&#8217;ve simplified the scenario covering following steps:</p>
<ol>
<li><strong>Data Gathering and Enumeration:</strong> The threat actor begins by gathering all data and enumerating the existing JC environment.</li>
<li><strong>Malicious Group Policy Creation:</strong> They proceed to create a malicious group policy within JC.</li>
<li><strong>Attaching the Malicious Group Policy:</strong> The actor attaches this malicious group policy to system groups, such as &#8216;windows-group&#8217; or &#8216;mac-group.&#8217;</li>
<li><strong>Remote Command Execution:</strong> The threat actor executes remote commands on systems or system groups within JC.</li>
<li><strong>System Data Erasure via MDM:</strong> Using JC&#8217;s Mobile Device Management (MDM) feature, they erase all system data across all systems.</li>
<li><strong>Malicious Group Policy Deletion:</strong> Lastly, the actor deletes the malicious group policy and erases all previously created commands.</li>
</ol>
<p>For each of these actions, we will identify the monitoring capabilities if available. Additionally, we will highlight key detection events corresponding to these actions.</p>
<h5><strong>Enumeration:</strong></h5>
<p class="p1">There are variety of ways that an attacker can do enumeration. The following list is non exhaustive and contains only a subset of critical/major calls that can be used by attackers.</p>
<ol class="ol1">
<li class="li1">Enumerate all the systems of the org : →
<ol class="ol1">
<li>
<pre><code>curl -X GET https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>systems
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span>
  <span class="token operator">-</span>H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span></code></pre>
<p><a href="https://docs.jumpcloud.com/api/1.0/index.html#operation/systems_list">https://docs.jumpcloud.com/api/1.0/index.html#operation/systems_list</a></li>
</ol>
</li>
<li>Enumerate all the users of the org : →
<ol class="ol1">
<li>
<pre><code>curl -X GET https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>systemusers
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span>
  <span class="token operator">-</span>H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span></code></pre>
<p><a href="https://docs.jumpcloud.com/api/1.0/index.html#tag/Systemusers/operation/systemusers_list">https://docs.jumpcloud.com/api/1.0/index.html#tag/Systemusers/operation/systemusers_list</a></li>
</ol>
</li>
<li>Enumerate all the user groups of the org: →
<ol class="ol1">
<li>
<pre><code>curl <span class="token operator">-</span>X GET https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>v2<span class="token operator">/</span>usergroups \
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span></code></pre>
</li>
</ol>
</li>
<li>Enumerate systems and system groups bound to each of the identified user with their privileges. →
<ol class="ol1">
<li>
<pre><code>curl -X GET https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>v2<span class="token operator">/</span>users<span class="token operator">/</span><strong><span class="token punctuation">{</span>UserID<span class="token punctuation">}</span></strong><span class="token operator">/</span>systems
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span>
  <span class="token operator">-</span>H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span>
</code></pre>
<pre><code>curl -X GET https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>v2<span class="token operator">/</span>users<span class="token operator">/</span><strong><span class="token punctuation">{</span>UserID<span class="token punctuation">}</span></strong><span class="token operator">/</span>systemgroups
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span>
  <span class="token operator">-</span>H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span></code><code></code></pre>
<p><a href="https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_userTraverseSystem">https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_userTraverseSystem</a> <a href="https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_userTraverseSystemGroup">https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_userTraverseSystemGroup</a></li>
</ol>
</li>
<li>Enumerate policy groups bound to a system group : →
<ol class="ol1">
<li>
<pre><code>curl -X GET https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>v2<span class="token operator">/</span>systems<span class="token operator">/</span><strong><span class="token punctuation">{</span>System_ID<span class="token punctuation">}</span></strong><span class="token operator">/</span>policygroups
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span>
  <span class="token operator">-</span>H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span></code></pre>
<p><a href="https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_systemTraversePolicyGroup">https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_systemTraversePolicyGroup</a></li>
</ol>
</li>
<li>
<p class="p1">Enumerate existing commands created by the sysadmins : →</p>
<ol class="ol1">
<li>
<pre><code>curl -X GET https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>commands<span class="token operator">/
  -H <span class="token string">'Accept: application/json'</span> \
  -H <span class="token string">'Content-Type: application/json'</span>
  -H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span></span></code></pre>
<p><a href="https://docs.jumpcloud.com/api/1.0/index.html#tag/Commands/operation/commands_list">https://docs.jumpcloud.com/api/1.0/index.html#tag/Commands/operation/commands_list</a></li>
</ol>
</li>
<li class="li1">Enumerate existing command results which are still on the JC(very handy and many a times juicy sensitive info!)  : →
<ol class="ol1">
<li>
<pre><code>curl -X GET https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>commandresults
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span>
  <span class="token operator">-</span>H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span></code></pre>
<p><a href="https://docs.jumpcloud.com/api/1.0/index.html#tag/Command-Results/operation/command_results_list">https://docs.jumpcloud.com/api/1.0/index.html#tag/Command-Results/operation/command_results_list</a></li>
</ol>
</li>
</ol>
<p>Unfortunately, JC directory insight events do not have any out of the box event captures for enumeration, this has to be built on need basis ingesting audit logs.</p>
<h5><strong>Creating a Malicious Policy on JC and Associating it with a System Group:</strong></h5>
<p>To create a policy or group policies and associate them with a system group, JumpCloud provides a set of APIs. JumpCloud offers a wide range of policy enforcement options, including the ability to control antivirus behavior, push custom registry keys to associated system groups, and disable security hardening policies already applied to a system group, among other capabilities.</p>
<p>For an attacker, this functionality can be particularly useful, as it creates an opportunity for persistence and complete control over the JumpCloud network.</p>
<ol>
<li>Create a policy : →
<ol class="ol1">
<li>
<pre><code>curl <span class="token operator">-</span>X POST https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>v2<span class="token operator">/</span>policies \
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'x-api-key: {<strong>API_KEY</strong>}'</span> \
  <span class="token operator">-</span>d '<span class="token punctuation">{</span>
    <strong><span class="token punctuation">{</span>Policy_Parameters<span class="token punctuation">}</span></strong>
  <span class="token punctuation">}</span>'</code></pre>
<p><a href="https://docs.jumpcloud.com/api/2.0/index.html#tag/Policies/operation/policies_post">https://docs.jumpcloud.com/api/2.0/index.html#tag/Policies/operation/policies_post</a></li>
</ol>
</li>
<li>Associate Policy to System Group :→
<ol>
<li>
<pre><code>curl <span class="token operator">-</span>X POST https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>v2<span class="token operator">/</span>policies<span class="token operator">/</span><strong><span class="token punctuation">{</span>Policy_ID<span class="token punctuation">}</span></strong><span class="token operator">/</span>associations<span class="token operator">/</span> \
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'x-api-key: {API_KEY}'</span> \
  <span class="token operator">-</span>d '<span class="token punctuation">{</span>
    <span class="token string">"op"</span><span class="token punctuation">:</span> <span class="token string">"add"</span><span class="token punctuation">,</span>
    <span class="token string">"type"</span><span class="token punctuation">:</span> <span class="token string">"<strong>system_group</strong>"</span><span class="token punctuation">,</span>
    <span class="token string">"id"</span><span class="token punctuation">:</span> <span class="token string">"<strong>{Group_ID}</strong>"</span>
  <span class="token punctuation">}</span></code></pre>
<p><a href="https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_policyAssociationsPost">https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_policyAssociationsPost</a></p>
<p>Once the association succeeds, policies associated with system groups are executed in real time.</li>
</ol>
</li>
</ol>
<h6><strong>How do we detect?</strong></h6>
<p class="p1"> We can monitor for the following directory insights events ingested to SIEM systems such as Splunk / custom monitoring via API&#8217;s. you can further refine monitoring rule in conjunction to base event.</p>
<pre><code class="language-json"><span class="token string-property property">"event_type"</span><span class="token operator">:</span> <span class="token string">"<b>policy_create</b>"
<span class="token string-property property">"event_type"</span><span class="token operator">:</span> "<b>policy_update</b>"
<span class="token string-property property">"event_type"</span><span class="token operator">:</span> "<b>policy_delete</b>"
<span class="token string-property property">"event_type"</span><span class="token operator">:</span> "<strong>association_change</strong>"

<strong>Splunk Query : index=jc-directoryinsights sourcetype=jc:events event_type=policy_create OR event_type=policy_delete OR event_type=policy_update OR event_type=association_change </strong></span></code></pre>
<h5><strong>Code Execution:</strong></h5>
<p class="p1">Attackers can achieve code execution on the systems/system groups using the following API.</p>
<pre><code>curl -X POST https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>commands<span class="token operator">/</span> \
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span>
  <span class="token operator">-</span>H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span>
  <span class="token operator">-</span>d <span class="token string">'{"name":"Test API Command", "command":"{AnyC<strong>ommand}</strong>", "user":"<strong>{UserID}</strong>", "schedule":"", "timeout":"100"}</span></code></pre>
<p><a href="https://docs.jumpcloud.com/api/1.0/index.html#tag/Commands/operation/commands_post">https://docs.jumpcloud.com/api/1.0/index.html#tag/Commands/operation/commands_post</a></p>
<p class="p2">Using the above API, an attacker can create a command and force it to immediately run on the user associated systems /user associated system group.</p>
<h6><strong>How do we detect?</strong></h6>
<p class="p1"> We can monitor for the following directory insights events ingested to SIEM systems such as Splunk / custom monitoring via API&#8217;s. you can further refine monitoring rule in conjunction to base event.</p>
<pre><code class="language-json"><span class="token string-property property">"event_type"</span><span class="token operator">:</span> <span class="token string">"<b>command_create</b>"
<strong>Splunk Query:</strong> <strong>index=jc-directoryinsights sourcetype=jc:events event_type=command_create</strong></span></code></pre>
<h6><strong>Note: In case of JC breach, with the forensics provided(<a href="https://www.mandiant.com/resources/blog/north-korea-supply-chain">here</a>), there was an immediate execution of a command which deployed and executed malicious ruby script. With the monitoring for such events, this action would have been flagged as anomaly on the customer&#8217;s network.</strong></h6>
<p>&nbsp;</p>
<h5 class="p1"><b>Using MDM feature of JC, Erase all the system data of all systems:</b></h5>
<p class="p1">JumpCloud offers a range of remote Mobile Device Management (MDM) commands that empower administrators to remotely perform various operations on devices, from basic actions like restarts and shutdowns to more severe actions such as erasing all data on a system or locking users, all with a single API call. Unfortunately, threat actors can potentially abuse these commands to wreak havoc within the system.</p>
<p class="p1">We can achieve one of such sensitive events via the following API :</p>
<pre><code> curl <span class="token operator">-</span>X POST https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>v2<span class="token operator">/</span>applemdms<span class="token operator">/</span><strong><span class="token punctuation">{</span>apple_mdm_id<span class="token punctuation">}</span></strong><span class="token operator">/</span>devices<span class="token operator">/</span><strong><span class="token punctuation">{</span>device_id<span class="token punctuation">}</span></strong><span class="token operator">/</span>erase \
  <span class="token operator">-</span>H <span class="token string">'accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'content-type: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'x-api-key: {<strong>API_KEY</strong>}'</span> \
  <span class="token operator">-</span>d <span class="token string">'{}'</span></code></pre>
<h6><strong>Erase an endpoint:</strong><a href="https://docs.jumpcloud.com/api/2.0/#tag/Apple-MDM/operation/applemdms_devicesClearActivationLock"> https://docs.jumpcloud.com/api/2.0/#tag/Apple-MDM/operation/applemdms_devicesClearActivationLock</a></h6>
<p><strong>apple_mdm_id</strong> can be fetched by prior call to following end point : <a href="https://docs.jumpcloud.com/api/2.0/#tag/Apple-MDM/operation/applemdms_list">https://docs.jumpcloud.com/api/2.0/#tag/Apple-MDM/operation/applemdms_list</a></p>
<p>all enrolled MDM <strong>device_id&#8217;s</strong> can be fetched by prior call to following end point: <a href="https://docs.jumpcloud.com/api/2.0/#tag/Apple-MDM/operation/applemdms_list">https://docs.jumpcloud.com/api/2.0/#tag/Apple-MDM/operation/applemdms_list</a></p>
<h6><strong>How do we detect?</strong></h6>
<p class="p1"> We can monitor for the following directory insights events ingested to SIEM systems such as Splunk / custom monitoring via API&#8217;s. you can further refine monitoring rule in conjunction to base event. sample splunk query to monitor such dangerous remote calls,</p>
<pre><code class="language-json"><span class="token string-property property">"event_type"<span class="token operator">:</span> <span class="token string">"<strong>mdm_command_result</strong>"</span>
<strong><span class="token string">Splunk Query: index=jc-directoryinsights sourcetype=jc:events </span>mdm_command_result mdm_device_id="*" "command.request_type"=EraseDevice</strong></span></code></pre>
<h5 class="p1"><b>Delete the malicious group policy and erase all the command results:</b></h5>
<p class="p1">Finally as a cleanup, an attacker may try to delete the JC commands run, deleting the created policy , removing the relevant associations.</p>
<p class="p1">This can be achieved by the following API:</p>
<h6><strong>Dis-associate associations:</strong></h6>
<pre><code>curl <span class="token operator">-</span>X POST https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>v2<span class="token operator">/</span>policygroups<span class="token operator">/</span><span class="token punctuation">{</span><strong>GroupID</strong><span class="token punctuation">}</span><span class="token operator">/</span>associations \
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'x-api-key: {<strong>API_KEY</strong>}'</span> \
  <span class="token operator">-</span>d '<span class="token punctuation">{</span>
    <span class="token string">"op"</span><span class="token punctuation">:</span> <span class="token string">"delete"</span><span class="token punctuation">,</span>
    <span class="token string">"type"</span><span class="token punctuation">:</span> <span class="token string">"system"</span><span class="token punctuation">,</span>
    <span class="token string">"id"</span><span class="token punctuation">:</span> <span class="token string">"{<strong>SystemID</strong>}"</span>
  <span class="token punctuation">}</span>'</code></pre>
<p><a href="https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_policyGroupAssociationsPost">https://docs.jumpcloud.com/api/2.0/index.html#tag/Graph/operation/graph_policyGroupAssociationsPost</a></p>
<h6><strong>Delete Policy:</strong></h6>
<pre><code>curl <span class="token operator">-</span>X DELETE https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>v2<span class="token operator">/</span>policies<span class="token operator">/{<strong>id</strong>}</span>\
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'x-api-key: {<strong>API_KEY</strong>}'</span></code></pre>
<p><a href="https://docs.jumpcloud.com/api/2.0/index.html#tag/Policies/operation/policies_delete">https://docs.jumpcloud.com/api/2.0/index.html#tag/Policies/operation/policies_delete</a></p>
<h6><strong>Delete Command:</strong></h6>
<pre><code>curl <span class="token operator">-</span>X DELETE https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>console<span class="token punctuation">.</span>jumpcloud<span class="token punctuation">.</span>com<span class="token operator">/</span>api<span class="token operator">/</span>commands<span class="token operator">/</span><strong><span class="token punctuation">{</span>CommandID<span class="token punctuation">}</span></strong> \
  <span class="token operator">-</span>H <span class="token string">'Accept: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'Content-Type: application/json'</span> \
  <span class="token operator">-</span>H <span class="token string">'x-api-key: <strong>{API_KEY}</strong>'</span></code></pre>
<p><a href="https://docs.jumpcloud.com/api/1.0/index.html#tag/Commands/operation/commands_delete">https://docs.jumpcloud.com/api/1.0/index.html#tag/Commands/operation/commands_delete</a></p>
<h6><strong>How do we detect?</strong></h6>
<p class="p1"> We can monitor for the following directory insights events ingested to SIEM systems such as Splunk / custom monitoring via API&#8217;s. you can further refine monitoring rule in conjunction to base event. sample splunk query to monitor such dangerous remote calls,</p>
<pre><code class="language-json"><span class="token string-property property">"event_type"<span class="token operator">:</span> <span class="token string">"<strong>command_delete</strong>"</span>
"event_type"<span class="token operator">:</span> <span class="token string">"<strong>policy_delete</strong>"
"event_type"<span class="token operator">:</span> "<strong>commandresult_delete</strong>"
<strong>Splunk Query:</strong> <strong>index=jc-directoryinsights sourcetype=jc:events event_type=command_delete OR event_type=policy_delete OR event_type=commandresult_delete</strong></span></span></code></pre>
<p class="p1">Detection in the above-mentioned scenario represents just a subset of the monitoring capabilities that can be developed using JumpCloud events. JumpCloud provides a diverse range of event types, enabling us to expand our monitoring scope and identify potentially malicious behaviour by threat actors within our network before they can disrupt our systems.</p>
<p class="p1">Few of the other interesting scenarios that can be looked at and needs active monitoring,</p>
<ol class="ol1">
<li class="li1">Granting global sudo access while creating a JC user.</li>
<li class="li1">Adding local users via JC group policies.</li>
<li class="li1">Many admin/privileged events in a short span of time. ( ex: 100’s of deletion of command results in short span of time.)</li>
<li class="li1">Locking out existing JC user.</li>
<li class="li1">Disabling MFA on an existing JC user.</li>
<li class="li1">Reviving suspended/inactive JC users.</li>
<li class="li1">Modifying existing organisation settings. (disable MFA etc )</li>
</ol>
<p>Comprehensive event types and their exhaustive list can be found in the JumpCloud documentation, which serves as resource for building effective and vigilant monitoring. You can access this information here: <a href="https://docs.jumpcloud.com/api/insights/directory/1.0/index.html#section/Event-Types" target="_new" rel="noopener">Link to JumpCloud Documentation.</a></p>
<p>The post <a rel="nofollow" href="https://barriersec.com/2023/09/jumpcloud-and-security-tidbit-for-attack-and-detect/">Jumpcloud and Security : tidbit for Attack and Detect</a> appeared first on <a rel="nofollow" href="https://barriersec.com"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Offensive Security Certified Expert ( OSCE ) certification review</title>
		<link>https://barriersec.com/2019/04/offensive-security-certified-expert-osce-certification-course-review/</link>
		
		<dc:creator><![CDATA[goutham madhwaraj]]></dc:creator>
		<pubDate>Mon, 15 Apr 2019 21:42:18 +0000</pubDate>
				<category><![CDATA[OSCE]]></category>
		<category><![CDATA[CTP]]></category>
		<category><![CDATA[Exam]]></category>
		<category><![CDATA[offensive security]]></category>
		<category><![CDATA[Review]]></category>
		<guid isPermaLink="false">https://barriersec.com/?p=583</guid>

					<description><![CDATA[<p>Hi All, Its been really a long gap since i posted last content on my blog . As i had&#8230;</p>
<p>The post <a rel="nofollow" href="https://barriersec.com/2019/04/offensive-security-certified-expert-osce-certification-course-review/">Offensive Security Certified Expert ( OSCE ) certification review</a> appeared first on <a rel="nofollow" href="https://barriersec.com"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi All, Its been really a long gap since i posted last content on my blog . As i had been busy with one of the certification courses that i dreamed a long time back to achieve . Now since the mission is accomplished ( finally!! ), i thought of writing a small review post that may help the future aspirants to know bits and pieces  during / before they start their journey. Lets begin!</p>
<p>I shall keep this post short and precise to the point in the form of FAQ&#8217;s .</p>
<p><strong>Course link :</strong></p>
<p><a href="https://www.offensive-security.com/information-security-certifications/osce-offensive-security-certified-expert/">https://www.offensive-security.com/information-security-certifications/osce-offensive-security-certified-expert/</a></p>
<p>&nbsp;</p>
<p><em><strong>Should i need to know assembly and shellcoding ?</strong></em></p>
<p>Certainly Yes! I started my preparation with SLAE x86 course from pentesteracademy . It was a major booster for me during the course as i was able to grasp the content very easily.</p>
<p><strong>SLAE x86 course :</strong>  <a href="https://www.pentesteracademy.com/course?id=3">https://www.pentesteracademy.com/course?id=3</a></p>
<p><strong>Pro tip :</strong> complete all assignments on your own! even if you do not want to submit for certification.</p>
<p>(do check out SLAE x86 assignment blog posts on this blog for reference )</p>
<p><em><strong>Should i need to know coding/programming?</strong></em></p>
<ol>
<li style="list-style-type: none;">
<ol>
<li style="list-style-type: none;">You should have some coding/scripting skill  in any of your preferred language  . I am not sure i would have completed this course without my development skills. Its not mandatory , but if you can grasp/analyse the flow and can read the code and understand , it will take you a long way . It also helps you automate part of few tedious process to make your job easier.</li>
</ol>
</li>
</ol>
<p><strong>Should i need to know basics of exploit development ?</strong></p>
<p>You should know how to exploit a basic vanilla buffer overflow at bare minimum .</p>
<p>Even though the course teaches you all you need to know , doing homework and preparing enough will help you to grasp the content very easily . These two resource links is all you need to prepare well ( weighed in gold! ).</p>
<p><strong>Fuzzy security windows exploit dev tutorials ( read till ROP / till part 7 ) :</strong></p>
<p><a href="http://www.fuzzysecurity.com/tutorials/expDev/1.html">http://www.fuzzysecurity.com/tutorials/expDev/1.html</a></p>
<p><strong>Corelan exploit development tutorials :</strong></p>
<p>Check out <a href="https://www.corelan.be/index.php/2009/07/19/exploit-writing-tutorial-part-1-stack-based-overflows/">here </a></p>
<p><strong>I hear people talk a lot about what fuzzer to use etc, what are they and what i need to know?</strong></p>
<p>Fuzzers are just automated modules that can help you in finding the buffer overflow vulnerability in different application . it sends lots of different input(and/or different length ) to the application and helps you analyse the output to find if the application is vulnerable to BoF or not.</p>
<p>CTP Course teaches you in detail how to setup and use them. These are the popular fuzzers that  you may need to know that can help you in the course . use what seems comfortable to you.</p>
<ol>
<li>Spike<br />
<a href="https://resources.infosecinstitute.com/intro-to-fuzzing/#gref">https://resources.infosecinstitute.com/intro-to-fuzzing/#gref</a></p>
<ol>
<li style="list-style-type: none;">
<ol>
<li style="list-style-type: none;"></li>
</ol>
</li>
</ol>
</li>
<li> Boofuzz
<ol>
<li><a href="https://www.doyler.net/security-not-included/boofuzz-introduction">https://www.doyler.net/security-not-included/boofuzz-introduction</a></li>
</ol>
</li>
</ol>
<p><strong>What articles can i refer for backdooring / AV bypass courseware syllabus part?</strong></p>
<p><a href="https://www.exploit-db.com/docs/english/42061-introduction-to-manual-backdooring.pdf">https://www.exploit-db.com/docs/english/42061-introduction-to-manual-backdooring.pdf</a></p>
<p><a href="https://captmeelo.com/exploitdev/osceprep/2018/07/16/backdoor101-part1.html">https://captmeelo.com/exploitdev/osceprep/2018/07/16/backdoor101-part1.html</a></p>
<p><a href="https://pentest.blog/art-of-anti-detection-2-pe-backdoor-manufacturing/">Art of Anti Detection 2 PE backdoor manufacturing</a></p>
<p><strong>few other important links that might help preparing for the course or for improvising skill?</strong></p>
<p><a href="https://www.absolomb.com/2018-07-24-VulnServer-GTER/">https://www.absolomb.com/2018-07-24-VulnServer-GTER/</a></p>
<p><a href="https://buffered.io/posts/jumping-with-bad-chars/">https://buffered.io/posts/jumping-with-bad-chars/</a></p>
<p><a href="https://buffered.io/posts/idsecconf-2013-myftpd-challenge/">https://buffered.io/posts/idsecconf-2013-myftpd-challenge/</a></p>
<p><a href="https://www.offensive-security.com/vulndev/quickzip-stack-bof-0day-a-box-of-chocolates/">https://www.offensive-security.com/vulndev/quickzip-stack-bof-0day-a-box-of-chocolates/</a></p>
<p><a href="http://vellosec.net/2018/08/carving-shellcode-using-restrictive-character-sets/">craving shellcode using restrictive characterset</a></p>
<p><strong>After completing the course where can i practice ?</strong></p>
<p>Practice all different exploitation techniques by recreating random BoF exploits from exploit-DB .</p>
<p>Practice by setting up vulnserver in your local environment and by exploiting all the commands .</p>
<p>here you can find few different  exploits i developed during my course ware/preparation . ( need to update few more to the repo ,will do it soon!).</p>
<p><a href="https://github.com/strikergoutham/OSCE-preparation">https://github.com/strikergoutham/OSCE-preparation</a></p>
<p>Key here is to learn to exploit an application in multiple ways.</p>
<p><strong>How was the CTP courseware ?</strong></p>
<p>Even though everybody complains that the course materials are bit dated, i found it to be valuable and it increased my knowledge tenfolds . It forces the student to explore more than giving it out easily ( offsec Style! )</p>
<p>I wouldnt be going into the details , just knowing the syllabus alone gives the reader an idea what is taught in the course. Unlike OSCP labs , labs in OSCE is totally different.  Each student is allocated a dedicated set of machines that can be leveraged in completing tasks taught in the course. Do all the exercises at least thrice until you are confident enough with the concepts. Course also includes a bit of web application vectors (XSS/LFI) and network attacks as well.</p>
<p><strong>How was the exam?</strong></p>
<p>Brutal! a complete 48 hour marathon !  I completed two high pointer tasks quite early in my first day of the exam and was stuck on a low pointer which showed me nightmare and threw me into total disbelief about my approach. I had enough points to pass at around 29th hour into the exam.</p>
<p>It was followed by a exhaustive report ( nearly 100 pages !! ) and finally after 4 days offsec confirmed that i have cleared the certification exam!</p>
<p><strong>Your final thoughts?</strong></p>
<p>This course was fun and challenging . This has paved a new way for my curious  mind.  Even though using the techniques taught in the course, you cannot exploit modern systems or cannot evade all modern antivirus systems , it teaches you strong foundation which can be used to build/enhance/grasp further skills and advanced topics .</p>
<p>Thats it for now! Shubha dina <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The post <a rel="nofollow" href="https://barriersec.com/2019/04/offensive-security-certified-expert-osce-certification-course-review/">Offensive Security Certified Expert ( OSCE ) certification review</a> appeared first on <a rel="nofollow" href="https://barriersec.com"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>OSCP Certification Review(Offensive Security Certified Professional)</title>
		<link>https://barriersec.com/2018/09/oscp-certification-reviewoffensive-security-certified-professional/</link>
		
		<dc:creator><![CDATA[goutham madhwaraj]]></dc:creator>
		<pubDate>Wed, 19 Sep 2018 21:49:30 +0000</pubDate>
				<category><![CDATA[Certifications]]></category>
		<category><![CDATA[OSCP]]></category>
		<category><![CDATA[offensive security]]></category>
		<category><![CDATA[oscp]]></category>
		<category><![CDATA[pwk]]></category>
		<guid isPermaLink="false">https://barriersec.com/?p=197</guid>

					<description><![CDATA[<p>Hi All! I just wanted to share my experience on my journey throughout OSCP. what is OSCP? OSCP is Offensive&#8230;</p>
<p>The post <a rel="nofollow" href="https://barriersec.com/2018/09/oscp-certification-reviewoffensive-security-certified-professional/">OSCP Certification Review(Offensive Security Certified Professional)</a> appeared first on <a rel="nofollow" href="https://barriersec.com"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi All! I just wanted to share my experience on my journey throughout OSCP.</p>
<p>what is <strong>OSCP</strong>?</p>
<p><strong>OSCP</strong> is Offensive Security Certified Expert certification provided by <strong>Offensive security</strong> team. This certification can be achieved by taking mandatory <strong>PWK</strong> course provided by <strong>offsec </strong>and passing  <strong>24 hour fully hands on practical exam</strong>.</p>
<p>URL :  <a href="https://www.offensive-security.com/information-security-certifications/oscp-offensive-security-certified-professional/">https://www.offensive-security.com/information-security-certifications/oscp-offensive-security-certified-professional/</a></p>
<p>&nbsp;</p>
<p><strong>Why are you doing it ?!  when there are many reviews available already!??</strong></p>
<p>I come from &#8220;different background&#8221; than most of the reviews i have seen. Just to add to long list of reviews available already <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Lets get to the main part straight!</p>
<p><strong>When Did you start and your previous job experience?</strong></p>
<p>I Started my OSCP journey , in the month of june . I signed up for 60 days of lab time. I had nearly 1.5  years of  previous experience working on<strong> application automation </strong>and <strong>DevOps </strong>projects<strong>. </strong>I was always interested in the penetration testing field and voluntarily took up security testing of the projects i was working on along with my day to day job. I moved  to new team as full time web application pentester  exactly when my course started .</p>
<p><strong>How did you do in your course and labs?</strong></p>
<p>Coming to the course materials, we will get a pdf material and videos which helps us to gain different set of skills  and techniques, which can then be used on labs to pawn different machines which are separated by segments of four departments. we must pawn machines to get access to different networks and finally compromise all the machines in all four network.</p>
<p>My suggestion is to start working on  lab in parallel  with course pdf and videos. And make the most out of your lab.</p>
<p>there are extra points(5) given for documentation of exercises and lab machines, i never bothered to do it . but its really good thing to document as it helps us in our final reporting.</p>
<p>I was able to pawn around 35+ machines in my first month ,including all big four ( Pain, Sufference , Humble and Ghost) and get access to additional two networks&#8230;</p>
<p>When my lab time ended , i relied on solving machines on hackthebox particularly windows ones ( as it was my weakest point!) .</p>
<p><strong>how did you do in your exam?</strong></p>
<p>we need at least 70 out of 100 points to pass the exam. you will be given 24 hrs of time to crack the machines in the exam network. And additional 24 hrs to report your findings .</p>
<p>I gained the required points within first 12 hrs of my exam. Key thing is to enumerate the system properly without jumping directly after partial enumeration. Post exam, i used Official template given by offsec for my reporting.</p>
<p>I received the mail after a day , that i passed.</p>
<p><strong>Some important supplements to the course materials?</strong></p>
<p><a href="https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/">https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/</a></p>
<p><a href="http://www.fuzzysecurity.com/tutorials/16.html">http://www.fuzzysecurity.com/tutorials/16.html</a></p>
<p><a href="https://toshellandback.com/2015/11/24/ms-priv-esc/">https://toshellandback.com/20ehPrivJob.exe15/11/24/ms-priv-esc/</a></p>
<p><a href="https://www.sploitspren.com/2018-01-26-Windows-Privilege-Escalation-Guide/">https://www.sploitspren.com/2018-01-26-Windows-Privilege-Escalation-Guide/</a></p>
<p><a href="https://scriptdotsh.com/index.php/2018/04/17/31-days-of-oscp-experience/">https://scriptdotsh.com/index.php/2018/04/17/31-days-of-oscp-experience</a></p>
<p><a href="https://blog.ropnop.com/using-credentials-to-own-windows-boxes/">https://blog.ropnop.com/using-credentials-to-own-windows-boxes/</a></p>
<p><strong>Is Programming essential?</strong></p>
<p>No . but basic knowledge on any scripting language  such as bash and python will surely help.</p>
<p>if you are just planning to take one, do not wait! just  enroll! its a wonderful experience altogether . Just make sure to do lot of self research on the topics when you are stuck in the labs.</p>
<p><strong>Your final thoughts?</strong></p>
<p>This is one of the best learning curve i ever had until now! because , this course forced me to learn many concepts otherwise i wouldnt touch or read. I was always a linux guy, it force me to learn windows environment and thanks to offsec, its really good to step out of our comfortzone! I thank offensive security team  for providing such awesome experience .</p>
<p>The post <a rel="nofollow" href="https://barriersec.com/2018/09/oscp-certification-reviewoffensive-security-certified-professional/">OSCP Certification Review(Offensive Security Certified Professional)</a> appeared first on <a rel="nofollow" href="https://barriersec.com"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
