---
title: Compiling our malware
section: "Finishing our malware"
course: code_malware
layout: lesson
---

Now, we are ready to compile - _again_ - our malware so we can send it to our
victim. We already know the commands needed to do so. First, let's compile the
server:

```bash
gcc Server.c -o Server
```

**Note:** If some of these compiling commands returns you an error, go and post
it with your code in "_Ask the Tutor_" section.

And compile the backdoor:

```bash
i686-w64-mingw32-gcc -o malware.exe Backdoor.c -lwsock32 -lwininet
```

**Note:** Sometimes a compilation made with _MinGW_ could be incomplete, so make
sure you check it and if there is any problem, compile the Backdoor.c file
again.

Make sure the IP addresses and ports in both files are right, and check the
commands we added throughout the code:

```bash
q
cd
persist
```
