Foster joined Preston on non-contract terms in December after he was released by Rotherham United at the end of the 2011/12 campaign.
He has made four appearances for Graham Westley's side and the 27-year-old is delighted to be staying with the League One club.
"I've really enjoyed myself, because it's a great club and I am thrilled to bits with the opportunity I've been given," Foster told the club's official website. "Hopefully I've grabbed it with both hands and now I can kick on.
"I can relax short term, because the contract has been sorted out, but now it is the business end of the season and it is time to kick on.
"Everyone knows it is a massive club, with massive expectations, so it is not easy to come into that environment when you have been out for so long, but it has been a good month.
"It was all or nothing, so I had to make sure the fans could see that I was good enough to play for this club and prove to the manager and the owner that I deserved a future here and hopefully I have started to do that. But the work has only just begun."