Duo's suggested translation ("What is wrong?") seems more akin to "What's the matter?" rather than "What's up?"
I'd more likely use "What's up?" as a neutral way of greeting someone--probably not when the other person looks down/pensive.
Is the German "Was ist?" equally capable of expressing both "What's up?" and "What's the matter?"
Was ist? is short for Was ist los? which means "what is going on?" or "what is happening?", which could be interpreted either as "what's up?" or "what's wrong?" depending on context and how it's said. If said in a concerned voice, it obviously means "what's wrong?" - but if in a more general tone then further context may be required.
When I was learning German in school (a long time ago), we were taught 'Was ist los?' When was 'los' removed to just say 'Was ist?'?
Ah, bleurabbit7, my formal German training also was long ago. You can be sure my text books didn't cover "slang" (for want of a better word). More recently, when I tried to speak with my brother's German family, they looked at me funny and remarked, "that's OLD German!" You can still say "Was ist los?“, but there are, and have always been, more than one way to say something.
If I was to ask someone what is wrong, I'd either say "Was ist passiert?" being polite to an unknown/lesser known person. If it was to a known person "Was ist los?". If I was at the till (kasse) and there was a problem with me, my money counting etc, I'd either use either "Was ist passiert", or "bitte?". "Was ist?" just seems too trendy to me.
Was ist is the shorter colloquial form of was ist los, and los has a very broad meaning depending on context but the etymological root means "loose" (as in to be rid of), which is one possible meaning of los. Others are "happening", "occurring", "going on", or, if it's by itself - Los! - it means "Come on!"
In this specific context it means "what is going on?" but it is used in a more negative context than "wie gehts/wie geht es" which means "how's it going" and this is the reason why it is rendered "what is wrong?" here. You could also think of it, since it's root means loose, as meaning "what is out of place?" or something like that.