A high-tech political machine armed with some of the most lucrative direct mailing lists in the country and backed by Sen. Jesse Helms (R-N.C.) has drawn the management of CBS Inc. into a fight for survival.

The contest pits CBS in an unprecedented takeover and public relations battle against an ideologically driven adversary that openly claims to be more interested in achieving political goals than in making money on the deal.

Regardless of the outcome of this battle, the Helms-CBS confrontation provides a litmus test of the ability of the conservative movement to translate the power of its affluent financial base into an ideological force in the marketplace. And it already is providing a look at some legal liabilities within the conservative political machine now under scrutiny by both government prosecutors and CBS lawyers.

The takeover bid by Fairness in Media, an ad hoc committee run by the political allies of Helms, was launched in January. Since then, CBS has hired a battery of top-dollar law firms with the goal of discrediting the North Carolina-based political machine in an attempt to uncover what it claims are improper political fund-raising and other activities that violate federal law.

As part of this effort, CBS already has linked officials of the Helms organization and its main lawyer in the takeover battle to a controversial tax-exempt foundation, The Pioneer Fund. The fund has financed research into "racial betterment" by scientists seeking to prove that blacks are genetically inferior to whites.

The decision by Helms to expand his activities beyond the arena of politics into the corporate takeover battleground grows out of a deep, long-standing animosity among conservatives toward major media outlets. Acquiring a large-circulation newspaper or a network "is something that has been a dream of conservatives for years," according to Howard Phillips, chairman of the Conservative Caucus and an ally to Fairness in Media.

Richard A. Viguerie, the conservative fund-raiser, said: "In order to accomplish what we want politically, there is going to have to be a change in the media." Viguerie said he is involved in an entirely separate venture with a group of "substantial" conservatives who have hired financial specialists to find prospective print and television media targets to buy or take over.

In the case of Fairness in Media, just days after the November election, one man, Thomas F. Ellis, the backroom architect of Helms' rise to political power, conceived of the attack on CBS as a way to capitalize on President Reagan's landslide victory and on Helms' come-from-behind drive to win a third term in the Senate.

The bid for CBS has proved to be a gold mine of free publicity for Helms, who has piggybacked on the press' extensive coverage of both corporate takeovers and legal libel battles between public figures and the media. To gain an absolute majority of stock, supporters of the conservative drive would have to put up more than $1.5 billion, making Wall Street analysts very doubtful of the probable success of a conservative takeover.

These same analysts, however, believe the FIM bid has made CBS vulnerable to a takeover by a third party more interested in the economics than the politics of the company. Analysts point to the fact that the FIM publicity has drawn attention to how much more the assets of the company are worth than the current stock market price. CBS is vulnerable to a takeover because more than 80 percent of its stock is held by the public, two-thirds of it by institutional investors.

The public fight between CBS and Fairness in Media began Jan. 10, when FIM filed papers with the Securities and Exchange Commission indicating it would encourage conservatives to buy CBS stock. FIM also said it would try to change what it believes is a "liberal bias" in the network's news coverage.

FIM mailed a million letters, signed by Helms, to conservatives asking them each to purchase at least 20 shares of CBS stock, an unprecedented political effort to organize a large group of individual stockholders to influence network news coverage while generating enormous publicity for Helms.

FIM's filing with the SEC said the group was formed on Nov. 13, 1984, by three North Carolina lawyers, R. E. Carter Wrenn, Thomas F. Ellis and James Palmer Cain. The three all have close ties to Helms. Wrenn is executive director of the National Congressional Club (NCC), the nation's second-largest political action committee, which supports conservative candidates for public office. Ellis is chairman of NCC.

On Feb. 4, Rep. Philip M. Crane (R-Ill.) said that he was joining the FIM campaign, and on Feb. 8, FIM said in a new SEC filing that it was considering a proxy campaign to elect directors to CBS' board and also said it had begun conducting discussions with third parties about transactions to seek control of CBS.

