Managing Workspaces

Workspaces enable you to segment and manage the hosts and data stored in the database. You can use workspaces to create a logical separation for each segment that you want to test. For example, you may want to create a workspace for each subnet within an organization to limit the hosts to a specific network. Departments like HR, IT, and Accounting would each have its own workspace.

The workspace enables you to import, manipulate, and then export data so that you can reuse the data. The Framework also uses the same workspace to automatically report what it knows about the host it’s currently engaging: from vulnerability information, random notes, to stolen information, etc.

Creating a Workspace

To create a workspace, use the workspace command and the -a option to create a workspace. The workspace that you create becomes the current workspace.

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

Viewing the Current Workspace

To view the current workspace, use the workspace command to list all workspaces. An asterisk denotes the current workspace.

1
msf > workspace
2
3
*default
4
HR
5
IT
6
ACC

Changing Workspaces

To change the current workspace, use the workspace command. You can type the workspace name or tab to complete the workspace name.

1
msf > workspace HR
2
[*] Workspace: HR

Deleting a Workspace

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

1
msf > workspace -d ACC
2
[*] Workspace: ACC