Prebuilt Tasks

The following information is for Ghostwriter's provided tasks

Release Domains

The ghostwriter.shepherd.tasks.release_domains function checks if the currently checked out domain names are due to be released. It sends a Slack message if Slack is enabled and the domain's release date is either tomorrow or today. If the release date is today the domain is also released back into the pool.

Release Servers

The ghostwriter.shepherd.tasks.release_servers function checks if the currently checked out servers are due to be released. It sends a Slack message if Slack is enabled and the server's release date is either tomorrow or today. If the release date is today the server is also released back into the pool.

Check Domains

The ghostwriter.shepherd.tasks.check_domains function checks each domain name to update categorization. The function uses the DomainCheck tool. More information is available here:

Update DNS

The ghostwriter.shepherd.tasks.update_dns function updates Ghostwriter's records of each domain's current DNS records using dnspython and constructed DNS queries.

Archive Projects

The ghostwriter.reporting.tasks.archive_projects function collects a list of projects marked as complete and checks if the project's end date is 90 days (default) in the past. Completed projects older than the specified number of days are archived. This process mostly affects reports attached to the project. Each report is marked as complete (if not already marked as such) and marked as archived. All report types are generated and rolled into a zip file with copies of all of the evidence files. Finally, the evidence files are deleted. The archive files can be browsed and downloaded as needed.

Scan Servers

The ghostwriter.shepherd.tasks.scan_servers function collects a list of static servers catalogued in Ghostwriter, scans them for open ports using python-nmap, and records the results (the open port number and protocol). Then the results are compared to previous results. If Slack is enabled, Ghostwriter will send a Slack notification if a new port is found to be open.

This function focuses on the static servers because these servers are assumed to be owned by you and used for command and control (C2). These servers should not have open services exposed to the whole internet, so this is meant to alert you of open ports accessible outside of your management ranges. Transient servers (i.e. virtual private servers, cloud servers) are likely to have open ports for phishing webpages and C2 redirection.

If you will be using this task the Q cluster needs to be started using as administrator / root permissions. Administrative privileges are required for the TCP SYN scan.