InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Follow publication

Member-only story

Clipboard Hijacking 😈

What it is, how to do it, and how to prevent it

Martin Thoma
InfoSec Write-ups
Published in
4 min readJan 24, 2023

Photo by Markus Winkler on Unsplash

We regularly copy and paste stuff. Sometimes, the copied characters contain important information such as bank numbers or crypto wallet addresses. Attackers can replace the copied address with an address under their control. Hence you might accidentally transfer money to an attacker instead of your original target.

Why it Matters

I suspect that malware is using the clipboard all the time to steal credentials, but I haven’t found many reputable sources for specific cases:

  • 2020: An iOS update revealed, that several apps were reading the clipboard without their users knowledge (source)
  • 2019: Fake MetaMask App That Hijacks Ethereum dApps was in the Android Play Store (source)
  • 2019: The archive server of the PaleMoon browser was hijacked using ClipBanker (source)

How is Clipboard Hijacking executed?

Clipboard Hijacking requires malware to be executed on the victims machine. It only works on end users machines as servers typically don’t have anything in the clipboard.

Reading the clipboard can be done in any language. For example, with JavaScript:

<!DOCTYPE html>
<html>

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by Martin Thoma

I’m a Software Engineer with over 10 years of Python experience (Backend/ML/AI). Support me via https://martinthoma.medium.com/membership

No responses yet

Write a response