Answer the question
In order to leave comments, you need to log in
How to find the path to the mysql password guessing script?
There is a server with a bunch of web-projects. Outside, access to mysql is closed, access via SSH to users is closed. A line like mysqld periodically appears in /var/log/messages: 2020-07-29 10:10:22 140000674043648 [Warning] Access denied for user 'admin'@'localhost' (using password: YES)
Logins are different. Sometimes they match domain names, sometimes they don't.
The question is how to find out where is the script that is used to guess the password?
general_log is not an option. There are so many requests that a million records are collected in 3 seconds of work. Here's how to write down exactly the requests ending with Access denied and with the path to the script that was used to try to authorize?
Answer the question
In order to leave comments, you need to log in
sudo cat /var/log/mysql/error.err | egrep '[aA]ccess denied'
sudo apt install acct atop
atop -r /var/log/atop/atop_20200729
sudo lsof -i :2345
ls -l /proc/6726/exe
pwdx 6726
an option to search all files on the server for the presence of the string "Admin2"
there may be a brute force script with a list of default logins or a text dictionary, etc.
find / -type f | xargs grep "Admin2"
, you can search not from the root, but for example in / home or / var, etc.
If something was trying to guess the password from within... wouldn't it be easier to see the login/password in the project settings?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question