It was an encouraging result for the Desert Foxes, at a ground where they are almost invincible, ahead of facing Belgium, South Korea and Russia in Group H during June's football showpiece event.
The comeback will boost a Les Elephants side recently called "slow and old" by former manager Philippe Troussier.
After first round exits in 2006 and 2010, Côte d'Ivoire got a kinder Cup draw this time, sharing Group C with Colombia, Greece and Japan.
The Black Stars, who face a daunting Group G mission against Germany, Portugal and USA, were undone by a first-minute penalty Dejan Damjanovic converted.
Later, Cameroon confront Cristiano Ronaldo-inspired Portugal in Leiria and Nigeria take on Mexico in American city Atlanta.
Contrasting fortunes for Egypt, South Africa
Non-World Cup qualifiers Egypt, Guinea, South Africa and Tunisia met teams who will be in Brazil, and there were contrasting results.
Egypt defeated debutants Bosnia Herzegovina 2-0 in Austria, Guinea upset Iran 2-1 in Tehran, Tunisia held Colombia 1-1 in Barcelona, but South Africa suffered a 5-0 thrashing by Brazil in Soweto.
It was a great start for Egypt coach Shawky Gharib after many years assisting Hassan Shehata and American Bob Bradley.
Mohamed 'Gedo' Nagy put the Pharaohs ahead on 52 minutes in Innsbruck and Mohamed Salah added a second not long after.
Kevin Constant and Ibrahima Traore were the Guinean first-half scorers in Iran, who pulled one goal back during the second half.
After falling behind to a James Rodrigues penalty, Tunisia recovered under caretaker coach Nizar Khanfir and Mohamed Khazri levelled before the break.
Barcelona star Neymar scored a hat-trick as Brazil ruthlessly exposed South African defensive frailties to triumph 5-0 before a 50,000 Soccer City stadium crowd
Other friendlies featured teams preparing for 2015 Africa Cup of Nations qualifiers and the stand-out performance came from Zimbabwe against Malawi.
The Warriors triumphed 4-1 in Blantyre through goals from Peter Moyo, Pascal Manhanga, Ali Sadiki and Kudakwashe Mahachi.
There was late drama in Windhoek as Hamis Mcha gave Tanzania an 88th-minute lead and Panduleni Nekundi equalised deep in stoppage time.