in cortado/rtas/sensitive_file_access.py [0:0]
def main():
import win32file # type: ignore
files = [
"%localappdata%\\Google\\Chrome\\User Data\\Default\\Login Data",
"%localappdata%\\Google\\Chrome\\User Data\\Default\\History",
"%localappdata%\\Google\\Chrome\\User Data\\Default\\Local State",
"%appdata%\\Mozilla\\Firefox\\Profiles\\test\\logins.json",
"%appdata%\\Mozilla\\Firefox\\Profiles\\test\\cookies.sqlite",
"%appdata%\\key3.db",
"%appdata%\\KeePass\\KeePass.config.xml",
"C:\\Users\\Public\\AppData\\Local\\Microsoft\\Vault\\test",
"%appdata%\\Microsoft\\Credentials\\test",
"C:\\Windows\\Panther\\Unattend.xml",
"C:\\Windows\\System32\\Microsoft\\Protect\\S-1-5-18\\User\\test",
"C:\\Windows\\NTDS\\NTDS.dit",
"C:\\Users\\Public\\.ssh\\known_hosts",
"C:\\Users\\Public\\AppData\\Something\\FileZilla\\recentservers.xml",
"%appdata%\\Microsoft\\Protect\\CREDHIST",
]
for item in files:
path = os.path.expandvars(item)
try:
win32file.CreateFile(path, win32file.GENERIC_READ, 0, None, 3, 0, None) # type: ignore
time.sleep(2)
except Exception:
log.error(f"Failed to open {item}")