An attack by Shebab rebels against Somalia's presidential palace has ended with at least nine of the attackers killed, a security official told AFP.