Four men have been convicted of plotting a terror attack.