boup.
FR EN

Identifying a system binary with hashlookup.circl.lu

Contents

TL;DR

A tool for triaging or legitimising a binary. It confirms that a binary is a known system or software file, which reduces the volume of files to analyse by hand.
A binary missing from the database may call for additional checks, but it does not mean the binary is malicious.
To check a binary: https://hashlookup.circl.lu/lookup/sha256/<hash>

Context

During an investigation or a forensic analysis, one of the first questions to settle when facing a suspicious binary is simple: is it an operating system file, a known package, or an artefact that deserves in-depth analysis?

Recalculating and comparing hashes manually is not realistic at the scale of an investigation. That is the role of reference hash databases: they let you filter out the “noise” first (known, benign binaries) so you can concentrate the analysis on what is not.

The hashlookup service from CIRCL (Computer Incident Response Center Luxembourg) meets this need through a public API.

The service

Official documentation: https://www.circl.lu/services/hashlookup/

hashlookup is a public REST API that lets you check whether a file hash is already listed in a set of known databases. It includes in particular the NIST NSRL database as well as several other sources. The service is free and documented through an OpenAPI Swagger.

  • What it allows: telling you whether a hash matches a file already listed in a reference database, and giving the associated context (file name, product, operating system, size, etc.).

  • What it does not allow: judging whether a file is malicious or not. hashlookup is neither a malware database nor an antivirus. A positive result confirms that a file is known and gives context; a negative result proves nothing on its own.

Important

The absence of a hash from the database does not mean the binary has been modified or is suspicious. Many legitimate files are simply not listed. For example, the hash of the ls binary on macOS is, as of today, not known to the service.

In other words: hashlookup lets you quickly eliminate false positives (known, legitimate files), but an empty result must never be interpreted as an indicator of compromise by itself. It should simply trigger a deeper analysis.

Integrated sources

  • Common builds of Windows 10 and Windows 11 (French, Dutch, German, UK, US)
  • Ubuntu packages, CentOS core OS, the Fedora EPEL repository, Kali Linux, OpenSUSE, OpenBSD tar.gz files, CDNJS scripts and the public Snap repository.
  • NIST NSRL: all the RDS (Reference Data Sets) hash sets (current, modern, android, iOS, legacy)

What is the NSRL?

NSRL refers to the database of known software maintained by NIST: the National Software Reference Library. More information on the NIST website: https://www.nist.gov/itl/ssd/software-quality-group/national-software-reference-library-nsrl

Using the API

Swagger documentation: https://hashlookup.circl.lu/

The case of the hash (upper or lower case) does not matter in the request URLs shown below.

The API accepts three types of hash: SHA-256, SHA-1 and MD5. The following examples all concern the same binary, malloc2.exe, queried through its three respective hashes.

SHA-256 request

text
https://hashlookup.circl.lu/lookup/sha256/c16ab09b4923b268dc8ef235b6dec49e1ecfd4feb25ded1138f00fda8b15f37f
json
{
  "CRC32": "4A0D3F19",
  "FileName": "malloc2.exe",
  "FileSize": "9216",
  "MD5": "DE8F65B9DE9B6C92CFD99155B6DDB635",
  "OpSystemCode": {
    "MfgCode": "1006",
    "OpSystemCode": "362",
    "OpSystemName": "TBD",
    "OpSystemVersion": "none"
  },
  "ProductCode": {
    "ApplicationType": "Development Platform",
    "Language": "English",
    "MfgCode": "608",
    "OpSystemCode": "189",
    "ProductCode": "16402",
    "ProductName": "Microsoft Developer Network Development Platform - U.S.",
    "ProductVersion": "March 1997"
  },
  "RDS:package_id": "16402",
  "SHA-1": "F0FC35E58CEFFB1B6FF5732E5B3601AC0B1A10D3",
  "SHA-256": "C16AB09B4923B268DC8EF235B6DEC49E1ECFD4FEB25DED1138F00FDA8B15F37F",
  "SpecialCode": "",
  "db": "nsrl_legacy",
  "insert-timestamp": "1648622685.5923274",
  "source": "RDS_2022.03.1_legacy.db",
  "hashlookup:trust": 50
}

SHA-1 request

text
https://hashlookup.circl.lu/lookup/sha1/F0FC35E58CEFFB1B6FF5732E5B3601AC0B1A10D3

Returns the same record as the SHA-256 request above.

MD5 request

text
https://hashlookup.circl.lu/lookup/md5/DE8F65B9DE9B6C92CFD99155B6DDB635

Also returns the same record.

Reading the API response

The following fields are particularly interesting:

  • db and source: indicate which reference database the entry comes from (here nsrl_legacy), which is useful for assessing how reliable and how old the data is
  • ProductCode and OpSystemCode: give the file’s original context (vendor, product, target system)
  • hashlookup:trust: trust score attached to the entry. 50 = no particular opinion from CIRCL, below 50 = low level of confidence, above 50 = comes from multiple sources, see hashlookup/#hashlookup-trust.

These elements make it possible to quickly document why a file was excluded from the scope of analysis, which is useful for the traceability of an investigation.

Conclusion

hashlookup.circl.lu is a tool for triaging or legitimising, but it does not give a verdict. It is used to confirm that a binary matches a known system or software file, in order to reduce the volume of files to analyse manually. A hash missing from the database may call for additional checks, but it is not a conclusion in itself about the binary’s legitimacy.