  Small Solar System bodies are pristine remnants of Solar System formation,
which provide valuable insights for planetary science and astronomy. Their
discovery and cataloging also have strong practical implications to life on
Earth as the nearest asteroids could pose a serious impact threat. Concurrently
with dedicated observational projects, searches for small bodies have been
performed on numerous archival data sets from different facilities. Here, we
present a framework to increase the scientific return of an exoplanet
transit-search survey by recovering serendipitous detections of small bodies in
its daily and archival data using a GPU-based synthetic tracking algorithm. As
a proof of concept, we analysed $12 \times 12 \mathrm{arcmin^2}$ sky fields
observed by the 1-m telescopes of the SPECULOOS survey. We analysed 90 sky
fields distributed uniformly across the sky as part of the daily search for
small bodies and 21 archival fields located within 5 deg from the ecliptic
plane as part of the archival search (4.4 deg$^2$ in total). Overall, we
identified 400 known objects of different dynamical classes from Inner
Main-belt Asteroids to Jupiter Trojans and 43 potentially new small bodies with
no priors on their motion. We were able to reach limiting magnitude for unknown
objects of $V$=23.8 mag, and a retrieval rate of $\sim$80% for objects with
$V<$22 mag and $V<$23.5 mag for the daily and archival searches, respectively.
SPECULOOS and similar exoplanet surveys can thus serve as pencil-beam surveys
for small bodies and probe parameter space beyond $V$=22 mag.
