A script to help automate the recovery of triage artifacts from compromised Netscaler hosts.
- The script creates a directory on the /var partition
/var/artifactRecovery
to store the triage artifacts temporarily - The desired artifacts are copied to this temporary location then zipped into an archive
/var/artifactRecovery/<hostname>-recoveredArtifacts.zip
- Shutil copytree is used to help preserve metadata such as permissions and timestamps where possible
- Curl the script down to your host
curl https://raw.githubusercontent.com/L4r1k/CitrixNetscalerTriageScript/master/citrixTriageScript.py -o triageScript.py
- Run the script
python triageScript.py
- Once completed, retrieve the zip archive of recovered triage artifacts
/var/artifactRecovery/<hostname>-recoveredArtifacts.zip
- Remove the script and the recovery directory from the host if desired
rm -rf /var/artifactRecovery
rm triageScript.py
(or wherever else it was saved - see the output of the script for help)
- /var/log
- /netscaler
- /var/tmp/netscaler
- /var/cron/tabs
- /var/nstmp
- /tmp/.init
- 'ps aux' output
- 'lsof -i -n -P' output