Working with Projects

Projects are containers that you can use to segment and organize data that a database stores. Use projects to create a logical separation for each segment that you want to test. For example, you may want to create a project for each subnet, or department, within an organization to limit the hosts to a specific network. Departments like HR, IT, and Accounting may each need a separate project. Metasploit stores data in the current project. To create or work within projects, you must be connected to a database instance.

Creating a Project

Use the pro_project command and the -a option to create a project. The project that you create becomes the current project.

1
msf-pro > pro_project -a HR
2
msf-pro > pro_project -a IT
3
msf-pro > pro_project -a ACC
4
5
default
6
HR
7
IT
8
*ACC

Viewing the Current Project

Use the pro_project command to view the current project. An asterisk denotes the current project.

1
msf-pro > pro_project
2
3
*default
4
HR
5
IT
6
ACC

Changing the Project

Use the pro_project command to change the current project. You can tab complete the project name. Project names are case sensitive.

If you need to specify a project that contains spaces, you must enclose the project name in quotes. For example, use pro_project “IT Dept”.

1
msf-pro > pro_project
2
3
*default
4
HR
5
IT
6
ACC
7
msf-pro > pro_project HR
8
<*] Workspace: HR

Deleting a Project

Use the pro_project command and the -d option to delete a project. This deletes the project, which includes the hosts, credentials, evidence, and any other data related to the project.

1
msf-pro > pro_project
2
3
*default
4
HR
5
IT
6
ACC
7
msf-pro > pro_project -d ACC
8
<*] Workspace: ACC