From today morning, I am witnessing a series of continuous POST requests hitting on one of blog running on wordpress software on my server.
Few things about this pattern:
- These continuous requests last for 2 minutes every-time
- In this 2 minute duration, 4 POST request hits every second at wp-login.php
- Then these requests go silent, and start again after 1 hour, again last for 2 minutes, with 4 request every second.
- Everytime IP address is different
- All IPs traced belong to China
- Tried blocking IPs but its easy for them to evade, as every hour they hit with new IP
I am using nginx, is there any way by which I can block such attempts to hack. It is a bigger concern because when these requests come, several times, other websites running on same server gets hampered. If anyone can provide any pointers of how to secure your server from such attempts, are most welcome.
Please find below, excerpt from logs.
xx.153.217.xxx - - [12/Jan/2015:13:45:13 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:13 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:13 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:13 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:14 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:14 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:14 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:14 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:15 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:15 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:15 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:15 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:16 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:16 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:16 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
xx.153.217.xxx - - [12/Jan/2015:13:45:16 +0530] "POST /wp-login.php HTTP/1.1" 200 3662 "http://blog.xxxxxx.in/wp-login.php" "Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 125LA; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"
Best Answer
My preferred way of dealing with this is to block access to anything in the
/wp-admin/
folder and/wp-login.php
to everywhere except a known static IP, say the IP of your office. Barring that, look intofail2ban
or any number of wordpress plugins that can handle mitigating these brute-force hacking attempts.