  Moving objects with optical or acoustical waves is a topic both of
fundamental interest and of importance for a range of practical applications.
One particularly intriguing example is the tractor beam, which pulls an object
toward the wave's source, in opposition to the wave's momentum. In this study,
we introduce a protocol that enables the identification of wave states that
produce the optimal tractor force for arbitrary objects. Our method relies
solely on the solution of a simple eigenvalue problem involving the system's
measurable scattering matrix. Using numerical simulations, we demonstrate the
efficacy of this wavefront shaping protocol for a representative set of
different targets. Moreover, we show that the diffractive nature of waves
enables the possibility of a tractor beam, that works even for targets where a
geometric optics approach fails to explain the pulling forces.
