Web server logs
When reviewing web server logs, pay particular attention to the web servers that have web applications interacting with SQL databases.
The IIS Web server log files are located at \WINDOWS\system32\LogFiles\W3SVC1
and they are .log files that can be opened using Notepad. You can also use Excel or Microsoft Log Parser to open this file and perform basic queries.
You can download Log Parser from https://www.microsoft.com/en-us/download/details.aspx?id=24659.
When reviewing the IIS log, pay close attention to the cs-uri-query
and sc-status
fields. These fields will show details about the HTTP requests that were performed. If you use Log Parser, you can perform a query against the log file to quickly identify whether the system experienced a SQL injection attack. Here is an example:
logparser.exe -i:iisw3c -o:Datagrid -rtp:100 "select date, time, c-ip, cs- uri-stem, cs-uri-query, time-taken, sc-status from C:wwwlogsW3SVCXXXexTEST*.log...