-
Notifications
You must be signed in to change notification settings - Fork 63
API
ACE management and tasking occurs through the web application's RESTful API. This page describes the different components of the API, and shows examples of interacting with the API through the ACE PowerShell module.
The Computer Controller allows enumeration of Computer objects that have been populated via Discovery. Computer objects represent systems that may be targeted by ACE Sweeps. Computers must be "discovered" and thus cannot be added directly.
List computers that have been enumerated by an ACE discovery.
Example: Get-AceComputer
Return a specific computer, specified by unique identifier, that has been enumerated by an ACE discovery.
Example: Get-AceComputer
The Credential Controller is used to manage endpoint credentials. Credential objects are usernames and passwords to be used by ACE for authenticating with systems that are targeted by a sweep. Passwords are encrypted at rest and only decrypted in memory when used to authenticate.
Delete a credential.
Example: Remove-AceCredential
List credentials.
Example: Get-AceCredential
Add a credential to the ACE database. Added credentials must be passed in the following format:
public class CredentialViewModel
{
[Required]
public string UserName { get; set; }
[Required]
public string Password { get; set; }
}
Example: New-AceCredential
Update a credential in the ACE database. The specific credential to update must be specified by it's unique identifier. The credential object must be passed in the following format:
public class CredentialViewModel
{
[Required]
public string UserName { get; set; }
[Required]
public string Password { get; set; }
}
Example: Update-AceCredential
The Discover Controller is intended to enumerate endpoints to scan. Enumeration can be based on Active Directory or an array of systems (IP Addresses or Fully Qualified Host Names).
public class DiscoveryActiveDirectoryViewModel
{
[Required]
public string Domain { get; set; }
[Required]
public Guid CredentialId { get; set; }
}
public class DiscoveryComputerListViewModel
{
[Required]
public string[] ComputerName { get; set; }
[Required]
public Guid CredentialId { get; set; }
}
The Result Controller receives and forwards scan results to the Enrichment Pipeline. The Result Controller is the only Controller that does not require API Key authentication.
Scan results will be posted to the Result Controller with their unique Sweep Identifier.
The required format of posted results is below:
public class SweepResultViewModel
{
[Required]
public string ComputerName { get; set; }
[Required]
public string ScanType { get; set; }
[Required]
public string RoutingKey { get; set; }
[Required]
public string ResultDate { get; set; }
[Required]
public string ScanId { get; set; }
[Required]
public string[] Data { get; set; }
}
The Script Controller is used to manage scripts that are intended to collect data from endpoints.
Delete a script.
List scripts.
Add a script so it can be executed against target computers.
New scripts must follow the format below:
public class FileViewModel
{
[Required]
public string Name { get; set; }
[Required]
public byte[] Content { get; set; }
[Required]
public string[] Enrichment { get; set; }
[Required]
public string Output { get; set; }
[Required]
public string Language { get; set; }
}
The Sweep Controller is used to task and manage data collection sweeps.
List ACE sweeps.
List an ACE sweep by unique identifier.
public class SweepExecutionViewModel
{
[Required]
public Guid[] ComputerId { get; set; }
[Required]
public Guid ScriptId { get; set; }
[Required]
public string Uri { get; set; }
}
The User Controller is used to create and manage users for the ACE Web Application. Each new user is assigned an API Key, which must be used to authenticate future API requests. ACE is created with a default user named "Admin" with an API Key of d0bf91fa-9934-40ca-8cb9-5a1168546abc. As the Admin user's API Key is documented, it is recommended that the Admin user is used only to create a new user account before it is deleted.
Delete a user account.
List user accounts.
Add a new user account.
User accounts must follow the format below:
public class UserViewModel
{
[Required]
public string UserName { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public bool IsAdmin { get; set; }
}
Update an existing user account.
User accounts must be submitted following the format shown below:
public class UserViewModel
{
[Required]
public string UserName { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public bool IsAdmin { get; set; }
}