Overview of pt_autodoc.cna
masterThe pt_autodoc.cna Cortana script monitors for the addition and deletion of hosts and services. It records these changes in a MySQL database, which can subsequently be imported into graph visualization software like Gephi.
Key behaviors:
- Addition: When a host or service is detected, the script checks the graph database. If it doesn't exist, it creates the node and any necessary parent nodes (e.g., subnets) and establishes the appropriate edges. If the node exists, it updates the node's end time.
- Deletion: When a host or service is removed, the script does not delete the node from the graph. Instead, it sets the end time of the associated node to the current time.
- Data Persistence Note: Nodes store a single start and end time. If a service is added and removed multiple times, the database only retains the initial 'seen' time and the most recent end time.