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.

msf-pro > pro_project -a HR

msf-pro > pro_project -a IT

msf-pro > pro_project -a ACC

 

default

HR

IT

*ACC

Viewing the Current Project

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

msf-pro > pro_project

 

*default

HR

IT

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”.

msf-pro > pro_project

 

*default

HR

IT

ACC

msf-pro > pro_project HR

<*] 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.

msf-pro > pro_project

 

*default

HR

IT

ACC

msf-pro > pro_project -d ACC

<*] Workspace: ACC