<?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>Cyberillo</title>
	<atom:link href="https://cyberillo.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://cyberillo.com</link>
	<description>Reliable Tech Tips and Services</description>
	<lastBuildDate>Mon, 29 Dec 2025 08:23:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://cyberillo.com/wp-content/uploads/cropped-favicon-100x100.png</url>
	<title>Cyberillo</title>
	<link>https://cyberillo.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Local Admin Report with Intune and Log Analytics</title>
		<link>https://cyberillo.com/local-admin-report/</link>
					<comments>https://cyberillo.com/local-admin-report/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Mon, 29 Dec 2025 08:16:15 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Intune]]></category>
		<guid isPermaLink="false">https://cyberillo.com/?p=3613</guid>

					<description><![CDATA[<p>Learn how to create a report of local administrator accounts across your domain with Intune and Log Analytics.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/local-admin-report/">Local Admin Report with Intune and Log Analytics</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In a busy IT environment, handing out &#8220;temporary&#8221; local admin access is almost second nature. A user needs to install something, you grant the access, fix the problem, move on to the next ticket… and forget all about it.</p>



<p>The problem? Those leftover admin rights don’t go away on their own. Over time, they quietly pile up and turn into a serious security risk, which most monitoring tools never bother to check. If you don’t know who’s in the local Administrators group, you’re basically trusting luck.</p>



<p>In this guide, I&#8217;ll walk you trough how to use Intune and Log Analytics to get a clear, reliable report of who actually has local admin access on every device in your environment.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>





<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Solution Overview</h2>



<p>We use a proactive approach to ensure no local admins stay hidden:</p>



<ol class="wp-block-list">
<li><strong>Detection:</strong>&nbsp;A PowerShell script runs daily on every machine to query the administrators group.</li>



<li><strong>Ingestion:</strong>&nbsp;Data is sent to a custom table in our Log Analytics Workspace.</li>



<li><strong>Analysis:</strong>&nbsp;KQL queries filter out authorized local administrator accounts to highlight outliers.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">1. The PowerShell Collection Script</h2>



<p>This script gathers members of the local admin group and sends the data to Azure. By running this via Intune, we get a fresh snapshot of the local admins on each PC every  24 hours.</p>



<p><strong>Prerequisite 1</strong>: Get the <code>$CustomerID</code> from the log analytics workspace Overview tab.</p>



<figure class="wp-block-kadence-image kb-image3613_2d7d33-b1 size-large border"><img fetchpriority="high" decoding="async" width="1024" height="264" src="https://cyberillo.com/wp-content/uploads/Get-Workspace-ID-From-Overview-Section-In-Log-Analytics-1024x264.png" alt="Get-Workspace-ID-From-Overview-Section-In-Log-Analytics" class="kb-img wp-image-3628" srcset="https://cyberillo.com/wp-content/uploads/Get-Workspace-ID-From-Overview-Section-In-Log-Analytics-1024x264.png 1024w, https://cyberillo.com/wp-content/uploads/Get-Workspace-ID-From-Overview-Section-In-Log-Analytics-300x77.png 300w, https://cyberillo.com/wp-content/uploads/Get-Workspace-ID-From-Overview-Section-In-Log-Analytics-768x198.png 768w, https://cyberillo.com/wp-content/uploads/Get-Workspace-ID-From-Overview-Section-In-Log-Analytics-1536x397.png 1536w, https://cyberillo.com/wp-content/uploads/Get-Workspace-ID-From-Overview-Section-In-Log-Analytics.png 1681w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Prerequisite 2:</strong> To get the <code>$SharedKey</code>, use this AZ CLI query.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">az monitor log-analytics workspace get-shared-keys \
   --resource-group xxxxx \
   --workspace-name xxxxxx \
   --query "primarySharedKey"</pre>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># --------------------------------------------------------------------------
# PowerShell Script: Send Local Administrator Group Members to Log Analytics
# --------------------------------------------------------------------------

# ======================
# 1. Configuration
# ======================
$CustomerID = "&lt;your-customer-id>"
$SharedKey  = "&lt;your-shared-key>"
$LogType    = "LocalAdminReport"

# ======================
# 2. Data Collection
# ======================
$DeviceName = $env:COMPUTERNAME

try {
    $AdminMembers = Get-LocalGroupMember -Group "Administrators"
} catch {
    Write-Error "Error retrieving local group members: $($_.Exception.Message)"
    exit 1
}

$DataToSend = @()
foreach ($Member in $AdminMembers) {
    $MemberName = $Member.Name
    $MemberSource = $Member.PrincipalSource
    if (-not [string]::IsNullOrEmpty($MemberName)) {
        $DataToSend += [PSCustomObject]@{
            DeviceName = $DeviceName
            AdminName  = $MemberName
            PrincipalSource = $MemberSource
            TimeGenerated = (Get-Date -Format s)
        }
    }
}

if ($DataToSend.Count -eq 0) {
    Write-Host "No members found in the Administrators group. Skipping log submission."
    exit 0
}

$JsonPayload = $DataToSend | ConvertTo-Json -Depth 5

# ======================
# 3. Build Request and Signature
# ======================
$Bytes         = [System.Text.Encoding]::UTF8.GetBytes($JsonPayload)
$ContentLength = $Bytes.Length
$APIVersion    = "2016-04-01"
$Date          = (Get-Date).ToUniversalTime().ToString("r")
$ResourcePath  = "/api/logs"

# Build the string for signature (see MS Docs)
$SignatureString = "POST`n$ContentLength`napplication/json`nx-ms-date:$Date`n$ResourcePath"

# Decode Shared Key and calculate signature
try {
    $KeyBytes   = [Convert]::FromBase64String($SharedKey)
    $HMACSHA256 = New-Object System.Security.Cryptography.HMACSHA256
    $HMACSHA256.Key = $KeyBytes
    $Hash = $HMACSHA256.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($SignatureString))
    $Signature = [Convert]::ToBase64String($Hash)
} catch {
    Write-Error "Failed to create signature: $($_.Exception.Message)"
    exit 1
}

$Authorization = "SharedKey ${CustomerId}:$Signature"
$URI = "https://$CustomerID.ods.opinsights.azure.com/api/logs?api-version=$APIVersion"

# ======================
# 4. Send Data
# ======================
$Headers = @{
    "Authorization"        = $Authorization
    "x-ms-date"            = $Date
    "Content-Type"         = "application/json"
    "Log-Type"             = $LogType
    "x-ms-log-type"        = $LogType
    "time-generated-field" = "TimeGenerated"
}

try {
    Write-Host "Sending data to Log Analytics ($LogType)..."
    Write-Host "Target URI: $URI"
    $Response = Invoke-RestMethod -Uri $URI -Method Post -Headers $Headers -Body $JsonPayload
    Write-Host "Successfully sent log data."
} catch {
    Write-Error "Failed to send log data. Error: $($_.Exception.Message)"
    if ($_.Exception.Response) {
        try {
            $Reader = New-Object System.IO.StreamReader($_.Exception.Response.GetResponseStream())
            $Details = $Reader.ReadToEnd()
            Write-Error "Azure Response: $Details"
        } catch { }
    }
    exit 1
}

exit 0</pre>



<h2 class="wp-block-heading">2. Running the Script Daily via Intune</h2>



<p>To force the check daily, we deploy an Intune remediation script.</p>



<ol class="wp-block-list">
<li>Go to <a href="https://intune.microsoft.com" target="_blank" rel="noopener">https://intune.microsoft.com</a>.</li>



<li>Navigate to <strong>Devices > Scripts and remediations > Create</strong>.</li>



<li>Enter the above script as the <strong>Detection Script</strong> and leave the <strong>Remediation Script</strong> empty.</li>
</ol>



<figure class="wp-block-kadence-image kb-image3613_3b43a7-12 size-large border"><img decoding="async" width="1024" height="689" src="https://cyberillo.com/wp-content/uploads/Intune-Remediation-Script-Send-Local-Administrator-Group-Members-to-Log-Analytics-1024x689.png" alt="Intune-Remediation-Script-Send-Local-Administrator-Group-Members-to-Log-Analytics" class="kb-img wp-image-3619" srcset="https://cyberillo.com/wp-content/uploads/Intune-Remediation-Script-Send-Local-Administrator-Group-Members-to-Log-Analytics-1024x689.png 1024w, https://cyberillo.com/wp-content/uploads/Intune-Remediation-Script-Send-Local-Administrator-Group-Members-to-Log-Analytics-300x202.png 300w, https://cyberillo.com/wp-content/uploads/Intune-Remediation-Script-Send-Local-Administrator-Group-Members-to-Log-Analytics-768x516.png 768w, https://cyberillo.com/wp-content/uploads/Intune-Remediation-Script-Send-Local-Administrator-Group-Members-to-Log-Analytics.png 1227w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">3. Analyzing the Local Administrator Report</h2>



<p>Once the data is in our log analytics workspace, we use Kusto (KQL) to audit the results. The goal is to separate legitimate domain accounts from unauthorized user accounts that still have the local admin right.</p>



<h3 class="wp-block-heading">Compliance Summary</h3>



<p>This query counts the number of devices where a user is in the administrators group but does not have &#8220;admin&#8221; in their name (filtering out the built-in administrator and domain admins).</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">let allDevices = LocalAdminReport_CL | summarize by DeviceName_s;
let offenderDevices = LocalAdminReport_CL
    | where isnotempty(AdminName_s)
    | where AdminName_s !contains "Admin"
    | summarize by DeviceName_s;
let totalOffenders = offenderDevices 
    | summarize Count = count() 
    | extend Category = "Devices with Local Admin Access";
let compliantDevices = (allDevices
    | join kind=leftanti offenderDevices on DeviceName_s
    | summarize Count = count()
    | extend Category = "Compliant Devices"
);
totalOffenders
| union compliantDevices
| project Category, Count
| order by Category asc
</pre>



<h3 class="wp-block-heading">Detailed Account Audit</h3>



<p>Use this query to select and list every specific account that has been granted local admin permissions in the last 90 days across your computer fleet.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">LocalAdminReport_CL
| where TimeGenerated > ago(90d)
| where isnotempty(AdminName_s)
| where AdminName_s !contains "Admin"
| summarize LatestSeen = max(TimeGenerated) by DeviceName_s, AdminName_s
| order by DeviceName_s asc
</pre>



<h2 class="wp-block-heading">Implementation Tips</h2>



<ul class="wp-block-list">
<li><strong>Intune Deployment:</strong> Set the script to run daily using <strong>Devices &gt; Remediations</strong>. This ensures that if a user is added and then removed, your logs stay accurate.</li>



<li><strong>Filtering:</strong> Adjust the <code>!contains "Admin"</code> logic if your organization uses a different naming standard for authorized admin accounts.</li>



<li><strong>Workbook Visuals:</strong> In Azure Workbooks, use the &#8220;Pie Chart&#8221; renderer for the first query to get an immediate view of your environment&#8217;s health.</li>
</ul>



<h2 class="wp-block-heading">Summary</h2>



<p>Good security isn’t about saying “no” to everything. It’s about knowing what’s actually happening in your environment. With this script and report in place, you get a clear audit trail that shows exactly when someone is added as a local administrator. That way, “temporary” access doesn’t quietly turn into a permanent problem, and you stay in control instead of playing cleanup later.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/local-admin-report/">Local Admin Report with Intune and Log Analytics</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/local-admin-report/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Create a Windows Image for Deployment</title>
		<link>https://cyberillo.com/how-to-create-a-windows-image-for-deployment/</link>
					<comments>https://cyberillo.com/how-to-create-a-windows-image-for-deployment/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Mon, 30 Jun 2025 13:24:14 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://cyberillo.com/?p=3573</guid>

					<description><![CDATA[<p>Create a custom Windows 11 image with this guide. Learn to pre-install apps, remove bloatware, and generalize your OS for seamless deployment.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-create-a-windows-image-for-deployment/">How to Create a Windows Image for Deployment</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Do you need to deploy a customized Windows 11 installation on a bunch of corporate laptops? Or maybe you&#8217;re interested in creating a custom Windows image with all your preferred software and configurations already set up for reuse on multiple devices?</p>



<p>This guide&#8217;s got you covered. We&#8217;ll go through the steps of capturing a customized Windows image, as well as the most common issues you&#8217;ll encounter.</p>





<h2 class="wp-block-heading">1. Get Your Windows 11 Ready</h2>



<p>To start, you&#8217;ll need a Windows 11 ISO.</p>



<ul class="wp-block-list">
<li>If you&#8217;re working with volume licensing, grab your Windows 11 Enterprise ISO from the <a href="https://admin.microsoft.com/Adminportal/Home#/subscriptions/vlnew/downloadsandkeys" target="_blank" rel="noopener">Microsoft 365 Admin Center</a>.</li>



<li>If not, you can download the Windows 11 ISO from <a href="https://www.microsoft.com/en-us/software-download/windows11" target="_blank" rel="noopener">here</a>.</li>
</ul>



<h2 class="wp-block-heading">2. Set Up Your Build Environment</h2>



<p>We&#8217;ll be building this image inside a virtual machine. So, enable the Hyper-V feature on your workstation.</p>



<ul class="wp-block-list">
<li>Navigate to the control panel and select&nbsp;<strong>Programs &gt; Turns Windows features on or off</strong>.</li>



<li>Tick the <strong>Hyper-V</strong> feature and click on <strong>OK</strong>.</li>
</ul>



<div class="wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<figure class="wp-block-table aligncenter"><table><tbody><tr><td class="has-text-align-center" data-align="center"><img decoding="async" width="1370" height="798" class="wp-image-3585" style="width: 1370px;" src="https://cyberillo.com/wp-content/uploads/Turn-on-Windows-Features.png" alt="Turn on Windows Features" srcset="https://cyberillo.com/wp-content/uploads/Turn-on-Windows-Features.png 1532w, https://cyberillo.com/wp-content/uploads/Turn-on-Windows-Features-300x175.png 300w, https://cyberillo.com/wp-content/uploads/Turn-on-Windows-Features-1024x596.png 1024w, https://cyberillo.com/wp-content/uploads/Turn-on-Windows-Features-768x447.png 768w" sizes="(max-width: 1370px) 100vw, 1370px" /></td><td><img decoding="async" src="https://cyberillo.com/wp-content/uploads/Turn-on-Hyper-V.png" alt="Turn on Hyper-V feature" style=""></td></tr></tbody></table></figure>
</div>
</div>



<p>You&#8217;ll need to restart your PC for the Hyper-V feature to be installed.</p>



<p><strong>N.B.</strong> You also need to have virtualization enabled in your system BIOS to use Hyper-V, VMWare, VirtualBox, etc.</p>



<p>After restarting your workstation, create your new virtual machine in Hyper-V and make sure TPM is turned on&#8230; Windows 11 insists on it.</p>



<h2 class="wp-block-heading">3. Install Windows and Your Essential Apps</h2>



<p>Now, install Windows 11 as you normally would within your virtual machine. Then, add all the software you want pre-installed in your custom Windows Image. </p>



<p><strong>N.B.</strong> If you want to make any <code>AppData</code> changes to all user profiles that will be using the customized Windows installation, apply the changes to <code>C:\Users\Default\AppData\Roaming</code>.</p>



<p>After getting all your core applications installed, take a moment to tidy up. Uninstall any bloatware you don&#8217;t need, like Xbox or Solitaire.</p>



<h2 class="wp-block-heading">4. Generalize Your Windows Installation with Sysprep</h2>



<p><strong>Sysprep</strong> is the tool that prepares our Windows setup for capturing. It essentially makes the installation generic, so it can be deployed on different machines.</p>



<ul class="wp-block-list">
<li>Open Command Prompt as an Administrator.</li>



<li>Change directory to Sysprep:&nbsp;<code>cd C:\Windows\System32\Sysprep</code></li>



<li>Run the Sysprep command:&nbsp;<code>sysprep.exe /oobe /generalize /shutdown</code></li>
</ul>



<p>You might hit a snag if your OS drive is encrypted&#8230; This is typical on Windows 11 installations. If Sysprep throws an error, check the log file; it will likely point to the encryption.</p>



<figure class="wp-block-table aligncenter"><table><tbody><tr><td class="has-text-align-center" data-align="center"><img loading="lazy" decoding="async" width="500" height="235" class="wp-image-3589" style="width: 500px;" src="https://cyberillo.com/wp-content/uploads/Sysprep-Error.png" alt="Sysprep Error Dialog" srcset="https://cyberillo.com/wp-content/uploads/Sysprep-Error.png 368w, https://cyberillo.com/wp-content/uploads/Sysprep-Error-300x141.png 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></td><td><img loading="lazy" decoding="async" width="1000" height="224" class="wp-image-3588" style="width: 1000px;" src="https://cyberillo.com/wp-content/uploads/BitLocker-Error-in-Sysprep-Log.png" alt="BitLocker Error in Sysprep Log" srcset="https://cyberillo.com/wp-content/uploads/BitLocker-Error-in-Sysprep-Log.png 1427w, https://cyberillo.com/wp-content/uploads/BitLocker-Error-in-Sysprep-Log-300x67.png 300w, https://cyberillo.com/wp-content/uploads/BitLocker-Error-in-Sysprep-Log-1024x230.png 1024w, https://cyberillo.com/wp-content/uploads/BitLocker-Error-in-Sysprep-Log-768x172.png 768w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></td></tr></tbody></table></figure>



<p>To fix this, turn off BitLocker by running this command in CMD:&nbsp;<code>manage-bde -off C:</code></p>



<p>You&#8217;ll see a message that decryption is underway. You can keep an eye on its progress with:&nbsp;<code>manage-bde -status</code></p>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="977" height="698" src="https://cyberillo.com/wp-content/uploads/Disable-Bitlocker-for-Sysprep-to-work.png" alt="Disable Bitlocker for Sysprep to work" class="wp-image-3590" srcset="https://cyberillo.com/wp-content/uploads/Disable-Bitlocker-for-Sysprep-to-work.png 977w, https://cyberillo.com/wp-content/uploads/Disable-Bitlocker-for-Sysprep-to-work-300x214.png 300w, https://cyberillo.com/wp-content/uploads/Disable-Bitlocker-for-Sysprep-to-work-768x549.png 768w" sizes="auto, (max-width: 977px) 100vw, 977px" /></figure>



<p>Once your OS drive is fully decrypted, give that Sysprep command another go.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="625" height="356" src="https://cyberillo.com/wp-content/uploads/Drive-must-be-fully-decrypted-before-running-Sysprep.png" alt="Drive must be fully decrypted before running Sysprep" class="wp-image-3591" srcset="https://cyberillo.com/wp-content/uploads/Drive-must-be-fully-decrypted-before-running-Sysprep.png 625w, https://cyberillo.com/wp-content/uploads/Drive-must-be-fully-decrypted-before-running-Sysprep-300x171.png 300w" sizes="auto, (max-width: 625px) 100vw, 625px" /></figure>
</div>


<p>Another common hiccup happens if one of the Windows Store apps is installed for one user but not set up for all users. The Sysprep log will clue you in on which app is causing the trouble. </p>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="284" src="https://cyberillo.com/wp-content/uploads/Sysprep-Error-Store-app-installed-for-a-user-but-not-all-users-1024x284.png" alt="Sysprep Error - Store app installed for a user but not all users" class="wp-image-3592" srcset="https://cyberillo.com/wp-content/uploads/Sysprep-Error-Store-app-installed-for-a-user-but-not-all-users-1024x284.png 1024w, https://cyberillo.com/wp-content/uploads/Sysprep-Error-Store-app-installed-for-a-user-but-not-all-users-300x83.png 300w, https://cyberillo.com/wp-content/uploads/Sysprep-Error-Store-app-installed-for-a-user-but-not-all-users-768x213.png 768w, https://cyberillo.com/wp-content/uploads/Sysprep-Error-Store-app-installed-for-a-user-but-not-all-users.png 1427w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>To remove it, open an elevated PowerShell session and type:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Remove-AppxPackage -Package &lt;&lt;packagenamegoeshere>></pre>



<p>You might need to repeat this for a couple of apps until Sysprep runs through without a hitch.</p>



<h2 class="wp-block-heading">5. Capture Your Master Image</h2>



<p>After Sysprep works its magic and shuts down the virtual machine, it&#8217;s time to capture our customized image.</p>



<ul class="wp-block-list">
<li>Attach an empty VHD to your virtual machine.</li>



<li>Boot up your VM using <a href="https://www.hirensbootcd.org/download/" target="_blank" rel="noopener">Hiren&#8217;s Boot CD</a> or a WinPE environment.</li>



<li>In the boot environment, make sure your Windows installation is mounted as&nbsp;<code>C:\</code>&nbsp;and your empty VHD as&nbsp;<code>E:\</code>.</li>



<li>Now, capture your image and save it to <code>E:\</code> with this DISM command:</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="bat" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">DISM /capture-image /imagefile:E:\install.wim /capturedir:C:\ /name:"Win11" /compress:fast</pre>



<h2 class="wp-block-heading">6. Personalize Your Windows 11 ISO</h2>



<p>Now that you have your <code>install.wim</code> file, you&#8217;ll integrate it into a Windows 11 ISO. Using a tool like <a href="https://www.anyburn.com/download.php" target="_blank" rel="noopener">AnyBurn</a>, open the ISO, navigate to the <code>sources</code> folder, remove the original <code>install.wim</code>, and drop in your newly captured <code>install.wim</code> file.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="634" src="https://cyberillo.com/wp-content/uploads/Replace-install.wim-with-customized-installation-that-we-captured-1024x634.png" alt="Replace install.wim with customized installation that we captured" class="wp-image-3593" style="width:497px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Replace-install.wim-with-customized-installation-that-we-captured-1024x634.png 1024w, https://cyberillo.com/wp-content/uploads/Replace-install.wim-with-customized-installation-that-we-captured-300x186.png 300w, https://cyberillo.com/wp-content/uploads/Replace-install.wim-with-customized-installation-that-we-captured-768x475.png 768w, https://cyberillo.com/wp-content/uploads/Replace-install.wim-with-customized-installation-that-we-captured.png 1257w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<h2 class="wp-block-heading">7. Create a Bootable USB</h2>



<p>Last but not least, we need to make a bootable USB stick from our new custom ISO. Grab <a href="https://rufus.ie/en/" target="_blank" rel="noopener">Rufus</a> (or your preferred tool). Select your USB stick (double-check you don&#8217;t have anything important on it, as it will be wiped), pick your custom ISO, and hit start.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="687" height="1024" src="https://cyberillo.com/wp-content/uploads/Create-bootable-usb-with-Rufus-687x1024.png" alt="" class="wp-image-3594" style="width:309px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Create-bootable-usb-with-Rufus-687x1024.png 687w, https://cyberillo.com/wp-content/uploads/Create-bootable-usb-with-Rufus-201x300.png 201w, https://cyberillo.com/wp-content/uploads/Create-bootable-usb-with-Rufus.png 739w" sizes="auto, (max-width: 687px) 100vw, 687px" /></figure>
</div>


<h2 class="wp-block-heading">A Quick Note on Windows 11 24H2</h2>



<p>Heads up! When using Windows 11 24H2 as my base ISO, I bumped into the below installation error, which seems to be related to the new Windows setup interface.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="464" height="327" src="https://cyberillo.com/wp-content/uploads/Windows-11-installation-has-failed.png" alt="" class="wp-image-3596" srcset="https://cyberillo.com/wp-content/uploads/Windows-11-installation-has-failed.png 464w, https://cyberillo.com/wp-content/uploads/Windows-11-installation-has-failed-300x211.png 300w" sizes="auto, (max-width: 464px) 100vw, 464px" /></figure>
</div>


<p>As a workaround, you can either use Windows 11 23H2 as your base ISO or select <em>Previous Version of Setup</em> during the installation wizard.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="796" height="624" src="https://cyberillo.com/wp-content/uploads/Use-Previous-Version-of-Setup-in-Windows-11-Installation.png" alt="" class="wp-image-3595" style="width:435px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Use-Previous-Version-of-Setup-in-Windows-11-Installation.png 796w, https://cyberillo.com/wp-content/uploads/Use-Previous-Version-of-Setup-in-Windows-11-Installation-300x235.png 300w, https://cyberillo.com/wp-content/uploads/Use-Previous-Version-of-Setup-in-Windows-11-Installation-768x602.png 768w" sizes="auto, (max-width: 796px) 100vw, 796px" /></figure>
</div>


<p>That&#8217;s it! I hope you found this guide helpful. Feel free to <a href="https://cyberillo.com/contact/" data-type="page" data-id="2192">reach out</a> if you need any help setting up your custom Windows image. I&#8217;m always happy to help!</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-create-a-windows-image-for-deployment/">How to Create a Windows Image for Deployment</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/how-to-create-a-windows-image-for-deployment/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Reset ESXi Root Password on a Standalone Host</title>
		<link>https://cyberillo.com/how-to-reset-esxi-root-password-on-a-standalone-host/</link>
					<comments>https://cyberillo.com/how-to-reset-esxi-root-password-on-a-standalone-host/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Sat, 05 Apr 2025 10:26:14 +0000</pubDate>
				<category><![CDATA[More]]></category>
		<guid isPermaLink="false">https://cyberillo.com/?p=3491</guid>

					<description><![CDATA[<p>A guide to resetting the ESXi root password on a standalone host when other recovery options aren't available.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-reset-esxi-root-password-on-a-standalone-host/">How to Reset ESXi Root Password on a Standalone Host</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>If you&#8217;re reading this, I&#8217;m sorry. You&#8217;re in some trouble, aren&#8217;t you? Don&#8217;t worry! It happens to all of us. Okay &#8211; maybe not all of us &#8211; just the unlucky ones&#8230; or idiots with lack of caution.</p>



<p>Chill! Read this guide &#8211; you&#8217;ll be back in your ESXi host in no time. Well, maybe a few hours &#8211; no more than a day &#8211; promise <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f607.png" alt="😇" class="wp-smiley" style="height: 1em; max-height: 1em;" />.</p>





<h2 class="wp-block-heading">The Problem</h2>



<p>Just to state the obvious&#8230; The problem here is that we can&#8217;t get into the <code>root</code> account on our ESXi host. In addition:</p>



<ul class="wp-block-list">
<li>We have no other administrator accounts</li>



<li>The ESXi host is a standalone and is not managed through vCenter</li>



<li>We have no SSH key pair with which to access the server</li>
</ul>



<p><strong>N.B. </strong>The host in question had ESXi 7.0.3 installed &#8211; This probably works for other versions as well. Furthermore, it seems that earlier versions of ESXi were less secure, so the option mentioned in the <strong><a href="#what-doesnt-work">What doesn&#8217;t work</a></strong> section below could work in earlier versions.</p>



<h2 class="wp-block-heading">Broadcom, you&#8217;re not helpful</h2>



<p>The <a href="https://knowledge.broadcom.com/external/article?legacyId=1317898" target="_blank" rel="noopener">official answer from Broadcom</a> is that&#8230;</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>If the host is standalone and not managed by vCenter, then re-installing ESXi is the only option.</p>
</blockquote>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="600" height="327" src="https://cyberillo.com/wp-content/uploads/lies-lieseverywhere.jpg" alt="Lies - Lies Everywhere" class="wp-image-3492" srcset="https://cyberillo.com/wp-content/uploads/lies-lieseverywhere.jpg 600w, https://cyberillo.com/wp-content/uploads/lies-lieseverywhere-300x164.jpg 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></figure>
</div>


<p><strong>LIEESSSSSS!</strong></p>



<p>What a lame reply. I&#8217;ll admit, what I&#8217;m about to show you is a very shady way to get back into your ESXi host, hackish, to say the least &#8211; but if it works, it works.</p>



<h2 class="wp-block-heading" id="what-doesnt-work">What doesn&#8217;t work <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /></h2>



<p>Stop! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f91a.png" alt="🤚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> If you&#8217;re in a rush &#8211; which I assume you are &#8211; skip this section altogether. You&#8217;re not getting into your host by reading it. It&#8217;s just me venting <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f624.png" alt="😤" class="wp-smiley" style="height: 1em; max-height: 1em;" />.</p>



<div class="wp-block-kadence-advancedbtn kb-buttons-wrap kb-btns3491_11deb8-6f"><a class="kb-button kt-button button kb-btn3491_22e110-31 kt-btn-size-standard kt-btn-width-type-auto kb-btn-global-fill  kt-btn-has-text-true kt-btn-has-svg-true  wp-block-kadence-singlebtn" href="#solution"><span class="kt-btn-inner-text">Go to the Solution</span><span class="kb-svg-icon-wrap kb-svg-icon-fe_arrowDownCircle kt-btn-icon-side-right"><svg viewBox="0 0 24 24"  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"  aria-hidden="true"><circle cx="12" cy="12" r="10"/><polyline points="8 12 12 16 16 12"/><line x1="12" y1="8" x2="12" y2="16"/></svg></span></a></div>



<div class="wp-block-kadence-spacer aligncenter kt-block-spacer-3491_acaf5e-24 is-style-wide"><div class="kt-block-spacer kt-block-spacer-halign-center"></div></div>



<p>There are quite a few guides on the interwebs, claiming that just like with any other Linux distro, you can</p>



<ol class="wp-block-list">
<li>Create a bootable Linux ISO &#8211; Ubuntu, Arch &#8211; you name it</li>



<li>Mount the ESXi OS partition in a temporary directory &#8211; <code>sudo mount /dev/sda5 /mnt/sda5</code></li>



<li>Find <em>state.tgz</em> and extract it &#8211; <code>tar -xzf /mnt/sda5/state.tgz -C /tempstate</code></li>



<li>From the extracted contents, extract <em>local.tgz</em> as well &#8211; <code>tar -xzf /tempstate/local.tgz -C /templocal</code></li>



<li>Edit the <em>shadow</em> file from the extracted <em>local.tgz</em> to delete the hash for the root account &#8211; <code>vi /templocal/etc/shadow</code></li>



<li>Pack the shadow file in the <em>local.tgz</em> and then into <em>state.tgz</em>, move the <em>state.tgz</em> back into <em>/mnt/sda5 </em>to replace the old one</li>



<li>Unmount the ESXi OS partition, reboot</li>



<li>Voila! You got the root account with a blank password</li>
</ol>



<p>Right? Nope <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p>This may have worked for earlier versions of ESXi, but save your time and don&#8217;t even try for ESXi 7.0.3.</p>



<h3 class="wp-block-heading">Why doesn&#8217;t it work?</h3>



<p>For starters, trying to mount the OS partition on a bootable Linux ISO will fail. This isn&#8217;t any regular <em>ext4</em> partition. No, no. This is <em>vmfs</em>.</p>



<p>Okay, no worries there&#8217;s the <em>vmfs-tools</em> package, which can mount <em>vmfs</em> partitions. One problem, it doesn&#8217;t come pre-installed on your typical Linux install media. And no, I didn&#8217;t have an internet connection in my case. So I couldn&#8217;t just install it from the repos.</p>



<p>Doesn&#8217;t matter &#8211; I created a Linux installation media (based on Linux Mint) with <em>vmfs-tools</em> preinstalled. I used <a href="https://github.com/PJ-Singh-001/Cubic" target="_blank" rel="noopener">Cubic</a>. I won&#8217;t get into the details, but it&#8217;s a pretty easy to use tool. Anyways, around one (or two) hours later, I got my installation media with <em>vmfs-tools</em> preinstalled and to no surprise &#8211; <code>vmfs: unsupported version 6</code>. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f621.png" alt="😡" class="wp-smiley" style="height: 1em; max-height: 1em;" /><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f621.png" alt="😡" class="wp-smiley" style="height: 1em; max-height: 1em;" />You wouldn&#8217;t believe it!  <em>vmfs-tools </em>currently supports up to <em>vmfs </em>version 5, so if you&#8217;re trying to mount a partition formatted with <em>vmfs </em>6 (which is used by newer versions of VMware ESXi), it won&#8217;t work.</p>



<p>No worries, I thought (being overly optimistic and all), I&#8217;ll re-create the bootable Linux media with <em><a href="https://packages.debian.org/sid/vmfs6-tools" target="_blank" rel="noopener">vmfs6-tools</a></em> installed. Surely, that would do it. Oh how I hoped <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f64f.png" alt="🙏" class="wp-smiley" style="height: 1em; max-height: 1em;" />.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="576" src="https://cyberillo.com/wp-content/uploads/No-no-no-1024x576.png" alt="No No No" class="wp-image-3494" srcset="https://cyberillo.com/wp-content/uploads/No-no-no-1024x576.png 1024w, https://cyberillo.com/wp-content/uploads/No-no-no-300x169.png 300w, https://cyberillo.com/wp-content/uploads/No-no-no-768x432.png 768w, https://cyberillo.com/wp-content/uploads/No-no-no-390x220.png 390w, https://cyberillo.com/wp-content/uploads/No-no-no.png 1248w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>How wrong I was! Reading the <em>vmstorage</em> and <em>datastore </em>partitions worked with the <em>vmfs6-tools</em> installed, but there was no getting to the precious <em>state.tgz</em>. I kept getting the error <code>fsinfo invalid magic number 0x2fabf15f</code>. Not only that, I read about the <em>vmfs6-tools</em> package and found that &#8220;Only read access is available at the moment, but write access is under works. Multiple extents are supported.&#8221; So, even if somehow I managed to access the <em>state.tgz</em> from my bootable Linux media, I was surely not going to replace it with the modified one.</p>



<p>I&#8217;ll be honest, optimistic as I usually am, this was still a battle I had considered lost. Worst part of it all? I had strung along 5 friends on this wild good chase. After looking like an absolute fool getting locked out of the ESXi host in the first place, I had wasted 6 hours of their day trying to get back in, as they offered their ideas, research, solutions, and moral support. </p>



<p>I won&#8217;t even get into the part where I tried to insert the raided OS disks into another ESXi host <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f606.png" alt="😆" class="wp-smiley" style="height: 1em; max-height: 1em;" />.</p>



<p>Let&#8217;s get on to the solution&#8230;</p>



<h2 class="wp-block-heading" id="solution">The Solution <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /></h2>



<p>When all hope was almost lost, we came across this <a href="https://www.mwyann.us/posts/201" target="_blank" rel="noopener">gold mine of an article on Mwyann&#8217;s Weblog</a>. Damn you Google for not putting this in my face sooner!</p>



<p>In a nutshell, what this fellow did, and what we copied&#8230; and essentially, what I&#8217;m showing you here is:</p>



<ol class="wp-block-list">
<li>Install ESXi on another server (or virtual machine).</li>



<li>Use the ESXi installation media to boot on the original host (the one you&#8217;re locked out of).</li>



<li>Go to the BOOTBANK volume and extract the <em>state.tgz</em>. <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-red-color">This is encrypted.</mark></li>



<li>Copy the <em>encryption.info </em>and the <em>local.tgz.ve</em> files to a USB.</li>



<li>Go to the new ESXi host and extract <em>state.tgz</em> from the BOOTBANK<em>.</em></li>



<li>Decrypt <em>state.tgz</em> and replace the <em>encryption.info </em>file with the <em>encryption.info</em> file from the original host.</li>



<li>Repack the <em>state.tgz</em> and copy it to the BOOTBANK and reboot. This will trick the new host into using the encryption key from the original host.</li>



<li>Decrypt the <em>local.tgz.ve</em> of the original host from the new host. This is possible since it now has the original host&#8217;s encryption key.</li>



<li>Generate a public/private key pair to SSH into the locked out server.</li>



<li>Add the public key to the authorized_keys file under the <em>/etc/ssh/keys-root</em> folder (from <em>local.tgz</em>).</li>



<li>Add <em>/etc/rc.local.d/local.sh</em> containing a command to start the SSH service on ESXi boot.</li>



<li>Repack the <em>local.tgz </em>and <em>state.tgz</em> and transfer to the original host via USB.</li>



<li>Connect to the original host via SSH through the private key.</li>



<li>Reset the root password <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f972.png" alt="🥲" class="wp-smiley" style="height: 1em; max-height: 1em;" />.</li>
</ol>



<h3 class="wp-block-heading">1. Install ESXi on another server</h3>



<p>Just create a bootable USB for this &#8211; You can use <a href="https://rufus.ie/en/" target="_blank" rel="noopener">Rufus</a>, but I personally prefer <a href="https://www.ventoy.net/en/index.html" target="_blank" rel="noopener">Ventoy</a>. Note that you may need to disable secure boot on your server (or enroll the MOK to the list of trusted keys). </p>



<p>I had a tough time finding the ESXi ISO from Broadcom&#8217;s site. So I&#8217;ll save you the hassle &#8211; God bless the Internet Archive <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f496.png" alt="💖" class="wp-smiley" style="height: 1em; max-height: 1em;" />!</p>



<div class="wp-block-kadence-advancedbtn kb-buttons-wrap kb-btns3491_d3b185-8d"><a class="kb-button kt-button button kb-btn3491_20459a-64 kt-btn-size-standard kt-btn-width-type-auto kb-btn-global-fill  kt-btn-has-text-true kt-btn-has-svg-false  wp-block-kadence-singlebtn" href="https://archive.org/download/vmware-esxi-7/VMware-VMvisor-Installer-7.0U3f-20036589.x86_64.iso" target="_blank" rel="noopener"><span class="kt-btn-inner-text">Download ESXi v7.0.3</span></a></div>



<div class="wp-block-kadence-spacer aligncenter kt-block-spacer-3491_c5ad78-93 is-style-wide"><div class="kt-block-spacer kt-block-spacer-halign-center"></div></div>



<h3 class="wp-block-heading">2. Access the locked host through the ESXi installation media</h3>



<p>Boot your original host (the one you&#8217;re locked out of) using the ESXi installation media you created in the previous step. At the ESXi installation screen hit <strong>Alt + F1</strong> to enter into a shell. Enter username <code>root</code> and hit enter when prompted for the password. It&#8217;s blank.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1024" height="768" src="https://cyberillo.com/wp-content/uploads/ESXi-installation-screen.png" alt="ESXi installation screen" class="wp-image-3498" srcset="https://cyberillo.com/wp-content/uploads/ESXi-installation-screen.png 1024w, https://cyberillo.com/wp-content/uploads/ESXi-installation-screen-300x225.png 300w, https://cyberillo.com/wp-content/uploads/ESXi-installation-screen-768x576.png 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>When you list the volumes (<code>ls /vmfs/volumes</code>) you&#8217;ll see your <code>BOOTBANK1</code>, <code>BOOTBANK2</code>, <code>OSDATA_xxxxx</code>, <code>datastore1</code> &#8211; plus some additional volumes you may have created. That&#8217;s right you can view the volumes from the old host when you boot on it with an ESXi installation media.</p>



<p>In our case, we only had to work on BOOTBANK1, but you might need to repeat this procedure on both bootbanks if they were both being used in your case. For simplicity, I will continue the rest of the guide with BOOTBANK1.</p>



<h3 class="wp-block-heading">3. Extract <em>state.tgz</em> from the locked host</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mkdir /mylosthost
tar xzf /vmfs/volumes/BOOTBANK1/state.tgz -C /mylosthost
ls /mylosthost</pre>



<p>You&#8217;ll see that when extracting the <em>state.tgz</em> from the BOOTBANK we don&#8217;t get the expected <em>local.tgz</em>, but rather an encrypted <em>local.tgz.ve</em> together with an <em>encryption.info</em> file.</p>



<p>You would typically decrypt the <em>local.tgz.ve</em> using the below command, but since we&#8217;re booted from the ESXi installation media, we won&#8217;t be able to decrypt it.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">crypto-util envelope extract --aad ESXConfiguration local.tgz.ve local.tgz</pre>



<p>So, the solution is to trick the new host to use the <em>encryption.info</em> from the locked host such that it&#8217;s able to decrypt the <em>local.tgz.ve</em> file.</p>



<h3 class="wp-block-heading">4. Copy <em>local.tgz.ve</em> and <em>encryption.info</em> to USB</h3>



<p>Okay, so insert a USB drive into the locked out host. Format it as FAT32 not NTFS &#8211; ESXi is more friendly with FAT. You should be able to see it in the list of volumes (<code>ls /vmfs/volumes</code>).</p>



<p>Copy the <em>encryption.info </em>and <em>local.tgz.ve</em> files to the USB drive. Remember we have them in a temporary directory we created <em><code>/mylocalhost</code></em>.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cp -r /mylosthost /vmfs/volumes/MYUSBDRIVE/mylosthost</pre>



<h3 class="wp-block-heading">5. Extract <em>state.tgz </em>from the new ESXi host</h3>



<div style="border-radius: 15px; background-color: #A1D6B2; color: #000;padding: 15px; margin-bottom: 30px">
<p><strong>BONUS STEP:</strong> During this process we encountered issues reading the USB drive while booted directly from the ESXi host, but no issues while booted from the installation media. So, it&#8217;d probably be wise for you to boot the new host with the installation media, copy the files from the USB drive to the bootbank (since this is retained on next boot) and then reboot again to the ESXi on the new host.</p>
</div>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cp -r /vmfs/volumes/MYUSBDRIVE/mylosthost /vmfs/volumes/BOOTBANK1/mylosthost</pre>



<p>Boot up the new ESXi host  and hit <strong>F2</strong> to customize the system. Enter the password you set during the installation and then go to <strong>Troubleshooting Options</strong>. From here, you can enable shell access.</p>



<p>Then, hit <strong>Alt + F1</strong> to open up a shell. Logon with the root account and navigate to the bootbank via either <em><code>/vmfs/volumes/BOOTBANK1</code></em> or <em><code>/bootbank</code></em>. We need to extract its <em>state.tgz</em> file.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mkdir /mynewhost
tar xzf /vmfs/volumes/BOOTBANK1/state.tgz -C /mynewhost
ls /mynewhost</pre>



<p>You see the <em>encryption.info</em> and <em>local.tgz.ve</em> files. Differently from step 3, we can decrypt the <em>local.tgz.ve</em> file because we&#8217;re logged in to our host properly (not from the bootable installation media). </p>



<h3 class="wp-block-heading">6. Decrypt <em>state.tgz</em> and replace <em>encryption.info</em></h3>



<p>Okay, now decrypt the <em>local.tgz.ve</em> file to get the <em>local.tgz</em> file. Then, delete the <em>local.tgz.ve</em> file and <em>encryption.info files</em> and copy the <em>encryption.info</em> file from the locked host (remember that we transferred it to this host via USB in the previous bonus step).</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cd /mynewhost
crypto-util envelope extract --aad ESXConfiguration local.tgz.ve local.tgz
rm -f local.tgz.ve
rm -f encryption.info
cp /vmfs/volumes/BOOTBANK1/mylosthost/encryption.info /mynewhost/encryption.info
ls /mynewhost</pre>



<p>In the <em>/mynewhost</em> directory you should now have a <em>local.tgz</em> file (from the new host) and the <em>encryption.info</em> file (from the old host).</p>



<h3 class="wp-block-heading">7. Trick the new host to use the locked host&#8217;s encryption key</h3>



<p>This part is very important, so please pay close attention to the next steps. </p>



<p>At this step of the process, we&#8217;re booted on the new host. The next step is to trick it to use the locked host&#8217;s encryption key, <span style="text-decoration: underline;">but we cannot do this while booted into it</span>, we have to be booted via the ESXi installation media. </p>



<p>Trust me, don&#8217;t try to do it, because the state will be overwritten on reboot and it won&#8217;t work.</p>



<p>But if we shut off now, we won&#8217;t be able to access the <em>/mynewhost</em> directory from the ESXi installation media. So, let&#8217;s copy this folder to the <em>BOOTBANK1 </em>volume which will still be accessible while booted from the installation media. </p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cp -r /mynewhost /vmfs/volumes/BOOTBANK1/mynewhost</pre>



<p>Okay, now we&#8217;ll restart the new host, boot up from the ESXi installation media, and open up a shell with <strong>Alt + F1</strong>. As before, we&#8217;ll login with username <code>root</code> and a blank password.</p>



<p>As you recall from the previous step, in the <em>/vmfs/volumes/BOOTBANK1/mynewhost</em> directory you should now have a <em>local.tgz</em> file (from the new host) and the <em>encryption.info</em> file (from the old host).</p>



<p>Let&#8217;s pack them back into <em>state.tgz</em> and replace the new host&#8217;s <em>state.tgz</em> with this new updated state (that uses the original host&#8217;s <em>encryption.info</em> file)</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">rm -f /vmfs/volumes/BOOTBANK1/state.tgz
cd /vmfs/volumes/BOOTBANK1/mynewhost
tar czf /vmfs/volumes/BOOTBANK1/state.tgz encryption.info local.tgz</pre>



<p>Now that the <em>state.tgz</em> of the new host has been replaced, we can reboot into the new ESXi. Now the new host is using the original host&#8217;s encryption key so we&#8217;ll be able to decrypt the <em>local.tgz.ve</em> file that we copied over from the locked host via USB.</p>



<h3 class="wp-block-heading">8. Decrypt the locked host&#8217;s <em>local.tgz.ve</em></h3>



<p>Back into the shell of the new host, we can navigate to the directory in which we copied the locked host&#8217;s <em>local.tgz.ve</em> and decrypt it. This time, it will work because we are using the old host&#8217;s encryption key on the new host.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cd /vmfs/volumes/BOOTBANK1/mylosthost
crypto-util envelope extract --aad ESXConfiguration local.tgz.ve local.tgz
tar xzf local.tgz
ls</pre>



<p>Awesome! You can see that we extracted the <em>etc</em> directory (and some other directories) from the locked host&#8217;s <em>local.tgz</em>. Unfortunately, the <em>shadow </em>file is nowhere to be found in the <em>etc</em> directory, so this won&#8217;t be as simple as deleting the root account&#8217;s hash from the shadow file.</p>



<p>What we&#8217;ll do instead is create a public/private key pair and add the public key to the authorized_keys in <em>/etc/ssh/keys-root</em>. This will enable us to SSH into the locked host.</p>



<h3 class="wp-block-heading">9. Generate public/private key pair for SSH</h3>



<p>On a separate Linux machine generate the SSH key pair using <code>ssh-keygen</code>.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">ssh-keygen -t rsa -b 4096</pre>



<p>Optionally, set a passphrase on your private key&#8230; Make sure you don&#8217;t forget this one <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f61c.png" alt="😜" class="wp-smiley" style="height: 1em; max-height: 1em;" />.</p>



<p>I also renamed the public key from <em>mypublickey.pub</em> to <em>authorized_keys</em>. This made the next step easier for me, because I could copy the file directly to <em>/etc/ssh/keys-root</em> (that will be packed to the state of the locked host). So your <em>authorized_keys</em> file should look as follows with a single public key (the one you just generated). Make sure to update the user at the end of the public key to <em>root@thenameofyourlockedhost</em>.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="988" height="97" src="https://cyberillo.com/wp-content/uploads/ssh-public-key-example.png" alt="ssh public key example" class="wp-image-3524" srcset="https://cyberillo.com/wp-content/uploads/ssh-public-key-example.png 988w, https://cyberillo.com/wp-content/uploads/ssh-public-key-example-300x29.png 300w, https://cyberillo.com/wp-content/uploads/ssh-public-key-example-768x75.png 768w" sizes="auto, (max-width: 988px) 100vw, 988px" /></figure>



<h3 class="wp-block-heading">10. Add the <em>authorized_keys</em> file to <em>/etc/ssh/keys-root</em></h3>



<p>Copy the <em>authorized_keys </em>file to your FAT32 formatted USB drive and then transfer it to the new host. You might need to boot from the ESXi installation media if the USB is not visible in <em>/vmfs/volumes</em>.</p>



<p>From the USB drive, we need to copy the <em>authorized_keys</em> to the <em>/etc/ssh/keys-root</em> directory. In my case I needed to create the <em>keys-root</em> directory because it was not present in the <em>/etc/ssh</em> folder.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mkdir /vmfs/volumes/BOOTBANK1/mylosthost/etc/ssh/keys-root
cp /vmfs/volumes/MYUSBDRIVE/authorized_keys /vmfs/volumes/BOOTBANK1/mylosthost/etc/ssh/keys-root/authorized_keys</pre>



<h3 class="wp-block-heading">11. Add <em>/etc/rc.local.d/local.sh</em> to start SSH service on ESXi boot</h3>



<p>This step could be optional for you, but if you&#8217;re not sure, follow along because it&#8217;s a small step relative to the entire process.</p>



<p>For added security, we prefer to keep the SSH service switched off on our ESXi hosts. With SSH disabled, it won&#8217;t be possible to access the locked host via the SSH private key we generated earlier. So what we need to do is instruct the locked host to start the SSH service as it boots up. We do this by modifying the <em>local.sh</em> and packing it into the <em>state.tgz</em> that we&#8217;ll transfer to the locked host.</p>



<p>So, on the new host:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">mkdir /vmfs/volumes/BOOTBANK1/mylosthost/etc/rc.local.d
vi /vmfs/volumes/BOOTBANK1/mylosthost/etc/rc.local.d/local.sh</pre>



<p>Your <em>local.sh</em> should look as follows<em>:</em></p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">#!/bin/sh

/etc/init.d/SSH start

exit 0</pre>



<h3 class="wp-block-heading">12. Transfer the modified state to the locked host</h3>



<p>Now, that we have our public key in the <em>authorized_keys</em> file and the <em>/etc/init.d/SSH start</em> command in the <em>local.sh</em> file, we can repack everything and transfer the modified state to the locked host.</p>



<p>In my case, in addition to <em>/etc</em>, I had another 2 directories that were extracted from <em>local.tgz</em>. I made sure to repack them as well in the final <em>tgz</em> file, although I&#8217;m not sure if it makes a difference.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cd /vmfs/volumes/BOOTBANK1/mylosthost
tar czf /vmfs/volumes/MYUSBDRIVE/local.tgz etc dir1 dir2
tar czf /vmfs/volumes/MYUSBDRIVE/state.tgz /vmfs/volumes/MYUSBDRIVE/local.tgz</pre>



<p>With the updated state in the USB drive, we need to reboot the locked host one last time from the ESXi installation media. Enter a shell and transfer <em>state.tgz</em> to the BOOTBANK.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">rm -f /vmfs/volumes/BOOTBANK1/state.tgz
cp /vmfs/volumes/MYUSBDRIVE/state.tgz /vmfs/volumes/BOOTBANK1/state.tgz</pre>



<p>Okay, we updated the state of the locked host. Time for a reboot&#8230; Hold your breath!</p>



<p><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-red-color">Remember &#8211; you may need to repeat the above steps for both BOOTBANK1 &amp; BOOTBANK2 if they were both being used by your locked ESXi host.</mark> If your BOOTBANK2 only contains a <em>boot.cfg</em> file, you&#8217;re in luck it&#8217;s not being used by your locked host.</p>



<h3 class="wp-block-heading">13. SSH into the locked host using the private key</h3>



<p>If all went well, your locked host should be up and running after the reboot. The SSH service should be started as well. So, the next step is to connect to it using the private key.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">ssh -i myprivatekey root@mylockedhost</pre>



<p>At long last, you should now be logged on to your ESXi host with the <code>root</code> account.</p>



<p>You may stop holding your breath <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f601.png" alt="😁" class="wp-smiley" style="height: 1em; max-height: 1em;" />.</p>



<h3 class="wp-block-heading">14. Reset root password</h3>



<p>You&#8217;ve gotten this far. One final step is to reset the <code>root</code> password &#8211; don&#8217;t lose it this time!</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">passwd</pre>



<h2 class="wp-block-heading">That&#8217;s All Folks</h2>



<p>I hope this guide has been helpful to get you back into your ESXi host. If you&#8217;re still clueless, or need help with some of the steps, feel free to reach out. I&#8217;ll be happy to help.</p>



<div class="wp-block-kadence-advancedbtn kb-buttons-wrap kb-btns3491_9bc027-0f"><a class="kb-button kt-button button kb-btn3491_ecea9d-87 kt-btn-size-standard kt-btn-width-type-auto kb-btn-global-fill  kt-btn-has-text-true kt-btn-has-svg-true  wp-block-kadence-singlebtn" href="https://cyberillo.com/contact/"><span class="kt-btn-inner-text">Contact</span><span class="kb-svg-icon-wrap kb-svg-icon-fe_phoneCall kt-btn-icon-side-right"><svg viewBox="0 0 24 24"  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"  aria-hidden="true"><path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/></svg></span></a></div>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-reset-esxi-root-password-on-a-standalone-host/">How to Reset ESXi Root Password on a Standalone Host</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/how-to-reset-esxi-root-password-on-a-standalone-host/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Create a Phishing Campaign in the Microsoft Security Center</title>
		<link>https://cyberillo.com/how-to-create-a-phishing-campaign/</link>
					<comments>https://cyberillo.com/how-to-create-a-phishing-campaign/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Sun, 08 Dec 2024 06:18:05 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<guid isPermaLink="false">https://cyberillo.com/?p=3424</guid>

					<description><![CDATA[<p>Learn how to boost employee awareness and create easy phishing campaigns with Microsoft's attack simulation training.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-create-a-phishing-campaign/">How to Create a Phishing Campaign in the Microsoft Security Center</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Phishing is still one of the easiest ways for attackers to worm their way into a company’s systems. No matter how many security tools you throw at the problem, it only takes one person clicking the wrong link for things to go south. That’s why training people to spot and deal with phishing is so important.</p>



<p>Microsoft’s <a href="https://security.microsoft.com/attacksimulator" target="_blank" rel="noopener">attack simulation training</a> module in the Security Center makes it simple to run realistic phishing tests that don’t just show you who’s at risk but help them get better. This guide breaks down how to set up a phishing campaign step by step, so you can start building a team that’s sharp and ready for whatever’s lurking in their inbox.</p>



<ol class="wp-block-list">
<li>Go to <a href="https://security.microsoft.com" target="_blank" rel="noopener">https://security.microsoft.com</a>.</li>



<li>Navigate to<strong> Email &amp; Collaboration > Attack Simulation training > Simulations</strong>. Here you can find a list of previously created campaigns. To create a new phishing campaign, click on <strong>Launch a simulation</strong>.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="671" src="https://cyberillo.com/wp-content/uploads/Launch-a-Simulation-in-the-Microsoft-Security-Center-1024x671.png" alt="Launch a Simulation in the Microsoft Security Center" class="wp-image-3425" srcset="https://cyberillo.com/wp-content/uploads/Launch-a-Simulation-in-the-Microsoft-Security-Center-1024x671.png 1024w, https://cyberillo.com/wp-content/uploads/Launch-a-Simulation-in-the-Microsoft-Security-Center-300x196.png 300w, https://cyberillo.com/wp-content/uploads/Launch-a-Simulation-in-the-Microsoft-Security-Center-768x503.png 768w, https://cyberillo.com/wp-content/uploads/Launch-a-Simulation-in-the-Microsoft-Security-Center.png 1327w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="3" class="wp-block-list">
<li>The attack simulation training module offers various social engineering techniques to choose from, like <em>Credential Harvest, Malware Attachment, Link in Attachment, Link to Malware, Drive-by URL, and Oauth Consent Grant</em>. Choose the preferred technique for your phishing campaign and select <strong>Next</strong>.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="485" src="https://cyberillo.com/wp-content/uploads/Select-social-engineering-technique-in-Microsoft-Security-Center-1024x485.png" alt="Select social engineering technique in Microsoft Security Center" class="wp-image-3428" srcset="https://cyberillo.com/wp-content/uploads/Select-social-engineering-technique-in-Microsoft-Security-Center-1024x485.png 1024w, https://cyberillo.com/wp-content/uploads/Select-social-engineering-technique-in-Microsoft-Security-Center-300x142.png 300w, https://cyberillo.com/wp-content/uploads/Select-social-engineering-technique-in-Microsoft-Security-Center-768x364.png 768w, https://cyberillo.com/wp-content/uploads/Select-social-engineering-technique-in-Microsoft-Security-Center-1536x728.png 1536w, https://cyberillo.com/wp-content/uploads/Select-social-engineering-technique-in-Microsoft-Security-Center.png 1603w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="4" class="wp-block-list">
<li>Give a friendly name to your campaign, and optionally write a description.</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="970" height="635" src="https://cyberillo.com/wp-content/uploads/Name-the-phishing-campaign.png" alt="Name the phishing campaign" class="wp-image-3429" srcset="https://cyberillo.com/wp-content/uploads/Name-the-phishing-campaign.png 970w, https://cyberillo.com/wp-content/uploads/Name-the-phishing-campaign-300x196.png 300w, https://cyberillo.com/wp-content/uploads/Name-the-phishing-campaign-768x503.png 768w" sizes="auto, (max-width: 970px) 100vw, 970px" /></figure>



<ol start="5" class="wp-block-list">
<li>The next step is to determine the payload that you want to deliver. As with any other phishing campaign software the attack simulator allows you to create custom payloads with personalised email text and attachments. You can do this by clicking on <strong>Tenant payloads > Create a payload</strong>. Alternatively, you may select one of the ready-made payloads designed by Microsoft from the <strong>Global payloads</strong> tab.</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1134" height="664" src="https://cyberillo.com/wp-content/uploads/Select-payload-for-the-phishing-campaign.png" alt="" class="wp-image-3431" srcset="https://cyberillo.com/wp-content/uploads/Select-payload-for-the-phishing-campaign.png 1134w, https://cyberillo.com/wp-content/uploads/Select-payload-for-the-phishing-campaign-300x176.png 300w, https://cyberillo.com/wp-content/uploads/Select-payload-for-the-phishing-campaign-1024x600.png 1024w, https://cyberillo.com/wp-content/uploads/Select-payload-for-the-phishing-campaign-768x450.png 768w" sizes="auto, (max-width: 1134px) 100vw, 1134px" /></figure>



<div style="border-radius: 15px; background-color: #A1D6B2; color: #000;padding: 15px; margin-bottom: 30px">
<p>If you&#8217;re familiar with the culture and employee tendencies in your organisation, you&#8217;re probably better off creating a custom payload to which they&#8217;re more likely to fall victim.</p>
</div>



<ol start="6" class="wp-block-list">
<li>Each payload designed by Microsoft comes with a nice little metric &#8211; <strong>Predicted Compromise Rate (%)</strong>. This serves as an indication of the result to expect when using the predesigned payload &amp; login page. To preview the design of the email and login page, click on the title of the payload (not the checkbox).</li>
</ol>


<div class="kb-row-layout-wrap kb-row-layout-id3424_a4cc09-0a alignnone wp-block-kadence-rowlayout"><div class="kt-row-column-wrap kt-has-2-columns kt-row-layout-equal kt-tab-layout-inherit kt-mobile-layout-row kt-row-valign-top">

<div class="wp-block-kadence-column kadence-column3424_7eea1b-09"><div class="kt-inside-inner-col">
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="762" height="706" src="https://cyberillo.com/wp-content/uploads/Microsoft-made-payload-for-the-phishing-campaign.png" alt="Microsoft-made payload for the phishing campaign" class="wp-image-3432" srcset="https://cyberillo.com/wp-content/uploads/Microsoft-made-payload-for-the-phishing-campaign.png 762w, https://cyberillo.com/wp-content/uploads/Microsoft-made-payload-for-the-phishing-campaign-300x278.png 300w" sizes="auto, (max-width: 762px) 100vw, 762px" /></figure>
</div></div>



<div class="wp-block-kadence-column kadence-column3424_e83896-6d"><div class="kt-inside-inner-col">
<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="879" height="702" src="https://cyberillo.com/wp-content/uploads/Microsoft-made-login-page-for-the-phishing-campaign.png" alt="Microsoft-made login page for the phishing campaign" class="wp-image-3433" srcset="https://cyberillo.com/wp-content/uploads/Microsoft-made-login-page-for-the-phishing-campaign.png 879w, https://cyberillo.com/wp-content/uploads/Microsoft-made-login-page-for-the-phishing-campaign-300x240.png 300w, https://cyberillo.com/wp-content/uploads/Microsoft-made-login-page-for-the-phishing-campaign-768x613.png 768w" sizes="auto, (max-width: 879px) 100vw, 879px" /></figure>
</div></div>

</div></div>


<ol start="7" class="wp-block-list">
<li>If you&#8217;re happy with the payload and login page, move to the next step and select the target users for the campaign. You can restrict the scope to named users or groups, or target the entire organisation. I like to test the campaign on a small group first before a full rollout to the entire organisation.</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1006" height="597" src="https://cyberillo.com/wp-content/uploads/Specify-the-scope-of-the-phishing-campaign.png" alt="Specify the scope of the phishing campaign" class="wp-image-3437" srcset="https://cyberillo.com/wp-content/uploads/Specify-the-scope-of-the-phishing-campaign.png 1006w, https://cyberillo.com/wp-content/uploads/Specify-the-scope-of-the-phishing-campaign-300x178.png 300w, https://cyberillo.com/wp-content/uploads/Specify-the-scope-of-the-phishing-campaign-768x456.png 768w" sizes="auto, (max-width: 1006px) 100vw, 1006px" /></figure>



<ol start="8" class="wp-block-list">
<li>Based on your company policy, you may require victims of the campaign to attend a phishing awareness training session. The attack simulator allows you to bake this right into the campaign. You may redirect users to a custom URL to schedule their training session, or opt for the Microsoft training experience. In case of the latter, you may handpick training modules from Microsoft&#8217;s catalog to train your users or let Microsoft automatically assign training courses based on the user&#8217;s previous campaign results and training experiences.</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1196" height="707" src="https://cyberillo.com/wp-content/uploads/Microsoft-Training-Exerperience-for-Phishing-Campaigns.png" alt="Microsoft Training Exerperience for Phishing Campaigns" class="wp-image-3438" srcset="https://cyberillo.com/wp-content/uploads/Microsoft-Training-Exerperience-for-Phishing-Campaigns.png 1196w, https://cyberillo.com/wp-content/uploads/Microsoft-Training-Exerperience-for-Phishing-Campaigns-300x177.png 300w, https://cyberillo.com/wp-content/uploads/Microsoft-Training-Exerperience-for-Phishing-Campaigns-1024x605.png 1024w, https://cyberillo.com/wp-content/uploads/Microsoft-Training-Exerperience-for-Phishing-Campaigns-768x454.png 768w" sizes="auto, (max-width: 1196px) 100vw, 1196px" /></figure>



<ol start="9" class="wp-block-list">
<li>With regards to the post-phish landing page experience, some prefer to be more harsh than others. It&#8217;s up to you to determine what works best in your organisation. You may choose a pre-designed landing page from Microsoft&#8217;s catalog or design one yourself. </li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1477" height="706" src="https://cyberillo.com/wp-content/uploads/Microsoft-made-post-phish-landing-page.png" alt="Microsoft-made post-phish landing page" class="wp-image-3439" srcset="https://cyberillo.com/wp-content/uploads/Microsoft-made-post-phish-landing-page.png 1477w, https://cyberillo.com/wp-content/uploads/Microsoft-made-post-phish-landing-page-300x143.png 300w, https://cyberillo.com/wp-content/uploads/Microsoft-made-post-phish-landing-page-1024x489.png 1024w, https://cyberillo.com/wp-content/uploads/Microsoft-made-post-phish-landing-page-768x367.png 768w" sizes="auto, (max-width: 1477px) 100vw, 1477px" /></figure>



<ol start="10" class="wp-block-list">
<li>Next, you can configure whether to send user notifications associated with this campaign.
<ul class="wp-block-list">
<li>Positive reinforcement notification (to thank users who report the phish)</li>



<li>Training reminder notification (if you linked training in the previous steps)</li>
</ul>
</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1607" height="710" src="https://cyberillo.com/wp-content/uploads/Configure-notifications-in-attack-simulation-training.png" alt="Configure notifications in attack simulation training" class="wp-image-3440" srcset="https://cyberillo.com/wp-content/uploads/Configure-notifications-in-attack-simulation-training.png 1607w, https://cyberillo.com/wp-content/uploads/Configure-notifications-in-attack-simulation-training-300x133.png 300w, https://cyberillo.com/wp-content/uploads/Configure-notifications-in-attack-simulation-training-1024x452.png 1024w, https://cyberillo.com/wp-content/uploads/Configure-notifications-in-attack-simulation-training-768x339.png 768w, https://cyberillo.com/wp-content/uploads/Configure-notifications-in-attack-simulation-training-1536x679.png 1536w" sizes="auto, (max-width: 1607px) 100vw, 1607px" /></figure>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1114" height="740" src="https://cyberillo.com/wp-content/uploads/Phish-report-thank-you-message.png" alt="Phish-report thank you message" class="wp-image-3441" srcset="https://cyberillo.com/wp-content/uploads/Phish-report-thank-you-message.png 1114w, https://cyberillo.com/wp-content/uploads/Phish-report-thank-you-message-300x199.png 300w, https://cyberillo.com/wp-content/uploads/Phish-report-thank-you-message-1024x680.png 1024w, https://cyberillo.com/wp-content/uploads/Phish-report-thank-you-message-768x510.png 768w" sizes="auto, (max-width: 1114px) 100vw, 1114px" /></figure>



<ol start="11" class="wp-block-list">
<li>The last thing to configure is the scheduled date for the attack simulation and the length of the campaign. Once you&#8217;re ready, review the details you configured and submit the simulation.</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1213" height="721" src="https://cyberillo.com/wp-content/uploads/Configure-launch-details-and-schedule-in-attack-simulation-training.png" alt="Configure launch details and schedule in attack simulation training" class="wp-image-3443" srcset="https://cyberillo.com/wp-content/uploads/Configure-launch-details-and-schedule-in-attack-simulation-training.png 1213w, https://cyberillo.com/wp-content/uploads/Configure-launch-details-and-schedule-in-attack-simulation-training-300x178.png 300w, https://cyberillo.com/wp-content/uploads/Configure-launch-details-and-schedule-in-attack-simulation-training-1024x609.png 1024w, https://cyberillo.com/wp-content/uploads/Configure-launch-details-and-schedule-in-attack-simulation-training-768x456.png 768w" sizes="auto, (max-width: 1213px) 100vw, 1213px" /></figure>



<ol start="12" class="wp-block-list">
<li>From my observations, the reporting on the campaign is real-time and the figures are updated every minute (more or less). At a glance, you can get a quick summary of the outcome, with key metrics such as the number of users who:
<ul class="wp-block-list">
<li>were compromised</li>



<li>reported the message</li>



<li>read the message</li>



<li>opened attachments</li>
</ul>
</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1885" height="756" src="https://cyberillo.com/wp-content/uploads/Summary-report-of-the-phishing-campaign-in-the-Microsoft-Security-Center.png" alt="Summary report of the phishing campaign in the Microsoft Security Center" class="wp-image-3445" srcset="https://cyberillo.com/wp-content/uploads/Summary-report-of-the-phishing-campaign-in-the-Microsoft-Security-Center.png 1885w, https://cyberillo.com/wp-content/uploads/Summary-report-of-the-phishing-campaign-in-the-Microsoft-Security-Center-300x120.png 300w, https://cyberillo.com/wp-content/uploads/Summary-report-of-the-phishing-campaign-in-the-Microsoft-Security-Center-1024x411.png 1024w, https://cyberillo.com/wp-content/uploads/Summary-report-of-the-phishing-campaign-in-the-Microsoft-Security-Center-768x308.png 768w, https://cyberillo.com/wp-content/uploads/Summary-report-of-the-phishing-campaign-in-the-Microsoft-Security-Center-1536x616.png 1536w" sizes="auto, (max-width: 1885px) 100vw, 1885px" /></figure>



<p>You also get a tabular view listing all users targeted by the campaign together with some key information such as:</p>



<ul class="wp-block-list">
<li>the actions they took</li>



<li>whether they reported</li>



<li>whether they were compromised</li>



<li>whether they attended the scheduled training</li>
</ul>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1611" height="624" src="https://cyberillo.com/wp-content/uploads/Tabular-view-of-user-actions-in-the-phishing-campaign.png" alt="Tabular view of user actions in the phishing campaign" class="wp-image-3446" srcset="https://cyberillo.com/wp-content/uploads/Tabular-view-of-user-actions-in-the-phishing-campaign.png 1611w, https://cyberillo.com/wp-content/uploads/Tabular-view-of-user-actions-in-the-phishing-campaign-300x116.png 300w, https://cyberillo.com/wp-content/uploads/Tabular-view-of-user-actions-in-the-phishing-campaign-1024x397.png 1024w, https://cyberillo.com/wp-content/uploads/Tabular-view-of-user-actions-in-the-phishing-campaign-768x297.png 768w, https://cyberillo.com/wp-content/uploads/Tabular-view-of-user-actions-in-the-phishing-campaign-1536x595.png 1536w" sizes="auto, (max-width: 1611px) 100vw, 1611px" /></figure>



<p>Running phishing simulations isn’t just about catching people out—it’s about giving them the tools to improve. With the attack simulation training in Microsoft Security Center, you can run smart, effective tests that actually make a difference. The goal is to raise awareness, build confidence, and reduce the chances of a mistake turning into a disaster. Keep running these simulations, keep learning from them, and you’ll be well on your way to a team that’s not just prepared but proactive when it comes to phishing threats.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-create-a-phishing-campaign/">How to Create a Phishing Campaign in the Microsoft Security Center</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/how-to-create-a-phishing-campaign/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Active Directory Password Quality Report in Power BI</title>
		<link>https://cyberillo.com/active-directory-password-quality-report-in-power-bi/</link>
					<comments>https://cyberillo.com/active-directory-password-quality-report-in-power-bi/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Mon, 14 Oct 2024 05:01:47 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<guid isPermaLink="false">https://cyberillo.com/?p=3386</guid>

					<description><![CDATA[<p>Learn how to detect weak passwords and visualize risks in your Active Directory with this neat PowerShell and Power BI combo.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/active-directory-password-quality-report-in-power-bi/">Active Directory Password Quality Report in Power BI</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Weak passwords, duplicate passwords, unknown admin accounts, the list goes on&#8230; These all present a serious threat to your company&#8217;s Active Directory security.</p>



<p>In this post, I&#8217;ll show you how to use the <a href="https://github.com/MichaelGrafnetter/DSInternals/" target="_blank" rel="noopener">DSInternals PowerShell module</a> to test Active Directory password quality and identify flaws in your AD security posture. Then, we&#8217;ll create a Power BI report to get a quick glance at the number of password quality issues, together with a list of users affected by each issue.</p>





<h2 class="wp-block-heading" id="complete-power-shell-script">Complete PowerShell Script</h2>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">## Active Directory Password Quality Data Export ##
#░█████╗░██╗░░░██╗██████╗░███████╗██████╗░██╗██╗░░░░░██╗░░░░░░█████╗░
#██╔══██╗╚██╗░██╔╝██╔══██╗██╔════╝██╔══██╗██║██║░░░░░██║░░░░░██╔══██╗
#██║░░╚═╝░╚████╔╝░██████╦╝█████╗░░██████╔╝██║██║░░░░░██║░░░░░██║░░██║
#██║░░██╗░░╚██╔╝░░██╔══██╗██╔══╝░░██╔══██╗██║██║░░░░░██║░░░░░██║░░██║
#╚█████╔╝░░░██║░░░██████╦╝███████╗██║░░██║██║███████╗███████╗╚█████╔╝
#░╚════╝░░░░╚═╝░░░╚═════╝░╚══════╝╚═╝░░╚═╝╚═╝╚══════╝╚══════╝░╚════╝░

# Define Variables
$dictionary = ".\Dictionary.txt"
$domain = "dc=contoso,dc=com"
$dc = "10.10.10.1"

# Retrieve AD Accounts and Test Password Quality
$data = Get-ADReplAccount -All -Server $dc -NamingContext $domain |
        Test-PasswordQuality -WeakPasswordsFile $dictionary -IncludeDisabledAccounts

# Define the Password Quality Criteria
$qualityCriteria = @(
    "ClearTextPassword",
    "LMHash",
    "EmptyPassword",
    "WeakPassword",
    "SamAccountNameAsPassword",
    "DefaultComputerPassword",
    "PasswordNotRequired",
    "PasswordNeverExpires",
    "AESKeysMissing",
    "PreAuthNotRequired",
    "DESEncryptionOnly",
    "Kerberoastable",
    "DelegatableAdmins",
    "SmartCardUsersWithPassword",
    "DuplicatePasswordGroups"
)

# Initialize an array to store expanded data
$expandedData = @([pscustomobject]@{
                    "ClearTextPassword" = ""
                    "LMHash" = ""
                    "EmptyPassword" = ""
                    "WeakPassword" = ""
                    "SamAccountNameAsPassword" = ""
                    "DefaultComputerPassword" = ""
                    "PasswordNotRequired" = ""
                    "PasswordNeverExpires" = ""
                    "AESKeysMissing" = ""
                    "PreAuthNotRequired" = ""
                    "DESEncryptionOnly" = ""
                    "Kerberoastable" = ""
                    "DelegatableAdmins" = ""
                    "SmartCardUsersWithPassword" = ""
                    "DuplicatePasswordGroups" = ""
                })

# Iterate through each account and expand the criteria into separate rows
foreach ($account in $data) {
    foreach ($criterion in $qualityCriteria) {
        # Check if the criterion contains values
        if ($account.PSObject.Properties[$criterion].Value -and $account.$criterion.Count -gt 0) {
            # Expand each item in the collection into a new row
            foreach ($user in $account.$criterion) {
                $expandedData += [pscustomobject]@{
                    "$Criterion"   = $user
                }
            }
        }
    }
}

# Export all expanded data into a single CSV
$expandedData | Export-Csv -Path "PasswordQuality.csv" -NoTypeInformation

Write-Host "Exported expanded data to PasswordQuality.csv with $($expandedData.Count) records."
</pre>



<h2 class="wp-block-heading" id="script-breakdown">Script Breakdown</h2>



<p>We’ll start with the PowerShell script that gathers all the information we need from Active Directory.</p>



<p>Here&#8217;s what it does:</p>



<ol class="wp-block-list">
<li><strong>Pulls AD account information</strong>&nbsp;from your domain controller (DC).</li>



<li><strong>Checks password quality</strong>&nbsp;based on various criteria, like whether the password is weak, missing, or stored improperly.</li>



<li><strong>Expands the data</strong>&nbsp;into a more readable format.</li>



<li><strong>Exports the results</strong>&nbsp;to a CSV file for analysis.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading" id="1-setting-up-your-variables">1. Setting Up Your Variables</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Define Variables
$dictionary = ".\Dictionary.txt"
$domain = "dc=contoso,dc=com"
$dc = "10.10.10.1"
</pre>



<p>You need to define a few things at the start: where the script can find a list of weak passwords (<code>Dictionary.txt</code>), your domain name, and the IP address of your domain controller. Change these to match your environment.</p>



<p>You can customize the dictionary as needed, but a good starting point can be found <a href="https://github.com/danielmiessler/SecLists/tree/master/Passwords" target="_blank" rel="noopener">here</a>.</p>



<h3 class="wp-block-heading" id="2-getting-ad-accounts-and-testing-password-quality">2. Getting AD Accounts and Testing Password Quality</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$data = Get-ADReplAccount -All -Server $dc -NamingContext $domain |
        Test-PasswordQuality -WeakPasswordsFile $dictionary -IncludeDisabledAccounts
</pre>



<p>This section uses the <code>Get-ADReplAccount</code> and <code>Test-PasswordQuality</code> cmdlets from the <strong>DSInternals </strong>PowerShell module.</p>



<p>It retrieves all the accounts in your domain and checks their password quality. We’re looking for things like weak passwords, missing encryption, or even accounts that use their username as a password (yikes!). This script can also include disabled accounts—because even they can be a security risk if left unchecked.</p>



<h3 class="wp-block-heading" id="3-defining-password-quality-criteria">3. Defining Password Quality Criteria</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$qualityCriteria = @(
    "ClearTextPassword", "LMHash", "EmptyPassword", "WeakPassword", 
    "SamAccountNameAsPassword", "DefaultComputerPassword", "PasswordNotRequired", 
    "PasswordNeverExpires", "AESKeysMissing", "PreAuthNotRequired", 
    "DESEncryptionOnly", "Kerberoastable", "DelegatableAdmins", 
    "SmartCardUsersWithPassword", "DuplicatePasswordGroups"
)
</pre>



<p>This part sets the criteria we care about—whether the password is empty, weak, or stored as an old LMHash, just to name a few. These are the key things that pose risks, and the <code>Test-PasswordQuality</code> cmdlet checks for all of them.</p>



<h3 class="wp-block-heading" id="4-storing-and-expanding-the-data">4. Storing and Expanding the Data</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$expandedData = @()
foreach ($account in $data) {
    foreach ($criterion in $qualityCriteria) {
        if ($account.PSObject.Properties[$criterion].Value -and $account.$criterion.Count -gt 0) {
            foreach ($user in $account.$criterion) {
                $expandedData += [pscustomobject]@{ "$criterion" = $user }
            }
        }
    }
}
</pre>



<p>This portion of the script is all about organizing the data in a way that&#8217;s easy to analyze and visualize later on, especially when we move the data into Power BI. Let’s break it down step-by-step:</p>



<h4 class="wp-block-heading" id="a-initializing-the-expanded-data-array"><strong>A) Initializing the Expanded Data Array</strong></h4>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$expandedData = @()
</pre>



<ul class="wp-block-list">
<li><strong>Purpose:</strong>&nbsp;Here, we’re creating an empty array called&nbsp;<code>$expandedData</code>. This array will store each password quality issue we find, structured in a consistent format.</li>



<li><strong>Why It Matters:</strong>&nbsp;By initializing an empty array, we ensure that we have a clean slate to start adding our processed data. This helps in avoiding any unintended data carryover from previous runs or other parts of the script.</li>
</ul>



<h4 class="wp-block-heading" id="b-looping-through-each-ad-account"><strong>B) Looping Through Each AD Account</strong></h4>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">foreach ($account in $data) {
    ...
}
</pre>



<ul class="wp-block-list">
<li><strong>Purpose:</strong>&nbsp;This outer loop goes through each account retrieved earlier by the&nbsp;<code>Get-ADReplAccount</code>&nbsp;cmdlet.</li>



<li><strong>Why It Matters:</strong>&nbsp;We need to evaluate each account individually to check for any password-related issues. This ensures that no account is overlooked in our analysis.</li>
</ul>



<h4 class="wp-block-heading" id="c-checking-each-password-quality-criterion"><strong>C) Checking Each Password Quality Criterion</strong></h4>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">foreach ($criterion in $qualityCriteria) {
    ...
}
</pre>



<ul class="wp-block-list">
<li><strong>Purpose:</strong>&nbsp;For every account, we loop through each password quality criterion defined in the&nbsp;<code>$qualityCriteria</code>&nbsp;array.</li>



<li><strong>Why It Matters:</strong>&nbsp;Each criterion represents a specific type of password issue (e.g., weak password, empty password). By iterating through each one, we can systematically check for all possible vulnerabilities associated with the account.</li>
</ul>



<h4 class="wp-block-heading" id="d-confirm-existence-of-password-quality-issues"><strong>D) Confirm Existence of Password Quality Issues</strong></h4>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">if ($account.PSObject.Properties[$criterion].Value -and $account.$criterion.Count -gt 0) {
    ...
}
</pre>



<ul class="wp-block-list">
<li><strong>Purpose:</strong>&nbsp;This&nbsp;<code>if</code>&nbsp;statement checks two things:
<ol class="wp-block-list">
<li><strong><code>$account.PSObject.Properties[$criterion].Value</code>:</strong>&nbsp;Ensures that the current criterion has a value, meaning that there is at least one instance of this issue for the account.</li>



<li><strong><code>$account.$criterion.Count -gt 0</code>:</strong>&nbsp;Confirms that the number of issues under this criterion is greater than zero.</li>
</ol>
</li>



<li><strong>Why It Matters:</strong>&nbsp;We only want to record criteria that are actually present. This prevents our final data set from being cluttered with empty or irrelevant entries, making our analysis cleaner and more focused on real issues.</li>
</ul>



<h4 class="wp-block-heading" id="e-expanding-each-issue-into-a-new-row"><strong>E) Expanding Each Issue into a New Row</strong></h4>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">foreach ($user in $account.$criterion) {
    $expandedData += [pscustomobject]@{ "$criterion" = $user }
}
</pre>



<ul class="wp-block-list">
<li><strong>Purpose:</strong>&nbsp;For each issue found under the current criterion, we create a new custom PowerShell object and add it to the&nbsp;<code>$expandedData</code>&nbsp;array.
<ul class="wp-block-list">
<li><strong><code>[pscustomobject]@{ "$criterion" = $user }</code>:</strong>&nbsp;This creates a new object with a property named after the current criterion and assigns it the value of the specific issue (<code>$user</code>).</li>



<li><strong><code>$expandedData += ...</code>:</strong>&nbsp;This appends the newly created object to the&nbsp;<code>$expandedData</code>&nbsp;array.</li>
</ul>
</li>



<li><strong>Why It Matters:</strong>&nbsp;By expanding each issue into its own row, we transform our data into a flat, tabular format that&#8217;s ideal for analysis and visualization. This structure is especially useful when importing the data into Power BI, as it allows for easy creation of filters, charts, and other visuals based on specific criteria.</li>
</ul>



<h4 class="wp-block-heading" id="f-putting-it-all-together"><strong>F) Putting It All Together</strong></h4>



<p>Let’s visualize what’s happening with an example:</p>



<ul class="wp-block-list">
<li><strong>Suppose we have an AD account,&nbsp;<code>jdoe</code>, with the following password issues:</strong>
<ul class="wp-block-list">
<li><strong>WeakPassword:</strong>&nbsp;<code>password123</code></li>



<li><strong>PasswordNeverExpires:</strong>&nbsp;Enabled</li>
</ul>
</li>



<li><strong>Processing Steps:</strong>
<ol class="wp-block-list">
<li><strong>First Loop (<code>$account</code>):</strong>&nbsp;Processes the&nbsp;<code>jdoe</code>&nbsp;account.</li>



<li><strong>Second Loop (<code>$criterion</code>):</strong>&nbsp;Checks each criterion for&nbsp;<code>jdoe</code>.
<ul class="wp-block-list">
<li><strong><code>WeakPassword</code>:</strong>
<ul class="wp-block-list">
<li><strong>Condition Check:</strong>&nbsp;<code>True</code>&nbsp;(since&nbsp;<code>password123</code>&nbsp;is listed in the dictionary)</li>



<li><strong>Inner Loop:</strong>&nbsp;Adds a new object&nbsp;<code>{ "WeakPassword" = "jdoe" }</code>&nbsp;to&nbsp;<code>$expandedData</code>.</li>
</ul>
</li>



<li><strong><code>PasswordNeverExpires</code>:</strong>
<ul class="wp-block-list">
<li><strong>Condition Check:</strong>&nbsp;<code>True</code>&nbsp;(since it&#8217;s enabled)</li>



<li><strong>Inner Loop:</strong>&nbsp;Adds another object&nbsp;<code>{ "PasswordNeverExpires" = "jdoe" }</code>&nbsp;to&nbsp;<code>$expandedData</code>.</li>
</ul>
</li>



<li><strong>Other Criteria:</strong>&nbsp;If&nbsp;<code>jdoe</code>&nbsp;doesn&#8217;t have issues like&nbsp;<code>EmptyPassword</code>&nbsp;or&nbsp;<code>LMHash</code>, those criteria are skipped and no new rows are created.</li>
</ul>
</li>
</ol>
</li>
</ul>



<p>This flattened structure makes it straightforward to create visuals in Power BI, such as:</p>



<ul class="wp-block-list">
<li><strong>Bar Charts:</strong>&nbsp;Showing the number of accounts with each type of password issue.</li>



<li><strong>Tables:</strong>&nbsp;Listing all accounts alongside their specific vulnerabilities.</li>



<li><strong>Pie Charts:</strong>&nbsp;Representing the proportion of each issue relative to the total number of issues.</li>
</ul>



<h4 class="wp-block-heading" id="g-why-use-this-approach"><strong>G) Why Use This Approach?</strong></h4>



<ul class="wp-block-list">
<li><strong>Simplicity:</strong>&nbsp;By expanding each issue into its own row, the data becomes easier to work with, especially when dealing with multiple criteria across numerous accounts.</li>



<li><strong>Flexibility:</strong>&nbsp;This format allows you to filter, sort, and visualize the data with little extra data manipulation.</li>



<li><strong>Scalability:</strong>&nbsp;As your organization grows and the number of AD accounts increases, this method remains efficient and manageable.</li>
</ul>



<h3 class="wp-block-heading" id="5-exporting-to-csv">5. Exporting to CSV</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$expandedData | Export-Csv -Path "PasswordQuality.csv" -NoTypeInformation
Write-Host "Exported expanded data to PasswordQuality.csv with $($expandedData.Count) records."
</pre>



<p>Finally, all the findings get exported to a CSV file, which we’ll use as a data source to create our Power BI report. The CSV will contain the password quality issues as columns, and one user per row (under the appropriate column). One user can have multiple rows in the CSV if his account has more than one password quality issue.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="create-a-power-bi-report">Create a Power BI Report</h2>



<p>Now that we have the data in&nbsp;<code>PasswordQuality.csv</code>, it’s time to visualize it in Power BI. This will help you spot trends and focus on the biggest security risks.</p>



<h4 class="wp-block-heading" id="steps">Steps:</h4>



<ol class="wp-block-list">
<li><strong>Open Power BI</strong> and go to&nbsp;<strong>Home</strong>&nbsp;-&gt;&nbsp;<strong>Get Data</strong>&nbsp;-&gt;&nbsp;<strong>Text/CSV</strong>.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="778" height="564" src="https://cyberillo.com/wp-content/uploads/Load-data-from-CSV-in-Power-BI.png" alt="Load data from CSV in Power BI" class="wp-image-3399" style="width:481px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Load-data-from-CSV-in-Power-BI.png 778w, https://cyberillo.com/wp-content/uploads/Load-data-from-CSV-in-Power-BI-300x217.png 300w, https://cyberillo.com/wp-content/uploads/Load-data-from-CSV-in-Power-BI-768x557.png 768w" sizes="auto, (max-width: 778px) 100vw, 778px" /></figure>
</div>


<ol start="2" class="wp-block-list">
<li>Browse to your exported&nbsp;<code>PasswordQuality.csv</code>&nbsp;and click&nbsp;<strong>Transform Data</strong>.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="768" src="https://cyberillo.com/wp-content/uploads/Transform-CSV-Data-in-Power-BI-1024x768.png" alt="Transform CSV Data in Power BI" class="wp-image-3401" style="width:556px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Transform-CSV-Data-in-Power-BI-1024x768.png 1024w, https://cyberillo.com/wp-content/uploads/Transform-CSV-Data-in-Power-BI-300x225.png 300w, https://cyberillo.com/wp-content/uploads/Transform-CSV-Data-in-Power-BI-768x576.png 768w, https://cyberillo.com/wp-content/uploads/Transform-CSV-Data-in-Power-BI.png 1089w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<ol start="3" class="wp-block-list">
<li>In the Power Query editor, click on <strong>Use First Row as Headers</strong>.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="572" height="222" src="https://cyberillo.com/wp-content/uploads/Click-on-Use-First-Row-as-Headers-in-Power-BI.png" alt="Click on Use First Row as Headers in Power BI" class="wp-image-3403" srcset="https://cyberillo.com/wp-content/uploads/Click-on-Use-First-Row-as-Headers-in-Power-BI.png 572w, https://cyberillo.com/wp-content/uploads/Click-on-Use-First-Row-as-Headers-in-Power-BI-300x116.png 300w" sizes="auto, (max-width: 572px) 100vw, 572px" /></figure>
</div>


<ol start="4" class="wp-block-list">
<li>Then, click on <strong>Replace Values</strong>. </li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="576" height="323" src="https://cyberillo.com/wp-content/uploads/Click-on-Replace-Values-in-Power-BI.png" alt="Click on Replace Values in Power BI" class="wp-image-3404" srcset="https://cyberillo.com/wp-content/uploads/Click-on-Replace-Values-in-Power-BI.png 576w, https://cyberillo.com/wp-content/uploads/Click-on-Replace-Values-in-Power-BI-300x168.png 300w, https://cyberillo.com/wp-content/uploads/Click-on-Replace-Values-in-Power-BI-390x220.png 390w" sizes="auto, (max-width: 576px) 100vw, 576px" /></figure>
</div>


<ol start="5" class="wp-block-list">
<li>Leave <strong>Value to find</strong> blank and enter <code>null</code> in the <strong>Replace With</strong> field. Then, click on <strong>OK</strong>. This will take care of the blank values in our data.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="894" height="406" src="https://cyberillo.com/wp-content/uploads/Replace-blanks-with-null-in-Power-BI.png" alt="Replace blanks with null in Power BI" class="wp-image-3405" style="width:573px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Replace-blanks-with-null-in-Power-BI.png 894w, https://cyberillo.com/wp-content/uploads/Replace-blanks-with-null-in-Power-BI-300x136.png 300w, https://cyberillo.com/wp-content/uploads/Replace-blanks-with-null-in-Power-BI-768x349.png 768w" sizes="auto, (max-width: 894px) 100vw, 894px" /></figure>
</div>


<ol start="6" class="wp-block-list">
<li>Save the Power Query changes by clicking on <strong>Close &amp; Apply</strong>.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="615" src="https://cyberillo.com/wp-content/uploads/Save-Power-Query-Changes-in-Power-BI-1024x615.png" alt="Save Power Query Changes in Power BI" class="wp-image-3406" style="width:567px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Save-Power-Query-Changes-in-Power-BI-1024x615.png 1024w, https://cyberillo.com/wp-content/uploads/Save-Power-Query-Changes-in-Power-BI-300x180.png 300w, https://cyberillo.com/wp-content/uploads/Save-Power-Query-Changes-in-Power-BI-768x462.png 768w, https://cyberillo.com/wp-content/uploads/Save-Power-Query-Changes-in-Power-BI.png 1085w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<ol start="7" class="wp-block-list">
<li>This next step is crucial. We will use our data to create a new table with two columns, <strong>User</strong> and <strong>Issue</strong>. This will make it easier to visualize and filter the data. Go to <strong>Modeling </strong>-&gt; <strong>New table</strong>.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="530" height="266" src="https://cyberillo.com/wp-content/uploads/Create-new-table-in-Power-BI-e1728844012348.png" alt="Create new table in Power BI" class="wp-image-3407" srcset="https://cyberillo.com/wp-content/uploads/Create-new-table-in-Power-BI-e1728844012348.png 530w, https://cyberillo.com/wp-content/uploads/Create-new-table-in-Power-BI-e1728844012348-300x151.png 300w" sizes="auto, (max-width: 530px) 100vw, 530px" /></figure>
</div>


<ol start="8" class="wp-block-list">
<li>In the DAX query, type the following code:</li>
</ol>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Issues = 
VAR _AESKeysMissing =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[AESKeysMissing],
        "Issue", "AESKeysMissing"
    )
VAR _ClearTextPassword =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[ClearTextPassword],
        "Issue", "ClearTextPassword"
    )
