# Challenges of Malware Detection in the IoT and a Review of Artificial Immune System Approaches
## 3 Artificial Immune Systems
### Introduction to the Immune System  
The first line of defense in the body is the innate immune system, which is composed of outside layers to protect the body, such as the skin, and inside defense layers, such as the acid in the stomach. Furthermore, blood cells, such as Neutrophils, kill any encountered malicious agent (antigen) then die, and macrophages can kill up to 100 germs before they die. Macrophages can also kill infected body cells such as cancerous cells. If the innate system fails to eliminate the threat (antigen), the adaptive immune system is initiated, which has two Lymphocytes cell types. First, B-cells are engaged when an antigen enters the body and before the disease occurs. They provide antibodies to stick to the antigen and \"mark it\" as a sign for the macrophages to kill it. Also, memory B-cells keep information about the attack for future reference. Second are T-cells, which come when the infection occurs. T-cells are divided into helper T-cells and Cytotoxic T-cells. Helper T-cells are divided into two types: effector T-cells, which provide an alert and information about the antigen, and memory T-cells, which keep information about the antigen for future reference. The role of Cytotoxic T-cells is to kill the infected body cells that cannot be treated.  
In the following paragraphs, we explain the collaborative methods followed by B-cells and T-cells in fighting antigens. Understanding these phenomena will help us to devise an AIS for fighting malware.  
The main part of our adaptive immune system is B-cells, which generate the antibodies. In the human body, there are 100 million types of B-cells, and the reason for this is that each kind of B cell generates different antibodies to catch any possible attack because different antibodies handle different antigens. Consequently, when a certain type of antigen enters the body that requires a certain type of B-cells to handle it, the body starts generating more of that specific type of B-cells.  
Regarding the generation of antibodies, they are made of thin and thick chains that consist of different kinds of deoxyribonucleic acid (DNA). To generate different types of antibodies that can mark any type of antigens, a mix and match of different DNA strains is created by the body. Consequently, after the mix and match, each B cell will end with its own kind of antibodies.  
Clonal Selection consists of four steps. First, B-cells generate a test patch of their antibodies that go to the surface as \"bait\" and are called B-cell receptors. B-cells float in their zone, trying to find a matching antigen (which their specific antibodies can catch). Second, when a B-cell bonds with a cognate antigen, it doubles its size and divides into two B-cells, and these two B-cells will double in size and divide, making four B-cells in total. This process is called proliferation, and it takes up to 12 h for each B cell to grow and divide; the proliferation process takes about a week, at the end of which the body will have enough of that specific type of B-cells to mount a real defense against the same kind of antigen. Then, B-cells send all generated antibodies to the bloodstream, and after all the hard work, most B-cells die. The main job of antibodies is simply to mark the antigen, not to kill it. Finally, the antigen is marked with antibodies, so it is the phagocyte's role (such as macrophages) to eat it and kill it. The antibody forms a bridge between antigens and macrophages.