"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

Aktuelle Sicherheitslücken

Hansmaulwurf 20.04.2014 - 11:17 178733 715 Thread rating
Posts

Dreamforcer

New world Order
Avatar
Registered: Nov 2002
Location: Tirol
Posts: 8913

aua, gsd wir haben nur 2 stück von denen mal verkauft.

mr.nice.

endlich fertig
Avatar
Registered: Jun 2004
Location: Wien
Posts: 6301
Danke, jemand aus der Bekanntschaft wurde gewarnt und gebeten das Gerät bis auf weiteres vom Internet zu trennen.

Smut

takeover & ether
Avatar
Registered: Feb 2003
Location: VIE
Posts: 16632
Hat hier schon jemand Details rausgelesen?
Ich hoffe das Problem tritt nur ein wenn man Service Ports aus dem Internet erreichbar gemacht hat oder ist ihnen zb. eine Domäne abhanden gekommen?

COLOSSUS

Administrator
Frickler
Avatar
Registered: Dec 2000
Location: ~
Posts: 11901
Das Problem ist iirc eine pre-auth RCE ueber einen Bug in einem CGI-Programm in der Firmware. Ich schaetze mal, dass sich das My Book mittels UPnP darum kuemmern kann, dass es via Internet direkt am Webserver-Port erreichbar ist, was dann bei so einer Luecke zum Jackpot fuehrt. Aber das ist nur Sepkulation, recherchiert habe ich es nicht.

Smut

takeover & ether
Avatar
Registered: Feb 2003
Location: VIE
Posts: 16632
UPNP wär eine Erklärung, ja.

Elbart

Here to stay
Registered: Dec 2002
Location: Hobbingen
Posts: 844
Zitat
The vulnerability is remarkable because it made it trivial to wipe what is likely petabytes of user data. More notable still was that, according to the vulnerable code itself, a Western Digital developer actively removed code that required a valid user password before allowing factory resets to proceed.
https://arstechnica.com/gadgets/202...k-live-devices/
Jabistudeppert.

Smut

takeover & ether
Avatar
Registered: Feb 2003
Location: VIE
Posts: 16632

Ja, Vorbereitung auf stuxnet2.
Microsoft schweigt. Schwierige situation. Deaktivieren wo möglich :)

Viper780

Moderator
Er ist tot, Jim!
Avatar
Registered: Mar 2001
Location: Wien
Posts: 48898
Danke für - mal wieder was mit gewaltig Reichweite.
Das da MS schweigt ist schon a Frechheit für sich

DAO

Si vis pacem, para bellum
Avatar
Registered: Mar 2001
Location: Austria
Posts: 4909
Falls jemand ein PS Script zum checken und fixen aller Memberserver im AD ohne händisch eine Liste zu erstellen benötigt:

Ich habe das Original Script von hier
Der Author des original Scripts ist: Grzegorz Tworek

Es wurde von mir nur um eine Zeile geändert um alle aktiven Server im AD zu fixen ohne händisch oder via externen File sich abzumühen.

Code:
 
# get all active server names from AD
$computers = Get-ADComputer -Filter 'Operatingsystem -like "*server*" -and enabled -eq "true"' -Properties Name | Select  -ExpandProperty Name

