The former Barnsley player had been training with PNE since November in a bid to earn a deal.
When Diaby arrived on trial he was in the latter stages of a two-year suspension from football after testing positive for banned substance higenamine.
He got that ban when at Barnsley, with the Tykes having to cancel his contract.
Diaby was cleared by the FA of knowingly ingesting a banned substance.
The 24-year-old was training with PNE before Ryan Lowe's appointment and Lowe was happy to continue to run the rule over him after his appointment.
Lowe said: "His every day attitude has impressed men, he was in the building when I came in.
"His attitude and application in training has been different class, it has been spot on to earn a contract.
"He has impressed and I felt he should be rewarded with a short-term contract until the end of the season because he can help us in numerous positons.
"Bambo can play anywhere across the back, he can play right wing-back if needed.
"He is a big aggressive footballer who we feel we can get some benefits out of."
Diaby will wear the No.41 shirt and is available to play against Millwall at The Den on Tuesday night.
Loew said: "When I have spoken to him on a couple of occasions I have asked him what he feels and what he thinks of the place.
"He has told me he wants to be the best he can be, he has got a fantastic attitude to be the best he can be.
"We do need to coach him in ways, he sometimes get caught up in the moment because he is very eager and aggressive in his tackles but he has got the attributes we think we can coach to be better for Preston North End. "