Reference: Fataawa al-Lajnah ad-Daa.imah lil-Buhooth al-‘Ilmiyyah wal-Iftaa – Fatwa No.2828, Volume 15, Pages 43-44
Question: He has been working for one of the banks for a period of ten years, and he [recently] learnt that working for banks is not permissible. He works nights as a [security] guard, and has no connection with the [trading] activities [of the bank], so can he continue working [there] or [should he] leave?
Response: It is not permissible for a Muslim to be a [security] guard for those banks which deal with ribaa, because this is tantamount to aiding them (banks) upon sin and transgression; and Allaah has prohibited this in His statement:
And most of the activities of the banks deal with ribaa, and [so] it is befitting you seek out a permissible (halaal) way in your search for sustenance – other than this way (job).
And with Allaah lies all success and may Allaah send prayers and salutations upon our Prophet ﷺ and his family and his companions.