Lab 11
Lab 11
Metasploit can generate a lot of malicious code, but it's well-known to antivirus companies and easily
recognized in its original form.
This is obviously a very insecure thing, and any sensible antivirus will stop it.
ls -l shell.exe
In Kali Linux, open Firefox by clicking the blue icon at the top left of the window.
Go to
http://virustotal.com
Your file should be detected as malicious by many of the antivirus engines. When I did it, 58/71 engines
detected it, as shown below.
msfvenom -p windows/shell_bind_tcp -f c
To compile the code into a Windows executable, it needs to be in a file. That's easy to do.
ls –l shell.py
This code is written in C, not in Python, so some additional lines are needed.
In Kali Linux, in a Terminal, execute this command:
nano shell.py
That imports the library code needed to run a C program from Python.
Add this text to the start of the first line of hexadecimal codes:
shellcode = (
Add a closing parenthesis before the semicolon at the end of the last line, like this:
Add these lines to the end of the file:
This is an annoyance that only happens on Server versions of windows. It's intended to deter people
from surfing the Internet on a server.
In the lower right of Server Manager, in the "Security Information" section, click the "Configure IE ESC"
link, as shown below.
Installing PyWin32
http://sourceforge.net/projects/pywin32/files/
On the left side, under the "Name" heading, click pywin32, as shown below.
On the next page, click "Build 218".