You can fight back after an illegal search in Pennsylvania. The Fourth Amendment of the Constitution prohibits unreasonable searches and seizures. If the police stopped and searched you, for example, and did not have lawful grounds to do so, for example, if they did not have a warrant, if it was an illegal search otherwise, you do have the right to fight back.
That evidence that they obtained, unless they, for example, were to find it in some other capacity, it is considered what's regarded as the fruit of the poisonous tree, meaning that but for the police's misconduct or wrongdoing in obtaining that evidence, they wouldn't have had that evidence available to them, and as such, it would be illegal. It needs to be challenged, however.
An experienced attorney would be able to employ different strategies to do so.
For example, a motion to suppress evidence where a motion would be drafted and followed by your attorney to the court, a hearing would be set to argue why the evidence was illegally obtained and why it should be suppressed. Suppressed means that it cannot be used against you, say, at trial.
Having an experienced Pennsylvania criminal defense attorney in your corner will help you best defend against these allegations, and they should be involved as early as possible in the process.