官术网_书友最值得收藏!

Database logs

We just saw how we could process basic application server logs. Let's see how we can grab database logs and make the most of them in our forensic investigation. Database servers, such as MySQL and MS SQL, contain log files with information that helps a forensic investigator to understand the chain of events in a much better way. General query logs in MySQL present an investigator with all the queries that were executed during the time of the attack:

We can see that the general query log file allows us to view failed attempts by the attacker to log into the MySQL server. However, it also suggests that there are two successful attempts. Let's further investigate:

We can see that after the failed attempts, the attacker logged in and ran the preceding queries on the database. Query log files are convenient for pinpointing the actual intent of the attacker. In the upcoming chapters, we will look at numerous case study examples on various databases.

On XAMPP, general query logs can be enabled by running the following query:

SET global general_log = 1;

Here's a better way to log all queries in MySQL:

SET global general_log_file='/tmp/mysql.log'; 
SET global log_output = 'file';
SET global general_log = on;  
主站蜘蛛池模板: 石狮市| 石楼县| 那坡县| 历史| 滨州市| 兖州市| 威信县| 界首市| 涪陵区| 东宁县| 九台市| 翁牛特旗| 二连浩特市| 沁源县| 瓦房店市| 扬州市| 广平县| 曲水县| 沂源县| 太保市| 阿拉善左旗| 南投市| 安福县| 晋中市| 阳信县| 正安县| 固安县| 长垣县| 江山市| 横山县| 东港市| 六安市| 宁海县| 连州市| 黄陵县| 麻阳| 泰来县| 荣成市| 南宁市| 古蔺县| 竹溪县|