My DD1 is 5, and I want her to have freedom and responsibility but also to balance that with ensuring she is safe.
She knows that some people are not safe - she was aware of the Maddie McCann case last year, and I kind of said that Maddie went off with a stranger, and now no-one knows where she is, so from that aspect she knows that not all strangers are safe. She also knows what should be said if a stranger offers her sweets/a lift / told she must go with him/her etc...
That said, I tend to emphasise boundaries more than stranger danger, so for example, if we go to Mothercare world, I'll let her run off and play in the ELC bit whilst I look around, but the deal is that she is not allowed out of the shop without me. She knows that and so would not do it. I also let her walk round to the childminder's house alone (three houses along, next road), because again she knows the boundaries of what she is and is not allowed to do - not talk to strangers, cross the almost dead end road safely, walk (and not run) there and back, no diversions etc etc.
So yes, she is aware of it, but I emphasise her safety and her boundaries, making her take responsibility for what she is and is not allowed to do - and I know she loves being given the responsibility and does not let me down. I think this is more important than just emphasising stranger danger, because there are so many other ways that they could get lost or hurt, not just through stangers.