Painkillers Can be Stolen or Manufactured
Big suprise, I know, but criminals tend to not really care very much that the things they are doing are illegal. Kind of a major part of the whole "criminal" bit actually. Getting some ketamine or synthetic opiates can be accomplished by simply breaking into a veterinarian clinic, my mother's vetranarian clinic has had its anestetic locker raided a few times for exactly this purpose. Hell, you can get canisters of nitrous-oxide from a coffee shop and bakery suppliers legally with zero red tape. You could go online and buy enough nitrous-oxide to make a herd of elephants go night-night and nobody would even ask any questions, they'd just assume you were making a ton of whipped lattes. if you are feeling particularly frisky You can easily make chloroform in your closet with some basic chemicals and a hot plate (you might explode, but that never stopped the meth heads from venturing forth with their adventures in exploratory chemistry.) Hell, if worst comes to worst and profit margins are right you can nab a few chinese chemistry majors who are struggling to pay off their student loans to cook up whatever you need. That's where most of today's MDMA comes from.
Draconian Laws Have no Effect on Criminal Behavior
Also, our government actually did a series of crazy draconian laws about drugs like crack cocaine back in the 80's. Getting caught with it in a distributable amount could get you what amounted to a life sentence. What constituted a distributable amount was really not very clearly defined so basically just about every user busted was claimed to be carrying a distributable amount by the police. People were getting locked up for 30,40,50 years and STILL had not problem buying, selling or using the drug. In fact, some statistics show that crack cocaine use actually increased despite these laws anyways. Your government can be as draconian and dystopian as they want, criminals are still going to get a hold of what they want and use it how they want. Actually, a draconian dytopian type government would probably make drug prices skyrocket and increase their sales since if something becomes expensive it will motivate even more people to get into selling it.
Study existing Surgical Techniques, Mishaps With Back-alley Quacks
There is no such thing as a non-invasive implant, since by definition you are invading your body with a foreign object. The biggest risks in back-alley hack-jobs is infection. If you get too sick and the infection is antibiotic resistant (or your back-alley cyberneticist doesn't have any) you will have to go to a hospital and will get caught. Believe it or not, some desperate and vain middle aged people have attempted to get back alley budget cosmetic surgery done in real life. Infection, poisoning, and permanent disfigurement has resulted. One woman wanted a bigger booty and paid some guy $5,000 to inject several pounds of silicone roofing caulk into her butt. She died thanks to a mixture of massive sepsis and poisoning because, ya know, the 10 pounds of roofing caulk she injected into her body was kinda sorta highly toxic when used in that manner.
Frankly, I have no idea what kind of "implants" you are using in your story,so I really can't get very specific on how they would be implanted. A good place to start researching would be how they input things like artificial heart valves, insulin pumps, cochlear implants, and chemotherapy shunts. I bet that at least the basic surgical, santiation, and aftercare techniques practiced to install current day medical devices would also be used on your future surgically attached junk monitoring devices.