[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B4WP561W7D528P0JNEPTX1":3,"skill-same:01M7B4WP561W7D528P0JNEPTX1":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":13,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M7B4WP561W7D528P0JNEPTX1","analyzing-prefetch-files-for-execution-history",null,"Parse Windows Prefetch files (versions 17, 23, 26, 30) with tools like PECmd, WinPrefetchView, or python-prefetch to determine program execution history, including run counts, execution timestamps, and referenced files\u002FDLLs. Use when building a timeline of program execution on a Windows system, confirming whether a suspicious binary ran, or correlating execution evidence with other forensic artifacts during an investigation.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-prefetch-files-for-execution-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-prefetch-files-for-execution-history\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: analyzing-prefetch-files-for-execution-history\ndescription: Parse Windows Prefetch files (versions 17, 23, 26, 30) with tools like PECmd, WinPrefetchView, or python-prefetch to determine program execution history, including run counts, execution timestamps, and referenced files\u002FDLLs. Use when building a timeline of program execution on a Windows system, confirming whether a suspicious binary ran, or correlating execution evidence with other forensic artifacts during an investigation.\ndomain: cybersecurity\nsubdomain: digital-forensics\ntags:\n- forensics\n- prefetch\n- windows-artifacts\n- execution-history\n- timeline-analysis\n- evidence-collection\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- RS.AN-03\n- DE.AE-02\n- RS.MA-01\nmitre_attack:\n- T1059.001\n- T1003.001\n- T1021.002\n- T1567.002\n---\n\n# Analyzing Prefetch Files for Execution History\n\n## When to Use\n- When determining which programs were executed on a Windows system and when\n- During malware investigations to confirm execution of suspicious binaries\n- For establishing a timeline of application usage during an incident\n- When correlating program execution with other forensic artifacts\n- To identify anti-forensic tools or unauthorized software that was run\n\n## Prerequisites\n- Access to Windows Prefetch directory (C:\\Windows\\Prefetch\\) from forensic image\n- PECmd (Eric Zimmerman), WinPrefetchView, or python-prefetch parser\n- Understanding of Prefetch file format (versions 17, 23, 26, 30)\n- Windows system with Prefetch enabled (default on client OS, disabled on servers)\n- Knowledge of Prefetch naming conventions (APPNAME-HASH.pf)\n\n## Workflow\n\n### Step 1: Extract Prefetch Files from Forensic Image\n\n```bash\n# Mount the forensic image\nmount -o ro,loop,offset=$((2048*512)) \u002Fcases\u002Fcase-2024-001\u002Fimages\u002Fevidence.dd \u002Fmnt\u002Fevidence\n\n# Copy all prefetch files\nmkdir -p \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F\ncp \u002Fmnt\u002Fevidence\u002FWindows\u002FPrefetch\u002F*.pf \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F\n\n# Count and list prefetch files\nls -la \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | wc -l\nls -la \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | head -30\n\n# Hash all prefetch files for integrity\nsha256sum \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F*.pf > \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002Fpf_hashes.txt\n\n# Note: Prefetch filename format is EXECUTABLE_NAME-XXXXXXXX.pf\n# The hash (XXXXXXXX) is based on the executable path\n# Same executable from different paths creates different prefetch files\n```\n\n### Step 2: Parse Prefetch Files with PECmd\n\n```bash\n# Using Eric Zimmerman's PECmd (Windows or via Mono\u002FWine on Linux)\n# Download from https:\u002F\u002Fericzimmerman.github.io\u002F\n\n# Parse a single prefetch file\nPECmd.exe -f \"C:\\cases\\prefetch\\POWERSHELL.EXE-A]B2C3D4.pf\"\n\n# Parse all prefetch files and output to CSV\nPECmd.exe -d \"C:\\cases\\prefetch\\\" --csv \"C:\\cases\\analysis\\\" --csvf prefetch_results.csv\n\n# Parse with JSON output\nPECmd.exe -d \"C:\\cases\\prefetch\\\" --json \"C:\\cases\\analysis\\\" --jsonf prefetch_results.json\n\n# Output includes for each file:\n# - Executable name and path\n# - Run count\n# - Last run time (up to 8 timestamps in Windows 10)\n# - Files and directories referenced during execution\n# - Volume information (serial number, creation date)\n# - Prefetch file creation time\n```\n\n### Step 3: Parse with Python for Linux-Based Analysis\n\n```bash\npip install prefetch\n\npython3 \u003C\u003C 'PYEOF'\nimport os\nimport json\nfrom datetime import datetime\n\n# Parse prefetch files using python\nimport struct\n\ndef parse_prefetch(filepath):\n    \"\"\"Parse a Windows Prefetch file.\"\"\"\n    with open(filepath, 'rb') as f:\n        data = f.read()\n\n    # Check for MAM compressed format (Windows 10)\n    if data[:4] == b'MAM\\x04':\n        import lznt1  # or use DecompressBuffer\n        # Windows 10 prefetch files are compressed\n        print(f\"  [Compressed Win10 format - use PECmd for full parsing]\")\n        return None\n\n    # Version 17 (XP), 23 (Vista\u002F7), 26 (8.1), 30 (10)\n    version = struct.unpack('\u003CI', data[0:4])[0]\n    signature = data[4:8]\n\n    if signature != b'SCCA':\n        print(f\"  Invalid prefetch signature\")\n        return None\n\n    file_size = struct.unpack('\u003CI', data[8:12])[0]\n    exec_name = data[16:76].decode('utf-16-le').strip('\\x00')\n    run_count = struct.unpack('\u003CI', data[208:212])[0] if version >= 23 else struct.unpack('\u003CI', data[144:148])[0]\n\n    result = {\n        'version': version,\n        'executable': exec_name,\n        'file_size': file_size,\n        'run_count': run_count,\n    }\n\n    # Extract last execution timestamps\n    if version == 23:  # Vista\u002F7 - 1 timestamp\n        ts = struct.unpack('\u003CQ', data[128:136])[0]\n        result['last_run'] = filetime_to_datetime(ts)\n    elif version >= 26:  # Win8+ - up to 8 timestamps\n        timestamps = []\n        for i in range(8):\n            ts = struct.unpack('\u003CQ', data[128+i*8:136+i*8])[0]\n            if ts > 0:\n                timestamps.append(filetime_to_datetime(ts))\n        result['last_run_times'] = timestamps\n\n    return result\n\ndef filetime_to_datetime(ft):\n    \"\"\"Convert Windows FILETIME to datetime string.\"\"\"\n    if ft == 0:\n        return None\n    timestamp = (ft - 116444736000000000) \u002F 10000000\n    try:\n        return datetime.utcfromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S UTC')\n    except (OSError, ValueError):\n        return None\n\n# Process all prefetch files\nprefetch_dir = '\u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F'\nresults = []\n\nfor filename in sorted(os.listdir(prefetch_dir)):\n    if filename.lower().endswith('.pf'):\n        filepath = os.path.join(prefetch_dir, filename)\n        print(f\"\\n=== {filename} ===\")\n        result = parse_prefetch(filepath)\n        if result:\n            print(f\"  Executable: {result['executable']}\")\n            print(f\"  Run Count:  {result['run_count']}\")\n            if 'last_run' in result:\n                print(f\"  Last Run:   {result['last_run']}\")\n            elif 'last_run_times' in result:\n                for i, ts in enumerate(result['last_run_times']):\n                    print(f\"  Run Time {i+1}: {ts}\")\n            results.append(result)\n\n# Save results\nwith open('\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fprefetch_analysis.json', 'w') as f:\n    json.dump(results, f, indent=2)\nPYEOF\n```\n\n### Step 4: Identify Suspicious Execution Evidence\n\n```bash\n# Search for known malicious tool names in prefetch\nls \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | grep -iE \\\n   '(MIMIKATZ|PSEXEC|WMIC|COBALT|BEACON|PWDUMP|PROCDUMP|LAZAGNE|RUBEUS|BLOODHOUND|SHARPHOUND|CERTUTIL|BITSADMIN)'\n\n# Search for script interpreters (potential malicious execution)\nls \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | grep -iE \\\n   '(POWERSHELL|CMD\\.EXE|WSCRIPT|CSCRIPT|MSHTA|REGSVR32|RUNDLL32|MSIEXEC)'\n\n# Search for remote access tools\nls \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | grep -iE \\\n   '(TEAMVIEWER|ANYDESK|LOGMEIN|VNC|SPLASHTOP|SCREENCONNECT|AMMYY)'\n\n# Search for data exfiltration tools\nls \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | grep -iE \\\n   '(RAR|7Z|ZIP|RCLONE|MEGA|DROPBOX|ONEDRIVE|GDRIVE|FTP|CURL|WGET)'\n\n# Find recently created prefetch files (newest executables run)\nls -lt \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | head -20\n\n# Cross-reference with Shimcache and Amcache for confirmation\n# Prefetch existence = program was executed at least once\n```\n\n### Step 5: Build Execution Timeline\n\n```bash\n# Create timeline from prefetch data\npython3 \u003C\u003C 'PYEOF'\nimport json\nimport csv\n\nwith open('\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fprefetch_analysis.json') as f:\n    data = json.load(f)\n\ntimeline = []\nfor entry in data:\n    if 'last_run_times' in entry:\n        for ts in entry['last_run_times']:\n            if ts:\n                timeline.append({\n                    'timestamp': ts,\n                    'executable': entry['executable'],\n                    'run_count': entry['run_count'],\n                    'source': 'Prefetch'\n                })\n    elif 'last_run' in entry and entry['last_run']:\n        timeline.append({\n            'timestamp': entry['last_run'],\n            'executable': entry['executable'],\n            'run_count': entry['run_count'],\n            'source': 'Prefetch'\n        })\n\n# Sort chronologically\ntimeline.sort(key=lambda x: x['timestamp'])\n\n# Write timeline CSV\nwith open('\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fexecution_timeline.csv', 'w', newline='') as f:\n    writer = csv.DictWriter(f, fieldnames=['timestamp', 'executable', 'run_count', 'source'])\n    writer.writeheader()\n    writer.writerows(timeline)\n\n# Print suspicious time window\nfor entry in timeline:\n    if '2024-01-15' in entry['timestamp'] or '2024-01-16' in entry['timestamp']:\n        print(f\"  {entry['timestamp']} | {entry['executable']} (x{entry['run_count']})\")\nPYEOF\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Prefetch | Windows performance optimization that pre-loads application data and tracks execution |\n| SCCA signature | Magic bytes identifying a valid Prefetch file |\n| Path hash | CRC-based hash of the executable path forming part of the .pf filename |\n| Run count | Number of times the executable has been launched (may wrap around) |\n| Last run timestamps | Windows 8+ stores up to 8 most recent execution timestamps |\n| Referenced files | List of files and directories accessed during the first 10 seconds of execution |\n| Volume information | Drive serial number and creation date identifying the source volume |\n| MAM compression | Windows 10 Prefetch files use MAM4 compression requiring decompression before parsing |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| PECmd | Eric Zimmerman's Prefetch parser with CSV\u002FJSON output |\n| WinPrefetchView | NirSoft GUI tool for viewing Prefetch files |\n| python-prefetch | Python library for parsing Prefetch files |\n| Prefetch Hash Calculator | Tool to calculate expected hash from executable paths |\n| KAPE | Automated artifact collection including Prefetch |\n| Autopsy | Forensic platform with Prefetch analysis module |\n| Plaso\u002Flog2timeline | Super-timeline tool that includes Prefetch parser |\n| Velociraptor | Endpoint agent with Prefetch collection and analysis artifacts |\n\n## Common Scenarios\n\n**Scenario 1: Confirming Malware Execution**\nSearch Prefetch directory for the malware executable name, confirm execution via Prefetch existence, extract run count and last run time, identify referenced DLLs to understand malware behavior, correlate with registry autorun entries.\n\n**Scenario 2: Attacker Tool Usage Timeline**\nIdentify Prefetch files for PsExec, Mimikatz, BloodHound, and other attacker tools, build chronological timeline of tool execution, determine the sequence of the attack (reconnaissance, credential theft, lateral movement), match timestamps with network connection logs.\n\n**Scenario 3: Data Staging and Exfiltration**\nLook for Prefetch entries of compression tools (7z, WinRAR, zip), identify execution of file transfer utilities (rclone, FTP clients), check for cloud storage client execution, timeline when data staging and transfer occurred.\n\n**Scenario 4: Anti-Forensics Detection**\nCheck for execution of known anti-forensic tools (CCleaner, Eraser, SDelete), identify if Prefetch directory was recently cleared (fewer files than expected for active system), note timestamps of anti-forensic tool execution relative to other evidence.\n\n## Output Format\n\n```\nPrefetch Analysis Summary:\n  System: Windows 10 Pro (Build 19041)\n  Prefetch Files: 234\n  Analysis Period: All available execution history\n\n  Execution Statistics:\n    Total unique executables: 234\n    First execution: 2023-06-15 (system install)\n    Latest execution: 2024-01-18 23:45 UTC\n\n  Suspicious Executions:\n    MIMIKATZ.EXE-5F2A3B1C.pf\n      Run Count: 3 | Last: 2024-01-16 02:30:15 UTC\n    PSEXEC.EXE-AD70946C.pf\n      Run Count: 7 | Last: 2024-01-16 02:45:30 UTC\n    RCLONE.EXE-1F3E5A2B.pf\n      Run Count: 2 | Last: 2024-01-17 03:15:00 UTC\n    POWERSHELL.EXE-022A1004.pf\n      Run Count: 145 | Last: 2024-01-18 14:00:00 UTC\n\n  Attack Timeline (from Prefetch):\n    2024-01-15 14:32 - POWERSHELL.EXE (initial access)\n    2024-01-16 02:30 - MIMIKATZ.EXE (credential theft)\n    2024-01-16 02:45 - PSEXEC.EXE (lateral movement)\n    2024-01-17 03:15 - RCLONE.EXE (data exfiltration)\n\n  Report: \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fexecution_timeline.csv\n```\n","# Analyzing Prefetch Files for Execution History\n\n## When to Use\n- When determining which programs were executed on a Windows system and when\n- During malware investigations to confirm execution of suspicious binaries\n- For establishing a timeline of application usage during an incident\n- When correlating program execution with other forensic artifacts\n- To identify anti-forensic tools or unauthorized software that was run\n\n## Prerequisites\n- Access to Windows Prefetch directory (C:\\Windows\\Prefetch\\) from forensic image\n- PECmd (Eric Zimmerman), WinPrefetchView, or python-prefetch parser\n- Understanding of Prefetch file format (versions 17, 23, 26, 30)\n- Windows system with Prefetch enabled (default on client OS, disabled on servers)\n- Knowledge of Prefetch naming conventions (APPNAME-HASH.pf)\n\n## Workflow\n\n### Step 1: Extract Prefetch Files from Forensic Image\n\n```bash\n# Mount the forensic image\nmount -o ro,loop,offset=$((2048*512)) \u002Fcases\u002Fcase-2024-001\u002Fimages\u002Fevidence.dd \u002Fmnt\u002Fevidence\n\n# Copy all prefetch files\nmkdir -p \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F\ncp \u002Fmnt\u002Fevidence\u002FWindows\u002FPrefetch\u002F*.pf \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F\n\n# Count and list prefetch files\nls -la \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | wc -l\nls -la \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | head -30\n\n# Hash all prefetch files for integrity\nsha256sum \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F*.pf > \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002Fpf_hashes.txt\n\n# Note: Prefetch filename format is EXECUTABLE_NAME-XXXXXXXX.pf\n# The hash (XXXXXXXX) is based on the executable path\n# Same executable from different paths creates different prefetch files\n```\n\n### Step 2: Parse Prefetch Files with PECmd\n\n```bash\n# Using Eric Zimmerman's PECmd (Windows or via Mono\u002FWine on Linux)\n# Download from https:\u002F\u002Fericzimmerman.github.io\u002F\n\n# Parse a single prefetch file\nPECmd.exe -f \"C:\\cases\\prefetch\\POWERSHELL.EXE-A]B2C3D4.pf\"\n\n# Parse all prefetch files and output to CSV\nPECmd.exe -d \"C:\\cases\\prefetch\\\" --csv \"C:\\cases\\analysis\\\" --csvf prefetch_results.csv\n\n# Parse with JSON output\nPECmd.exe -d \"C:\\cases\\prefetch\\\" --json \"C:\\cases\\analysis\\\" --jsonf prefetch_results.json\n\n# Output includes for each file:\n# - Executable name and path\n# - Run count\n# - Last run time (up to 8 timestamps in Windows 10)\n# - Files and directories referenced during execution\n# - Volume information (serial number, creation date)\n# - Prefetch file creation time\n```\n\n### Step 3: Parse with Python for Linux-Based Analysis\n\n```bash\npip install prefetch\n\npython3 \u003C\u003C 'PYEOF'\nimport os\nimport json\nfrom datetime import datetime\n\n# Parse prefetch files using python\nimport struct\n\ndef parse_prefetch(filepath):\n    \"\"\"Parse a Windows Prefetch file.\"\"\"\n    with open(filepath, 'rb') as f:\n        data = f.read()\n\n    # Check for MAM compressed format (Windows 10)\n    if data[:4] == b'MAM\\x04':\n        import lznt1  # or use DecompressBuffer\n        # Windows 10 prefetch files are compressed\n        print(f\"  [Compressed Win10 format - use PECmd for full parsing]\")\n        return None\n\n    # Version 17 (XP), 23 (Vista\u002F7), 26 (8.1), 30 (10)\n    version = struct.unpack('\u003CI', data[0:4])[0]\n    signature = data[4:8]\n\n    if signature != b'SCCA':\n        print(f\"  Invalid prefetch signature\")\n        return None\n\n    file_size = struct.unpack('\u003CI', data[8:12])[0]\n    exec_name = data[16:76].decode('utf-16-le').strip('\\x00')\n    run_count = struct.unpack('\u003CI', data[208:212])[0] if version >= 23 else struct.unpack('\u003CI', data[144:148])[0]\n\n    result = {\n        'version': version,\n        'executable': exec_name,\n        'file_size': file_size,\n        'run_count': run_count,\n    }\n\n    # Extract last execution timestamps\n    if version == 23:  # Vista\u002F7 - 1 timestamp\n        ts = struct.unpack('\u003CQ', data[128:136])[0]\n        result['last_run'] = filetime_to_datetime(ts)\n    elif version >= 26:  # Win8+ - up to 8 timestamps\n        timestamps = []\n        for i in range(8):\n            ts = struct.unpack('\u003CQ', data[128+i*8:136+i*8])[0]\n            if ts > 0:\n                timestamps.append(filetime_to_datetime(ts))\n        result['last_run_times'] = timestamps\n\n    return result\n\ndef filetime_to_datetime(ft):\n    \"\"\"Convert Windows FILETIME to datetime string.\"\"\"\n    if ft == 0:\n        return None\n    timestamp = (ft - 116444736000000000) \u002F 10000000\n    try:\n        return datetime.utcfromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S UTC')\n    except (OSError, ValueError):\n        return None\n\n# Process all prefetch files\nprefetch_dir = '\u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F'\nresults = []\n\nfor filename in sorted(os.listdir(prefetch_dir)):\n    if filename.lower().endswith('.pf'):\n        filepath = os.path.join(prefetch_dir, filename)\n        print(f\"\\n=== {filename} ===\")\n        result = parse_prefetch(filepath)\n        if result:\n            print(f\"  Executable: {result['executable']}\")\n            print(f\"  Run Count:  {result['run_count']}\")\n            if 'last_run' in result:\n                print(f\"  Last Run:   {result['last_run']}\")\n            elif 'last_run_times' in result:\n                for i, ts in enumerate(result['last_run_times']):\n                    print(f\"  Run Time {i+1}: {ts}\")\n            results.append(result)\n\n# Save results\nwith open('\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fprefetch_analysis.json', 'w') as f:\n    json.dump(results, f, indent=2)\nPYEOF\n```\n\n### Step 4: Identify Suspicious Execution Evidence\n\n```bash\n# Search for known malicious tool names in prefetch\nls \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | grep -iE \\\n   '(MIMIKATZ|PSEXEC|WMIC|COBALT|BEACON|PWDUMP|PROCDUMP|LAZAGNE|RUBEUS|BLOODHOUND|SHARPHOUND|CERTUTIL|BITSADMIN)'\n\n# Search for script interpreters (potential malicious execution)\nls \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | grep -iE \\\n   '(POWERSHELL|CMD\\.EXE|WSCRIPT|CSCRIPT|MSHTA|REGSVR32|RUNDLL32|MSIEXEC)'\n\n# Search for remote access tools\nls \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | grep -iE \\\n   '(TEAMVIEWER|ANYDESK|LOGMEIN|VNC|SPLASHTOP|SCREENCONNECT|AMMYY)'\n\n# Search for data exfiltration tools\nls \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | grep -iE \\\n   '(RAR|7Z|ZIP|RCLONE|MEGA|DROPBOX|ONEDRIVE|GDRIVE|FTP|CURL|WGET)'\n\n# Find recently created prefetch files (newest executables run)\nls -lt \u002Fcases\u002Fcase-2024-001\u002Fprefetch\u002F | head -20\n\n# Cross-reference with Shimcache and Amcache for confirmation\n# Prefetch existence = program was executed at least once\n```\n\n### Step 5: Build Execution Timeline\n\n```bash\n# Create timeline from prefetch data\npython3 \u003C\u003C 'PYEOF'\nimport json\nimport csv\n\nwith open('\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fprefetch_analysis.json') as f:\n    data = json.load(f)\n\ntimeline = []\nfor entry in data:\n    if 'last_run_times' in entry:\n        for ts in entry['last_run_times']:\n            if ts:\n                timeline.append({\n                    'timestamp': ts,\n                    'executable': entry['executable'],\n                    'run_count': entry['run_count'],\n                    'source': 'Prefetch'\n                })\n    elif 'last_run' in entry and entry['last_run']:\n        timeline.append({\n            'timestamp': entry['last_run'],\n            'executable': entry['executable'],\n            'run_count': entry['run_count'],\n            'source': 'Prefetch'\n        })\n\n# Sort chronologically\ntimeline.sort(key=lambda x: x['timestamp'])\n\n# Write timeline CSV\nwith open('\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fexecution_timeline.csv', 'w', newline='') as f:\n    writer = csv.DictWriter(f, fieldnames=['timestamp', 'executable', 'run_count', 'source'])\n    writer.writeheader()\n    writer.writerows(timeline)\n\n# Print suspicious time window\nfor entry in timeline:\n    if '2024-01-15' in entry['timestamp'] or '2024-01-16' in entry['timestamp']:\n        print(f\"  {entry['timestamp']} | {entry['executable']} (x{entry['run_count']})\")\nPYEOF\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Prefetch | Windows performance optimization that pre-loads application data and tracks execution |\n| SCCA signature | Magic bytes identifying a valid Prefetch file |\n| Path hash | CRC-based hash of the executable path forming part of the .pf filename |\n| Run count | Number of times the executable has been launched (may wrap around) |\n| Last run timestamps | Windows 8+ stores up to 8 most recent execution timestamps |\n| Referenced files | List of files and directories accessed during the first 10 seconds of execution |\n| Volume information | Drive serial number and creation date identifying the source volume |\n| MAM compression | Windows 10 Prefetch files use MAM4 compression requiring decompression before parsing |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| PECmd | Eric Zimmerman's Prefetch parser with CSV\u002FJSON output |\n| WinPrefetchView | NirSoft GUI tool for viewing Prefetch files |\n| python-prefetch | Python library for parsing Prefetch files |\n| Prefetch Hash Calculator | Tool to calculate expected hash from executable paths |\n| KAPE | Automated artifact collection including Prefetch |\n| Autopsy | Forensic platform with Prefetch analysis module |\n| Plaso\u002Flog2timeline | Super-timeline tool that includes Prefetch parser |\n| Velociraptor | Endpoint agent with Prefetch collection and analysis artifacts |\n\n## Common Scenarios\n\n**Scenario 1: Confirming Malware Execution**\nSearch Prefetch directory for the malware executable name, confirm execution via Prefetch existence, extract run count and last run time, identify referenced DLLs to understand malware behavior, correlate with registry autorun entries.\n\n**Scenario 2: Attacker Tool Usage Timeline**\nIdentify Prefetch files for PsExec, Mimikatz, BloodHound, and other attacker tools, build chronological timeline of tool execution, determine the sequence of the attack (reconnaissance, credential theft, lateral movement), match timestamps with network connection logs.\n\n**Scenario 3: Data Staging and Exfiltration**\nLook for Prefetch entries of compression tools (7z, WinRAR, zip), identify execution of file transfer utilities (rclone, FTP clients), check for cloud storage client execution, timeline when data staging and transfer occurred.\n\n**Scenario 4: Anti-Forensics Detection**\nCheck for execution of known anti-forensic tools (CCleaner, Eraser, SDelete), identify if Prefetch directory was recently cleared (fewer files than expected for active system), note timestamps of anti-forensic tool execution relative to other evidence.\n\n## Output Format\n\n```\nPrefetch Analysis Summary:\n  System: Windows 10 Pro (Build 19041)\n  Prefetch Files: 234\n  Analysis Period: All available execution history\n\n  Execution Statistics:\n    Total unique executables: 234\n    First execution: 2023-06-15 (system install)\n    Latest execution: 2024-01-18 23:45 UTC\n\n  Suspicious Executions:\n    MIMIKATZ.EXE-5F2A3B1C.pf\n      Run Count: 3 | Last: 2024-01-16 02:30:15 UTC\n    PSEXEC.EXE-AD70946C.pf\n      Run Count: 7 | Last: 2024-01-16 02:45:30 UTC\n    RCLONE.EXE-1F3E5A2B.pf\n      Run Count: 2 | Last: 2024-01-17 03:15:00 UTC\n    POWERSHELL.EXE-022A1004.pf\n      Run Count: 145 | Last: 2024-01-18 14:00:00 UTC\n\n  Attack Timeline (from Prefetch):\n    2024-01-15 14:32 - POWERSHELL.EXE (initial access)\n    2024-01-16 02:30 - MIMIKATZ.EXE (credential theft)\n    2024-01-16 02:45 - PSEXEC.EXE (lateral movement)\n    2024-01-17 03:15 - RCLONE.EXE (data exfiltration)\n\n  Report: \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fexecution_timeline.csv\n```\n",{"name":5,"tags":24,"author":31,"domain":32,"license":14,"version":33,"nist_csf":34,"subdomain":38,"description":7,"mitre_attack":39},[25,26,27,28,29,30],"forensics","prefetch","windows-artifacts","execution-history","timeline-analysis","evidence-collection","mahipal","cybersecurity","1.0",[35,36,37],"RS.AN-03","DE.AE-02","RS.MA-01","digital-forensics",[40,41,42,43],"T1059.001","T1003.001","T1021.002","T1567.002","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-prefetch-files-for-execution-history","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill analyzing-prefetch-files-for-execution-history",{"tool":56,"command":57},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill analyzing-prefetch-files-for-execution-history",{"tool":59,"command":60},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill analyzing-prefetch-files-for-execution-history","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-prefetch-files-for-execution-history\u002FSKILL.md",true,[64,68,74],{"path":65,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fapi-reference.md","REFERENCE","参考文档",3146,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-prefetch-files-for-execution-history\u002Freferences\u002Fapi-reference.md",{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Fagent.py","SCRIPT","脚本",8231,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-prefetch-files-for-execution-history\u002Fscripts\u002Fagent.py",[81,89,96,103,110,117],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]