Last active
August 20, 2018 13:24
-
-
Save noqcks/1801aaab638bd1682bb62b85d05a0fd6 to your computer and use it in GitHub Desktop.
PCI Output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run as './task.sh >> $(hostname)-$(date +%Y-%m-%d).txt 2>&1' | |
set -e | |
set -x | |
ssh -V | |
# list interfaces | |
ip addr | |
uname -a | |
cat /etc/issue | |
cat /etc/issue.net | |
cat /etc/pam.d/common-password | |
cat /etc/pam.d/login | |
lscpu | |
cat /etc/ssh/sshd_config | |
cat /etc/login.defs | |
cat /etc/passwd | cut -d : -f 1 | awk '{system("passwd -S " $0) }' | |
systemctl list-unit-files | |
service --status-all | grep + | |
cat /etc/shadow | |
cat /etc/audit/rules.d/audit.rules | |
cat /etc/audit/audit.rules | |
dpkg --list |grep ntp | |
ntpq -p | |
cat /etc/ntp.conf | |
ls -l /etc/ntp.conf | |
ls -l /var/log | |
sysctl -a | |
netstat –an | |
cat /etc/group | |
cat /etc/passwd | |
# setuid / setgid | |
LANG=C; find '/' -xdev -type f \( -perm -04000 -o -perm -02000 \) 2>/dev/null | cat | |
LANG=C; find '/boot' -xdev -type f \( -perm -04000 -o -perm -02000 \) 2>/dev/null | cat | |
# world writable | |
LANG=C; find '/' -xdev -type f \( -perm -0002 -a \! -perm -1000 \) 2>/dev/null | cat | |
LANG=C; find '/boot' -xdev -type f \( -perm -0002 -a \! -perm -1000 \) 2>/dev/null | cat | |
# get umask and other login properties | |
cat /etc/login.defs | |
# show all listening on tcp and udp | |
ss -antupl | |
# show INPUT rules for iptables | |
/sbin/iptables -L INPUT -v -n | |
# simulate upgrade | |
/usr/bin/apt-get -s upgrade | |
# list trusted gpg keys | |
/usr/bin/apt-key list | |
# list mounted devices and options | |
mount | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment