You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|ruby|lua|irb' | xargs -r ls -la 2>/dev/null Can the current user run any ‘interesting’ binaries as root and if so also display the binary permissions etc.
363
+
364
+
365
+
Environmental Information:
366
+
367
+
Command Result
368
+
env Display environmental variables
369
+
set As above
370
+
echo $PATH Path information
371
+
history Displays command history of current user
372
+
pwd Print working directory, i.e. ‘where am I’
373
+
cat /etc/profile Display default system variables
374
+
cat /etc/shells Display available shells
375
+
376
+
377
+
Interesting Files:
378
+
379
+
Command Result
380
+
find / -perm -4000 -type f 2>/dev/null Find SUID files
381
+
find / -uid 0 -perm -4000 -type f 2>/dev/null Find SUID files owned by root
382
+
find / -perm -2000 -type f 2>/dev/null Find GUID files
383
+
find / -perm -2 -type f 2>/dev/null Find world-writeable files
384
+
find / ! -path "*/proc/*" -perm -2 -type f -print 2>/dev/null Find world-writeable files excluding those in /proc
385
+
find / -perm -2 -type d 2>/dev/null Find word-writeable directories
ls -la /usr/sbin/in.* Check Configuration of inetd services
396
+
grep -l -i pass /var/log/*.log 2>/dev/null Check log files for keywords (‘pass’ in this example) and show positive matches
397
+
find /var/log -type f -exec ls -la {} ; 2>/dev/null List files in specified directory (/var/log)
398
+
find /var/log -name *.log -type f -exec ls -la {} ; 2>/dev/null List .log files in specified directory (/var/log)
399
+
find /etc/ -maxdepth 1 -name *.conf -type f -exec ls -la {} ; 2>/dev/null List .conf files in /etc (recursive 1 level)
400
+
ls -la /etc/*.conf As above
401
+
find / -maxdepth 4 -name *.conf -type f -exec grep -Hn password {} ; 2>/dev/null Find .conf files (recursive 4 levels) and output line number where the word ‘password’ is located
402
+
lsof -i -n List open files (output will depend on account privileges)
403
+
head /var/mail/root Can we read roots mail
404
+
405
+
406
+
Service Information:
407
+
408
+
Command Result
409
+
ps aux | grep root View services running as root
410
+
ps aux | awk '{print $11}'|xargs -r ls -la 2>/dev/null |awk '!x[$0]++' Lookup process binary path and permissions
411
+
cat /etc/inetd.conf List services managed by inetd
412
+
cat /etc/xinetd.conf As above for xinetd
413
+
cat /etc/xinetd.conf 2>/dev/null | awk '{print $7}' |xargs -r ls -la 2>/dev/null A very ‘rough’ command to extract associated binaries from xinetd.conf and show permissions of each
414
+
ls -la /etc/exports 2>/dev/null; cat /etc/exports 2>/dev/null Permissions and contents of /etc/exports (NFS)
415
+
416
+
417
+
Jobs/Tasks:
418
+
419
+
Command Result
420
+
crontab -l -u %username% Display scheduled jobs for the specified user – Privileged command
421
+
ls -la /etc/cron* Scheduled jobs overview (hourly, daily, monthly etc)
422
+
ls -aRl /etc/cron* | awk '$1 ~ /w.$/' 2>/dev/null What can ‘others’ write in /etc/cron* directories
423
+
top List of current tasks
424
+
425
+
426
+
Networking, Routing & Communications:
427
+
428
+
Command Result
429
+
/sbin/ifconfig -a List all network interfaces
430
+
cat /etc/network/interfaces As above
431
+
arp -a Display ARP communications
432
+
route Display route information
433
+
cat /etc/resolv.conf Show configured DNS sever addresses
434
+
netstat -antp List all TCP sockets and related PIDs (-p Privileged command)
435
+
netstat -anup List all UDP sockets and related PIDs (-p Privileged command)
436
+
iptables -L List rules – Privileged command
437
+
cat /etc/services View port numbers/services mappings
438
+
439
+
440
+
Programs Installed:
441
+
442
+
Command Result
443
+
dpkg -l Installed packages (Debian)
444
+
rpm -qa Installed packages (Red Hat)
445
+
sudo -V Sudo version – does an exploit exist?
446
+
httpd -v Apache version
447
+
apache2 -v As above
448
+
apache2ctl (or apachectl) -M List loaded Apache modules
0 commit comments