, 10 tweets, 2 min read
My Authors
Read all threads
CVE-2019-19781
Live Response First Steps
=========================

Some tips on how to go about running a micro-compromise assessment on Netscaler boxes, this is what I've been using:

>>> Check the root user command history: history /1
>>> Check bash log files and sort by frequency, less frequent commands at the top: cat /var/log/bash.log | grep -Eio "shell_command=.*$" | sort | uniq -c | sort -n && zcat /var/log/bash*.gz | grep -Eio "shell_command=.*$" | sort | uniq -c | sort -n /2
>>> Check logs files (mostly ns.log and httpaccess.log but no hurt in listing them all): cat /var/log/* | grep -Ei "vpns|\.pl " && zcat /var/log/*.gz | grep -Ei "vpns|\.pl " /3
>>> Check for recently modified/written XML files, sort by date, most recent ones at the bottom (1): find / -name "*.xml" -exec ls -haltr {} \; | sed 's/ */ /g' | sort -k 8 /4
>>> Check for recently modified/written XML files, since the Vuln was announced by Citrix: find / -name "*.xml" -newermt "2020-01-10" && find / -name "*.pl" -newermt "2020-01-10" && find / -name "*.py" -newermt "2020-01-10" /5
>>> Check your crontab logs: cat /var/log/cron | sed 's/ */ /g' | cut -d" " -f 10 | sort | uniq -c && zcat /var/log/cron*gz | sed 's/ */ /g' | cut -d" " -f 10 | sort | uniq -c /6
>>> Check for recently mod scripts, sort by date, most recent ones at the bottom (you should technically only see /var/ns_system_backup.pl): find / -name "*.pl" -exec ls -haltr {} \; | grep -iv "local\/lib" | sed 's/ */ /g' | sort -k 8 /7
>>> Check for suspicious running processes and their connections (1): lsof -RPni && lsof -PnP (you could further filter with grep) /8
>>> Check for suspicious running processes and their connections (2): ps auxd | grep nobody (Ref: TrustedSec Article) /9
>>> If you want a more targeted approach, grep for suspicious scripts in the logs: zgrep -Ei "newbm.pl|rmbm.pl|picktheme.pl" /var/log/*.gz /10
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with darkQuasar

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!