Mines are an attractive option for many small powers for the following reasons. Maritime powers are highly vulnerable both in peace and war due to their dependence on the sea. Mining operations are far cheaper than counter mining operations, and they are far cheaper than other types of naval weaponry which inflict similar types of damage. Many small naval powers will attempt to use mines in order to deny their coastal areas to forces arrayed against them. Others will use mines offensively to deny port facilities or egress points to hostile fleets. Given the ease of deployment (mines can be deployed from submarines or from civilian vessels) and the growing sophistication of them, mines will remain effective weapons.
Iran's navy has 20,000 men (article is from '04 - G), but they are young and inexperienced, and most of them are riflemen and marines based on Persian Gulf islands. And at higher levels, there is fierce rivalry between the IRGC and regular navies for scarce resources. Due to these shortcomings, Iran's three Kilo-class submarines would be vulnerable, and they are limited to laying mines in undefended waters. Mines, however, are one area in which Iran has made advances. It can produce non-magnetic, free-floating, and remote-controlled mines. It may have taken delivery of pressure, acoustic, and magnetic mines from Russia. Also, Iran is negotiating with China for rocket-propelled rising mines.
Gee, that doesn't look like a 'little white box' to me...
The EM-52 rising mines are part of a 3,000-weapon stockpile of (Iranian) anti-ship mines. This purchase is significant because, unlike most other mines, the EM-52 is operational in deep water such as the Persian Gulf. When the hull of a ship passes over the device the mine is triggered and a rocket is fired at the hull. Placed in choke points such as the Strait of Hormuz, this device could be devastating.
We've come long way from this, baby:
Photo taken in Fixer's bathtub
There's more if you're interested. Also how to counter sea mines with
Mine sweeping attack subs?