It is actually possible to buy a car on credit without getting ripped off. The way I did it was, having already gotten agreement on the selling price, and having a good estimate of the likely interest rate, I decided what loan term I wanted and computed the corresponding monthly payment based on these variables -- all before sitting down to do the final negotiation. I declined all dealer add-ons and all financing offers that didn't match my precomputed numbers. Eventually they made one that did.
I'm not saying I got the best deal possible; I didn't shop dealerships. (OTOH I'm not sure that would have worked, as the model I was buying was in demand.) But basically, I think I did okay.