一键导入
meccha-chameleon-game-trainer-analysis
Analyze and understand game trainer/cheat software patterns for security research and anti-cheat development
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze and understand game trainer/cheat software patterns for security research and anti-cheat development
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | meccha-chameleon-game-trainer-analysis |
| description | Analyze and understand game trainer/cheat software patterns for security research and anti-cheat development |
| triggers | ["analyze this game trainer code","how does this cheat software work","explain game memory manipulation techniques","reverse engineer this trainer tool","understand anti-cheat bypass methods","security analysis of game hacking tools"] |
Skill by ara.so — Devtools Skills collection.
This skill provides knowledge for security researchers, anti-cheat developers, and educational purposes only. The referenced project appears to be a game trainer/cheat tool that manipulates game memory and behavior.
Important Legal & Ethical Notes:
The MECCHA CHAMELEON trainer is advertised as an "external tool" that provides:
External trainers (like this one claims to be):
# Typical external memory reading pattern
import ctypes
from ctypes import wintypes
# Windows API functions for memory access
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
OpenProcess = kernel32.OpenProcess
ReadProcessMemory = kernel32.ReadProcessMemory
WriteProcessMemory = kernel32.WriteProcessMemory
PROCESS_ALL_ACCESS = 0x1F0FFF
def read_memory(process_handle, address, size):
"""Read memory from external process"""
buffer = ctypes.create_string_buffer(size)
bytes_read = ctypes.c_size_t()
success = ReadProcessMemory(
process_handle,
ctypes.c_void_p(address),
buffer,
size,
ctypes.byref(bytes_read)
)
return buffer.raw if success else None
def write_memory(process_handle, address, data):
"""Write memory to external process"""
buffer = ctypes.create_string_buffer(data)
bytes_written = ctypes.c_size_t()
return WriteProcessMemory(
process_handle,
ctypes.c_void_p(address),
buffer,
len(data),
ctypes.byref(bytes_written)
)
import psutil
def find_game_process(process_name):
"""Locate target game process"""
for proc in psutil.process_iter(['pid', 'name']):
if proc.info['name'].lower() == process_name.lower():
return proc.info['pid']
return None
def attach_to_game(game_name="MecchaGame.exe"):
"""Attach to game process with appropriate privileges"""
pid = find_game_process(game_name)
if not pid:
raise RuntimeError(f"Game process {game_name} not found")
handle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
if not handle:
raise RuntimeError(f"Failed to open process: {ctypes.get_last_error()}")
return handle
def pattern_scan(process_handle, start_address, end_address, pattern, mask):
"""
Scan memory for byte patterns (signature scanning)
Used to find dynamic addresses that change between game updates
"""
current_address = start_address
chunk_size = 4096
while current_address < end_address:
chunk = read_memory(process_handle, current_address, chunk_size)
if not chunk:
current_address += chunk_size
continue
for offset in range(len(chunk) - len(pattern)):
match = True
for i, byte in enumerate(pattern):
if mask[i] == 'x' and chunk[offset + i] != byte:
match = False
break
if match:
return current_address + offset
current_address += chunk_size
return None
# Example: Finding player health address
# Pattern: 48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 85 C0
health_pattern = bytes([0x48, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8])
health_mask = "xxx????x"
import random
import time
def randomized_delay(min_ms=50, max_ms=200):
"""
Mimic human timing to avoid detection
Anti-cheats look for inhuman precision
"""
time.sleep(random.uniform(min_ms / 1000, max_ms / 1000))
def write_with_jitter(handle, address, value):
"""Write memory with human-like delays"""
randomized_delay()
write_memory(handle, address, value)
randomized_delay()
# Trainers often use obfuscation to hide functionality
# Example patterns you might encounter:
def decode_address(encoded):
"""XOR-based address decoding"""
key = 0xDEADBEEF
return encoded ^ key
# Base64 encoded function names
import base64
def get_function_name():
return base64.b64decode(b'V3JpdGVQcm9jZXNzTWVtb3J5').decode()
# What anti-cheat systems look for:
def detect_memory_tampering():
"""Signs of external memory modification"""
checks = {
'unexpected_process_handles': [], # Other processes with read/write access
'memory_integrity_violations': [], # Changed memory checksums
'suspicious_module_loads': [], # Injected DLLs
'anomalous_input_patterns': [], # Perfect aim, instant reactions
'network_inconsistencies': [] # Client-server state mismatch
}
return checks
def behavioral_analysis():
"""Detect inhuman gameplay patterns"""
metrics = {
'reaction_time_distribution': [], # Too consistent = bot
'mouse_movement_entropy': 0.0, # Low entropy = aimbot
'action_timing_variance': 0.0, # No variance = automated
'position_impossibilities': [] # Teleportation, noclip
}
return metrics
# How games can protect themselves:
class MemoryGuard:
"""Simple memory integrity checker"""
def __init__(self, critical_addresses):
self.checksums = {}
for addr, size in critical_addresses:
self.checksums[addr] = self.calculate_checksum(addr, size)
def calculate_checksum(self, address, size):
"""Hash memory region"""
import hashlib
# In real code, this would read from game's own memory
data = self.read_own_memory(address, size)
return hashlib.sha256(data).digest()
def verify_integrity(self):
"""Check if memory has been tampered with"""
for addr, expected_hash in self.checksums.items():
current_hash = self.calculate_checksum(addr, len(expected_hash))
if current_hash != expected_hash:
return False # Tampering detected
return True
def read_own_memory(self, address, size):
"""Placeholder for actual memory reading"""
pass
# Analyze trainer behavior in isolated environment
def create_sandbox_environment():
"""
Set up safe analysis environment:
- Virtual machine with snapshots
- Network isolation
- Process monitoring tools (Process Monitor, API Monitor)
- Debugger (x64dbg, WinDbg)
"""
config = {
'vm_platform': 'VirtualBox or VMware',
'os': 'Windows 10/11 (isolated)',
'tools': [
'Procmon', # Process Monitor
'Wireshark', # Network analysis
'x64dbg', # Debugger
'Cheat Engine', # Memory scanner
'PE Explorer' # Executable analysis
]
}
return config
def static_analysis_workflow():
"""Analyze trainer without execution"""
steps = [
"Extract executable with caution",
"Run virus scan (VirusTotal, multiple engines)",
"Examine PE headers and imports",
"Decompile/disassemble (Ghidra, IDA)",
"Identify API calls (OpenProcess, ReadProcessMemory, etc.)",
"Map memory manipulation functions",
"Document communication protocols"
]
return steps
import subprocess
import json
def monitor_process_activity(target_exe):
"""
Monitor what the trainer does at runtime
Requires administrative tools like Procmon
"""
config = {
'watch_registry': True,
'watch_filesystem': True,
'watch_network': True,
'watch_processes': True,
'log_file': 'trainer_behavior.json'
}
# Filter for specific operations
filters = [
'Operation is ReadFile',
'Operation is WriteFile',
'Operation is RegSetValue',
'Path contains MecchaGame'
]
return config
def trace_memory_operations():
"""Track memory read/write operations"""
operations = []
# Pseudo-code for tracing
# In practice, use debugger or API hooking
def on_memory_read(address, size):
operations.append({
'type': 'read',
'address': hex(address),
'size': size,
'timestamp': time.time()
})
def on_memory_write(address, data):
operations.append({
'type': 'write',
'address': hex(address),
'data': data.hex(),
'timestamp': time.time()
})
return operations
def analyze_suspicious_indicators(file_path):
"""
Check for malware characteristics
Many "trainers" are actually malware delivery systems
"""
red_flags = {
'packed_executable': False, # UPX, ASPack, etc.
'obfuscated_strings': False, # Base64, XOR encoding
'network_communication': False, # Unexpected connections
'keylogging_apis': False, # GetAsyncKeyState calls
'privilege_escalation': False, # UAC bypass attempts
'persistence_mechanisms': False, # Registry run keys
'cryptocurrency_miners': False, # Crypto wallet addresses
'data_exfiltration': False # Uploading local files
}
# Check for common malware patterns
import pefile
try:
pe = pefile.PE(file_path)
# Check for suspicious imports
dangerous_imports = [
'InternetOpenUrlA', # Network access
'GetAsyncKeyState', # Keyboard monitoring
'SetWindowsHookEx', # System hooks
'CreateRemoteThread' # Process injection
]
if hasattr(pe, 'DIRECTORY_ENTRY_IMPORT'):
for entry in pe.DIRECTORY_ENTRY_IMPORT:
for imp in entry.imports:
if imp.name and imp.name.decode() in dangerous_imports:
red_flags['keylogging_apis'] = True
# Check entropy (high entropy = packed/encrypted)
entropy = pe.sections[0].get_entropy()
if entropy > 7.0:
red_flags['packed_executable'] = True
except Exception as e:
print(f"PE analysis failed: {e}")
return red_flags
class GameServerValidator:
"""
Never trust client data
Server must validate all game state changes
"""
def validate_player_position(self, old_pos, new_pos, delta_time):
"""Check if movement is physically possible"""
max_speed = 10.0 # units per second
distance = self.calculate_distance(old_pos, new_pos)
max_distance = max_speed * delta_time
if distance > max_distance * 1.1: # 10% tolerance
return False, "Impossible movement speed (teleport?)"
return True, "OK"
def validate_action_timing(self, player_id, action_type):
"""Detect inhuman reaction times"""
last_action = self.get_last_action_time(player_id)
current_time = time.time()
min_human_reaction = 0.15 # 150ms minimum reaction time
if current_time - last_action < min_human_reaction:
return False, "Inhuman reaction time"
return True, "OK"
def calculate_distance(self, pos1, pos2):
"""3D distance calculation"""
import math
return math.sqrt(
(pos1['x'] - pos2['x'])**2 +
(pos1['y'] - pos2['y'])**2 +
(pos1['z'] - pos2['z'])**2
)
def get_last_action_time(self, player_id):
"""Placeholder for action history lookup"""
pass
def implement_client_protections():
"""
Multi-layered client protection
No single solution is perfect
"""
protections = {
'code_signing': 'Verify executable integrity',
'anti_debug': 'Detect debugger attachment',
'memory_encryption': 'Encrypt sensitive values in RAM',
'integrity_checks': 'Periodic self-verification',
'randomization': 'ASLR, random memory layouts',
'obfuscation': 'Make reverse engineering harder',
'heartbeat': 'Regular server communication',
'peer_validation': 'Other clients validate behavior'
}
return protections
# Example: Simple value encryption in memory
class ProtectedInt:
"""Store integer with basic encryption"""
def __init__(self, value):
self._key = random.randint(1000, 9999)
self._encrypted = value ^ self._key
@property
def value(self):
return self._encrypted ^ self._key
@value.setter
def value(self, new_value):
self._encrypted = new_value ^ self._key
# Usage
player_health = ProtectedInt(100)
# Memory scanners will see encrypted value, not actual health
def anticheat_learning_resources():
"""Educational materials for game security"""
resources = {
'academic_papers': [
'GEN: Automatic Code Generation for Client-Side Anti-Cheat',
'Machine Learning Approaches to Game Security',
],
'conferences': [
'GDC Security Summit',
'DEF CON Game Hacking Village',
],
'tools': [
'EasyAntiCheat SDK',
'BattlEye Developer Resources',
'Valve Anti-Cheat (VAC) documentation'
],
'communities': [
'Game Security Forum',
'UnknownCheats (for educational research)',
]
}
return resources
This skill provides knowledge for understanding game trainer/cheat software from a defensive security perspective. Use this information to:
Never use this knowledge to harm games, players, or communities.
Orchestrate psychology clinic workflows with AI-powered scheduling, WhatsApp automation, AFIP billing, and video consultations for Argentine practitioners
SaaS platform for psychology clinics with intelligent scheduling, WhatsApp automation, AFIP billing, videollamadas, and Claude AI integration
Build and customize the Sesión mental health practice management platform with appointment scheduling, WhatsApp automation, AFIP billing, and Claude AI integration
Orchestrate psychology clinic operations with AI-powered scheduling, WhatsApp automation, AFIP billing, and secure video consultations for Argentine mental health practitioners
Connect AI agents to a running Tabbit browser instance via Chrome DevTools Protocol (CDP) and control it through agent-browser
AI-powered mental health practice management platform for Argentina with WhatsApp automation, AFIP-compliant invoicing, and video consultations