VAR _DESEncryptionOnly =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[DESEncryptionOnly],
        "Issue", "DESEncryptionOnly"
    )
VAR _DefaultComputerPassword =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[DefaultComputerPassword],
        "Issue", "DefaultComputerPassword"
    )
VAR _DelegatableAdmins =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[DelegatableAdmins],
        "Issue", "DelegatableAdmins"
    )
VAR _DuplicatePasswordGroups =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[DuplicatePasswordGroups],
        "Issue", "DuplicatePasswordGroups"
    )
VAR _EmptyPassword =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[EmptyPassword],
        "Issue", "EmptyPassword"
    )
VAR _Kerberoastable =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[Kerberoastable],
        "Issue", "Kerberoastable"
    )
VAR _LMHash =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[LMHash],
        "Issue", "LMHash"
    )
VAR _PasswordNeverExpires =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[PasswordNeverExpires],
        "Issue", "PasswordNeverExpires"
    )
VAR _PasswordNotRequired =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[PasswordNotRequired],
        "Issue", "PasswordNotRequired"
    )
VAR _PreAuthNotRequired =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[PreAuthNotRequired],
        "Issue", "PreAuthNotRequired"
    )
VAR _SamAccountNameAsPassword =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[SamAccountNameAsPassword],
        "Issue", "SamAccountNameAsPassword"
    )
