During war, the use of weapons is greatly increased, for obvious reasons. Consequently, the stock of weapons companies can rise greatly. For example, with this recent missile strike, the stock of Raytheon, the defense contractor company who produced the tomahawk missile the US military used, rose. On the other hand, the stock of many oil companies including Chevron and Marathon oil have gone down. And, oil prices are rising by a projected 3% weekly gain.(http://www.reuters.com/article/us-global-oil-idUSKBN17905I) This is due to the fact that Syria is an oil country.
Depending on where the war is waged, almost any stock can rise or fall. However, it is almost certain that weapon company stocks will increase. However, the size of the war could cause the market to close, as they did in Europe during World War 1 (http://www.businessinsider.com/world-war-i-impact-on-markets-2014-8).
One study concluded that stock market volatility, the degree of variation of a trading price series over time, decreased during war time (https://blogs.cfainstitute.org/investor/2013/09/25/u-s-capital-market-returns-during-periods-of-war/)
On the topic of profiting off companies that produce the tools of war, I think it is unethical. Investing in companies that produce weapons would allow them to grow and reach larger markets. This in turn allows them to get bigger deals and bigger contracts to produce more weapons. Basically, it allows the weapons market to grow, which allows easier access to said weapons or something. However, some argue that investing in weapons is not as unethical as other things (http://www.chaostan.com/weaponstocks.html).