How in the hell do terrorists justify killing innocent people in the name of islam!?

Am i missing something here? Please correct me if i am wrong but isnt killing innocent people forbidden and a major sin?