FCSC 2023 - La gazette de Windows
La gazette de Windows
Category : Intro - forensics
States
It seems that a user is running suspicious Powershell scripts on his machine. Fortunately this machine is logged and we were able to recover the Powershell event log. Find what was sent to the attacker.
SHA256(Microsoft-Windows-PowerShell%4Operational.evtx) = 770b92f7c98ffb708c3e364753ee4bb569ccc810dd5891cbaf1363c2063ddd78
Solve
Check the integrity of the log file :
|
|
We will use the evtx tool to parse the .evtx :
|
|
We know that powershell scripts have been executed, so we will look for them :
|
|
At record 1108, the payload.ps1
script is executed :
|
|
At record 1109, we notice that powershell from the payload.ps1
script is executed :
|
|
We reformat the powershell for more readability :
|
|
This PowerShell code connects to a remote server at IP address 10.255.255.16
on port 1337
using TCP protocol. Once the connection is established, the code sends an encrypted character string to the remote server, which is decrypted by the server. Then the code waits for commands from the user and executes them on the remote server.
Here we have an XOR of $l
. After the execution of the for loop, the $s
will contain a character string resulting from the XOR operation between each element of the list $l
and its position in the list. Here is the value of $s
:
|
|
Flag : FCSC{98c98d98e5a546dcf6b1ea6e47602972ea1ce9ad7262464604753c4f79b3abd3}