Ever since Central MD became a hotbed of carjacking activity (like many major metro areas) I've thought about what to do for self defense in my car. I'm a bit constrained by the fact that MD has very limited CCW laws (near impossible for regular people). The fact that I used to live in Baltimore City and often drove to work through some questionable parts of the city really made me think.
Number one is situational awareness. If anything about the intersection makes me even the slightest bit nervous, I do all I can not be be totally boxed in. If at all possible I pick a lane with no one in front of me. When possible I move as far to the right as I can in an empty lane (right turn on red tends to be easier and safer than running straight through a red light, though you do what you have to do in the situation). If someone wants to talk to me in a parking lot, I do it through a closed window or I may lower it 1/2" or less, my car is in gear and I'm ready to hit the gas if I feel the need to get out of there (no worries about being rude). I'm more likely to talk to them if they are with a family than if it is a single guy, and the one or two times someone pulled a vehicle in front of me and signaled they wanted to talk, I backed out of there and got out of Dodge quickly. Even if they don't try to box me in, if they are in a car and want to talk, I'm on guard quite a bit more than if they are on foot.
Next is something for defense. I have a folding knife in my center console that fits MD's definition of a legal "pen knife" and given that I use it far more for opening boxes and other related jobs, saying it is a tool and not a self defense weapon is pretty accurate (here, you can carry "pen knives": folding knives 4" or shorter, if and only if they are used as tools and not as a weapon). Of course it is a tool that can be used as an improvised weapon if I am attacked while in my car. Despite being totally legal, I do get a little nervous what a cop would think if they saw it (this is MD) so it is sometimes buried under something or concealed (legally) on my person while driving and thus not quite as accessible as I'd like. I also have some gel pepper spray that does a good job of sending out a concentrated stream so I can use it from the driver's seat without getting me as much as my attacker as I would with a pepper spray that unleashes a cloud of the stuff.
As for CCW defense, I've thought about an ankle holster as a good option for the car. I don't like ankle carry and don't do it, but I suspect (should MD ever go shall issue) I will probably keep a snub revolver or comparable auto in an ankle holster in a safe in the car for use when driving (or when I use a smaller CCW have an ankle holster for it in the car to move the gun to when driving). While sitting in the driver's seat, I can easily reach my ankle but not so easily reach something in my belt line. Though, I haven't tested out the idea to see how comfortable and realistic it is in real life when I'm carrying in a state where I legally can (like I said, I don't much like ankle carry). While I like the idea of an ankle carry in the car option, when in states where I can carry I simply find myself moving my holster forward a bit to where it is easier to reach when sitting instead.