Russia wants control of and access to the Middle Eastern oil. Islam dominates to the ME, so they befriend Muslim terrorist groups/nations that seek to overthrow the existing regimes or turn their own into pro-Russian proxies (Iran, Libya, Syria, Saddam’s Iraq...). It’s all about energy.
Russia has enough oil and other resources that it doesn’t want control of the ME for its own energy needs. The soviets/communists (who are still in charge there) want energy to control other nations.