Another malicious document with CVE-2017–11882 By m4n0w4r Published: 2019-01-03 · Archived: 2026-04-05 15:35:16 UTC Press enter or click to view image in full size Overview Nhờ người em hỗ trợ, tôi có được một sample mới c580d77722d85238ed76689a17b0205b4d980c010bef9616b8611ffba21b142e sử dụng CVE-2017–11882. Sample này có thay đổi chút về OLE object, init_key để decrypt binary, cũng như các dropped binary so với mẫu tôi đã viết tại đây https://tradahacking.vn/l%C3%A0-1937cn-hay-oceanlotus-hay-lazarus-6ca15fe1b241 https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 1 of 11 1. Stage 1 — Phân tích sơ bộ Kiểm tra thấy đây là một file RTF: Sử dụng rtfobj để xem có các embedded objects không, thấy có 4 objects: Thông qua Profiler, có được thông tin sau: CVE-2017–11882 Signature Embedded file Mở file bằng ứng dụng Word không thấy có nội dung gì (theo đánh giá cá nhân, tụi này làm mẫu không bằng các mẫu nhắm vào VN, không viết nổi một nội dung cho tử tế :D). Nó sẽ drop file e.m vào thư mục Temp . File này sẽ có nội dung như trên hình: https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 2 of 11 2. Stage 2 — Lấy binary được giải mã Với sample này, tôi không áp dụng được dụng tính năng Image File Execution Options (IFEO) nên tôi dùng HxD để patch Entry Point của EQNEDT32.exe thành 0xEB 0xEF. Sau đó mở file bằng ứng dụng Word, dùng OllyDBG tiến hành attach tiến trình EQNEDT32.exe. Sau khi attach xong khôi phục lại các bytes gốc đã patch bằng HxD. Đặt một bp tại CreatFileW: https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 3 of 11 Thông qua shellcode gọi hàm VirtualAlloc để cấp phát vùng nhớ phục vụ cho việc lưu nội dung của file e.m: Tiếp theo gọi hàm ReadFile để đọc nội dung từ e.m và lưu vào vùng nhớ ở trên: https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 4 of 11 Dùng vòng lặp xor để giải mã dữ liệu tại vùng nhớ trên (thuật toán tương tự như bài viết https://tradahacking.vn/l%C3%A0-1937cn-hay-oceanlotus-hay-lazarus-6ca15fe1b241, chỉ khác init_key): Sau vòng lặp trên có được một PE file mới như sau: Dump vùng nhớ này ra đĩa để phân tích: https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 5 of 11 3. Stage 3 — Phân tích binary đã dump Load binary ở trên vào IDA, nó thực hiện tạo thư mục có tên IISWebClient tại %appdata%: Thực hiện giải mã một buffer: Press enter or click to view image in full size https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 6 of 11 Sau đó copy toàn bộ các bytes đã giải mã ở trên vào vùng nhớ đã được cấp phát: Tạo một key là “Direct3D” tại HKEY_CURRENT_USER\Software & lưu toàn bộ decrypted bytes: https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 7 of 11 Tiếp theo, drop 3 files vào thư mục IISWebClient đã tạo ở trên: Get m4n0w4r’s stories in your inbox Join Medium for free to get updates from this writer. Remember me for faster sign in · iassvcs.exe (signed by Symantec). · sqlite3.dll (signed by Qihoo 360). · RasTls.dll (signed by Avira — not valid cert). https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 8 of 11 Thông tin Digital Signatures của các files: Tạo persistence key để tự động chạy tại “Software\Microsoft\windows NT\CurrentVersion\windows”: https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 9 of 11 Sau khi tạo key trong Registry xong, thực thi file iassvcs.exe, file này sẽ load các đã drop cùng thư mục: Binary cuối cùng được lưu thành file 189AFE4.TMP: https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 10 of 11 Tiến trình iassvcs.exe sau khi thực thi sẽ kết nối tới C2 tại: 4. IOCs · Malicious RTF: c580d77722d85238ed76689a17b0205b4d980c010bef9616b8611ffba21b142e · Decrypted binary: 8D7425AE30FD2D5196EC4DCD2540B31A0D26772F · Dropped binary: o %appdata%\IISWebClient\iassvcs.exe: 62944E26B36B1DCACE429AE26BA66164 o %appdata%\IISWebClient\sqlite3.dll: FEE0B982AF421FF8C16C0187B376B086 o %appdata%\IISWebClient\RasTls.dll: C6A73E29C770065B4911EF46285D6557 · C2: o Name: skylineqaz[.]crabdance[.]com o Name: xn — ylineqaz-y25ja[.]crabdance[.]com · Registry: o “HKCU\Software\Microsoft\windows NT\CurrentVersion\windows”; Value name “Load”; Data: C:\Users\ {username}\AppData\Roaming\IISWEB~1\iassvcs.exe o “HKEY_CURRENT_USER\Software\Direct3D” Source: https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f https://tradahacking.vn/another-malicious-document-with-cve-2017-11882-839e9c0bbf2f Page 11 of 11