ResIoT: An IoT social framework resilient to malicious activities