Body cavity search

A body cavity search, also known simply as a cavity search, is either a visual search or a manual internal inspection of body cavities for prohibited materials (contraband), such as illegal drugs, money, jewelry, or weapons. Body cavities used for concealment include nostrils, ears, mouth, navel, penis (urethra and foreskin) or vagina, and rectum. It is far more invasive than the standard strip search that is typically performed on individuals taken into custody, either upon police arrest or incarceration at a jail, prison, or psychiatric hospital. Often the procedure is repeated when the person leaves the institution.
Body cavity searches may also be conducted at some international border crossings such as the U.S. Customs and Border Protection when they suspect international travelers of hiding contraband—such as drugs—in their alimentary canal (digestional tract).
Procedure.
Many articles of contraband are concealable in the body's cavities, via means such as insertion into the rectum. Illegal drugs are often found in condoms and temporarily stowed in the colon, and cylinders such as cigar tubes are used to hide money, intravenous syringes, and knives. Duplicate handcuff keys could be concealed in many body orifices, such as in the nasal passages or underneath the tongue.
In a thorough "visual body cavity" search, a flashlight is used to illuminate common bodily areas, including the nostrils, ears, mouth, navel, penis (urethra and foreskin) or vulva, and buttocks. Generally, the detainee is required to cooperate with manipulating these body parts as they are examined.
Squatting is sometimes instructed during the visual search, and prolonged holding of a squat can be demanded; squats are sometimes demanded while standing over a mirror (so that the observer has an improved view). The person may be asked to “squat and cough,” with the aim of dislodging an object stored in the rectum or vagina.
During "manual body cavity" searches, an inmate is temporarily transferred to an offsite clinic to be examined by a licensed physician of the same sex; body orifices are probed using fingers or instruments. The circumstances in which these inspections may be done are often restricted, such as on individuals refusing to offer to consent to a visual body cavity search for reasons other than anxiety or in situations where there is a strong evidence to suspect the presence of contraband, and require a court order. 
As cavity searches have proven as an ineffective strategy in the total prevention of smuggling objects as it cannot detect objects in the intestines or stomach, as well as taking into consideration the intrusive nature and inherently humiliating or degrading procedure, it has become fairly normal for authorities to instead isolate individuals in a monitored environment until they pass excreta and/or x-ray the individual's pelvic area as it is less invasive and psychologically damaging.
Legal standing.
Some inmates and human rights activists argue that body cavity searches are done not so much to stop the flow of contraband but rather to harass and humiliate detainees. A visual inspection of the rectum will not reveal objects concealed deeply inside. Likewise, it is possible to circumvent detection during manual body cavity searches. In some instances, suspects swallow packages of drugs protected by condoms and allow them to pass through their digestive tract. Only diagnostic imaging will reveal the concealed contraband, invalidating the body cavity search.
Because these searches are highly invasive and greatly compromise an individual’s right of privacy, the legality of visual and manual body cavity searches is frequently contested.
United States.
In the United States, "Bell v. Wolfish" is the benchmark case on this issue. In its judgment of the case, the U.S. Supreme Court established a standard of reasonable grounds for performing cavity searches. Among these are security concerns at prisons. Such searches are generally governed by the Fourth Amendment to the United States Constitution, which prohibits searches without probable cause.
UK.
In the UK, cavity searches are not carried out upon entry to prisons, although new prisoners are required to perform squats as part of their strip-search. Though said prisoners may be visually searched, prison staff do not have the power to carry out cavity searches.
Pakistan.
Law enforcement officers are not allowed to conduct cavity searches or strip searches in Pakistan. Any officer who conducts a cavity search or strip search can be sentenced up to 4 years in prison and given a Rs.7500 fine.
In popular culture.
The body cavity search is frequently used as a joke in comedies such as the movies "Beavis and Butt-head Do America" and "Wayne’s World", and the American sitcom television series "Seinfeld", due to its humiliating, uncomfortable, and invasive nature. Generally, it adds to the suffering of a comedic foil. It is generally not depicted explicitly, but implied by the donning of a lubricated glove by a searcher. It is similar to the use of the rectal examination in this regard.