Not sure as to how the bad loan is being determined, therefore do consider consulting with an attorney who specializes in real estate, have all related documentation reviewed and see exactly what options you may have--most professionals do offer a free consultation, or if you cannot afford one, contact your local Legal Aid Society for a pro bono attorney--free.
If your house was foreclosed due to a 'bad' bank loan, you can try to hire an attorney to help you. Realtors(R) nor Trulia can offer you legal advise. Otherwise you should be able to rent a house/apartment as long as you disclose your foreclosure. Also a foreclosure will stay on your credit report for at least 7 years and greatly affects your credit score. Good luck to you.