You might not realize it, but your text messages and phone calls could be intercepted by local police on the hunt for a suspect. This is a practice widely used across the country, and a handful of states are trying to place limits on the controversial technology that makes it possible.

New legislation proposed last week in Illinois makes this state the most recent to attempt a crackdown on the use of so-called "stingray" devices, also known as "cell site simulators." While this tech is meant to capture cell phone data from suspected criminals, it's used to sweep up data from a large area and can pull in text and call content from innocent civilians. The devices mimic cell phone towers, tricking cell phones into connecting to them.

Illinois' bill, introduced by State Senator Daniel Biss, would require police to obtain a warrant before switching on the stingrays and would force police to delete civilians' text and call records accidentally collected during an investigation.

Police in 23 states are known to have stingray devices, according to the American Civil Liberties Union. Four states have already passed laws requiring police to get a warrant before using stingrays, per ABC Chicago affiliate WLS.

Sponsors of the proposed Illinois law say the warrantless collection of civilian phone data, even if it’s accidental, could violate privacy rights. Civil liberties groups are also worried.

"We are concerned with assuring that the devices operate within our accepted constitutional framework," Edwin Yohnka, the public policy and communications director the American Civil Liberties Union told The Huffington Post in an email Wednesday.

Under the proposed law, he said, “If you or I were in an area where a stingray is being used, government won’t have a record of that fact -- we are therefore free to travel without that surveillance."

ACLU Police in 23 states are known to have stingray surveillance devices, according to the ACLU.

If passed, the proposed surveillance legislation would bring Illinois in line with federal law. In October, the Department of Justice announced new rules requiring federal investigators to obtain a warrant before using stingrays. But the rules don’t apply to local police.

Illinois's police practices came into the national spotlight last year after Chicago officer Jason Van Dyke was charged in the shooting death of 17-year-old Laquan McDonald.

State Representative Ann Williams, who sponsored the bill in the Illinois House of Representatives, hopes the proposed legislation will help protect rights in an era of rapid technological change.

"Basic protections are no different because of advancing technology. The law has to keep up with it," Williams told the Chicago Tribune last week.