parsarium

red-green.png · 71 bytes · 2 × 1 píxeles

91 programas leen este archivo.

Parsarium es un banco de pruebas abierto de parsers reales. Reúne 938 rutas verificadas de paquetes de código abierto para 14 formatos y ocho lenguajes. Al incluir las APIs estándar, 986 rutas tienen un harness Docker con versiones fijadas: puedes pasarles un archivo, un corpus o hacerles fuzzing con AFL++.

14formatos 8lenguajes 938rutas de paquetes verificadas 986harnesses ejecutables
controls/png/red-green.png
0000000089504e470d0a1a0a0000000d49484452·PNG········IHDR
0000001000000002000000010806000000f4227f··············"·
000000208a0000000e49444154789c63f8cfc0f0·····IDATx·c····
000000301f040110f803fd4e95c16f0000000049·······N··o····I
00000040454e44ae426082END·B`·
  • firma
  • IHDR · tamaño y tipo de color
  • IDAT · píxeles comprimidos
  • IEND · fin de la imagen
lector · versiónobservado
  1. Ccairo 1.18.6width 2 · height 1
  2. Cgdk-pixbuf 2.44.8width 2 · height 1
  3. Cimagemagick 7.1.2-35width 2 · height 1
  4. Cimlib2 1.12.7width 2 · height 1
  5. Clodepng cci.20260102width 2 · height 1
  6. Craylib 6.2width 2 · height 1
  7. Csdl3 3.4.20width 2 · height 1
  8. Cstb cci.20261021width 2 · height 1
  9. Cvips 8.18.7width 2 · height 1
  10. Cwuffs 0.3.6width 2 · height 1
  11. C++cairo 1.18.6width 2 · height 1
  12. C++gdk-pixbuf 2.44.8width 2 · height 1
  13. C++imagemagick 7.1.2-35width 2 · height 1
  14. C++imlib2 1.12.7width 2 · height 1
  15. C++opencv 5.1.0width 2 · height 1
  16. C++raylib 6.2width 2 · height 1
  17. C++sdl3 3.4.20width 2 · height 1
  18. C++sfml 3.0.2width 2 · height 1
  19. C++stb cci.20261021width 2 · height 1
  20. C++vips 8.18.7width 2 · height 1
  21. Gogithub.com/andrianbdn/iospng v0.0.0-20180730113000-dccef1992541width 2 · height 1
  22. Gogithub.com/anthonynsimon/bild/imgio v0.17.1width 2 · height 1
  23. Gogithub.com/davidbyttow/govips/v2/vips v2.20.0width 2 · height 1
  24. Gogithub.com/disintegration/imaging v1.6.2width 2 · height 1
  25. Gogithub.com/dsoprea/go-png-image-structure/v2 v2.0.0-20210512210324-29b889a6093dwidth 2 · height 1
  26. Gogithub.com/fogleman/gg v1.3.0width 2 · height 1
  27. Gogithub.com/gameparrot/fastpng v0.0.0-20250305185850-d72e123a2123width 2 · height 1
  28. Gogithub.com/go-images/png v0.2.0width 2 · height 1
  29. Gogithub.com/h2non/bimg v1.1.9width 2 · height 1
  30. Gogopkg.in/gographics/imagick.v3/imagick v3.7.3width 2 · height 1
  31. Goimage.Decode(io.Reader) with image/png registered 1.27.1width 2 · height 1
  32. Goimage/png.Decode(io.Reader) 1.27.1width 2 · height 1
  33. Goimage/png.DecodeConfig(io.Reader) 1.27.1width 2 · height 1
  34. Javacommons-imaging 1.0.0-alpha6width 2 · height 1
  35. Javaij 1.54pwidth 2 · height 1
  36. Javaitextpdf 5.5.13width 2 · height 1
  37. Javajcodec 0.2.5width 2 · height 1
  38. Javajcodec-javase 0.2.5width 2 · height 1
  39. Javajdk-imageicon 21.0.2width 2 · height 1
  40. Javajdk-imageio 21.0.2width 2 · height 1
  41. Javajdk-imagereader 21.0.2width 2 · height 1
  42. Javajdk-toolkit 21.0.2width 2 · height 1
  43. Javaopenpdf 3.0.5width 2 · height 1
  44. Javaopenpnp-opencv 4.9.0-0width 2 · height 1
  45. Javapdfbox 3.0.8width 2 · height 1
  46. Javapngj 2.1.0width 2 · height 1
  47. Javathumbnailator 0.4.21width 2 · height 1
  48. JavaScript@napi-rs/canvas 1.1.0width 2 · height 1
  49. JavaScript@pdf-lib/upng 1.0.1width 2 · height 1
  50. JavaScriptcanvas 3.2.3width 2 · height 1
  51. JavaScriptfast-png 8.0.0width 2 · height 1
  52. JavaScriptimage-size 2.1.0width 2 · height 1
  53. JavaScriptparse-png 2.1.0width 2 · height 1
  54. JavaScriptpng-js 2.0.0width 2 · height 1
  55. JavaScriptpngjs 7.0.0width 2 · height 1
  56. JavaScriptprobe-image-size 7.5.0width 2 · height 1
  57. JavaScriptsharp 0.35.5width 2 · height 1
  58. Pythonimageio 2.38.1width 2 · height 1
  59. Pythonimagesize 2.0.1width 2 · height 1
  60. Pythonmatplotlib 3.11.2width 2 · height 1
  61. Pythonopencv-python-headless 5.0.0.93width 2 · height 1
  62. PythonPillow 13.0.0width 2 · height 1
  63. Pythonpycairo 1.29.2width 2 · height 1
  64. Pythonpygame 2.6.1width 2 · height 1
  65. Pythonpypng 0.20220715.0width 2 · height 1
  66. Pythonrasterio 1.5.2width 2 · height 1
  67. Pythonscikit-image 0.26.0width 2 · height 1
  68. Pythontkinter.PhotoImage CPython 3.13.1 with bundled Tk 8.6width 2 · height 1
  69. Rustimage 0.25.10width 2 · height 1
  70. Rustimg-parts 0.4.2width 2 · height 1
  71. Rustload_image 3.5.0width 2 · height 1
  72. Rustlodepng 3.12.2width 2 · height 1
  73. Rustminipng 1.0.0width 2 · height 1
  74. Rustpng 0.18.1width 2 · height 1
  75. Rustpng_pong 0.12.0width 2 · height 1
  76. Rustzenpng 0.1.4width 2 · height 1
  77. Rustzune-png 0.5.2width 2 · height 1
  78. PHPgumlet/php-image-resize 3.0.1width 2 · height 1
  79. PHPimagine/imagine 1.5.4width 2 · height 1
  80. PHPintervention/image 4.4.1width 2 · height 1
  81. PHPintervention/image-laravel 4.1.1width 2 · height 1
  82. PHPleague/glide 4.1.0width 2 · height 1
  83. PHPmarc1706/fast-image-size v1.3.1width 2 · height 1
  84. PHPnette/utils v4.1.6width 2 · height 1
  85. PHPphp-getimagesize 8.5.12width 2 · height 1
  86. PHPphp-getimagesizefromstring 8.5.12width 2 · height 1
  87. PHPphp-imagecreatefrompng 8.5.12width 2 · height 1
  88. PHPphp-imagecreatefromstring 8.5.12width 2 · height 1
  89. PHProsell-dk/webp-convert 2.9.5width 2 · height 1
  90. PHPspatie/image 3.9.10width 2 · height 1
  91. PHPyiisoft/yii2-imagine 2.3.1width 2 · height 1

0x0020uso

Tres formas de usarlo.

Instálalo desde PyPI. Necesitas Python 3.11 o posterior y Docker para ejecutar los targets.

$ python3 -m pip install parsarium

Pasa un archivo por un parser.

Obtienes un registro JSON con el hash de la entrada, el ID de la imagen, el código de salida y el tiempo que tardó. Es la forma más rápida de comprobar cómo trata una biblioteca concreta una entrada concreta.

$ parsarium show png python pillow
$ parsarium run png python pillow my.png

Envía el mismo archivo a todos los parsers.

Cada target escribe su propio registro y summary.json los reúne. Cuando los parsers no se ponen de acuerdo sobre los mismos bytes, ahí es donde conviene empezar a mirar.

$ parsarium run-format png --list
$ parsarium run-format png \
    --file my.png --results runs/png-my-file

Haz fuzzing a un parser con AFL++.

Todos los targets ejecutables tienen una imagen para AFL++. Los parsers en C, C++ y Rust se instrumentan directamente. Los parsers en Go, Java, JavaScript, Python y PHP envían su cobertura a AFL++ mediante un pequeño puente.

$ parsarium afl build png python pillow
$ parsarium afl prepare png python pillow runs/pillow
$ parsarium afl run runs/pillow --seconds 3600

0x0030motores

Los paquetes y los motores que hay detrás.

Muchos paquetes son wrappers del mismo decodificador. En PHP, la mayoría de los paquetes de PNG leen imágenes a través de GD; en JavaScript, la mayoría de los paquetes de PDF se apoyan en pdf.js. Parsarium registra la familia de parser de cada entrada, así que tú decides qué contar.

Un estudio sobre ecosistemas necesitará todos los paquetes. Un estudio sobre motores de parsing, un target por familia. El banco construye cualquiera de las dos selecciones y le asigna un ID que puedes citar en un artículo.

Abre el banco con un target por familia →

938rutas de paquete verificadas
760familias de parser distintas, contadas por formato
986harnesses Docker ejecutables
986imágenes para AFL++ con registro de feedback

0x0040manual

Un manual para probar parsers.

Escribo estos capítulos como las notas que me habría gustado tener al empezar: cómo se construyen los formatos, qué verifica un harness, cómo leer el feedback de cobertura y cómo lanzar campañas sobre muchos targets. Cada capítulo termina con un test corto y ejercicios que puedes hacer en Parsarium, con pistas y soluciones.

0x0050acerca de

Por qué existe.

Soy José Antonio Zamudio Amaya, doctorando en CISPA. Trabajo en fuzzing y generación de pruebas para programas con entradas complejas. Cada estudio que hacía empezaba igual: elegir parsers, instalarlos y escribir adaptadores. Parsarium es ese trabajo hecho una vez, con cuidado, y compartido, para que los experimentos partan de los mismos targets y sus resultados se puedan comparar.

Más sobre el proyecto →