The documents did not identify the third parties, but The Washington Post reported on March 20 that broadcasting magnate Ted Turner told CBS lawyers he had held discussions with Helms and FIM about launching a joint takeover bid for the network. Turner has since told The Washington Post that he does not have the money to make a bid.

On Aug. 28, 1982, Turner donated 2 1/2 hours of prime time on his WTBS superstation to Helms and Crane for a television documentary called "KGB: The Lie . . . and The Truth." The program, an investigation into covert Soviet activities that threaten the United States, was produced by the Coalition for Freedom, a Helms-supported group, and hosted by Crane. It featured appearances by Helms and Sen. John East (R-N.C.).

CBS stock has skyrocketed since its battle with FIM began. On Jan. 10, the day FIM filed its initial papers with the SEC, CBS stock closed at 72 1/2. On Friday, it closed at 109 3/4, driven upward not only by the Helms attack on the network but also by speculation in media company stocks following the announcement on March 18 that American Broadcasting Companies Inc. had agreed to be acquired by Capital Cities Communications Inc. for more than $3.5 billion.

The rise in CBS stock has added strong economic support to the Fairness in Media drive. Someone following the recommendation to buy 20 shares on Jan. 10 would, by last Friday, have realized a gain of $745, or 51 percent, on an investment of $1,450, excluding brokerage fees. CBS charges in its lawsuit against FIM that the group is "attempting to manipulate the market in CBS stock through statements intended to create the false impression that FIM's efforts will result in a tender offer or other conventional takeover of CBS."

Some Wall Street analysts said they believe one of the reasons why ABC Chairman Leonard Goldenson chose to sell the company to Capital Cities was to avoid being the target of a hostile takeover bid.

Last week CBS gave its shareholder list to FIM after the group agreed to restrict the use of the names. CBS said it refused to give FIM the list until it received assurances that the list would not be used for political fund-raising.

FIM said Friday it will not use the list to mail stockholders information or launch a proxy fight before CBS' regular annual meeting on April 17. FIM claims it is willing to fight CBS for as long as it takes to realize its goal of influencing the network's news coverage. Inside Helms' Empire

Fairness in Media is the most recent addition to a multimillion-dollar political empire of corporations, foundations, political action committees and ad hoc groups built up over the past 12 years by Jesse Helms, Tom Ellis and Carter Wrenn.

The political-money machine Helms and his allies have established is conducting the drive to apply conservative pressure on CBS. It financed the $500,000 needed for the cost of the initial mailing, and it controls list upon list of donors who have shown repeated willingness to pull out their checkbooks when Helms writes letters to them about abortion, school prayer, forced busing and now the "liberal bias" at CBS.

There are two key organizations in this empire. The first is the National Congressional Club, a conservative political action committee that raised $9.8 million in the 1982 election cycle. In the 1984 cycle, the club raised $5.7 million while the Helms campaign committee raised $13.99 million, a record in a Senate contest. The Congressional Club financially eclipses North Carolina's Democratic and Republican parties, each of which operate on annual budgets of less than $500,000.

The second critical organization is a corporation called Jefferson Marketing, viewed by many as one of the most ingenious political inventions in recent memory. It is, in effect, a corporate organization geared to providing conservative candidates and causes the computerized technology of the 1980s.

Housed in a nondescript, three-story building in a North Raleigh office complex, Jefferson Marketing has absorbed much of the staff of the National Congressional Club and past Helms campaigns under the protective cover of a private corporation, and it has taken over such key activities as direct mail, staffed phone banks, automated telemarketing and the production and placement of commercials.

The critical importance of Jefferson Marketing in the political structure is reflected by the fact that the National Congressional Club, once the centerpiece of the Helms organization, is now just a three-person operation -- Carter Wrenn and two secretaries -- operating out of a third-floor, corner office in Jefferson's headquarters. Jefferson, in the meantime, has grown to employ 170 people.

