How to improve profile for graduate admissions in mathematics, when coming from a country where quality of math education is poor? What should I do after BS Maths before applying to a well reputed institute for masters and PHD in maths, given that my BS was done from a less developed country where quality of math education is very low?
You seem to be asking how to get admitted to a much better graduate program than your undergraduate program and record merits.  I'm sorry to say that unless you did something during your undergraduate program to make you stand out on a worldwide scale beyond what virtually any undergraduate ever does (in other words, a very low probability event), this is not going to be possible.

Why don't you set more reasonable goals?  If your education has suffered from coming through a systemically poor institution, I would suggest trying to get into a not-top-but-reputable program in a country with high academic standards (which gives you a lot of choices: US, Canada, Australia, the majority of Europe, Japan, some other parts of Asia...).  E.g. in the US even the 200th best university has a curriculum which is largely modelled on that of much better universities, some very serious faculty members, quite solid library / computer resources, and so on.  A student can "launder herself" by doing a master's degree at such a place.  By doing excellently on the coursework and exams, she would show that she has the same skills, knowledge and potential of a strong undergraduate major, and could probably get into a top 50 PhD program.