PhD Applications: Can a good academic record in my master's compensate for a horrible UG academic record?
In short:

You need to do some research-type work during your Master's to evaluate if your desire to get a Ph.D. has some foundation.

You certainly would have a chance to get into a Ph.D. program with strong enough application. However, you would have to work hard during your Master's.



There are several things you need to consider:


you have not yet finished (or, I guess, even started) your Master's degree. Therefore, you are planning way ahead.
you certainly want to do a research-based Master's degree with a thesis, as opposed to doing a pure course-based Master's. Doing research during your Master's would allow you to understand if you like doing research in the first place. Also, it would strengthen your potential application for a Ph.D.
a carefully written Letter of Intent would be crucial. 
sometimes, only a GPA in your last two years of the undergraduate program is used for applicants with a Master's degree.
you should make a decision of industry vs academia closer to the time you are finishing your Master's degree. Moreover, even if you get into industry, nothing prevents you from applying to a Ph.D. program several years later if you still have research interests and, especially, if you position at industry had a research component that you were excited about.