And how can I prove that I lived outside the US?
You can use your current or previous passport or show us your school records or work records from the country you used to live.
what if I don't have permission to work but need the social security number to apply for government benefits?
You can actually apply for a social security number if you are required to provide your social security number by a state or local law to get general assistance benefits.