Similarly, Fairness in Media is barely a one-man operation: James P. Cain serving on a lawyer-consultant basis. FIM rents a makeshift office room from Jefferson Marketing and uses the same receptionist, Johnnie Dean, who also answers calls for the National Congressional Club and for Jefferson Marketing.

Without Jefferson Marketing, it would appear that the drive to persuade conservatives to buy CBS stock would be a paper tiger. Jefferson advanced Fairness in Media a $500,000 line of credit to finance the million-piece mailing and subsequent telephone follow-up calls, and it owns key lists of conservative donors targeted in the drive.

Linking all these and a host of other groups, however, is a system of interlocking directorates in which Ellis and Wrenn are consistently the central players.

Ellis is chairman of the National Congressional Club; principal stockholder and a board member of the tax-exempt, nonprofit Educational Support Foundation that in turn owns Jefferson Marketing and appointed the officers and directors of Jefferson Marketing; a "founder" of Fairness in Media, and chairman of the Coalition for Freedom, a tax-exempt foundation whose goal is to finance conservative-oriented television programs. Wrenn holds identical positions, except that he is executive director and treasurer of the National Congressional Club and treasurer of the Coalition for Freedom. Tale of Two Lawsuits

The Raleigh, N.C.-based conservative political machine that backs Helms and other conservative candidates for political office is under pressure from separate lawsuits brought by the Federal Elections Commission and CBS.

The FEC lawsuit filed last month charges that the National Congressional Club has used Jefferson Marketing to channel illegal contributions into a political campaign.

The FEC has charged that Jefferson Marketing Inc. has provided fund-raising, media and other campaign services to candidates at "less than the fair market value."

If a corporation, such as Jefferson Marketing, does not charge a campaign fair market value for its services, the corporation is making illegal contributions, because corporations cannot contribute to federal candidates and because the contributions were not reported, according to federal election law.

The FEC named R. E. Carter Wrenn, the National Congressional Club's executive director and treasurer, in its suit. Wrenn told Congressional Quarterly in 1982 that Jefferson Marketing, incorporated as a for-profit corporation, was "set up to have an absolute minimal break-even situation, and there's never been any profits or dividends."

Later, testifying under oath in 1983 in a deposition taken in connection with the FEC charges, Wrenn appeared to contradict his comments to CQ. In the sworn testimony, he said: "If Jefferson ever operated without a profit in dealing with a political entity, that would be a problem. So, I have always advised them . . . to always be sure to operate with a profit."

The FEC suit alleges that Wrenn, Ellis and other NCC officials control Jefferson Marketing, and that Wrenn has exercised "domination and control over the day-to-day operations of Jefferson Marketing. Thus . . . Jefferson Marketing and the Congressional Club are a single entity." A legal ruling to that effect would mean both Jefferson Marketing and the NCC have violated federal election laws.

Paralleling the FEC, CBS charges in its lawsuit that Congressional Club, Jefferson Marketing and other organizations controlled by Wrenn and Ellis have failed to disclose their active participation in the Fairness in Media attack on the network through contributions of funds and personnel.

"Although styled a proxy contest, FIM's efforts are in fact a vehicle to raise funds and publicize partisan political views and individual candidates," the CBS lawsuit says. " . . . Defendants' filings with the SEC fail to disclose the nature and extent of financial support being received by FIM from NCC and Jefferson Marketing."

The key in deciding who is right is a legal determination of whether or not FIM and the other Raleigh, N.C.-based political committees supported by Helms and controlled by Wrenn and Ellis, are, in reality, one organization.

Ellis refused to discuss the controversy. "I do not talk to reporters. I've got a policy," he said. Wrenn, however, said in response to both the CBS and FEC accusations:

"Our point is twofold: The FEC has argued that because of my role in the club and the Educational Support Foundation, that makes Jefferson Marketing a political entity and not a for-profit corporation. . . . We basically counter-argue that they have separate bank accounts, separate tax accounts, separate business purposes. . . . What we have disputed with the FEC is they want Jefferson Marketing to file federal reports on their income and expenditures. We don't think they have the right to require that."