How do we prevent a professor from releasing our class project as his own research?
You must have documented your reverse engineering efforts in some way (e.g. Student reports). You can publish these online, e.g. On ArXiv.

You might also discuss coauthorship with your professor on future publications.