Forum Moderators: phranque
185.244.43.71 - - [30/Nov/2018:22:31:25 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
185.244.43.71 - - [30/Nov/2018:22:31:25 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
185.244.43.71 - - [30/Nov/2018:22:31:26 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
185.244.43.71 - - [30/Nov/2018:22:31:26 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
protected2.by0x6ab.com - - [30/Nov/2018:22:31:27 +0800] "POST /xmlrpc.php HTTP/1.0" 403 480 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
protected2.by0x6ab.com - - [30/Nov/2018:22:31:27 +0800] "POST /xmlrpc.php HTTP/1.0" 403 478 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
protected2.by0x6ab.com - - [30/Nov/2018:22:31:29 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
protected2.by0x6ab.com - - [30/Nov/2018:22:31:29 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
protected.by0x6ab.xyz - - [30/Nov/2018:22:31:31 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
protected.by0x6ab.xyz - - [30/Nov/2018:22:31:31 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
protected.by0x6ab.xyz - - [30/Nov/2018:22:31:31 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
protected.by0x6ab.xyz - - [30/Nov/2018:22:31:31 +0800] "POST /xmlrpc.php HTTP/1.0" 302 197 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"
If you do not use your WP xmlrpc.php for anythingAh, is that what it's for? I see (blocked) requests for it all the time.
RewriteCond %{THE_REQUEST} filename.xtn
RewriteRule filename\.xtn - [F,NS]
which basically means “If you ask for it by name, you can’t have it”. (Depending on circumstances, the NS flag may be superfluous, but it can’t hurt.)
Here's a snip of that transition:The two different openings have less to do with the attacking robot than with your logging format. The first few lines show the raw IP address; the later lines show what the IP address resolves to. Assuming you didn't nip in and change something in your config file at precisely 30/Nov/2018:22:31:26 your-local-time, it means the attackers moved to a different IP address--one that, unlike the earlier one, resolves to a hostname of some kind.
If HostnameLookups is set to On, then the server will try to determine the hostname and log it in place of the IP address. However, this configuration is not recommended since it can significantly slow the server. Instead, it is best to use a log post-processor such as logresolve to determine the hostnames.And that's if you have set it intentionally; as noted above, it can also happen by accident. (Ask how I know :()
108.175.6.* [11/Dec/2016:21:38:18 POST /xmlrpc.php HTTP/1.0 200 403 http://example.com/xmlrpc.php Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko
$host 185.244.43.71
71.43.244.185.in-addr.arpa domain name pointer protected.by0x6ab.xyz.
<Files xmlrpc.php>
order deny,allow
deny from all
allow from 123.123.123.123
</Files>
It only takes a single error--a superfluous comma, say--to throw the whole log into resolve-IP modeWhat I did was to put all the IP addresses on one line and separated them by commas. Not a good idea or, so it seems? However, in doing that and activating the .htaccess file, this is when that "switch" occurred - changing from IP address to the faked URL. Hence my post. We live and learn and, in the process, live to see another day.
order deny,allow, etcinstead of
Require all deniedIn 2.2 that set up always confuded me [yup, as in "confused"]. It was always like a juggling act. Not being a good juggler, dropping one of those deny/allow balls and the whole directive gets screwed up. With Apache 2.4, it's now all there - as in yes or no - in just one line. Your insights would be appreciated.
<?php
/* Redirect browser */
header("Location: http://127.0.0.1");
exit;
?>
Deny from 193.201.224.218, 185.244.43.71, 185.244.43.86, 185.244.43.88
[edited by: phranque at 6:14 am (utc) on Dec 1, 2018]
[edit reason] unlinked url [/edit]
why are you implementing the Apache 2.2 syntax and not the Apache 2.4 syntax?
What I did was to put all the IP addresses on one line and separated them by commas. Not a good idea or, so it seems?Been there. Done that. Fine-tooth-comb the file, deleting all commas. The syntax is simply
# BLOCK IPS
<Limit GET POST>
order allow,deny
deny from 193.201.224.218
deny from 185.244.43
deny from 185.244.40.0/22
allow from all
</Limit>
# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
Require ip 111.222.333.444 [put in your own service's IP address]
</Files>
[Definition]
failregex = ^<HOST> .*POST .*xmlrpc\.php.*
ignoreregex =
[xmlrpc]
enabled = true
filter = xmlrpc
action = iptables[name=xmlrpc, port=https, protocol=tcp]
logpath = /var/log/apache2/access.log
bantime = 43200 ; 12 hours
maxretry = 2
findtime = 7200
A wind up of course.I sure hope so :) When I was looking up the correct name of mod_access_compat, I found some blahblah from Apache saying they don't recommend combining 2.4 and 2.2 access directives, even if it's technically possible. They may even have uttered the dreaded “unintended consequences” line, which is Apache-speak for “the world as we know it will come to an end”.
The xmlrpc.php is used to allow WP admin (and any users that have permissions set) to write posts remotely, without logging in to WP which is why it is such a target. It is only used remotely.
It is an option which imo is only used by WP users