foreach ($computer in $computers)
{
    Write-Host "Processing $computer ..." 
    $service = Get-Service -ComputerName $computer -Name Spooler -ErrorAction SilentlyContinue
    if (!$service)
    {
        Write-Host "Cannot connect to Spooler Service on $computer. Skipping." -ForegroundColor Yellow
        continue
    }
    if ($service.Status -ne "Running")
    {
        Write-Host ("Service status is: """ + $service.Status + """. Skipping.") -ForegroundColor Yellow
        continue
    }
    $printers = (Get-WmiObject -class Win32_printer -ComputerName $computer)
    if (!$printers)
    {
        Write-Host "Cannot enumerate printers. Skipping." -ForegroundColor Yellow
        continue
    }

    $disableSpooler = $true
    foreach ($DriverName in ($printers.DriverName))
    {
        if (($DriverName -notmatch 'Microsoft XPS Document Writer') -and ($DriverName -notmatch 'Microsoft Print To PDF'))
        {
            Write-Host "  Printer found: $DriverName" -ForegroundColor Green
            $disableSpooler = $false
        }
    }
    if ($disableSpooler)
    {
        Write-Host "Only default printers found. Stopping and disabling spooler..." -ForegroundColor DarkCyan
        (Get-Service -ComputerName $computer -Name Spooler) | Stop-Service -Verbose
        Set-Service -ComputerName $computer -Name Spooler -StartupType Disabled -Verbose

    }
    else
    {
        Write-Host "Non-default printers found. Skipping." -ForegroundColor Green
    }
}
Bearbeitet von DAO am 30.06.2021, 21:50

Smut

takeover & ether
Avatar
Registered: Feb 2003
Location: VIE
Posts: 16632
Zitat aus einem Post von Viper780
Danke für - mal wieder was mit gewaltig Reichweite.
Das da MS schweigt ist schon a Frechheit für sich

Das Problem ist sie dachten dass sie’s gefixt haben mit Juni Patchday. Ev. gibt es schon eine Meldung. Heute Nachmittag jedenfalls nicht. Videos sind ca. 23h im Netz.

userohnenamen

leider kein name
Avatar
Registered: Feb 2004
Location: -
Posts: 15844
@dao: danke noch für die info
ich habs etwas angepasst damit es ansonsten auch zur auflistung genutzt werden kann und schneller durchläuft (durch schwenk auf Get-Printer statt der wmi methode)

Code:
# get all active server names from AD
$computers = Get-ADComputer -Filter 'Operatingsystem -like "*server*" -and enabled -eq "true"' -Properties Name | Select  -ExpandProperty Name

foreach ($computer in $computers)
{
    Write-Host "Processing $computer ..." 
    $service = Get-Service -ComputerName $computer -Name Spooler -ErrorAction SilentlyContinue
    if (!$service)
    {
        Write-Host "$($Computer): Cannot connect to Spooler Service on $computer. Skipping." -ForegroundColor Yellow
        continue
    }
    if ($service.Status -ne "Running")
    {
        Write-Host ("$($Computer): Service status is: """ + $service.Status + """. Skipping.") -ForegroundColor Yellow
        continue
    }
    $printers = (Get-Printer -ComputerName $computer)
    if (!$printers)
    {
        Write-Host "$($Computer): Cannot enumerate printers. Skipping." -ForegroundColor Yellow
        continue
    }

    $disableSpooler = $true
    foreach ($DriverName in ($printers.DriverName))
    {
        if (($DriverName -notmatch 'Microsoft XPS Document Writer') -and ($DriverName -notmatch 'Microsoft Print To PDF') -and ($DriverName -notmatch 'Microsoft OneNote*'))
        {
            Write-Host "$($Computer): Printer found: $DriverName" -ForegroundColor Green
            $disableSpooler = $false
        }
    }
    if ($disableSpooler)
    {
        Write-Host "$($Computer): Only default printers found. Stopping and disabling spooler..." -ForegroundColor DarkCyan
        (Get-Service -ComputerName $computer -Name Spooler) | Stop-Service -Verbose -WhatIf
        Set-Service -ComputerName $computer -Name Spooler -StartupType Disabled -Verbose -WhatIf

    }
    else
    {
        Write-Host "$($Computer): Non-default printers found. Skipping." -ForegroundColor Green
    }
}

Achtung: Ich hab hier noch mit Absicht jeweils ein -WhatIf drinnen.


Sollte jemand Facts bauen wollen um einen Überblick per Puppet und Co zu schaffen sollte das gut funktionieren

Code:
Get-Printer | Where { ($_.DriverName -notmatch 'Microsoft XPS*') -and ($_.DriverName -notmatch 'Microsoft Print*') -and ($_.DriverName -notmatch 'Microsoft OneNote*') } | select DriverName -Unique

userohnenamen

leider kein name
Avatar
Registered: Feb 2004
Location: -
Posts: 15844
doppelpost aber ich glaub für einen zweiten workaround ists in ordnung:

SYSTEM die Modify Rechte aufs Printerverzeichnis verweigern

https://blog.truesec.com/2021/06/30...-not-available/

mr.nice.

endlich fertig
Avatar
Registered: Jun 2004
Location: Wien
Posts: 6301
Danke für's Teilen des workarounds! Werden wir bis zum Patch auf jenen Servern, die drucken müssen, wohl so machen.
Bearbeitet von mr.nice. am 01.07.2021, 14:43

DAO

Si vis pacem, para bellum
Avatar
Registered: Mar 2001
Location: Austria
Posts: 4909
Ich habe das Script um die Acl Änderung erweitert falls es jemand hilft.
Ein Log wird jetzt auch geschrieben und kann automatisch via Mail übermittelt werden (sofern ein Relay existiert).


Code:
# Mailconfig
$From = "john.doe@cocklovers.at"
$To = "sam@ireadyouremails.at"
$Attachment = "c:\temp\fix_printernightmare.log"
$Subject = "Report for PrinterNightmare CVE-2021-1675 temp fix"
$Body = "<h2>See attached Logfile!</h2><br><br>"
$Body += "please store/save the attached logfile!" 
$SMTPServer = "your.mamasmailserver.at"
$SMTPPort = "25"

# Enable Mailreport
$SendMailreport = $true



# remove old log
if (Test-Path c:\temp\fix_printernightmare.log) { Remove-Item c:\temp\fix_printernightmare.log }

#start logging
Start-Transcript -Path "c:\temp\fix_printernightmare.log"

Write-Host "start logging"
$start_time = Get-Date


$computers = Get-ADComputer -Filter 'Operatingsystem -like "*server*" -and enabled -eq "true"' -Properties Name | Select  -ExpandProperty Name

foreach ($computer in $computers)
{
    Write-Host "Processing $computer ..." 
    $service = Get-Service -ComputerName $computer -Name Spooler -ErrorAction SilentlyContinue
    if (!$service)
    {
        Write-Host "Cannot connect to Spooler Service on $computer. Skipping." -ForegroundColor Yellow
        continue
    }
    if ($service.Status -ne "Running")
    {
        Write-Host ("Service status is: """ + $service.Status + """. Skipping.") -ForegroundColor Yellow
        continue
    }
    $printers = (Get-WmiObject -class Win32_printer -ComputerName $computer)
    if (!$printers)
    {
        Write-Host "Cannot enumerate printers. Skipping." -ForegroundColor Yellow
        continue
    }

    $disableSpooler = $true
    foreach ($DriverName in ($printers.DriverName))
    {
		if (($DriverName -notmatch 'Microsoft XPS Document Writer') -and ($DriverName -notmatch 'Microsoft Print To PDF') -and ($DriverName -notmatch 'Microsoft OneNote*'))
        {
            Write-Host "  Printer found: $DriverName" -ForegroundColor Green
            $disableSpooler = $false
					
		
        }
    }
	
    if ($disableSpooler)
    {
        Write-Host "Only default printers found. Stopping and disabling spooler..." -ForegroundColor DarkCyan
        (Get-Service -ComputerName $computer -Name Spooler) | Stop-Service -Verbose -WhatIf 
        Set-Service -ComputerName $computer -Name Spooler -StartupType Disabled -Verbose -WhatIf 

    }
    else
    {
        Write-Host "Non-default printers found. Skipping." -ForegroundColor Green
		
		#src: [url]https://blog.truesec.com/2021/06/30/fix-for-printnightmare-cve-2021-1675-exploit-to-keep-your-print-servers-running-while-a-patch-is-not-available/[/url]
		Write-Host "Fixing spooler directory permissions " -ForegroundColor Yellow
			#set directory permissions
			$Path = "C:\Windows\System32\spool\drivers"
			$Acl = Get-Acl $Path
		
			$Ar = New-Object  System.Security.AccessControl.FileSystemAccessRule("System", "Modify", "ContainerInherit, ObjectInherit", "None", "Deny")
			$Acl.AddAccessRule($Ar)
			Set-Acl $Path $Acl
    }
}


Stop-Transcript






if ($SendMailreport -eq $true){ Send-MailMessage -From $From -to $To -Subject $Subject -Body $Body -BodyAsHtml -SmtpServer $SMTPServer -Port $SMTPPort  -Attachments $Attachment}
Bearbeitet von DAO am 01.07.2021, 14:57

userohnenamen

leider kein name
Avatar
Registered: Feb 2004
Location: -
Posts: 15844
mittlerweile gibts einen eigenen CVE Artikel dazu von MS
https://msrc.microsoft.com/update-g.../CVE-2021-34527

sagt aber noch ned viel aus aktuell
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz