# Gelişmiş HIZLI RDP Başarılı ve Başarısız Giriş Analiz Betiği (Son 30 Gün) Clear-Host Write-Host "==========================================================" -ForegroundColor Cyan Write-Host " TAM RDP GUVENLIK VE GIRIS ANALIZI (SON 30 GUN) " -ForegroundColor Cyan Write-Host "==========================================================" -ForegroundColor Cyan Write-Host "Son 30 gunluk veriler filtreleniyor, lutfen bekleyin...`n" -ForegroundColor Yellow # Son 30 gunu hesaplama filtresi $ZamanFiltresi = (Get-Date).AddDays(-30) # 1. BASARILI GIRISLERIN TOPLANMASI (HIZLANDIRILMIS) $basarili = Get-WinEvent -FilterHashtable @{ LogName = "Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational" Id = 1149 StartTime = $ZamanFiltresi } -ErrorAction SilentlyContinue | ForEach-Object { [PSCustomObject]@{ "Tarih_Saat" = $_.TimeCreated "Kullanici" = $_.Properties[0].Value "Giris_IP" = $_.Properties[2].Value } } # 2. BASARISIZ GIRIS DENEMELERININ TOPLANMASI (HIZLANDIRILMIS) $basarisiz = Get-WinEvent -FilterHashtable @{ LogName = "Security" Id = 4625 StartTime = $ZamanFiltresi } -ErrorAction SilentlyContinue | Where-Object {($_.Properties[10].Value -eq 10 -or $_.Properties[10].Value -eq 3)} | ForEach-Object { [PSCustomObject]@{ "Tarih_Saat" = $_.TimeCreated "Denenen_Isim" = $_.Properties[5].Value "Saldirgan_IP" = $_.Properties[19].Value } } # --- RAPORLAMA BOLUMU --- # Basarili Girisleri Yazdir Write-Host "----------------------------------------------------------" -ForegroundColor Green Write-Host " [+] SUNUCUYA BASARIYLA GIREN KISILER (Son 30 Gun)" -ForegroundColor Green Write-Host "----------------------------------------------------------" -ForegroundColor Green if ($basarili) { $basarili | Format-Table -AutoSize } else { Write-Host "Son 30 gunde basarili RDP giris kaydi bulunamadi.`n" -ForegroundColor Gray } # Basarisiz Girisleri Yazdir Write-Host "----------------------------------------------------------" -ForegroundColor Red Write-Host " [-] BASARISIZ / SUPHELI RDP GIRIS DENEMELERI (Son 30 Gun)" -ForegroundColor Red Write-Host "----------------------------------------------------------" -ForegroundColor Red if ($basarisiz) { Write-Host "DIKKAT: Sunucunuza sifre denemesi yapan IP adresleri asagidadir!`n" -ForegroundColor Yellow $basarisiz | Format-Table -AutoSize } else { Write-Host "Temiz! Son 30 gunde supheli veya basarisiz bir giris denemesi bulunamadi.`n" -ForegroundColor Green } Write-Host "==========================================================" -ForegroundColor Cyan Read-Host -Prompt "Analiz bitti. Cikmak icin ENTER tusuna basin"