There are various ways to achieve such a goal, ranging from cross site script attacks (XSS), insecured SQL injections, Union attacks, Script attacks, etc etc.
I run our guilds website, and we get upwards of 10 of these attempted attacks per month ....
After a sucessful attack, if you do not find the injection that the hacker used to get access to Admin passwords, they can continue to get in that way (that is, if you backup your database with the SQL injection used, and restore from that backup, the Hacker still has access) ...
So alot of the time all that can be done is to flush the database and start over with a more secure website ...
Keeping up with software updates is also a big part of it ... most of the time messageboards like phpBB, etc release software patches before sucessful attack methods become too mainstream ....
I won't go into full details, but one of the most secure Website Management packages (RavenNUKE 76 v2.02.00 FULL) can be downloaded, installed and used for free from the RavenScript site
Keep in mind, nothing it 100% secure .... if a hacker wants to get in badly enough, they will always be able to find a way ....
I am happy to answer any subject on the matter of security if your sites webmaster would like to PM me here, or email me at:
tekno@cold-fury.net ...
Tek