As we know, one of the finest techniques to evade antivirus software is to write custom exploits. If the exploit is written from scratch, there is very little chance for the antivirus engine to match the code signature against the known malicious signatures. In this section, we will write a custom shell that returns a reverse shell from the victim's machine and see how many AV engines can detect it.
Let's write a custom exploit, name it my_car.py, and place the following code in it:
If we observe the preceding code, we can see that it is an adaption of a Python code to spawn a reverse shell to an attacker's IP address. We are importing the Python modules and assigning an alias to the imported modules locally. The AV engines mostly work on the signature approach, and the known signatures, such as subprocess.call["...