Unhappy with his middling scores on the standardized test for aspiring medical students, Bosung Shim tried to hack into the Association of American Medical Colleges computer system and change them. When that didn’t work, he hired other hackers to help.

The 24-year-old Rockville man — the son of two doctors from South Korea — “felt that he really needed to go to medical school,” his attorney said in court Friday. But his desperate — though not wholly unsuccessful — attempts instead landed him in prison.

A federal judge in Alexandria sentenced Shim on Friday to three months of incarceration, followed by seven months in which he will have to report to a sort-of halfway house each night. The sentence was short of the 10-month prison term prosecutors had sought, but U.S. District Judge T.S. Ellis III said he hoped it would serve as a “beacon” to others who might be tempted to hack their way to academic success.

“This is a not insignificant sentence,” Ellis said, adding that Shim’s freedom would be “significantly curtailed.”

Shim, who pleaded guilty in October to intentionally accessing a protected computer without authorization, said in court Friday that his conduct was “completely unacceptable” and that he was ready to “take the consequences,” whatever they may be.

“I want to be, and I will be, an honest person, your honor,” he said.

In court and in written filings, prosecutors portrayed Shim as a desperate fraudster whose effort to change his Medical College Admission Test scores was one of several schemes he launched to help secure jobs and improve his medical school admission prospects.

Shim, a University of Michigan graduate, began studying computer-hacking techniques in May 2011, and the next month, he tried to hack into the University of Michigan’s computer system to change his grades — which constituted “barely over a 3.0” grade point average, according to Ellis and prosecutors.

When that attempt failed, prosecutors said, he tried a more old-fashioned approach: downloading copies of transcripts, recommendation letters and diplomas from the Internet to create a fraudulent transcript of his own. He paid $1,000 for paper similar to that used in authentic University of Michigan documents, prosecutors said.

“This is not just an isolated incident,” federal prosecutor Peter V. Roman said of Shim’s misdeeds. “This is not a one-time thing.”

Shim was legitimately awarded a bachelor’s of science in biomedical engineering in August 2011, according to a University of Michigan spokeswoman. Still, he sent his faked transcript to the Association of American Medical Colleges as part of a medical school application packet, prosecutors wrote. He also used it to help win a research position at the National Institutes of Health, prosecutors wrote. The NIH said in a statement that Shim worked as a fellow — not a full-fledged employee — from September 2012 to September 2013 and declined to comment further.

All the while, Shim struggled to earn an MCAT score to his liking. He took the test seven times between March 2009 and July 2012, and chose to receive only two scores: a 22 and a 25. Possible scores on the test range from 3 to 45.

Prosecutors wrote in court filings that Shim tried to hack into the association’s computer system in July 2012 to change his scores or to at least change the records so he could take the MCAT again. When his own efforts failed, prosecutors wrote, he paid hackers $6,000 to help him. At least one absconded with $600. While others were able to access the computer system, the association detected the intrusion and soon began shutting down databases and blocking IP addresses associated with Shim’s computers.

Roman said investigators were “looking into” possible charges against the other hackers.

Frank Trinity, chief legal officer for the Association of American Medical Colleges, said that the association ultimately thwarted Shim’s and others’ efforts to modify scores but that the intrusion into the system required costly repairs. The association ultimately spent more than $31,600 to fix the damage, authorities said. Shim admitted the hacking to Secret Service agents in March, although two months later, prosecutors wrote, he began another scheme: creating a fake graduate transcript to submit with his job and medical school applications.

Defense attorney Jeffrey Hamberger said his client, whose parents also worked as Christian missionaries in Albania, “felt the pressure to have done better than he had” in college.

“He forgot his upbringing,” Hamberger said, “and it was restored to him.”

Hamberger asked Ellis not to sentence Shim to any prison time. After the hearing, Hamberger said the sentence was a “thoughtful” one that “served the purpose the judge said it would.” Shim said he was prepared for the punishment.

“I stated in open court that whatever the consequences, I’ll take it,” he said.

Get updates on your area delivered via e-mail.