International (engineering) - Should I just give up?

I have finished a bachelor’s in engineering in my country not too long ago. It’s the top school in my country (and ranked within the top 100 worldwide), but nothing special compared to the top programs in the US. My ultimate goal is to complete a PhD at one of the top/near top universities in the US.

However my stats aren’t all that impressing to be a competitive applicant at the top programs, but here is the main outline:

Undergraduate GPA: one year I was one of the top, but in some other years I was only in the top 10%-15% of my class (I definitely know I can do better).
Research experience: 1 senior undergraduate project, 1 summer research with a professor (nothing really special/significant)
LORs: I can probably get 1 good letter from my senior project supervisor, 1 good/OK letter from my summer research supervisor, and 1 good/OK letter from another professor who knows me well and can write about my personal qualities.

There are tons more applicants with much better stats and research experience than me, so I am thinking of applying for an MS program from a good (not top) university in the US before applying for a PhD. The goal is to get a high GPA, get more research experience, and get good LORs from more well known professors in the US to boost my application.

However, the problem is I can’t afford to pay without funding. Are there any funded MS (with thesis) programs in the US from good (but not top tier) schools, say in the top 25? Suppose I get full tuition covered + stipend, will they still ask for evidence of financial support before I can get a student visa? Or should I just apply for PhD and hope to get in albeit an infinitesimally low chance at the top schools?

I am considering taking the GRE some time next month, and, with the deadlines coming up in a few short months, I am getting anxious thinking about it. I really like to apply at the end of this year (or else another year wasted), but I am skeptical that it will work out in my favor. I idea of working for some random technical firm in my country for the rest of my life really depresses me, and my mood is taking a turn for the worse.

Is there any advice that anyone can give me?

I do believe there are some funded MS programs in engineering. I do not know where they are, because this is not my field, but engineering is one of those fields in which it is possible to get the MS funded. I’m not sure whether they will ask for evidence of support before you can get a visa, but I’m guessing that if a department wants you enough to fund you that they will help you arrange all that.

My advice is that if you think you’re marginally competitive, even, for a PhD program - apply for a small select group of “dream programs” (maybe 3-5) and then apply to some good, solid, funded master’s programs. If you get into a PhD program, great! If you don’t, then you have the master’s programs to choose among.

I don’t think there are too many MS programs that are funded because it is a money maker for the schools.

Private businesses fund their employees to get their masters degrees while the employee works for them.

The best chance for a funded MS from the very start is if you apply to a program that has the MS as its highest degree. For example one of the California State Universities (which do not have Ph.Ds). These don’t necessarily qualify as being in your “top 25” (whatever that may be). However they can be very good as preparatory for a Ph.D.

Don’t get hung up on rankings of any sort. You should apply as a Ph.D. student to schools which are not the most highly selective but which have strengths in the research areas which appeal to you. Smaller departments can have top-notch faculty but may not be “ranked” highly because of their size.