The first question that needs to be answered is who tried to kill Michael. Then, some theories as to who killed the would-be assassinations can be drawn.
As we know by the end of the film, Hyman Roth is behind the hit on Michael. There are a few reasons for this, the largest of which is resentment at Michael having killed Moe Greene in Godfather I.
To do this, he uses Johnny Ola, his right hand man. He sends Johnny to talk to Fredo, Michael's brother, and has him manipulate him into giving information that can be used to attempt an assassination. We never find out what this information is. Whether Fredo was callous enough to give direct information that could be used, or simply angry and careless enough to let slip something innocuous, we don't know.
This exchange is all we have on it. You can decide for yourself how "in the know" Fredo really was:
Fredo Corleone: I haven't got a lot to say, Mike.
Michael Corleone: We
Fredo Corleone: I was kept pretty much in the dark. I
didn't know all that much.
Michael Corleone: What about now? Is there
anything you can help me out with? Anything you can tell me now?
Corleone: They've got Pentangeli. That's all I can tell you. I didn't know it was gonna be a hit, Mike. I swear to God,
I didn't know it was gonna be a hit. Johnny Ola bumped into me at
Beverly Hills, and he said that he wanted to talk. He said that you
and - and Roth were in on a - a big deal together and that there was
something in it for me if I could help 'em out. He said that - He said
that you were bein' tough on the negotiations, but if they could get a
little help and close the deal fast, it'd be good for the family.
Michael Corleone: You believed that story? You believed that?
Corleone: He said there was somethin' in it for me. On my own...
So now we know the three people implicitly involved in the assassination attempt. As to who killed the failed-assassins, there are a few possibilities:
Fredo - He could have killed the assassins out of panic whenever he realised the hit had failed. This could have happened two ways - he might have given Roth information allowing him to access the compound, or allowed a mole in, and once he realised what transpired, murdered the assassins inside the compound out of fear. Or, of course, he could have been well aware all along a hit was going to take place and killed the assassins out of self preservation. However, if Fredo had killed them, it raises questions as to how he knew exactly where they would be (and how he could kill them with no other guard on the compound knowing). If Fredo did kill the assassins, it's difficult to imagine he wasn't well aware there was an assassination plot.
Fredo's Men - Fredo is a caporegime, so he has a lot of men under him. He could have had one of those men kill the assassins (then either hushed his man with money or killed him to silence him). However, the biggest issue with this idea is the notion that Fredo could offer someone more than Michael could (or could intimidate someone more than Michael could).
Michael's Guards - It is of course possible that Michael's guards killed the assassins. These guys are mafia men - they're not trained soldiers. If they cornered an assassin and the assassin raised his gun, it's unlikely they would be aiming for the shoulder or foot. It's perfectly plausible that a scenario like this occurred and Michael's men killed everyone.
The movie (or books) don't ever actually say exactly who killed the assassins, but this conversation occurs after the hit:
If we catch these guys do you think we'll be able to find out who's
That's not the catch -- unless I'm very wrong, they're dead already.
They're killed by somebody close to us -- inside. Very, very scared
they botched it.
What about your people ROCCO and NERI? You don't think that they had
something to do with this.
You see -- all our people are business men, their loyalty is based on
that. Now, one thing that I learned from Pop was to try to think as
people around you think. Now on that basis, anything's possible.
So Michael certainly suspects an inside man. Given that we later find out Fredo betrayed Michael, that most likely scenario does seem to be that Fredo himself killed the assassins.
To reiterate however, all of this is just speculation, as it is never confirmed in either the films or books.