SAN FRANCISCO — A British security researcher, who became an internet hero after he was credited with stopping a malicious software attack this year, was arrested at the Las Vegas airport and charged in connection with a separate attack.

Marcus Hutchins, the researcher, was widely praised for identifying a way to disable the WannaCry malicious software, or malware, attack that seized hundreds of thousands of computers this year. Researchers credited Mr. Hutchins’s discovery of a so-called kill switch in the malware for stopping its spread and preventing the attack from infecting millions more computers.

According to an indictment filed in federal court in Milwaukee that was unsealed on Thursday, Mr. Hutchins, 23, and an unidentified accomplice conspired to create and sell malware intended to steal login information and other financial data from online banking sites.

Mr. Hutchins created the software and his accomplice offered to sell the program, known as the Kronos banking Trojan, for $3,000 on an internet forum, the indictment said. The accomplice sold a version of the Kronos malware for $2,000 in June 2015. The indictment did not include details on how widely that malware was used, or much specific evidence of Mr. Hutchins’s involvement.