It falls in a nice big grey area.
Officially, possessing PwnageTool is against the law in the US, as is bypasses protections to provide access to data that is normally restricted.
At the same point, through the purchase of the hardware, it is yours to do as you see fit including to retool for other purposes. Possessing a modified device is also perfectly legal, as is using a modified device to perform tasks that it was not originally designed for *as long as it does not interfere with the operation of other devices*.
This means that the act of jailbreaking is perfectly legal, however the use of jailbreaking applications is illegal, it doesn't matter whether or not it contains or references copyrighted code.
If one were to modify the firmware to cause the iPhone to send out garbage data to prevent someone from making a phone call or connecting to a wireless network, or increasing the power output of either of those antennas, it becomes a *highly* illegal act. As is changing any unique identifiers on such as the IMEI.
Apple can refuse support for something that they have not provided (a hacked iPhone), however they can't legally intentionally damage your iPhone if you have modified it. That's not saying that they can't inadvertently damage your modified iPhone... That all comes down to intent really.
It is also *possible* that PwnageTool and other similar applications could be granted an exception by the Librarian of Congress if it can be determined that the use of PwnageTool if it's developers can prove that Apple's access-control system has a substantial adverse ability for people to make non-infringing uses of copyrighted works.
This exemption would then be reviewed every three years and to date there have only been 12 granted of which there are only 6 which are still valid.
At the end of the day, the odds of someone being prosecuted for this is *very* remote given the fact that it would come down to assessing damages for this offense beyond the $750 to $30,000 maximum per infringement in the case that it is proven that the person responsible profits from their infringement.
Have a nice day!