Skip to content
Crypto.world

Research

Detection and Analysis of Sensitive and Illegal Content on the Ethereum Blockchain Using Machine Learning Techniques

Ethereum lets anyone attach arbitrary data to a transaction, and because the ledger is immutable that data is stored permanently and visible to anyone. The paper asks a simple but under-examined…

Detection and Analysis of Sensitive and Illegal Content on the Ethereum Blockchain Using Machine Learning Techniques
arXiv
2512.17411
Published
2025-12-19
Authors
Xingyu Feng

AI summary

Overview

Research area: Blockchain data forensics and content moderation — specifically, identifying, extracting and classifying data that users have embedded into Ethereum transaction input fields, using machine learning for sentiment and image classification.

Technical level: Intermediate. The reader needs some familiarity with Ethereum transaction structure (input data field, gas), encoding formats (hex, UTF-8, file signatures), and basic NLP/image-classification concepts, but the algorithms themselves are described in accessible, step-by-step terms.

Scope (one sentence): The paper synchronises a full Ethereum node, scans roughly 13 million blocks of transaction data, reconstructs embedded files, images and text (including files split across multiple transactions), and applies FastText sentiment classification and the NSFWJS image detector to surface sensitive, illegal or harmful content.

What This Paper Is About

Ethereum lets anyone attach arbitrary data to a transaction, and because the ledger is immutable that data is stored permanently and visible to anyone. The paper asks a simple but under-examined question: what is actually being written into Ethereum's transaction input field, and how much of it is private, offensive, illegal or malicious? The goal is to build algorithms that can find and reconstruct this embedded content, then use machine learning to sort it into categories (neutral/positive/negative text, indecent images) so that harmful material can be documented and regulators can be given evidence-based guidance.

Key Contributions

  1. First large-scale recovery of embedded data from Ethereum. The authors report a comprehensive identification and restoration pass over Ethereum up to block 13 million, recovering 175 common files, 296 image files and 91,206 text records — a substantially larger and broader recovery than the prior Bitcoin and Ethereum studies they compare against in Table 2.
  2. Three purpose-built restoration algorithms. A text restoration algorithm (UTF-8 filtering plus Chinese/English detection), a file restoration algorithm (matching hexadecimal file-header and trailer signatures), and a multi-transaction file-splitting restoration algorithm that reassembles a single file spread across several transactions from the same sender.
  3. Machine-learning classification of recovered content. FastText is trained on labelled Weibo and Twitter sentiment datasets and applied to the recovered text, while the open-source NSFWJS library is used to flag indecent images. The authors report 0.925 accuracy for Chinese and 0.949 for English on the trained FastText model, and the abstract reports a 0.9 accuracy after parameter tuning.
  4. A documented inventory of harmful content plus policy discussion. The paper evidences personal data leakage, explicit images, hate symbols, divisive political speech, racial discrimination and sensitive information about Chinese government officials, and proposes preventative measures for regulators.

Main Findings

  • The dataset is dominated by text, but images are the most common file type. Of the recovered content, the paper reports 175 common files, 296 images and 91,206 texts. Images account for 63% of embedded files (231 complete, 65 incomplete), while "other" file types make up 37%: 72 compressed files, 79 html files, 19 pdf files, 3 exe files and 2 docx files.
  • Sentiment split of recovered text. Table 5 reports 17,043 Chinese texts (9,450 neutral, 4,115 positive, 3,479 negative) and 74,163 English texts (60,739 neutral, 1,093 positive, 12,331 negative). The abstract reports the aggregate figures as 70,189 neutral, 5,208 positive and 15,810 negative.
  • Seven indecent images detected. Using NSFWJS, the authors found seven erotic images — four female nudes and three male nudes, one containing an illegal URL link. The abstract states these were detected with 100% accuracy; the paper notes NSFWJS's own reported accuracy is about 90% for the small model and about 93% for the medium model.
  • A Nazi flag emblem is permanently on-chain. A black, white and red Nazi flag emblem was found among the recovered image files, a symbol banned from public places in most European countries.
  • Personal privacy leakage is widespread. Thirty images were NFT-encrypted artwork sent to the CreepyCryptos contract address and 55 were personal records (group photos, selfies, funny images) that expose address holders' identities.
  • Encrypted and foreign-language archives. Of 72 recovered compressed files, 30 were encrypted and could not be opened. Of the 42 openable archives, 40 contained Russian-language content — php files, html files, personal blogs, literary works and religious speeches — all embedded in April 2019.
  • Three exe files, two of them likely malware. All three were embedded by the same account. VirusTotal rated two identical files at 80% probability of being a virus and the third at 87%.
  • File-splitting restoration works but is imperfect. Of 54 incomplete pictures, 10 were found to be split-embedded; after applying the multi-transaction algorithm, 6 complete pictures were recovered (a blockchain proof-of-work map, a map of East Africa, a picture of human eyes, 2 landscapes and 1 cartoon bird). Three unopenable pdfs were also restored: the Ethereum white paper, a research paper about gorillas, and a Foxit software advertisement. Restored split images show colour changes at the seams and imperfect joins; the authors attribute the joins to smart-contract method names written into the input field, but state the cause of the colour change remains unidentified.
  • Text content is dominated by token and financial activity. The most frequent English content concerns EOS tokens with 31,958 records, plus 9,337 OTC-related records and 6,892 token offering/marketing advertisements; "EOS" appears more than 400,000 times, "token" more than 360,000 times and "OTC" more than 240,000 times. Chinese text centres on blockchain and finance vocabulary such as "coin", "development" and "investment".
  • Wishing messages are the single largest Chinese use case. About 2,705 wishing-related items were found; the five addresses receiving the most content received wishes, copyright certification, logistics traceability, financial analysis and sexual harassment records respectively.
  • Link analysis surfaced a dark-web address. Among the link-type text, 720 email addresses were sent by ICO participants, 96 URLs contain "http", 218 share the identical URL "podcrypt.app", 93 share "ddblock.io", and one URL ends in ".onion"; the authors did not open it.
  • Sensitive personal data on Chinese officials. In October 2020 someone embedded the personal information of several deputy ministerial-level cadres and national leadership team members — ID numbers, phone numbers, email addresses, work and home addresses. The authors verified names and work units through public channels and found the information true, though ID and phone numbers could not be further verified.
  • Fraud is recorded on-chain. The paper cites a fake token investment scam based on the Alpha Finance protocol, recording transaction hash 0x4ef4ba3f39507b784892df99735f627d6c9e66173c5b6c9e7a8 and address 0xc88fdbcaa45142c0cdd1da4eea79ed40022f15da.

