If you do nothing else, read this and believe this as the ONLY way to buy a foreclosure.
Usually, when people lose their home to foreclosure they don't take the time to make sure its all cleaned and in good condition. And, they don't pay for a warranty for the new buyer. In other words, 'caveat emptor', let the buyer beware! If the bank is offering the property for sale through a broker, then tell the bank that you would like to do some inspecting before making an offer. Bring your home inspector and/or contractor through the house and get estimates on all of the repairs necessary to bring the house up to 'liveable status.' Wall should not have holes in them and be painted, all plumbing, electrical and mechanical should be operable, roof should be watertight and not in bad condition. In other words, 'fix up the house before you buy it and see how much it would cost to have various contractors fix up the house. Total these costs and subtract that amount from the market value. What's market value? Ask your Realtor to use comparable sales and determine market value (if you've got somebody that can't do that, get another Realtor).
Let's say the market value is $100,000. and it will take $25,000. to bring the house up to the condition that would make it a normal house for sale in a normal market. Since your going to be inconvenienced during the time the property is being renovated and you'll have to pay for the repair work out of you pocket as opposed to part of the financing of a new house, you will need to also subtract an amount from the market value for your time and trouble. Back to the calculation; Fair Market Value (FMV) minus fix up costs and a value for your troubles, say $10,000., or maybe $5,000. whatever you figure your time and trouble is worth, I'll use $10K. So, the most you should pay is $100K - $25K - $10K = $65K. Anything more than that is cutting into your profit for taking a troubled house off the market. Moral of the story, don't work for free!
A little history. I've bought and sold over 400 houses in the San Francisco Bay Area and most of them were foreclosures.