UNIX Commands executed by DNA

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

PAM Self-Hosted Articles
4 min read
L3 Networker
No ratings

Question

What commands are executed during a DNA scan of UNIX systems?

Answer

 The following is a list of UNIX commands that are executed by the DNA scan. These were extracted from the logs, so entries that contain /home/tsawyer or /home/labuser may change based on the content of the /etc/passwd file. 

For additional information on the command itself, please consult the documentation for that particular version of UNIX or the man page. 

UNIX Commands: 
------------------------
uname -s 
ls -d /etc/[A-Za-z]*[_-][rv]e[lr]* | grep -v 'lsb\|os\|system' 
cat "/etc/iredmail-release" 
cat "/etc/redhat-release" 
getent group | grep 'domain_users' 
echo $HOSTNAME 
echo $LANG 
echo $PS1 
echo $PS2 
echo $SHELL 
echo $TERM 
echo $USER 
echo $UID 
echo $HOSTTYPE 
echo $SSH_TTY 
stty -a 
test -f "/etc/passwd"; echo $? 
cat "/etc/passwd" 
getent passwd 
dzdo -V 
sesudo >/dev/null 2>&1; echo $? 
sudo >/dev/null 2>&1; echo $? 
cat /proc/cpuinfo | grep processor | wc -l 
sudo test -f "/etc/shadow"; echo $? 
sudo cat "/etc/shadow" 
test -f "/etc/group"; echo $? 
cat "/etc/group" 
sudo test -f "/etc/sudoers"; echo $? 
sudo cat "/etc/sudoers" 
/sbin/ifconfig | grep 'inet' | grep -v '127.0.0.1' 
hostname -s 
sudo lastlog | grep -v '*' 
ssh -V 
sudo test -f "/etc/ssh/sshd_config"; echo $? 
sudo cat "/etc/ssh/sshd_config" 
sudo test -f "/root/.ssh/authorized_keys"; echo $? 
sudo test -f "/etc/abrt/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/run/lsm/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/lib/colord/.ssh/authorized_keys"; echo $? 
sudo test -f "/run/saslauthd/.ssh/authorized_keys"; echo $? 
sudo test -f "/proc/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/lib/chrony/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/lib/geoclue/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/lib/setroubleshoot/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/run/pulse/.ssh/authorized_keys"; echo $? 
sudo test -f "/run/gnome-initial-setup/.ssh/authorized_keys"; echo $? 
sudo test -f "/home/tsawyer/.ssh/authorized_keys"; echo $? ==> Note that this directory may differ based on the passwd file 
sudo test -f "/home/labuser/.ssh/authorized_keys"; echo $? ==> Note that this directory may differ based on the passwd file 
sudo grep -v '^$' /home/tsawyer/.ssh/authorized_keys | awk 'NR==1' > /tmp/dna_tmp_key7 
sudo ssh-keygen -lf "/tmp/dna_tmp_key7" 
rm -f "/tmp/dna_tmp_key7" 
sudo date +%s -r "/home/tsawyer/.ssh/authorized_keys" 
sudo test -f "/etc/syslog.conf"; echo $? 
sudo test -f "/etc/rsyslog.conf"; echo $? 
cat "/etc/rsyslog.conf" 
sudo test -f "/etc/syslog-ng/syslog-ng.conf"; echo $? 
grep 'sshd' "/var/log/secure" 
ps -ef | grep -i com.ibm.ws.runtime.WsServer | grep -v grep 
sudo find /opt/IBM/WebSphere/AppServer 
ps -ef | grep -i weblogic 
sudo find /u01 /u02 /disk01 /disk02 -name domain-registry.xml 2>/dev/null
Q: 
What commands are executed during a DNA scan of UNIX systems?
 
A:
 The following is a list of UNIX commands that are executed by the DNA scan. These were extracted from the logs, so entries that contain /home/tsawyer or /home/labuser may change based on the content of the /etc/passwd file. 
 
For additional information on the command itself, please consult the documentation for that particular version of UNIX or the man page. 
 
UNIX Commands: 
------------------------
uname -s 
ls -d /etc/[A-Za-z]*[_-][rv]e[lr]* | grep -v 'lsb\|os\|system' 
cat "/etc/iredmail-release" 
cat "/etc/redhat-release" 
getent group | grep 'domain_users' 
echo $HOSTNAME 
echo $LANG 
echo $PS1 
echo $PS2 
echo $SHELL 
echo $TERM 
echo $USER 
echo $UID 
echo $HOSTTYPE 
echo $SSH_TTY 
stty -a 
test -f "/etc/passwd"; echo $? 
cat "/etc/passwd" 
getent passwd 
dzdo -V 
sesudo >/dev/null 2>&1; echo $? 
sudo >/dev/null 2>&1; echo $? 
cat /proc/cpuinfo | grep processor | wc -l 
sudo test -f "/etc/shadow"; echo $? 
sudo cat "/etc/shadow" 
test -f "/etc/group"; echo $? 
cat "/etc/group" 
sudo test -f "/etc/sudoers"; echo $? 
sudo cat "/etc/sudoers" 
/sbin/ifconfig | grep 'inet' | grep -v '127.0.0.1' 
hostname -s 
sudo lastlog | grep -v '*' 
ssh -V 
sudo test -f "/etc/ssh/sshd_config"; echo $? 
sudo cat "/etc/ssh/sshd_config" 
sudo test -f "/root/.ssh/authorized_keys"; echo $? 
sudo test -f "/etc/abrt/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/run/lsm/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/lib/colord/.ssh/authorized_keys"; echo $? 
sudo test -f "/run/saslauthd/.ssh/authorized_keys"; echo $? 
sudo test -f "/proc/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/lib/chrony/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/lib/geoclue/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/lib/setroubleshoot/.ssh/authorized_keys"; echo $? 
sudo test -f "/var/run/pulse/.ssh/authorized_keys"; echo $? 
sudo test -f "/run/gnome-initial-setup/.ssh/authorized_keys"; echo $? 
sudo test -f "/home/tsawyer/.ssh/authorized_keys"; echo $? ==> Note that this directory may differ based on the passwd file 
sudo test -f "/home/labuser/.ssh/authorized_keys"; echo $? ==> Note that this directory may differ based on the passwd file 
sudo grep -v '^$' /home/tsawyer/.ssh/authorized_keys | awk 'NR==1' > /tmp/dna_tmp_key7 
sudo ssh-keygen -lf "/tmp/dna_tmp_key7" 
rm -f "/tmp/dna_tmp_key7" 
sudo date +%s -r "/home/tsawyer/.ssh/authorized_keys" 
sudo test -f "/etc/syslog.conf"; echo $? 
sudo test -f "/etc/rsyslog.conf"; echo $? 
cat "/etc/rsyslog.conf" 
sudo test -f "/etc/syslog-ng/syslog-ng.conf"; echo $? 
grep 'sshd' "/var/log/secure" 
ps -ef | grep -i com.ibm.ws.runtime.WsServer | grep -v grep 
sudo find /opt/IBM/WebSphere/AppServer 
ps -ef | grep -i weblogic 
sudo find /u01 /u02 /disk01 /disk02 -name domain-registry.xml 2>/dev/null
Rate this article:
  • 6042 Views
  • 0 comments
  • 0 Likes
Article Dashboard
Version history
Last Updated:
‎01-16-2023 06:46 PM
Updated by: