There are two issues here: arithmetic and psychology.
Scenario 1: You are presently paying an extra $500 per month on your student loan, above the minimum payments. Your credit card company offers a $4000 cash advance at 0% for 8 months. So you take the cash advance, pay it toward the student loan, and then instead of paying the extra $500 per month toward the student loan you use that $500 for 8 months to repay the cash advance. Net result: You pay 0% interest on the loan, and save roughly 8 months times $4000 times the interest on the student loan divided by two. (I say "divided by two" because it's not the difference between $4000 and zero, but between $4000 and the $500 you would have been paying off each month.) Clearly you are better off.
If you are NOT presently paying an extra $500 on the student loan -- or even if you are but it is a struggle to come up with the money -- then the question becomes, can you reasonably expect to be able to pay off the credit card before the grace period runs out? Interest rates on credit cards are normally much higher than interest rates on student loans. If you get the cash advance and then can't repay it, after 8 months you are paying a very steep interest rate, and anything you saved on the student loan will quickly be lost.
What I mean by "psychological" is that you have to have the discipline to really repay the credit card within the grace period. If you're not very confidant that you can do that, this plan could go bad very quickly.
Personally, I've thought about doing things like this many times -- cash advances against credit cards, home equity loans, etc, all give low-interest money that could be used to pay off a higher-interest debt. But it's easy to get into trouble doing things like this. It's easy to say to yourself, Well, I don't need to put ALL the money toward that other debt, I could keep a thousand or so to buy that big screen TV I really need. Or to fail to pay back the low-interest loan on schedule because other things keep coming up that you spend your money on instead, whether frivolous luxuries or true emergencies. And there's always the possibility that something will happen to mess up your finances, from a big car repair bill to losing your job. You don't want to paint yourself into a corner.
Finally, maxing out your credit cards hurts your credit rating. The formulas are secret, but I understand that if you use more than half your available credit, that's a minus. How much it hurts you depends on lots of factors.