Throughout the Bible, the satan is portrayed as being a creature ordained and directed by God, fulfilling his function of being an adversary. In fact, the Hebrew word satan means "adversary", and in its earlier usage it carries the definite article ("the satan", or "the adversary"). Satan is portrayed as a courtroom prosecutor, and God is the judge; Satan looks for evidence against God's people (e.g., Job), and God even lets him use entrapment and sting operations. Over time, however, the portrayal of Satan shifts from being God's servant to being God's enemy, as Satan takes his efforts to accuse God's people further, breaking the boundaries that God puts on him. By the time we get to the NT, Satan is God's enemy, yet unwittingly or unwillingly continues to serve God's purposes by doing what he always does: entrapping and accusing people.
Satan's role, I think, is as God's servant, also seeing Satan's fall as the act of going outside of the boundaries that God had placed upon his accusations and adversity. This is a pattern for all of the fallen powers: They continue to do what they were created to do, but they do it deficiently and for their own purposes and glory. They're like a banker who starts to siphon funds, or a politician who uses his influence to pad his own pockets or accept bribes; they still have the same job, and they do it to some extent, but they do it for themselves rather than for their true master. In a word: Idolatry.
That idolatry is a reversal of relationship: The creature demands the service of the creator. This is certainly true of actual, physical idols: A human being makes a statue of gold, and then bows down to worship it, leaves food out for it, etc. This is true of the love of money: Money is a tool for our good, but we spend all of our time and energy trying to get more of it, to the point where we're serving it rather than the other way around. All sin has some form of idolatry in it -- not least the sins of the Powers, who were created by God to serve humanity but have instead demanded service from us, setting themselves up in the place of God. Governments are set up to protect their people, but they start foolish wars and millions are killed; economies are set up to circulate money and increase wealth, but they set up monopolies to hoard the wealth and enslave the people with consumerism; even marriage, perhaps the institution most celebrated as being "Christian", is a fallen Power as often as not, with people looking for need fulfilment and impossible romance in a relationship that can't actually provide such levels of service. For the amount that we spend on books, magazines, and lawyers, all telling us how to have a healthy/happy marriage/divorce, or how much we spend on a wedding with all of the social trappings that come along with it, it's clear that, at least at times, we're serving the institution of marriage more than it’s serving us (or from another perspective, perhaps we’re expecting service from our marriages when we should actually be the ones serving?). Nothing is sacred, nothing is exempt -- all of the Powers are fallen to some extent or another, and we have our fingers in it.
But I digress: We're talking about Satan, that chief of the powers. Over time, Satan accrues more and more names: Adversary, yes, but also Accuser, Slanderer, and Destruction, among others. He gets worse, more powerful, more hateful and spiteful -- at least that's how he's portrayed. Part of the tension found throughout the Bible when the topic of Satan is mentioned comes from the ambiguity of whether or not Satan is a real spiritual being of evil nature, or if he is merely a personification of the human adversaries that are faced by the community creating the texts. As the Church emerges and faces opposition, they aren't afraid to call their adversaries, human or otherwise, Satan! I tend to go even further, based on my experience as a pastor and my reading of Walter Rauschenbusch's Christianity &Sicial Crisis, Reinhold Niebuhr's Nature & Destiny of Man, Dr King and Walter Wink's Powers that Be.
I think Satan is any manifestation of the powers and principalities. What Wink calls "the Domination System". This isn't some amorphous spirit in the sky who wrecks havoc. Individual fallen powers are bad enough, but when they act in concert, it's pure and utter domination. And it's satanic.
Take, for example, sweatshops in the third world: This is a failure of so many different social institutions around the world! Complicit in the atrocity that is sweatshop labor are the powers of economy (ours, which depends on cheap goods produced in sweat shops, and theirs, which depends on low-wage work that keeps their people in poverty rather than enriching them); government (ours, which should hold our corporations responsible for what they do overseas, and theirs for not protecting their people adequately); culture (ours, for being materialistic and colonialist, and cultures around the world for attempting to imitate ours, often in the worst ways); religion (for failing to speak up, both here and there); and many others.
One of these powers alone is bad enough. Put them together -- embody them in The Satan -- and you dehumanize in the way that only Satan can. (Think CS Lewis' Screwtape Letters here.) One thing wrong is adversity. But when powers-that-be work in concert, you end up in Domination. Satan pushing us past growth in adversity to utter desolation. That, after all, seems to be his very purpose in Job and later in the NT.
That's not how life is supposed to be. It's the incarnation of the chaos of death. So it seems to me be to a false choice to insist that Satan is a literal being or the sinful working of social systems. Satan is both.
What's important, in the end, is not that spiritual warfare is against a "bogeyman" who is God's opposite. Because the Satan is a fallen created power. God uses its actions for our good, regardless of their intent; and on the flipside, whether God sent Satan to do these things to us, or whether Satan does them out of an idolatrous self-motivation, it's still adversity that we need to grow through together, and we still have a role to play in how these issues are resolved. Not something we blame for all that's wrong in the world.
Because, as I've written before, even the church can be satanic: http://the-little-friar.blogspot.com/2013/03/the-satanic-church.html.