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.
1msf-pro > pro_project -a HR2msf-pro > pro_project -a IT3msf-pro > pro_project -a ACC45default6HR7IT8*ACC
Viewing the Current Project
Use the pro_project
command to view the current project. An asterisk denotes the current project.
1msf-pro > pro_project23*default4HR5IT6ACC
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”
.
1msf-pro > pro_project23*default4HR5IT6ACC7msf-pro > pro_project HR8<*] 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.
1msf-pro > pro_project23*default4HR5IT6ACC7msf-pro > pro_project -d ACC8<*] Workspace: ACC