I've finished my master's program. How can I improve my credentials so I can do a PhD? I have read a few posts here about the matter, but I don't think other posts fully address the situation I'm in. I apologize if this thread is redundant.

I would like to do research in the future, I think getting a Ph.D might be a reasonable step to take (if I were to be capable of doing research, at some point). Fields of interest: Neuroscience, neuropsychology. University I would like to apply: Yet unknown but somewhere in France would be ideal (current location: Argentina); would rather not pursuing higher education here if possible. Some background will be useful to give a proper assesment of my situation

(1) I'm fairly old at 28, and likely will not apply until 30. I believe this might be a problem when applying to some universities, since they receive brilliant people still in their early 20s.

(2) As you might have guessed, my undergrad grades are very much below average. I have three undergrad degrees and two masters in which I did good enough (not GREAT unfortunately).

(3) My grades report gives a full account of my activity, which is very unfortunate considering how bad I did stuyding mathematics: even if I passed the last courses with the highest possible grade, it will always how many courses and exams I failed before the last three semesters before graduating (and it goes up to 10). I don't think our grades here work like in the US. It's not possible to make your "GPA" go up after you failed. Taking extra-curricular courses and getting a good grade will make the final grade higher, but it will still show how many I've failed. I also graduated late when an undergrad.

(4) I am certainly not aiming at a top university, not even top 200 due to the fact of being a failure. But the fact that I am quite old and with a broken academic record makes me question if even the lower tier would take me in.

I'm very much in need of advice. If I were to apply when two years from now, there are several things I should do and it would take much time and effort, and it is unlikely I will go through those matters if the chances of going into research are way to slim to bother. Is there something I can do to make a future application "decent"? What should I consider when sending an application to a university?

Would it be better if I apply for a master X university before applying for a PhD in the same university?

What general advice could you give me? I would consider dropping the PhD plans if it is too unlikely.
I had a student who was, if not exactly in your shoes, certainly "disadvantaged" in being able to make it into grad school. Normally, I would just not respond and file away a cold call like that, but reading his email, which was asking for a chance to do research (not even paid—just work doing something related to research), and had a strong vision of what he wanted to do in the future, that it resonated with me. It also just happened that around the same time, I had some ideas I wanted to try out, and a small bit of funding available. So I offered him an internship that would be able to pay his living expenses, and gave him a shot. Today, he's thriving as a  PhD student in an aerospace engineering program in Europe. 

So there's always a chance. The best thing to do is to get research experience. Once you can get some people who can comment "don't worry so much about user92705's grades, because user92705 has done really well working in my lab, and I know will become a good researcher," it will go a long way in getting you into a graduate program.