My Plan to Get into a CS PhD Program Some background:

I graduated 3 years ago from a big state research university.  I had an irrelevant sociology major and graduated with a 2.9 GPA mainly because I had no inclination that I would ever want to go to graduate school and thought it was more important to just make sure that I had a job to support myself and graduated on time.

After graduation I had a crappy office job for 2 years and took some random IT graduate courses which lead me to eventually get a job as a programmer at a large marketing firm for about a year and I got really interested in the more complex world of computer science especially computer vision, modeling and simulation. 

Which brings me to now.

I will be beginning a CS Master's program this summer at a medium sized state university with a concentration in Modeling and Sim.  I plan to to the thesis option and I've already begun contacting professors about research opportunities.

My GRE score is 162/155/4.5 but I didn't study because I found out I had to take it at the last minute.  With some prep I think I can at least bring that up to about 165/160/5.

All that said, do you think that with my thesis, a publication or 2 and a stellar GPA my masters work would over-shaddow my crappy undergraduate career enough to get me into a good PhD program.

My dream department would be Caltech.  But I'd at least like to go somewhere reputable if I'm going to bother with a PhD.

Diversity note in case this helps my cause: I'm female, 1st generation college student, armed forces veteran.

TL;DR

BAD UNDERGRAD: 2.9GPA/unrelated major

If I do really well on my CS Masters program, get some research published, and get my GRE score up to like a 165/160/5 do you think a top program would ignore the transgressions of my youth?
Given how far away from your original undergraduate degree you've moved (several years' work experience, change in degree program, and so on), it makes it very hard for a PhD program to give your undergraduate transcript too much weight in the admissions process. You will also be able to stress how far you've come as part of your application, either in the statement of purpose or in a "other notes" section—and you should take avail yourself of the opportunity.

As for being female and a veteran, that will matter much more to schools than being a first-generation college student. (Being a female applicant in CS certainly can't hurt your chances if you're a qualified candidate.)