Тёмный

Tutorial SQL Server/IIS Logs: How to load and analyze(query) Internet Information Services Web Logs 

Dr. Todd Wolfe Technology Training and Tutorials
Подписаться 1,9 тыс.
Просмотров 4 тыс.
50% 1

In this tutorial, Dr. Todd Wolfe demonstrates how to use SQL Server to import IIS web logs for analysis. At the end of this tutorial you will know how to
1) Find the location of your IIS Web Logs
2) Create a SQL Server Table structure to match the IIS Log format
3) Bulk insert an IIS log to SQL Server
4) Query the SQL Server table for important website visitor information
Use this method if you do not currently have any existing SIEM or log analysis in place for your Windows-hosted websites.
This can be used to help discover potential malicious activity occurring along with the Symantec IIS report released earlier today about the new stealthy "Cranefly" campaign that uses IIS Logs.
You can read more here "Cranefly: Threat Actor Uses Previously Unseen Techniques and Tools in Stealthy Campaign"
symantec-enter...
--SQL Commands if needed
DROP TABLE IF EXISTS dbo.IISLOG
CREATE TABLE dbo.IISLOG (
[DATE] [DATE] NULL,
[TIME] [TIME] NULL,
[s-ip] [VARCHAR] (48) NULL,
[cs-method] [VARCHAR] (8) NULL,
[cs-uri-stem] [VARCHAR] (255) NULL,
[cs-uri-query] [VARCHAR] (2048) NULL,
[s-port] [VARCHAR] (4) NULL,
[s-username] [VARCHAR] (256) NULL,
[c-ip] [VARCHAR] (48) NULL,
[cs(User-Agent)] [VARCHAR] (1024) NULL,
[cs(Referer)] [VARCHAR] (4096) NULL,
[sc-STATUS] [INT] NULL,
[sc-substatus] [INT] NULL,
[sc-win32-STATUS] [BIGINT] NULL,
[time-taken] [INT] NULL,
INDEX cci CLUSTERED COLUMNSTORE
)
--Bulk insert, update from with your path and filename.
BULK INSERT dbo.IISLog
FROM 'C:\inetpub\logs\LogFiles\W3SVC1\u_ex221028.log'
WITH (
FIRSTROW = 2,
FIELDTERMINATOR = ' ',
ROWTERMINATOR = '
'
)

Опубликовано:

 

13 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 2   
@facundovega5673
@facundovega5673 Год назад
Great video ! Thank you !
@drToddWolfe
@drToddWolfe Год назад
Thank you! If you have any recommendations for other topics feel free to reach out.
Далее
Solving one of PostgreSQL's biggest weaknesses.
17:12
Просмотров 201 тыс.
7 Days Exploring An Underground City
20:35
Просмотров 46 млн
UUID vs INT: What’s Better For Your Primary Key?
9:40
Configuring HTTP access to Analysis Services
9:50
Просмотров 22 тыс.
LogParser   IIS Logs
16:40
Просмотров 7 тыс.