In ancient times, the right of victors in war to the possessions of the vanquished was accepted almost universally, and the Torah for the most part permits plunder as well, although certain regulations apply. By contrast, current international law strictly forbids the seizure of anything but weapons and military equipment. Not only has halakhah moved in the same direction but, as Shlomo Brody explains, contemporary rabbis have been able to look to the Bible for support:
On a pragmatic level, concern with spoils can lead to military mistakes, as was painfully discovered by the Moabites who prematurely ceased fighting to focus on gathering booty, only to be surprised and defeated by the Israelites (2Kings 3:23). The kingdoms of Gog (Ezekiel 38:10-13) and Egypt (Exodus 15:9) are accused of unjustly going to war for the sake of booty, only to fall for their lust of money. . . .
Most [importantly], the first Jewish warrior, Abraham, refused to take “even a shoe strap” for himself when he defeated the four kingdoms [that had invaded Canaan and captured his nephew Lot], because he wanted his material success to be attributed to God [alone] (Genesis 14:22-23). Similarly, when the Jewish people defeats its enemies in the book of Esther, it was prohibited from taking booty, so as to highlight the purity of its intentions: defense and deterrence, not wealth or vengeance. Indeed, based on this sentiment, [the great late-19th-century sage] Naftali Tzvi Yehudah Berlin asserted that the need to protect ourselves from corrupt motivations should lead us to shun all booty, even if the Torah may permit it.
[As for the contemporary IDF], Rabbis Haim Hirschensohn and Shaul Yisraeli have argued that halakhah demands that Israel respect the military conventions that it has officially affirmed. Accordingly, even if one believes that the Bible mandates seizing booty, Jewish law still requires one to refrain from such action under Israel’s international commitments. Violating such agreements would be a grave desecration of God’s name.