score:4
The Catechism of the Catholic Church does not specifically prohibit employment of, say, working for a defense contractor, but it does set some parameters.
First, employment is the primary path to functioning within the social order. CCC 2428 says: In work, the person exercises and fulfills in part the potential inscribed in his nature. The primordial value of labor stems from man himself, its author and its beneficiary. Work is for man, not man for work. Everyone should be able to draw from work the means of providing for his life and that of his family, and of serving the human community.
However, there is a firm stance of the Church that finances are not the big picture. CCC 2424 states: A theory that makes profit the exclusive norm and ultimate end of economic activity is morally unacceptable. The disordered desire for money cannot but produce perverse effects. It is one of the causes of the many conflicts which disturb the social order.
The Church may not specifically instruct to quit one's job, but it gives us some avenues for consideration. Although not a definitive answer to your question, CCC 2256 states: Citizens are obliged in conscience not to follow the directives of civil authorities when they are contrary to the demands of the moral order. "We must obey God rather than men" (Acts 5:29)
Of note, workers, when faced with issues of injustice, may strike. CCC 2435: Recourse to a strike is morally legitimate when it cannot be avoided, or at least when it is necessary to obtain a proportionate benefit.
What I get from reading these passages is to simply follow one's conscience. Giving up a morally reprehensible, yet lucrative, job will be favored in the eyes of God.
One must also consider how closely linked the profession is to the malignant result. A fry cook at a fast food chain, owned by a consortium, one piece of the consortium sponsors terrorists, can hardly be held accountable for terrorism; but he might still choose to be a fry cook somewhere else.