How to delete a ghost bot user with admin privileges?

If your server system has been compromised, what difference does it make whether the attacker uses the bot or directly modifies the database?