The Internet offers humanity many distinctive and indispensable services, whether for individuals or for institutions and companies. This great role has attracted the Internet attackers to develop their mechanisms to capture and obtain the data by illegal methods. This growth in the number of cyber‐attacks made scientists in a real challenge, to find advanced methods to face this danger. Due to the shortcomings of traditional data security means such as firewalls, encryption, and so forth, the motivation became to develop alternative systems to detect smart attacks. Intrusion detection systems (IDSs) have made remarkable progress in cyber‐security. They monitor the traffic in real time and continuously to detect the network attacks, giving alerts to the network administrator. In this article, two IDSs are introduced based on principles of transfer learning (TL) with convolutional neural networks. Our systems are built using the visual geometry group (VGG19) and residual network with 152 layers (ResNet152). UNSW‐NB15 intrusion detection dataset is used to evaluate the models. The proposals achieve high levels of precision, recall, and F1_score as 99%, 99%, and 99%, respectively. These achievements prove the efficiency of the proposed models in capturing cyber‐attacks with low alert rates.