macOS Python Script Replacing Wallet Applications with Rogue Apps

macOS threats are evolving, with a Python-based script targeting wallet apps Exodus and Bitcoin Core by replacing them with rogue equivalents. The malware exfiltrates system data, can execute commands from a C2 server, and uses Electron and AppleScript to impersonate legitimate software. #Exodus #BitcoinQt #BitcoinCore #AppleScript #Electron #apple-analysis #apple-health

Keypoints

  • macOS threats are evolving with malware targeting wallet apps on macOS.
  • The Python script enumerates installed apps in /Applications and /System/Applications to find Exodus and Bitcoin Core, applying special handling for Exodus and Bitcoin-Qt.
  • The malware detects processor architecture (Intel vs M1) to tailor its actions.
  • It exfiltrates system information (OS, user folders, installed apps) to a C2 server, including the victim’s IP address.
  • The C2 can reply with Python commands to be executed on the victim’s computer.
  • The rogue installation replaces Exodus by downloading a fake Exodus app, Electron, an Apple Script, and an icon, then rebuilding Exodus with osacompile to masquerade as the legitimate app; Bitcoin-Qt is replaced similarly via a downloaded payload.
  • Two IOCs are highlighted: domains apple-analysis[.]com and apple-health[.]org.

MITRE Techniques

  • [T1518.001] Software Discovery – The script searches for installed apps like Exodus and Bitcoin-Qt by listing directories in /Applications and /System/Applications. “def get_installed_apps(): processor_series = is_mac_intel() application_paths = [‘/Applications’, ‘/System/Applications’] app_names = [] for applications_path in application_paths: try: app_dirs = os.listdir(applications_path) except FileNotFoundError: # If the directory is not found, skip to the next continue for app in app_dirs: if app.endswith(‘.app’): app_name = app[:-4]”
  • [T1105] Ingress Tool Transfer – The malware downloads payloads (fake Exodus app, Electron framework, Apple Script (.scpt), and icon (.icns)). “The script downloads a fake Exodus app, an instance of the Electron framework, an Apple Script file (a .scpt file), and an icon (a .icns file).”
  • [T1059.006] Command and Scripting Interpreter – Python – The C2 server may reply with Python commands to be executed on the victim’s computer. “The C2 server might reply with some Python commands to be executed on the victim’s computer:”
  • [T1059.005] Command and Scripting Interpreter – AppleScript – The script uses osacompile to compile Apple Scripts. “osacompile’, to compile Apple Scripts (note that this tool requires Xcode to be installed!)”
  • [T1036] Masquerading – Exodus is replaced with an Apple Script and a downloaded icon to mimic the legitimate Exodus app. “The official app is replaced by an Apple Script. That’s why an icon file has been downloaded, it will replace the default icon and mimick a valid Exodus.”
  • [T1082] System Information Discovery – The malware collects OS and user-related data before exfiltration. “s = json.dumps({ “os”: platform.platform() or “empty”, “cm”: get_subfolders(“/USERS/”) or “empty”, “av”: “”, “apps”: get_installed_apps() or “empty”, “ip”: meta_ip, “ver”: “” }, indent=None).encode(‘utf8’)”

Indicators of Compromise

  • [Domain] Domain – apple-analysis[.]com – Domains used by scripts to fetch payloads and talk to the C2
  • [Domain] Domain – apple-health[.]org – Domains used by scripts to fetch payloads and talk to the C2
  • [Hash] Hash – 07c20b191203d55eca8f7b238ac67380a73aba1103f5513c125870a40a963ded – Hash used in Exodus/Bitcoin-Qt hash checks
  • [Hash] Hash – 51ffe30ec2815b71e3ca63a92272c548fa75961bc141057676edd53917c638da – Hash used in Bitcoin-Qt check to decide actions
  • [File] File – Exodus.app – Target app that is replaced by the rogue version
  • [File] File – Bitcoin-Qt.app – Target app that is replaced by the rogue version

Read more: https://isc.sans.edu/diary/rss/30572