Egyptians are poring over the inner workings of the notorious state security apparatus and the regime it protected through thousands of secret documents looted from its headquarters. But the army has warned that the papers must be returned on pain of prosecution.

In scenes reminiscent of East Germany after the collapse of communism, protestors rushed into the fortress-like offices of State Security Investigations (SSI), or Amn al-Dawla, in Cairo and elsewhere at the weekend to seize papers and files accumulated over decades of repression and surveillance.

Documents published in the Egyptian media and posted on the internet record the monitoring of trade unions, civil society organisations and even a layout of the SSI itself. The Muslim Brotherhood is singled out for especially close attention.

Facebook now has a page dedicated to the documents, some of which have been collated by the opposition Wafd party and sent to Egypt's prosecutor general to investigate human rights abuses.

Other papers record the movements of former president Hosni Mubarak and his wife Suzanne in the final few days before he stepped down on 11 February.

Another document describes a meeting between government officials and Egypt's mobile phone operators. On 28 January, as protesters took to the streets at the start of the uprising that would bring down Mubarak, the operators turned off internet, mobile phone and text messages and put the country in a media blackout. The army has called on people to hand over documents taken from the SSI HQ and other premises and banned the media from publishing details about them under threat of legal action. "Some of the documents contain names and cases which could threaten the security of the country and people," it warned.

Another document details a plan to conceal secret files to prevent them from falling into the hands of demonstrators. The issue presents a dilemma for the ruling Egyptian military council, as the SSI and other security agencies are accused of some of the worst human rights abuses in suppressing dissent against Mubarak's nearly 30-year rule. It is not yet clear whether the council is considering restructuring the security agency, or redefining its mission as it charts Egypt's path toward a freer political system and an eventual return to civilian rule.

The documents reveal a body with a Stasi-like obsession of minutiae and a predilection for bureaucratic note-taking characteristic of all Egyptian public institutions. The result is a damning tale of torture, corruption and interference.

In the SSI building in Nasr City, east of Cairo, protesters found a trail of shredded paper leading to piles of rubbish bags containing what protestors allege is incriminating evidence destroyed by officers. Shouts and loud bangs echoed round the building's marbled walls as protesters rifled through files and searched for detainees they allege are being held in underground cells. When they were eventually discovered, the cells were empty, and the fate of the detainees they held remains unknown.

The building is a mixture of corporate dull and lavish splendour, far removed from the grim disrepair of most underfunded government buildings. In one room a cartoon character tells its visitors not to smoke. Next to it is a picture of an unidentified policeman in uniform. In another there is a picture of Mecca and a prayer mat underneath a keyboard. One storeroom contains car number plates, another the business cards of SSI head Hassan Abdel-Rahman. The James Bond-like "crisis management room" contains a round table next to a bank of computers. A door leading off opens unexpectedly on to a room full of Louis XV gilded rococo furniture. On an upper floor, protesters discovered the suite of former interior minister Habib el-Adly, now in prison facing charges of corruption and ordering police to open fire on protesters.

A YouTube video gives a tour of the suite. An unmade bed is flanked by a wardrobe contains two his and hers towelling bathrobes, one white, one pink. Next to it is a chest of drawers with two plates and cutlery inside. A treadmill and exercise bike are next to that, while in an annexe off the bedroom is a huge meeting room featuring a statue of a bucking golden stallion.

In the SSI HQ's courtyard, a man demonstrated to the crowd how he had been tortured on a device found inside the building, by being suspended in stress positions for hours on end and given electric shocks. Elsewhere, protesters found belly-dancing outfits. On the building's upper floor they produced a suited man who they accused of being a SSI officer.He was quickly surrounded by a crowd and had to be rescued by soldiers.