Mr Ban said Afghanistan was the most dangerous place for UN staff
The UN Security Council has backed a call by UN Secretary General Ban Ki-moon for more protection for UN staff and facilities in Afghanistan.
The move followed Wednesday's attack by militants on a guesthouse in Kabul, in which five UN employees were killed.
Mr Ban said the mission in Afghanistan would continue, but that UN staff were widely regarded as being a soft target.
The Taliban has vowed to disrupt next week's presidential election run-off, which is being overseen by the UN.
But the Security Council said the violence should not be allowed to derail the vote.
'More effective protection'
Mr Ban said he would make an appeal for security officers on Friday to the 192-member General Assembly, which controls the budget.
Speaking to reporters after briefing the Security Council in New York, Mr Ban said he had appealed for more security personnel in Afghanistan to meet the "dramatically escalated threat to UN staff now widely considered to be a soft target".
"Increasingly, the UN is being targeted, in this case precisely because of our support for the Afghan elections," he added.
Mr Ban said Afghanistan and neighbouring Pakistan had become the most dangerous places on the planet for UN staff.
Among the short-term measures that would be implemented in Afghanistan was the consolidation of UN workers spread across the country, he added.
The secretary general also said there would also be a special focus on areas outside Kabul, where security was "clearly insufficient".
The UN is also believed to be considering bringing in security personnel from other UN missions, and hiring more guards locally.
KABUL YEAR OF VIOLENCE
28 Oct: Five UN staff and three Afghans killed in attack on UN guesthouse
8 Oct: Suicide bomber attacks Indian embassy, killing at least 17
17 Sept: Six Italian soldiers and 10 Afghans die in bomb attack on military convoy
18 Aug: Suicide car bomber kills 10 in attack on convoy of Western troops
11 Feb: Assault on three government buildings kills 27, including eight attackers
Mr Ban said that although the primary responsibility for the safety and security of UN staff lay with the Afghan government, it was not their responsibility alone.
"We need the support of the member states. We must realistically assess the situation and put in place more effective protections for our staff as they perform their crucial task," he added.
There are 6,700 people working for the UN mission, funds and programmes in Afghanistan, including 1,100 international staff and 5,600 local staff.
A unanimous statement issued by the Security Council later on Thursday approved the measures taken by the secretary general and stressed the need to ensure security for UN personnel "and its support to this end".
The vulnerability of the UN mission was evident on Wednesday, when three Taliban militants dressed as policemen and wearing explosive vests attacked the Bekhtar guesthouse in Kabul's Shar-i-Naw district, killing five UN staff, two Afghan security guards and a civilian.
Mr Ban said the death toll might have been higher had it not been for the "heroism" of the security guards attached to the UN mission.
"They were armed only with pistols against assailants carrying automatic weapons and grenades and wearing suicide vests," he said.
A Taliban spokesman said it was the "first attack" in the run-up to the second round of the presidential election on 7 November, in which President Hamid Karzai will face Abdullah Abdullah.
The Security Council statement condemned the attack "in the strongest terms" and commended the "determination of the United Nations not to be deterred by the tragic incident and to carry on its mission in Afghanistan".
The elections "should be carried out as scheduled with the continuous support of the United Nations", it added.