Imperial Sentry Droid

The Imperial Sentry Droid is a hulking black security droid resembling a Stormtrooper used to protect the Galactic Empire's cargo ships. Usually, they would only be activated one at a time aboard their vessel, but when one droid was attacked by a perceived threat, the others would also activate to attack the intruder.

Star Wars Rebels
Imperial Sentry Droids appeared in the episode The Wynkahthu Job, in which they attacked the crew of the Ghost when they sought to salvage supplies and treasure from an abandoned Imperial cargo ship in the upper atmosphere of the planet Wynkahthu. One captured both Azmorigan and Garazeb Orrelios before they were rescued by Ezra Bridger. When they tried to hide from the droid, Azmorigan panicked and shot the droid, inadvertently awakening its companions. The droids then proceeded to attack them and the rest of the crew as they tried to steal as much ammunition and treasure as they were able until the cargo ship began to sink into the maelstrom of storms in Wynkahthu's upper atmosphere. As the Ghost and its crew escaped, the droids were left aboard and sucked into the storms below, destroyed alongside the vessel they had failed to protect.

Trivia

 * The Imperial Sentry Droids are modeled after Dark Troopers, a type of battle droid that appeared in the Star Wars "Legends" continuity, specifically the video game Star Wars: Dark Forces. Dark troopers came in three phases, with the third and last phase most closely resembling the Imperial Sentry Droid.