Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. #!/bin/sh
  2. echo Distribution and kernel version
  3. cat /etc/issue
  4. uname -a
  5.  
  6. echo Mounted filesystems
  7. mount -l
  8.  
  9. echo Network configuration
  10. ifconfig -a
  11. cat /etc/hosts
  12. arp
  13.  
  14. echo Development tools availability
  15. which gcc
  16. which g++
  17. which python
  18.  
  19. echo Installed packages (Ubuntu)
  20. dpkg -l
  21.  
  22. echo Services
  23. netstat -tulnpe
  24.  
  25. echo Processes
  26. ps -aux
  27.  
  28. echo Scheduled jobs
  29. find /etc/cron* -ls 2>/dev/null
  30. find /var/spool/cron* -ls 2>/dev/null
  31.  
  32. echo Readable files in /etc 
  33. find /etc -user `id -u` -perm -u=r \
  34. -o -group `id -g` -perm -g=r \
  35. -o -perm -o=r \
  36. -ls 2>/dev/null 
  37.  
  38. echo SUID and GUID writable files
  39. find / -o -group `id -g` -perm -g=w -perm -u=s \
  40. -o -perm -o=w -perm -u=s \
  41. -o -perm -o=w -perm -g=s \
  42. -ls 2>/dev/null 
  43.  
  44. echo SUID and GUID files
  45. find / -type f -perm -u=s -o -type f -perm -g=s \
  46. -ls 2>/dev/null
  47.  
  48. echo Writable files outside HOME
  49. mount -l find / -path “$HOME” -prune -o -path “/proc” -prune -o \( ! -type l \) \( -user `id -u` -perm -u=w  -o -group `id -g` -perm -g=w  -o -perm -o=w \) -ls 2>/dev/null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement