The 26-year-old was released by Mansfield this summer, after scoring twice in 18 games last season.
He joined Middlesbrough from Arnold Town in January 2006 but played just nine times before going on to have spells with Celtic and Kilmarnock.
"Ben has looked sharp during trial games and has taken goals well," said Boro manager Brian Reid.
"He has good pedigree and I'm delighted to welcome him on board."