There is NO such thing as ILLEGAL shares, this thing just DOES NOT EXIST, the only thing that can be illegal about shares is the way they are being sold (Not Bought) ... like on those 2 example;
-Having the Restriction or Legend from shares (or Certificate) removed by Tricking the TA in some fraudulent or obscure ways, so they can be Cleared and ILLEGALLY Sold (because they weren't supposed to get cleared at that time).
-Or by NSS, witch is basically a sell of shares that the seller DOES NOT HAVE. But this is Legal or Tolerate in the Pink Sheets World if done by Market Makers.... but they have a period of time to buy them back and compensate the account.(but here again in the Pink Sheets they can play with that period of time by making it all around again)
So the share were NEVER Illegal, But the Selling of those shares WAS!