VAR _SmartCardUsersWithPassword =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[SmartCardUsersWithPassword],
        "Issue", "SmartCardUsersWithPassword"
    )
VAR _WeakPassword =
    SELECTCOLUMNS (
        PasswordQuality,
        "User", PasswordQuality[WeakPassword],
        "Issue", "WeakPassword"
    )

RETURN
    DISTINCT (
        UNION (
            _AESKeysMissing,
            _ClearTextPassword,
            _DESEncryptionOnly,
            _DefaultComputerPassword,
            _DelegatableAdmins,
            _DuplicatePasswordGroups,
            _EmptyPassword,
            _Kerberoastable,
            _LMHash,
            _PasswordNeverExpires,
            _PasswordNotRequired,
            _PreAuthNotRequired,
            _SamAccountNameAsPassword,
            _SmartCardUsersWithPassword,
            _WeakPassword
        )
    )</pre>



<ol start="9" class="wp-block-list">
<li>Now, you can visualize the data as needed. A report which I find convenient is a donut chart with the <strong>Issue </strong>column as the legend, and the count of the <strong>User </strong>column as the values. This shows the most common password quality issues in the domain. The list of users affected by each issue can be filtered by clicking on the different donut slices.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="575" src="https://cyberillo.com/wp-content/uploads/Number-of-Users-Affected-by-Each-Issue-Power-BI-Report-1024x575.png" alt="Number of Users Affected by Each Issue Power BI Report" class="wp-image-3402" style="width:635px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Number-of-Users-Affected-by-Each-Issue-Power-BI-Report-1024x575.png 1024w, https://cyberillo.com/wp-content/uploads/Number-of-Users-Affected-by-Each-Issue-Power-BI-Report-300x169.png 300w, https://cyberillo.com/wp-content/uploads/Number-of-Users-Affected-by-Each-Issue-Power-BI-Report-768x432.png 768w, https://cyberillo.com/wp-content/uploads/Number-of-Users-Affected-by-Each-Issue-Power-BI-Report-390x220.png 390w, https://cyberillo.com/wp-content/uploads/Number-of-Users-Affected-by-Each-Issue-Power-BI-Report.png 1274w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="wrapping-up">Wrapping Up</h2>



