How do you prepare a steak to be rare and very rare (blue)?
The only real bacterial problem you have to worry about with steak is e. coli, which lives on the outside. Since even in a blue application the outside is cooked sufficiently to kill any bacteria, you should be fine. (Presuming you are using fresh steak, naturally).

For blue: get a pan screaming--and I mean screaming--hot. Toss the steak in to sear, flip to sear the other side. Do edges if needed. Serve immediately.

For rare, just do the steak in a normal pan or grill, flip once, about two minutes per side (less if the steak is very thin).

For both blue and rare applications you will want steaks that are on the thick side, and with not much marbling (intramuscular fat), as the short cooking time won't melt the fats. I suggest tenderloin/filet.