Skip to content

Instantly share code, notes, and snippets.

@justaguywhocodes
Created November 26, 2024 16:00
Show Gist options
  • Save justaguywhocodes/e29a15be916953356c69a3b326ec6b99 to your computer and use it in GitHub Desktop.
Save justaguywhocodes/e29a15be916953356c69a3b326ec6b99 to your computer and use it in GitHub Desktop.
function Get-RandomInterval {
# Generate a random interval between 5 and 10 minutes in seconds
$minSeconds = 5 * 60
$maxSeconds = 10 * 60
return Get-Random -Minimum $minSeconds -Maximum $maxSeconds
}
function Exfiltrate-Data {
# This is a placeholder function for data exfiltration
# In real scenarios, this would involve sending data to an external server or similar
$dummyData = "This is dummy data for exfiltration simulation"
Write-Host "Exfiltrating: $dummyData"
# Here you would actually send the data, e.g., via HTTP POST, email, etc.
}
# Main loop to continuously exfiltrate data
while ($true) {
Exfiltrate-Data
$interval = Get-RandomInterval
Write-Host "Waiting for $interval seconds before next exfiltration..."
Start-Sleep -Seconds $interval
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment