Neither Ukrainian military transport Il-76 nor MH17 have Russian military IFF transponder. They both look as a foe for Buk-M1 (or Buk-M1-2) TELAR. Without IFF, the TELAR can distinguish only between three classes of targets: airplane (fast target with rotating parts - in engines), cruise missile (fast target without rotating parts) or helicopter (slow target).
Two versions who decided and why that a plane was a valid target:
1. The Russian troops with the rebels (trained on Russian military base near Ukrainian border) had intel about Ukrainian military transport Il-76 scheduled for that day (indeed scheduled, but canceled) to drop (from altitude to avoid MANPADS, with varying success) ammunition and food for Ukrainian troops surrounded then near Russian border. A spotter in a quiet rural area heard a plane invisible over clouds. This seems incredibly unprofessional, but nothing unheard of for Soviet/Russian army.
2.
http://www.sbu.gov.ua/sbu/control/en...0&cat_id=35317
In both versions the Russian TELAR crew assumed Il-76.
On July 21 Russian Ministry of Defense gave a
briefing (presented by Chief of Staff of the Main Operations Directorate). On it a
picture was shown with alleged MH17 path - with a diversion from Donetsk towards North-East. This contrived path proves that Russian military didn't know about FlightRadar24.