My cousin's a smart guy.

When he was ready to upgrade to a different home, he didn't attend open houses or look in the classifieds. He didn't even ask a real estate agent to show him homes. Instead, he found a real estate broker who specialized in foreclosure listings.

Rather than pay 'market price' for a home, my cousin decided to buy a foreclosure that just needed a little cosmetic work. He was able to get a good bargain on his house, and it's already paid off; his home is worth much more than he paid.

In order to get his particular great deal, my cousin followed six steps. And I'm going to tell you what they are, but first consider: You might be running out of time.

Here's what I mean...

According to a recent RealtyTrac report, total foreclosure filings were down 35 percent over a 12-month period in June 2013. Even so, foreclosure filings are still above pre-crash levels. At the rate they've been falling, though, there is a good chance that filings could return to pre-crash levels by the end of the year.

That means time could be running out, and you may need to hurry to get in on some great deals.

It's as simple as this: Investing in foreclosures can be profitable. But you don't want the pressure of acting quickly to lead you into making some big mistakes. That's where my cousin comes in. Before you do anything, read his six tips:

1. Find A Knowledgeable Real Estate Broker.

There are real estate brokers who specialize in foreclosures. Some brokers work with banks that have foreclosed homes in their inventories. Often, a foreclosure is termed a 'real estate-owned' property. Banks own them, so working with a broker that has connections with lenders can help you find repossessed homes a little more easily.

2. Get Preapproved For A Loan.

If this is a second home for you, you might have extra hoops to jump through to prove you can afford it. You will have to let the lender know how you plan to afford the payment; this includes presenting a plan for renting it out, if that's what you choose to do.

3. Check Out The House.

If a foreclosure has been vacant for a long time, there might be damage. Some former owners vandalize homes before they are forced out, and there is also the chance that squatters and others might cause damage. You should also find out if the home has been winterized -- one bad winter can result in burst pipes and other problems.

4. Budget For Repairs.

Remember that once you buy the home, your real estate investment adventure is likely just beginning. At the very least, a foreclosure will need a degree of cosmetic touch-ups. In some cases, though, especially if you get a really good deal, there might be more serious problems with the house.

When you budget for repairs, take into account that you might need to hire contractors, increasing the cost and cutting into your overall profits. No matter what you plan to do with the property when you're done, make sure you meet codes and requirements.

5. Ask For An Inspection.

While there might have been previous inspections, they might not reflect the most up-to-date realities about the house. A private inspection, done before you go through with the foreclosure purchase, can provide you with the most current information. You might even discover serious structural problems with the home, resulting in greater expenses that can cut into your profits. An inspection can help you better estimate what you should budget for.

6. Look For HUD Homes.

The Department of Housing and Urban Development offers a housing program that insures home purchases. Even those homes can be foreclosed on. Local governments get first dibs on HUD foreclosures, and those who agree to live in the house get second choice. After that, investors have a shot at the homes. You are most likely to find HUD foreclosures in markets hit especially hard by the real estate crisis. When purchasing one of these homes, consider your proximity to the home. It might make sense to hire a local property manager to help you if you live in another state.

The Investing Answer: With the inventory of foreclosures dwindling, you should consider moving fast to get a good deal. If you have the ability to buy a home with cash, or if you can get approved for a mortgage, a foreclosure can provide you with a good investment opportunity, and it can be a good way to start investing in real estate for a little less.