The NIV renders this verse:
If anyone does attack you, it will not be my doing;
whoever attacks you will surrender to you.
Although there may be some wickedness in those last days, it will not affect the righteous.
“Righteousness Shalt Thou Be Established”
The final days are the days of the Triumphant Messiah. He will be the one who establishes the government of God, and defeats the wicked nations. The reference to not fearing and being far from terror is a reference to the theme of reversal. Israel has been oppressed by other nations, but at the end of times, they will be so strong that they will have no fear.