Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Technique:Identifying media libraries in binaries

From ReverseEngineering.wiki
Technique
On this wiki Facts · Code · Notes · Topics

How to tell which image, video and font library a program carries, and its version, from banners, version functions, DLL major numbers and error strings, with a table that links to the wiki page of each library (FFmpeg, libpng, libjpeg, libwebp, FreeType, stb_image).

Overview

Almost every application links an image, video or font codec, statically or as a DLL. Naming it saves hours of reversing and tells you what bugs and formats apply. Order of attack: (1) file names and exports of shipped DLLs; (2) version or banner strings; (3) constants the code compares against; (4) error-message tables; (5) constant tables.

Table

Library Best marker Page
FFmpeg FFmpeg version ..., Lavc<ver>/Lavf<ver> idents, configure string, avcodec-NN.dll (NN = major) Library:FFmpeg
libpng libpng version 1.6.x banner, PNG_LIBPNG_VER_STRING in png_create_read_struct callers, sRGB tables Library:Libpng
libjpeg / libjpeg-turbo copyright banner, JPEG_LIB_VERSION passed to jpeg_CreateDecompress, message table Library:Libjpeg, Library:Libjpeg-turbo
libwebp WebPGetDecoderVersion (0xMMmmrr), ABI constants 0x0210 / 0x0107, VP8X/VP8L FourCCs Library:Libwebp
FreeType version stores in FT_New_Library, module class names (truetype, cff, smooth...) Library:FreeType
stb_image short stbi__err strings (bad png sig, unknown image type), no exports Library:Stb
zlib deflate/inflate copyright strings, version string Library:Zlib

General rules

  • A version passed by the application at initialisation (libpng, libjpeg, libwebp ABI constants) tells you the header the program was built against, not the library that runs; compare with the library's own string when both are present.
  • Static copies lose banners that only an unused function returns; constants compared in the code survive.
  • A bigger host (an FFmpeg or browser binary) contains many of these libraries; their presence says little about the application you analyze.
  • Image libraries embed Library:Zlib or their own inflate; see Technique:Identifying compression libraries in binaries.

Evidence & references

Each linked page lists its own repository evidence. Related: Technique:Library function recognition for signature matching in Ghidra/IDA.