This is "Cordon Sanitaire" (1985) by Timothy Zahn, published only in the 3-novella anthology Alien Stars (ed. Elizabeth Mitchell).
I had a few details wrong; the team of 4 are on a six-month exploratory stay in a small base dropped on an uninhabited planet. The biologist is studying the local proto-simians who they call "tarsapiens."
A survey-type ship lands on an unexplored planet. The landing site is near the edge of a forest, or in a clearing. The crew get out, start doing a scientific survey of local flora, fauna, etc.
With forested areas dominating the Palladian landscape, Lyell had insisted they set up shop in that particular ecosystem, a demand that had reportedly brought frowns to the faces of those in charge of the expedition’s budget.
I believe the first day or two are uneventful, but suddenly one day someone shoots at them!
They'd covered perhaps five meters and Kata was probing carefully into a nearby pora-grass thicket when Lyell abruptly jerked backwards with a yelp of surprise and pain. "What?" Kata snapped, trying to get around in front of him.
"My arm—ahr" he grunted again, lurching sideways into her and throwing them both off balance.
Which may have saved her life. Even as she took a step backwards to try and support his weight something whistled past her ear and thunked audibly into a tree trunk behind her.
They were being shot at!
The projectiles are small needles, with some kind of poison/drug on them; one of the crew is hit and needs medical attention.
"Not much." There was a little, though, she saw, as if he’d been poked with a needle. "Mitch, hand me the fluoroscan, will you? Thanks. Now... ah. Wumph." She ran the hand unit over his shoulder next, feeling her jaw tighten. "They're there, all right. Two little needles, a few millimeters long. In pretty deep, too."
[...]
"Don't argue!" Lyell snapped. "My arm doesn't feel this way solely because of shock. Those needles are putting something into me, and I want them out."
The crew manage to stun/kill the shooter to discover it is a member of a species they have already encountered, armed with a far too technologically advanced needle gun.
The body was lying on the crushed remains of a sarcacia bush, its fur marked with the red-in-black swaths of laser bums. Still gripped in its hand was a sleek, jet-black pistol—gripped so tightly, in fact, that Rom was having trouble prying it loose. For the moment, though, Mitch had little attention to spare for the weapon; his full and unbelieving gaze was on the creature holding it.
A tarsapien.
They examine the gun and find that it is extremely robust, charges using solar power, has a magazine of around 10 000 needles and is incredibly simple to use.
"The whole thing?" Kata asked, her eyes and brain trying to reconcile the sizes of the tiny needles she'd become far too familiar with and the solid-looking mass on the computer screen. "There must be—-oh, thousands of needles in there."
"Something under nine thousand, actually," Rom said. "The reservoir also appears to be about half empty."
Mitch was the first to break the silence. "An eighteen thousand shot clip? What were they fighting, anyway, the Hundred Years' War?"
One of the crew - possibly the one who examined it - tries it out and then starts carrying it around, despite the concerns of the rest of the crew.
"I mean he wouldn't so much as let me touch that damn gun while we were working on it," the geologist said. "He held it under the fluoroscan, he took all the caliper measurements, he moved it between machines when necessary. All he'd let me
do is punch in the data."
"Um." That did seem excessive, Kata thought. Still, Rom had never been at his best in group situations. "Well... Rom doesn't ask much of the rest of us. I suppose we can indulge him this once."
"He still shouldn't carry that gun around like a personal sidearm," Shannon said, standing up. "I'll try to get that through to him, at least. Oh, and please don't wait for me, either—I'll make a private supper for Rom and me after you've eaten."
With her usual half-apologetic smile she left.
The crew is shot at again, this time by more than one assailant. The number of shooters grows until just stepping out of the ship is met with a hail of needles.
Wondering whether he was being heroic or just stupid, Mitch eased the door open
and slipped outside—
And was barely two paces away from the building when the needles began whining all around him.
the crewman who took the captured needler runs off into the forest.
Behind him the door opened, and he turned as Shannon stepped into the lab. "Have you seen Rom anywhere?" she asked, her voice tight.
"Not since the medcheck this morning," Mitch said. "What's the matter?"
"I can't find him," she said, her eyes darting around as if he might have somehow sneaked in without their knowledge. "I've been through the entire building and I simply can't find him."
The rest of the crew carefully examines the scans of the needler that they took, and find that along the grip are a series of extremely fine hollow spines, connected to a reservoir in the grip. Every time the crewman picked up the needler, some drug was being injected into him.
The smooth edge had become a gently curving hill forested with squat but exquisitely sharp needles. A glance at the scale confirmed his first guess: Rom would probably never have felt them poking into his skin. "I think," he said, "we've
found the delivery system for those nucleic acids in Rom's blood."
but they come to the conclusion that the drug injected by the handle can somehow program the user to be either paranoid or xenophobic or something similar so that they will have the inclination to fire the needler at strangers.
"The—what do I call them? How about the 'Gunners'? The Gunners seem to have come up with a method using nothing but a sequence of enzymes to stimulate and guide the false memory development. How they provide the motivation I don't yet know, but it would have to couple a recognition pattern with either a glandular or mental fear reaction and then induce the proper physical motions. Probably need a reinforcement mechanism, as well—" She cut off abruptly.
"Sounds awfully dicey," Mitch shook his head. "To coordinate that many different activities within such a short time of each other?"
Kata shrugged. "I argue from the results that they managed it."
"Even worse, how could they possibly set up a recognition pattern that way? You'd need sensory input of some kind—" He paused. "Oh. Sure. All of
that winds up as chemical signals anyway. Why not just skip the middleman?”
Further, there is a chemical detector built into the needler that, if triggered, will inject poison into the user.
Kata seemed to shrink in her seat. "Catalytic reaction," she said with a shiver. "You get anything upwards of a dozen needle-drug molecules into the grip reservoir and it'll break the entire mass of instinct drug into five separate types of cyanide... the whole thing under pressure."
"Pressure? As in to drive it through the delivery system all the more quickly?" Mitch hazarded, a funny feeling in the pit of his stomach.
The conclusion is that some unknown race has desired to keep this planet free of other races and dumped thousands of these needlers here.
Shannon shook her head. "Not us personally; and I don't think anyone's actually watching us. What I meant was that whoever left the guns here did so specifically to keep people like us off the planet."
Kata's first reaction was incredulity... but even as she opened her mouth to voice her doubts the pieces started clicking into place. Multiple-shot, maintenance-free weapons in the hands of native animals; combined with the lab results of the past few hours—
Mitch might have read her mind. "Kata, have you got anything on that odd nucleic acid yet?"
"Yes." She took a deep breath. "The results aren't complete by any means, but it appears the drug is designed to teach any tarsapien who finds the gun how to use it. And, if Shannon's right, exactly who to shoot it at."
If this race ever wants the planet, all they need to do is dust the planet with a small amount of the trigger compound and all the needler users will be killed.
"Yeah. So if you're not a Rival, all you need to do is spray the forest with Rival-killer... and all the tarsapiens holding the guns fall over dead."