What is the ruling on working in security institutions whose programs may be used for both positive and negative purposes, and what is the ruling on the money earned from this work, given that the nature of the work is technical and does not involve direct involvement in security aspects or harming anyone?
If you are certain or highly anticipate that the programs are used to oppress the innocent and harm the righteous, then it is not permissible to download or back them up, as this constitutes cooperation in sin and aggression. However, if it is merely a doubt, the action is not forbidden, but abstaining from it out of piety (wara') is better. Piety is the act of abstaining from something that is not harmful for fear of falling into something that is. If you earned money from this work without being certain of its prohibition, there is no harm in benefiting from it. And whoever gives up something for the sake of Allah, Allah will compensate him with something better, and a servant's sustenance is guaranteed, so there is no need to seek sustenance through disobeying Allah.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/138854