the most ghetto parts of sf are hunter's point and bayview. it is hard to end up in those neighborhoods unless you have a reason to go there (maybe to buy some discount siding?)