This is one of the commonest attacks on Islam that I see; it's based n the fact that Mohammed married Aisha when she was six and consummated the marriage at nine.

That would be difficult to defend - indeed, impossible in 2017. But in 600 AD, child marriage was quite acceptable, this being a way to make business or political alliances. And consummation was fairly common shortly after puberty. Still, it's hard to justify. Perhaps your best defence is to go over to the attack. You could cite the fact that more than half of US states do not have a minimum age for marriage, which I find pretty shocking. And a recent marriage in the USA was to a girl of eleven. That is a "tu quoque" defence, which isn't really a defence, but it might embarrass your debate partner enough for him to switch subjects.

Slavery

That is my favourite go-to subject for both Islam and Christianity because it's hard to defend. The problem is that either the Quran nor the Hadiths forbid slavery. And on the islamqa.info site, you'll find that "We reply emphatically and without shame that slavery is permitted in Islam". So - you can show verses in the Quran that recommend that you free a slave and you can find verses that tell you to be kind to slaves and treat them well. But that still leaves the huge hole - Islam doesn't forbid slavery.

You could point out that the same was true in the USA until 150 years ago, but the debate partner will then point out that it is now 2017, and slavery is no longer legal in the Western countries.

I have to confess, I've not really seen an answer to this question. Perhaps your best bet is to change the subject as soon as it's raised.

Terrorism

That's an easy one because surely it's obvious that not all terrorists are Muslim, and you can make a list of such incidents (for example, the Oklahoma bombing) ready for use. Obvious subjects that might be brought up are ISIS and the 9/11 terrorists. They can be disposed of by explaining that they weren't actually Muslim, because Islam prohibits the taking of innocent lives. Indeed, that line can be taken concerning any terrorist, and even if they shout "Allahu Akhbar" and claim to be Muslim, they aren't.

A more extreme stance would be to claim that ISIS are a false-flag gambit. In this view, the people of ISIS are paid mercenaries funded by the CIA or some other foreign power, take your pick (I have heard this defence run a few times). Certainly you can claim with justification that the weapons that these terrorists use are all made in Western countries and sold on. OK, that's a bit feeble. Stick with the first paragraph above.

Attitude to women

People often bring up the attitude to women in Islam. So, first, there's the matter of dress, the Hijab, Nikab or Burka. Here, the defence is to insist that women make their own choice in how to dress, and that they are not required to do anything in Islam other than to dress modestly. So that's easy to deal with.

Next, the matter of polygamy. Again, this is a matter of consent. Surely adults should be allowed to marry one or several partners? Just as in the West, gay marriage is a thing because why should the religion get in the way of adult's consenting choices, so in Islam polygamy is a matter of consent; you can't take a second wife without the consent of the first, and so on.

Beating. This is a tricky one, because the Quran, 4:34 says that you can strike, or beat, your wife. Your best counter to this is to suggest that this is only a token, symbolic beating, and it mustn't hurt. For example, it would be with a small twig, such as is used as a toothbrush. Unfortunately, that isn't what the Quran says, so you might have a problem with that.

Inheritance. The Quran says that a son should inherit twice as much as a daughter. That's pretty much impossible to get round, and I think you have to go with "Yes, it's unequal. So what?" By the way, there's another problem in the inheritance issue, see below.The Quran

The Quran is perfect, of course. I've already covered the slavery issue and the woman-beating issue. But there'a really dire situation. If a man dies leaving a wife, two daughters, and both parents, then his estate is divided up thus:

So either Allah cannot do arithmetic (unthinkable) or else the Quran got copied down wrong (unthinkable). Fortunately, very few people know about this issue, so it never comes up. But if it does, you could try explaining that first, the wife takes her 1/8, then what is left after that is divided as per 2/3, 1/6, 1/6 and hope that they change the subject.

Homosexuality

Yes, Islam bans homosexuality. So does Christianity and Judaism. No, Muslims don't throw gays off rooftops, only ISIS do that and they aren't Muslim (see above). There isn't gay marriage, but even the USA is having doubts about that, and lots of other countries don't allow it.