Download Android 4.4.2 Kitkat stock firmware for CSM8 TV Box from here, here or from here. Flash it using AMLogic USB Burning Tool v2.0.0.140306_Alpha like in this tutorial.
Archive name: CSM8 firmware computer reflash
Image file name: aml_upgrade_package.img
Model: CSM8 TV Box
Archive file size: 332 MB
Platform: Amlogic S802