Malicious smart contracts: how they’re built, and how they steal your money (2024)

Malicious smart contracts: how they’re built, and how they steal your money (3)

For many people that buy, trade, and sell crypto, smart contracts have an air of mystique around them. Everyone has used one, but not many people have seen one, and even fewer people know how to build one.

This experience gap allows savvy hackers to trick people out of their hard-earned digital money. This article goes over malicious smart contracts: how they work, how to spot one, and how to avoid them altogether.

Malicious smart contracts are smart contracts that attempt to steal or misuse deposited funds. Malicious smart contracts come in many variations, so I’ll give a couple of examples:

Malicious contracts are the execution layers of crypto smart contract scams. These scams rely on social engineering to get you to sign their smart contracts, and then execute the theft once the smart contract is signed.

A famous example of one of these crypto smart contract scams was the $1.7m February 2022 OpenSea phishing attack.

Malicious smart contracts: how they’re built, and how they steal your money (4)

By opening up this phishing email, users were asked to sign a malicious smart contract that transferred all their NFTs to a hacker’s address.

If you’re a tech-savvy web3 veteran, you might be wondering, “who actually falls for these scams?” The truth is that it’s difficult to detect malicious smart contracts, and in some cases, even mathematically impossible.

Malicious smart contracts: how they’re built, and how they steal your money (5)

There’s a theorem in computer science called Rice’s theorem, which essentially states that properties of programs can never be algorithmically determined.

The consequence of Rice’s theorem is that we’ll never be sure if the contracts we’re interacting with are malicious.

We will never be sure if the contracts we’re interacting with are malicious or not.

Falling for a malicious contract can happen to anyone. And even though most malicious contracts are fairly easy to spot to a well-informed eye, there are ways to obfuscate code such that the behavior of the smart contract is unknown. There really are no ways to fully guard yourself against malicious contracts at a programmatic level.

There’s one main difference between web3 and web2 personal security: in web3, it only takes a single click to lose everything you own. Outside of that, web3 and web2 scams have the same two steps:

  1. Social engineering: a person/organization will convince you to enter their website.
  2. Payload: the website/app has a mechanism that steals your money. In web2, that’s usually a wire transfer. In web3, it’s a single click of a smart contract.

As previously established, it’s difficult (and sometimes impossible) to determine if a smart contract is malicious or not. That means that the only way to protect yourself from web3 scams is to detect and avoid the portions of the scam that lead you to sign the malicious smart contract.

Detecting social engineering

Social engineering in web3 scamming takes many forms, but there’s a few categories to watch out for.

  • Giveaway: a scammer will tell you that you’re eligible for a giveaway, and ask you to sign a smart contract on their payload website.
Malicious smart contracts: how they’re built, and how they steal your money (6)
  • Manipulation: a scammer will pose as a “trading buddy,” letting you know about profitable new projects they come across. Eventually, they lead you to a payload website of their own creation.
  • Impersonation: a scammer will pose as a MetaMask engineer and ask you to provide your private key, sometimes even over Twitter or Discord.

Be wary of anyone being overly kind or supportive to you over the Internet. If it sounds too good to be true, it probably is! You cannot trust anybody, no matter who they claim to be.

Detecting a payload site

If you somehow fall victim to social engineering without detecting it, it’s not too late! Although malicious smart contracts may be difficult to detect, payload sites have some common traits that can help you detect a scam before it’s too late.

Malicious smart contracts: how they’re built, and how they steal your money (7)

This site is an example of a payload site, and it looks relatively normal. It’s a decent looking website advertising a plausible product. If you’re looking very closely, you’ll see a few grammatical mistakes, but nothing egregious enough to make you turn your head.

Scamming has evolved since the 2000s: the payload sites of today have big budgets, and are going to look convincing and professional. A general rule is that, most times, you won’t know if a site is a payload unless you look outside the site. Here are the personal steps I take to determine if a site is a payload or not:

  1. Look at the URL. If it’s something like asdlkjyndz242.fjk334.ru… don’t proceed. Sometimes, the URL can look legitimate; for example, the above screenshot is on a .com domain and is on https.
  2. Search for their social media profiles. Many of these scam sites have Twitter profiles with a few dead giveaways. The payload site above had a Twitter page with 25k (fake) followers, yet had no tweets, no Discord, & no interaction with members of its community.
  3. A little trick: “[page name] scam reddit” on Google. There will sometimes be real people commenting about the scam on Reddit… that being said, take everything you see online with a grain of salt.
  4. Look for content being produced by the company. Almost every legitimate crypto company has spent significant time and resources creating educational content on crypto. Try to find their blog.
  5. If you’ve done all of these, and no red flags go off, make a final decision on whether or not to use the site. Do a short background check on the person that referred you to the site, do your due diligence, and check once more before you click that button.
Malicious smart contracts: how they’re built, and how they steal your money (8)

It’s important that you follow these rules for every site you come across. You probably won’t know that you’re on a payload website if you already fell for the social engineering, so just assume every website is a payload, and proceed with pessimism.

A note on effectiveness

These tips are, by no means, failsafe measures to avoid scams and malicious contracts. Following these rules, however, greatly reduces your risk horizon. Almost all web2 and web3 scams are targeted towards optimistic, newbie users, such as the elderly and the inexperienced. It’s cheaper, easier, and more profitable to market towards populations that are wholly unable to detect scams and social engineering. While there are scams that will circumvent these tips & exploit even the most knowledgeable of users, these scams are in the minority of minorities.

Malicious smart contracts are difficult to detect without much knowledge, and can sometimes be impossible to detect if coded as such. That being said, malicious smart contracts don’t work on their own: they need a payload website & social engineering to successfully steal your money.

While malicious smart contracts themselves are difficult to identify, there are general rules you can follow to avoid interacting with them in the first place.

Harpie gives crypto traders the power to defend themselves against theft. With their proprietary on-chain security solution, Harpie safeguards wallets in real time by monitoring for and blocking malicious transactions before they confirm on chain. Harpie simplifies crypto security with an intuitive and holistic platform, helping users of all experience levels eliminate the threat of blockchain-based theft. Harpie launched in September 2022 and is backed by leading Web3 names including Dragonfly Capital, Coinbase Ventures, and OpenSea.

Malicious smart contracts: how they’re built, and how they steal your money (2024)
Top Articles
iPad 5th generation- supported - Apple Community
CIS Controls: What They Are and How They Are Used
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
Non Sequitur
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Merrill Bechtelar CPA

Last Updated:

Views: 6173

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Merrill Bechtelar CPA

Birthday: 1996-05-19

Address: Apt. 114 873 White Lodge, Libbyfurt, CA 93006

Phone: +5983010455207

Job: Legacy Representative

Hobby: Blacksmithing, Urban exploration, Sudoku, Slacklining, Creative writing, Community, Letterboxing

Introduction: My name is Merrill Bechtelar CPA, I am a clean, agreeable, glorious, magnificent, witty, enchanting, comfortable person who loves writing and wants to share my knowledge and understanding with you.