We constantly search the internet for hacks. We have a huge list of all the very well known hack sites that we infiltrate and download and test as many hacks as possible. This is our primary way of removing hacks from the game. When a hack gets downloaded it gets tested and sent to the appropriate people. X-Trap and Smilegate. From there these guys code the appropriate blocks into the program to prevent them from entering in the game, or in other cases get them detected so the autoban system picks them up.
It should also be noted that we have our own resources and communications with others for these types of hacks too. The mods and known community gamers provide us with valuable information on where hacks come from, what kinds do what, what to look out for, emerging threats etc.
All in all it goes into a system of daily checks for the latest attempts to ruin your gaming experience. These efforts go directly to people like X-Trap and are directly involved in the recent major updates you've seen to X-Trap.