what can replace hook
Any alter hook and preprocess hooks that is defined inside a module can also be defined inside the theme as well. So if you are using Bartik theme you can open the Bartik's template.php file and use

function bartik_form_alter(){}




UPDATE

Checking the Is it possible to define hook functions in template.php instead of the module? can also be helpful.