Would a cat attack a rabbit?

Most definitely, yes, a domestic cat would attack a rabbit but it does depend upon the character of the cat in question. And of course it depends upon the circumstances.