Potentially you can get in trouble for swearing at a United States Marshall despite the fact that under certain circumstances the "cursing" may be protected speech under federal and state constitutions. The key is what was said, how it was said and where the "cursing" was uttered.