Jailhouse lawyer
Jailhouse lawyer is a colloquial term in North American English to refer to an inmate in a jail or other prison who, though usually never having practiced law nor having any formal legal training, informally assists other inmates in legal matters relating to their sentence (e.g. appeal of their sentence, pardons, stays of execution, etc.) or to their conditions in prison. Sometimes, he or she also assists other inmates in civil matters of a legal nature.