Advertisement
shifat627

pri

May 20th, 2016
1,057
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.23 KB | None | 0 0
  1. #I have customized this script from bleow link and I am not author of this script
  2. #https://gist.github.com/sckalath/8b8fe29ee5489eaefda1
  3.  
  4. cat /proc/version
  5. uname -a
  6. uname -mrs
  7.  
  8. dmesg | grep Linux
  9. ls /boot | grep vmlinuz-
  10.  
  11.  
  12.  
  13. env
  14.  
  15.  
  16.  
  17.  
  18. ps aux
  19. ps -ef
  20.  
  21. cat /etc/service
  22.  
  23.  
  24. ps aux | grep root
  25. ps -ef | grep root
  26.  
  27.  
  28. ls -alh /usr/bin/
  29. ls -alh /sbin/
  30. dpkg -l
  31.  
  32. ls -alh /var/cache/apt/archivesO
  33. ls -alh /var/cache/yum/
  34.  
  35.  
  36. cat /etc/syslog.conf
  37. cat /var/log/syslog.conf
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. cat /etc/cups/cupsd.conf
  46.  
  47.  
  48. cat /etc/my.conf
  49.  
  50.  
  51. cat /etc/inetd.conf
  52.  
  53.  
  54. ls -aRl /etc/ | awk '$1 ~ /^.*r.*/'
  55.  
  56.  
  57. crontab -l
  58. ls -alh /var/spool/cron
  59. ls -al /etc/ | grep cron
  60. ls -al /etc/cron*
  61. cat /etc/cron*
  62. cat /etc/at.allow
  63. cat /etc/at.deny
  64. cat /etc/cron.allow
  65. cat /etc/cron.deny
  66. cat /etc/crontab
  67. cat /etc/anacrontab
  68. cat /var/spool/cron/crontabs/root
  69.  
  70.  
  71. grep -i user $(ls)
  72. grep -i pass $(ls)
  73. grep -C 5 "password" $(ls)
  74. find . -name "*.php" -print0 | xargs -0 grep -i -n "var $password"   # Joomla
  75.  
  76.  
  77. /sbin/ifconfig -a
  78. cat /etc/network/interfaces
  79. cat /etc/sysconfig/network
  80.  
  81.  
  82. lsof -i
  83. lsof -i :80
  84. grep 80 /etc/services
  85. netstat -antup
  86. netstat -antpx
  87. netstat -tulpn
  88. chkconfig --list
  89. chkconfig --list | grep 3:on
  90. last
  91. w
  92.  
  93. arp -a
  94. route
  95. /sbin/route -nee
  96.  
  97.  
  98. cat /etc/resolv.conf
  99. cat /etc/sysconfig/network
  100. cat /etc/networks
  101. iptables -L
  102. hostname
  103. dnsdomainname
  104.  
  105.  
  106.  
  107.  
  108. netstat -tupan
  109.  
  110.  
  111.  
  112.  
  113. id
  114. who
  115. w
  116. last
  117. cat /etc/passwd | cut -d :  -f 1  # List users
  118. grep -v -E "^#" /etc/passwd | awk -F: '$3 == 0 { print $1}'   # List of super users
  119. awk -F: '($3 == "0") {print}' /etc/passwd   # List of super users
  120.  
  121.  
  122. cat /etc/sudoers
  123.  
  124.  
  125.  
  126.  
  127.  
  128. cat /etc/passwd
  129. cat /etc/group
  130. cat /etc/shadow
  131. ls -alh /var/mail/
  132.  
  133.  
  134. ls -ahlR /root/
  135. ls -ahlR /home/
  136.  
  137.  
  138. cat /var/apache2/config.inc
  139. cat /var/lib/mysql/mysql/user.MYD
  140. cat /root/anaconda-ks.cfg
  141.  
  142.  
  143. cat ~/.bash_history
  144. cat ~/.nano_history
  145. cat ~/.atftp_history
  146. cat ~/.mysql_history
  147. cat ~/.php_history
  148.  
  149.  
  150. cat ~/.bashrc
  151. cat ~/.profile
  152. cat /var/mail/root
  153. cat /var/spool/mail/root
  154.  
  155.  
  156. cat ~/.ssh/authorized_keys
  157. cat ~/.ssh/identity.pub
  158. cat ~/.ssh/identity
  159. cat ~/.ssh/id_rsa.pub
  160. cat ~/.ssh/id_rsa
  161. cat ~/.ssh/id_dsa.pub
  162. cat ~/.ssh/id_dsa
  163. cat /etc/ssh/ssh_config
  164. cat /etc/ssh/sshd_config
  165. cat /etc/ssh/ssh_host_dsa_key.pub
  166. cat /etc/ssh/ssh_host_dsa_key
  167. cat /etc/ssh/ssh_host_rsa_key.pub
  168. cat /etc/ssh/ssh_host_rsa_key
  169. cat /etc/ssh/ssh_host_key.pub
  170. cat /etc/ssh/ssh_host_key
  171.  
  172.  
  173. ls -aRl /etc/ | awk '$1 ~ /^.*w.*/' 2>/dev/null    
  174. ls -aRl /etc/ | awk '$1 ~ /^..w/' 2>/dev/null      
  175. ls -aRl /etc/ | awk '$1 ~ /^.....w/' 2>/dev/null  
  176. ls -aRl /etc/ | awk '$1 ~ /w.$/' 2>/dev/null          
  177.  
  178. find /etc/ -readable -type f 2>/dev/null                      
  179. find /etc/ -readable -type f -maxdepth 1 2>/dev/null  
  180.  
  181.  
  182. ls -alh /var/log
  183. ls -alh /var/mail
  184. ls -alh /var/spool
  185. ls -alh /var/spool/lpd
  186. ls -alh /var/lib/pgsql
  187. ls -alh /var/lib/mysql
  188. cat /var/lib/dhcp3/dhclient.leases
  189.  
  190.  
  191. ls -alhR /var/www/
  192. ls -alhR /srv/www/htdocs/
  193. ls -alhR /usr/local/www/apache22/data/
  194. ls -alhR /opt/lampp/htdocs/
  195. ls -alhR /var/www/html/
  196.  
  197.  
  198.  
  199. cat /etc/httpd/logs/access_log
  200. cat /etc/httpd/logs/access.log
  201. cat /etc/httpd/logs/error_log
  202. cat /etc/httpd/logs/error.log
  203. cat /var/log/apache2/access_log
  204. cat /var/log/apache2/access.log
  205. cat /var/log/apache2/error_log
  206. cat /var/log/apache2/error.log
  207. cat /var/log/apache/access_log
  208. cat /var/log/apache/access.log
  209. cat /var/log/auth.log
  210. cat /var/log/chttp.log
  211. cat /var/log/cups/error_log
  212. cat /var/log/dpkg.log
  213. cat /var/log/faillog
  214. cat /var/log/httpd/access_log
  215. cat /var/log/httpd/access.log
  216. cat /var/log/httpd/error_log
  217. cat /var/log/httpd/error.log
  218. cat /var/log/lastlog
  219. cat /var/log/lighttpd/access.log
  220. cat /var/log/lighttpd/error.log
  221. cat /var/log/lighttpd/lighttpd.access.log
  222. cat /var/log/lighttpd/lighttpd.error.log
  223. cat /var/log/messages
  224. cat /var/log/secure
  225. cat /var/log/syslog
  226.  
  227. cat /var/log/xferlog
  228. cat /var/log/yum.log
  229. cat /var/run/utmp
  230. cat /var/webmin/miniserv.log
  231. cat /var/www/logs/access_log
  232. cat /var/www/logs/access.log
  233. ls -alh /var/lib/dhcp3/
  234. ls -alh /var/log/postgresql/
  235. ls -alh /var/log/proftpd/
  236. ls -alh /var/log/samba/
  237.  
  238.  
  239.  
  240.  
  241.  
  242. vi -> :sh or :!UNIX_command
  243.  
  244.  
  245. mount
  246. df -h
  247.  
  248.  
  249. cat /etc/fstab
  250.  
  251.  
  252. find / -perm 777
  253.  
  254.  
  255. find / -perm +4000 -type f
  256.  
  257.  
  258. find / -perm +4000 -uid 0 -type f
  259.  
  260.  
  261. find / -perm -1000 -type d 2>/dev/null  
  262. find / -perm -g=s -type f 2>/dev/null    
  263. find / -perm -u=s -type f 2>/dev/null    
  264.  
  265. find / -perm -g=s -o -perm -u=s -type f 2>/dev/null  
  266. for i in `locate -r "bin$"`; do find $i \( -perm -4000 -o -perm -2000 \) -type f 2>/dev/null; done    
  267.  
  268.  
  269. find / -perm -g=s -o -perm -4000 ! -type l -maxdepth 3 -exec ls -ld {} \; 2>/dev/null
  270.  
  271.  
  272. find / -writable -type d 2>/dev/null        
  273. find / -perm -222 -type d 2>/dev/null      
  274. find / -perm -o+w -type d 2>/dev/null    
  275. find / -perm -o+x -type d 2>/dev/null    
  276. find / \( -perm -o+w -perm -o+x \) -type d 2>/dev/null  
  277.  
  278.  
  279. find / -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print  
  280. find /dir -xdev \( -nouser -o -nogroup \) -print  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287. find / -name perl*
  288. find / -name python*
  289. find / -name gcc*
  290. find / -name cc
  291.  
  292.  
  293. find / -name wget
  294. find / -name nc*
  295. find / -name netcat*
  296. find / -name tftp*
  297. find / -name ftp
  298.  
  299. cat /var/log/wtmp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement