[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73ECPX24TSMTE3KHDDS8ERK":3,"skill-same:01M73ECPX24TSMTE3KHDDS8ERK":120},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":67,"ownerHtmlUrl":68,"ownerBlogUrl":69,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M73ECPX24TSMTE3KHDDS8ERK","performing-cloud-storage-forensic-acquisition",null,"Perform forensic acquisition and analysis of cloud storage services including Google Drive, OneDrive, Dropbox, and Box by collecting both API-based remote data and local sync client artifacts from endpoint devices.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: performing-cloud-storage-forensic-acquisition\ndescription: Perform forensic acquisition and analysis of cloud storage services including\n  Google Drive, OneDrive, Dropbox, and Box by collecting both API-based remote data\n  and local sync client artifacts from endpoint devices.\ndomain: cybersecurity\nsubdomain: digital-forensics\ntags:\n- cloud-forensics\n- google-drive\n- onedrive\n- dropbox\n- box\n- cloud-acquisition\n- api-forensics\n- sync-client\n- endpoint-artifacts\n- magnet-axiom\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_ai_rmf:\n- MEASURE-2.7\n- MAP-5.1\n- MANAGE-2.4\natlas_techniques:\n- AML.T0070\n- AML.T0066\n- AML.T0082\nnist_csf:\n- RS.AN-01\n- RS.AN-03\n- DE.AE-02\n- RS.MA-01\nmitre_attack:\n- T1005\n- T1074\n- T1119\n- T1070\n- T1059\nsource: https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\nsource_commit: 04450304b12645cb2b974ab96d28c0664758a88d\nnote: \"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.\"\n---\n\n# Performing Cloud Storage Forensic Acquisition\n\n## Overview\n\nCloud storage forensic acquisition involves collecting digital evidence from services like Google Drive, OneDrive, Dropbox, and Box through both API-based remote acquisition and local endpoint artifact analysis. Modern investigations must address the challenge that cloud-synced files may exist in multiple states: locally synchronized, cloud-only (on-demand), cached, and deleted. Endpoint devices that have synchronized with cloud storage contain a wealth of metadata about locally synced files, files present only in the cloud, and even deleted items recoverable from cache folders. API-based acquisition using service-specific APIs provides direct access to remote data with valid credentials and proper legal authorization.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing cloud storage forensic acquisition\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n\n- Legal authorization (warrant, consent, or corporate policy) for cloud data access\n- Valid user credentials or administrative access tokens\n- Magnet AXIOM Cloud, Cellebrite Cloud Analyzer, or equivalent tool\n- KAPE with cloud storage target files\n- Python 3.8+ with google-api-python-client, msal, dropbox SDK\n- Network connectivity for API-based acquisition\n\n## Acquisition Methods\n\n### Method 1: API-Based Remote Acquisition\n\n#### Google Drive API Acquisition\n\n```python\nfrom google.oauth2.credentials import Credentials\nfrom googleapiclient.discovery import build\nfrom googleapiclient.http import MediaIoBaseDownload\nimport io\nimport os\nimport json\nfrom datetime import datetime\n\n\nclass GoogleDriveForensicAcquisition:\n    \"\"\"Forensically acquire files and metadata from Google Drive via API.\"\"\"\n\n    def __init__(self, credentials_path: str, output_dir: str):\n        self.creds = Credentials.from_authorized_user_file(credentials_path)\n        self.service = build(\"drive\", \"v3\", credentials=self.creds)\n        self.output_dir = output_dir\n        os.makedirs(output_dir, exist_ok=True)\n        self.acquisition_log = []\n\n    def list_all_files(self, include_trashed: bool = True) -> list:\n        \"\"\"List all files including trashed items.\"\"\"\n        files = []\n        page_token = None\n        query = \"\" if include_trashed else \"trashed = false\"\n\n        while True:\n            results = self.service.files().list(\n                q=query,\n                pageSize=1000,\n                fields=\"nextPageToken, files(id, name, mimeType, size, \"\n                       \"createdTime, modifiedTime, trashed, trashedTime, \"\n                       \"owners, sharingUser, permissions, md5Checksum, \"\n                       \"parents, webViewLink, driveId)\",\n                pageToken=page_token\n            ).execute()\n\n            files.extend(results.get(\"files\", []))\n            page_token = results.get(\"nextPageToken\")\n            if not page_token:\n                break\n\n        return files\n\n    def download_file(self, file_id: str, file_name: str, mime_type: str) -> str:\n        \"\"\"Download a file from Google Drive preserving forensic integrity.\"\"\"\n        output_path = os.path.join(self.output_dir, file_name)\n\n        if mime_type.startswith(\"application\u002Fvnd.google-apps\"):\n            export_formats = {\n                \"application\u002Fvnd.google-apps.document\": \"application\u002Fpdf\",\n                \"application\u002Fvnd.google-apps.spreadsheet\": \"application\u002Fvnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n                \"application\u002Fvnd.google-apps.presentation\": \"application\u002Fpdf\",\n            }\n            export_mime = export_formats.get(mime_type, \"application\u002Fpdf\")\n            request = self.service.files().export_media(fileId=file_id, mimeType=export_mime)\n        else:\n            request = self.service.files().get_media(fileId=file_id)\n\n        with io.FileIO(output_path, \"wb\") as fh:\n            downloader = MediaIoBaseDownload(fh, request)\n            done = False\n            while not done:\n                _, done = downloader.next_chunk()\n\n        self.acquisition_log.append({\n            \"timestamp\": datetime.utcnow().isoformat(),\n            \"file_id\": file_id,\n            \"file_name\": file_name,\n            \"output_path\": output_path,\n            \"action\": \"downloaded\"\n        })\n        return output_path\n\n    def get_activity_log(self, file_id: str) -> list:\n        \"\"\"Retrieve activity\u002Frevision history for a specific file.\"\"\"\n        revisions = self.service.revisions().list(\n            fileId=file_id,\n            fields=\"revisions(id, modifiedTime, lastModifyingUser, size, md5Checksum)\"\n        ).execute()\n        return revisions.get(\"revisions\", [])\n\n    def export_acquisition_report(self) -> str:\n        \"\"\"Export acquisition log for chain of custody documentation.\"\"\"\n        report_path = os.path.join(self.output_dir, \"acquisition_log.json\")\n        with open(report_path, \"w\") as f:\n            json.dump({\n                \"acquisition_start\": self.acquisition_log[0][\"timestamp\"] if self.acquisition_log else None,\n                \"acquisition_end\": datetime.utcnow().isoformat(),\n                \"total_files\": len(self.acquisition_log),\n                \"entries\": self.acquisition_log\n            }, f, indent=2)\n        return report_path\n```\n\n#### OneDrive \u002F Microsoft 365 API Acquisition\n\n```python\nimport msal\nimport requests\nimport os\nimport json\nfrom datetime import datetime\n\n\nclass OneDriveForensicAcquisition:\n    \"\"\"Forensically acquire files and metadata from OneDrive via Microsoft Graph API.\"\"\"\n\n    def __init__(self, client_id: str, tenant_id: str, client_secret: str, output_dir: str):\n        self.output_dir = output_dir\n        os.makedirs(output_dir, exist_ok=True)\n\n        authority = f\"https:\u002F\u002Flogin.microsoftonline.com\u002F{tenant_id}\"\n        self.app = msal.ConfidentialClientApplication(\n            client_id, authority=authority, client_credential=client_secret\n        )\n        token_result = self.app.acquire_token_for_client(\n            scopes=[\"https:\u002F\u002Fgraph.microsoft.com\u002F.default\"]\n        )\n        self.access_token = token_result.get(\"access_token\")\n        self.headers = {\"Authorization\": f\"Bearer {self.access_token}\"}\n        self.base_url = \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\"\n\n    def list_user_files(self, user_id: str) -> list:\n        \"\"\"List all files in user's OneDrive.\"\"\"\n        url = f\"{self.base_url}\u002Fusers\u002F{user_id}\u002Fdrive\u002Froot\u002Fchildren\"\n        files = []\n        while url:\n            response = requests.get(url, headers=self.headers)\n            data = response.json()\n            files.extend(data.get(\"value\", []))\n            url = data.get(\"@odata.nextLink\")\n        return files\n\n    def download_file(self, user_id: str, item_id: str, filename: str) -> str:\n        \"\"\"Download a file from OneDrive.\"\"\"\n        url = f\"{self.base_url}\u002Fusers\u002F{user_id}\u002Fdrive\u002Fitems\u002F{item_id}\u002Fcontent\"\n        response = requests.get(url, headers=self.headers, stream=True)\n        output_path = os.path.join(self.output_dir, filename)\n        with open(output_path, \"wb\") as f:\n            for chunk in response.iter_content(chunk_size=8192):\n                f.write(chunk)\n        return output_path\n\n    def get_deleted_items(self, user_id: str) -> list:\n        \"\"\"Retrieve items from OneDrive recycle bin.\"\"\"\n        url = f\"{self.base_url}\u002Fusers\u002F{user_id}\u002Fdrive\u002Fspecial\u002Frecyclebin\u002Fchildren\"\n        response = requests.get(url, headers=self.headers)\n        return response.json().get(\"value\", [])\n```\n\n### Method 2: Local Endpoint Artifact Collection\n\n#### KAPE Targets for Cloud Storage\n\n```powershell\n# Collect all cloud storage artifacts using KAPE\nkape.exe --tsource C: --tdest C:\\Output\\CloudArtifacts --target GoogleDrive,OneDrive,Dropbox,Box\n\n# OneDrive artifacts\n# %USERPROFILE%\\AppData\\Local\\Microsoft\\OneDrive\\logs\\\n# %USERPROFILE%\\AppData\\Local\\Microsoft\\OneDrive\\settings\\\n# %USERPROFILE%\\OneDrive\\\n\n# Google Drive artifacts\n# %USERPROFILE%\\AppData\\Local\\Google\\DriveFS\\\n# Contains metadata SQLite databases and cached files\n\n# Dropbox artifacts\n# %USERPROFILE%\\AppData\\Local\\Dropbox\\\n# %USERPROFILE%\\Dropbox\\.dropbox.cache\\\n# Contains filecache.dbx (encrypted SQLite), host.dbx, config.dbx\n```\n\n#### OneDrive Local Database Analysis\n\n```python\nimport sqlite3\nimport os\n\ndef analyze_onedrive_sync_engine(db_path: str) -> list:\n    \"\"\"Analyze OneDrive SyncEngineDatabase for file metadata.\"\"\"\n    conn = sqlite3.connect(db_path)\n    cursor = conn.cursor()\n\n    # Query for all tracked files including cloud-only items\n    cursor.execute(\"\"\"\n        SELECT fileName, fileSize, lastChange,\n               resourceID, parentResourceID, eTag\n        FROM od_ClientFile_Records\n        ORDER BY lastChange DESC\n    \"\"\")\n\n    files = []\n    for row in cursor.fetchall():\n        files.append({\n            \"filename\": row[0],\n            \"size\": row[1],\n            \"last_change\": row[2],\n            \"resource_id\": row[3],\n            \"parent_id\": row[4],\n            \"etag\": row[5]\n        })\n\n    conn.close()\n    return files\n```\n\n## Cloud Storage Artifacts Summary\n\n| Service | Local Database | Cache Location | Log Files |\n|---------|---------------|----------------|-----------|\n| OneDrive | SyncEngineDatabase.db | %LOCALAPPDATA%\\Microsoft\\OneDrive\\cache\\ | %LOCALAPPDATA%\\Microsoft\\OneDrive\\logs\\ |\n| Google Drive | metadata_sqlite_db | %LOCALAPPDATA%\\Google\\DriveFS\\{account}\\content_cache\\ | %LOCALAPPDATA%\\Google\\DriveFS\\Logs\\ |\n| Dropbox | filecache.dbx (encrypted) | %APPDATA%\\Dropbox\\.dropbox.cache\\ | %APPDATA%\\Dropbox\\logs\\ |\n| Box | sync_db | %LOCALAPPDATA%\\Box\\Box\\cache\\ | %LOCALAPPDATA%\\Box\\Box\\logs\\ |\n\n## References\n\n- SANS Cloud Storage Acquisition: https:\u002F\u002Fwww.sans.org\u002Fblog\u002Fcloud-storage-acquisition-from-endpoint-devices\n- Magnet AXIOM Cloud: https:\u002F\u002Fwww.magnetforensics.com\u002Fblog\u002Fhow-to-acquire-and-analyze-cloud-data-with-magnet-axiom\u002F\n- AWS Cloud Forensics Framework: https:\u002F\u002Fdocs.aws.amazon.com\u002Fprescriptive-guidance\u002Flatest\u002Fsecurity-reference-architecture\u002Fcyber-forensics.html\n- API-Based Forensic Acquisition of Cloud Drives: https:\u002F\u002Farxiv.org\u002Fabs\u002F1603.06542\n\n## Example Output\n\n```text\n$ python3 cloud_forensic_acquire.py --provider google-drive --auth \u002Ftokens\u002Fgdrive_token.json \\\n    --user jsmith@corporate.com --output \u002Facquisition\u002Fgdrive\n\nCloud Storage Forensic Acquisition Tool v3.2\n==============================================\nProvider:    Google Drive\nAccount:     jsmith@corporate.com\nStart Time:  2024-01-19 08:00:15 UTC\nAuth Method: Admin SDK (domain-wide delegation)\n\n[+] Enumerating files...\n    Total files:        2,345\n    Total folders:      178\n    Shared with me:     456\n    Trashed items:      89 (included in acquisition)\n    Total size:         14.7 GB\n\n[+] Acquiring file contents...\n    Downloaded:    2,345 \u002F 2,345  [████████████████████████████████] 100%\n    Errors:        0\n    Elapsed:       18m 32s\n\n[+] Acquiring metadata...\n    File metadata:      2,345 entries\n    Revision history:   8,912 revisions across 1,234 files\n    Sharing permissions: 3,456 permission entries\n    Activity log:       12,345 events\n\n[+] Acquiring trashed items...\n    Recovered:     89 \u002F 89 items (234 MB)\n\n--- Acquisition Log ---\nTimestamp (UTC)          | Action           | File                                    | Size    | SHA-256\n2024-01-19 08:00:45      | Downloaded       | \u002FMy Drive\u002FFinance\u002FQ4_Report.xlsm        | 245 KB  | 7a3b8c9d...\n2024-01-19 08:00:46      | Downloaded       | \u002FMy Drive\u002FFinance\u002FBudget_2024.xlsx       | 1.2 MB  | 8b4c9d0e...\n...\n2024-01-19 08:02:12      | Trash-Recovered  | \u002FTrash\u002Femployee_list_full.csv            | 4.5 MB  | 9c5d0e1f...\n2024-01-19 08:02:13      | Trash-Recovered  | \u002FTrash\u002Fnetwork_diagram_v3.vsdx          | 2.1 MB  | 0d6e1f2a...\n2024-01-19 08:02:14      | Trash-Recovered  | \u002FTrash\u002Fcredentials_backup.kdbx          | 128 KB  | 1e7f2a3b...\n\n--- Sharing Analysis ---\nFiles Shared Externally:\n  \u002FMy Drive\u002FFinance\u002FQ4_Report.xlsm     → j.smith.personal8842@protonmail.com (2024-01-16 03:10 UTC)\n  \u002FMy Drive\u002FHR\u002Femployee_list_full.csv   → j.smith.personal8842@protonmail.com (2024-01-16 03:12 UTC)\n  \u002FMy Drive\u002FIT\u002Fnetwork_diagram_v3.vsdx  → anonymous (link sharing, 2024-01-16 03:15 UTC)\n\n--- Revision History (Suspicious) ---\nFile: \u002FMy Drive\u002FFinance\u002FQ4_Report.xlsm\n  Rev 1:  2024-01-10 09:00:00 UTC  (245 KB)  - Original\n  Rev 2:  2024-01-15 14:35:00 UTC  (248 KB)  - Modified (macro added)\n  Rev 3:  2024-01-16 03:05:00 UTC  (245 KB)  - Reverted (macro removed - anti-forensics)\n\nAcquisition Summary:\n  Files acquired:       2,345 (14.7 GB)\n  Trashed items:        89 (234 MB)\n  Revisions:            8,912\n  Chain of custody hash (full archive):\n    SHA-256: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2\n  Output directory:     \u002Facquisition\u002Fgdrive\u002F\n  Acquisition log:      \u002Facquisition\u002Fgdrive\u002Facquisition_log.csv\n  Completion Time:      2024-01-19 08:18:47 UTC\n```\n","# Performing Cloud Storage Forensic Acquisition\n\n## Overview\n\nCloud storage forensic acquisition involves collecting digital evidence from services like Google Drive, OneDrive, Dropbox, and Box through both API-based remote acquisition and local endpoint artifact analysis. Modern investigations must address the challenge that cloud-synced files may exist in multiple states: locally synchronized, cloud-only (on-demand), cached, and deleted. Endpoint devices that have synchronized with cloud storage contain a wealth of metadata about locally synced files, files present only in the cloud, and even deleted items recoverable from cache folders. API-based acquisition using service-specific APIs provides direct access to remote data with valid credentials and proper legal authorization.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing cloud storage forensic acquisition\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n\n- Legal authorization (warrant, consent, or corporate policy) for cloud data access\n- Valid user credentials or administrative access tokens\n- Magnet AXIOM Cloud, Cellebrite Cloud Analyzer, or equivalent tool\n- KAPE with cloud storage target files\n- Python 3.8+ with google-api-python-client, msal, dropbox SDK\n- Network connectivity for API-based acquisition\n\n## Acquisition Methods\n\n### Method 1: API-Based Remote Acquisition\n\n#### Google Drive API Acquisition\n\n```python\nfrom google.oauth2.credentials import Credentials\nfrom googleapiclient.discovery import build\nfrom googleapiclient.http import MediaIoBaseDownload\nimport io\nimport os\nimport json\nfrom datetime import datetime\n\n\nclass GoogleDriveForensicAcquisition:\n    \"\"\"Forensically acquire files and metadata from Google Drive via API.\"\"\"\n\n    def __init__(self, credentials_path: str, output_dir: str):\n        self.creds = Credentials.from_authorized_user_file(credentials_path)\n        self.service = build(\"drive\", \"v3\", credentials=self.creds)\n        self.output_dir = output_dir\n        os.makedirs(output_dir, exist_ok=True)\n        self.acquisition_log = []\n\n    def list_all_files(self, include_trashed: bool = True) -> list:\n        \"\"\"List all files including trashed items.\"\"\"\n        files = []\n        page_token = None\n        query = \"\" if include_trashed else \"trashed = false\"\n\n        while True:\n            results = self.service.files().list(\n                q=query,\n                pageSize=1000,\n                fields=\"nextPageToken, files(id, name, mimeType, size, \"\n                       \"createdTime, modifiedTime, trashed, trashedTime, \"\n                       \"owners, sharingUser, permissions, md5Checksum, \"\n                       \"parents, webViewLink, driveId)\",\n                pageToken=page_token\n            ).execute()\n\n            files.extend(results.get(\"files\", []))\n            page_token = results.get(\"nextPageToken\")\n            if not page_token:\n                break\n\n        return files\n\n    def download_file(self, file_id: str, file_name: str, mime_type: str) -> str:\n        \"\"\"Download a file from Google Drive preserving forensic integrity.\"\"\"\n        output_path = os.path.join(self.output_dir, file_name)\n\n        if mime_type.startswith(\"application\u002Fvnd.google-apps\"):\n            export_formats = {\n                \"application\u002Fvnd.google-apps.document\": \"application\u002Fpdf\",\n                \"application\u002Fvnd.google-apps.spreadsheet\": \"application\u002Fvnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n                \"application\u002Fvnd.google-apps.presentation\": \"application\u002Fpdf\",\n            }\n            export_mime = export_formats.get(mime_type, \"application\u002Fpdf\")\n            request = self.service.files().export_media(fileId=file_id, mimeType=export_mime)\n        else:\n            request = self.service.files().get_media(fileId=file_id)\n\n        with io.FileIO(output_path, \"wb\") as fh:\n            downloader = MediaIoBaseDownload(fh, request)\n            done = False\n            while not done:\n                _, done = downloader.next_chunk()\n\n        self.acquisition_log.append({\n            \"timestamp\": datetime.utcnow().isoformat(),\n            \"file_id\": file_id,\n            \"file_name\": file_name,\n            \"output_path\": output_path,\n            \"action\": \"downloaded\"\n        })\n        return output_path\n\n    def get_activity_log(self, file_id: str) -> list:\n        \"\"\"Retrieve activity\u002Frevision history for a specific file.\"\"\"\n        revisions = self.service.revisions().list(\n            fileId=file_id,\n            fields=\"revisions(id, modifiedTime, lastModifyingUser, size, md5Checksum)\"\n        ).execute()\n        return revisions.get(\"revisions\", [])\n\n    def export_acquisition_report(self) -> str:\n        \"\"\"Export acquisition log for chain of custody documentation.\"\"\"\n        report_path = os.path.join(self.output_dir, \"acquisition_log.json\")\n        with open(report_path, \"w\") as f:\n            json.dump({\n                \"acquisition_start\": self.acquisition_log[0][\"timestamp\"] if self.acquisition_log else None,\n                \"acquisition_end\": datetime.utcnow().isoformat(),\n                \"total_files\": len(self.acquisition_log),\n                \"entries\": self.acquisition_log\n            }, f, indent=2)\n        return report_path\n```\n\n#### OneDrive \u002F Microsoft 365 API Acquisition\n\n```python\nimport msal\nimport requests\nimport os\nimport json\nfrom datetime import datetime\n\n\nclass OneDriveForensicAcquisition:\n    \"\"\"Forensically acquire files and metadata from OneDrive via Microsoft Graph API.\"\"\"\n\n    def __init__(self, client_id: str, tenant_id: str, client_secret: str, output_dir: str):\n        self.output_dir = output_dir\n        os.makedirs(output_dir, exist_ok=True)\n\n        authority = f\"https:\u002F\u002Flogin.microsoftonline.com\u002F{tenant_id}\"\n        self.app = msal.ConfidentialClientApplication(\n            client_id, authority=authority, client_credential=client_secret\n        )\n        token_result = self.app.acquire_token_for_client(\n            scopes=[\"https:\u002F\u002Fgraph.microsoft.com\u002F.default\"]\n        )\n        self.access_token = token_result.get(\"access_token\")\n        self.headers = {\"Authorization\": f\"Bearer {self.access_token}\"}\n        self.base_url = \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\"\n\n    def list_user_files(self, user_id: str) -> list:\n        \"\"\"List all files in user's OneDrive.\"\"\"\n        url = f\"{self.base_url}\u002Fusers\u002F{user_id}\u002Fdrive\u002Froot\u002Fchildren\"\n        files = []\n        while url:\n            response = requests.get(url, headers=self.headers)\n            data = response.json()\n            files.extend(data.get(\"value\", []))\n            url = data.get(\"@odata.nextLink\")\n        return files\n\n    def download_file(self, user_id: str, item_id: str, filename: str) -> str:\n        \"\"\"Download a file from OneDrive.\"\"\"\n        url = f\"{self.base_url}\u002Fusers\u002F{user_id}\u002Fdrive\u002Fitems\u002F{item_id}\u002Fcontent\"\n        response = requests.get(url, headers=self.headers, stream=True)\n        output_path = os.path.join(self.output_dir, filename)\n        with open(output_path, \"wb\") as f:\n            for chunk in response.iter_content(chunk_size=8192):\n                f.write(chunk)\n        return output_path\n\n    def get_deleted_items(self, user_id: str) -> list:\n        \"\"\"Retrieve items from OneDrive recycle bin.\"\"\"\n        url = f\"{self.base_url}\u002Fusers\u002F{user_id}\u002Fdrive\u002Fspecial\u002Frecyclebin\u002Fchildren\"\n        response = requests.get(url, headers=self.headers)\n        return response.json().get(\"value\", [])\n```\n\n### Method 2: Local Endpoint Artifact Collection\n\n#### KAPE Targets for Cloud Storage\n\n```powershell\n# Collect all cloud storage artifacts using KAPE\nkape.exe --tsource C: --tdest C:\\Output\\CloudArtifacts --target GoogleDrive,OneDrive,Dropbox,Box\n\n# OneDrive artifacts\n# %USERPROFILE%\\AppData\\Local\\Microsoft\\OneDrive\\logs\\\n# %USERPROFILE%\\AppData\\Local\\Microsoft\\OneDrive\\settings\\\n# %USERPROFILE%\\OneDrive\\\n\n# Google Drive artifacts\n# %USERPROFILE%\\AppData\\Local\\Google\\DriveFS\\\n# Contains metadata SQLite databases and cached files\n\n# Dropbox artifacts\n# %USERPROFILE%\\AppData\\Local\\Dropbox\\\n# %USERPROFILE%\\Dropbox\\.dropbox.cache\\\n# Contains filecache.dbx (encrypted SQLite), host.dbx, config.dbx\n```\n\n#### OneDrive Local Database Analysis\n\n```python\nimport sqlite3\nimport os\n\ndef analyze_onedrive_sync_engine(db_path: str) -> list:\n    \"\"\"Analyze OneDrive SyncEngineDatabase for file metadata.\"\"\"\n    conn = sqlite3.connect(db_path)\n    cursor = conn.cursor()\n\n    # Query for all tracked files including cloud-only items\n    cursor.execute(\"\"\"\n        SELECT fileName, fileSize, lastChange,\n               resourceID, parentResourceID, eTag\n        FROM od_ClientFile_Records\n        ORDER BY lastChange DESC\n    \"\"\")\n\n    files = []\n    for row in cursor.fetchall():\n        files.append({\n            \"filename\": row[0],\n            \"size\": row[1],\n            \"last_change\": row[2],\n            \"resource_id\": row[3],\n            \"parent_id\": row[4],\n            \"etag\": row[5]\n        })\n\n    conn.close()\n    return files\n```\n\n## Cloud Storage Artifacts Summary\n\n| Service | Local Database | Cache Location | Log Files |\n|---------|---------------|----------------|-----------|\n| OneDrive | SyncEngineDatabase.db | %LOCALAPPDATA%\\Microsoft\\OneDrive\\cache\\ | %LOCALAPPDATA%\\Microsoft\\OneDrive\\logs\\ |\n| Google Drive | metadata_sqlite_db | %LOCALAPPDATA%\\Google\\DriveFS\\{account}\\content_cache\\ | %LOCALAPPDATA%\\Google\\DriveFS\\Logs\\ |\n| Dropbox | filecache.dbx (encrypted) | %APPDATA%\\Dropbox\\.dropbox.cache\\ | %APPDATA%\\Dropbox\\logs\\ |\n| Box | sync_db | %LOCALAPPDATA%\\Box\\Box\\cache\\ | %LOCALAPPDATA%\\Box\\Box\\logs\\ |\n\n## References\n\n- SANS Cloud Storage Acquisition: https:\u002F\u002Fwww.sans.org\u002Fblog\u002Fcloud-storage-acquisition-from-endpoint-devices\n- Magnet AXIOM Cloud: https:\u002F\u002Fwww.magnetforensics.com\u002Fblog\u002Fhow-to-acquire-and-analyze-cloud-data-with-magnet-axiom\u002F\n- AWS Cloud Forensics Framework: https:\u002F\u002Fdocs.aws.amazon.com\u002Fprescriptive-guidance\u002Flatest\u002Fsecurity-reference-architecture\u002Fcyber-forensics.html\n- API-Based Forensic Acquisition of Cloud Drives: https:\u002F\u002Farxiv.org\u002Fabs\u002F1603.06542\n\n## Example Output\n\n```text\n$ python3 cloud_forensic_acquire.py --provider google-drive --auth \u002Ftokens\u002Fgdrive_token.json \\\n    --user jsmith@corporate.com --output \u002Facquisition\u002Fgdrive\n\nCloud Storage Forensic Acquisition Tool v3.2\n==============================================\nProvider:    Google Drive\nAccount:     jsmith@corporate.com\nStart Time:  2024-01-19 08:00:15 UTC\nAuth Method: Admin SDK (domain-wide delegation)\n\n[+] Enumerating files...\n    Total files:        2,345\n    Total folders:      178\n    Shared with me:     456\n    Trashed items:      89 (included in acquisition)\n    Total size:         14.7 GB\n\n[+] Acquiring file contents...\n    Downloaded:    2,345 \u002F 2,345  [████████████████████████████████] 100%\n    Errors:        0\n    Elapsed:       18m 32s\n\n[+] Acquiring metadata...\n    File metadata:      2,345 entries\n    Revision history:   8,912 revisions across 1,234 files\n    Sharing permissions: 3,456 permission entries\n    Activity log:       12,345 events\n\n[+] Acquiring trashed items...\n    Recovered:     89 \u002F 89 items (234 MB)\n\n--- Acquisition Log ---\nTimestamp (UTC)          | Action           | File                                    | Size    | SHA-256\n2024-01-19 08:00:45      | Downloaded       | \u002FMy Drive\u002FFinance\u002FQ4_Report.xlsm        | 245 KB  | 7a3b8c9d...\n2024-01-19 08:00:46      | Downloaded       | \u002FMy Drive\u002FFinance\u002FBudget_2024.xlsx       | 1.2 MB  | 8b4c9d0e...\n...\n2024-01-19 08:02:12      | Trash-Recovered  | \u002FTrash\u002Femployee_list_full.csv            | 4.5 MB  | 9c5d0e1f...\n2024-01-19 08:02:13      | Trash-Recovered  | \u002FTrash\u002Fnetwork_diagram_v3.vsdx          | 2.1 MB  | 0d6e1f2a...\n2024-01-19 08:02:14      | Trash-Recovered  | \u002FTrash\u002Fcredentials_backup.kdbx          | 128 KB  | 1e7f2a3b...\n\n--- Sharing Analysis ---\nFiles Shared Externally:\n  \u002FMy Drive\u002FFinance\u002FQ4_Report.xlsm     → j.smith.personal8842@protonmail.com (2024-01-16 03:10 UTC)\n  \u002FMy Drive\u002FHR\u002Femployee_list_full.csv   → j.smith.personal8842@protonmail.com (2024-01-16 03:12 UTC)\n  \u002FMy Drive\u002FIT\u002Fnetwork_diagram_v3.vsdx  → anonymous (link sharing, 2024-01-16 03:15 UTC)\n\n--- Revision History (Suspicious) ---\nFile: \u002FMy Drive\u002FFinance\u002FQ4_Report.xlsm\n  Rev 1:  2024-01-10 09:00:00 UTC  (245 KB)  - Original\n  Rev 2:  2024-01-15 14:35:00 UTC  (248 KB)  - Modified (macro added)\n  Rev 3:  2024-01-16 03:05:00 UTC  (245 KB)  - Reverted (macro removed - anti-forensics)\n\nAcquisition Summary:\n  Files acquired:       2,345 (14.7 GB)\n  Trashed items:        89 (234 MB)\n  Revisions:            8,912\n  Chain of custody hash (full archive):\n    SHA-256: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2\n  Output directory:     \u002Facquisition\u002Fgdrive\u002F\n  Acquisition log:      \u002Facquisition\u002Fgdrive\u002Facquisition_log.csv\n  Completion Time:      2024-01-19 08:18:47 UTC\n```\n",{"name":5,"note":25,"tags":26,"author":37,"domain":38,"source":39,"license":15,"version":40,"nist_csf":41,"subdomain":46,"description":7,"nist_ai_rmf":47,"mitre_attack":51,"source_commit":57,"atlas_techniques":58},"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.",[27,28,29,30,31,32,33,34,35,36],"cloud-forensics","google-drive","onedrive","dropbox","box","cloud-acquisition","api-forensics","sync-client","endpoint-artifacts","magnet-axiom","mahipal","cybersecurity","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","1.0",[42,43,44,45],"RS.AN-01","RS.AN-03","DE.AE-02","RS.MA-01","digital-forensics",[48,49,50],"MEASURE-2.7","MAP-5.1","MANAGE-2.4",[52,53,54,55,56],"T1005","T1074","T1119","T1070","T1059","04450304b12645cb2b974ab96d28c0664758a88d",[59,60,61],"AML.T0070","AML.T0066","AML.T0082","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition",2,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-14 13:24:09",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill performing-cloud-storage-forensic-acquisition",{"tool":78,"command":79},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill performing-cloud-storage-forensic-acquisition",{"tool":81,"command":82},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill performing-cloud-storage-forensic-acquisition","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition\u002FSKILL.md",true,[86,92,96,102,106,110,116],{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"assets\u002Ftemplate.md","ASSET","资产文件",556,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition\u002Fassets\u002Ftemplate.md",{"path":93,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":97,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fapi-reference.md","REFERENCE","参考文档",6146,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition\u002Freferences\u002Fapi-reference.md",{"path":103,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Fstandards.md",784,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition\u002Freferences\u002Fstandards.md",{"path":107,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Fworkflows.md",824,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition\u002Freferences\u002Fworkflows.md",{"path":111,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":114,"sourceHtmlUrl":115},"scripts\u002Fagent.py","SCRIPT","脚本",10800,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition\u002Fscripts\u002Fagent.py",{"path":117,"resourceType":112,"resourceTypeDesc":113,"sizeBytes":118,"sourceHtmlUrl":119},"scripts\u002Fprocess.py",4962,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-cloud-storage-forensic-acquisition\u002Fscripts\u002Fprocess.py",[121,129,136,144,152,160],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":125,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":140,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":20},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":148,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":20},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":156,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":20},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":161,"name":162,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":20},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]