Pakistani-based rebel groups have expanded their influence into the heart of the Afghan capital, Kabul, where pictures of their leaders are pasted on walls of mosques and their proclamations are circulated throughout the city, Afghan travelers and Western diplomats report here.

This intensification of the rebel movement, which until a few months ago was confined to Afghanistan's eastern border with Pakistan, appears to be an attempt to tap the well of massive popular opposition to the Soviet forces that invaded the country Dec. 27 and to the Babrak Karmal government they installed in power.

It is unclear how much of the increasingly active rebellion against the Soviets and the Babrak government is due to organized insurgent groups and how much to local tribesmen, who in the past were mainly responsible for attacks on roads and government installations outside the narrow border area alongside Pakistan.

There is no doubt, however, about an increased rebel presence in Kabul during the last month.

Pictures of Gulbuddin Hekmatyar, leader of the fundamentalist Moslem rebel band, Hezbi Islami, and of Burhanuddin Rabbani, head of another rebel group, Jamiat-e-Islami, were reportedly seen throughout Kabul by both diplomats and Afghans who have come here in recent weeks.

Hezbi Islami is believed to have its own radio station, and two weeks ago fighters from the group were reported to have placed the green flag of Islam on all the hills surrounding the Paghman Valley, just west of Kabul, the sources said.

It is clear that the pace of anti-Soviet and anti-Babrak activities has intensified in recent weeks. The official Radio Afghanistan acknowledged last week that 14 persons were killed in rebel activity over a three-day period in different areas of the country.

In an unusually frank admission of its inability to control the countryside, the state radio reported a list of "sabotage and destructive activities," including the burning of five schools and a hospital and the kidnaping of a father and son.

"The gangsters and murderers," the radio said of the rebels, "have destroyed hospitals, schools, bridges, warehouses and public buildings. They have disrupted roads and communications links. They have captured trucks, and their transport means carrying food supplies to various provinces."

One usually reliable Afghan source here reported that rebels attacked a group of crack Afghan troops in the country's second largest city, Kandahar, late last month and took 70 of them hostage. The specially trained troops -- one of the few units trusted as loyal to the Babrak government -- had been sent to restore order to Kandahar, where local authorities were reported to be on the rebels' side.

The road west from Kandahar in southeastern Afghanistan to Herat on the Iranian border was reported by a Western European embassy in Kabul as being "hopelessly insecure."

As an example of the anarchy on the country's highways, the embassy said a convoy including two truckloads of personal belongings of Iranian diplomats was stopped twice by rebels, who allowed them through, and once by Soviet troops, "who looted the trucks of everything they could carry."

The key trading highway running east from Kabul through the Khyber Pass to the Pakistani border city of Peshawar has been virtually closed since June 22 following a heavy rebel attack on a convoy near Kabul, a Western European diplomat reported from the Afghan capital.

Another Western diplomat in Kabul said the only road under full government control is the highway running north from Kabul through the Salang Pass to the Soviet Union.

Analysts here note that Soviet attempts to pacify Afghanistan are being hampered by a blood feud between rival branches of the ruling People's Democratic Party of Afghanistan: the Khalq (Masses) wing and the Parcham (Banner) faction.

"There are assassinations almost every night of low-level party people," said one Western diplomat stationed in Kabul.

An Afghan who fled Kabul into exile here last month said the Khalqi head of a government cooperative unit was shot in broad daylight 10 miles from Kabul as he was stepping out of his jeep. The Parchamite head of a neighborhood committee in Kabul, Abdul Aziz, was shot and killed when he answered the door of his house.

There are, meanwhile, reports here that the Soviets have moved new, more experienced and highly mobile troops into Afghanistan during the past month.

According to Afghan sources here, they appear to have better uniforms and equipment, seem in tougher physical condition and have more pride than the Soviet soldiers who have been in Afghanistan up to now.

"They won't talk to Afghans, let alone sell equipment the way the Russians did," said one Afghan who saw the troops in Kabul recently.

According to both diplomatic and Afghan reports, the Soviets seem to be having problems with an exceptionally large number of dud bombs.

One diplomat reported that 37 of more than 50 bombs dropped in one raid failed to explode.

The afghans are reported to be still having trouble in building up their Army, which has dwindled because of desertions from its officially claimed strength of 80,000 to between 30,000 and 40,000.

According to diplomats and Afghans, government forces are knocking on doors in the middle of the night searching for able-bodied young men to be pressed into military service. All draft exemptions have been canceled and the draft age was lowered to 15 from previous minimum draft age of 22.