Two Virginia brothers have been ordered to sell most of their stock in a Front Royal savings and loan because federal regulators suspect they were trying to take it over without permission.

The Federal Home Loan Bank Board announced yesterday that it had issued cease-and-desist orders against Eugene N. Hooper of Falls Church and James E. Hooper of McLean requiring them to divest all but 5 percent of the stock held by each man or his family in First Federal Savings and Loan Association of Front Royal. James Hooper, a contractor, is a former director of First Federal and now serves as a director emeritus. His brother is a real estate developer and builder.

The regulators claimed the brothers had violated securities laws and a 1978 law governing the change in control of such institutions that aims to keep incompetent, inexperienced or dishonest persons from acquiring S&Ls by requiring prior regulatory approval to buy more than 25 percent of an institution's stock.

The order requires the Hoopers to exercise no further control over the stock and to sell it in an orderly fashion that does not disrupt the market. It also orders them not to acquire control of First Federal, acting alone or in concert with others. It expires after a year, at which time the Hoopers could repurchase stock in conformance with the law if they wish. The Hoopers consented to the order without admitting or denying the charges.

A FHLBB attorney said yesterday the agency thought the family was trying to exercise control without prior approval but that this had not been proved in litigation.

Steven D. Keefe, an attorney representing Eugene Hooper, said the brothers had bought stock for themselves and their wives and adult children late during the initial offering period when brokers were having difficulty selling it and that they did not know they were violating the law. The initial purchase price was $5.25 a share.

First Federal's president, David Boyles, said yesterday he thought the Hoopers were "not intending to slip in the back door; they were just trying to help out." He said the S&L had not filed a complaint.