Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_TOOL_EXFIL_Sharpbox

Detect SharpBox, C# tool for compressing, encrypting, and exfiltrating data to Dropbox using the Dropbox API

Suspicious / huntingditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-09-25
Score / Quality
75 / 75

What this rule detects

Detect SharpBox, C# tool for compressing, encrypting, and exfiltrating data to Dropbox using the Dropbox API

Targets: Windows PE.

It defines 12 patterns (12 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

indicator-tool-exfil-sharpbox.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_EXFIL_Sharpbox : FILE
{
	meta:
		description = "Detect SharpBox, C# tool for compressing, encrypting, and exfiltrating data to Dropbox using the Dropbox API"
		author = "ditekSHen"
		id = "cd834fe2-dc77-509d-a8f9-d631f395bcd8"
		date = "2020-11-06"
		modified = "2024-09-25"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L1061-L1080"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "b03ab3786b2a2e6774d94be4edf700a7154d8d400c7b2b31c73c68ce9fe0c08a"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "UploadData" fullword ascii
		$s2 = "isAttached" fullword ascii
		$s3 = "DecryptFile" fullword ascii
		$s4 = "set_dbxPath" fullword ascii
		$s5 = "set_dbxToken" fullword ascii
		$s6 = "set_decrypt" fullword ascii
		$s7 = "GeneratePass" fullword ascii
		$s8 = "FileUploadToDropbox" fullword ascii
		$s9 = "\\SharpBox.pdb" ascii
		$s10 = "https://content.dropboxapi.com/2/files/upload" fullword wide
		$s12 = "Dropbox-API-Arg: {\"path\":" wide
		$s13 = "X509Certificate [{0}] Policy Error: '{1}'" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and 7 of them
}

Strings (12 patterns)

IdentifierTypeValueModifiers
$s1text"UploadData"fullword ascii
$s2text"isAttached"fullword ascii
$s3text"DecryptFile"fullword ascii
$s4text"set_dbxPath"fullword ascii
$s5text"set_dbxToken"fullword ascii
$s6text"set_decrypt"fullword ascii
$s7text"GeneratePass"fullword ascii
$s8text"FileUploadToDropbox"fullword ascii
$s9text"\\SharpBox.pdb"ascii
$s10text"https://content.dropboxapi.com/2/files/upload"fullword wide
$s12text"Dropbox-API-Arg: {\"path\":"wide
$s13text"X509Certificate [{0}] Policy Error: '{1}'"fullword wide

Condition

uint16( 0 ) == 0x5a4d and 7 of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 7 patterns in the rule must match.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Licence & attribution

Author: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: cd834fe2-dc77-509d-a8f9-d631f395bcd8

Tags:FILE