How to tell if phone's ROM is original or tampered? I have bought a new phone which seems to be used. The manufacturer checked my IMEI and confirmed that the phone has been purchased/activated before. 

The body looks new so I don't mind keeping it but I am worry about malicious software/apps. I know I can factory reset the phone, but is there any way to tell if the ROM is original?

FYI, the phone is a Moto G 2nd gen w/ 5.0.1 lollipop.
TheBro21's comment applies only if it's a KNOX enabled device.  For most Android devices, when you boot into downloading mode it will read a few lines in "SYSTEM STATUS: custom" or "Custom Binary Download YES (and the number of time here, if it hasn't be reset with triangle away)". If in bootloader mode it says Unlock state: true, it might be that the ROM is custom, but then again it may have been done by a stock flash.

You can also go into the settings and about and look at the system status, ROM, kernel, or base-band and if it has a weird name, google it, it's probably a custom ROM or kernel, if not, it probably isn't or close enough you'd never notice.

If you really are concerned and want a fresh device on official firmware, google how to flash your device with Odin, than download the latest stock firmware.