WHMCS uses Smarty for it's template system, though a great template system it has a flaw, the {php}
tags. These tags allow smarty to interpret PHP code directly in the template, or in this case through the ticket system when a new ticket is created. This hack happens all the time to WHMCS systems, you can try blocking the code in WHMCS through block text option in configuration. But most of the time this doesn't work.
What happens is that WHMCS accepts the ticket and the hacker added the following to the ticket message:
{php}eval(base64_decode(encoded message));{\php}
So smarty sees the {php}
part and immediately let's PHP run that command. So it first decodes the PHP encoded in base64. This will bring out some PHP function/script that the hacker is trying to run.
Then eval takes over and actually evaluates the PHP code and runs it on server side.
A lot of hackers get in this way, they run codes that they know will work in WHMCS that then grab Database information and echo it to a file. Then they just grab this file through the browser URL and get the information they wanted.
This works on only some WHMCS install's, though WHMCS says that the most recent version doesn't allow this and {php} is disabled in Smarty, at times the hacker's do find a way to get around that and eval
their code.