Material extrusion-based additive manufacturing: G-code and firmware attacks and Defense frameworks