The Language of Legal and Illegal Activity on the Darknet

Leshem Choshen, Dan Eldad, Daniel Hershcovich, Elior Sulem, Omri Abend

Abstract

This study investigates the linguistic differences between legal and illegal activities on the Darknet (Tor network). By comparing drug-related Onion sites to eBay listings, researchers demonstrate that illegal content possesses unique syntactic structures and specialized jargon. The findings reveal that standard NLP tools struggle with this domain shift, highlighting the necessity for specialized domain adaptation in monitoring illicit online marketplaces.

Introduction: The Challenge of Darknet NLP

The Darknet, specifically the Tor network, serves as a dual-purpose infrastructure: it provides essential privacy for citizens in restrictive regimes while simultaneously hosting marketplaces for illicit trade. For law enforcement and researchers, the scale of these activities necessitates automated monitoring via Natural Language Processing (NLP).

However, a significant hurdle exists: most NLP tools are trained on "Clear net" data such as Wikipedia or news articles. This research addresses whether the language of illegal Darknet transactions differs fundamentally from legal ones. If a significant "domain shift" exists—akin to using a medical dictionary to decipher street slang—standard models will inevitably fail.

Methods and Experimental Setup

The researchers framed the investigation as a text classification and linguistic analysis task. They evaluated several model architectures, ranging from traditional baselines like Naive Bayes (NB) and Support Vector Machines (SVM) to advanced neural networks, including BiLSTMs (seq2vec) and Attention-based models (ELMo).

To isolate the linguistic features driving classification, the team performed ablation studies:

  • Ablation: Removing content words (nouns, verbs) or function words (prepositions, articles).
  • Syntactic Analysis: Replacing words with Part-of-Speech (POS) tags to analyze purely structural patterns.
  • Wikification: Measuring the percentage of named entities linkable to Wikipedia to gauge the coverage of general-purpose knowledge bases.

Datasets

The study utilized two primary corpora:

  • Onion Corpus: Extracted from the DUTA-10K dataset, focusing on the "drugs" sub-domain, manually split into legal (e.g., pharmacies) and illegal (e.g., narcotics marketplaces) categories.
  • eBay Corpus: A control group of 118 drug-related item descriptions (e.g., "marijuana" seeds or tools) representing legal commerce on the Clear net.

Analysis of Linguistic Divergence

One of the study's most striking findings is the "Equilateral Triangle of Domains": Legal Onion sites, Illegal Onion sites, and eBay pages are roughly equidistant in terms of vocabulary. This suggests that the "Legal Darknet" is as linguistically distinct from the "Illegal Darknet" as it is from the standard web.

The Knowledge Gap

The researchers found that Illegal Onion sites had the lowest "Wikifiability." Standard Named Entity Recognition (NER) tools frequently misidentified drug slang as geopolitical entities or failed to find them in Wikipedia entirely.

Percentage of entities linkable to Wikipedia (Wikifiability) across domains.

Syntax as a Signature

Even when stripping away actual words and analyzing only the sequence of POS tags—the "skeleton" of the sentences—models could distinguish legal from illegal content with approximately 71% accuracy. This indicates that illegal sellers and legal pharmacies employ fundamentally different structural patterns in their communications.

Key Results

The experimental results highlighted a surprising trend: sophisticated neural models often underperformed compared to simpler baselines like Naive Bayes. This is likely due to the small dataset sizes and the highly specialized vocabulary (slang, encryption keys) that conflicts with pre-trained embeddings.

Classification accuracy across different models and feature sets for drug-related content.

As shown in the classification results, a simple Bag-of-Words approach achieved ~90% accuracy in distinguishing legal vs. illegal drug sites. Furthermore, models trained on drug sites generalized well to forum data (~89% accuracy without function words), suggesting universal linguistic markers of "illegality" that transcend specific topics.

Conclusion and Future Directions

The primary limitation of this work is the dataset size, particularly within the niche "drugs" category, which hindered data-hungry neural models. Additionally, the focus remained on English-language sites, whereas the Darknet is a global, multilingual environment.

The findings underscore the critical need for domain adaptation. Simply applying models trained on the Clear net is insufficient for high-stakes intelligence. Future efforts should focus on developing specialized NLP tools and knowledge bases tailored specifically to the unique linguistic landscape of the Darknet.

Summary updated

BibTeX
@inproceedings{choshen2019language,
  author = {Leshem Choshen and Dan Eldad and Daniel Hershcovich and Elior Sulem and Omri Abend},
  title = {{The Language of Legal and Illegal Activity on the Darknet}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-1419},
}
Figure