A Co-simulation Environment for Security of Smart Buildings