A corporal at a maximum-security prison was left injured after an inmate serving a murder sentence attacked him.