When it comes to Miranda rights, any statements you make while "in custody" may be suppressed from evidence, if you were not informed of your Miranda rights.  Accordingly, the proper procedure is to file a "motion to suppress" any "in custody" statements you may have made without first having been advised of your miranda rights.  If you went ahead and entered a guilty plea in court and were subsequently sentenced, then the proper procedure would be to retain the services of an attorney to file a "motion to withdraw guilty plea".  This would be the proper procedure if you feel that you did not knowingly and willingly enter your guilty plea.  If an attorney can have your guilty plea set aside, then the attorney may be able to file a motion to suppress to have the evidence thrown out.