<p>And that’s it! You’ve now used a PowerShell script to gather AD password quality data and created a Power BI report to visualize it. This is a powerful way to stay on top of password security, spot potential vulnerabilities, and make sure your organization’s accounts are protected.</p>



<p>Remember, scheduling the script at regular intervals (and refreshing the report data) can help you stay ahead of any security risks related to weak passwords. And with Power BI, you can easily share the findings and keep the rest of your team in the loop.</p>



<p>Let me know if you have any questions or if you&#8217;d like to see more advanced Power BI visuals. Stay secure!</p>



<p></p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/active-directory-password-quality-report-in-power-bi/">Active Directory Password Quality Report in Power BI</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/active-directory-password-quality-report-in-power-bi/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install Kali Linux on Windows 11 (2 Easy Ways)</title>
		<link>https://cyberillo.com/how-to-install-kali-linux-on-windows/</link>
					<comments>https://cyberillo.com/how-to-install-kali-linux-on-windows/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Tue, 24 Sep 2024 04:21:04 +0000</pubDate>
				<category><![CDATA[More]]></category>
		<guid isPermaLink="false">https://cyberillo.com/?p=3270</guid>

					<description><![CDATA[<p>Learn how to easily install Kali Linux on Windows 10 or 11 using WSL or Hyper-V. Get started with ethical hacking in minutes!</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-install-kali-linux-on-windows/">How to Install Kali Linux on Windows 11 (2 Easy Ways)</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="How to Install Kali Linux on Windows" width="1220" height="686" src="https://www.youtube.com/embed/5ovDzVeqhUg?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>Installing Kali Linux on Windows is a straightforward process that lets you access one of the most popular Linux distributions for cybersecurity and penetration testing directly from your Windows machine. Whether you’re a security professional, an ethical hacker, or someone looking to explore digital forensics, getting Kali Linux up and running on your Windows 10 or 11 system offers a powerful toolset right at your fingertips.</p>



<p>This tutorial will guide you through two methods to install Kali Linux: via the Windows Subsystem for Linux (WSL) and using Hyper-V. Both approaches allow you to integrate a Linux environment into Windows, but each offers its unique advantages. If you&#8217;re more interested in lightweight integration, WSL might be your best bet. If you prefer running Kali in a virtual machine with more control, Hyper-V is the way to go. Let&#8217;s dive into the details.</p>





<h2 class="wp-block-heading" id="method-1-how-to-install-kali-linux-on-wsl-windows-subsystem-for-linux">Method 1: How to Install Kali Linux on WSL (Windows Subsystem for Linux)</h2>



<p>To begin, you’ll need to enable the&nbsp;<strong>Windows Subsystem for Linux (WSL)</strong>&nbsp;and the&nbsp;<strong>Virtual Machine Platform</strong>&nbsp;features. These components are necessary to ensure your system can run a Linux kernel directly on Windows.</p>



<ol class="wp-block-list">
<li>Navigate to the control panel and select <strong>Programs > Turns Windows features on or off</strong>.</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="1112" height="485" src="https://cyberillo.com/wp-content/uploads/Turn-windows-features-on-or-off-in-control-panel.png" alt="Turn windows features on or off in control panel" class="wp-image-3274" srcset="https://cyberillo.com/wp-content/uploads/Turn-windows-features-on-or-off-in-control-panel.png 1112w, https://cyberillo.com/wp-content/uploads/Turn-windows-features-on-or-off-in-control-panel-300x131.png 300w, https://cyberillo.com/wp-content/uploads/Turn-windows-features-on-or-off-in-control-panel-1024x447.png 1024w, https://cyberillo.com/wp-content/uploads/Turn-windows-features-on-or-off-in-control-panel-768x335.png 768w" sizes="auto, (max-width: 1112px) 100vw, 1112px" /></figure>



<ol start="2" class="wp-block-list">
<li>Enable the <strong>Virtual Machine Platform &amp; Windows Subsystem for Linux</strong> features.<br><br>Using the&nbsp;<strong>Windows Subsystem Linux</strong>&nbsp;feature on Windows 11 or 10 allows you to run a Linux environment natively, with deep integration into the Windows file system. It’s user-friendly, making it ideal for those who want to install Kali Linux without dealing with a full virtual machine setup.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="565" height="499" src="https://cyberillo.com/wp-content/uploads/Enable-Virtual-Machine-Platform-and-WSL-features.png" alt="Enable Virtual Machine Platform and WSL features" class="wp-image-3272" style="width:429px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Enable-Virtual-Machine-Platform-and-WSL-features.png 565w, https://cyberillo.com/wp-content/uploads/Enable-Virtual-Machine-Platform-and-WSL-features-300x265.png 300w" sizes="auto, (max-width: 565px) 100vw, 565px" /></figure>
</div>


<ol start="3" class="wp-block-list">
<li>Click on <strong>OK</strong> and reboot your machine for the changes to take effect. After rebooting, your system will be ready to install Linux distributions, including Kali Linux.</li>



<li>Then, open up the Windows Store and search for <strong>Kali Linux</strong>.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="523" src="https://cyberillo.com/wp-content/uploads/Search-for-Kali-Linux-in-the-Microsoft-Store-1024x523.png" alt="Search for Kali Linux in the Microsoft Store" class="wp-image-3273" srcset="https://cyberillo.com/wp-content/uploads/Search-for-Kali-Linux-in-the-Microsoft-Store-1024x523.png 1024w, https://cyberillo.com/wp-content/uploads/Search-for-Kali-Linux-in-the-Microsoft-Store-300x153.png 300w, https://cyberillo.com/wp-content/uploads/Search-for-Kali-Linux-in-the-Microsoft-Store-768x392.png 768w, https://cyberillo.com/wp-content/uploads/Search-for-Kali-Linux-in-the-Microsoft-Store.png 1392w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="5" class="wp-block-list">
<li>Select the first search result and click on <strong>Get</strong>.<br><br>This process may take a few minutes depending on your internet connection and system performance.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="618" src="https://cyberillo.com/wp-content/uploads/Click-on-Get-to-install-Kali-Linux-from-the-Microsoft-Store-1024x618.png" alt="Click on Get to install Kali Linux from the Microsoft Store" class="wp-image-3271" srcset="https://cyberillo.com/wp-content/uploads/Click-on-Get-to-install-Kali-Linux-from-the-Microsoft-Store-1024x618.png 1024w, https://cyberillo.com/wp-content/uploads/Click-on-Get-to-install-Kali-Linux-from-the-Microsoft-Store-300x181.png 300w, https://cyberillo.com/wp-content/uploads/Click-on-Get-to-install-Kali-Linux-from-the-Microsoft-Store-768x463.png 768w, https://cyberillo.com/wp-content/uploads/Click-on-Get-to-install-Kali-Linux-from-the-Microsoft-Store-780x470.png 780w, https://cyberillo.com/wp-content/uploads/Click-on-Get-to-install-Kali-Linux-from-the-Microsoft-Store.png 1315w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="6" class="wp-block-list">
<li>Once the download is complete, click on <strong>Open</strong>. This will install and register the Kali Linux distribution in WSL.</li>



<li>When prompted, enter a username and password for your account.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="354" src="https://cyberillo.com/wp-content/uploads/Enter-username-and-password-to-finish-Kali-Linux-installation-1024x354.png" alt="Enter username and password to finish Kali Linux installation" class="wp-image-3275" srcset="https://cyberillo.com/wp-content/uploads/Enter-username-and-password-to-finish-Kali-Linux-installation-1024x354.png 1024w, https://cyberillo.com/wp-content/uploads/Enter-username-and-password-to-finish-Kali-Linux-installation-300x104.png 300w, https://cyberillo.com/wp-content/uploads/Enter-username-and-password-to-finish-Kali-Linux-installation-768x266.png 768w, https://cyberillo.com/wp-content/uploads/Enter-username-and-password-to-finish-Kali-Linux-installation.png 1073w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="8" class="wp-block-list">
<li>Congratulations! You’ve successfully installed Kali Linux on your Windows 11 machine using WSL. You can now launch it directly from the Start menu, and start using Kali’s powerful tools for&nbsp;cybersecurity&nbsp;and&nbsp;penetration testing.</li>
</ol>



<h2 class="wp-block-heading" id="method-2-how-to-install-kali-linux-on-hyper-v">Method 2: How to Install Kali Linux on Hyper-V</h2>



<p>For users who prefer using a virtual machine, installing Kali Linux via&nbsp;<strong>Hyper-V</strong>&nbsp;offers a more isolated and robust environment. This method is ideal for those who want a virtualized instance of Kali Linux, running as a separate machine on your Windows operating system.</p>



<p>First, we&#8217;ll need to download the Kali Linux&nbsp;<strong>Virtual Machine</strong>&nbsp;image. On the official Kali Linux website, under the&nbsp;<strong>Pre-built Virtual Machines</strong>&nbsp;section, you’ll find options for various virtualization platforms like&nbsp;<strong>VMware</strong>&nbsp;and&nbsp;<strong>VirtualBox</strong>, but for this guide, we’re focusing on&nbsp;<strong>Hyper-V</strong>.</p>



<ol class="wp-block-list">
<li>Head over to the <a href="https://www.kali.org/get-kali/#kali-platforms" target="_blank" rel="noopener">Kali Linux download page</a> and click on the <strong>Virtual Machines</strong> option.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="490" src="https://cyberillo.com/wp-content/uploads/Select-Virtual-Machines-from-the-Kali-Linux-Download-Page-1024x490.png" alt="Select Virtual Machines from the Kali Linux Download Page" class="wp-image-3278" srcset="https://cyberillo.com/wp-content/uploads/Select-Virtual-Machines-from-the-Kali-Linux-Download-Page-1024x490.png 1024w, https://cyberillo.com/wp-content/uploads/Select-Virtual-Machines-from-the-Kali-Linux-Download-Page-300x143.png 300w, https://cyberillo.com/wp-content/uploads/Select-Virtual-Machines-from-the-Kali-Linux-Download-Page-768x367.png 768w, https://cyberillo.com/wp-content/uploads/Select-Virtual-Machines-from-the-Kali-Linux-Download-Page-1536x735.png 1536w, https://cyberillo.com/wp-content/uploads/Select-Virtual-Machines-from-the-Kali-Linux-Download-Page.png 1746w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="2" class="wp-block-list">
<li>Under the <strong>Pre-built Virtual Machines</strong> page, select <strong>Hyper-V</strong>. Make sure you choose the correct version of Kali Linux for your system. If you’re using a 64-bit Windows system (which most users are), select the 64-bit version.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="594" src="https://cyberillo.com/wp-content/uploads/Select-Hyper-V-from-the-pre-built-virtual-machines-page-1024x594.png" alt="Select Hyper-V from the pre-built virtual machines page" class="wp-image-3279" srcset="https://cyberillo.com/wp-content/uploads/Select-Hyper-V-from-the-pre-built-virtual-machines-page-1024x594.png 1024w, https://cyberillo.com/wp-content/uploads/Select-Hyper-V-from-the-pre-built-virtual-machines-page-300x174.png 300w, https://cyberillo.com/wp-content/uploads/Select-Hyper-V-from-the-pre-built-virtual-machines-page-768x446.png 768w, https://cyberillo.com/wp-content/uploads/Select-Hyper-V-from-the-pre-built-virtual-machines-page.png 1437w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="3" class="wp-block-list">
<li>Once the download is complete extract the .7z archive using <a href="https://www.7-zip.org/" target="_blank" rel="noopener">7-zip</a> or a similar tool.</li>



<li>Open&nbsp;<strong>PowerShell</strong>&nbsp;with administrator rights and use the command line to navigate to where you extracted the archive. This will allow you to execute the script to create the virtual machine.</li>
</ol>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">cd path/to/your/extracted/archive</pre>



<ol start="5" class="wp-block-list">
<li>Create the Kali Linux virtual machine by running the PowerShell script.</li>
</ol>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
.\create-vm.ps1</pre>



<ol start="6" class="wp-block-list">
<li>Once the script completes, you can open&nbsp;<strong>Hyper-V Manager</strong>&nbsp;and locate your newly created Kali Linux virtual machine. Hyper-V gives you more control over the virtual environment, with options to allocate memory, processors, and more.</li>



<li>Double-click to connect to the VM and then click on <strong>Start</strong>.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="677" height="523" src="https://cyberillo.com/wp-content/uploads/Click-on-Start-to-power-on-the-Kali-Linux-virtual-machine.png" alt="Click on Start to power on the Kali Linux virtual machine" class="wp-image-3280" style="width:451px;height:auto" srcset="https://cyberillo.com/wp-content/uploads/Click-on-Start-to-power-on-the-Kali-Linux-virtual-machine.png 677w, https://cyberillo.com/wp-content/uploads/Click-on-Start-to-power-on-the-Kali-Linux-virtual-machine-300x232.png 300w" sizes="auto, (max-width: 677px) 100vw, 677px" /></figure>
</div>


<ol start="8" class="wp-block-list">
<li>After the Virtual Machine boots up, you can log in to your Kali Linux environment with the default credentials.</li>
</ol>



<ul class="wp-block-list">
<li><code>Username: <strong>kali</strong></code></li>



<li><code>Password: <strong>kali</strong></code></li>
</ul>



<ol start="9" class="wp-block-list">
<li>Congratulations! Your Kali Linux virtual environment&nbsp;is fully set up, and you can start using it for&nbsp;penetration testing,&nbsp;cybersecurity tasks, and more.</li>
</ol>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="573" src="https://cyberillo.com/wp-content/uploads/Kali-Linux-in-Hyper-V-1024x573.png" alt="Kali Linux in Hyper-V" class="wp-image-3281" srcset="https://cyberillo.com/wp-content/uploads/Kali-Linux-in-Hyper-V-1024x573.png 1024w, https://cyberillo.com/wp-content/uploads/Kali-Linux-in-Hyper-V-300x168.png 300w, https://cyberillo.com/wp-content/uploads/Kali-Linux-in-Hyper-V-768x430.png 768w, https://cyberillo.com/wp-content/uploads/Kali-Linux-in-Hyper-V-1536x859.png 1536w, https://cyberillo.com/wp-content/uploads/Kali-Linux-in-Hyper-V.png 1623w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading" id="faq-kali-linux-installation-on-windows">Frequently Asked Questions</h2>



<p><strong>What is the Windows Subsystem for Linux (WSL)?</strong><br>WSL allows you to run a full Linux distribution on your Windows machine without the need for a virtual machine. It integrates Linux tools directly into the Windows environment, making it ideal for lightweight tasks and software development.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Can I install Kali Linux on both Windows 10 and Windows 11?</strong><br>Yes, you can install Kali Linux on both Windows 10 and 11 using WSL. However, WSL 2 is recommended for better performance, which is natively supported in Windows 11 and can be manually enabled on Windows 10.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>How do I enable the Windows Subsystem for Linux?</strong><br>Go to the Control Panel, navigate to &#8220;Programs &gt; Turn Windows features on or off,&#8221; and enable both the <strong>Windows Subsystem for Linux</strong> and <strong>Virtual Machine Platform</strong> features. After enabling them, reboot your system to apply the changes.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>What are the default credentials for logging into Kali Linux?</strong><br>If you’re using the Hyper-V method, the default username and password are both <code>kali</code>. For WSL, you will be prompted to create your own username and password during the installation process.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>What are the main differences between WSL and Hyper-V for running Kali Linux?</strong><br>WSL offers seamless integration into Windows and uses fewer system resources, making it ideal for quick access to Linux tools. Hyper-V provides a full virtual machine with isolated resources, which is better suited for more complex tasks that require a dedicated environment.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>How much disk space does Kali Linux require on WSL?</strong><br>The initial installation of Kali Linux on WSL will require around 2-3 GB of space, but this can grow depending on the tools you install. Make sure to have enough disk space available on your system.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Do I need to reboot after enabling WSL features?</strong><br>Yes, after enabling the WSL and Virtual Machine Platform features, you need to restart your machine for the changes to take effect.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Can I use VirtualBox or VMware instead of Hyper-V to run Kali Linux?</strong><br>Yes, you can use <strong>VirtualBox</strong> or <strong>VMware</strong> to install Kali Linux as a virtual machine. However, this guide specifically focuses on <strong>Hyper-V</strong>, which is built into Windows and doesn&#8217;t require third-party software.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>How do I update Kali Linux once installed?</strong><br>Once Kali Linux is installed, open the terminal and run the following command to update all packages:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo apt update &amp;&amp; sudo apt upgrade</pre>



<p>This will ensure your system has the latest security updates and software.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Can I dual boot Kali Linux and Windows?</strong><br>While this guide focuses on using WSL and Hyper-V, you can also dual boot Kali Linux with Windows. This method requires partitioning your hard drive and installing Kali Linux as a separate operating system. Dual booting is more complex but offers the advantage of running Linux natively.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>I want to learn penetration testing. Is Kali Linux the right tool for me?</strong><br>Yes, Kali Linux is widely used by cybersecurity professionals and ethical hackers for penetration testing and digital forensics. It comes pre-installed with a wide range of tools like <strong>nmap</strong>, <strong>Metasploit</strong>, and <strong>Wireshark</strong>, which are essential for these tasks.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>What if I encounter errors during the installation process?</strong><br>If you run into any issues during installation, common troubleshooting steps include:</p>



<ul class="wp-block-list">
<li>Verifying that your Windows version supports WSL 2 or Hyper-V.</li>



<li>Ensuring you’ve enabled the necessary features (WSL, Virtual Machine Platform, or Hyper-V).</li>



<li>Checking your internet connection during the download phase.<br>For more specific issues, consult the Kali Linux documentation or community forums.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>How do I start using Kali Linux after installation?</strong><br>After installing via WSL, you can launch Kali Linux by searching for &#8220;Kali&#8221; in the Start menu. For Hyper-V, you’ll use <strong>Hyper-V Manager</strong> to start the virtual machine. Once started, you can use the terminal for all Linux commands and tools.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Is using Kali Linux on WSL or Hyper-V suitable for production environments?</strong><br>For most users, running Kali Linux on WSL or Hyper-V is ideal for learning, development, and testing purposes. However, production environments often require more robust virtualization or dedicated systems, especially for security-critical operations.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Can I install additional Linux tools after setting up Kali Linux?</strong><br>Absolutely! You can use the terminal in Kali Linux to install additional tools. For example, to install <code>nmap</code>, run:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="bash" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo apt install nmap</pre>



<p>Kali Linux is highly flexible and customizable for any additional tools you may need.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>This FAQ should help clarify any questions you may have during the process of installing Kali Linux on your Windows machine.</p>



<h2 class="wp-block-heading" id="c">Conclusion</h2>



<p>Both methods allow you to install Kali Linux on your Windows machine, but the choice depends on how you want to use the operating system. WSL offers a lighter, more integrated approach with the Windows environment, ideal for users who want quick access to Linux tools and a simplified setup. Meanwhile, Hyper-V provides a more controlled, virtualized instance of Kali Linux, making it a solid choice for those who want full isolation and greater flexibility in managing resources.</p>



<p>No matter which method you choose, you’ll have Kali Linux ready to go, with access to its full suite of&nbsp;ethical hacking&nbsp;and&nbsp;cybersecurity tools, from&nbsp;<strong>nmap</strong>&nbsp;to&nbsp;<strong>Metasploit</strong>. Whether you&#8217;re looking to perform&nbsp;digital forensics, test&nbsp;network security, or simply familiarize yourself with the Linux environment, Kali Linux on Windows provides a versatile platform to start exploring.</p>



<p>With either installation method, you&#8217;ll have access to a robust&nbsp;Debian-based Linux distribution, widely regarded as one of the best options for&nbsp;cybersecurity&nbsp;and&nbsp;penetration testing. Now, it&#8217;s time to start using Kali Linux and dive into the world of&nbsp;ethical hacking&nbsp;and&nbsp;digital security&nbsp;right from your&nbsp;Windows machine!</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-install-kali-linux-on-windows/">How to Install Kali Linux on Windows 11 (2 Easy Ways)</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/how-to-install-kali-linux-on-windows/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Delete a Directory in Linux</title>
		<link>https://cyberillo.com/how-to-delete-a-directory-in-linux/</link>
					<comments>https://cyberillo.com/how-to-delete-a-directory-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Sat, 21 Sep 2024 12:52:57 +0000</pubDate>
				<category><![CDATA[More]]></category>
		<guid isPermaLink="false">https://cyberillo.com/?p=3261</guid>

					<description><![CDATA[<p>Learn how to delete directories in Linux using rm -rf and rmdir. Remove files and folders effortlessly, even non-empty ones!</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-delete-a-directory-in-linux/">How to Delete a Directory in Linux</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Learning how to&nbsp;delete a directory&nbsp;is one of the simplest, yet key tasks for any&nbsp;Linux user. Whether you want to remove empty&nbsp;directories, or clean up a&nbsp;folder&nbsp;that contains multiple&nbsp;files and subdirectories, there are specific&nbsp;commands you can use. This guide will walk you through how to&nbsp;effectively delete folders, and their contents using&nbsp;Linux command line&nbsp;tools like&nbsp;<code>rm</code>&nbsp;and&nbsp;<code>rmdir</code>.</p>





<h2 class="wp-block-heading" id="how-to-delete-an-empty-directory-in-linux">How to Delete an Empty Directory in Linux</h2>



<p>If you need <strong>to&nbsp;delete an empty directory</strong>, the&nbsp;<code>rmdir</code>&nbsp;command&nbsp;is your best option. This command is designed to&nbsp;remove a directory in Linux&nbsp;as long as it contains <strong>no files or subdirectories</strong>.</p>



<p>Here’s the&nbsp;command to <strong>remove&nbsp;an empty&nbsp;folder</strong>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">rmdir directory_name
</pre>



<p>For example, if you have a folder called&nbsp;<code>backup_folder</code>&nbsp;and it’s empty, you can delete it by running the&nbsp;following command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">rmdir backup_folder
</pre>



<h2 class="wp-block-heading" id="how-to-delete-a-non-empty-directory">How to Delete a Non-Empty Directory</h2>



<p>When a&nbsp;<strong>directory contains files</strong>&nbsp;or other subdirectories, you can’t use&nbsp;<code>rmdir</code>. Instead, the&nbsp;<code>rm</code>&nbsp;command&nbsp;with the&nbsp;<code>-r</code>&nbsp;or&nbsp;<code>-rf</code>&nbsp;flags will&nbsp;<strong>recursively</strong>&nbsp;delete a directory and its contents. The&nbsp;<code>-r</code>&nbsp;flag tells the system to&nbsp;<strong>recursively remove</strong>&nbsp;not only the directory but all the files and subdirectories within it.</p>



<p>The syntax to&nbsp;delete a directory&nbsp;and its contents is:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">rm -r directory_name
</pre>



<p>Let’s say you want to delete&nbsp;<code>backup_folder</code>&nbsp;and it contains files. The&nbsp;rm command&nbsp;with the&nbsp;<code>-r</code>&nbsp;flag will handle it:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">rm -r backup_folder
</pre>



<p>If you need to delete the folder without any prompts, add the&nbsp;<code>-f</code>&nbsp;flag, which forces the system to delete everything without asking for confirmation <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-red-color"><strong>even if the files in the directory are write-protected!</strong></mark></p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">rm -rf backup_folder
</pre>



<p>Using&nbsp;<code>rm -rf</code>&nbsp;allows users to&nbsp;delete&nbsp;directories and their contents in a&nbsp;Linux system. This is a powerful command, so always double-check to avoid&nbsp;deleting the wrong&nbsp;files, especially if you&#8217;re dealing with&nbsp;critical files. A&nbsp;case of accidental&nbsp;deletion is hard to reverse.</p>



<h2 class="wp-block-heading" id="removing-multiple-directories-in-linux-using-wildcards">Removing Multiple Directories in Linux Using Wildcards</h2>



<p>In&nbsp;Linux distributions, you can use wildcards to remove several directories at once. For instance, if you have multiple&nbsp;folders&nbsp;that begin with the same prefix, such as&nbsp;<code>backup_</code>, you can remove them all with this&nbsp;Linux command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">rm -r backup_*
</pre>



<p>This command will delete all directories and their contents that match the pattern. This is particularly useful if you want to clear out old&nbsp;backup directories&nbsp;or redundant folders.</p>



<h2 class="wp-block-heading" id="using-sudo-and-root-access">Using Sudo and Root Access</h2>



<p>In some cases, you may need&nbsp;<strong>root access</strong>&nbsp;to delete certain directories, especially if they are <strong>system directories</strong> or&nbsp;<strong>write-protected</strong>. To&nbsp;<strong>delete a directory</strong>&nbsp;with elevated permissions, you can use&nbsp;<code>sudo</code>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">sudo rm -rf /path/to/directory
</pre>



<p>Be cautious when using&nbsp;<code>sudo rm -rf</code>, as it can&nbsp;permanently remove&nbsp;directories and&nbsp;files&nbsp;without the chance of recovery.</p>



<h2 class="wp-block-heading" id="avoid-accidental-deletion">Avoid Accidental Deletion</h2>



<p>If you&#8217;re concerned about&nbsp;accidentally deleting&nbsp;important files, you can create an&nbsp;alias&nbsp;for the&nbsp;<code>rm</code>&nbsp;command that always prompts for confirmation. Add this to your&nbsp;<code>.bashrc</code>&nbsp;or&nbsp;<code>.bash_profile</code>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">alias rm='rm -i'</pre>



<p>This forces&nbsp;<code>rm</code>&nbsp;to ask for confirmation before&nbsp;deleting files or directories, adding an extra layer of safety.</p>



<h2 class="wp-block-heading" id="deleting-directories-in-a-graphical-environment-gui">Deleting Directories in a Graphical Environment (GUI)</h2>



<p>For those using a&nbsp;graphical&nbsp;interface, most&nbsp;Linux systems&nbsp;come with file managers that allow users to manage and&nbsp;delete directories&nbsp;with just a few clicks. Though the&nbsp;command line&nbsp;offers more control, the&nbsp;GUI&nbsp;is convenient for basic tasks like&nbsp;removing a folder&nbsp;or&nbsp;deleting a file in Linux.</p>



<p></p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-delete-a-directory-in-linux/">How to Delete a Directory in Linux</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/how-to-delete-a-directory-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Bulk Add Devices to Azure AD Group Using PowerShell</title>
		<link>https://cyberillo.com/how-to-add-devices-to-azure-ad-group-using-powershell/</link>
					<comments>https://cyberillo.com/how-to-add-devices-to-azure-ad-group-using-powershell/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Thu, 05 Sep 2024 14:22:00 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<guid isPermaLink="false">https://cyberillo.com/?p=3166</guid>

					<description><![CDATA[<p>Learn how to easily add devices to Azure AD security groups in bulk using this step-by-step PowerShell script.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-add-devices-to-azure-ad-group-using-powershell/">How to Bulk Add Devices to Azure AD Group Using PowerShell</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In this post, I&#8217;ll break down a PowerShell script that simplifies adding devices to a specific Azure AD security group by reading from a CSV file. This is particularly useful when onboarding new devices in bulk or organizing devices into groups based on department, location, or security requirements.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>





<h2 class="wp-block-heading">Complete Script</h2>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">## How to Bulk Add Devices to Azure AD Group Using PowerShell ##
#░█████╗░██╗░░░██╗██████╗░███████╗██████╗░██╗██╗░░░░░██╗░░░░░░█████╗░
#██╔══██╗╚██╗░██╔╝██╔══██╗██╔════╝██╔══██╗██║██║░░░░░██║░░░░░██╔══██╗
#██║░░╚═╝░╚████╔╝░██████╦╝█████╗░░██████╔╝██║██║░░░░░██║░░░░░██║░░██║
#██║░░██╗░░╚██╔╝░░██╔══██╗██╔══╝░░██╔══██╗██║██║░░░░░██║░░░░░██║░░██║
#╚█████╔╝░░░██║░░░██████╦╝███████╗██║░░██║██║███████╗███████╗╚█████╔╝
#░╚════╝░░░░╚═╝░░░╚═════╝░╚══════╝╚═╝░░╚═╝╚═╝╚══════╝╚══════╝░╚════╝░

# Import the AzureAD module
Import-Module AzureAD

# Login to Azure AD
Connect-AzureAD

# Path to your CSV file
$csvFilePath = "C:\path\to\your\devices.csv"

# Security Group Name
$securityGroupName = "Your-Security-Group-Name"

# Get the Security Group Object ID from the group name
$securityGroup = Get-AzureADGroup -SearchString $securityGroupName
if ($securityGroup -eq $null) {
    Write-Host "Security group not found: $securityGroupName"
    exit
}

$securityGroupId = $securityGroup.ObjectId

# Import the CSV file
$devices = Import-Csv -Path $csvFilePath

# Loop through each device in the CSV
foreach ($device in $devices) {
    $deviceName = $device.DeviceName

    # Get the Device Object ID from the device name
    $deviceObject = Get-AzureADDevice -SearchString $deviceName
    if ($deviceObject -eq $null) {
        Write-Host "Device not found: $deviceName"
        continue
    }

    $deviceId = $deviceObject.ObjectId

    try {
        # Add the device to the security group
        Add-AzureADGroupMember -ObjectId $securityGroupId -RefObjectId $deviceId
        Write-Host "Successfully added Device: $deviceName to the group."
    } catch {
        Write-Host "Failed to add Device: $deviceName. Error: $_"
    }
}

# Disconnect from Azure AD
Disconnect-AzureAD
</pre>



<h2 class="wp-block-heading">Overview of the Script</h2>



<p>So, what does the script do?</p>



<ol class="wp-block-list">
<li>Import devices from a CSV file.</li>



<li>Search for these devices in Azure AD.</li>



<li>Add the devices to a specified security group.</li>



<li>Report success or errors for each device.</li>
</ol>



<h2 class="wp-block-heading">Prerequisites</h2>



<p>Before running the script, ensure the following:</p>



<ul class="wp-block-list">
<li>You have the&nbsp;<strong>AzureAD</strong>&nbsp;PowerShell module installed.</li>



<li>The script is executed by a user with permissions to manage devices and groups in Azure AD.</li>



<li>A CSV file containing device names is available.</li>



<li>The correct security group already exists in Azure AD.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Step-by-Step Breakdown</h2>



<h3 class="wp-block-heading">1. Import the Azure AD Module</h3>



<p>The script starts by loading the&nbsp;<strong>AzureAD</strong>&nbsp;module, which contains cmdlets to manage Azure AD resources from PowerShell.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Import-Module AzureAD
</pre>



<p>This step is necessary for interacting with Azure AD using PowerShell. If you don’t have the module installed, run:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Install-Module AzureAD
</pre>



<h3 class="wp-block-heading">2. Authenticate with Azure AD</h3>



<p>Before performing any Azure AD operations, the script requires the user to authenticate:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Connect-AzureAD
</pre>



<p>This prompts the user to enter credentials or use existing session credentials to connect to Azure AD.</p>



<h3 class="wp-block-heading">3. Specify the CSV File Path and Security Group</h3>



<p>You&#8217;ll need a CSV file that lists the devices to be added. The CSV should contain a column titled&nbsp;<strong>DeviceName</strong>, which holds the names of the devices you want to add.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$csvFilePath = "C:\path\to\your\devices.csv"
$securityGroupName = "Your-Security-Group-Name"
</pre>



<p>Here,&nbsp;<code>$csvFilePath</code>&nbsp;points to the CSV file and&nbsp;<code>$securityGroupName</code>&nbsp;is the name of the Azure AD security group you want to add the devices to.</p>



<h3 class="wp-block-heading">4. Retrieve the Security Group Object ID</h3>



<p>Azure AD uses unique object IDs for each resource, including security groups. To add devices to a group, the script must first retrieve the Object ID of the target security group:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$securityGroup = Get-AzureADGroup -SearchString $securityGroupName
if ($securityGroup -eq $null) {
    Write-Host "Security group not found: $securityGroupName"
    exit
}
</pre>



<p>If the group isn’t found, the script exits with an appropriate message. Otherwise, the script proceeds to store the Object ID of the group in&nbsp;<code>$securityGroupId</code>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$securityGroupId = $securityGroup.ObjectId
</pre>



<h3 class="wp-block-heading">5. Import the CSV File</h3>



<p>The devices from the CSV file are imported into a variable&nbsp;<code>$devices</code>:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">$devices = Import-Csv -Path $csvFilePath
</pre>



<p>Each device is stored as a record, and the script processes each device by looping through the records.</p>



<h3 class="wp-block-heading">6. Loop through Devices and Add to Group</h3>



<p>For each device, the script:</p>



<ul class="wp-block-list">
<li>Retrieves the device’s Object ID from Azure AD using the&nbsp;<strong>DeviceName</strong>&nbsp;from the CSV.</li>



<li>Adds the device to the specified security group.</li>



<li>Logs the outcome for each device.</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">foreach ($device in $devices) {
    $deviceName = $device.DeviceName
    $deviceObject = Get-AzureADDevice -SearchString $deviceName
    if ($deviceObject -eq $null) {
        Write-Host "Device not found: $deviceName"
        continue
    }

    $deviceId = $deviceObject.ObjectId

    try {
        Add-AzureADGroupMember -ObjectId $securityGroupId -RefObjectId $deviceId
        Write-Host "Successfully added Device: $deviceName to the group."
    } catch {
        Write-Host "Failed to add Device: $deviceName. Error: $_"
    }
}
</pre>



<p>If the device isn’t found in Azure AD, a message is displayed, and the script moves on to the next device. If an error occurs during the addition process, it’s caught and logged.</p>



<h3 class="wp-block-heading">7. Disconnect from Azure AD</h3>



<p>After processing all the devices, the script disconnects from Azure AD:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">Disconnect-AzureAD
</pre>



<p>This closes the session and ensures no lingering connections remain.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-add-devices-to-azure-ad-group-using-powershell/">How to Bulk Add Devices to Azure AD Group Using PowerShell</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/how-to-add-devices-to-azure-ad-group-using-powershell/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Put WordPress Site in Maintenance Mode</title>
		<link>https://cyberillo.com/how-to-put-wordpress-site-in-maintenance-mode/</link>
					<comments>https://cyberillo.com/how-to-put-wordpress-site-in-maintenance-mode/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Thu, 05 Sep 2024 08:45:59 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://webbytips.com/?p=2978</guid>

					<description><![CDATA[<p>Learn how to easily put your WordPress site in maintenance mode with a plugin or simple code, ensuring your visitors never see an unfinished page!</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-put-wordpress-site-in-maintenance-mode/">How to Put WordPress Site in Maintenance Mode</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Imagine you’re in the middle of an update on your WordPress site, and you realize it’s time to put the brakes on public access for a bit. You want to make sure that visitors aren’t greeted with a mess of half-finished pages or broken links. This is where WordPress maintenance mode comes in, giving you the ability to work behind the scenes while keeping everything looking tidy for your audience.</p>





<h2 class="wp-block-heading" id="1-the-plugin-route-swift-and-simple">1. The Plugin Route: Swift and Simple</h2>



<p>For most people, the easiest way to put your site into maintenance mode is by using a plugin. Think of it as flipping a switch—no code, no fuss. If you’re looking for a quick fix, plugins like&nbsp;<strong><a href="https://wordpress.org/plugins/maintenance/" target="_blank" rel="noopener">Maintenance (by WebFactory Ltd)</a> </strong>are an excellent choice.</p>



<p>Here’s how to do it.</p>



<ol class="wp-block-list">
<li><strong>Install and Activate the Plugin</strong>: Head over to your WordPress dashboard, navigate to&nbsp;<strong>Plugins&nbsp;&gt;&nbsp;Add New Plugin</strong> and type <em>&#8220;maintenance&#8221;</em> in the search bar. Find the <strong>Maintenance</strong> plugin and click on <strong>Install Now</strong>. Activate the plugin, and you&#8217;re good to go. Easy as pie. Note that <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-red-color"><strong>Maintenance mode is automatically turned on after you activate the plugin</strong></mark>.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="458" src="https://cyberillo.com/wp-content/uploads/Install-the-Maintenance-Plugin-1024x458.png" alt="Install the Maintenance Plugin" class="wp-image-3152" srcset="https://cyberillo.com/wp-content/uploads/Install-the-Maintenance-Plugin-1024x458.png 1024w, https://cyberillo.com/wp-content/uploads/Install-the-Maintenance-Plugin-300x134.png 300w, https://cyberillo.com/wp-content/uploads/Install-the-Maintenance-Plugin-768x344.png 768w, https://cyberillo.com/wp-content/uploads/Install-the-Maintenance-Plugin-1536x688.png 1536w, https://cyberillo.com/wp-content/uploads/Install-the-Maintenance-Plugin.png 1894w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="2" class="wp-block-list">
<li><strong>Customize Your Maintenance Mode Page</strong>: After activation, it’s time to design the maintenance mode page. Whether you want a simple “We’ll be back soon” message or a full-blown custom maintenance mode page with social links, this plugin&#8217;s got you covered. Note that the free version of the plugin only offers limited customization options. The PRO version offers beautiful ready-made themes for a more professional look.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="481" src="https://cyberillo.com/wp-content/uploads/Maintenance-Plugin-Standard-Options-1024x481.png" alt="Customize the maintenance mode page" class="wp-image-3153" srcset="https://cyberillo.com/wp-content/uploads/Maintenance-Plugin-Standard-Options-1024x481.png 1024w, https://cyberillo.com/wp-content/uploads/Maintenance-Plugin-Standard-Options-300x141.png 300w, https://cyberillo.com/wp-content/uploads/Maintenance-Plugin-Standard-Options-768x361.png 768w, https://cyberillo.com/wp-content/uploads/Maintenance-Plugin-Standard-Options-1536x721.png 1536w, https://cyberillo.com/wp-content/uploads/Maintenance-Plugin-Standard-Options.png 1872w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="3" class="wp-block-list">
<li><strong>Activate Maintenance Mode</strong>: This plugin comes with a straightforward toggle. Turn it on, and your WordPress site is officially in maintenance mode. Visitors will now see your customized page, rather than your unfinished website.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="360" src="https://cyberillo.com/wp-content/uploads/Enable-Maintenance-Mode-1024x360.png" alt="Enable Maintenance Mode" class="wp-image-3154" srcset="https://cyberillo.com/wp-content/uploads/Enable-Maintenance-Mode-1024x360.png 1024w, https://cyberillo.com/wp-content/uploads/Enable-Maintenance-Mode-300x105.png 300w, https://cyberillo.com/wp-content/uploads/Enable-Maintenance-Mode-768x270.png 768w, https://cyberillo.com/wp-content/uploads/Enable-Maintenance-Mode-1536x540.png 1536w, https://cyberillo.com/wp-content/uploads/Enable-Maintenance-Mode.png 1731w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Here&#8217;s an example of how a customized Maintenance Mode page designed with this plugin looks like.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="545" src="https://cyberillo.com/wp-content/uploads/Example-Maintenance-Mode-Page-1024x545.png" alt="Example Maintenance Mode Page" class="wp-image-3155" srcset="https://cyberillo.com/wp-content/uploads/Example-Maintenance-Mode-Page-1024x545.png 1024w, https://cyberillo.com/wp-content/uploads/Example-Maintenance-Mode-Page-300x160.png 300w, https://cyberillo.com/wp-content/uploads/Example-Maintenance-Mode-Page-768x409.png 768w, https://cyberillo.com/wp-content/uploads/Example-Maintenance-Mode-Page-1536x818.png 1536w, https://cyberillo.com/wp-content/uploads/Example-Maintenance-Mode-Page.png 1697w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading" id="the-hands-on-approach-diy-maintenance-mode">2. <strong>The Hands-On Approach: DIY Maintenance Mode</strong></h2>



<p>If you’re feeling a bit more daring or prefer not to rely on plugins, you can manually put your WordPress website in maintenance mode. This involves adding a code snippet to your theme’s&nbsp;<code>functions.php</code>&nbsp;file. It’s a little more technical, but it gives you greater control.</p>



<p>Follow these steps to try it yourself.</p>



<ol class="wp-block-list">
<li><strong>Access Your Theme Files</strong>: Go to&nbsp;<strong>Appearance&nbsp;&gt;&nbsp;Theme File Editor</strong>.</li>



<li>If this is your first time editing theme files, you will get a popup warning you that you are directly editing theme files, which could break your site (if you do something wrong). Click on <strong>I understand</strong>. <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-red-color"><strong>I recommend creating a child theme from your active theme, setting it as the active theme, and modifying it instead of directly modifying the parent theme files</strong></mark>.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="673" height="441" src="https://cyberillo.com/wp-content/uploads/Theme-File-Editor-Warning.png" alt="Theme file editor warning" class="wp-image-3159" srcset="https://cyberillo.com/wp-content/uploads/Theme-File-Editor-Warning.png 673w, https://cyberillo.com/wp-content/uploads/Theme-File-Editor-Warning-300x197.png 300w" sizes="auto, (max-width: 673px) 100vw, 673px" /></figure>
</div>


<ol start="3" class="wp-block-list">
<li>Open the&nbsp;<code>functions.php</code>&nbsp;file of your active theme. </li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="400" src="https://cyberillo.com/wp-content/uploads/Edit-functions.php-file-of-your-active-theme-1024x400.png" alt="Edit functions.php file of your active theme" class="wp-image-3158" srcset="https://cyberillo.com/wp-content/uploads/Edit-functions.php-file-of-your-active-theme-1024x400.png 1024w, https://cyberillo.com/wp-content/uploads/Edit-functions.php-file-of-your-active-theme-300x117.png 300w, https://cyberillo.com/wp-content/uploads/Edit-functions.php-file-of-your-active-theme-768x300.png 768w, https://cyberillo.com/wp-content/uploads/Edit-functions.php-file-of-your-active-theme-1536x600.png 1536w, https://cyberillo.com/wp-content/uploads/Edit-functions.php-file-of-your-active-theme.png 1892w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="4" class="wp-block-list">
<li><strong>Add the Maintenance Mode Code</strong>: Insert the following code at the end of your&nbsp;<code>functions.php</code>&nbsp;file:</li>
</ol>



<pre class="EnlighterJSRAW" data-enlighter-language="php" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">function wp_maintenance_mode() {
  if (!current_user_can("edit_themes") || !is_user_logged_in()) {
    wp_die(
      "&lt;h1>Under Maintenance&lt;/h1>&lt;p>Our site is currently undergoing maintenance. Please check back soon!&lt;/p>",
    );
  }
}
add_action("get_header", "wp_maintenance_mode");
</pre>



<ol start="5" class="wp-block-list">
<li><strong>Save Your Changes</strong>: Once the code is in place, save the file by clicking on the <strong>Update File</strong> button. Your site is now in maintenance mode, displaying a simple “Under Maintenance” message to visitors. Only you and other admins can bypass this and access the site normally.</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="991" height="324" src="https://cyberillo.com/wp-content/uploads/Simple-Under-Maintenance-Message.png" alt="" class="wp-image-3157" srcset="https://cyberillo.com/wp-content/uploads/Simple-Under-Maintenance-Message.png 991w, https://cyberillo.com/wp-content/uploads/Simple-Under-Maintenance-Message-300x98.png 300w, https://cyberillo.com/wp-content/uploads/Simple-Under-Maintenance-Message-768x251.png 768w" sizes="auto, (max-width: 991px) 100vw, 991px" /></figure>



<p>6. Delete the code or comment it out to take the site out of maintenance mode.</p>



<h2 class="wp-block-heading" id="built-in-maintenance-mode-the-maintenance-file-method">3. <strong>Built-In Maintenance Mode: The .maintenance File Method</strong></h2>



<p>There’s another way to put your WordPress site into maintenance mode, and it’s one that’s built right into WordPress itself. This method involves creating a&nbsp;<code>.maintenance</code>&nbsp;file in your site’s root directory. It’s a more minimalist approach but gets the job done without any extra plugins.</p>



<p>Here’s how:</p>



<ol class="wp-block-list">
<li><strong>Create the .maintenance File</strong>: Using an FTP client or the File Manager app in cPanel, create a&nbsp;<code>.maintenance</code>&nbsp;file in the root directory of your WordPress installation.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="713" src="https://cyberillo.com/wp-content/uploads/Create-.maintenance-file-using-the-file-manager-in-cPanel-1024x713.png" alt="Create .maintenance file using the file manager in cPanel" class="wp-image-3161" srcset="https://cyberillo.com/wp-content/uploads/Create-.maintenance-file-using-the-file-manager-in-cPanel-1024x713.png 1024w, https://cyberillo.com/wp-content/uploads/Create-.maintenance-file-using-the-file-manager-in-cPanel-300x209.png 300w, https://cyberillo.com/wp-content/uploads/Create-.maintenance-file-using-the-file-manager-in-cPanel-768x534.png 768w, https://cyberillo.com/wp-content/uploads/Create-.maintenance-file-using-the-file-manager-in-cPanel.png 1141w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="2" class="wp-block-list">
<li><strong>Add a Simple Script</strong>: Open the file and add the following code: <code>&lt;?php $upgrading = time();</code>. This will put your site in maintenance and the below message will be shown to visitors.</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="936" height="213" src="https://cyberillo.com/wp-content/uploads/Default-WordPress-Maintenance-Mode-Message.png" alt="Default WordPress Maintenance Mode Message" class="wp-image-3162" srcset="https://cyberillo.com/wp-content/uploads/Default-WordPress-Maintenance-Mode-Message.png 936w, https://cyberillo.com/wp-content/uploads/Default-WordPress-Maintenance-Mode-Message-300x68.png 300w, https://cyberillo.com/wp-content/uploads/Default-WordPress-Maintenance-Mode-Message-768x175.png 768w" sizes="auto, (max-width: 936px) 100vw, 936px" /></figure>



<ol start="3" class="wp-block-list">
<li><strong>Remove the File When Done</strong>: Once you’ve completed your updates, simply delete the&nbsp;<code>.maintenance</code>&nbsp;file to bring your site back online.</li>
</ol>



<h2 class="wp-block-heading" id="dealing-with-the-dreaded-stuck-in-maintenance-mode-issue"><strong>Dealing with the Dreaded “Stuck in Maintenance Mode” Issue</strong></h2>



<p>It happens. Sometimes your site can get stuck in maintenance mode, usually because an update didn’t finish properly. If your WordPress website is stuck in maintenance mode, don’t panic. Just delete the&nbsp;<code>.maintenance</code>&nbsp;file from your site’s root directory, and everything should return to normal. I cover this topic in more detail <a href="https://cyberillo.com/how-to-fix-wordpress-maintenance-mode/" data-type="post" data-id="2807">here</a>.</p>



<h2 class="wp-block-heading" id="wrapping-up-bring-your-site-back-online"><strong>Wrapping Up: Bring Your Site Back Online</strong></h2>



<p>When you’re done with updates, and your site is ready for visitors again, you’ll need to disable maintenance mode. For those using a plugin, simply toggle it off in the plugin settings. If you used a code snippet, remove it from&nbsp;<code>functions.php</code>, or if you opted for the&nbsp;<code>.maintenance</code>&nbsp;file method, just delete the file.</p>



<p>Your WordPress site should be back to its regular self, and your visitors none the wiser about the work that went on behind the scenes.</p>



<p>Maintenance mode is a simple yet powerful tool to keep your WordPress website looking sharp, even when you’re busy with updates and changes. Whether you go the plugin route or prefer a more hands-on approach, putting your site in maintenance mode ensures your visitors only see the best version of your site.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/how-to-put-wordpress-site-in-maintenance-mode/">How to Put WordPress Site in Maintenance Mode</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/how-to-put-wordpress-site-in-maintenance-mode/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ZIP Password Recovery: How to Crack ZIP Password in 2024</title>
		<link>https://cyberillo.com/zip-password-recovery/</link>
					<comments>https://cyberillo.com/zip-password-recovery/#respond</comments>
		
		<dc:creator><![CDATA[Sylvan Abela]]></dc:creator>
		<pubDate>Sun, 18 Aug 2024 09:23:29 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://webbytips.com/?p=2933</guid>

					<description><![CDATA[<p>Lost your zip file password? Learn how to unlock protected archives instantly with the best ZIP password recovery tool - ZipRipper.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/zip-password-recovery/">ZIP Password Recovery: How to Crack ZIP Password in 2024</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="ZIP Password Recovery: How to Crack ZIP Password in 2024" width="1220" height="686" src="https://www.youtube.com/embed/IId3oPLjMTw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div></figure>



<p>You forgot, didn&#8217;t you? That <a href="https://cyberillo.com/how-to-password-protect-a-zip-file/" data-type="post" data-id="2935">password you set on your zipped folder</a> with all your precious files. Wishing you didn&#8217;t set it in the first place?</p>



<p>When you encounter a locked zip file, it can be frustrating. Whether you’ve forgotten the password or inherited a protected zip archive, recovering access is essential. Fortunately, there are various methods and tools available for zip password recovery that can help you regain access to your files.</p>





<h2 class="wp-block-heading" id="how-to-crack-a-zip-file-password">How to crack a zip file password?</h2>



<p>You&#8217;re in luck, <a href="https://github.com/openwall/john" target="_blank" rel="noopener">John the Ripper</a> has a tool made just for this purpose.</p>



<ol class="wp-block-list">
<li>Download the <a href="https://github.com/illsk1lls/ZipRipper" target="_blank" rel="noopener">ZipRipper</a> tool from GitHub by clicking on <strong>Code</strong> and then <strong>Download ZIP.</strong></li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="463" src="https://cyberillo.com/wp-content/uploads/Download-the-ZipRipper-tool-from-GitHub-1024x463.png" alt="Download the ZipRipper tool from GitHub" class="wp-image-2962" srcset="https://cyberillo.com/wp-content/uploads/Download-the-ZipRipper-tool-from-GitHub-1024x463.png 1024w, https://cyberillo.com/wp-content/uploads/Download-the-ZipRipper-tool-from-GitHub-300x136.png 300w, https://cyberillo.com/wp-content/uploads/Download-the-ZipRipper-tool-from-GitHub-768x347.png 768w, https://cyberillo.com/wp-content/uploads/Download-the-ZipRipper-tool-from-GitHub-1536x694.png 1536w, https://cyberillo.com/wp-content/uploads/Download-the-ZipRipper-tool-from-GitHub-600x271.png 600w, https://cyberillo.com/wp-content/uploads/Download-the-ZipRipper-tool-from-GitHub.png 1832w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="2" class="wp-block-list">
<li>Extract the downloaded ZIP file.</li>



<li>Launch the password cracker by double-clicking on <strong>ZipRipper.cmd</strong> from the extracted archive.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="309" src="https://cyberillo.com/wp-content/uploads/Double-Click-on-ZipRipper.cmd_-1024x309.png" alt="Double Click on ZipRipper.cmd" class="wp-image-2961" srcset="https://cyberillo.com/wp-content/uploads/Double-Click-on-ZipRipper.cmd_-1024x309.png 1024w, https://cyberillo.com/wp-content/uploads/Double-Click-on-ZipRipper.cmd_-300x91.png 300w, https://cyberillo.com/wp-content/uploads/Double-Click-on-ZipRipper.cmd_-768x232.png 768w, https://cyberillo.com/wp-content/uploads/Double-Click-on-ZipRipper.cmd_-600x181.png 600w, https://cyberillo.com/wp-content/uploads/Double-Click-on-ZipRipper.cmd_.png 1143w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="4" class="wp-block-list">
<li><strong>Microsoft Defender SmartScreen</strong> might block the program. When, prompted that <em>Windows Protected your PC</em>, click on <strong>More info</strong> and then, <strong>Run anyway</strong>.</li>
</ol>



<div style="border-radius: 15px; background-color: #A1D6B2; color: #000;padding: 15px; margin-bottom: 30px">
<h3 style="color: #000">Is ZipRipper Safe?</h3>
<p>Yes, ZipRipper is safe. It is&nbsp;an open-source tool used for recovering lost passwords from ZIP, RAR, 7z, and PDF files. It relies on JohnTheRipper, a well-known password-cracking utility, to attempt password recovery.</p>
<p>Make sure to download it directly from the GitHub link in step 1. The safety of other download links cannot be guaranteed.</p>
</div>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="485" src="https://cyberillo.com/wp-content/uploads/Run-anyway-in-Microsoft-Defender-SmartScreen-1024x485.png" alt="Run anyway in Microsoft Defender SmartScreen" class="wp-image-2964" srcset="https://cyberillo.com/wp-content/uploads/Run-anyway-in-Microsoft-Defender-SmartScreen-1024x485.png 1024w, https://cyberillo.com/wp-content/uploads/Run-anyway-in-Microsoft-Defender-SmartScreen-300x142.png 300w, https://cyberillo.com/wp-content/uploads/Run-anyway-in-Microsoft-Defender-SmartScreen-768x364.png 768w, https://cyberillo.com/wp-content/uploads/Run-anyway-in-Microsoft-Defender-SmartScreen-600x284.png 600w, https://cyberillo.com/wp-content/uploads/Run-anyway-in-Microsoft-Defender-SmartScreen.png 1335w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="5" class="wp-block-list">
<li>Click on <strong>Start</strong> once the ZipRipper GUI pops up.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="684" height="486" src="https://cyberillo.com/wp-content/uploads/Click-Start-on-the-ZipRipper-GUI.png" alt="Click Start on the ZipRipper GUI" class="wp-image-2960" srcset="https://cyberillo.com/wp-content/uploads/Click-Start-on-the-ZipRipper-GUI.png 684w, https://cyberillo.com/wp-content/uploads/Click-Start-on-the-ZipRipper-GUI-300x213.png 300w, https://cyberillo.com/wp-content/uploads/Click-Start-on-the-ZipRipper-GUI-600x426.png 600w" sizes="auto, (max-width: 684px) 100vw, 684px" /></figure>
</div>


<ol start="6" class="wp-block-list">
<li>Select the password protected ZIP file you would like to decrypt, and click on <strong>Open</strong>.</li>
</ol>



<figure class="wp-block-image size-full border"><img loading="lazy" decoding="async" width="936" height="586" src="https://cyberillo.com/wp-content/uploads/Select-protected-zip-file.png" alt="Select protected zip file" class="wp-image-2966" srcset="https://cyberillo.com/wp-content/uploads/Select-protected-zip-file.png 936w, https://cyberillo.com/wp-content/uploads/Select-protected-zip-file-300x188.png 300w, https://cyberillo.com/wp-content/uploads/Select-protected-zip-file-768x481.png 768w, https://cyberillo.com/wp-content/uploads/Select-protected-zip-file-600x376.png 600w" sizes="auto, (max-width: 936px) 100vw, 936px" /></figure>



<ol start="7" class="wp-block-list">
<li>The password cracker will get to work &#8211; make sure you have an active Internet connection if using it in online mode.</li>



<li>When asked whether or not to split the word list, select <strong>No</strong>.</li>
</ol>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="532" height="313" src="https://cyberillo.com/wp-content/uploads/Select-No-to-split-the-wordlist.png" alt="Select No to split the wordlist" class="wp-image-2965" srcset="https://cyberillo.com/wp-content/uploads/Select-No-to-split-the-wordlist.png 532w, https://cyberillo.com/wp-content/uploads/Select-No-to-split-the-wordlist-300x177.png 300w" sizes="auto, (max-width: 532px) 100vw, 532px" /></figure>
</div>


<ol start="9" class="wp-block-list">
<li>Simple passwords will be cracked in a matter of seconds, whereas more complex passwords may take minutes, days, weeks &#8230; You get it.</li>



<li>Once the password is successfully cracked, you get a popup showing the cracked password/s. A file with the cracked passwords is also saved to the desktop.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="597" src="https://cyberillo.com/wp-content/uploads/Pop-up-showing-the-cracked-passwords-1024x597.png" alt="Pop-up showing the cracked passwords" class="wp-image-2963" srcset="https://cyberillo.com/wp-content/uploads/Pop-up-showing-the-cracked-passwords-1024x597.png 1024w, https://cyberillo.com/wp-content/uploads/Pop-up-showing-the-cracked-passwords-300x175.png 300w, https://cyberillo.com/wp-content/uploads/Pop-up-showing-the-cracked-passwords-768x448.png 768w, https://cyberillo.com/wp-content/uploads/Pop-up-showing-the-cracked-passwords-600x350.png 600w, https://cyberillo.com/wp-content/uploads/Pop-up-showing-the-cracked-passwords.png 1114w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<ol start="11" class="wp-block-list">
<li>Congratulations, you can now open your password protected ZIP file.</li>
</ol>



<figure class="wp-block-image size-large border"><img loading="lazy" decoding="async" width="1024" height="576" src="https://cyberillo.com/wp-content/uploads/Zip-file-password-CRACKED-1024x576.png" alt="" class="wp-image-2968" srcset="https://cyberillo.com/wp-content/uploads/Zip-file-password-CRACKED-1024x576.png 1024w, https://cyberillo.com/wp-content/uploads/Zip-file-password-CRACKED-300x169.png 300w, https://cyberillo.com/wp-content/uploads/Zip-file-password-CRACKED-768x432.png 768w, https://cyberillo.com/wp-content/uploads/Zip-file-password-CRACKED-1536x864.png 1536w, https://cyberillo.com/wp-content/uploads/Zip-file-password-CRACKED-390x220.png 390w, https://cyberillo.com/wp-content/uploads/Zip-file-password-CRACKED-600x338.png 600w, https://cyberillo.com/wp-content/uploads/Zip-file-password-CRACKED.png 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading" id="what-is-a-zip-file-and-why-protect-it">What is a Zip File and Why Protect It?</h2>



<p>A zip file is a compressed archive that can contain one or more files or folders. These archives are often password protected to ensure that sensitive data remains secure. Password protection uses encryption to prevent unauthorized access, making it crucial to remember or securely store the password. If you lose the password, you’ll need to recover it to access the files within.</p>



<h2 class="wp-block-heading" id="understanding-zip-password-recovery">Understanding Zip Password Recovery</h2>



<p>Zip password recovery involves retrieving the lost or forgotten password to unlock an encrypted zip file. This process can be done using specialized software known as a password recovery tool. These tools employ various techniques, such as brute force, dictionary attacks, and mask attacks, to find the password.</p>



<h2 class="wp-block-heading" id="popular-methods-for-zip-password-recovery">Popular Methods for Zip Password Recovery</h2>



<ol class="wp-block-list">
<li><strong>Brute Force Attack</strong>: This method systematically tries every possible combination of characters until the correct password is found. While it can be effective, it may take a long time, depending on the password length and complexity.</li>



<li><strong>Dictionary Attack</strong>: This technique uses a pre-defined list of potential passwords. The tool runs through the list and checks each one until the right password is found. This method is faster than brute force but relies on the password being within the dictionary.</li>



<li><strong>Mask Attack</strong>: If you remember part of the password or have an idea of its structure, a mask attack can be useful. You can set parameters like password length, character set, or specific characters to narrow down the search, making the recovery process quicker.</li>
</ol>



<h2 class="wp-block-heading" id="alternative-tools-for-recovering-zip-passwords">Alternative Tools for Recovering Zip Passwords</h2>



<p>ZipRipper aside, there are several other apps and tools available that can assist with zip password recovery:</p>



<ul class="wp-block-list">
<li><strong><a href="https://www.winzip.com/" target="_blank" rel="noopener">WinZip</a></strong>: A popular archiver that offers built-in tools for password recovery and decryption. While it’s a paid app, you can find free downloads of its demo version, which might include limited password recovery functionality.</li>



<li><strong><a href="https://download.cnet.com/zip-password-unlocker/3000-2094_4-10967931.html" target="_blank" rel="noopener">Zip Password Unlocker</a></strong>: This tool is designed specifically for recovering passwords from encrypted zip archives. It supports various versions of popular archivers and offers an easy-to-use interface.</li>



<li><strong><a href="https://www.passware.com/rar/" target="_blank" rel="noopener">RAR Password Recovery Tool</a></strong>: Though primarily for RAR files, this tool also supports zip file recovery. It uses advanced algorithms to find the password efficiently.</li>
</ul>



<h2 class="wp-block-heading" id="how-to-use-a-zip-password-recovery-tool">How to Use a Zip Password Recovery Tool</h2>



<ol class="wp-block-list">
<li><strong>Download and Install</strong>: Choose a zip password recovery tool that suits your needs and download the latest version. Install it on your Windows computer.</li>



<li><strong>Upload Your File</strong>: Open the tool and upload your encrypted zip file. Most tools will allow you to drag and drop the file directly into the interface.</li>



<li><strong>Set Parameters</strong>: If using a mask attack, set your parameters such as the password length or character set. For dictionary attacks, upload your dictionary file.</li>



<li><strong>Start the Recovery Process</strong>: Initiate the password recovery. The tool will begin searching for the correct password. The time taken will depend on the chosen method and the password’s complexity.</li>



<li><strong>Recover and Copy the Password</strong>: Once the tool finds the password, it will display it on the screen. Copy the password and use it to unlock your protected zip file.</li>
</ol>



<h2 class="wp-block-heading" id="legal-considerations">Legal Considerations</h2>



<p>It’s important to affirm that using zip password recovery tools should only be done when you have the legal right to access the data. Recovering passwords for files obtained without authorization or through other illegal means may constitute theft and can lead to criminal prosecution. Always ensure you are the rightful owner of all files or have explicit permission from the owner to perform these operations.</p>



<h2 class="wp-block-heading" id="conclusion">Conclusion</h2>



<p>Zip password recovery is a necessary skill when dealing with protected archives, especially if you’ve lost access to sensitive files. With the right tool and approach, you can recover your password and regain access to your data. Remember to use these tools responsibly and within the bounds of the law to avoid any legal repercussions.</p>
<p>The post <a rel="nofollow" href="https://cyberillo.com/zip-password-recovery/">ZIP Password Recovery: How to Crack ZIP Password in 2024</a> appeared first on <a rel="nofollow" href="https://cyberillo.com">Cyberillo</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cyberillo.com/zip-password-recovery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
