How to start a terminal from a recovery USB flash drive
A bash shell is available in Maverick's Recovery Mode from the menubar under Utilities:



If you suspect that the internal recovery disk is compromised and cannot boot into it with Command+r, you could try booting into the "internet recovery mode" with Command+Option+r. It might take a minute or two to load the Terminal option.