By Danilo Masoni

MILAN (Reuters) - European shares steadied on Monday, helped by a bounce in oil prices and fresh dealmaking activity, while a global hacking attack boosted shares of software security firms.

Gains however were capped by some heavyweight stocks going ex-dividend as well as weakness among healthcare stocks.

The pan-European STOXX 600 index was down 0.1 percent by 0937 GMT. Germany's DAX fell 0.2 percent and UK's FTSE added 0.1 percent with both paring gains that lifted them to fresh record highs earlier in the session.

Oil prices jumped more than 2 percent after top exporter Saudi Arabia and Russia said supply cuts needed to last into 2018, a step towards keeping an OPEC-led deal to support prices in place longer than originally agreed.

That helped commodity-related stocks with the basic resources and oil indexes, both up 1.2 percent.

Gains among oil stocks, however, were offset by a fall in healthcare shares, which were dragged by a 1 percent decline in Novartis. The Sunday Times reported GlaxoSmithKline was preparing investors for an expansion of its consumer healthcare business through an 8 billion pound deal with the Swiss rival.

Some investors said after three straight week of gains for European equities the mood was dampened by Friday's unprecedented "ransomware" attack that hit 200,000 victims in at least 150 countries.

"The risk sentiment is dull due to cyber uncertainties," said London Capital Group analyst Ipek Ozkardeskaya.

SECURITY SHARES BOOSTED

The attack, however, boosted shares in software security firms. A cybersecurity exchange-traded fund ISE rose at the open, while London-listed shares in cloud network security firm Sophos jumped nearly 8 percent to a record high.

In Helsinki, digital security firm F-Secure rose as much as 5.1 pct to a 16-year high, while information security consulting Nixu gained 3.7 percent.

"Security is a growing business already and these kinds of news will accelerate the need for improvement of cybersecurity among companies," said Kim Gorschelnik, head of research at Finnish asset manager FIM.

Italian motorway company Atlantia was among the top gainers in Europe, up 3 percent, after it launched a 16 billion euro bid for Spanish rival Abertis, whose share were little changed.

Banca Akros analyst Francesco Sala lifted its recommendation on Atlantia to accumulate from neutral, saying he expected the offer could lift the group's earnings per share by 30 percent.

Shares in RWE rose 2.3 percent after the German utility posted core profit slightly above expectations, pointing to cost cuts and improved utilisation at its power plants division.

A poor earning updates however hit shares in TUI, down 4.5 percent. Europe's largest tour operator said summer trading was in line with expectations with demand for Spain, Greece and the Caribbean helping to offset subdued bookings for Turkey and North Africa.

Earnings in Europe have been surprisingly strong so far. According to Thomson Reuters I/B/E/S data more than 70 percent of MSCI companies have reported results so far with 66 percent beating expectations and 8 percent meeting them, pointing to a first-quarter earnings growth of 20.2 percent.

(Reporting by Danilo Masoni; Editing by Tom Heneghan)