T07 · Tool Hijacking and Spoofing
- Location
scripts/sausg_calc.py:91- Finding
Automatic SAUSG Discovery Can Execute a Spoofed Local Binary
- Content
View full analysis
nul') if returncode == 0: for line in stdout.strip().split('\n'): if line.strip(): match = re.search(r'SAUSG(\d+)', line, re.IGNORECASE) if match: version = int(match.group(1)) dir_path = os.path.join("D:\\", line.strip()) if os.path.isdir(dir_path): saug_dirs.append((dir_path, version)) # If none are found on D, search other drives. if not saug_dirs: for drive in ['C:', 'E:', 'F:']: try: returncode, stdout, _ = run_command( f'dir /ad /b {drive}\\SAUSG* 2>nul' ) if returncode == 0: for line in stdout.strip().split('\n'): if line.strip(): match = re.search( r'SAUSG(\d+)', line, re.IGNORECASE ) if match: version = int(match.group(1)) dir_path = os.path.join( drive, line.strip().replace('/', '\\') ) if os.path.isdir(dir_path): saug_dirs.append((dir_path, version)) except Exception: continue saug_dirs.sort(key=lambda x: x[1], reverse=True) latest_dir = saug_dirs[0][0] if os.path.exists(os.path.join(latest_dir, "SAUSAGE.exe")): return latest_dir ``` The selected executable is subsequently launched: ```python cmd = f'"{SAUSG_DIR}\\SAUSAGE.exe" TYPE=OPEN BATCH=0 PATH="{model_path}"' pro ...[truncated 2564 chars]- Remediation
View remediation
