We'll, short term protection: Shutdown the board and remove the scripts from your server. Banning IP or usernames won't protect you from such kind of attacks.
Long term solution:
Use a backup and upgrade it to the latest version of ubb.threads (and use the security mod published here) or use the latest beta version of ubb.threads.
Inform your ISP about the hack, so that they can have a look at the server and see if it has been compromised. If you're running a dedicated server, hire someone to do that for you.