Methodology in Plain English

The authors ran a local full Ethereum node using the Parity/OpenEthereum client and pulled every transaction in every block via the trace_block JSON-RPC API, covering block 0 through 13 million — from the mainnet launch on 1 November 2015 to 10 August 2021. They extracted only the input field, since it holds up to about 700KB versus about 32KB for other fields.

Text. Raw input is a hexadecimal string. They convert it to bytes, discard byte sequences that do not form valid UTF-8 (removing "gibberish"), then check whether the surviving bytes fall in the Chinese or English UTF-8 ranges and decode accordingly.

Files. Every file format begins with a fixed hexadecimal signature (for example png starts 89 50 4E 47, pdf starts 25 50 44 46). The algorithm searches each input field for a known signature, trims everything before it (and everything after the trailer signature where one exists, such as gif's 0x003B), then writes the bytes back out as a file.

Split files. If a file is too large for one transaction, the same sender may spread it across several. The algorithm takes the transaction containing the header signature, walks backwards through blocks, concatenating that sender's input data, until it finds the trailer signature — searching up to 6,700 blocks, roughly 24 hours at ~13 seconds per block — then hands the concatenated hex to the file restoration algorithm.

Classification. Recovered text was classified with FastText, trained on a public labelled Weibo dataset and an English Twitter sentiment dataset, with labels neutral/positive/negative; the trained model was then applied to the recovered texts, with per-label probabilities that can be thresholded for customised filtering. Images were screened with NSFWJS, a TensorFlow.js library that runs content detection and flags indecent images.

Note on scale: the paper states "about 3.4 billion transaction records" in its data-collection section and abstract-adjacent text, but elsewhere describes "approximately 300 million" transactions and Table 2 lists "about 250 million transactions." The figures are not reconciled in the provided text.

Why This Matters

Blockchain immutability is usually framed as a virtue; this paper shows its cost. Once harmful content is written to Ethereum it cannot be removed, only observed — which means detection and documentation are the only available responses, and the evidence base for regulation has to come from studies like this one.

Impact on research: The paper provides a reproducible pipeline for on-chain content forensics and extends prior work that was limited to Bitcoin's much smaller embedding capacity or to smaller Ethereum block ranges. The multi-transaction reassembly algorithm addresses a gap earlier studies did not cover.

Real-world applications:

  • Blockchain analytics and forensics firms can adapt the signature-matching and split-reassembly approach to build monitoring dashboards that flag illegal content as it is posted.
  • Regulators and law enforcement gain a documented, verified example of personal data of public officials being permanently exposed, supporting arguments for on-chain content rules.
  • Block explorers and wallet providers can use the text classification to warn users before they view or interact with transactions carrying abusive or explicit payloads.
  • Privacy education — the finding that 55 recovered photos are ordinary personal records shows users routinely leak identifying information by treating the chain as free storage.

Industry relevance: The findings touch NFT platforms (artwork deliberately stored on-chain), DeFi (fraud records and scam disclosures), and compliance teams who must reconcile censorship resistance with legal obligations around illegal imagery and hate symbols.

Future Directions

  1. Explaining and fixing split-file artifacts. The colour discontinuity at reassembly seams is unresolved, and the authors can only speculate that smart-contract method calls injected into the input field are responsible. Confirming the mechanism would let the reassembly algorithm handle contract-mediated uploads cleanly.
  2. Extending coverage beyond block 13 million and beyond the truncated dataset. The reported transaction counts are inconsistent (3.4 billion vs. ~300 million vs. ~250 million), and the scan stops in August 2021; a re-run over current blocks and a reconciled count would show whether embedding behaviour has grown.
  3. Handling encrypted and inaccessible payloads. Thirty of the 72 recovered archives were encrypted and the authors explicitly state that decryption is outside the scope of the paper — a clear open problem for law-enforcement use cases.
  4. Validating and mitigating sensitive-data exposure. The authors verified names and work units of the exposed officials through public channels but could not confirm ID and phone numbers. The preventative measures referenced to Section 6 are not included in the provided excerpt, so their specifics are not reported here; evaluating whether such measures actually work is the natural next step.

Target Audience

Blockchain security and forensics researchers; graduate students working on on-chain data analysis; compliance and trust-and-safety teams at exchanges, wallet providers and NFT marketplaces; and policy analysts who need concrete evidence of what illegal and sensitive material actually appears on a public blockchain and how it can be found.

Authors’ abstract

Blockchain technology, lauded for its transparent and immutable nature, introduces a novel trust model. However, its decentralized structure raises concerns about potential inclusion of malicious or illegal content. This study focuses on Ethereum, presenting a data identification and restoration algorithm. Successfully recovering 175 common files, 296 images, and 91,206 texts, we employed the FastText algorithm for sentiment analysis, achieving a 0.9 accuracy after parameter…

The full abstract on arXiv
Read the original paper