digitalcourage.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Diese Instanz wird betrieben von Digitalcourage e.V. für die Allgemeinheit. Damit wir das nachhaltig tun können, erheben wir einen jährlichen Vorausbeitrag von 1€/Monat per SEPA-Lastschrifteinzug.

Server stats:

823
active users

#powershell

12 posts12 participants3 posts today

New Open-Source Tool Spotlight 🚨🚨🚨

BlackCat is a PowerShell module tailored for analyzing Microsoft Azure configurations. It detects potential security vulnerabilities while adhering to best practices. A vital tool for Azure security audits. #Azure #PowerShell

🔗 Project link on #GitHub 👉 github.com/azurekid/blackcat

#Infosec #Cybersecurity #Software #Technology #News #CTF #Cybersecuritycareer #hacking #redteam #blueteam #purpleteam #tips #opensource #cloudsecurity

✨
🔐 P.S. Found this helpful? Tap Follow for more cybersecurity tips and insights! I share weekly content for professionals and people who want to get into cyber. Happy hacking 💻🏴‍☠️

Phew! 🥳 This little #powershell gem saved my ass today when I tried to migrate a #Signal Desktop install to another Windows PC.
(Not a thing officially supported by @signalapp)

The database encryption key itself is device-specifically encrypted using the „Data Protection API“ (haha) #DPAPI, so signal can't decrypt it on the new machine.

Using a legacy parameter, you can put the unencrypted key on the old machine, transfer it to the new one and have it re-encrypted.

github.com/MatejKafka/PSSignal

A PowerShell script to decrypt your Signal Desktop config, allowing you to move the database to a new computer. - MatejKafka/PSSignalDecrypt
GitHubGitHub - MatejKafka/PSSignalDecrypt: A PowerShell script to decrypt your Signal Desktop config, allowing you to move the database to a new computer.A PowerShell script to decrypt your Signal Desktop config, allowing you to move the database to a new computer. - MatejKafka/PSSignalDecrypt

Ich hab mit Gemini programmiert. Also ich hab das, was ich am besten kann, gemacht: ich hab herumkommandiert.

Ich wollte ein Symbol auf dem Desktop haben. wenn ich da doppelt raufklicke, bekomme ich ein Menü mit:

Herunterfahren
Neustart
Energiesparen
Abbrechen

ich wollte das erst in vbs haben, aber offensichtlich lief das auf meinem Rechner nicht mehr. Also haben wir das mit der Powershell umgesetzt. Ich spare mir die ganzen Schritte, hier das Ergebnis:

```
# Lädt die notwendigen Bibliotheken für eine grafische Oberfläche
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
# Erstellt das Hauptfenster
$form = New-Object System.Windows.Forms.Form
$form.Text = "Power-Menue"
$form.Size = New-Object System.Drawing.Size(220, 230)
$form.StartPosition = "Manual"
$form.Location = [System.Windows.Forms.Cursor]::Position
$form.FormBorderStyle = 'None'
$form.MaximizeBox = $false
$form.BackColor = 'Magenta'
$form.TransparencyKey = $form.BackColor
# Erstellt den "Herunterfahren"-Knopf
$btnShutdown = New-Object System.Windows.Forms.Button
$btnShutdown.Location = New-Object System.Drawing.Point(20, 20)
$btnShutdown.Size = New-Object System.Drawing.Size(160, 30)
$btnShutdown.Text = "Herunterfahren"
$btnShutdown.BackColor = 'Gainsboro' # Eine Standard-Button-Farbe
$btnShutdown.ForeColor = 'Black' # Schwarze Schrift
$btnShutdown.Add_Click({
Start-Process "shutdown.exe" -ArgumentList "/s"
$form.Close()
})
$form.Controls.Add($btnShutdown)
# Erstellt den "Neustart"-Knopf
$btnRestart = New-Object System.Windows.Forms.Button
$btnRestart.Location = New-Object System.Drawing.Point(20, 55)
$btnRestart.Size = New-Object System.Drawing.Size(160, 30)
$btnRestart.BackColor = 'Gainsboro' # Eine Standard-Button-Farbe
$btnRestart.ForeColor = 'Black' # Schwarze Schrift
$btnRestart.Text = "Neustart"
$btnRestart.Add_Click({
Start-Process "shutdown.exe" -ArgumentList "/r"
$form.Close()
})
$form.Controls.Add($btnRestart)
# Erstellt den "Standby"-Knopf
$btnStandby = New-Object System.Windows.Forms.Button # Variable umbenannt für Klarheit
$btnStandby.Location = New-Object System.Drawing.Point(20, 90)
$btnStandby.Size = New-Object System.Drawing.Size(160, 30)
$btnStandby.BackColor = 'Gainsboro'
$btnStandby.ForeColor = 'Black'
$btnStandby.Text = "Energie sparen" # Text geändert auf den offiziellen Windows-Begriff
$btnStandby.Add_Click({
# WICHTIG: Dies ist der neue Befehl für den Standby-Modus
[System.Windows.Forms.Application]::SetSuspendState('Suspend', $false, $false)
$form.Close()
})
$form.Controls.Add($btnStandby)
# Erstellt den "Abbrechen"-Knopf
$btnAbort = New-Object System.Windows.Forms.Button
$btnAbort.Location = New-Object System.Drawing.Point(20, 140)
$btnAbort.Size = New-Object System.Drawing.Size(160, 30)
$btnAbort.BackColor = 'Gainsboro' # Eine Standard-Button-Farbe
$btnAbort.ForeColor = 'Black' # Schwarze Schrift
$btnAbort.Text = "Aktion abbrechen"
$btnAbort.Add_Click({
Start-Process "shutdown.exe" -ArgumentList "/a"
$form.Close()
})
$form.Controls.Add($btnAbort)
# Zeigt das Fenster an
$form.ShowDialog()
```

War cool. Hat den ganzen langweiligen Coding-Kram gespart.

Ich musste mich also nur um das kümmern, was mich interessiert, also Funktion, Aussehen, Optimierung.

Und das eigentliche Coden hab ich ausgelagert.

hier die Verknüpfung auf dem Desktop, die das Script dann aufruft:

```
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden -File "\\Lala\Dokument\User\Ron\Entwicklung\Beenden.ps1"
```

iX-Workshop: Windows Server absichern und härten

Lernen Sie, wie Sie Ihren Windows Server effektiv absichern und härten, Schutzmaßnahmen integrieren, Konfigurationen optimieren und Angriffsszenarien bewerten.

heise.de/news/iX-Workshop-Wind

heise online · iX-Workshop: Windows Server absichern und härtenBy Ilona Krause